| | |
| | | |
| | | WrkMast selectOfPick(@Param("wrkNo") Integer wrkNo, @Param("ioType") Integer ioType); |
| | | |
| | | WrkMast selectPakoutOfStaNo(@Param("staNo")Integer staNo); |
| | | |
| | | } |
| | |
| | | Boolean setSteEmpty(Integer wrkNo); |
| | | |
| | | WrkMast selectOfPick(Integer wrkNo, Integer ioType); |
| | | |
| | | WrkMast selectPakoutOfStaNo(Integer staNo); |
| | | |
| | | } |
| | |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getMemo()); |
| | | |
| | | if (Cools.isEmpty(detlDto.getBatch())){ |
| | | String batch = DateUtils.convert(new Date(),DateUtils.yyyyMMdd); |
| | | detlDto.setBatch(batch); |
| | | } |
| | | |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | | assert one != null; |
| | |
| | | return this.baseMapper.selectOfPick(wrkNo, ioType); |
| | | } |
| | | |
| | | @Override |
| | | public WrkMast selectPakoutOfStaNo(Integer staNo) { |
| | | return this.baseMapper.selectPakoutOfStaNo(staNo); |
| | | } |
| | | |
| | | } |
| | |
| | | StartupDto startupDto = new StartupDto(); |
| | | int start; |
| | | int end; |
| | | Integer theCrnNo = null; |
| | | switch (sourceStaNo) { |
| | | case 103: |
| | | whsType = 1; |
| | | start = 1; |
| | | end = 14; |
| | | if (null != wrkMastService.selectPakoutOfStaNo(104)) { |
| | | start = 8; |
| | | theCrnNo = 2; |
| | | } |
| | | break; |
| | | case 203: |
| | | whsType = 2; |
| | | start = 8; |
| | | end = 21; |
| | | if (null != wrkMastService.selectPakoutOfStaNo(204)) { |
| | | end = 14; |
| | | theCrnNo = 2; |
| | | } |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | |
| | | switch (curRow) { |
| | | case 1: |
| | | curRow = 1; |
| | | if (null != theCrnNo) { |
| | | curRow = 8; |
| | | } |
| | | break; |
| | | case 2: |
| | | curRow = 7; |
| | | if (null != theCrnNo) { |
| | | curRow = 14; |
| | | } |
| | | break; |
| | | case 3: |
| | | curRow = 8; |
| | |
| | | break; |
| | | case 3: |
| | | curRow = 15; |
| | | if (null != theCrnNo) { |
| | | curRow = 8; |
| | | } |
| | | break; |
| | | case 4: |
| | | curRow = 21; |
| | | if (null != theCrnNo) { |
| | | curRow = 14; |
| | | } |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | |
| | | select top 1 * from asr_wrk_mast where wrk_no=#{wrkNo} and wrk_sts=17 and io_type = #{ioType} |
| | | </select> |
| | | |
| | | <select id="selectPakoutOfStaNo" resultMap="BaseResultMap"> |
| | | select top 1 * from asr_wrk_mast where 1=1 |
| | | and crn_no = 2 |
| | | and wrk_sts in (11,12,13,14,15,16,17) |
| | | and source_sta_no = #{staNo} |
| | | and io_type in (101.103,104,107,110) |
| | | union |
| | | select top 1 * from asr_wrk_mast where 1=1 |
| | | and wrk_sts in (17,18) |
| | | and io_type in (101.103,104,107,110) |
| | | and wrk_no in ( |
| | | select wrk_no from asr_bas_devp where 1=1 and dev_no = #{staNo} |
| | | ) |
| | | </select> |
| | | |
| | | </mapper> |