From 6e7f192546903b04d2d37e852dd9b248e938c790 Mon Sep 17 00:00:00 2001 From: z8018 <1282578289@qq.com> Date: 星期五, 01 八月 2025 09:23:17 +0800 Subject: [PATCH] 1 --- 项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Gantry/GantryJob.cs | 35 ++++++++++++++++++++++++++++------- 1 files changed, 28 insertions(+), 7 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Gantry/GantryJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Gantry/GantryJob.cs" index bb389c8..2e6313a 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Gantry/GantryJob.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Gantry/GantryJob.cs" @@ -233,6 +233,13 @@ int putPoZ = OPositions.HPositions[putPositions[0]].PositionZ - Convert.ToInt32(putPositions[3]) * 1000; int putPoR = 0; + + int oriTakePoX = takePoX; + int oriTakePoY = takePoY; + int oriTakePoZ = takePoZ; + int oriPutPoX = putPoX; + int oriPutPoY = putPoY; + int oriPutPoZ = putPoZ; #endregion #region 鍧愭爣涔樹互1000澶勭悊,2#榫欓棬鏋跺彇鍙�(涔樹互-1000) @@ -299,6 +306,11 @@ { putPoX = putPoX - (orderContainer.MaxWidth - container.ContainerWidth) / 2 * temp; } + + if (putPositions[0] == "C016" && containerItem.ItemWidth > 600) + { + putPoX = putPoX - (container.ContainerWidth - 600) / 2 * temp; + } #endregion #region 鍧愭爣鑼冨洿鍒ゆ柇 @@ -348,17 +360,26 @@ if (putPoX < minX || putPoX > maxX) { - WriteError($"{otherDevice.DeviceCode}-{otherDevice.DeviceName}-鍧愭爣", $"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}"); - if (task.ExceptionMessage?.Contains($"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}") ?? true) + if (putPoX < minX) { - task.ExceptionMessage = $"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}"; - _taskRepository.UpdateData(task); + int tempX = minX - putPoX; + takePoX -= tempX; + putPoX = minX; } - if (LightStatusStorage.LightStatusDic.ContainsKey(putPositions[0])) + if (takePoX < minX || takePoX > maxX) { - LightStatusStorage.LightStatusDic[putPositions[0]] = LightStatusEnum.LightError; + WriteError($"{otherDevice.DeviceCode}-{otherDevice.DeviceName}-鍧愭爣", $"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}"); + if (task.ExceptionMessage?.Contains($"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}") ?? true) + { + task.ExceptionMessage = $"X鏀捐揣鍧愭爣瓒呭嚭鑼冨洿,鍙栬揣鍧愭爣锛歿putPoX},鏈�澶у�硷細{maxX},鏈�灏忓�硷細{minX}"; + _taskRepository.UpdateData(task); + } + if (LightStatusStorage.LightStatusDic.ContainsKey(putPositions[0])) + { + LightStatusStorage.LightStatusDic[putPositions[0]] = LightStatusEnum.LightError; + } + return Task.CompletedTask; } - return Task.CompletedTask; } if (takePoY < minY || takePoY > maxY) -- Gitblit v1.9.3