From 9ae0890dd74771ba9edd44d4830e0de37f8d9938 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 26 九月 2025 16:55:03 +0800
Subject: [PATCH] MES接口优化,老厂排程优化等
---
项目代码/WMS/WMSServices/WIDESEA_WMSServer/Filter/CustomProfile.cs | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 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 fe07911..6d0ca3e 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"
@@ -5,14 +5,17 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Common.CommonEnum;
+using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
+using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
+using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_DTO.Inbound;
using WIDESEA_DTO.MES;
-using WIDESEA_DTO.Outbound;
using WIDESEA_DTO.System;
using WIDESEA_DTO.Task;
using WIDESEA_Model.Models;
@@ -28,6 +31,26 @@
{
CreateMap<Sys_Menu, MenuDTO>();
CreateMap<Dt_Task, WMSTaskDTO>();
+ //鐗╂枡瀹炰綋BST杞崲
+ CreateMap<BSTMaterialDTO, Dt_MaterielInfo>().ForMember(x => x.MaterialSourceId, b => b.MapFrom(b => b.MaterialId)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt())).ForMember(x => x.MaterielCode, b => b.MapFrom(b => b.MaterialNo)).ForMember(x => x.MaterielName, b => b.MapFrom(b => b.Name)).ForMember(x => x.MaterielSourceType, b => b.MapFrom(b => b.MaterielType)).ForMember(x => x.MaterielInvOrgId, b => b.MapFrom(b => b.InvOrgId)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielUnit, b => b.MapFrom(b => b.Unit)).ForMember(x => x.MaterielState, b => b.MapFrom(b => b.Status)).ForMember(x => x.IsCheck, b => b.MapFrom(b => WhetherEnum.False.ObjToInt())).ForMember(x => x.MaterielSpec, b => b.MapFrom(b => b.Spec)).ForMember(x => x.MaterielWeight, b => b.MapFrom(b => b.Weight));
+ //鐗╂枡瀹炰綋杞崲
+ CreateMap<BSTSupplierDTO, Dt_SupplierInfo>().ForMember(x => x.SupplierSourceId, b => b.MapFrom(b => b.VendId)).ForMember(x => x.SupplierCode, b => b.MapFrom(b => b.VendNo)).ForMember(x => x.SupplierName, b => b.MapFrom(b => b.ShortName)).ForMember(x => x.SupplierShortName, b => b.MapFrom(b => b.ShortName)).ForMember(x => x.Contacts, b => b.MapFrom(b => b.BusinessContact)).ForMember(x => x.ContactNumber, b => b.MapFrom(b => b.Tel)).ForMember(x => x.ContactAddress, b => b.MapFrom(b => b.Address)).ForMember(x => x.InvOrgId, b => b.MapFrom(b => MaterielInvOrgEnum.鑰佸巶.ObjToInt()));
+ //閲囪喘瀹炰綋杞崲
+ CreateMap<BSTPurchaseOrderDTO, Dt_PurchaseBSTOrder>().ForMember(x => x.ReceiptDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.ReceiptDate).DateTime));
+ CreateMap<PaperReceiptDetailsItem, Dt_PurchaseBSTOrderDetail>().ForMember(x => x.MaterialWide, b => b.MapFrom(b => b.W)).ForMember(x => x.MaterialThick, b => b.MapFrom(b => b.Thick)).ForMember(x => x.PurchaseBSTOrderDetailStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt()));
+ //BST鍑哄簱鎺掔▼瀹炰綋杞崲
+ CreateMap<BSTOutOrderDTO, Dt_OutBSTOrder>().ForMember(x => x.OutBSTOrderStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.ProductionDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.ProductionDate).DateTime)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt()));
+ CreateMap<BstBoardMpsDetailItem, Dt_OutBSTOrderDetail>().ForMember(x => x.OutBSTOrderDetailStatus, b => b.MapFrom(b => OutOrderStatusEnum.鏈紑濮�.ObjToInt()));
+ //BST閫�鏂欏崟瀹炰綋杞崲
+ CreateMap<BSTReturnOrderDTO, Dt_ReturnBSTOrder>().ForMember(x => x.ReturnOrderStatus, b => b.MapFrom(b => InOrderStatusEnum.鏈紑濮�.ObjToInt())).ForMember(x => x.WreturnDate, b => b.MapFrom(b => DateTimeOffset.FromUnixTimeMilliseconds(b.WreturnDate).DateTime)).ForMember(x => x.WarehouseId, b => b.MapFrom(b => WarehouseEnum.LLDYL.ObjToInt()));
+ 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()));
}
}
}
--
Gitblit v1.9.3