保存物料,出现"存货类别为必录项!"
背景:使用kingdee的Java-SDK作为第三方依赖包,用反射写了一个通用执行方法的API。
错误代码信息:
{
"msg": "success",
"code": 200,
"data": "{\"Result\":{\"ResponseStatus\":{\"ErrorCode\":500,\"IsSuccess\":false,\"Errors\":[{\"FieldName\":\"FCategoryID\",\"Message\":\"字段“存货类别”是必填项\",\"DIndex\":0},{\"FieldName\":\"FCategoryID\",\"Message\":\"存货类别为必录项!\",\"DIndex\":0}],\"SuccessEntitys\":[],\"SuccessMessages\":[],\"MsgCode\":11},\"Id\":\"\",\"Number\":\"\",\"NeedReturnData\":[{}]}}"
}
入参:
{
"action": "save",
"request_params": {
"formId": "BD_MATERIAL",
"jsonData": "{\"ValidateRepeatJson\":false,\"Model\":{\"FCreateOrgId\":{\"FNumber\":\"RRR\"},\"FUseOrgId\":{\"FNumber\":\"RRR\"},\"FName\":\"和利Horiiy-1\",\"FMaterialGroup\":{\"FNumber\":\"0107\"},\"SubHeadEntity\":{\"FErpClsID\":\"外购\",\"FFeatureItem\":\"单选\",\"FCategoryID\":{\"FNumber\":\"41\"},\"FBaseUnitId\":{\"FNumber\":\"Pcs\"},\"FIsInventory\": true,\"FSuite\":\"否\"},\"SubHeadEntity1\":{\"FStoreUnitID\":{\"FNumber\":\"Pcs\"},\"FUnitConvertDir\":\"1\",\"FCurrencyId\":{\"FNumber\":\"PRE001\"},\"FSNManageType\":\"1\",\"FSNGenerateTime\":\"1\"},\"SubHeadEntity3\":{\"FPurchaseUnitId\":{\"FNumber\":\"Pcs\"},\"FPurchasePriceUnitId\":{\"FNumber\":\"Pcs\"},\"FQuotaType\":\"顺序优先\"}}}"
}
}
把 FSuite = false 改成 0 后
入参:
{
"action": "save",
"request_params": {
"formId": "BD_MATERIAL",
"jsonData": "{\"ValidateRepeatJson\":false,\"Model\":{\"FCreateOrgId\":{\"FNumber\":\"RRR\"},\"FUseOrgId\":{\"FNumber\":\"RRR\"},\"FName\":\"和利Horiiy-1\",\"FMaterialGroup\":{\"FNumber\":\"0107\"},\"SubHeadEntity\":{\"FErpClsID\":\"外购\",\"FFeatureItem\":\"单选\",\"FCategoryID\":{\"FNumber\":\"41\"},\"FBaseUnitId\":{\"FNumber\":\"Pcs\"},\"FIsInventory\": true,\"FSuite\":\"0\"},\"SubHeadEntity1\":{\"FStoreUnitID\":{\"FNumber\":\"Pcs\"},\"FUnitConvertDir\":\"1\",\"FCurrencyId\":{\"FNumber\":\"PRE001\"},\"FSNManageType\":\"1\",\"FSNGenerateTime\":\"1\"},\"SubHeadEntity3\":{\"FPurchaseUnitId\":{\"FNumber\":\"Pcs\"},\"FPurchasePriceUnitId\":{\"FNumber\":\"Pcs\"},\"FQuotaType\":\"顺序优先\"}}}"
}
}
返回结果:
{
"msg": "success",
"code": 200,
"data": "{\"Result\":{\"ResponseStatus\":{\"IsSuccess\":true,\"Errors\":[],\"SuccessEntitys\":[{\"Id\":1581236,\"Number\":\"411903\",\"DIndex\":0}],\"SuccessMessages\":[],\"MsgCode\":0},\"Id\":1581236,\"Number\":\"411903\",\"NeedReturnData\":[{}]}}"
}
所以,false 要改成 0就解决了。
保存物料,出现"存货类别为必录项!"
背景:使用kingdee的Java-SDK作为第三方依赖包,用反射写了一个通用执行方法的API。错误代码信息:{ "msg": "success", "code":...
点击下载文档
上一篇:学习方法下一篇:在单据列表首行增加过滤条件
本文2024-09-16 17:39:09发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-17080.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章