From 7dfee7b5be464fd4d6819995f2190e88277a9069 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期二, 16 十二月 2025 08:47:52 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 45 ++++++++++++++++++++++++++-------------------
1 files changed, 26 insertions(+), 19 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
index 07c7c45..d5d0759 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_TaskInfoService/TaskService.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_TaskInfoService/TaskService.cs"
@@ -583,15 +583,7 @@
{
_logger.LogInformation($"InEmptyTaskCompleted AddLocationStatusChangeRecord : {ex.Message} ");
}
-
- if (outboundOrder != null)
- {
- await HandleOutboundOrderToMESCompletion(outboundOrder, outboundOrder.OrderNo);
- }
- else
- {
- _logger.LogInformation($"TaskService InEmptyTaskCompleted: {task.TaskNum} ,鏈壘鍒板嚭搴撳崟銆� ");
- }
+
return content;
}
@@ -714,7 +706,7 @@
_logger.LogInformation($"InPickTaskCompleted AddLocationStatusChangeRecord : {ex.Message} ");
}
- _logger.LogInformation($"鎵樼洏鍥炲簱瀹屾垚澶勭悊鎴愬姛 - 浠诲姟鍙�: {task.TaskNum}, 鎵樼洏: {task.PalletCode}, 璁㈠崟: {task.OrderNo}");
+ _logger.LogInformation($"鎵樼洏鍥炲簱瀹屾垚澶勭悊鎴愬姛 - 浠诲姟鍙�: {task.TaskNum}, 鎵樼洏: {task.PalletCode}, 璁㈠崟: {task.OrderNo} 璐т綅鐘舵�侊細{locationInfo.LocationStatus}");
_ = Task.Run(async () =>
{
try
@@ -1135,11 +1127,12 @@
allocatefeedmodel.Details.Add(detailModel);
- }
+ }
var groupedResult = allocatefeedmodel.Details
.GroupBy(item => new { item.WarehouseCode, item.MaterialCode, item.Unit, item.LineNo })
- .Select(group => {
-
+ .Select(group =>
+ {
+
var deduplicatedBarcodes = group.SelectMany(x => x.Barcodes)
.GroupBy(b => b.Barcode)
.Select(b => new BarcodeInfo
@@ -1149,20 +1142,20 @@
SupplyCode = b.First().SupplyCode,
Qty = b.Max(x => x.Qty),
Unit = b.First().Unit
- }).ToList();
+ }).ToList();
return new AllocateDtoDetail
{
WarehouseCode = group.Key.WarehouseCode,
MaterialCode = group.Key.MaterialCode,
LineNo = group.Key.LineNo,
- Qty = deduplicatedBarcodes.Sum(b => b.Qty),
+ Qty = deduplicatedBarcodes.Sum(b => b.Qty),
Unit = group.Key.Unit,
Barcodes = deduplicatedBarcodes
};
}).ToList();
allocatefeedmodel.Details = groupedResult;
-
+
var result = await _invokeMESService.FeedbackAllocate(allocatefeedmodel);
if (result != null && result.code == 200)
@@ -1177,6 +1170,19 @@
ReturnToMESStatus = 1,
}).Where(x => x.OrderNo == orderNo).ExecuteCommandAsync();
}
+ else
+ {
+ await _outboundOrderDetailService.Db.Updateable<Dt_OutboundOrderDetail>()
+ .SetColumns(x => x.ReturnToMESStatus == 2)
+ .Where(x => x.OrderId == outboundOrder.Id)
+ .ExecuteCommandAsync();
+
+ await _outboundOrderService.Db.Updateable<Dt_OutboundOrder>()
+ .SetColumns(it => new Dt_OutboundOrder { ReturnToMESStatus = 2, Remark = result.message })
+ .Where(x => x.OrderNo == orderNo)
+ .ExecuteCommandAsync();
+ }
+
}
}
else if (outboundOrder.OrderType == OutOrderTypeEnum.ReCheck.ObjToInt())
@@ -1249,13 +1255,14 @@
}
feedmodel.details.Add(detailModel);
}
-
+
var groupedResult = feedmodel.details
.GroupBy(item => new { item.warehouseCode, item.materialCode, item.unit, item.lineNo })
- .Select(group => {
+ .Select(group =>
+ {
var deduplicatedBarcodes = group.SelectMany(x => x.barcodes)
.GroupBy(b => b.barcode)
- .Select(b =>new WIDESEA_DTO.Outbound.BarcodesModel
+ .Select(b => new WIDESEA_DTO.Outbound.BarcodesModel
{
barcode = b.Key,
batchNo = b.First().batchNo,
--
Gitblit v1.9.3