自动化立体仓库 - WMS系统
#1
dubin
2025-10-30 5ee8d702138b67a8070e850ba622aa4b07d64fb9
src/main/java/com/zy/asrs/utils/MatExcelListener.java
@@ -132,20 +132,11 @@
        // 商品
        Mat mat = matService.selectByMatnr(excel.getMatnr());
        if (mat == null) {
            InOut inOut=new InOut();
            mat = excel;
            mat.setTagId(tagId);
            mat.setMatnr(excel.getMatnr()+"__"+excel.getName());
            inOut.setMatnr(mat.getMatnr());
            inOut.setMaktx(mat.getMaktx());
            inOut.setColor(mat.getColor());
            inOut.setSpecs(mat.getSpecs());
            inOut.setTemp1("");
            mat.setMatnr(excel.getMatnr());
            if (!matService.insert(mat)) {
                throw new CoolException("保存商品档案失败,商品编码:" + excel.getMatnr());
            }
            if (!inOutService.insert(inOut)){
                throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr());
            }
            total++;
        }