自动化立体仓库 - WCS系统
#
yxFwq
2025-01-05 d230b18c3b832228bf3f149b3881a63eb941a41d
#
1个文件已修改
55 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -5159,16 +5159,23 @@
                                break;
                            }
                            int count = basJarMastService.selectCount(new EntityWrapper<BasJarMast>().eq("jar_regin", basJar.getRegion()).lt("status", 17).gt("status", 5));
                            if (count>0){
                                break;
                            }
                            if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){
                                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(basJarOther.getJarCount())){
                                    JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
                                    JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
                                    if (jarOtherProtocol == null) {
                                        break;
                                    }
                            if (count>0){
                                if (jarOtherProtocol.getJarTemperature()<jarTemperature){
                                    break;
                                }
                            }
                            if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(),3)!=0){
                                if (basJarMastService.selectJarMastOperation(jarSlave.getJarOtherId(), 3).equals(basJarOther.getJarCount())){
//                                    JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId());
//                                    JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol();
//                                    if (jarOtherProtocol == null) {
//                                        break;
//                                    }
                                    if (jarOtherProtocol.getJarTemperature()>jarTemperature){
                                        log.info("{}号硫化罐查询设备温度过高,等待降温....先执行入罐任务!!!",jarOtherProtocol.getJarNo());
                                    } else {
@@ -5427,6 +5434,11 @@
                                signExecute[i] = true;
                                break;//开门任务   生成入硫化罐任务
                            }
                        case 3:
                            if (jarWrkMastExecuteGenerate3(jarSlave,sign)){
                                signExecute[i] = true;
                                break;//开出料门
                            }
                        case 2:
                            if (jarProtocol.getJarTemperature()>jarTemperature){
                                log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo());
@@ -5435,11 +5447,6 @@
                            if (jarWrkMastExecuteGenerate2(jarSlave,sign)){
                                signExecute[i] = true;
                                break;//关进料门
                            }
                        case 3:
                            if (jarWrkMastExecuteGenerate3(jarSlave,sign)){
                                signExecute[i] = true;
                                break;//开出料门
                            }
                        case 4:
                            if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -7823,8 +7830,10 @@
            // 下发站点信息
            if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(9, staProtocol))) {
                log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol));
                Thread.sleep(500);
                return false;
            }
            Thread.sleep(500);
            return true;
        }catch (Exception e){
            log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},endRow={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(endRow));
@@ -7844,8 +7853,10 @@
            // 下发站点信息
            if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(10, staProtocol))) {
                log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol));
                Thread.sleep(500);
                return false;
            }
            Thread.sleep(500);
            return true;
        }catch (Exception e){
            log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},RGV4={},RGV5={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV4), JSON.toJSON(RGV5));
@@ -7864,8 +7875,10 @@
            // 下发站点信息
            if (!MessageQueue.offer(SlaveType.Devp, 2, new Task(11, staProtocol))) {
                log.error("平衡车Rgv命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getRgvId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(staProtocol));
                Thread.sleep(500);
                return false;
            }
            Thread.sleep(500);
            return true;
        }catch (Exception e){
            log.error("平衡车Rgv命令下发失败,Rgv号={},任务数据={},RGV6={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(RGV6));
@@ -7891,8 +7904,10 @@
            steCommand.setJarNo(siteId.shortValue());
            if (!MessageQueue.offer(SlaveType.Ste, steCommand.getSteNo(), new Task(2, steCommand))) {
                log.error("穿梭车Ste命令下发失败,堆垛机号={},任务数据={},下发数据={},complete={}", steCommand.getSteNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steCommand),complete);
                Thread.sleep(500);
                return false;
            }
            Thread.sleep(500);
            return true;
        }catch (Exception e){
            log.error("穿梭车Ste命令下发失败,堆垛机号={},任务数据={},complete={}", wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(complete));
@@ -7910,8 +7925,10 @@
            jarCommand.setTaskModeType(jarTaskModeType);
            if (!MessageQueue.offer(SlaveType.Jar, jarCommand.getJarNo(), new Task(2, jarCommand))) {
                log.error("硫化罐Jar命令下发失败,堆垛机号={},任务数据={},下发数据={}", jarCommand.getJarNo(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarCommand));
                Thread.sleep(500);
                return false;
            }
            Thread.sleep(500);
            return true;
        }catch (Exception e){
            log.error("硫化罐Jar命令下发失败,堆垛机号={},任务数据={},下发数据={}", wrkMastExecute.getJarId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarTaskModeType));
@@ -8627,7 +8644,11 @@
                            if (jarProtocol.modeType != JarModeType.AUTO){
                                continue;
                            }
                            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                            if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)
                                    || jarProtocol.statusType .equals(JarStatusType.WAITING3)
                                    || jarProtocol.statusType .equals(JarStatusType.WAITING4)
                                    || jarProtocol.statusType .equals(JarStatusType.WAITING5)
                                    || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){
                                continue;
                            }
                            if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -8718,7 +8739,11 @@
                                        if (jarProtocol.modeType != JarModeType.AUTO){
                                            continue;
                                        }
                                        if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                                        if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)
                                                || jarProtocol.statusType .equals(JarStatusType.WAITING3)
                                                || jarProtocol.statusType .equals(JarStatusType.WAITING4)
                                                || jarProtocol.statusType .equals(JarStatusType.WAITING5)
                                                || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){
                                            continue;
                                        }
                                        if (jarProtocol.getJarTemperature()>jarTemperature){
@@ -8938,7 +8963,11 @@
                if (jarProtocol.modeType != JarModeType.AUTO){
                    continue;
                }
                if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)){
                if (jarProtocol.statusType .equals(JarStatusType.SOS) || jarProtocol.statusType .equals(JarStatusType.SOS2)
                        || jarProtocol.statusType .equals(JarStatusType.WAITING3)
                        || jarProtocol.statusType .equals(JarStatusType.WAITING4)
                        || jarProtocol.statusType .equals(JarStatusType.WAITING5)
                        || jarProtocol.statusType .equals(JarStatusType.OFF_LINE)){
                    continue;
                }
                if (jarProtocol.getJarTemperature()>jarTemperature){