线边对接ERP

This commit is contained in:
zhougf committed 2025-12-14 18:23:20 +08:00
1 parent e3002cabf6
commit 287453691b
8 files changed
+253 -29

No files matched your search

+6 -5
View File
@@ -395,12 +395,13 @@ namespace HHWMS.Web
{
Main = new FinishInMain
{
ErpCode = "001", // 账套号
InCode = inventory.SourceCode, // 报工单号(上游单号)
ErpCode = "999", // 账套号
InCode = _unitWork.GetSerialNumber(inventory.SourceCode), // 报工单号(上游单号)
InDate = (inventory.CreateTime ?? DateTime.Now).ToString("yyyy-MM-dd"), // 报工日期
StepCode = inventory.BatchCode, // 工序(批次编码)
WorkerCode = inventory.CreateBy, // 工人编码(创建人)
Maker = inventory.ReceiptCode // 制单人(校验员)
Maker = _unitWork.FindSingle<FrameworkUser>(x =>
x.ITCode == inventory.CreateBy).Name // 制单人(校验员)
},
Details = new List<FinishInDetail>()
};
@@ -414,9 +415,9 @@ namespace HHWMS.Web
});
// 调用ERP接口
var apiResult = await Wtm.CallAPI<FinishInResponse>("ERP", "Api/FinishIn", HttpMethodEnum.POST, finishInRequest);
var apiResult = await Wtm.CallAPI<FinishInResponse>("ERP", "FinishIn", HttpMethodEnum.POST, finishInRequest);
if (apiResult.Data != null)
if (apiResult.Data != null && apiResult.Data.Result)
{
inventory.UploadErpFlag = 1;
}