| | |
| | | @Transactional |
| | | public void startUpTestPACK(TestMast testMast) { |
| | | |
| | | // 启动测试请求 |
| | | ReturnT<String> result=startUpTestPACK1(testMast); |
| | | if (!result.isSuccess()) { |
| | | log.error("测试申请失败", testMast.getBarcode()); |
| | | throw new CoolException("测试申请失败"); |
| | | } |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", testMast.getLocNo()) |
| | | ); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | |
| | | Date now = new Date(); |
| | | testMast.setStatus(1); |
| | | testMast.setChannel(locMast.getChannel()); |
| | | testMast.setModiTime(now); |
| | | testMast.setAppeTime(now); |
| | | |
| | | // 启动测试请求 |
| | | ReturnT<String> result=startUpTestPACK1(testMast); |
| | | if (!result.isSuccess()) { |
| | | log.error("测试申请失败", testMast.getBarcode()); |
| | | throw new CoolException("测试申请失败"); |
| | | } |
| | | |
| | | if (!testMastService.insert(testMast)){ |
| | | throw new CoolException("添加testMast失败"); |
| | | } |