| | |
| | | } |
| | | |
| | | Integer turnBigInt = 0; |
| | | if (wrkMast.booleanStaNoSign() && wrkMast.getIoPri()<99D){ |
| | | Date now = new Date(); |
| | | long differenceInSeconds = now.getTime() - wrkMast.getModiTime().getTime(); |
| | | if (differenceInSeconds<=2000){ |
| | | continue; |
| | | } |
| | | } |
| | | // if (wrkMast.booleanStaNoSign()){ |
| | | // RgvOneSign rgvOneSign = rgvOneSignMapper.selectOneSign("LineUp"+wrkMast.getStaNo()); |
| | | // if (Cools.isEmpty(rgvOneSign)){ |
| | |
| | | if (basJarMastList.isEmpty()){ |
| | | return false; |
| | | } |
| | | |
| | | StaProtocol staProtocolEnd = new StaProtocol(); |
| | | staProtocolEnd.setAutoing(false); |
| | | for (DevpSlave devp : slaveProperties.getDevp()) { |
| | | if (devp.getId() == 1){ |
| | | continue; |
| | | } |
| | | // 遍历入库口 |
| | | for (DevpSlave.Sta inSta : devp.getOutJarInSta()) { |
| | | if (jarSlave.getId() == 1 || jarSlave.getId() == 2){ |
| | | if (inSta.getStaNo() == 627){ |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | break; |
| | | } |
| | | staProtocolEnd = staProtocol; |
| | | break; |
| | | } |
| | | } else if (jarSlave.getId() == 3 || jarSlave.getId() == 4){ |
| | | if (inSta.getStaNo() == 628){ |
| | | SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo()); |
| | | if (staProtocol == null) { |
| | | break; |
| | | } |
| | | staProtocolEnd = staProtocol; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (!staProtocolEnd.isAutoing() || staProtocolEnd.isLoading()){ |
| | | return false; |
| | | } |
| | | List<BasJarMast> basJarMastList10 = basJarMastService.getJarMastByJarIdAndStatusList(jarSlave.getId(), new ArrayList<Integer>() {{ |
| | | add(10); |
| | | }}); |
| | |
| | | log.error("硫化罐Jar命令下发失败,jar号={},任务数据={},硫化罐数据={},sign={}", |
| | | execute.getJarId(), JSON.toJSON(execute), JSON.toJSON(jarProtocol),sign); |
| | | } |
| | | return true; |
| | | continue; |
| | | } |
| | | for (WrkMastExecute wrkMastExecute : wrkMastExecuteList){ |
| | | if (wrkMastExecute.getIoType() == 2 || wrkMastExecute.getIoType() == 4){ |
| | |
| | | wrkMastExecute.getSteId(), JSON.toJSON(wrkMastExecute), JSON.toJSON(jarProtocol),sign); |
| | | return false; |
| | | } |
| | | return true; |
| | | continue; |
| | | } |
| | | } |
| | | } |