From 9086b238cd9fbb9fbeae7cab11d59576cd9d2853 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期一, 24 十一月 2025 10:27:01 +0800
Subject: [PATCH] 合并
---
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/StackerCraneJob_YLSC3.cs | 26 +++++++++++++++++++++++---
1 files changed, 23 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
index ce77f6a..8b355c0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\345\216\237\346\226\231\345\272\223/StackerCraneJob_YLSC3.cs"
@@ -25,6 +25,7 @@
using WIDESEAWCS_Core.Helper;
using HslCommunication.WebSocket;
using WIDESEAWCS_DTO.Equipment;
+using WIDESEAWCS_QuartzJob.StackerCrane;
namespace WIDESEAWCS_Tasks
{
@@ -63,7 +64,14 @@
commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//璁㈤槄浠诲姟瀹屾垚浜嬩欢
}
commonStackerCrane.CheckStackerCraneTaskCompleted();//闃叉浠诲姟瀹屾垚浜嬩欢鐩戞祴瓒呮椂锛屽啀鎵嬪姩瑙﹀彂涓�娆�
- if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)
+
+ //鑾峰彇褰撳墠鍫嗗灈鏈虹姸鎬�
+ if (commonStackerCrane.CurrentTaskNum>0 && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted)
+ {
+ StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum);
+ CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e);
+ }
+ else if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)//鍒ゆ柇涓嬪彂
{
short stackerError = commonStackerCrane.Communicator.Read<short>("DB1000.54.0");
if (stackerError == 0)
@@ -122,7 +130,7 @@
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
- private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e)
+ private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender,StackerCraneTaskCompletedEventArgs e)
{
CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
if (commonStackerCrane != null)
@@ -152,7 +160,12 @@
_taskService.UpdateTaskExceptionMessage(taskNum, $"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
return WebResponseContent.Instance.Error($"杈撻�佺嚎鍑哄簱绔欑偣鏈厤缃�,{task.NextAddress}");
}
- Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode && x.ChildPosi == stationManger.StationDeviceCode);
+ bool depth = false;
+ if (task.Grade > 0 && task.TaskType == TaskTypeEnum.PrintYLOutbound.ObjToInt())
+ {
+ depth = true;
+ }
+ Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode && x.ChildPosi == stationManger.StationDeviceCode && (depth ? x.Depth == 2 : true));
if (router == null)
{
_taskService.UpdateTaskExceptionMessage(taskNum, $"鏈壘鍒拌矾鐢变俊鎭�,{task.NextAddress}");
@@ -243,6 +256,13 @@
/// <returns></returns>
private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane)
{
+ //鍒ゆ柇鏄惁鏈夋鎵ц鐨勪换鍔★紝濡傛灉鏈夊垯涓嶄笅鍙�
+ Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt());
+ if (taskOld != null)
+ {
+ return null;
+ }
+
Dt_Task? task;
if (commonStackerCrane.LastTaskType == null)
{
--
Gitblit v1.9.3