From c33901750d296f75180f6051fbb743738ffcae7e Mon Sep 17 00:00:00 2001 From: LSH Date: 星期四, 18 五月 2023 08:46:38 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 46 ++++++++++++++++++++++------------------------ 1 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java index c584f44..5334814 100644 --- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java @@ -67,6 +67,8 @@ @Value("${mes.inPath}") private String inpath; + @Value("${mes.url}") + private String mesUrl; @Override @Transactional @@ -571,8 +573,8 @@ throw new CoolException("缂哄皯鍙傛暟锛歱ackNo"); }else if (Cools.isEmpty(param.getPackName())){ throw new CoolException("缂哄皯鍙傛暟锛歱ackName"); - }else if (Cools.isEmpty(param.getSettingTimes())){ - throw new CoolException("缂哄皯鍙傛暟锛歴ettingTimes"); +// }else if (Cools.isEmpty(param.getSettingTimes())){ +// throw new CoolException("缂哄皯鍙傛暟锛歴ettingTimes"); }else if (Cools.isEmpty(param.getRequestTime())){ throw new CoolException("缂哄皯鍙傛暟锛歳equestTime"); } @@ -602,7 +604,7 @@ matNew.setTagId(tag.getId()); matNew.setMatnr(param.getPackName()); matNew.setMaktx(param.getPackName()); - matNew.setDeadWarn(param.getSettingTimes()); + matNew.setDeadWarn(480);//8灏忔椂 480鍒嗛挓 matNew.setCreateBy(9999L);//9999琛ㄧずerp涓嬪彂 matNew.setCreateTime(new Date()); matNew.setUpdateBy(9999L);//9999琛ㄧずerp涓嬪彂 @@ -610,6 +612,7 @@ if (!matService.insert(matNew)){ throw new CoolException(param.getPackName() + "鍟嗗搧妗f鑷姩鐢熸垚澶辫触"); } + mat=matNew; // throw new CoolException(param.getPackName() + "鍟嗗搧妗f涓嶅瓨鍦�"); } WaitPakin waitPakin = new WaitPakin(); @@ -625,7 +628,7 @@ waitPakin.setAppeTime(new Date()); waitPakin.setModiUser(null); waitPakin.setModiTime(new Date()); - waitPakin.setDeadWarn(param.getSettingTimes()); + waitPakin.setDeadWarn(mat.getDeadWarn()); if (!waitPakinService.insert(waitPakin)) { throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�"); } @@ -713,7 +716,7 @@ combParam.setLocNo(locMast.getLocNo()); combParam.setPackSts(7); combParam.setRequestTime(DateUtils.convert(new Date())); - new PostMesDataUtils().postMesData(inpath,combParam); + new PostMesDataUtils().postMesData("MES绯荤粺",mesUrl,inpath,combParam); if (!locMastService.updateById(locMast)) { throw new CoolException("棰勭害搴撲綅鐘舵�佸け璐ワ紝搴撲綅鍙凤細"+locMast.getLocNo()); @@ -759,14 +762,9 @@ throw new CoolException("鏇存柊娴嬭瘯鐘舵�佸け璐�"); } locMast.setPackStatus(2); - CombParam combParam = new CombParam(); - combParam.setPackNo(locMast.getBarcode()); - combParam.setLocNo(locMast.getLocNo()); - combParam.setPackSts(2); - combParam.setRequestTime(DateUtils.convert(new Date())); - new PostMesDataUtils().postMesData(inpath,combParam); - if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ + + throw new CoolException("鏇存柊浜у搧鐘舵�佸け璐�"); } } else if (Cools.isEmpty(testMast.getStatus())){ @@ -801,12 +799,12 @@ 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(inpath,combParam); +// 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("鏇存敼浜у搧鐘舵�佸け璐�"); @@ -842,12 +840,12 @@ Date date = new Date(); locMast.setPackStatus(4); locMast.setModiTime(date); - CombParam combParam = new CombParam(); - combParam.setPackNo(locMast.getBarcode()); - combParam.setLocNo(locMast.getLocNo()); - combParam.setPackSts(4); - combParam.setRequestTime(DateUtils.convert(new Date())); - new PostMesDataUtils().postMesData(inpath,combParam); +// CombParam combParam = new CombParam(); +// combParam.setPackNo(locMast.getBarcode()); +// combParam.setLocNo(locMast.getLocNo()); +// combParam.setPackSts(4); +// 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("鏇存敼浜у搧鐘舵�佸け璐�"); -- Gitblit v1.9.1