From ea4ae087e9d255dca120dfb1e4801f01187c5667 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期五, 28 二月 2025 14:22:46 +0800 Subject: [PATCH] 1.ERP->MES调拨申请 字段优化 --- MES.Service/service/BasicData/TransferRequestManager.cs | 75 ++++++++++++++++++++++++++++++++++--- 1 files changed, 69 insertions(+), 6 deletions(-) diff --git a/MES.Service/service/BasicData/TransferRequestManager.cs b/MES.Service/service/BasicData/TransferRequestManager.cs index 217d10e..93692c4 100644 --- a/MES.Service/service/BasicData/TransferRequestManager.cs +++ b/MES.Service/service/BasicData/TransferRequestManager.cs @@ -141,12 +141,12 @@ FDocumentStatus = erpDto.FDocumentStatus, // 鍗曟嵁鐘舵�� FDate = !String.IsNullOrEmpty(erpDto.FDate) ? DateTime.ParseExact(erpDto.FDate, "yyyy-MM-dd HH:mm:ss", null) : null, // 鐢宠鏃ユ湡 FAppOrgId = erpDto.FAPPORGID, // 鐢宠缁勭粐 - FBillTypeId = erpDto.FBillTypeID, // 鍗曟嵁绫诲瀷 + FBusinessType = erpDto.FBusinessType, // 涓氬姟绫诲瀷 - FTransType = erpDto.FTRANSTYPE, // 璋冩嫧绫诲瀷 - FTransferDirect = erpDto.FTransferDirect, // 璋冩嫧鏂瑰悜 - FOwnerTypeIdHead = erpDto.FOwnerTypeIdHead, // 璋冨嚭璐т富绫诲瀷 - FOwnerTypeInIdHead = erpDto.FOwnerTypeInIdHead, // 璋冨叆璐т富绫诲瀷 + //FTransType = erpDto.FTRANSTYPE, // 璋冩嫧绫诲瀷 + //FTransferDirect = erpDto.FTransferDirect, // 璋冩嫧鏂瑰悜 + //FOwnerTypeIdHead = erpDto.FOwnerTypeIdHead, // 璋冨嚭璐т富绫诲瀷 + //FOwnerTypeInIdHead = erpDto.FOwnerTypeInIdHead, // 璋冨叆璐т富绫诲瀷 FRemarks = erpDto.FRemarks, // 澶囨敞 FCreatorId = erpDto.FCreatorId, // 鍒涘缓浜� FCreateDate = !String.IsNullOrEmpty(erpDto.FCreateDate) ? DateTime.ParseExact(erpDto.FCreateDate, "yyyy-MM-dd HH:mm:ss", null) : null, // 鍒涘缓鏃ユ湡 @@ -155,13 +155,76 @@ FApproveDate = !String.IsNullOrEmpty(erpDto.FAPPROVEDATE) ? DateTime.ParseExact(erpDto.FAPPROVEDATE, "yyyy-MM-dd HH:mm:ss", null) : null, // 瀹℃牳鏃ユ湡 FCloseStatus = erpDto.FCloseStatus, // 鍏抽棴鐘舵�� FCloserId = erpDto.FCloserId, // 鍏抽棴浜� - FCloseDate = !String.IsNullOrEmpty(erpDto.FCloseDate) ? DateTime.ParseExact(erpDto.FCloseDate, "yyyy-MM-dd HH:mm:ss", null) : null, // 鍏抽棴鏃ユ湡 + //FCloseDate = !String.IsNullOrEmpty(erpDto.FCloseDate) ? DateTime.ParseExact(erpDto.FCloseDate, "yyyy-MM-dd HH:mm:ss", null) : null, // 鍏抽棴鏃ユ湡 FUnwBaseBomBb = erpDto.F_UNW_Base_BOMBB, // BOM鐗堟湰 FUnwBaseFxwlBm = erpDto.F_UNW_Base_FXWLBM, // 鐖堕」鐗╂枡缂栧彿 Source = "ERP",//鍗曟嵁鏉ユ簮 FApproveStatus = 1,//瀹℃牳鐘舵�� }; + if (string.IsNullOrEmpty(erpDto.FCloserId.ToString())) + mesDbck.FCloseDate = !String.IsNullOrEmpty(erpDto.FCloseDate) ? DateTime.ParseExact(erpDto.FCloseDate, "yyyy-MM-dd HH:mm:ss", null) : null; // 鍏抽棴鏃ユ湡 + + if (erpDto.FBillTypeID == "DBSQD01_SYS") + { + mesDbck.FBillTypeId = "鏍囧噯璋冩嫧鐢宠鍗�(DBSQD01_SYS)"; + mesDbck.DJTYPE = "鏍囧噯鐩存帴璋冩嫧鍗�(ZJDB01_SYS)"; + } + else if (erpDto.FBillTypeID == "DBSQD04_SYS") + { + mesDbck.FBillTypeId = "濮斿璋冩嫧鐢宠鍗�(DBSQD04_SYS)"; + mesDbck.DJTYPE = "濮斿鐩存帴璋冩嫧鍗�(ZJDB03_SYS)"; + } + + + // 鏍规嵁 FTRANSTYPE 璁剧疆璋冩嫧绫诲瀷 + if (erpDto.FTRANSTYPE == "InnerOrgTransfer") + { + mesDbck.FTransType = "缁勭粐鍐呰皟鎷�(InnerOrgTransfer)"; + } + else if (erpDto.FTRANSTYPE == "OverOrgTransfer") + { + mesDbck.FTransType = "璺ㄧ粍缁囪皟鎷�(OverOrgTransfer)"; + } + + // 鏍规嵁 FTransferDirect 璁剧疆璋冩嫧鏂瑰悜 + if (erpDto.FTransferDirect == "GENERAL") + { + mesDbck.FTransferDirect = "鏅��(GENERAL)"; + } + else if (erpDto.FTransferDirect == "RETURN") + { + mesDbck.FTransferDirect = "閫�璐�(RETURN)"; + } + + // 鏍规嵁 FOwnerTypeIdHead 璁剧疆璋冨嚭璐т富绫诲瀷 + if (erpDto.FOwnerTypeIdHead == "BD_OwnerOrg") + { + mesDbck.FOwnerTypeIdHead = "缁勭粐(BD_OwnerOrg)"; + } + else if (erpDto.FOwnerTypeIdHead == "BD_Supplier") + { + mesDbck.FOwnerTypeIdHead = "渚涘簲鍟�(BD_Supplier)"; + } + else if (erpDto.FOwnerTypeIdHead == "BD_Customer") + { + mesDbck.FOwnerTypeIdHead = "瀹㈡埛(BD_Customer)"; + } + + // 鏍规嵁 FOwnerTypeInIdHead 璁剧疆璋冨叆璐т富绫诲瀷 + if (erpDto.FOwnerTypeInIdHead == "BD_OwnerOrg") + { + mesDbck.FOwnerTypeInIdHead = "缁勭粐(BD_OwnerOrg)"; + } + else if (erpDto.FOwnerTypeInIdHead == "BD_Supplier") + { + mesDbck.FOwnerTypeInIdHead = "渚涘簲鍟�(BD_Supplier)"; + } + else if (erpDto.FOwnerTypeInIdHead == "BD_Customer") + { + mesDbck.FOwnerTypeInIdHead = "瀹㈡埛(BD_Customer)"; + } + var single = base.GetSingle(it => it.ErpID == Convert.ToDecimal(erpDto.id)); if (single != null) mesDbck.Id = single.Id; -- Gitblit v1.9.3