#
lsh
2024-06-27 68fb189711d7907a29ef85ac07d5fd14fdb761c9
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -5840,7 +5840,8 @@
                return false;
            }
            if (staProtocolRGV.rgvBoolean(2) && staProtocolRGVOther.rgvBoolean(1)){
//            if (staProtocolRGV.rgvBoolean(2) && staProtocolRGVOther.rgvBoolean(1)){
            if (staProtocolRGV.rgvBoolean(2)){
                if (staProtocolRGV.getNowRow() != staProtocolRGVOther.getNowRow()){
                    //移走  == > 2
                    if (!jarRgvMoveTake(wrkMastExecute,2)){
@@ -6638,11 +6639,15 @@
    public synchronized boolean jarSteTake(WrkMastExecute wrkMastExecute,Integer startLoad,Integer endLoad,SteTaskModeType steTaskModeType,boolean complete){
        try {
            SteCommand steCommand = new SteCommand();
            steCommand.setTaskNo(wrkMastExecute.getWrkNo().intValue());
            steCommand.setSteNo(wrkMastExecute.getSteId());
            steCommand.setStartLoad(startLoad);
            steCommand.setEndLoad(endLoad);
            steCommand.setTaskModeType(steTaskModeType);
            steCommand.setComplete(complete);
            if (!complete){
                steCommand.setTaskMode(steTaskModeType.id.shortValue());
            }
            steCommand.setJarNo(wrkMastExecute.getJarId().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);
@@ -6727,9 +6732,9 @@
                    continue;
                }
                if (steProtocol.getMode()==(short)1 && steProtocol.taskNo!=0 && steProtocol.getChargeStatus()==0){
                    if (steProtocol.statusType.equals(SteStatusType.WAITING)){
                    }
//                    if (steProtocol.statusType.equals(SteStatusType.WAITING)){
//
//                    }
                    WrkMastExecute wrkMastExecute = wrkMastExecuteService.getWrkMastExecuteByWrkNo(steProtocol.getTaskNo().longValue());
                    if (!Cools.isEmpty(wrkMastExecute)){
                        switch (wrkMastExecute.getIoType()){
@@ -6756,24 +6761,19 @@
                                if (wrkMastExecute.getWrkSts()==5){
                                    //1:RGV小车移动、2:RGV小车到位、3:rgv取货、4:rgv取货完成、5:Ste穿梭版入硫化罐、6:入罐完成、7:更新完成   //io_type = 5
                                    //ste任务完成
                                    if (wrkMastExecute.getWrkSts()==3){//==>4
                                        //1:RGV小车移动、2:RGV小车到位、3:Ste穿梭版取货、4:取货完成等待下一步、5:Ste穿梭版放货至冷却池、6:放货完成、7:更新完成   //io_type = 6
                                        //ste任务等待完成
                                        if (steProtocol.statusType.equals(SteStatusType.WAITING)){
                                            //ste任务完成
                                            if (jarSteTake(wrkMastExecute,null,null,null,true)){
                                                wrkMastExecute.setWrkSts(6);
                                                if (!wrkMastExecuteService.updateById(wrkMastExecute)){
                                                    log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                            wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                                }
                                                return true;
                                    if (steProtocol.statusType.equals(SteStatusType.WAITING)){
                                        //ste任务完成
                                        if (jarSteTake(wrkMastExecute,null,null,null,true)){
                                            wrkMastExecute.setWrkSts(6);
                                            if (!wrkMastExecuteService.updateById(wrkMastExecute)){
                                                log.error("穿梭车Ste命令下发失败===>更新wrkMastExecute失败,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                        wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                            }
                                            return true;
                                        }
                                        log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                                wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                        return true;
                                    }
                                    log.error("穿梭车Ste命令下发失败===>下发异常,jar号={},任务数据={},穿梭车数据={},sign={}",
                                            wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(steProtocol),sign);
                                    return true;
                                }
                                return false;