From 1d044540ee1b7041c7e89bdfe6d1339c99e80a4e Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期三, 08 一月 2025 14:41:16 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/HuaYiZhongHeng/BaiBuLiKu
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index 21112a9..15e1663 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -4,11 +4,13 @@
using System.Diagnostics.CodeAnalysis;
using System.Text;
using WIDESEAWCS_BasicInfoRepository;
+using WIDESEAWCS_Common;
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Core.Caches;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.HttpContextUser;
using WIDESEAWCS_IProcessRepository;
+using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_ITaskInfo_HtyRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
@@ -36,8 +38,9 @@
private readonly INoticeService _noticeService;
private readonly IDt_StationManagerRepository _stationManagerRepository;
private readonly ITask_HtyRepository _htyRepository;
+ private readonly ISys_ConfigService _sys_ConfigService;
- public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository)
+ public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository, ISys_ConfigService sys_ConfigService)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -48,6 +51,7 @@
_noticeService = noticeService;
_stationManagerRepository = stationManagerRepository;
_htyRepository = htyRepository;
+ _sys_ConfigService = sys_ConfigService;
}
public Task Execute(IJobExecutionContext context)
@@ -81,11 +85,11 @@
if (stackerCraneTaskCommand != null)
{
var taskNum = commonStackerCrane.GetValue<StackerCraneDBName, int>(StackerCraneDBName.TaskNum);
- var taskBarCode = commonStackerCrane.GetValue<StackerCraneDBName, string>(StackerCraneDBName.Barcode);
- ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戝爢鍨涙満浠诲姟鍙凤細銆恵taskNum}銆�,鍫嗗灈鏈烘墭鐩樺彿锛氥�恵taskBarCode}銆�,浠诲姟浠诲姟鍙凤細銆恵task.TaskNum}銆戜换鍔℃墭鐩樺彿锛氥�恵task.PalletCode}銆�", ConsoleColor.DarkBlue);
- if (taskNum == 0 && taskBarCode != task.PalletCode)
+ //var taskBarCode = commonStackerCrane.GetValue<StackerCraneDBName, string>(StackerCraneDBName.Barcode);
+ ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戝爢鍨涙満浠诲姟鍙凤細銆恵taskNum}銆戜换鍔′换鍔″彿锛氥�恵task.TaskNum}銆�", ConsoleColor.DarkBlue);
+ if (taskNum == 0)
{
- ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓恒�恵0}銆�,鎵樼洏鍙蜂笉涓�鑷村彲浠ヤ笅鍙戜换鍔�", ConsoleColor.DarkBlue);
+ ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓恒�恵0}銆�,浠诲姟鍙蜂笉涓�鑷村彲浠ヤ笅鍙戜换鍔�", ConsoleColor.DarkBlue);
bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand);
if (sendFlag)
{
@@ -104,7 +108,7 @@
}
else
{
- ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓嶄负銆恵0}銆�,鎴栬�呮墭鐩樺彿涓�鑷翠笉鍙互涓嬪彂浠诲姟", ConsoleColor.DarkBlue);
+ ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″彿涓嶄负銆恵0}銆�,涓嶅彲浠ヤ笅鍙戜换鍔�", ConsoleColor.DarkBlue);
}
}
}
@@ -191,7 +195,7 @@
task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum);
Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
}
- if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TargetAddress == "002-021-001")
+ if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001"))
{
var TASKHTY = task.Adapt<Dt_Task_Hty>();
_taskRepository.DeleteData(task);
@@ -303,7 +307,7 @@
_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒板嚭搴撶珯鍙般�恵task.TargetAddress}銆戝搴旂殑閫氳瀵硅薄锛屾棤娉曞垽鏂嚭搴撶珯鍙版槸鍚﹁鍗犵敤");
}
}
- _taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.TargetAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
+ //_taskService.UpdateTaskExceptionMessage(task.TaskNum, $"鏈壘鍒扮珯鍙般�恵task.TargetAddress}銆戜俊鎭紝鏃犳硶鏍¢獙绔欏彴");
}
}
else
@@ -381,7 +385,9 @@
stackerCraneTaskCommand.StartCommand = 1;
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)//鍒ゆ柇鏄惁鏄叆搴撲换鍔�
{
- if (task.SourceAddress == "1359-4" && task.Roadway.Contains("JZ"))
+ var value = _sys_ConfigService.GetByConfigKey(CateGoryConst.CONFIG_SYS_InStation, SysConfigKeyConst.JZNGInBoundStation).ConfigValue;
+ var valueList = value.Split(',').ToList();
+ if ((valueList.Contains(task.SourceAddress)) && task.Roadway.Contains("JZ"))
{
string[] souredCodes = task.CurrentAddress.Split("-");
if (souredCodes.Length == 3)
--
Gitblit v1.9.3