From b513ce3a4527e998da66c6f179a279472c7262a8 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 18 十一月 2025 10:59:46 +0800
Subject: [PATCH] 代码更新优化
---
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/原料库/ConveyorLineJob_YL1ndFloor.cs | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 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_YL1ndFloor.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_YL1ndFloor.cs"
index 682007c..feb8c6f 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_YL1ndFloor.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_YL1ndFloor.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);
+ WebResponseContent content = _taskService.YLPurchaseBoxing(conveyorLineInfoRead.WR_TMID, weight: conveyorLineInfoRead.WR_Weight, thickness: conveyorLineInfoRead.WR_Height, wide: conveyorLineInfoRead.WR_Width);
if (content.Status)
{
device.SetValue(WR_CLineYLDB.WR_Reresult, 86, item.StationCode);
@@ -173,9 +173,9 @@
}
}
- else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 99 && conveyorLineInfoRead.WR_Task <= 0) //鍑虹珯鍙板垎閰嶇洰鏍囩偣
+ else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt() && conveyorLineInfoRead.WR_ToHode <= 0 && conveyorLineInfoRead.WR_Request == 99 && conveyorLineInfoRead.WR_Task > 0) //鍑虹珯鍙板垎閰嶇洰鏍囩偣
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode);
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.TaskNum == conveyorLineInfoRead.WR_Task && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt() && x.DeviceCode == device.DeviceCode);
if (task != null)
{
//鍙戦�佺洰鏍囩偣
@@ -201,8 +201,19 @@
{
//浠诲姟鍥炲
device.SetValue(WR_CLineYLDB.WR_Reresult, 98, item.StationCode);
- _taskService.TaskCompleted(task.TaskNum);
- WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}涓�妤煎嚭搴撹嚦鑰佸巶鎴垮畬鎴�");
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: "CL3_YL");
+ WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}锛孯IFD{task.RfidCode}涓�妤煎嚭搴撹嚦鑰佸巶鎴垮畬鎴�");
+ }
+ }
+ else if (conveyorLineInfoRead != null && item.StationType == StationTypeEnum.StationType_InboundAndOutbound.ObjToInt() && conveyorLineInfoRead.WR_Task <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.WR_TMID) && conveyorLineInfoRead.WR_Request == 98) //涓�妤艰�佸巶鍑哄簱鍙e畬鎴�
+ {
+ Dt_Task task = _taskRepository.QueryFirst(x => (x.RfidCode == conveyorLineInfoRead.WR_TMID || x.PalletCode== conveyorLineInfoRead.WR_TMID) && _taskService.TaskOutboundTypes.Contains(x.TaskType) && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && x.DeviceCode == device.DeviceCode);
+ if (task != null)
+ {
+ //浠诲姟鍥炲
+ device.SetValue(WR_CLineYLDB.WR_Reresult, 98, item.StationCode);
+ _taskService.UpdateTask(task, TaskStatusEnum.Line_Executing, deviceCode: "CL3_YL");
+ WriteInfo(item.StationCode, $"浠诲姟鍙�:{task.TaskNum}锛孯IFD{task.RfidCode}涓�妤煎嚭搴撹嚦鑰佸巶鎴垮畬鎴�");
}
}
}
--
Gitblit v1.9.3