From e0a1c1f6925a70f377abc855659b527e18454e95 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期五, 12 十二月 2025 13:56:13 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 7f0e000..9d1cce9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -645,15 +645,19 @@
{
resultDTO.UniqueUnit = "";
}
- var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList();
- resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity);
- resultDTO.StockCount = orderDetail.Details.Count;
- if (validDetails.Any())
- {
- resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity);
- // 鏄庣粏璁板綍鏁帮細绗﹀悎鏉′欢鐨勬湁鏁堣褰曟潯鏁�
- resultDTO.StockCount -= validDetails.Count;
- }
+ var inbound =_inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Where(x => x.InboundOrderNo == orderNo);
+ var inboundDetails = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.OrderId == inbound.First().Id).ToList();
+ resultDTO.StockSumQuantity = inboundDetails.Where(x=>x.ReceiptQuantity==0).Sum(x=>x.OrderQuantity);
+ resultDTO.StockCount = inboundDetails.Where(x => x.ReceiptQuantity == 0).Count();
+ //var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList();
+ //resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity);
+ //resultDTO.StockCount = orderDetail.Details.Count;
+ //if (validDetails.Any())
+ //{
+ // resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity);
+ // // 鏄庣粏璁板綍鏁帮細绗﹀悎鏉′欢鐨勬湁鏁堣褰曟潯鏁�
+ // resultDTO.StockCount -= validDetails.Count;
+ //}
return content.OK("", resultDTO);
}
catch (Exception ex)
--
Gitblit v1.9.3