From ea594a1dbe6191a0cf555e3902eaa5b76888241d Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期一, 03 六月 2024 09:19:34 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/controller/MobileController.java | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java index 7101b78..db99085 100644 --- a/src/main/java/com/zy/asrs/controller/MobileController.java +++ b/src/main/java/com/zy/asrs/controller/MobileController.java @@ -447,6 +447,32 @@ } } //鍏ュ簱鎴愬姛鍚庝笂鎶RP + //openService.pakinReportErp(json); + return R.ok("鍏ュ簱鎴愬姛"); + } + + @RequestMapping("/plaDetl/packin/v2") + //@ManagerAuth(memo="pla鍏ュ簱") + @Transactional + public R plaPackInTestErp(@RequestBody JSONObject json) throws ParseException { + String locNo = json.get("locNo").toString(); + JSONArray jsonArray = JSONArray.parseArray(json.getJSONArray("pla").toJSONString()); + for (Object o : jsonArray){ + JSONObject jsonObject = (JSONObject)o; + String brand = jsonObject.get("brand").toString(); + String batch = jsonObject.get("batch").toString(); + Integer packageNo = Integer.parseInt(jsonObject.get("packageNo").toString()); + if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ + return R.error("鏈夊弬鏁颁负绌猴紝鏃犳硶鍏ュ簱"); + } + //娴嬭瘯 + if(true){ + User user = new User(); + user.setUsername("test"); + mobileService.plaPakin(brand,locNo,batch,packageNo,user); + } + } + //鍏ュ簱鎴愬姛鍚庝笂鎶RP openService.pakinReportErp(json); return R.ok("鍏ュ簱鎴愬姛"); } @@ -520,10 +546,10 @@ Pla pla = plaService.selectByBatchAndPackageNo(batch, packageNo,brand); if ((Cools.isEmpty(pla))){ - return R.error("璇ュ寘鐗╂枡鏈綍鍏ワ紝鏃犳硶鏌ヨ鍒扮浉鍏充俊鎭�"); + return R.error("璇ュ寘鐗╂枡鏈綍鍏ワ紝鏃犳硶鏌ヨ鍒扮浉鍏充俊鎭�").add(pla); } if(!(Cools.eq(pla.getStatus(), GlobleParameter.PLA_STATUS_0) || Cools.eq(pla.getStatus(), GlobleParameter.PLA_STATUS_00)) && type != 2){ - return R.error("璇ュ寘鐗╂枡涓嶄负寰呭叆搴撶姸鎬侊紝鏃犳硶杩涜鍏ュ簱鎿嶄綔"); + return R.error("璇ュ寘鐗╂枡鐨勭姸鎬佷负" + pla.getStatus() +"锛屾棤娉曡繘琛屽叆搴撴搷浣�").add(pla); } return R.ok(pla); } @@ -556,7 +582,7 @@ throw new CoolException("璇ュ寘鐗╂枡鏈綍鍏ワ紝鏃犳硶鏌ヨ鍒扮浉鍏充俊鎭�"); } if(!Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_1) && !Cools.eq(pla.getStatus(),GlobleParameter.PLA_STATUS_3)){ - throw new CoolException("璇ュ寘鐗╂枡鐘舵�佷笉涓哄叆搴撶姸鎬侊紝鏃犳硶杞Щ"); + throw new CoolException("璇ュ寘鐗╂枡鐨勭姸鎬佷负" + pla.getStatus() +"锛屾棤娉曡繘琛屽叆搴撴搷浣�"); } String sourceLocNo = pla.getLocNo(); -- Gitblit v1.9.1