|  |  |  | 
|---|
|  |  |  | return mobileService.manDetlOriginOut(json,getUser()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/plaDetl/packin/v1") | 
|---|
|  |  |  | //@ManagerAuth(memo="pla入库") | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public R plaPackIn(@RequestBody JSONObject json) throws ParseException { | 
|---|
|  |  |  | String locNo = json.get("locNo").toString(); | 
|---|
|  |  |  | JSONArray jsonArray = JSONArray.parseArray(json.getJSONArray("pla").toJSONString()); | 
|---|
|  |  |  | //判断此次入库是否达到库存上限 | 
|---|
|  |  |  | if(!mobileService.checkMaximum(locNo,jsonArray.size())){ | 
|---|
|  |  |  | return R.error("当前入库包数已超过库存上限"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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("入库成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //    @RequestMapping("/plaDetl/packin/v1") | 
|---|
|  |  |  | //    //@ManagerAuth(memo="pla入库") | 
|---|
|  |  |  | //    @Transactional | 
|---|
|  |  |  | //    public R plaPackIn(@RequestBody JSONObject json) throws ParseException { | 
|---|
|  |  |  | //        String locNo = json.get("locNo").toString(); | 
|---|
|  |  |  | //        JSONArray jsonArray = JSONArray.parseArray(json.getJSONArray("pla").toJSONString()); | 
|---|
|  |  |  | //        //判断此次入库是否达到库存上限 | 
|---|
|  |  |  | //        if(!mobileService.checkMaximum(locNo,jsonArray.size())){ | 
|---|
|  |  |  | //            return R.error("当前入库包数已超过库存上限"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | //        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("入库成功"); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/plaDetl/packin/v11") | 
|---|
|  |  |  | @RequestMapping("/plaDetl/packin/v1") | 
|---|
|  |  |  | @ManagerAuth(memo="pla入库") | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public R plaPackInTestErp(@RequestBody JSONObject json) throws ParseException { | 
|---|