webapi保存生产领料单带关联生产用料清单
7人赞赏了该文章
2,430次浏览
编辑于2022年03月10日 10:13:40
摘要由AI智能服务提供
本文档介绍了在创建单据时如何关联上游单据信息,包括所需字段及其顺序的重要性。详细说明了通过webapi或特定表查询关联数据的方法,并提供了JSON数据包模板,展示了如何填充这些字段。还列举了常见问题及解决方案,如字段格式错误、关联实体key查询、业务流程字段同步不上等问题的处理办法。
有用
反馈
业务场景:创建单据的时候关联上游单据信息
详情请参考:https://vip.kingdee.com/article/178896?channel_level=kdclub&isMapping=1
业务场景了解:
注意:正常来说关联领退补数据,要传入生产订单内码,编号,分录内码,分录行号,用料清单内码,编号,分录内码分录行号这八个字段
注意字段顺序可能会影响业务,尽量按照webapi官方文档中的字段顺序
创建生产领料单并反写上游单据信息JSON包模板如下:
获取FEntity_link字段数据方式
1,webapi 查询
2,简单方式通过对应的T_PRD_PICKMTRLDATA_LK,T_PRD_FEEDMTRLDATA_LK ,T_PRD_RETURNMTRLENTRY_LK 字段查询 也可以通过以下方式说明
1.FRuleId:单据转换内码,必录,(在转换规则设计界面中的唯一标识) BOS设计器-文件-单据转换-对应的转换规则中的唯一标识 2.FSTableName:需关联的上游单据实体表名,必录,(注意大小写敏感,需跟表定义表t_bf_tableDefine中的表编码一致) 3.FSBillId:上游单据内码,必录 4.FSId:关联的上游单据实体内码,必录,(一般为分录内码) 5.控制字段Key:控制字段的反写值,有则必录(单据关联配置中的控制字段) 6.控制字段Key+Old:上游字段携带值,有则必录(根据转换规则字段映射对应的上游字段) 7.FFlowId: 业务流程图内码,需要同步业务流程字段时必录 8.FFlowLineId: 推进路线,需要同步业务流程字段时必录 常见问题: 1.字段格式错误? 关联实体Key+下划线+字段Key 2.哪里可以查到关联实体key?webapi--》选中需要同步的单据--》选择保存接口--》最下面的数据字典(字段说明)--》滚动条拖到最后--》关联实体数据字典 或者 打开BOSIDE--》查看单据属性--》点击单据关联配置--》弹出单据关联配置窗口--》关联标识(Key) 4.没有创建关联关系或反写?检查上游单据实体表名字段,是否跟表定义表中的FTableNumber大小写完全相同,或者检查是否字段key或值多了空格 5.业务流程字段值同步不上? ,关联数据包要包含业务流程图的值并且业务流程字段值需放在关联数据包后面 6.业务流程图内码哪里找?BOSIDE单据转换--》XML数据中 或者 在业务流程版本多语言表T_BF_DEFVersion_L的FID 7.推进路线值哪里找?BOSIDE单据转换--》XML数据中 或者 在业务流程版本表T_BF_DEFVersion的FKernelXml中的上下游单据对应的LineId
JSON数据包:
{ "Model": { "FID": 0, "FBillType": { "FNUMBER": "SCLLD01_SYS" }, "FDate": "2021-02-21 00:00:00", "FStockOrgId": { "FNumber": "100" }, "FPrdOrgId": { "FNumber": "100" }, "FWorkShopId": { "FNumber": "BM000018" }, "fcurrid": { "fnumber": "PRE001" }, "FOwnerTypeId0": "BD_OwnerOrg", "FIsCrossTrade": false, "FVmiBusiness": false, "FIsOwnerTInclOrg": false, "FEntity": [ { "FMaterialId": { "FNumber": "xlhtest" }, "FStockId": { "FNumber": "CK001" }, "FStockStatusId": { "FNumber": "KCZT01_SYS" }, "FEntryWorkShopId": { "FNumber": "BM000018" }, "FMoBillNo": "MO000464", "FMoEntryId": "100727", "FPPBomBillNo": "PPBOM00000552", "FPPBomEntryId": "101896", "FOwnerTypeId": "BD_OwnerOrg", "FAppQty": 3, "fbaseappqty": 3, "FStockAppQty": 3, "FStockActualQty": 2, "FBaseStockActualQty": 2, "FStockFlag": "1", "FOperId": 10, "FRESERVETYPE": 1, "FGroupRow": "bca8a6b3-033e-b0e6-11eb-73f64a06c5b9", "FMoId": "100599", "FMoEntrySeq": "1", "FKeeperTypeId": "BD_KeeperOrg", "FKeeperId": { "Fnumber": "100" }, "FOwnerId": { "FNumber": "100" }, "FUnitID": { "fnumber": "Pcs" }, "FBaseUnitId": { "fnumber": "Pcs" }, "FStockUnitId": { "fnumber": "Pcs" }, "FActualQty": 2, "FBaseActualQty": 2, "FParentOwnerTypeId": "BD_OwnerOrg", "FParentOwnerId": { "FNumber": "100" }, "FParentMaterialId": { "fnumber": "MonV1" }, "FSrcBillType": "PRD_PPBOM", "FSrcBillNo": "PPBOM00000552", "FEntrySrcInterId": "101151", "FEntrySrcEnteryId": "101896", "FEntrySrcEntrySeq": "1", "FLot": { "FNumber": "203501S10700" }, "FEntity_Link": [ { "FEntity_Link_FFlowId": "81119477-4778-4d0b-94b9-1c43a1c1f768", "FEntity_Link_FFlowLineId": 5, "FEntity_Link_FRuleId": "PRD_PPBOM2PICKMTRL_NORMAL", "FEntity_Link_FSTableName": "T_PRD_PPBOMENTRY", "FEntity_Link_FSBillId": "101151", "FEntity_Link_FSId": "101896", "FEntity_Link_FBaseActualQtyOld": 3 } ], "FBFLOWID": { "FID": "81119477-4778-4d0b-94b9-1c43a1c1f768" } }, { "FMaterialId": { "FNumber": "SA003" }, "FStockId": { "FNumber": "CK001" }, "FStockStatusId": { "FNumber": "KCZT01_SYS" }, "FEntryWorkShopId": { "FNumber": "BM000018" }, "FMoBillNo": "MO000464", "FMoEntryId": "100727", "FPPBomBillNo": "PPBOM00000552", "FPPBomEntryId": "101896", "FOwnerTypeId": "BD_OwnerOrg", "FAppQty": 3, "fbaseappqty": 3, "FStockAppQty": 3, "FStockActualQty": 2, "FBaseStockActualQty": 2, "FStockFlag": "1", "FOperId": 10, "FRESERVETYPE": 1, "FGroupRow": "bca8a6b3-033e-b0e6-11eb-73f64a06c5b9", "FMoId": "100599", "FMoEntrySeq": "1", "FKeeperTypeId": "BD_KeeperOrg", "FKeeperId": { "Fnumber": "100" }, "FOwnerId": { "FNumber": "100" }, "FUnitID": { "fnumber": "Pcs" }, "FBaseUnitId": { "fnumber": "Pcs" }, "FStockUnitId": { "fnumber": "Pcs" }, "FActualQty": 2, "FBaseActualQty": 2, "FParentOwnerTypeId": "BD_OwnerOrg", "FParentOwnerId": { "FNumber": "100" }, "FParentMaterialId": { "fnumber": "MonV1" }, "FSrcBillType": "PRD_PPBOM", "FSrcBillNo": "PPBOM00000552", "FEntrySrcInterId": "101151", "FEntrySrcEnteryId": "101896", "FEntrySrcEntrySeq": "1", "FLot": { "FNumber": "203501S10700" }, "FEntity_Link": [ { "FEntity_Link_FFlowId": "81119477-4778-4d0b-94b9-1c43a1c1f768", "FEntity_Link_FFlowLineId": 5, "FEntity_Link_FRuleId": "PRD_PPBOM2PICKMTRL_NORMAL", "FEntity_Link_FSTableName": "T_PRD_PPBOMENTRY", "FEntity_Link_FSBillId": "101151", "FEntity_Link_FSId": "101896", "FEntity_Link_FBaseActualQtyOld": 3 } ], "FBFLOWID": { "FID": "81119477-4778-4d0b-94b9-1c43a1c1f768" } } ] } }
本文转载自:金蝶云社区
作者:eris
原文链接:https://vip.kingdee.com/article/178896?channel_level=kdclub&isMapping=1
赞 7
7人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读