| | |
| | | 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; |
| | | } |
| | | } |
| | | // 命令下发区 -------------------------------------------------------------------------- |