| | |
| | | // @Select("select top 1 from dbo.asr_wrk_mast where wrk_no=#{workNo}") |
| | | WrkMast selectPakInStep7(@Param("workNo")Integer workNo); |
| | | |
| | | WrkMast selectPakInStep56(@Param("workNo")Integer workNo); |
| | | WrkMast selectPakInStep45(@Param("workNo")Integer workNo); |
| | | |
| | | // 拣料再入库时,站点有物且需求时查询 |
| | | // @Select("select top 1 * from asr_wrk_mast where wrk_no=#{workNo} and wrk_sts=14 and (io_type=103 or io_type=107 or io_type=104)") |
| | |
| | | // 状态:等待确认 并且 任务完成位 = 1 |
| | | if (crnProtocol.statusType == CrnStatusType.WAITING && crnProtocol.getTaskNo() != 0) { |
| | | // 获取入库待确认工作档 |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep56(crnProtocol.getTaskNo().intValue()); |
| | | WrkMast wrkMast = wrkMastMapper.selectPakInStep45(crnProtocol.getTaskNo().intValue()); |
| | | if (wrkMast == null) { |
| | | log.error("堆垛机处于等待确认且任务完成状态,但未找到工作档。堆垛机号={},工作号={}", crn.getId(), crnProtocol.getTaskNo()); |
| | | continue; |
| | | } |
| | | // 入库 + 库位转移 ==> 4.入库完成 |
| | | if ((wrkMast.getWrkSts() == 5 || wrkMast.getWrkSts() == 6) || (wrkMast.getWrkSts() == 12 && wrkMast.getIoType() == 11)){ |
| | | wrkMast.setWrkSts(9L); |
| | | // 入库 + 库位转移 ==> 6.小车待入 |
| | | if ((wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 5) || (wrkMast.getWrkSts() == 12 && wrkMast.getIoType() == 11)){ |
| | | wrkMast.setWrkSts(6L); |
| | | } else { |
| | | continue; |
| | | } |
| | |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_sts in (2,3,4,5,6) and crn_no=#{crnNo} and wrk_no=#{workNo} and sta_no=#{staNo} and (io_type=1 or io_type=10 or io_type=53 or io_type=54 or io_type=57) order by io_pri desc,io_time,wrk_no ASC |
| | | </select> |
| | | |
| | | <select id="selectPakInStep56" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo} and wrk_sts in (5,6) |
| | | <select id="selectPakInStep45" resultMap="BaseResultMap"> |
| | | select top 1 * from dbo.asr_wrk_mast where wrk_no=#{workNo} and wrk_sts in (4,5) |
| | | </select> |
| | | |
| | | <select id="selectPakInStep7" resultMap="BaseResultMap"> |