From c3de7bb2097aa347a1f92c2f640d18753aff633a Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 28 二月 2026 13:41:26 +0800
Subject: [PATCH] 添加HTTP客户端助手、枚举、DTO;更新URL
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index e779cc8..797986d 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -60,12 +60,12 @@
string.IsNullOrWhiteSpace(taskDto.TargetAddress) ||
string.IsNullOrWhiteSpace(taskDto.Roadway))
{
- return WebResponseContent.Instance.Error("Invalid task details.");
+ return WebResponseContent.Instance.Error("鏃犳晥鐨勪换鍔¤鎯�");
}
if (taskDto.TaskType != TaskTypeEnum.Inbound && taskDto.TaskType != TaskTypeEnum.InEmpty)
{
- return WebResponseContent.Instance.Error("Invalid task details.");
+ return WebResponseContent.Instance.Error("鏃犳晥鐨勪换鍔¤鎯�");
}
var task = new Dt_Task
@@ -97,7 +97,6 @@
}
}
-
/// <summary>
/// 鏍规嵁鎸囧畾鐨勪换鍔¤鎯呭紓姝ュ垱寤烘柊鐨勫嚭搴撲换鍔�
/// </summary>
@@ -128,14 +127,13 @@
var result = await BaseDal.AddDataAsync(taskList) > 0;
var wmstaskDto = result ? _mapper.Map<WMSTaskDTO>(taskList) : null;
- return WebResponseContent.Instance.OK(result ? "浠诲姟鍒涘缓鎴愬姛" : "浠诲姟鍒涘缓澶辫触", wmstaskDto);
+ return WebResponseContent.Instance.OK(result ? "浠诲姟鍒涘缓鎴愬姛" : "浠诲姟鍒涘缓澶辫触", wmstaskDto ?? new object());
}
catch (Exception ex)
{
return WebResponseContent.Instance.Error($"浠诲姟鍒涘缓澶辫触: {ex.Message}");
}
}
-
/// <summary>
/// 鑾峰彇鍙叆搴撹揣浣�
@@ -151,9 +149,9 @@
if (locationInfo == null) return WebResponseContent.Instance.Error("鏈壘鍒板搴旂殑璐т綅");
locationInfo.LocationStatus = LocationStatusEnum.FreeLock.GetHashCode();
- task.CurrentAddress = taskDto.SourceAddress;
+ task.CurrentAddress = task.SourceAddress;
task.NextAddress = locationInfo.LocationCode;
- task.TargetAddress = taskDto.TargetAddress;
+ task.TargetAddress = locationInfo.LocationCode;
task.TaskStatus = TaskStatusEnum.Line_Finish.GetHashCode();
var updateResult = await BaseDal.UpdateDataAsync(task);
@@ -251,6 +249,27 @@
}
}
+ /// <summary>
+ /// 鍒涘缓绌烘墭鐩樺叆搴撲换鍔�
+ /// </summary>
+ /// <param name="taskDto"></param>
+ /// <returns></returns>
+ public async Task<WebResponseContent> CreateTaskInboundTrayAsync(CreateTaskDto taskDto)
+ {
+ try
+ {
+ //var tasks = await BaseDal.QueryAsync(s => s.PalletCode == palletCode);
+ //if (tasks == null || !tasks.Any())
+ // return WebResponseContent.Instance.Error("鏈壘鍒板搴旂殑浠诲姟");
+ //var taskDtos = _mapper.Map<List<WMSTaskDTO>>(tasks);
+ return WebResponseContent.Instance.OK("鏌ヨ鎴愬姛"/*, taskDtos*/);
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error($"鏌ヨ浠诲姟澶辫触: {ex.Message}");
+ }
+ }
+
#region 鍒嗗鏌滄帴鍙�
/// <summary>
--
Gitblit v1.9.3