From 366fe40a67783f7f22d13f59f9863c2cb6eac5b5 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 02 十二月 2025 22:35:38 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs | 49 ++++++++++++++++++++++++-------------------------
1 files changed, 24 insertions(+), 25 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_BasicService/InvokeMESService.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_BasicService/InvokeMESService.cs"
index 307f953..59d58ee 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_BasicService/InvokeMESService.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_BasicService/InvokeMESService.cs"
@@ -283,7 +283,7 @@
Qty = row.BarcodeQty,
BatchNo = row.BatchNo,
SupplyCode = row.SupplyCode,
- Unit = row.Unit
+ Unit = row.BarcodeUnit
}).ToList()
}).ToList();
allocatefeedmodel.Details = groupedData;
@@ -399,11 +399,7 @@
var pendingDetails = orderDetails.Where(x => x.ReturnToMESStatus == 0).ToList();
foreach (var detail in pendingDetails)
{
- if (detail.OverOutQuantity >= detail.NeedOutQuantity)
- {
- detailIds.Add(detail.Id);
- }
- else
+ if (detail.OverOutQuantity < detail.NeedOutQuantity)
{
allCompleted = false;
}
@@ -449,7 +445,7 @@
};
// 濉厖鏄庣粏鍜屾潯鐮佷俊鎭�
- foreach (var detail in orderDetails.Where(x => detailIds.Contains(x.Id)).ToList())
+ foreach (var detail in orderDetails )
{
// 鏌ヨ璇ユ槑缁嗗搴旂殑閿佸畾鏉$爜璁板綍
var detailLocks = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
@@ -473,27 +469,30 @@
// 濉厖鏉$爜淇℃伅锛堝惈鍗曚綅杞崲锛�
foreach (var item in detailLocks)
{
- var barModel = new WIDESEA_DTO.Outbound.BarcodesModel
+ if (item.PickedQty > 0)
{
- barcode = item.CurrentBarcode,
- supplyCode = item.SupplyCode,
- batchNo = item.BatchNo,
- unit = item.BarcodeUnit,
- qty = item.BarcodeQty
- };
+ var barModel = new WIDESEA_DTO.Outbound.BarcodesModel
+ {
+ barcode = item.CurrentBarcode,
+ supplyCode = item.SupplyCode,
+ batchNo = item.BatchNo,
+ unit = item.BarcodeUnit,
+ qty = item.BarcodeQty
+ };
- // 鍗曚綅涓嶄竴鑷存椂杞崲
- if (item.BarcodeUnit != item.Unit)
- {
- var convertResult = await _materialUnitService.ConvertAsync(
- item.MaterielCode, item.BarcodeQty, item.Unit, item.BarcodeUnit);
- barModel.unit = convertResult.Unit;
- barModel.qty = convertResult.Quantity;
+ // 鍗曚綅涓嶄竴鑷存椂杞崲
+ if (item.BarcodeUnit != item.Unit)
+ {
+ var convertResult = await _materialUnitService.ConvertAsync(
+ item.MaterielCode, item.BarcodeQty, item.Unit, item.BarcodeUnit);
+ barModel.unit = convertResult.Unit;
+ barModel.qty = convertResult.Quantity;
+ }
+
+ detailModel.qty += barModel.qty;
+ detailModel.currentDeliveryQty += barModel.qty;
+ detailModel.barcodes.Add(barModel);
}
-
- detailModel.qty += barModel.qty;
- detailModel.currentDeliveryQty += barModel.qty;
- detailModel.barcodes.Add(barModel);
}
feedModel.details.Add(detailModel);
--
Gitblit v1.9.3