| | |
| | | if (Cools.isEmpty(wrkMast)){ |
| | | throw new CoolException(workNo+"工作档不存在"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() == 14) { |
| | | if (wrkMast.getWrkSts() == 5 || wrkMast.getWrkSts() == 14 || wrkMast.getWrkSts() == 15) { |
| | | throw new CoolException("当前工作档已完成"); |
| | | } |
| | | // 入库 + 库位转移 |
| | | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()==11)) { |
| | | wrkMast.setWrkSts(4L); |
| | | if (wrkMast.getIoType() < 60) { |
| | | wrkMast.setWrkSts(5L); |
| | | // 出库 |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getIoType()!=202) { |
| | | } else if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 103 && wrkMast.getIoType() != 107 && wrkMast.getIoType() != 109) { |
| | | wrkMast.setWrkSts(14L); |
| | | }else if (wrkMast.getIoType()==202){ |
| | | wrkMast.setWrkSts(57L); |
| | | }else{ |
| | | throw new CoolException("当前工作类型或状态无法完成"); |
| | | } |
| | | Date now = new Date(); |
| | | wrkMast.setCrnStrTime(DateUtils.calculate(now, 1L, TimeUnit.SECONDS, true)); |
| | |
| | | String locNo = ""; // 待修改目标库位 |
| | | String locSts = ""; // 待修改目标库位状态 |
| | | // 入库取消(修改目标库位) |
| | | if (wrkMast.getWrkSts() < 4) { |
| | | if (wrkMast.getWrkSts() == 1) { |
| | | locNo = wrkMast.getLocNo(); |
| | | locSts = "O"; |
| | | |
| | |
| | | locMastService.updateById(locMast); |
| | | } |
| | | // 出库取消(修改源库位) |
| | | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14 && wrkMast.getIoType()!=202) { |
| | | } else if (wrkMast.getWrkSts() == 11) { |
| | | locNo = wrkMast.getSourceLocNo(); |
| | | // 出库 ===>> F.在库 |
| | | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { |
| | |
| | | locMast.setModiUser(userId); |
| | | locMastService.updateById(locMast); |
| | | } |
| | | } else if (wrkMast.getIoType()==202 || wrkMast.getIoType()==212){ |
| | | } else { |
| | | throw new CoolException("当前工作状态无法取消"); |
| | | } |