*
L
2 天以前 e2a14112a81740481623dc16bbd1301432ce34b0
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);     // 目标库位列