From 97073e9e6d03114221436ee0aa1e143d6e2c4a09 Mon Sep 17 00:00:00 2001 From: wankeda <Administrator@DESKTOP-HAU3ST3> Date: 星期一, 04 八月 2025 13:07:39 +0800 Subject: [PATCH] 出入库代码逻辑优化 --- WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs index 4617dd9..3e0832a 100644 --- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs +++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs @@ -54,7 +54,7 @@ public IInboundOrderRepository Repository => BaseDal; - public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IBasicService basicService, IBasicRepository basicRepository, IInboundRepository inboundRepository, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IInboundOrder_HtyService inboundOrderHtyService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IWarehouseService warehouseService, IStockRepository stockRepository,IPalletTypeInfoRepository palletTypeInfoRepository) : base(BaseDal) + public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IBasicService basicService, IBasicRepository basicRepository, IInboundRepository inboundRepository, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IInboundOrder_HtyService inboundOrderHtyService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IWarehouseService warehouseService, IStockRepository stockRepository, IPalletTypeInfoRepository palletTypeInfoRepository) : base(BaseDal) { _mapper = mapper; _unitOfWorkManage = unitOfWorkManage; @@ -135,7 +135,7 @@ { BatchNo = inboundOrderDet.BatchNo, PalletCode = palletCode, - PalletType =1,//GetPalletType(warehouse, palletCode) + PalletType = GetPalletType(warehouse, palletCode),//GetPalletType(warehouse, palletCode) IsFull = true, StockStatus = (int)StockStatusEmun.缁勭洏鏆傚瓨, Creater = "WMS", @@ -170,14 +170,14 @@ { return WebResponseContent.Instance.Error($"缁勭洏鏄庣粏涓嶅敮涓�"); } - if (palletCode.Substring(0, 1) == "6") - { - stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt(); - } - else - { - stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt(); - } + //if (palletCode.Substring(0, 1) == "6") + //{ + // stockInfo.PalletType = PalletTypeEnum.MediumPallet.ObjToInt(); + //} + //else + //{ + // stockInfo.PalletType = PalletTypeEnum.LargestPallet.ObjToInt(); + //} } else if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ToString()) { @@ -268,7 +268,7 @@ if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ObjToString()) { - Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 1)); + Dt_PalletTypeInfo palletTypeInfo = _palletTypeInfoRepository.QueryFirst(x => x.CodeStartStr == palletCode.Substring(0, 3)); if (palletTypeInfo == null) { throw new Exception($"鎵樼洏鍙烽敊璇�"); @@ -390,16 +390,17 @@ { Dt_InboundOrderDetail orderDetail = new Dt_InboundOrderDetail() { - OrderId = inboundOrderOld.Id, MaterielCode = item.MaterielCode, - BatchNo = "", + BatchNo = item.BatchNo, OrderQuantity = item.OrderQuantity, ReceiptQuantity = 0, OverInQuantity = 0, OrderDetailStatus = OrderDetailStatusEnum.New.ObjToInt(), LinId = item.LinId, - MaterielName = materielInfo.MaterielName, - MaterieSpec = materielInfo.MaterieSpec + LPNNo = item.LPN_No, + MaterielName = item.MaterielName, + MaterieSpec = item.MaterieSpec, + Creater = "涓婃父WMS" }; _inboundRepository.InboundOrderDetailRepository.AddData(orderDetail); } -- Gitblit v1.9.3