| | |
| | | @Value("${ren.startUpTestPACK}") |
| | | private String startUpTestPACK; |
| | | |
| | | @Value("${ren.startUpTestPACK}") |
| | | @Value("${ren.suspendTestPACK}") |
| | | private String suspendTestPACK; |
| | | |
| | | @Value("${mes.inPath}") |
| | |
| | | @Override |
| | | @Transactional |
| | | public void startUpTestPACK(TestMast testMast) { |
| | | |
| | | if(Cools.isEmpty(testMast.getLocNo())){ |
| | | throw new CoolException("库位号为空"); |
| | | }else if(Cools.isEmpty(testMast.getUserId())){ |
| | | throw new CoolException("用户编码为空"); |
| | | }else if(Cools.isEmpty(testMast.getBarcode())){ |
| | | throw new CoolException("PACK码为空"); |
| | | } |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", testMast.getLocNo()) |
| | | .eq("loc_sts","F") |
| | | ); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | throw new CoolException("未查询到库位号:"+testMast.getLocNo()+" 请检查库位号或者检查库位状态是否未在库"); |
| | | } |
| | | Date now = new Date(); |
| | | testMast.setStatus(1); |
| | |
| | | if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){ |
| | | throw new CoolException("申请测试失败"); |
| | | } |
| | | // throw new CoolException("异常!!!请规范使用或联系管理员"); |
| | | |
| | | } |
| | | @Override |
| | | @Transactional |
| | |
| | | review.setBarcode(testMast.getBarcode()); |
| | | review.setChannel(testMast.getChannel().toString()); |
| | | review.setRequestTime(DateUtils.convert(new Date())); |
| | | if (testMast.getChannel()>=1 && testMast.getChannel()<=8){ |
| | | if (testMast.getChannel()<1 || testMast.getChannel()>48){ |
| | | log.error("通道有误,请查看!"); |
| | | } else if (testMast.getChannel()<=8){ |
| | | renUrl=renUrl1; |
| | | }else if (testMast.getChannel()>=9 && testMast.getChannel()<=16){ |
| | | }else if (testMast.getChannel()<=16){ |
| | | renUrl=renUrl2; |
| | | }else if (testMast.getChannel()>=17 && testMast.getChannel()<=24){ |
| | | }else if (testMast.getChannel()<=24){ |
| | | renUrl=renUrl3; |
| | | }else if (testMast.getChannel()>=25 && testMast.getChannel()<=36){ |
| | | }else if (testMast.getChannel()<=32){ |
| | | renUrl=renUrl4; |
| | | }else if (testMast.getChannel()>=37 && testMast.getChannel()<=40){ |
| | | }else if (testMast.getChannel()<=40){ |
| | | renUrl=renUrl5; |
| | | }else if (testMast.getChannel()>=41 && testMast.getChannel()<=48){ |
| | | }else if (testMast.getChannel()<=48){ |
| | | renUrl=renUrl6; |
| | | } |
| | | return postMesData(renUrl,startUpTestPACK,review); |
| | |
| | | case "48": |
| | | renUrl=renUrl6; |
| | | break; |
| | | default: |
| | | log.error("通道有误,请查看!"); |
| | | } |
| | | return postMesData(renUrl,suspendTestPACK,review); |
| | | }catch (Exception e) { |
| | |
| | | name="测试系统"; |
| | | }else if (URL.equals(renUrl6)){ |
| | | name="测试系统"; |
| | | }else { |
| | | log.error("查询连接失败,请查看!"); |
| | | } |
| | | if(combParam != null){ |
| | | String response = ""; |