自动化立体仓库 - WMS系统
dubin
17 小时以前 db6fc85e117c2732f8b5b904cbdfa38f7d9c100a
半托功能调整
3个文件已修改
48 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/HalfBarcode.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/HalfBarcode.java
@@ -17,7 +17,7 @@
    @TableField("anfme")
    private int anfme;
    @ApiModelProperty(value= "可放数量")
    @ApiModelProperty(value= "可放长度")
    @TableField("price")
    private int price;
src/main/java/com/zy/asrs/service/impl/MatBarcodeServiceImpl.java
@@ -34,9 +34,15 @@
    @Override
    public void deleteMatBarcode(List<MatBarcode> list) {
        for (MatBarcode matBarcode : list) {
            //对模具的规格做处理得到厚度
            Integer thickness = 0;
            if (matBarcode.getSpecs() != null){
                String[] split = matBarcode.getSpecs().split("\\*");
                thickness = Integer.parseInt(split[1]);
            }
            HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(matBarcode.getZpallet());
            halfBarcode.setAnfme(halfBarcode.getAnfme() - 1);
            halfBarcode.setPrice(halfBarcode.getPrice() + 1);
            halfBarcode.setPrice(halfBarcode.getPrice() + thickness);
            if (!halfBarcodeService.half(halfBarcode)){
                throw new CoolException("更新半托信息失败");
            }
@@ -58,17 +64,23 @@
            throw new CoolException("该物料已报废,请勿绑定");
        }
        HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(waitPakin.getBarcode());
        //对模具的规格做处理得到厚度
        Integer thickness = 0;
        if (mat.getSpecs() != null){
            String[] split = mat.getSpecs().split("\\*");
            thickness = Integer.parseInt(split[1]);
        }
        if (halfBarcode == null){
            HalfBarcode hb = new HalfBarcode();
            hb.setZpallet(waitPakin.getBarcode());
            hb.setSpecs(waitPakin.getBarcode().substring(0,1));
            hb.setAnfme(1);
            if (Integer.parseInt(waitPakin.getBarcode().substring(0,1))==6){
                hb.setPrice(24-1);
                hb.setPrice(2650 - thickness);
            }else if(Integer.parseInt(waitPakin.getBarcode().substring(0,1))==7){
                hb.setPrice(24-1);
                hb.setPrice(1750 - thickness);
            }else if(Integer.parseInt(waitPakin.getBarcode().substring(0,1))==8){
                hb.setPrice(24-1);
                hb.setPrice(800 - thickness);
            }
            if (!halfBarcodeService.insert(hb)){
                throw new CoolException("更新半托信息失败");
@@ -76,13 +88,13 @@
        }else {
            if (Integer.parseInt(waitPakin.getBarcode().substring(0,1))==6){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(2650 - thickness);
            }else if(Integer.parseInt(waitPakin.getBarcode().substring(0,1))==7){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(1750 - thickness);
            }else if(Integer.parseInt(waitPakin.getBarcode().substring(0,1))==8){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(800 - thickness);
            }
            if (!halfBarcodeService.half(halfBarcode)){
                throw new CoolException("更新半托信息失败");
@@ -113,17 +125,23 @@
            throw new CoolException("该物料已报废,请勿绑定");
        }
        HalfBarcode halfBarcode = halfBarcodeService.selectByZpallet(mat.getUnit());
        //对模具的规格做处理得到厚度
        Integer thickness = 0;
        if (mat.getSpecs() != null){
            String[] split = mat.getSpecs().split("\\*");
            thickness = Integer.parseInt(split[1]);
        }
        if (halfBarcode == null){
            HalfBarcode hb = new HalfBarcode();
            hb.setZpallet(mat.getUnit());
            hb.setSpecs(mat.getUnit().substring(0,1));
            hb.setAnfme(1);
            if (Integer.parseInt(mat.getUnit().substring(0,1))==6){
                hb.setPrice(24-1);
                hb.setPrice(2650 - thickness);
            }else if(Integer.parseInt(mat.getUnit().substring(0,1))==7){
                hb.setPrice(24-1);
                hb.setPrice(1750 - thickness);
            }else if(Integer.parseInt(mat.getUnit().substring(0,1))==8){
                hb.setPrice(24-1);
                hb.setPrice(800 - thickness);
            }
            if (!halfBarcodeService.insert(hb)){
                throw new CoolException("更新半托信息失败");
@@ -131,13 +149,13 @@
        }else {
            if (Integer.parseInt(mat.getUnit().substring(0,1))==6){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(halfBarcode.getPrice()- thickness);
            }else if(Integer.parseInt(mat.getUnit().substring(0,1))==7){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(halfBarcode.getPrice()- thickness);
            }else if(Integer.parseInt(mat.getUnit().substring(0,1))==8){
                halfBarcode.setAnfme(halfBarcode.getAnfme() + 1);
                halfBarcode.setPrice(halfBarcode.getPrice()-1);
                halfBarcode.setPrice(halfBarcode.getPrice()- thickness);
            }
            if (!halfBarcodeService.half(halfBarcode)){
                throw new CoolException("更新半托信息失败");
src/main/webapp/static/js/common.js
@@ -295,7 +295,7 @@
    ,{field: 'length', align: 'center',title: '单箱毛重', hide: true}
    ,{field: 'volume', align: 'center',title: '单箱体积', hide: true}
    ,{field: 'threeCode', align: 'center',title: '箱子尺寸', hide: true}
    ,{field: 'price', align: 'center',title: '可放数量', hide:false }
    ,{field: 'price', align: 'center',title: '可放长度(mm)', hide:false }
    ,{field: 'suppCode', align: 'center',title: '供应商编码', hide: true}
    ,{field: 'beBatch$', align: 'center',title: '是否批次', hide: true}
    ,{field: 'deadTime', align: 'center',title: '保质期', hide: true}