| | |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | locMast.setFireStatus(0); |
| | | //入测试库位时给库位测试状态为1待测 |
| | | if(!Cools.isEmpty(locMast.getChannel())){ |
| | | locMast.setPackStatus(1);//待测 |
| | | } |
| | | if (locMast.getCrnNo()==1){ |
| | | if (locMast.getLocType1()==1){ |
| | | locMast.setPackStatus(1); |
| | |
| | | .eq("barcode",wrkDetl1.getMatnr()) |
| | | .eq("status",4) |
| | | ); |
| | | if (Cools.isEmpty(testMast)){ |
| | | testMast = testMastService.selectOne(new EntityWrapper<TestMast>() |
| | | .eq("barcode",wrkDetl1.getMatnr()) |
| | | .eq("status",5) |
| | | ); |
| | | } |
| | | if (Cools.isEmpty(testMast)){ |
| | | throw new CoolException("更改测试状态失败,查询测试档案失败"); |
| | | } |
| | | testMast.setStatus(5); |
| | | testMast.setModiTime(new Date()); |
| | | if (!testMastService.update(testMast,new EntityWrapper<TestMast>().eq("barcode",wrkDetl1.getMatnr()).eq("status",4))){ |
| | |
| | | }else { |
| | | throw new CoolException("待测库位无物"); |
| | | } |
| | | |
| | | }else { |
| | | //测试库位转静置库位和NG库位 |
| | | if (locMast.getLocType1().equals((short)4)){ |
| | |
| | | } |
| | | |
| | | if (locMast.getCrnNo()==1 && sign){ |
| | | //5.静置库位入库完成上报 |
| | | //7.测试库位转静置库位出库完成上报 |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locDetl.getMatnr()); |
| | | combParam.setLocNo(wrkMast.getLocNo()); |
| | | combParam.setLocNo(wrkMast.getSourceLocNo()); |
| | | combParam.setStepSts(7); |
| | | if (locMast.getPackStatus()==4){ |
| | | combParam.setPackSts(2); |
| | | }else if (locMast.getPackStatus()==5){ |
| | | combParam.setPackSts(1); |
| | | } |
| | | combParam.setRequestTime(DateUtils.convert(now)); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | //5.测试库位转静置库位入库完成上报 |
| | | combParam.setPackNo(locDetl.getMatnr()); |
| | | combParam.setLocNo(wrkMast.getLocNo()); |
| | | if (locMast.getPackStatus()==4){ |
| | | combParam.setPackSts(2); |
| | | combParam.setStepSts(5); |
| | | }else if (locMast.getPackStatus()==5){ |
| | | combParam.setPackSts(1); |
| | | combParam.setStepSts(8); |
| | | }else { |
| | | combParam.setPackSts(0); |
| | | } |
| | | combParam.setStepSts(5); |
| | | combParam.setRequestTime(DateUtils.convert(now)); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | } |