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/ConveyorLineJob/CommonConveyorLineJob.cs | 58 +++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 35 insertions(+), 23 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 c445821..5470af5 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -16,6 +16,7 @@
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IProcessRepository;
using WIDESEAWCS_ISystemServices;
+using WIDESEAWCS_ITaskInfo_HtyRepository;
using WIDESEAWCS_ITaskInfoRepository;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
@@ -35,6 +36,7 @@
{
private readonly ITaskService _taskService;
private readonly ITaskRepository _taskRepository;
+ private readonly ITask_HtyRepository _task_HtyRepository;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly IRouterService _routerService;
private readonly IPlatFormRepository _platFormRepository;
@@ -49,8 +51,7 @@
private static List<string>? userTokenIds;
private static List<int>? userIds;
-
- public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository)
+ public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDeviceInfoRepository deviceInfoRepository, ITask_HtyRepository task_HtyRepository)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
@@ -64,6 +65,7 @@
_cacheService = cacheService;
_noticeService = noticeService;
_deviceInfoRepository = deviceInfoRepository;
+ _task_HtyRepository = task_HtyRepository;
}
public async Task Execute(IJobExecutionContext context)
@@ -81,7 +83,6 @@
// 骞惰澶勭悊姣忎釜瀛愯澶�
var tasks = childDeviceCodes.Select(childDeviceCode => ProcessDeviceAsync(conveyorLine, childDeviceCode)).ToList();
await Task.WhenAll(tasks);
-
// 鑾峰彇鎵�鏈夌珯鐐圭鐞嗗櫒
List<Dt_StationManager> stationManagers = _stationManagerService.GetAllStationByDeviceCode(conveyorLine.DeviceCode);
@@ -153,7 +154,6 @@
{
try
{
-
// 璇诲彇浠诲姟鍛戒护鍜岃澶囧懡浠�
ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
ConveyorLineTaskCommandWrite commandWrite = conveyorLine.ReadCustomer<ConveyorLineTaskCommandWrite>(childDeviceCode, "DeviceCommand");
@@ -242,7 +242,6 @@
}
catch (Exception ex)
{
-
}
return Task.CompletedTask;
}
@@ -362,7 +361,6 @@
{
try
{
-
ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚");
var task = _taskService.QueryExecutingConveyorLineTask(command.TaskNum, childDeviceCode);
if (task != null && task.TaskState != (int)TaskInStatusEnum.Line_InFinish)
@@ -398,7 +396,6 @@
}
catch (Exception ex)
{
-
}
}
@@ -417,7 +414,6 @@
{
try
{
-
// 鏌ヨ杈撻�佺嚎浠诲姟锛屾牴鎹緭閫佺嚎璁惧鍜屽瓙璁惧浠g爜鑾峰彇浠诲姟淇℃伅
var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode);
@@ -457,7 +453,6 @@
}
catch (Exception ex)
{
-
}
}
@@ -519,7 +514,6 @@
{
try
{
-
// 鎵撳嵃鎴愬姛淇℃伅锛岃〃绀烘墭鐩樺凡鍒拌揪鎸囧畾杈撻�佺嚎骞跺畬鎴愬嚭搴�
ConsoleHelper.WriteSuccessLine($"銆恵conveyorLine.DeviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍑哄簱瀹屾垚");
@@ -582,7 +576,6 @@
}
catch (Exception ex)
{
-
}
}
@@ -728,7 +721,7 @@
EquipmentCode = stationManager.stationEquipMOM,
SessionId = Guid.NewGuid().ToString(),
EmployeeNo = "MITest",
- SceneType = "2",
+ SceneType = "4",
RequestTime = TimeZoneInfo.ConvertTimeToUtc(DateTime.Now).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
};
@@ -751,20 +744,39 @@
return;
}
- if (result1.SerialNos.Count <= 0)
+ if (stationManager.remark == "ZYNG")
{
-
- ConsoleHelper.WriteWarningLine("2");
- ConsoleHelper.WriteWarningLine(stationManager.stationLocation);
- conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode);
-
+ ConsoleHelper.WriteWarningLine($"銆愭敞娑睳G鍏ュ簱銆�");
+ if (result1.SerialNos.Count <= 0)
+ {
+ ConsoleHelper.WriteWarningLine("1000");
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode);
+ }
+ else
+ {
+ ConsoleHelper.WriteWarningLine("2");
+ ConsoleHelper.WriteWarningLine(stationManager.stationLocation);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode);
+ }
+ ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true);
}
else
{
- ConsoleHelper.WriteWarningLine("1000");
- conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
- conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode);
-
+ if (result1.SerialNos.Count <= 0)
+ {
+ ConsoleHelper.WriteWarningLine("2");
+ ConsoleHelper.WriteWarningLine(stationManager.stationLocation);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, stationManager.stationLocation, stationManager.stationChildCode);
+ }
+ else
+ {
+ ConsoleHelper.WriteWarningLine("1000");
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTaskNum, 5, stationManager.stationChildCode);
+ conveyorLine.SetValue(ConveyorLineDBName.WriteConveyorLineTargetAddress, 1000, stationManager.stationChildCode);
+ }
ConveyorLineSendFinish(conveyorLine, stationManager.stationChildCode, ProtocalDetailValue, true);
}
}
@@ -774,6 +786,6 @@
}
}
- #endregion 鍖栨垚NG鍙e叆搴�
+ #endregion 璁惧NG鍙e叆搴�
}
}
\ No newline at end of file
--
Gitblit v1.9.3