From 6728fe63e6539323fff7a274af51726d737b3a28 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期五, 05 十二月 2025 12:33:47 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundBatchPickingService.cs | 24 ++++++++++++++++++++++--
1 files changed, 22 insertions(+), 2 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_OutboundService/OutboundBatchPickingService.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_OutboundService/OutboundBatchPickingService.cs"
index e988272..c0e37a5 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_OutboundService/OutboundBatchPickingService.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_OutboundService/OutboundBatchPickingService.cs"
@@ -1948,9 +1948,23 @@
PalletType = stockInfo.PalletType,
WarehouseId = currentTask.WarehouseId
};
+ var targetAddress = currentTask.TargetAddress;
+
try
{
await _taskRepository.Db.Insertable(returnTask).ExecuteCommandAsync();
+
+ _logger.LogInformation($"CreateReturnTaskAndHandleESS 鍒嗘壒鍒犻櫎鍘嗗彶浠诲姟: {orderNo} 锛� {currentTask.TaskNum}");
+ // 鍒犻櫎鍘熷鍑哄簱浠诲姟
+ //_taskRepository.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.鑷姩瀹屾垚);
+ var result = _task_HtyService.DeleteAndMoveIntoHty(currentTask, OperateTypeEnum.浜哄伐鍒犻櫎);
+ await _taskRepository.Db.Deleteable(currentTask).ExecuteCommandAsync();
+
+ if (!result)
+ {
+ await _taskRepository.Db.Deleteable(currentTask).ExecuteCommandAsync();
+ }
+ _logger.LogInformation($"CreateReturnTaskAndHandleESS 鍒嗘壒鍒犻櫎鍘嗗彶浠诲姟: {orderNo} 锛� {currentTask.TaskNum},褰卞搷琛� {result}");
}
catch (Exception ex)
@@ -1960,7 +1974,7 @@
}
// 鍙戦�丒SS鍛戒护
- await SendESSCommands(palletCode, currentTask.TargetAddress, returnTask);
+ await SendESSCommands(palletCode, targetAddress, returnTask);
_logger.LogInformation($"鍒涘缓鍥炲簱浠诲姟鎴愬姛 - 璁㈠崟: {orderNo}, 鎵樼洏: {palletCode}");
}
@@ -3496,11 +3510,17 @@
}
var targetAddress = originalTask.TargetAddress;
+ _logger.LogInformation($"CreateReturnTaskAndHandleESS 鍒嗘壒鍒犻櫎鍘嗗彶浠诲姟: {orderNo} 锛� {originalTask.TaskNum}");
// 鍒犻櫎鍘熷鍑哄簱浠诲姟
//_taskRepository.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.鑷姩瀹屾垚);
- _task_HtyService.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.浜哄伐鍒犻櫎);
+ var result= _task_HtyService.DeleteAndMoveIntoHty(originalTask, OperateTypeEnum.浜哄伐鍒犻櫎);
await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
+ if (!result)
+ {
+ await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync();
+ }
+ _logger.LogInformation($"CreateReturnTaskAndHandleESS 鍒嗘壒鍒犻櫎鍘嗗彶浠诲姟: {orderNo} 锛� {originalTask.TaskNum},褰卞搷琛� {result}");
// 缁� ESS 鍙戦�佹祦鍔ㄤ俊鍙峰拰鍒涘缓浠诲姟
--
Gitblit v1.9.3