From 9190b1eabf080af4e0d4d76d6e4ef127a12b1074 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 10 十二月 2024 15:44:29 +0800
Subject: [PATCH] 12312312

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index 1a90a5c..ade5a33 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -180,7 +180,8 @@
                 var tokenInfos = _cacheService.Get<List<UserInfo>>("Cache_UserToken");
                 if (tokenInfos == null || !tokenInfos.Any())
                 {
-                    throw new Exception(conveyorLine.DeviceName + "缂撳瓨涓湭鎵惧埌Token缂撳瓨");
+                    //throw new Exception(conveyorLine.DeviceName + "缂撳瓨涓湭鎵惧埌Token缂撳瓨");
+                    return;
                 }
                 var userTokenIds = tokenInfos?.Select(x => x.Token_ID).ToList();
                 var userIds = tokenInfos?.Select(x => x.UserId).ToList();
@@ -416,7 +417,7 @@
                     taskOutboundTypeEnum = TaskOutboundTypeEnum.OutTray;
                 else
                     taskOutboundTypeEnum = TaskOutboundTypeEnum.Outbound;
-                await CheckAndCreateTask(taskOutboundTypeEnum, childDeviceCode, index, platform.Stacker);
+                await CheckAndCreateTask(taskOutboundTypeEnum, childDeviceCode, index, platform.Stacker, platform);
             }
             catch (Exception)
             {
@@ -426,7 +427,7 @@
         /// <summary>
         /// 妫�鏌ヤ换鍔″苟鍒涘缓鏂颁换鍔�
         /// </summary>
-        private async Task CheckAndCreateTask(TaskOutboundTypeEnum taskType, string childDeviceCode, int index, string roadWay, List<string> roadways = null)
+        private async Task CheckAndCreateTask(TaskOutboundTypeEnum taskType, string childDeviceCode, int index, string roadWay, Platform platform)
         {
             var tasks = _taskRepository.QueryData(x => x.TaskType == (int)taskType && x.TargetAddress == childDeviceCode);
             if (tasks.Count < index)
@@ -447,7 +448,7 @@
                 var wmsIpAddress = wmsBase + requestTrayOutTask;
 
 
-                var result = await HttpHelper.PostAsync(wmsIpAddress, new { position = childDeviceCode, tag = (int)taskType, areaCdoe = roadWay, roadways = roadways }.ToJsonString());
+                var result = await HttpHelper.PostAsync(wmsIpAddress, new { position = childDeviceCode, tag = (int)taskType, areaCdoe = roadWay, platform.ProductionLine }.ToJsonString());
                 //var result = await HttpHelper.PostAsync("http://localhost:5000/api/Task/RequestTrayOutTaskAsync", dynamic.ToJsonString());
 
                 WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(result);

--
Gitblit v1.9.3