#
lsh
2 天以前 ca76cf86a1a73e5663614eccd41a8ae4e82196eb
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;
                            }
                        }
                        // 命令下发区 --------------------------------------------------------------------------
@@ -809,7 +815,7 @@
                    }
                }
            } catch (Exception e){
                log.error("堆垛机5分钟无任务则回到源点失败");
                log.error("堆垛机10分钟无任务则回到源点失败");
            }
        }
    }