From 4e839ad077304eaecb6dfb35fdc9b0d30a209a76 Mon Sep 17 00:00:00 2001
From: yanjinhui <3306209981@qq.com>
Date: 星期六, 28 二月 2026 13:21:55 +0800
Subject: [PATCH] 优化
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs | 21 +++++++++++++++++++--
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs | 2 +-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
index 25ee068..d2a3697 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
@@ -24,9 +24,26 @@
/// <param name="taskDTOs"></param>
/// <returns></returns>
[HttpPost, Route("ReceiveTask"), AllowAnonymous]
- public WebResponseContent ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs)
+ public object ReceiveWMSTask([FromBody] List<WMSTasksDTO> taskDTOs)
{
- return _taskService.ReceiveWMSTask(taskDTOs);
+ WebResponseContent content = _taskService.ReceiveWMSTask(taskDTOs);
+ if (!content.Status)
+ {
+ return new
+ {
+ code = "404",
+ msg = content.Message
+ };
+ }
+ else
+ {
+ return new
+ {
+ code = "0",
+ msg = content.Message,
+ data = content.Data
+ };
+ }
}
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
index 518a8ee..9b80de4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/HKTaskMethods.cs"
@@ -27,7 +27,7 @@
{
try
{
- int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();//杩欓噷鎴戜笉鐭ラ亾鏄粈涔堢被鍨�
+ int containerType = taskDTO.containerCode.Contains("LX") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
//鑾峰彇璐т綅淇℃伅
Dt_HKLocationInfo? kLSLocationInfo = _hKLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
--
Gitblit v1.9.3