| | |
| | | |
| | | @Resource |
| | | private BasAgvWrkDetlService basAgvWrkDetlService; |
| | | private OpenService openService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | @Transactional |
| | | public void completeWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | Integer ioType = 0; |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | } |
| | |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | if(wrkMast.getIoType() == 11){ |
| | | ioType = 2; |
| | | }else{ |
| | | ioType = 3; |
| | | } |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | wrkMast.setWrkSts(14L); |
| | | ioType = 1; |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |