| | |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 9 || wrkMast.getWrkSts() == 17) { |
| | | if (wrkMast.getWrkSts() == 9 || wrkMast.getWrkSts() == 29) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 9 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | wrkMast.setWrkSts(9L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | wrkMast.setWrkSts(17L); |
| | | } else if (wrkMast.getWrkSts() > 20) { |
| | | wrkMast.setWrkSts(29L); |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |
| | |
| | | locMastService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 19) { |
| | | } else if (wrkMast.getWrkSts() > 20) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |