From a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 03 十一月 2025 08:23:05 +0800
Subject: [PATCH] ERP接口代码更新,WCS代码优化,出入库分配优化
---
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YLOld.cs | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 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/ConveyorLineJob_YLOld.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/ConveyorLineJob_YLOld.cs"
index 0eed068..ab8c266 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/ConveyorLineJob_YLOld.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/ConveyorLineJob_YLOld.cs"
@@ -78,7 +78,7 @@
R_ConveyorLineYLInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineYLInfo>(deviceProRead.DeviceProAddress);
if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 86 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //鑰佸巶鐢宠鍏ュ簱
{
- WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID, weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width);
+ WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID, weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width, stationCode: item.StationCode);
if (content.Status)
{
device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode);
@@ -88,6 +88,20 @@
{
WriteError(item.StationCode, $"璇锋眰閫�鏂欏け璐ワ細{content.Message}");
}
+ }else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 98 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID)) //鑰佸巶鐢宠鍑哄簱
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode && x.RfidCode == conveyorLineInfoRead.WR_TMID);
+ if (task != null)
+ {
+ //浠诲姟鍥炲
+ device.SetValue(WR_CLineYLDB.WR_Reresult, 98, item.StationCode);
+ _taskService.TaskCompleted(task.TaskNum);
+ WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}锛孯IFD{conveyorLineInfoRead.WR_TMID}鑰佸巶鎴垮畬鎴�");
+ }
+ else
+ {
+ WriteError(item.StationCode, $"{conveyorLineInfoRead.WR_TMID}瀵瑰簲RFID浠诲姟涓嶅瓨鍦�");
+ }
}
}
else
--
Gitblit v1.9.3