From 2f8a8a7b31c7e311d1824c76e2a67e2a128bc65b Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期四, 06 三月 2025 17:34:04 +0800 Subject: [PATCH] 成品入库任务,货位 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" index 98b19b1..7bc2e90 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/MesProInOrderService.cs" @@ -15,6 +15,7 @@ using WIDESEA_IInboundRepository; using WIDESEA_IInboundService; using WIDESEA_IOutboundService; +using WIDESEA_IStockRepository; using WIDESEA_Model.Models; namespace WIDESEA_InboundService @@ -24,10 +25,12 @@ public IMesProInOrderRepository Repository => BaseDal; private readonly IUnitOfWorkManage _unitOfWorkManage; private readonly IInboundRepository _inboundRepository; - public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository) : base(BaseDal) + private readonly IStockRepository _stockRepository; + public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository, IStockRepository stockRepository) : base(BaseDal) { _unitOfWorkManage = unitOfWorkManag; _inboundRepository = inboundRepository; + _stockRepository = stockRepository; } /// <summary> /// 鎴愬搧鍏ュ簱鎵爜 @@ -41,7 +44,7 @@ try { //鑾峰彇瀵瑰簲MES鎴愬搧鍏ュ簱鍗曟嵁 - Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Includes(x => x.Details).First(); + Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Where(x => x.Id == Id).Includes(x => x.Details).First(); if (mesProInOrder==null) { return content.Error("褰撳墠MES鍏ュ簱鍗曟嵁涓嶅瓨鍦�"); @@ -67,6 +70,7 @@ { return content.Error($"褰撳墠鍏ュ簱璁㈠崟鏁伴噺婧㈠嚭{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}"); } + proInOrderDetail.OverInQuantity += model.OKPCSQTY.ObjToInt(); _inboundRepository.MesProInOrderDetailRepository.UpdateData(proInOrderDetail); return content.OK($"鍐呭寘{proInOrderDetail.BagNo}宸叉壂鏁伴噺锛歿proInOrderDetail.OverInQuantity},鍓╀綑锛歿proInOrderDetail.OKPCSQTY-proInOrderDetail.OverInQuantity}"); -- Gitblit v1.9.3