| | |
| | | continue; |
| | | } |
| | | |
| | | if (wrkMast.getStaNo()>300){ |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, 1); |
| | | StaProtocol staProtocolEnt = devpThread.getStation().get(212); |
| | | if (staProtocolEnt.isLoading() || staProtocolEnt.getWorkNo()!=0){ |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | // 工作档状态判断 |
| | | if (wrkMast.getIoType() < 100 || wrkMast.getSourceStaNo() == null) { |
| | | log.error("查询工作档数据不符合条件--入出类型/站点, 工作号={},源库位={},入出类型={}", wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getIoType()); |
| | | continue; |
| | | } |
| | | //退库模式跳过118、119出库任务 |
| | | if (wrkMast.getStaNo()==118 || wrkMast.getStaNo()==119){ |
| | | RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("oneSign"); |
| | | if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()==1){ |
| | | continue; |
| | | } |
| | | } |
| | | // //退库模式跳过118、119出库任务 |
| | | // if (wrkMast.getStaNo()==118 || wrkMast.getStaNo()==119){ |
| | | // RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("oneSign"); |
| | | // if (Cools.isEmpty(rgvOneSign) || rgvOneSign.getRgvOneSign()==1){ |
| | | // continue; |
| | | // } |
| | | // } |
| | | // 获取源库位信息 |
| | | LocMast sourceSta = locMastService.selectById(wrkMast.getSourceLocNo()); |
| | | if (!sourceSta.getLocSts().equals("R") && !sourceSta.getLocSts().equals("P")) { |
| | |
| | | case 3: |
| | | case 4: |
| | | signExecute = jarWrkMastExecuteGenerateJar(signExecute,sign);//硫化罐任务 |
| | | case 5: |
| | | signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线 |
| | | // case 5: |
| | | // signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线 |
| | | default: |
| | | jarWrkMastExecuteGenerateSte(signExecute,sign);//小车移动 |
| | | // jarWrkMastExecuteGenerateSte(signExecute,sign);//小车移动 |
| | | signExecute = jarWrkMastExecuteGenerateBurial(signExecute, sign);//冷却槽取输送线 |
| | | |
| | | } |
| | | if (!signExecute[0] && !signExecute[1]){ |
| | | //Ste移动 |
| | |
| | | } |
| | | //门作业 无 |
| | | //自动、空闲、右门关闭、 Other左门关闭 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0){ |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | return signExecute; |
| | | //冷却完成上输送线 |
| | | } |
| | | continue; |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage()); |
| | |
| | | return signExecute; |
| | | } |
| | | |
| | | public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) { |
| | | for (JarSlave jarSlave : slaveProperties.getJar()) { |
| | | if (jarSlave.getId()<5){ |
| | | continue; |
| | | } |
| | | try{ |
| | | if (signExecute[jarSlave.getId()-5]){ |
| | | continue; |
| | | } |
| | | if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){ |
| | | continue; |
| | | } |
| | | |
| | | // 获取硫化罐信息 |
| | | JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId()); |
| | | JarProtocol jarProtocol = jarThread.getJarProtocol(); |
| | | if (jarProtocol == null) { |
| | | continue; |
| | | } |
| | | if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | continue; |
| | | } |
| | | if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | |
| | | JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | | if (jarOtherProtocol == null) { |
| | | continue; |
| | | } |
| | | // if (jarOtherProtocol.modeType != JarModeType.AUTO){ |
| | | // continue; |
| | | // public synchronized boolean[] jarWrkMastExecuteGenerateSte(boolean[] signExecute,Integer sign) { |
| | | // for (JarSlave jarSlave : slaveProperties.getJar()) { |
| | | // if (jarSlave.getId()<5){ |
| | | // continue; |
| | | // } |
| | | // try{ |
| | | // if (signExecute[jarSlave.getId()-5]){ |
| | | // continue; |
| | | // } |
| | | // if (wrkMastExecuteService.getWrkMastExecuteByJarIdCount(jarSlave.getId())!=0){ |
| | | // continue; |
| | | // } |
| | | // |
| | | // // 获取硫化罐信息 |
| | | // JarThread jarThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getId()); |
| | | // JarProtocol jarProtocol = jarThread.getJarProtocol(); |
| | | // if (jarProtocol == null) { |
| | | // continue; |
| | | // } |
| | | // if (jarProtocol.modeType != JarModeType.AUTO){ |
| | | // continue; |
| | | // } |
| | | // if (jarProtocol.getJarTemperature()>jarTemperature){ |
| | | // log.error("{}号硫化罐查询设备温度过高,等待降温....!!!",jarProtocol.getJarNo()); |
| | | // continue; |
| | | // } |
| | | // |
| | | // JarThread jarOtherThread = (JarThread) SlaveConnection.get(SlaveType.Jar, jarSlave.getJarOtherId()); |
| | | // JarProtocol jarOtherProtocol = jarOtherThread.getJarProtocol(); |
| | | // if (jarOtherProtocol == null) { |
| | | // continue; |
| | | // } |
| | | //// if (jarOtherProtocol.modeType != JarModeType.AUTO){ |
| | | //// continue; |
| | | //// } |
| | | // |
| | | // BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | // if (Cools.isEmpty(basJar)){ |
| | | // log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | | // continue; |
| | | // } |
| | | // //门作业 无 |
| | | // //自动、空闲、右门关闭、 Other左门关闭 |
| | | // if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 |
| | | // && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | // switch (sign){ |
| | | // case 5: |
| | | // if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | // signExecute[jarSlave.getId()-5] = true; |
| | | // break; |
| | | // } |
| | | // } |
| | | |
| | | BasJar basJar = basJarMapper.selectById(jarProtocol.getJarNo()); |
| | | if (Cools.isEmpty(basJar)){ |
| | | log.error("{}号硫化罐查询设备档案无信息!!!",jarProtocol.getJarNo()); |
| | | continue; |
| | | } |
| | | //门作业 无 |
| | | //自动、空闲、右门关闭、 Other左门关闭 |
| | | if (jarProtocol.isAutoing() && jarProtocol.jarErr==0 |
| | | && jarProtocol.leftDoorOpen==0 && jarProtocol.leftDoorClose==0 && jarProtocol.rightDoorOpen==0 && jarProtocol.rightDoorClose==0){ |
| | | switch (sign){ |
| | | case 5: |
| | | if (jarWrkMastExecuteGenerate5(jarSlave,sign)){ |
| | | signExecute[jarSlave.getId()-5] = true; |
| | | break;//出硫化罐 ===》 入冷却槽 |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage()); |
| | | } |
| | | } |
| | | return signExecute; |
| | | } |
| | | // } |
| | | // } catch (Exception e){ |
| | | // log.error("{}号硫化罐JarWrkMastExecute任务创建异常,异常原因={}",jarSlave.getId(),e.getMessage()); |
| | | // } |
| | | // } |
| | | // return signExecute; |
| | | // } |
| | | |
| | | /** |
| | | * JarWrkMastExecute任务创建 //完成 |