自动化立体仓库 - WMS系统
#
zyx
2024-06-06 b2a895946c2e261eec55e6e86daf44fb21825818
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -431,6 +431,10 @@
    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();
@@ -546,10 +550,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);
    }
@@ -569,6 +573,10 @@
        }
        List<PlaMoveParam.PlaMove> plas = param.getPlas();
        //判断此次入库是否达到库存上限
        if(!mobileService.checkMaximum(locNo,plas.size())){
            return R.error("当前入库包数已超过库存上限");
        }
        param.getPlas().forEach(p -> {
            String brand = p.getBrand();
@@ -582,7 +590,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();