| | |
| | | return false; |
| | | } |
| | | if (wrkMast.getStaNo() == 1031) { |
| | | //TODO |
| | | if (staProtocol.getOutInModel() != 1) { |
| | | News.info("{}任务,{}站点,没有可出信号", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | return false; |
| | | } |
| | | // if (staProtocol.getOutInModel() != 1) { |
| | | // News.info("{}任务,{}站点,没有可出信号", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | // return false; |
| | | // } |
| | | } else { |
| | | if (!isOutEnable(devpThread, wrkMast.getStaNo())) { |
| | | News.info("{}任务,{}站点,没有可出信号", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | |
| | | Map<Integer, StaProtocol> station = devpThread.getStation(); |
| | | WrkMast wrkMast = null; |
| | | for (StaProtocol staProtocol : station.values()) { |
| | | if (staProtocol.getSiteId() == 1013 || staProtocol.getSiteId() == 1024) { |
| | | if ((staProtocol.getSiteId() == 1013 || staProtocol.getSiteId() == 1024) && staProtocol.isLoading()) { |
| | | wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", staProtocol.getFinishWorkNo()).eq("wrk_sts", WrkStsType.OUTBOUND_DEVP_RUN.sts)); |
| | | if (wrkMast != null) { |
| | | wrkMast.setWrkSts(WrkStsType.COMPLETE_OUTBOUND.sts); |
| | |
| | | News.error("输送线已确认且任务完成状态,复位失败,但未找到工作档。输送线号={},完结工作号={}", staProtocol.getSiteId(), staProtocol.getFinishWorkNo()); |
| | | } |
| | | } |
| | | } else if (staProtocol.getSiteId() == 1031) { |
| | | } else if (staProtocol.getSiteId() == 1031 && staProtocol.isLoading()) { |
| | | wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", staProtocol.getFinishWorkNo()).eq("wrk_sts", WrkStsType.OUTBOUND_DEVP_RUN_2.sts)); |
| | | if (wrkMast != null) { |
| | | staProtocol.setWorkNo(Short.parseShort(String.valueOf(wrkMast.getWrkNo()))); |
| | | staProtocol.setStaNo(Short.parseShort(String.valueOf(1135))); |
| | | MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol)); |
| | | News.info("输送线入库命令下发,任务数据={}", JSON.toJSON(wrkMast)); |
| | | wrkMast.setWrkSts(WrkStsType.COMPLETE_OUTBOUND.sts); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (wrkMastService.updateById(wrkMast)) { |