From e2a14112a81740481623dc16bbd1301432ce34b0 Mon Sep 17 00:00:00 2001 From: L <L@132> Date: 星期三, 27 八月 2025 13:15:22 +0800 Subject: [PATCH] * --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 0462563..035451e 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -761,19 +761,25 @@ if (!taskWrks.isEmpty()) { continue; } - List<TaskWrkLog> taskWrkLogs = taskWrkLogService.selectList(new EntityWrapper<TaskWrkLog>().eq("CRN_NO",crnProtocol.getLaneNo()).orderBy("COMPLETE_TIME",true)); + List<TaskWrkLog> taskWrkLogs = taskWrkLogService.selectList(new EntityWrapper<TaskWrkLog>().eq("CRN_NO",crnProtocol.getLaneNo()).orderBy("COMPLETE_TIME",false)); if (!taskWrkLogs.isEmpty()) { - TaskWrkLog taskWrkLog = taskWrkLogs.get(0); - Date completeTime = taskWrkLog.getCompleteTime(); - if (completeTime==null){ - completeTime = taskWrkLog.getCancelTime(); + boolean signT = false; + for (TaskWrkLog taskWrkLog : taskWrkLogs){ + Date completeTime = taskWrkLog.getCompleteTime(); if (completeTime==null){ - completeTime = taskWrkLog.getModiTime(); + continue; + } + long differenceInSeconds = TimeCalculatorUtils.differenceInMilliseconds(completeTime, new Date()); + if (differenceInSeconds <= 60*2*1000) { + signT = true; + break; + } else { + signT = false; + break; } } - long differenceInSeconds = TimeCalculatorUtils.differenceInMilliseconds(completeTime, new Date()); - if (differenceInSeconds <= 60*10*1000) { - return; + if (signT){ + continue; } } // 鍛戒护涓嬪彂鍖� -------------------------------------------------------------------------- @@ -783,10 +789,10 @@ crnCommand.setTaskNo((short)999); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� crnCommand.setTaskMode(CrnTaskModeType.SITE_MOVE); // 浠诲姟妯″紡: 绔欎綅绉昏浆4 - crnCommand.setSourcePosX((short) 0); // 婧愬簱浣嶆帓 - crnCommand.setSourcePosY(crnProtocol.getBay()); // 婧愬簱浣嶅垪 - crnCommand.setSourcePosZ(crnProtocol.getLevel()); // 婧愬簱浣嶅眰 int row = crnProtocol.getLaneNo() * 2; + crnCommand.setSourcePosX((short) row); // 婧愬簱浣嶆帓 + crnCommand.setSourcePosY((short) 1); // 婧愬簱浣嶅垪 + crnCommand.setSourcePosZ((short) 1); // 婧愬簱浣嶅眰 crnCommand.setDestinationPosX((short) row); // 鐩爣搴撲綅鎺� crnCommand.setDestinationPosY((short) 1); // 鐩爣搴撲綅灞� crnCommand.setDestinationPosZ((short) 1); // 鐩爣搴撲綅鍒� -- Gitblit v1.9.1