| | |
| | | return testMast; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Boolean testFinish(Review review) { |
| | | Boolean success=true; |
| | | Wrapper wrapper = new EntityWrapper<TestMast>() |
| | | .eq("loc_no", review.getLocNo()) |
| | | .eq("barcode", review.getBarcode()) |
| | | .eq("user_Id", review.getUserId()); |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo())); |
| | | if (null == locMast ||locMast.getPackStatus()!=2){ |
| | | throw new CoolException("产品状态不是 2:测试中"); |
| | | }else if (!review.getBarcode().equals(locMast.getBarcode())){ |
| | | throw new CoolException("pack码不同"); |
| | | } |
| | | TestMast testMast = testMastService.selectOne(wrapper); |
| | | if(null != testMast){ |
| | | if (testMast.getStatus()==3){ |
| | | Date date = new Date(); |
| | | locMast.setPackStatus(3); |
| | | locMast.setModiTime(date); |
| | | // CombParam combParam = new CombParam(); |
| | | // combParam.setPackNo(locMast.getBarcode()); |
| | | // combParam.setLocNo(locMast.getLocNo()); |
| | | // combParam.setPackSts(3); |
| | | // combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | // new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | throw new CoolException("更改产品状态失败"); |
| | | } |
| | | }else if (Cools.isEmpty(testMast.getStatus())){ |
| | | throw new CoolException("状态异常"); |
| | | }else { |
| | | throw new CoolException("测试状态不是 3:测试中"); |
| | | } |
| | | } else { |
| | | throw new CoolException("状态异常"); |
| | | } |
| | | return success; |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // @Override |
| | | // @Transactional |
| | | // public Boolean testFinish(Review review) { |
| | | // Boolean success=true; |
| | | // Wrapper wrapper = new EntityWrapper<TestMast>() |
| | | // .eq("loc_no", review.getLocNo()) |
| | | // .eq("barcode", review.getBarcode()) |
| | | // .eq("user_Id", review.getUserId()); |
| | | // LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo())); |
| | | // if (null == locMast ||locMast.getPackStatus()!=2){ |
| | | // throw new CoolException("产品状态不是 2:测试中"); |
| | | // }else if (!review.getBarcode().equals(locMast.getBarcode())){ |
| | | // throw new CoolException("pack码不同"); |
| | | // } |
| | | // TestMast testMast = testMastService.selectOne(wrapper); |
| | | // if(null != testMast){ |
| | | // if (testMast.getStatus()==3){ |
| | | // Date date = new Date(); |
| | | // locMast.setPackStatus(3); |
| | | // locMast.setModiTime(date); |
| | | //// CombParam combParam = new CombParam(); |
| | | //// combParam.setPackNo(locMast.getBarcode()); |
| | | //// combParam.setLocNo(locMast.getLocNo()); |
| | | //// combParam.setPackSts(3); |
| | | //// combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | //// new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | // |
| | | // if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | // throw new CoolException("更改产品状态失败"); |
| | | // } |
| | | // }else if (Cools.isEmpty(testMast.getStatus())){ |
| | | // throw new CoolException("状态异常"); |
| | | // }else { |
| | | // throw new CoolException("测试状态不是 3:测试中"); |
| | | // } |
| | | // } else { |
| | | // throw new CoolException("状态异常"); |
| | | // } |
| | | // return success; |
| | | // } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public Boolean testNG(Review review) { |