求“简单生产入库单” 正确的JSON格式。WebAPI中的示例格式不能用!
以下是我根据各种文档写出来的,但结果不对。
{
\"Creator\": \"Creator_String\",
\"NeedUpDateFields\": [
\"\"
],
\"Model\": {
\"FID\": 0,
\"FDate\": \"2015-08-10\",
\"SP_InStock__FEntity\": [
{
\"FMaterialId\": {
\"FNUMBER\": \"301\"
},
\"FBaseRealQty\": 10,
\"FRealQty\": 10,
\"FUnitID\": {
\"FNUMBER\": \"tang\"
},
\"FWorkShopId1\": {
\"FNUMBER\": \"BM000003\"
},
\"FStockId\": {
\"FNUMBER\": \"CK001\"
}
}
],
\"FBillType\": {
\"FNUMBER\": \"JDSCRK01_SYS\"
},
\"FStockOrgId\": {
\"FNUMBER\": \"10202\"
},
\"FPrdOrgId\": {
\"FNUMBER\": \"10202\"
},
\"FOwnerId0\": {
\"FNumber\": \"10202\"
},
\"FCreatorId\": {
\"FUserAccount\": \"demo\"
},
\"FCreateDate\": \"2015-08-10\"
}
}
结果:
{
"Result": {
"ResponseStatus": {
"ErrorCode": 500,
"IsSuccess": false,
"Errors": [
{
"FieldName": "FWorkShopId1",
"Message": "单据体“明细”第1行字段“生产车间”是必填项"
},
{
"FieldName": "FUnitID",
"Message": "单据体“明细”第1行字段“单位”是必填项"
},
{
"FieldName": "",
"Message": "第1行分录,实收数量须大于0!"
},
{
"FieldName": "",
"Message": "第1行分录,实收数量(基本单位)必须大于0!"
},
{
"FieldName": "AbstractInteractionResult",
"Message": "AbstractInteractionResult.InteractionContext is null"
}
]
},
"Id": ""
}
}
推荐阅读