From 0dbc8273bdfbcabcc4b770546245f6b17d787de9 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 13 三月 2026 14:44:50 +0800
Subject: [PATCH] fix: 修复API控制器依赖注入和路由配置
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
index f8219c9..2d66fcd 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineNewJob/CommonConveyorLineNewJob.cs
@@ -17,7 +17,7 @@
#endregion << 鐗� 鏈� 娉� 閲� >>
-using AutoMapper;
+using MapsterMapper;
using Microsoft.Extensions.Configuration;
using Quartz;
using SqlSugar;
@@ -81,6 +81,12 @@
{
ConveyorLineTaskCommandNew command = conveyorLine.ReadCustomer<ConveyorLineTaskCommandNew>(childDeviceCode);
+
+ if (command == null)
+ {
+ return;
+ }
+
#region 妫�鏌ョ壒瀹氫綅缃槸鍚︽湁鎵樼洏
var checkPalletPositions = App.Configuration.GetSection("CheckPalletPositions")
@@ -112,10 +118,7 @@
#endregion
- if (command == null || command.PLC_STB != 1)
- {
- return;
- }
+ if (command.PLC_STB != 1) return;//PLC_STB=1鏃舵墠澶勭悊浠诲姟
if (command.Barcode.IsNullOrEmpty())
{
@@ -127,14 +130,14 @@
if (command.TaskNo > 0)
{
Dt_Task task = _taskService.QueryExecutingConveyorLineTask(command.TaskNo, childDeviceCode);
- if (task.IsNullOrEmpty())
+ if (!task.IsNullOrEmpty())
{
- _conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode);
+ // 澶勭悊浠诲姟鐘舵��
+ ProcessTaskState(conveyorLine, command, task, childDeviceCode);
+ //_conveyorLineDispatch.RequestInbound(conveyorLine, command, childDeviceCode);
return;
}
- // 澶勭悊浠诲姟鐘舵��
- ProcessTaskState(conveyorLine, command, task, childDeviceCode);
}
}
catch (Exception innerEx)
@@ -166,7 +169,7 @@
const int InFinish = (int)TaskInStatusEnum.InFinish;
const int OutFinish = (int)TaskOutStatusEnum.OutFinish;
- int state = task.TaskState;
+ int state = task.TaskStatus;
bool isTargetAddress = task.TargetAddress == childDeviceCode;
// 澶勭悊鐘舵�侀�昏緫
@@ -196,4 +199,4 @@
}
}
}
-}
\ No newline at end of file
+}
--
Gitblit v1.9.3