| | |
| | | } |
| | | |
| | | // 更新工作档状态为14失败 |
| | | if (crnStn.getStaNo() == 1035) { |
| | | if (wrkMast.getStaNo() == 1135) { |
| | | wrkMast.setWrkSts(107L); |
| | | } else { |
| | | wrkMast.setWrkSts(14L); |
| | |
| | | */ |
| | | public synchronized void toSxk(Integer mark) { |
| | | |
| | | for (CrnSlave crnSlave : slaveProperties.getCrn()) { |
| | | for (DevpSlave devpSlave : slaveProperties.getDevp()) { |
| | | // 遍历堆垛机出库站 |
| | | for (CrnSlave.CrnStn crnStn : crnSlave.getCrnOutStn()) { |
| | | if (crnStn.getStaNo() != 1035) { |
| | | for (DevpSlave.Sta crnStn : devpSlave.getOutSta()) { |
| | | if (crnStn.getStaNo() != 1135) { |
| | | continue; |
| | | } |
| | | // 获取堆垛机出库站信息 |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, crnStn.getDevpPlcId()); |
| | | DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devpSlave.getId()); |
| | | StaProtocol staProtocol = devpThread.getStation().get(crnStn.getStaNo()); |
| | | if (staProtocol == null) { |
| | | continue; |
| | |
| | | // 下发站点信息 |
| | | staProtocol.setWorkNo(wrkMast.getWrkNo().shortValue()); |
| | | staProtocol.setStaNo(RouteUtils.CrnStaEnd(1031, 1135)); |
| | | if (!MessageQueue.offer(SlaveType.Devp, crnStn.getDevpPlcId(), new Task(2, staProtocol))) { |
| | | if (!MessageQueue.offer(SlaveType.Devp, devpSlave.getId(), new Task(2, staProtocol))) { |
| | | log.info(staProtocol.getWorkNo() + "," + staProtocol.getStaNo() + "输送线出库命令下发失败222"); |
| | | continue; |
| | | } else { |
| | |
| | | |
| | | // 出库 ===>> 堆垛机出库站到出库站 |
| | | mainService.crnStnToOutStn(4); |
| | | mainService. toSxk(107); |
| | | // 入出库 ===>> 堆垛机入出库作业下发 |
| | | mainService.crnIoExecute(5); |
| | | // 入出库增强 ===>> 堆垛机命令下发后,异步修改工作档状态 |
| | |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(1112);add(1114);add(1122);add(1124);add(1131); |
| | | add(1112);add(1114);add(1122);add(1124);add(1131);add(1135); |
| | | |
| | | }}; |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectPakOutStep3" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where source_sta_no=#{sourceStaNo} and wrk_sts=107 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | select top 1 * from dbo.asr_wrk_mast where sta_no=#{sourceStaNo} and wrk_sts=107 and io_type>100 order by io_pri desc,io_time desc,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectLocMove" resultMap="BaseResultMap"> |