自动化立体仓库 - WMS系统
#1
dubin
2025-11-04 57e7846403cd3c72cc70e17e205c4e0d8b3aa404
src/main/java/com/zy/asrs/controller/MatController.java
@@ -43,8 +43,6 @@
    @Autowired
    private SnowflakeIdWorker snowflakeIdWorker;
    @Autowired
    private InOutService inOutService;
    @Autowired
    private MatBarcodeService matBarcodeService;
    @RequestMapping(value = "/mat/auto/matnr/auth")
@@ -141,9 +139,6 @@
        if (!matService.insert(mat)) {
            throw new CoolException("商品档案添加失败,请联系管理员");
        }
        if (!inOutService.insert(inOut)){
            throw new CoolException("商品信息添加失败,请联系管理员");
        }
        return R.ok();
    }
@@ -153,33 +148,22 @@
        if (Cools.isEmpty(mat) || null==mat.getId()){
            return R.error();
        }
        if (mat.getColor().equals("正常")){
            mat.setColor("报废");
        }else if (mat.getColor().equals("报废")){
            mat.setColor("正常");
        }
        InOut inOut = inOutService.selectByMatnr(mat.getMatnr());
        inOut.setMatnr(mat.getMatnr());
        inOut.setMaktx(mat.getMaktx());
        inOut.setColor(mat.getColor());
        inOut.setSpecs(mat.getSpecs());
        mat.setUpdateBy(getUserId());
        mat.setUpdateTime(new Date());
        matService.updateById(mat);
        inOutService.updateById(inOut);
        return R.ok();
    }
    /*物料托盘绑定*/
//    @RequestMapping(value = "/mat/barcode/auth")
//    @ManagerAuth
//    public R addBarcodeMatnr(Mat mat) {
//        if (Cools.isEmpty(mat.getUnit())){
//            return R.error(BaseRes.PARAM);
//        }
//        matBarcodeService.addBarcodeMatnrTwo(mat);
//        return R.ok();
//    }
    @RequestMapping(value = "/mat/barcode/auth")
    @ManagerAuth
    public R addBarcodeMatnr(Mat mat) {
        if (Cools.isEmpty(mat.getUnit())){
            return R.error(BaseRes.PARAM);
        }
        matBarcodeService.addBarcodeMatnrTwo(mat);
        return R.ok();
    }
    @RequestMapping(value = "/mat/delete/auth")
    @ManagerAuth