From 75e3bca44b111c167b9389e4e51b2ce577a9f9e0 Mon Sep 17 00:00:00 2001 From: 647556386 <647556386@qq.com> Date: 星期日, 10 八月 2025 10:35:50 +0800 Subject: [PATCH] 优化更新 --- WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 34 ++++++++++++++++++---------------- 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs index 4617dd9..da8a5a3 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,12 +135,12 @@ { BatchNo = inboundOrderDet.BatchNo, PalletCode = palletCode, - PalletType =1,//GetPalletType(warehouse, palletCode) + PalletType = GetPalletType(warehouse, palletCode),//GetPalletType(warehouse, palletCode) IsFull = true, StockStatus = (int)StockStatusEmun.缁勭洏鏆傚瓨, Creater = "WMS", CreateDate = DateTime.Now, - MaterialType = (int)InventoryMaterialType.鎴愬搧, + MaterialType = (int)InventoryMaterialType.鍘熸潗鏂�, Materialweight = 0, Wlstatus = (int)InventoryMaterialStatus.鍚堟牸, Mgeneratetime = DateTime.Now, @@ -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()) { @@ -208,6 +208,7 @@ Creater = "WMS", CreateDate = DateTime.Now, Id = inboundOrderDet.LinId.ObjToInt(), + DeliveryNote = model.DeliveryNote }; if (stockInfo.Id > 0) @@ -268,7 +269,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 +391,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