From 36230cd4dd0ebe5d21eede3eff6216908f7f7a8e Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期三, 06 十一月 2024 16:48:32 +0800
Subject: [PATCH] AGV任务下发,AGV任务状态更新

---
 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index bb6c530..3ea01ce 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -40,7 +40,7 @@
 namespace WIDESEAWCS_Tasks
 {
     [DisallowConcurrentExecution]
-    public class CommonConveyorLineJob : IJob
+    public class CommonConveyorLineJob : JobBase, IJob
     {
         private readonly ITaskService _taskService;
         private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -77,16 +77,16 @@
                                 case "104":
                                     ConveyorLineInFinish(conveyorLine, command, childDeviceCode);
                                     break;
-                                case "105":
-                                    RequestOutbound(conveyorLine, command, childDeviceCode);
-                                    break;
+                                //case "105":
+                                //    RequestOutbound(conveyorLine, command, childDeviceCode);
+                                //    break;
                                 case "108":
                                     ConveyorLineOutFinish(conveyorLine, command, childDeviceCode);
                                     break;
-                                default:
-                                    RequestInNextAddress(conveyorLine, command, childDeviceCode);
-                                    RequestOutNextAddress(conveyorLine, command, childDeviceCode);
-                                    break;
+                                    //default:
+                                    //    RequestInNextAddress(conveyorLine, command, childDeviceCode);
+                                    //    RequestOutNextAddress(conveyorLine, command, childDeviceCode);
+                                    //    break;
                             }
                         }
                     }
@@ -117,7 +117,7 @@
             {
                 ConveyorLineDTO lineDTO = new ConveyorLineDTO()
                 {
-                    TaskNum = task.TaskNum,
+                    //TaskNum = task.TaskNum,
                     stationCode = childDeviceCode,
                     Barcode = command.Barcode,
                     Spec = command.Spec,
@@ -127,8 +127,8 @@
 
                 if (content.Status)
                 {
-                    task.TargetAddress = "104";
-                    task.NextAddress = "103";
+                    task.TargetAddress = AppSettings.Configuration["OKAddress"];
+                    task.NextAddress = task.TargetAddress;
                     ConveyorLineTaskCommandW taskCommand = _mapper.Map<ConveyorLineTaskCommandW>(task);
 
                     if (conveyorLine.SendCommand(taskCommand, childDeviceCode))
@@ -138,8 +138,8 @@
                 {
                     if (content.Code == 404)//淇敼缁堢偣鍦板潃
                     {
-                        task.TargetAddress = "101";
-                        task.NextAddress = "101";
+                        task.TargetAddress = AppSettings.Configuration["NGAddress"];
+                        task.NextAddress = task.TargetAddress;
                         task.ExceptionMessage = content.Message;
                         task.TaskState = (int)TaskInStatusEnum.InException;
                         ConveyorLineTaskCommandW taskCommand = _mapper.Map<ConveyorLineTaskCommandW>(task);

--
Gitblit v1.9.3