| | |
| | | // } |
| | | public synchronized void liftInExecute() { |
| | | try { |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", WrkStsType.NEW_INBOUND.sts, WrkStsType.INBOUND_DEVICE_RUN.sts, WrkStsType.INBOUND_LIFT_RUN_COMPLETE.sts).in("source_sta_no", 1012, 1022)); |
| | | List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("wrk_sts", WrkStsType.NEW_INBOUND.sts, WrkStsType.INBOUND_DEVICE_RUN.sts, WrkStsType.INBOUND_LIFT_RUN_COMPLETE.sts).in("source_sta_no", 1012, 1022, 1031)); |
| | | for (WrkMast wrkMast : wrkMasts) { |
| | | boolean step0 = this.liftInExecuteStep0(wrkMast);//设备上走 |
| | | if (!step0) { |
| | |
| | | News.info("{}任务,{}站点,无托盘", wrkMast.getWrkNo(), staProtocol.getSiteId()); |
| | | return false; |
| | | } |
| | | |
| | | if (wrkMast.getSourceStaNo() != 1031) { |
| | | if (!staProtocol.getBarcode().equals(wrkMast.getBarcode())) { |
| | | News.info("{}任务,{}站点,托盘码不匹配,站点托盘码:{},任务托盘码:{}", wrkMast.getWrkNo(), staProtocol.getSiteId(), staProtocol.getBarcode(), wrkMast.getBarcode()); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //判断提升机是否有其他任务 |
| | | WrkMast liftWrkMast = wrkMastService.selectLiftWrkMastAndWrkNo(1, wrkMast.getWrkNo(), wrkMast.getMainWrkNo()); |
| | | if (liftWrkMast != null) { |
| | |
| | | News.error("输送线已确认且任务完成状态,复位失败,但未找到工作档。输送线号={},完结工作号={}", staProtocol.getSiteId(), staProtocol.getFinishWorkNo()); |
| | | } |
| | | } |
| | | } else if (staProtocol.getSiteId() == 1031) { |
| | | wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", staProtocol.getFinishWorkNo()).eq("wrk_sts", WrkStsType.OUTBOUND_DEVP_RUN_2.sts)); |
| | | if (wrkMast != null) { |
| | | wrkMast.setWrkSts(WrkStsType.COMPLETE_OUTBOUND.sts); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (wrkMastService.updateById(wrkMast)) { |
| | | News.info("输送线已确认且任务完成状态。输送线号={},完结工作号={}", staProtocol.getSiteId(), staProtocol.getFinishWorkNo()); |
| | | } else { |
| | | News.error("输送线已确认且任务完成状态,复位失败,但未找到工作档。输送线号={},完结工作号={}", staProtocol.getSiteId(), staProtocol.getFinishWorkNo()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | if (liftThread == null) { |
| | | return; |
| | | } |
| | | |
| | | //liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, wrkMast1.getLiftNo()); |
| | | String liftLocNo = liftThread.getLiftLocNo(Utils.getLev(wrkMast.getLocNo())); |
| | | if (Utils.getRow(liftLocNo) == Utils.getRow(wrkMast.getSourceLocNo()) && Utils.getBay(liftLocNo) == Utils.getBay(wrkMast.getSourceLocNo())) { |
| | | //取货位置是提升机 |