| | |
| | | sourceLoc.setLocSts("O"); |
| | | sourceLoc.setModiTime(now); |
| | | sourceLoc.setIoTime(now); |
| | | sourceLoc.setFireStatus(0); |
| | | sourceLoc.setPackStatus(0); |
| | | if (!locMastService.updateById(sourceLoc)) { |
| | | // exceptionHandle("库位移转 ===>> 修改源库位状态失败;[workNo={0}],[sourceLoc={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | |
| | | locMast.setBarcode(wrkMast.getBarcode()); |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | locMast.setFireStatus(0); |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | |
| | | |
| | | boolean sign =false; |
| | | if (locMast.getLocType1().equals(sourceLoc.getLocType1())){ |
| | | locMast.setPackStatus(packStatus); |
| | | |
| | | //待测库位转测试库位 |
| | | }else if (locMast.getLocType1().equals((short)1) && sourceLoc.getLocType1().equals((short)3)){ |
| | | locMast.setPackStatus(1); |
| | | TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>() |
| | | .eq("loc_no",sourceLoc.getLocNo()) |
| | | .eq("user_id",locMast.getBarcode()) |
| | | .eq("barcode",locDetl.getMatnr()) |
| | | ); |
| | | if(!Cools.isEmpty(testMast)){ |
| | | testMast.setChannel(locMast.getChannel()); |
| | | testMast.setLocNo(wrkMast.getLocNo()); |
| | | testMast.setModiTime(new Date()); |
| | | if (!testMastService.update(testMast,new EntityWrapper<TestMast>() |
| | | .eq("loc_no",sourceLoc.getLocNo()) |
| | | .eq("user_id",locMast.getBarcode()) |
| | | .eq("barcode",locDetl.getMatnr()))){ |
| | | throw new CoolException("更改测试状态失败"); |
| | | } |
| | | }else { |
| | | throw new CoolException("待测库位无物"); |
| | | } |
| | | |
| | | }else { |
| | | //测试库位转静置库位 |
| | | if (locMast.getLocType1().equals((short)4)){ |
| | | locMast.setPackStatus(4); //4:NG |
| | | }else { |
| | | locMast.setPackStatus(5); //5:静置中 |
| | | } |
| | | sign=true; |
| | | if (locMast.getLocType1()==1 && sourceLoc.getLocType1()==2){ |
| | | if (locMast.getLocType1()==2 && sourceLoc.getLocType1()==1){ |
| | | TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>() |
| | | .eq("loc_no",sourceLoc.getLocNo()) |
| | | .eq("barcode",locMast.getBarcode()) |
| | | .eq("barcode",locDetl.getMatnr()) |
| | | .eq("status",4) |
| | | ); |
| | | testMast.setStatus(5); |
| | | testMast.setModiTime(new Date()); |
| | | if (!testMastService.update(testMast,new EntityWrapper<TestMast>().eq("loc_no",sourceLoc.getLocNo()).eq("barcode",locMast.getBarcode()).eq("status",4))){ |
| | | if (!testMastService.update(testMast,new EntityWrapper<TestMast>() |
| | | .eq("loc_no",sourceLoc.getLocNo()) |
| | | .eq("barcode",locDetl.getMatnr()) |
| | | .eq("status",4))){ |
| | | throw new CoolException("更改测试状态失败"); |
| | | } |
| | | } |
| | |
| | | locMast.setBarcode(""); |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | locMast.setFireStatus(0); |
| | | locMast.setPackStatus(0); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("全板出库 ===>> 修改源库位状态失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |
| | |
| | | locMast.setBarcode(""); |
| | | locMast.setModiTime(now); |
| | | locMast.setIoTime(now); |
| | | locMast.setFireStatus(0); |
| | | locMast.setPackStatus(0); |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("空板出库 ===>> 修改源库位状态失败;[workNo={0}],[sourceLocNo={1}]", wrkMast.getWrkNo(), wrkMast.getSourceLocNo()); |