自动化立体仓库 - WMS系统
#1
dubin
2025-10-30 5ee8d702138b67a8070e850ba622aa4b07d64fb9
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,20 +148,9 @@
        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();
    }