| | |
| | | } |
| | | |
| | | // 更新工作档状态为14失败 |
| | | if(crnStn.getStaNo()==1035){ |
| | | if (wrkMast.getStaNo() == 1135) { |
| | | wrkMast.setWrkSts(107L); |
| | | }else { |
| | | } else { |
| | | wrkMast.setWrkSts(14L); |
| | | } |
| | | wrkMast.setCrnEndTime(new Date()); |
| | |
| | | } |
| | | } |
| | | // News.infoNoLog(""+mark+" - 0"+" - 堆垛机站出库到出库站 ===》执行完成"); |
| | | } |
| | | |
| | | /** |
| | | * 堆垛库到四向库 |
| | | */ |
| | | public synchronized void toSxk(Integer mark) { |
| | | |
| | | for (DevpSlave devpSlave : slaveProperties.getDevp()) { |
| | | // 遍历堆垛机出库站 |
| | | for (DevpSlave.Sta crnStn : devpSlave.getOutSta()) { |
| | | if (crnStn.getStaNo() != 1135) { |
| | | continue; |
| | | } |
| | | // 获取堆垛机出库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devpSlave.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | | } else { |
| | | staProtocol = staProtocol.clone(); |
| | | } |
| | | if (staProtocol.isAutoing() && staProtocol.isLoading() && (staProtocol.getWorkNo() == 0 || staProtocol.getStaNo() == null)) { |
| | | // 查询工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakOutStep3(staProtocol.getSiteId()); |
| | | if (wrkMast == null) { |
| | | continue; |
| | | } |
| | | // 判断工作档条件 |
| | | if (wrkMast.getIoType() < 100 || wrkMast.getStaNo() == null || wrkMast.getSourceStaNo() == null) { |
| | | continue; |
| | | } |
| | | |
| | | // 下发站点信息 |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(RouteUtils.CrnStaEnd(1031, 1135)); |
| | | if (!MessageQueue.offer(SlaveType.Devp, devpSlave.getId(), new Task(2, staProtocol))) { |
| | | log.info(staProtocol.getWorkNo() + "," + staProtocol.getStaNo() + "输送线出库命令下发失败222"); |
| | | continue; |
| | | } else { |
| | | log.info(staProtocol.getWorkNo() + "," + staProtocol.getStaNo() + "输送线出库命令下发成功222"); |
| | | } |
| | | |
| | | // 更新工作档状态为14失败 |
| | | wrkMast.setWrkSts(108L); |
| | | wrkMast.setCrnEndTime(new Date()); |
| | | if (wrkMastMapper.updateById(wrkMast) != 0) { |
| | | log.error("转移至1031,工作号={}", wrkMast.getWrkNo()); |
| | | } else { |
| | | News.error("" + mark + " - 1" + " - 更新工作档的工作状态为107失败!!! [工作号:{}]", wrkMast.getWrkNo()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y") |
| | | ) { |
| | | if (slave.getId() == 1 || slave.getId() == 2) { |
| | | if (staProtocol.isLoading() || staProtocol.getWorkNo() != 0 ) { |
| | | if (staProtocol.isLoading() || staProtocol.getWorkNo() != 0) { |
| | | //if (staProtocol.isLoading() || staProtocol.getWorkNo() != 0 || !staProtocol.isOutEnable()) { |
| | | continue; |
| | | continue; |
| | | } |
| | | } |
| | | // 命令下发区 -------------------------------------------------------------------------- |