保存物料,出现"存货类别为必录项!"

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

保存物料,出现

背景:使用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":...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息