From a08829b6f60b2320555e9f560464248cc038cada Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 13 三月 2026 13:56:16 +0800
Subject: [PATCH] fix: 修复日志问题
---
项目代码/WCSServices/WIDESEAWCS_Tasks/二期线体/ConveyorLineJob2.cs | 59 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 48 insertions(+), 11 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
index 2cd34b8..3f03d3b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSServices/WIDESEAWCS_Tasks/\344\272\214\346\234\237\347\272\277\344\275\223/ConveyorLineJob2.cs"
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
+using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEAWCS_Common;
@@ -17,6 +18,7 @@
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_TaskInfoService;
namespace WIDESEAWCS_Tasks
{
@@ -60,24 +62,57 @@
//涓婃姤WMS鏂欑鍒拌揪
if (PickBarCode.IsNotEmptyOrNull())
{
- //WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
- WebResponseContent content = WebResponseContent.Instance.OK();
+ conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
+ WebResponseContent content = _taskService.WMSPickUp(station.PickStationCode, PickBarCode);
+ //WebResponseContent content = WebResponseContent.Instance.OK();
if (content.Status)
{
- //鍐欏叆鎷i�夌‘璁�
- conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)300, station.StationCode);
+ WriteInfo(conveyorLine.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶ユ垚鍔焮PickBarCode}");
}
else
{
- WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒锛屼俊鎭瘂content.Message}");
+ WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂笂鎶MS閿欒{PickBarCode}锛屼俊鎭瘂content.Message}");
}
}
else
{
- WriteError(nameof(conveyorLine.DeviceCode), $"{station.PickStationCode}鎷i�夌敵璇蜂负{PickRequest}鏉$爜涓虹┖鍊�");
+ WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}鎷i�夌敵璇蜂负{PickRequest}鏉$爜涓虹┖鍊�");
}
}
-
+ //鎸夐挳鐢宠
+ bool DownRequest = conveyorLine.GetValue<ConveyorLineDBName, bool>(ConveyorLineDBName.R_DownRequest, station.StationCode);
+ short W_PickToHode = conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.W_PickToHode, station.StationCode);
+ if (DownRequest && W_PickToHode == 300)
+ {
+ string PickBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_PickBarCode, station.StationCode).Trim();
+ WriteInfo(conveyorLine.DeviceCode, $"鐢宠鍏ュ簱{PickBarCode}锛岀珯鍙帮細{station.StationCode}");
+ //涓婃姤WMS鏂欑鍒拌揪
+ if (PickBarCode.IsNotEmptyOrNull())
+ {
+ ContainerFlowDTO containerFlowDTO = new ContainerFlowDTO()
+ {
+ SlotCode = station.PickStationCode,
+ ContainerCode = PickBarCode,
+ Direction="100"
+ };
+ WriteInfo(conveyorLine.DeviceCode, $"浠诲姟鏋勫缓瀹屾垚SlotCode: {containerFlowDTO.SlotCode}, ContainerCode: {containerFlowDTO.ContainerCode}");
+ WebResponseContent responseContent = _taskService.ContainerFlow(containerFlowDTO, station.StationDeviceCode, station.PickStationCode,1);
+ if (responseContent.Status)
+ {
+ WriteInfo(conveyorLine.DeviceCode, $"鍐欏叆PLC淇″彿W_PickToHode: {containerFlowDTO.Direction}锛岀珯鍙帮細{station.StationCode}");
+ conveyorLine.SetValue(ConveyorLineDBName.W_PickToHode, (short)containerFlowDTO.Direction.ObjToInt(), station.StationCode);
+ }
+ else
+ {
+ WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}鎸夐挳鐢宠閿欒{PickBarCode}锛屼俊鎭瘂responseContent.Message}");
+ };
+ }
+ else
+ {
+ WriteError(conveyorLine.DeviceCode, $"{station.PickStationCode}鎸夐挳鐢宠涓簕DownRequest}鏉$爜涓虹┖鍊�");
+ }
+ }
+
}
else
{
@@ -88,6 +123,7 @@
if (InRequest && !InResponse && InWeight>0)
{
string InBarCode = conveyorLine.GetValue<ConveyorLineDBName, string>(ConveyorLineDBName.R_InBarCode, station.StationCode).Trim();
+ WriteInfo(conveyorLine.DeviceCode, $"绔欏彴{station.StationCode}鏂欑{InBarCode}鐢宠鍏ュ簱鎴愬姛");
//鏂欑鍒拌揪
if (InBarCode.IsNotEmptyOrNull())
{
@@ -95,22 +131,23 @@
WebResponseContent content =_taskService.RequestInTask(station.StationCode,InBarCode);
if (content.Status)
{
- //鍐欏叆鍏ュ簱纭
- conveyorLine.SetValue(ConveyorLineDBName.W_InResponse, true, station.StationCode);
+ conveyorLine.SetValue(ConveyorLineDBName.W_InResponse, true, station.StationCode);
}
else
{
- WriteError(nameof(conveyorLine.DeviceCode), $"绔欏彴{station.StationCode}鏂欑{InBarCode}鐢宠鍏ュ簱浠诲姟閿欒锛屼俊鎭瘂content.Message}");
+ WriteError(conveyorLine.DeviceCode, $"绔欏彴{station.StationCode}鏂欑{InBarCode}鐢宠鍏ュ簱浠诲姟閿欒锛屼俊鎭瘂content.Message}");
}
}
else
{
- WriteError(nameof(conveyorLine.DeviceCode), $"绔欏彴{station.StationCode}鍏ュ簱鐢宠涓簕InRequest}鏉$爜涓虹┖鍊�");
+ WriteError(conveyorLine.DeviceCode, $"绔欏彴{station.StationCode}鍏ュ簱鐢宠涓簕InRequest}鏉$爜涓虹┖鍊�");
}
}
}
}
+
+ conveyorLine.SetValue(ConveyorLineDBName.WriteHeart, true, conveyorLine.DeviceCode);
}
}
catch (Exception ex)
--
Gitblit v1.9.3