From e3c9cde82865df66a7018565c1b84ab2a04739ee Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 07 一月 2025 16:03:28 +0800
Subject: [PATCH] WMS添加设备Model

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index f18b745..5e0dbe1 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -25,6 +25,7 @@
 using WIDESEAWCS_QuartzJob.Models;
 using WIDESEAWCS_QuartzJob.Repository;
 using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_TaskInfoRepository;
 
 namespace WIDESEAWCS_TaskInfoService
 {
@@ -138,8 +139,11 @@
                     // 鍒ゆ柇浠诲姟绫诲瀷鏄惁涓哄叆搴撲换鍔�
                     else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                     {
+                        var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue;
+                        var valueList = value.Split(',').ToList();
                         // 鍒ゆ柇婧愬湴鍧�鏄惁涓嶇瓑浜�"1359-4"
-                        if (task.SourceAddress != "1359-4")
+                        //if (task.SourceAddress != "1359-4" && task.SourceAddress != "1357-4")
+                        if (!valueList.Contains(task.SourceAddress))
                         {
                             // 鏌ヨ浠庢簮鍦板潃鍒扮洰鏍囧湴鍧�鐨勮矾鐢�
                             List<Dt_Router> routers = _routerService.QueryNextRoutes(item.SourceAddress, item.TargetAddress);
@@ -155,8 +159,13 @@
                         }
                         else
                         {
-                            // 璁剧疆褰撳墠鍦板潃涓�"002-021-001"
-                            task.CurrentAddress = "002-021-001";
+                            task.CurrentAddress = string.Empty;
+                            if (task.SourceAddress == "1325-6")
+                                // 璁剧疆褰撳墠鍦板潃涓�"001-021-001"
+                                task.CurrentAddress = "001-021-001";
+                            else
+                                // 璁剧疆褰撳墠鍦板潃涓�"002-021-001"
+                                task.CurrentAddress = "002-021-001";
                             // 璁剧疆涓嬩竴涓湴鍧�涓虹洰鏍囧湴鍧�
                             task.NextAddress = item.TargetAddress;
                         }
@@ -503,6 +512,14 @@
                         BaseDal.DeleteData(task);
                         _taskHtyRepository.AddData(task_Hty);
                     }
+
+
+                    if (task.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)
+                    {
+                        content = StackCraneTaskCompleted(task.TaskNum);
+                        return content;
+                    }
+
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                 {
@@ -553,6 +570,13 @@
                     }
                     else if (task.TaskState == (int)TaskInStatusEnum.SC_InFinish)
                     {
+                        if (App.User.UserId > 0)
+                        {
+                            content = StackCraneTaskCompleted(task.TaskNum);
+                            return content;
+                        }
+
+
                         task.ModifyDate = DateTime.Now;
                         task.Modifier = "System";
 

--
Gitblit v1.9.3