|  |  |  | 
|---|
|  |  |  | if (Cools.isEmpty(wrkMast)) { | 
|---|
|  |  |  | throw new CoolException(workNo + "工作档不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (wrkMast.getWrkSts() == 4 || wrkMast.getWrkSts() >= 14) { | 
|---|
|  |  |  | if (wrkMast.getWrkSts() == 4 || (wrkMast.getWrkSts() >= 14 && wrkMast.getWrkSts() <= 15)) { | 
|---|
|  |  |  | throw new CoolException("当前工作档已完成"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 入库 + 库位转移 | 
|---|
|  |  |  | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts() > 10 && wrkMast.getIoType() == 11)) { | 
|---|
|  |  |  | wrkMast.setWrkSts(4L); | 
|---|
|  |  |  | // 出库 | 
|---|
|  |  |  | } else if (wrkMast.getWrkSts() > 10) { | 
|---|
|  |  |  | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() < 15) { | 
|---|
|  |  |  | wrkMast.setWrkSts(14L); | 
|---|
|  |  |  | }else if(wrkMast.getWrkSts() >= 103 && wrkMast.getWrkSts() <= 105){ | 
|---|
|  |  |  | wrkMast.setWrkSts(4L); | 
|---|
|  |  |  | }else if (wrkMast.getWrkSts() >= 106 && wrkMast.getWrkSts() <=108){ | 
|---|
|  |  |  | wrkMast.setWrkSts(14L); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Date now = new Date(); | 
|---|
|  |  |  | 
|---|
|  |  |  | String locNo = ""; // 待修改目标库位 | 
|---|
|  |  |  | String locSts = ""; // 待修改目标库位状态 | 
|---|
|  |  |  | // 入库取消(修改目标库位) | 
|---|
|  |  |  | if (wrkMast.getWrkSts() < 4) { | 
|---|
|  |  |  | if (wrkMast.getWrkSts() < 4 || (wrkMast.getWrkSts()>= 103 && wrkMast.getWrkSts() <= 105)) { | 
|---|
|  |  |  | locNo = wrkMast.getLocNo(); | 
|---|
|  |  |  | locSts = "O"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | locMastService.updateById(locMast); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 出库取消(修改源库位) | 
|---|
|  |  |  | } else if (wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14) { | 
|---|
|  |  |  | } else if ((wrkMast.getWrkSts() > 10 && wrkMast.getWrkSts() != 14)) { | 
|---|
|  |  |  | locNo = wrkMast.getSourceLocNo(); | 
|---|
|  |  |  | // 出库 ===>> F.在库 | 
|---|
|  |  |  | if (wrkMast.getIoType() > 100 && wrkMast.getIoType() != 110) { | 
|---|