From a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 03 十一月 2025 08:23:05 +0800
Subject: [PATCH] ERP接口代码更新,WCS代码优化,出入库分配优化

---
 项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
index a6ce9d9..7113d7c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs"
@@ -46,6 +46,41 @@
             CreateMap<BSTReturnOrderDTOItem, Dt_ReturnBSTOrderDetail>().ForMember(x => x.ReturnBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick));
             //MES棰嗘枡璁″垝瀹炰綋杞崲
             CreateMap<OutMESOrderDTO, Dt_OutMESOrder>().ForMember(x => x.OutMESOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //鐢熺鎺掔▼瀹炰綋杞崲
+            CreateMap<SGOutOrderDTO, Dt_OutSGOrder>().ForMember(x => x.OutSGOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt()));
+            CreateMap<SGOutOrderDTO, Dt_OutSGOrderDetail>().ForMember(x => x.OutSGOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //鎴愬搧鍗婃垚鍝佸疄浣撹浆鎹�
+            CreateMap<MESProInDTO, Dt_MESProInOrderInfo>().ForMember(x => x.MESProInStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //浜屾湡ERP鐗╂枡鎺ユ敹瀹炰綋杞崲
+            CreateMap<ERPMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.鏂板巶.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterielNo)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielWide, b => b.MapFrom(b => b.MaterielWidth)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.State)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.MaterielSpec));
+            //鍗氭�濋�氱紦瀛橀噰璐浆鎹�
+            CreateMap<Dt_PurchaseBSTOrderDetail, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.鑰佸巶.ToString()));
+            //浜屾湡ERP渚涘簲鍟嗚浆鎹�
+            CreateMap<ERPSupplierDTO, Dt_SupplierInfo>().ForMember(x => x.SupplierSourceId, b => b.MapFrom(b => 0)).ForMember(x => x.SupplierShortName, b => b.MapFrom(b => b.ShortName)).ForMember(x => x.Status, b => b.MapFrom(b => b.State)).ForMember(x => x.InvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.鏂板巶.ObjToInt()));
+            //浜屾湡ERP瀹㈡埛杞崲
+            CreateMap<ERPCustomerDTO, Dt_CustomerInfo>().ForMember(x => x.OutRule, b => b.MapFrom(b => 0)).ForMember(x => x.Status, b => b.MapFrom(b => b.State));
+            //浜屾湡ERP瀹㈡埛杞崲
+            CreateMap<ERPUserInfoDTO, Dt_UserInfo>().ForMember(x => x.Code, b => b.MapFrom(b => b.StaffCode)).ForMember(x => x.Name, b => b.MapFrom(b => b.StaffName));
+            //鍗氭�濋�氱紦瀛樺簱瀛樿浆鎹�
+            CreateMap<Dt_StockInfo, Dt_YLInboundCache>().ForMember(x => x.Id, b => b.MapFrom(b => 0)).ForMember(x => x.BindStatus, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.RfidCode, b => b.MapFrom(b => "")).ForMember(x => x.InvOrg, b => b.MapFrom(b => MaterielInvOrgEnum.鑰佸巶.ToString())).ForMember(x => x.BarCode, b => b.MapFrom(b => b.PalletCode)).ForMember(x => x.MaterialNo, b => b.MapFrom(b => b.MaterielCode)).ForMember(x => x.DeliveryQty, b => b.MapFrom(b => b.MaterielWeight)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.MaterielThickness)).ForMember(x => x.ProcurementLength, b => b.MapFrom(b => b.StockLength)).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.MaterielWide));
+            //閲囪喘瀹炰綋杞崲
+            CreateMap<ERPPurchaseOrderDTO, Dt_PurchaseOrder>().ForMember(x => x.PurchaseOrderNo, b => b.MapFrom(b =>b.PurchaseInCode)).ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.SumQty));
+            CreateMap<PurchaseInDetailItem, Dt_PurchaseOrderDetail>().ForMember(x => x.DetailId, b => b.MapFrom(b => b.DetailId)).ForMember(x => x.PurchaseDetailWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.PurchaseDetailWide, b => b.MapFrom(b => b.Wide)).ForMember(x => x.PurchaseDetailThickness, b => b.MapFrom(b => b.Thickness)).ForMember(x => x.PurchaseDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.PurchaseDetailInboundQty, b => b.MapFrom(b => 0)).ForMember(x => x.PurchaseDetailQuantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.MaterialCode, b => b.MapFrom(b => b.MaterialCode)).ForMember(x => x.BarCode, b => b.MapFrom(b => b.Barcode)).ForMember(x => x.MaterialLot, b => b.MapFrom(b => b.MaterialLot));
+            //閫�璐у疄浣撹浆鎹�
+            CreateMap<ERPReturnOrderDTO, Dt_ReturnOutOrder>().ForMember(x => x.ReturnNo, b => b.MapFrom(b => b.ReturnCode)).ForMember(x => x.EmployeeName, b => b.MapFrom(b => b.Creater)).ForMember(x => x.ReturnOrderStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            CreateMap<ReturnDetailItem, Dt_ReturnOutOrderDetail>().ForMember(x => x.DetailId, b => b.MapFrom(b => b.DetailId)).ForMember(x => x.BarCode, b => b.MapFrom(b => b.BarCode)).ForMember(x => x.ReturnQuantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.ReturnOutDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //閿�鍞疄浣撹浆鎹�
+            CreateMap<ERPProDeliveryDTO, Dt_ProDeliveryOrder>().ForMember(x => x.DeliveryType, b => b.MapFrom(b => 1)).ForMember(x => x.EmployeeName, b => b.MapFrom(b => b.Creater)).ForMember(x => x.ProDeliveryStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            CreateMap<DeliveryDetailItem, Dt_ProDeliveryOrderDetail>().ForMember(x => x.DetailId, b => b.MapFrom(b => b.DetailId)).ForMember(x => x.Quantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.ProDeliveryDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //闈炵敓浜ч鏂欒浆鎹�
+            CreateMap<ERPPickOutOrderDTO, Dt_PickOutOrder>().ForMember(x => x.EmployeeName, b => b.MapFrom(b => b.Creater)).ForMember(x => x.OutOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            CreateMap<PickDetailItem, Dt_PickOutOrderDetail>().ForMember(x => x.DetailId, b => b.MapFrom(b => b.DetailId)).ForMember(x => x.Quantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.PickOutDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //閿�鍞��璐у疄浣撹浆鎹�
+            CreateMap<ERPProDeliverBackDTO, Dt_ProDeliverBackOrder>().ForMember(x => x.EmployeeName, b => b.MapFrom(b => b.Creater)).ForMember(x => x.DeliveryBackStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.OrderType, b => b.MapFrom(b => b.DeliveryType));
+            CreateMap<DeliveryBackDetailItem, Dt_ProDeliverBackOrderDetail>().ForMember(x => x.DeliverCode, b => b.MapFrom(b => b)).ForMember(x => x.Quantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.DeliverBackDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
+            //闈為噰璐敓浜у叆搴撳疄浣撹浆鎹�
+            CreateMap<ERPInboundOrderDTO, Dt_InboundOrder>().ForMember(x => x.InboundOrderStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.InboundCode));
+            CreateMap<InboundDetailItem, Dt_InboundOrderDetail>().ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty)).ForMember(x => x.OrderDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thickness)).ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.Wide)).ForMember(x => x.MaterialWeight, b => b.MapFrom(b => b.Weight)).ForMember(x => x.OrderQuantity, b => b.MapFrom(b => b.MaterialQty));
         }
     }
 }

--
Gitblit v1.9.3