From 415931fc8e37495b1be97b975bc409c5b279ce6f Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期六, 29 十一月 2025 17:52:20 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 18 +++++++++---------
1 files changed, 9 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_StockService/StockInfoService.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_StockService/StockInfoService.cs"
index 492701c..47b932e 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_StockService/StockInfoService.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_StockService/StockInfoService.cs"
@@ -22,16 +22,16 @@
public IRepository<Dt_StockInfo> Repository => BaseDal;
private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository;
private readonly IOutboundOrderService _outboundOrderService;
- private readonly IOutboundOrderDetailService _outboundOrderDetailService;
+ //private readonly IOutboundOrderDetailService _outboundOrderDetailService;
private readonly ILocationInfoService _locationInfoService;
- public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService) : base(BaseDal)
+ public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService) : base(BaseDal)
{
_mapper = mapper;
_stockInfoDetailRepository = stockInfoDetailRepository;
_recordService = recordService;
_locationInfoService = locationInfoService;
_outboundOrderService = outboundOrderService;
- _outboundOrderDetailService = outboundOrderDetailService;
+ //_outboundOrderDetailService = outboundOrderDetailService;
}
/// <summary>
@@ -289,7 +289,7 @@
}
// 鑾峰彇鍑哄簱鍗曟槑缁嗭紝鐢ㄤ簬纭畾闇�瑕佺殑鎵规鍜屼緵搴斿晢
- var orderDetails = _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>().Where(x => x.OrderId == orderId && x.MaterielCode == materielCode).ToList();
+ var orderDetails = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrderDetail>().Where(x => x.OrderId == orderId && x.MaterielCode == materielCode).ToList();
if (!orderDetails.Any())
{
@@ -311,9 +311,9 @@
// 鎵ц鏌ヨ骞舵寜鍏堣繘鍏堝嚭鎺掑簭
var stocks = stockQuery.ToList()
.Where(x => x.Details.Any(d =>
- d.MaterielCode == materielCode &&
- d.BatchNo == orderDetail.BatchNo &&
- d.SupplyCode == orderDetail.SupplyCode &&
+ d.MaterielCode == materielCode &&
+ string.IsNullOrEmpty(orderDetail.BatchNo)?true: d.BatchNo == orderDetail.BatchNo&&
+ string.IsNullOrEmpty(orderDetail.BatchNo)?true:d.SupplyCode == orderDetail.SupplyCode &&
d.StockQuantity > d.OutboundQuantity
))
.OrderBy(x => x.CreateDate)
@@ -323,8 +323,8 @@
{
var relevantDetails = stock.Details
.Where(d => d.MaterielCode == materielCode &&
- d.BatchNo == orderDetail.BatchNo &&
- d.SupplyCode == orderDetail.SupplyCode &&
+ string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.BatchNo == orderDetail.BatchNo &&
+ string.IsNullOrEmpty(orderDetail.BatchNo) ? true : d.SupplyCode == orderDetail.SupplyCode &&
d.StockQuantity > d.OutboundQuantity)
.ToList();
--
Gitblit v1.9.3