From 2a21c41c5a700641eb2f0ac2437144eeac94ff1c Mon Sep 17 00:00:00 2001
From: renmingwang <renmingwang@hnkhzn.com>
Date: 星期一, 30 三月 2026 10:53:19 +0800
Subject: [PATCH] 修改移库获取分配货位方法,修改taskstate的字段值不匹配问题
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 3 ++-
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 46 ++++++++++++++++++++++++++++++----------------
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index cb22d8e..93035d2 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -831,28 +831,42 @@
public Dt_Task RequestWMSTaskMovelibrary(Dt_Task _Task)
{
WebResponseContent content = new WebResponseContent();
-
- content = HttpHelperh.Get<WebResponseContent>($"{urlWMSMovelibraryTask}?TaskNum={_Task.TaskNum}");
- Dt_Task task = new Dt_Task();
- if (content.Status)
+ try
{
- if (content.Data != null)
+ content = HttpHelperh.Get<WebResponseContent>($"{urlWMSMovelibraryTask}?TaskNum={_Task.TaskNum}");
+ Dt_Task task = new Dt_Task();
+ if (content.Status)
{
- task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToString());
- if (task.TaskNum != _Task.TaskNum)
+ if (content.Data != null)
{
- task.Grade = 3;
- BaseDal.AddData(task);
- return task;
- }
- else
- {
- return _Task;
+ //task = JsonConvert.DeserializeObject<Dt_Task>(content.Data.ToString());
+ WMSTaskDTO dto = JsonConvert.DeserializeObject<WMSTaskDTO>(content.Data.ToString());
+ if (dto != null)
+ {
+ // 杞崲涓篋t_Task
+ task = _mapper.Map<Dt_Task>(dto);
+ task.TaskState = dto.TaskStatus;
+
+ if (task.TaskNum != _Task.TaskNum)
+ {
+ task.Grade = 3;
+ BaseDal.AddData(task);
+ return task;
+ }
+ else
+ {
+ return _Task;
+ }
+ }
}
}
+ return null;
}
- return null;
-
+ catch (Exception ex)
+ {
+ Console.WriteLine($"绉诲簱鎿嶄綔寮傚父锛歿ex.Message}");
+ return null;
+ }
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index ecad134..533db2b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -178,7 +178,8 @@
if (dt_Stock == null) return content.Error($"璐т綅缂栧彿:{Locatask}鐨勬祬璐т綅搴撳瓨寮傚父锛岃妫�鏌ワ紒锛侊紒");
//杩涜鑾峰彇鏂扮殑搴撲綅
- Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//鑾峰彇鍒版柊搴撲綅
+ //Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//鑾峰彇鍒版柊搴撲綅
+ Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocationSC01(DeepLocation.RoadwayNo);//鑾峰彇鍒版柊搴撲綅
if (Nextlocation == null)
{
return content.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅");
--
Gitblit v1.9.3