From e7cf443b37f8f4d8a1bc4fe4cd6f058f39e5c7f5 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期六, 14 十二月 2024 01:15:03 +0800 Subject: [PATCH] 更新 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" index fa29aa5..edff987 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" @@ -29,14 +29,16 @@ private readonly IMapper _mapper; private readonly IBasicService _basicService; private readonly IOutboundOrderDetailRepository _outboundOrderDetailRepository; + private readonly IStockInfoService _stockInfoService; public IOutboundOrderRepository Repository => BaseDal; - public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper, IBasicService basicService, IOutboundOrderDetailRepository outboundOrderDetailRepository) : base(BaseDal) + public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper, IBasicService basicService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IStockInfoService stockInfoService) : base(BaseDal) { _mapper = mapper; _basicService = basicService; _outboundOrderDetailRepository = outboundOrderDetailRepository; + _stockInfoService = stockInfoService; } public WebResponseContent ReceiveOutOrder(ErpOutOrderDTO model) @@ -121,7 +123,7 @@ { return WebResponseContent.Instance.Error($"鏈壘鍒拌鏄庣粏琛屽彿淇℃伅"); } - if(outboundOrderDetail.OrderDetailStatus != OrderDetailStatusEnum.New.ObjToInt()) + if (outboundOrderDetail.OrderDetailStatus != OrderDetailStatusEnum.New.ObjToInt()) { return WebResponseContent.Instance.Error($"璇ユ槑缁嗕笉鍙慨鏀�"); } @@ -137,6 +139,39 @@ _outboundOrderDetailRepository.UpdateData(outboundOrderDetail); } + else if (model.Way == 3) + { + if (oldOutboundOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌鍑哄簱鍗�"); + } + } + + return WebResponseContent.Instance.OK(); + } + catch (Exception ex) + { + return WebResponseContent.Instance.Error(ex.Message); + } + } + + public WebResponseContent ReleaseOutOrder(int id) + { + try + { + Dt_OutboundOrder outboundOrder = Db.Queryable<Dt_OutboundOrder>().Where(x => x.Id == id).Includes(x => x.Details).First(); + if (outboundOrder == null) + { + return WebResponseContent.Instance.Error($"鏈壘鍒拌鍑哄簱鍗�"); + } + if(outboundOrder.Details == null || outboundOrder.Details.Count == 0) + { + return WebResponseContent.Instance.Error($"鏈壘鍒版槑缁嗕俊鎭�"); + } + + foreach (var item in outboundOrder.Details) + { + } return WebResponseContent.Instance.OK(); } -- Gitblit v1.9.3