From 4631112c2537d738a7000e5a87b8384d2ede142b Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期三, 06 八月 2025 08:57:43 +0800 Subject: [PATCH] 销售订单字段·添加翻译 --- StandardPda/MES.Service/service/BasicData/SalesOrderManager.cs | 21 +++++++++- StandardPda/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs | 65 +++++++++++++++++++------------- StandardPda/MES.Service/service/BasicData/SalesReturnNoticeManager.cs | 14 +++++++ 3 files changed, 71 insertions(+), 29 deletions(-) diff --git a/StandardPda/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs b/StandardPda/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs index 4d3857e..dcdbff2 100644 --- a/StandardPda/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs +++ b/StandardPda/MES.Service/service/BasicData/SalesDeliveryNoticeManager.cs @@ -45,7 +45,7 @@ } }) > 0; } - + private bool UpdateData(SqlSugarScope db, SalesDeliveryNotice mesSalesDelivery, List<SalesDeliveryNoticeDetail> mesSalesDeliveryDatas) { @@ -89,7 +89,7 @@ var result = salesOrder.Select(Save).ToList(); return result.All(b => b); } - + private SalesDeliveryNotice ConvertErpToSalesDelivery( ErpSalesDeliveryDto erpDto) { @@ -135,11 +135,11 @@ //PayerParty = erpDto.FPayerID,//浠樻鏂� //CreatedBy = erpDto.FCreatorId, // 鍒涘缓浜� CreatedDate = ParseDateTime(erpDto.FCreateDate) ?? null, // 鍒涘缓鏃堕棿 - //ModifiedBy = erpDto.FModifierId, // 淇敼浜� - //ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿 - //ClosedBy = erpDto.FCloserId, // 鍏抽棴浜� - //CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜 - // CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡 + //ModifiedBy = erpDto.FModifierId, // 淇敼浜� + //ModifiedDate = ParseDateTime(erpDto.FModifyDate) ?? null, // 淇敼鏃堕棿 + //ClosedBy = erpDto.FCloserId, // 鍏抽棴浜� + //CloseReason = erpDto.FCloseReason, // 鍏抽棴鍘熷洜 + // CloseDate = ParseDateTime(erpDto.FCloseDate) ?? null, // 鍏抽棴鏃ユ湡 ApprovedBy = erpDto.FApproverId, // 瀹℃牳浜� ApprovedDate = ParseDateTime(erpDto.FApproveDate) ?? null, // 瀹℃牳鏃ユ湡 //CancelStatus = erpDto.FCancelStatus, // 浣滃簾鐘舵�� @@ -149,8 +149,8 @@ BillStatus = erpDto.FDocumentStatus, //鍗曟嵁鐘舵�� DeliveryOrg = erpDto.FDeliveryOrgID, //鍙戣揣缁勭粐 //SalesOrg = erpDto.FSaleOrgId //閿�鍞粍缁� - FSourceCategory= erpDto.FSourceCategory, - FSourceDocument= erpDto.FSourceDocument, + FSourceCategory = erpDto.FSourceCategory, + FSourceDocument = erpDto.FSourceDocument, FDeliveryDate = erpDto.FDeliveryDate, FProject = erpDto.FProject, FCustomerPo = erpDto.FCustomerPo, @@ -159,9 +159,9 @@ FDestinationPort = erpDto.FDestinationPort, FReceiverContactID = erpDto.FReceiverContactID, FEntryNote = erpDto.FEntryNote, - FVersionNo= erpDto.FVersionNo, - FBusinessType= erpDto.FBusinessType, - FHEADLOCID= erpDto.FHEADLOCID, + FVersionNo = erpDto.FVersionNo, + FBusinessType = erpDto.FBusinessType, + FHEADLOCID = erpDto.FHEADLOCID, FCustId = erpDto.FCustId, FNote = erpDto.FNote }; @@ -229,37 +229,37 @@ //SumOutQty = erpDto.FSumOutQty,//绱鍑哄簱鏁伴噺 //RemainOutQty = erpDto.FRemainOutQty,//鏈嚭搴撴暟閲� //NOTE = erpDto.FEntrynote//澶囨敞 - FDeliveryDate= erpDto.FDeliveryDate, - FMapId= erpDto.FMapId, + FDeliveryDate = erpDto.FDeliveryDate, + FMapId = erpDto.FMapId, FMapName = erpDto.FMapName, FMapId2 = erpDto.FMapId2, - FProject= erpDto.FProject, + FProject = erpDto.FProject, FStorageLocation = erpDto.FStorageLocation, FFreeItemType = erpDto.FFreeItemType, FBodyNote = erpDto.FBodyNote, FAvailableStock = erpDto.FAvailableStock, FInventoryQueryTime = erpDto.FInventoryQueryTime, - FLineStatus= erpDto.FLineStatus, - FReceiveAddressFull= erpDto.FReceiveAddressFull, - FReceiverContact= erpDto.FReceiverContact, + FLineStatus = erpDto.FLineStatus, + FReceiveAddressFull = erpDto.FReceiveAddressFull, + FReceiverContact = erpDto.FReceiverContact, FReturnExchangeAllowed = erpDto.FReturnExchangeAllowed, FOutsourcedProcessQty = erpDto.FOutsourcedProcessQty, FAvailableDate = erpDto.FAvailableDate, - FCommitmentDate= erpDto.FCommitmentDate, - FCustomerConfirmShipDate= erpDto.FCustomerConfirmShipDate, - FPlannedOrg= erpDto.FPlannedOrg, + FCommitmentDate = erpDto.FCommitmentDate, + FCustomerConfirmShipDate = erpDto.FCustomerConfirmShipDate, + FPlannedOrg = erpDto.FPlannedOrg, FVendorDirectShip = erpDto.FVendorDirectShip, FSupplySource = erpDto.FSupplySource, FSupplyType = erpDto.FSupplyType, - FSupplyOrg= erpDto.FSupplyOrg, - FSupplier= erpDto.FSupplier, - FShippingMethod= erpDto.FShippingMethod, + FSupplyOrg = erpDto.FSupplyOrg, + FSupplier = erpDto.FSupplier, + FShippingMethod = erpDto.FShippingMethod, FMRPDR = erpDto.FMRPDR, FDemandCategory = erpDto.FDemandCategory, FInventoryPlanning = erpDto.FInventoryPlanning, - FLineRemark= erpDto.FLineRemark, + FLineRemark = erpDto.FLineRemark, FSourceDocCategory = erpDto.FSourceDocCategory, - FSourceDocNo= erpDto.FSourceDocNo, + FSourceDocNo = erpDto.FSourceDocNo, FSourceDocLineNo = erpDto.FSourceDocLineNo, FLINE_NO = erpDto.FLINE_NO @@ -268,7 +268,20 @@ var single = _SalesDeliveryDetailManager.GetSingle(it => it.ErpLineId == salesOrderSub.ErpLineId); if (single != null) salesOrderSub.Id = single.Id; + var mesLinkU9 = Db.Queryable<MesLinkU9>() +.Where(x => x.U9Id == erpDto.FMaterialId + && x.OrgId == erpDto.FSupplyOrg + && x.TableType == "MES_ITEMS").First(); + if (mesLinkU9 != null) salesOrderSub.MaterialId = mesLinkU9.MesId; + + + var mesLinkU92 = Db.Queryable<MesLinkU9>() + .Where(x => x.U9Id == erpDto.FProject + && x.OrgId == erpDto.FSupplyOrg + && x.TableType == "MES_PROJECT").First(); + + if (mesLinkU92 != null) salesOrderSub.FProject = mesLinkU92.MesId; salesOrderSubList.Add(salesOrderSub); } diff --git a/StandardPda/MES.Service/service/BasicData/SalesOrderManager.cs b/StandardPda/MES.Service/service/BasicData/SalesOrderManager.cs index bede90f..dfe1746 100644 --- a/StandardPda/MES.Service/service/BasicData/SalesOrderManager.cs +++ b/StandardPda/MES.Service/service/BasicData/SalesOrderManager.cs @@ -1,9 +1,10 @@ -锘縰sing MES.Service.DB; -using System.Data; -using System.Globalization; +锘縰sing AngleSharp.Dom; +using MES.Service.DB; using MES.Service.Dto.webApi; using MES.Service.Modes; using SqlSugar; +using System.Data; +using System.Globalization; namespace MES.Service.service.BasicData; @@ -153,6 +154,20 @@ { salesOrderSub.Id = single.Id; } + var mesLinkU9 = Db.Queryable<MesLinkU9>() + .Where(x => x.U9Id == erpDto.FMaterialId + && x.OrgId == erpDto.FSupplyOrg + && x.TableType == "MES_ITEMS").First(); + + if (mesLinkU9 != null) salesOrderSub.MaterialId = mesLinkU9.MesId; + + + var mesLinkU92 = Db.Queryable<MesLinkU9>() + .Where(x => x.U9Id == erpDto.FProject + && x.OrgId == erpDto.FSupplyOrg + && x.TableType == "MES_PROJECT").First(); + + if (mesLinkU92 != null) salesOrderSub.FProject = mesLinkU92.MesId; salesOrderSubList.Add(salesOrderSub); } diff --git a/StandardPda/MES.Service/service/BasicData/SalesReturnNoticeManager.cs b/StandardPda/MES.Service/service/BasicData/SalesReturnNoticeManager.cs index 8d22032..063e23c 100644 --- a/StandardPda/MES.Service/service/BasicData/SalesReturnNoticeManager.cs +++ b/StandardPda/MES.Service/service/BasicData/SalesReturnNoticeManager.cs @@ -201,6 +201,20 @@ var single = _SalesReturnDetailManager.GetSingle(it => it.ErpLineId == salesOrderSub.ErpLineId); if (single != null) salesOrderSub.Id = single.Id; + var mesLinkU9 = Db.Queryable<MesLinkU9>() +.Where(x => x.U9Id == erpDto.FMaterialId + && x.OrgId == erpDto.FReceivingOrg + && x.TableType == "MES_ITEMS").First(); + + if (mesLinkU9 != null) salesOrderSub.MaterialId = mesLinkU9.MesId; + + + var mesLinkU92 = Db.Queryable<MesLinkU9>() + .Where(x => x.U9Id == erpDto.FProject + && x.OrgId == erpDto.FReceivingOrg + && x.TableType == "MES_PROJECT").First(); + + if (mesLinkU92 != null) salesOrderSub.FProject = mesLinkU92.MesId; salesOrderSubList.Add(salesOrderSub); } -- Gitblit v1.9.3