为什么要做复制的功能?
实现两个数据中心业务单据调用webapi无缝同步;a数据中心做的业务单据调用webapi接口快速组装b数据中心的保存数据实现一个数据中心制单多个数据中心同步的功能。由于插件是通过webapi方式进行暴露,完全可以外挂一个程序处理调用此接口,同步到不同的数据中心中。并且可以自定义对得到的数据进行映射管控(a数据中心的组织编码是10001,b数据中心的组织编码是20001使用JSONPath可以快速定位并替换对应的数据。不仅仅是组织,还有部门、仓库等等,真正意义上的实现多数据中心映射的最佳解决方案!!!!!!!!!);
某些单据只想更改少量单据内容,可以调用接口得到模版单据。在模版单据的基础上对json内容进行修改,避免重复构建json数据内容。
只需要知道对应的formid和内码id就能得到对应的json数据。支持所有单据和基础资料。并且携带上下游关联信息。效果如下图:
对应单据分录的关联信息:
分步式调入单需要的json格式:
api接口得到的json格式:
{
"isSuccess": true,
"message": "",
"data": {
"NeedUpDateFields": [],
"NeedReturnFields": [],
"IsDeleteEntry": "true",
"SubSystemId": "",
"IsVerifyBaseDataField": "false",
"IsEntryBatchFill": "true",
"ValidateFlag": "true",
"NumberSearch": "true",
"IsAutoAdjustField": "false",
"InterationFlags": "",
"IgnoreInterationFlag": "",
"IsControlPrecision": "false",
"ValidateRepeatJson": "false",
"Model": {
"f_scjr_entry_name": "STK_STKTRANSFERIN",
"f_scjr_entry_pkname": "FID",
"f_scjr_entry_pkvalue": 100065,
"webapi_customer_scjr_s_fid": "STK_STKTRANSFERIN;&&@@&&;FID;&&@@&&;100065",
"FID": 0,
"FBillNo": "FBDR10120240514000001",
"FBillTypeID": {
"FNUMBER": "FBDR01_SYS"
},
"FTransferBizType": "InnerOrgTransfer",
"FTransferDirect": "GENERAL",
"FStockOrgID": {
"FNumber": "1000101"
},
"FStockOutOrgID": {
"FNumber": "1000101"
},
"FTransferMode": "INDIRECT",
"FDate": "2024-05-14T00:00:00",
"FOwnerTypeOutIdHead": "BD_OwnerOrg",
"FOwnerOutIdHead": {
"FNumber": "1000101"
},
"FBizType": "NORMAL",
"FVESTONWAY": "A",
"FOwnerTypeIdHead": "BD_OwnerOrg",
"FBaseCurrID": {
"FNumber": "PRE001"
},
"FNOTE": " ",
"FCustID": {
"FNUMBER": "99.00001"
},
"FSUPPLIERID": {
"FNUMBER": "002.00001"
},
"FThirdSrcBillNo": " ",
"FThirdSrcId": " ",
"FThirdSystem": " ",
"FVirIsSameAcctOrg": false,
"FINDEPTID": {
"FNUMBER": "10001010604"
},
"FOUTDEPTID": {
"FNUMBER": "10001010602"
},
"F_PYIV_Combo": "0",
"FSTKTRSINENTRY": [
{
"f_scjr_entry_name": "STK_STKTRANSFERINENTRY",
"f_scjr_entry_pkname": "FEntryID",
"f_scjr_entry_pkvalue": 100535,
"webapi_customer_scjr_s_fid": "STK_STKTRANSFERINENTRY;&&@@&&;FEntryID;&&@@&&;100535",
"FEntryID": 0,
"FMaterialID": {
"FNumber": "01.033.0003"
},
"FUnitID": {
"FNumber": "001"
},
"FPlanTransferQty": 2.0000000000,
"FQty": 2.0000000000,
"FPathLossQty": 0.0,
"FPathLossRespParty": " ",
"FDestLot": {
"FNumber": "2317"
},
"FSrcStockID": {
"FNumber": "ZTGYLC001"
},
"FDestStockID": {
"FNumber": "ZTGYLC003"
},
"FSrcStockStatusID": {
"FNumber": "KCZT05_SYS"
},
"FDestStockStatusID": {
"FNumber": "KCZT01_SYS"
},
"FSrcBillType": "STK_TRANSFEROUT",
"FSrcBillNo": "FBDC100010120240513000002",
"FKeeperTypeOutID": "BD_KeeperOrg",
"FKeeperOutID": {
"FNumber": "1000101"
},
"FMTONO": " ",
"FProjectNo": " ",
"FOwnerTypeOutID": "BD_OwnerOrg",
"FOwnerOutID": {
"FNumber": "1000101"
},
"FOwnerTypeID": "BD_OwnerOrg",
"FOwnerID": {
"FNumber": "1000101"
},
"FEntryNote": " ",
"FBusinessDate": "2024-05-13T00:00:00",
"FSrcMaterialId": {
"FNumber": "01.033.0003"
},
"FLOT": {
"FNumber": "2317"
},
"FBaseQty": 2.0000000000,
"FSRCMTONO": " ",
"FExtAuxUnitQty": 0.0,
"FWayAuxUnitQty": 0.0,
"FSrcProjectNo": " ",
"FBasePlanTransQty": 2.0000000000,
"FKeeperTypeID": "BD_KeeperOrg",
"FKeeperID": {
"FNumber": "1000101"
},
"FBasePathLossQty": 0.0,
"FBaseUnitID": {
"FNumber": "001"
},
"FThirdSrcEntryId": " ",
"FSTKTSTKRANSFERINENTRY_Link": [
{
"FSTKTSTKRANSFERINENTRY_Link_FFlowId": " ",
"FSTKTSTKRANSFERINENTRY_Link_FFlowLineId": 0,
"FSTKTSTKRANSFERINENTRY_Link_FRuleId": "STK_TRANSFEROUT-STK_TRANSFERIN",
"FSTKTSTKRANSFERINENTRY_Link_FSTableId": 0,
"FSTKTSTKRANSFERINENTRY_Link_FSTableName": "T_STK_STKTRANSFEROUTENTRY",
"FSTKTSTKRANSFERINENTRY_Link_FSBillId": "100017",
"FSTKTSTKRANSFERINENTRY_Link_FSId": "100048",
"FSTKTSTKRANSFERINENTRY_Link_FBaseTransferQtyOld": 2.0000000000,
"FSTKTSTKRANSFERINENTRY_Link_FBaseTransferQty": 2.0000000000
}
]
}
]
}
}
}
需要相关源码的小伙伴私信作者有偿提供。制作不易谢谢大家收藏点赞
推荐阅读