From f423e1277f91427f0a767bd1224c1260dcb73086 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 20 四月 2026 22:47:54 +0800
Subject: [PATCH] feat: 添加空箱入库功能及相关优化
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
index 499b063..7d39b67 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
@@ -1,9 +1,11 @@
+using System.Diagnostics;
using WIDESEA_Common.Constants;
using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Common.TaskEnum;
using WIDESEA_Common.WareHouseEnum;
using WIDESEA_Core;
+using WIDESEA_Core.Helper;
using WIDESEA_DTO.MES;
using WIDESEA_DTO.Task;
using WIDESEA_IBasicService;
@@ -58,6 +60,7 @@
/// </summary>
public async Task<WebResponseContent> OutboundFinishTaskAsync(CreateTaskDto taskDto)
{
+ var stopwatch = Stopwatch.StartNew();
try
{
var task = await BaseDal.QueryFirstAsync(s => s.PalletCode == taskDto.PalletCode);
@@ -135,9 +138,21 @@
LocalTime = DateTime.Now,
ContainerCode = taskDto.PalletCode
};
+ string requestJson = outboundRequest.ToJson();
var outboundResult = string.IsNullOrWhiteSpace(token)
? _mesService.OutboundInContainer(outboundRequest)
: _mesService.OutboundInContainer(outboundRequest, token);
+ stopwatch.Stop();
+ await _mesLogService.LogAsync(new MesApiLogDto
+ {
+ ApiType = "UnbindContainer",
+ RequestJson = requestJson,
+ ResponseJson = System.Text.Json.JsonSerializer.Serialize(outboundResult),
+ IsSuccess = outboundResult.IsSuccess,
+ ErrorMessage = outboundResult.ErrorMessage,
+ ElapsedMs = (int)stopwatch.ElapsedMilliseconds,
+ Creator = "systeam"
+ });
if (outboundResult == null || outboundResult.Data == null || !outboundResult.Data.IsSuccess)
{
return content.Error($"鍑哄簱瀹屾垚澶辫触锛歁ES鍑虹珯澶辫触: {outboundResult?.Data?.Msg ?? outboundResult?.ErrorMessage ?? "鏈煡閿欒"}");
--
Gitblit v1.9.3