From 3ebfab49d440f6069fb29ec1a26f76cfa8a15cae Mon Sep 17 00:00:00 2001 From: LSH Date: 星期一, 13 二月 2023 11:08:08 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java index 024a4bb..0d4f9e4 100644 --- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java @@ -102,7 +102,7 @@ @Value("${ren.startUpTestPACK}") private String startUpTestPACK; - @Value("${ren.startUpTestPACK}") + @Value("${ren.suspendTestPACK}") private String suspendTestPACK; @Value("${mes.inPath}") @@ -632,13 +632,19 @@ @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); @@ -688,6 +694,8 @@ if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", testMast.getLocNo()))){ throw new CoolException("鐢宠娴嬭瘯澶辫触"); } +// throw new CoolException("寮傚父锛侊紒锛佽瑙勮寖浣跨敤鎴栬仈绯荤鐞嗗憳"); + } @Override @Transactional @@ -707,17 +715,19 @@ 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); @@ -797,6 +807,8 @@ case "48": renUrl=renUrl6; break; + default: + log.error("閫氶亾鏈夎锛岃鏌ョ湅锛�"); } return postMesData(renUrl,suspendTestPACK,review); }catch (Exception e) { @@ -823,6 +835,8 @@ name="娴嬭瘯绯荤粺"; }else if (URL.equals(renUrl6)){ name="娴嬭瘯绯荤粺"; + }else { + log.error("鏌ヨ杩炴帴澶辫触锛岃鏌ョ湅锛�"); } if(combParam != null){ String response = ""; -- Gitblit v1.9.1