From 9190b1eabf080af4e0d4d76d6e4ef127a12b1074 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 10 十二月 2024 15:44:29 +0800
Subject: [PATCH] 12312312
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs | 30 ++++++++++++++++--------------
1 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
index a92dfca..49d4563 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -11,9 +11,9 @@
using WIDESEAWCS_Model.Models;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks.ConveyorLineJob;
-using HslCommunication;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_Common;
+using Masuit.Tools;
namespace WIDESEAWCS_Tasks
{
@@ -157,17 +157,17 @@
ConveyorLineOutFinish(conveyorLine, command, childDeviceCode);
break;
case 6:
- CreateAndSendEmptyTrayTask(conveyorLine,command, childDeviceCode);
+ CreateAndSendEmptyTrayTask(conveyorLine, command, childDeviceCode);
break;
case 1:
- if (stationManager.stationArea.Contains("GW"))
- {
- var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish|| x.TaskState == (int)TaskOutStatusEnum.OutPending));
- if (taskGW != null)
- {
- command.ConveyorLineBarcode = taskGW.PalletCode;
- }
- }
+ //if (stationManager.stationArea.Contains("GW"))
+ //{
+ // var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutPending));
+ // if (taskGW != null)
+ // {
+ // command.ConveyorLineBarcode = taskGW.PalletCode;
+ // }
+ //}
RequestWmsTask(conveyorLine, command, childDeviceCode);
break;
}
@@ -281,9 +281,10 @@
/// </summary>
private async void RequestWmsTask(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode)
{
- var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutPending));
- if (taskGW != null)
- _taskRepository.DeleteData(taskGW);
+ //var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutPending));
+ //if (taskGW != null)
+ // _taskRepository.DeleteData(taskGW);
+ if (command.ConveyorLineBarcode.IsNullOrEmpty()) return;
var content = await _taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode);
if (content.Status)
{
@@ -303,7 +304,8 @@
else
{
WriteInfo(conveyorLine.DeviceName, content.Message);
- _taskRepository.AddData(taskGW);
+ ConsoleHelper.WriteErrorLine($"銆恵conveyorLine.DeviceName}銆戞墭鐩樺彿锛氥�恵command.ConveyorLineBarcode}銆戣姹傜偣浣嶏細銆恵childDeviceCode}銆戝紓甯镐俊鎭�恵content.Message}銆�");
+ //_taskRepository.AddData(taskGW);
}
}
}
--
Gitblit v1.9.3