| | |
| | | } |
| | | } |
| | | //入库成功后上报ERP |
| | | //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); |
| | | } |
| | | } |
| | | //入库成功后上报ERP |
| | | openService.pakinReportErp(json); |
| | | return R.ok("入库成功"); |
| | | } |