自动化立体仓库 - WMS系统
zyx
2024-01-15 35309c86535d392d593471236585b4b36fb417d6
# 需求更改
13个文件已修改
214 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/NodeController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/PlaController.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/Pla.java 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/GlobleParameter.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/PlaService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/PlaExcelListener.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pla/plaDetl.js 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pla/plaDetl.html 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pla/returned.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pla/sellout.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pla/update.html 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/NodeController.java
@@ -385,7 +385,7 @@
                        }
                    }else {
                        locNo = param.getName()+"-" +String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l);
                        locNo = param.getName()+String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l);
                    }
                    //客户要求格式位A-01-01-01
src/main/java/com/zy/asrs/controller/PlaController.java
@@ -9,6 +9,7 @@
import com.core.common.R;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.GlobleParameter;
import com.zy.asrs.service.*;
import com.zy.asrs.utils.PlaExcelListener;
import com.zy.asrs.utils.SaasUtils;
@@ -75,11 +76,37 @@
        System.out.println(plas.toString());
        plas.forEach(pla -> {
            Pla plaSave = plaService.selectById(pla.getId());
            pla.setModifyTime(new Date());
            plaService.updateById(pla);
            PlaLog plaLog = new PlaLog();
            BeanUtils.copyProperties(plaSave,plaLog);
            plaLog.setId(null);
            plaLog.setCreateTime(new Date());
            plaLogService.insert(plaLog);
            plaService.updateById(pla);
        });
        return R.ok();
    }
    @RequestMapping(value = "/pla/delete/auth")
    @ManagerAuth
    public R delete(@RequestBody List<Pla> plas) {
        System.out.println(plas.toString());
        plas.forEach(pla -> {
            if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_00) || pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){
                throw new CoolException("非待入库的数据无法被删除");
            }
            Pla plaSave = plaService.selectById(pla.getId());
            pla.setModifyTime(new Date());
            plaService.deleteById(pla.getId());
            PlaLog plaLog = new PlaLog();
            BeanUtils.copyProperties(plaSave,plaLog);
            plaLog.setId(null);
            plaLog.setCreateTime(new Date());
            plaLogService.insert(plaLog);
        });
        return R.ok();
    }
@@ -111,7 +138,7 @@
            }
            pla.setQtyAnfme(pla.getQtyAnfme() + pla.getOrderWeight());
            pla.setHandlerBy(getUser().getUsername());
            pla.setStatus("待出库");
            pla.setStatus(GlobleParameter.PLA_STATUS_2);
            pla.setPakoutTime(pla.getPakoutTime().split("\\(")[0]);
            //生成此次作业信息
            PlaQty plaQty = new PlaQty();
@@ -149,6 +176,13 @@
        return R.ok();
    }
    @RequestMapping(value = "/pla/viladate/auth")
    @ManagerAuth
    public R viladate(@RequestBody List<Pla> plas) {
        plaService.viladate(plas,getUser());
        return R.ok();
    }
    @RequestMapping(value = "/pla/rework/auth")
    @ManagerAuth
    public R rework(@RequestBody List<Pla> plas) {
src/main/java/com/zy/asrs/entity/Pla.java
@@ -76,11 +76,11 @@
    //重量
    @TableField("weight")
    @ExcelProperty(value = "重量")
    @ExcelProperty(value = "重量KG")
    private Double weight;
    @ApiModelProperty(value= "单位")
    @ExcelProperty(value = "单位")
    //@ExcelProperty(value = "单位")
    @TableField("unit")
    private String unit;
@@ -101,27 +101,27 @@
    //熔指
    @TableField("finger_melting")
    @ExcelProperty(value = "熔指")
    @ExcelProperty(value = "熔指,g/10min")
    private Double fingerMelting;
    //水分
    @TableField("water")
    @ExcelProperty(value = "水分")
    @ExcelProperty(value = "水分,ppm")
    private Double water;
    //熔点
    @TableField("fusing_point")
    @ExcelProperty(value = "熔点")
    @ExcelProperty(value = "熔点,℃")
    private Double fusingPoint;
    //挥发份1
    @TableField("vadf1")
    @ExcelProperty(value = "挥发份1")
    @ExcelProperty(value = "挥发段,%")
    private Double vadf1;
    //挥发份2
    @TableField("vadf2")
    @ExcelProperty(value = "挥发份2")
    @ExcelProperty(value = "分解段,%")
    private Double vadf2;
    //黄度
@@ -131,32 +131,57 @@
    //不透明度
    @TableField("opacity")
    @ExcelProperty(value = "不透明度")
    @ExcelProperty(value = "不透明度,%")
    private Double opacity;
    //L值
    @TableField("l")
    @ExcelProperty(value = "l值")
    @ExcelProperty(value = "L*")
    private Double l;
    //a值
    @TableField("a")
    @ExcelProperty(value = "a值")
    @ExcelProperty(value = "a*")
    private Double a;
    //b值
    @TableField("b")
    @ExcelProperty(value = "b值")
    @ExcelProperty(value = "b*")
    private Double b;
    //填充
    @TableField("fill_in")
    @ExcelProperty(value = "填充")
    @ExcelProperty(value = "填充,%")
    private Double fillIn;
    @ExcelProperty(value = "拉伸强度,MPa")
    private String str1;
    @ExcelProperty(value = "断裂伸长率,%")
    private String str2;
    @ExcelProperty(value = "缺口冲击,KJ/m2")
    private String str3;
    @ExcelProperty(value = "维卡,℃")
    private String str4;
    @ExcelProperty(value = "半结晶时间,min")
    private String str5;
    @ExcelProperty(value = "结晶度.%")
    private String str6;
//    @ExcelProperty(value = "填充")
    private String str7;
//
//    @ExcelProperty(value = "填充")
    private String str8;
    //质量状态
    @TableField("mass_state")
    @ExcelProperty(value = "质量状体")
    @ExcelProperty(value = "质量状态")
    private String massState;
    //质量问题
src/main/java/com/zy/asrs/entity/param/GlobleParameter.java
@@ -1,6 +1,7 @@
package com.zy.asrs.entity.param;
public class GlobleParameter {
    public static final String PLA_STATUS_00 = "暂入库";
    public static final String PLA_STATUS_0 = "待入库";
    public static final String PLA_STATUS_1 = "已入库";
    public static final String PLA_STATUS_2 = "待出库";
src/main/java/com/zy/asrs/service/PlaService.java
@@ -16,4 +16,5 @@
    void returned(List<PlaQty> plaQties, User user);
    void viladate(List<Pla> plas, User user);
}
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1211,9 +1211,10 @@
            throw new CoolException("系统未检测到该包物料信息,请重新录入");
        }
        if(Cools.eq(GlobleParameter.PLA_STATUS_1,pla.getStatus())){
            throw new CoolException("该物料已入库");
        if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){
            throw new CoolException("该物料状态不为待入库,无法入库");
        }
        pla.setStatus(GlobleParameter.PLA_STATUS_1);
        pla.setModifyTime(new Date());
        pla.setPakinTime(new Date());
@@ -1260,9 +1261,9 @@
        pla.setWeightAnfme(pla.getWeightAnfme() - anfme);
        pla.setQtyAnfme(pla.getQtyAnfme() - anfme);
        if(pla.getWeightAnfme() <= 0){
            pla.setStatus("全部出库");
            pla.setStatus(GlobleParameter.PLA_STATUS_4);
        }else {
            pla.setStatus("部分出库");
            pla.setStatus(GlobleParameter.PLA_STATUS_3);
        }
        plaService.updateById(pla);
        SaasUtils.insertLog(1,locNo,batch+","+packageNo,anfme,null);
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java
@@ -4,6 +4,7 @@
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.entity.Pla;
import com.zy.asrs.entity.PlaQty;
@@ -118,7 +119,7 @@
            Pla pla = this.selectByBatchAndPackageNo(plaQty.getBatch(), plaQty.getPackageNo());
            //pla.setStatus(GlobleParameter.PLA_STATUS_0);
            pla.setWeightAnfme(plaQty.getOrderWeight());
            pla.setWeightAnfme(pla.getWeightAnfme() + plaQty.getOrderWeight());
            pla.setStatus(GlobleParameter.PLA_STATUS_1);
            this.updateById(pla);
@@ -126,4 +127,17 @@
        });
    }
    @Override
    @Transactional
    public void viladate(List<Pla> plas, User user) {
        plas.forEach(pla -> {
            if(!pla.getStatus().equals(GlobleParameter.PLA_STATUS_00)){
               throw new CoolException("选中的数据不是暂入库状态,请核对状态");
            }
            pla = this.selectById(pla.getId());
            pla.setStatus(GlobleParameter.PLA_STATUS_0);
            this.updateById(pla);
        });
    }
}
src/main/java/com/zy/asrs/utils/PlaExcelListener.java
@@ -65,17 +65,18 @@
            pla = excel;
            pla.setStep(2);
            pla.setCreateTime(new Date());
            pla.setStatus(GlobleParameter.PLA_STATUS_0);
            pla.setModifyTime(new Date());
            pla.setStatus(GlobleParameter.PLA_STATUS_00);
            if (!plaService.insert(pla)) {
                throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr());
            }
            total++;
        }else if (pla.getStatus().equals(GlobleParameter.PLA_STATUS_0)){
        }else if (pla.getStatus().equals(GlobleParameter.PLA_STATUS_00)){
            excel.setId(pla.getId());
            excel.setCreateTime(pla.getCreateTime());
            excel.setModifyTime(pla.getModifyTime());
            excel.setModifyTime(new Date());
            excel.setStep(2);
            excel.setStatus(GlobleParameter.PLA_STATUS_0);
            excel.setStatus(GlobleParameter.PLA_STATUS_00);
            BeanUtils.copyProperties(excel,pla);
            plaService.updateById(pla);
            total++;
src/main/webapp/static/js/pla/plaDetl.js
@@ -37,6 +37,12 @@
        ,{field: 'a', align: 'center',title: 'a值', hide:true,edit:true}
        ,{field: 'b', align: 'center',title: 'b值', hide:true,edit:true}
        ,{field: 'fillIn', align: 'center',title: '填充(%)',hide:true,edit:true}
        ,{field: 'str1', align: 'center',title: '拉伸强度MPa',hide:true,edit:true}
        ,{field: 'str2', align: 'center',title: '断裂伸长率%',hide:true,edit:true}
        ,{field: 'str3', align: 'center',title: '缺口冲击KJ/m2',hide:true,edit:true}
        ,{field: 'str4', align: 'center',title: '维卡℃',hide:true,edit:true}
        ,{field: 'str5', align: 'center',title: '半结晶时间min',hide:true,edit:true}
        ,{field: 'str6', align: 'center',title: '结晶度%',hide:true,edit:true}
        ,{field: 'massState', align: 'center',title: '质量状态',edit:true}
        ,{field: 'problem', align: 'center',title: '备注',edit:true}
        ,{field: 'stash', align: 'center',title: '仓库',edit:true}
@@ -68,6 +74,8 @@
        return  "<span style='color: black'>部分出库</span>"
    }else if(data.status === "全部出库"){
        return  "<span style='color: gray'>全部出库</span>"
    }else if(data.status === "暂入库"){
        return  "<span style='color: purple'>暂入库</span>"
    }
}
@@ -226,7 +234,59 @@
                    });
                }
                break;
            case "deleteData":
                var data = checkStatus.data;
                if (data.length === 0){
                    layer.msg('请选择数据');
                } else {
                    layer.confirm('确定删除'+(data.length===1?'此':data.length)+'条数据吗', function(){
                        $.ajax({
                            url: baseUrl+"/pla/delete/auth",
                            headers: {'token': localStorage.getItem('token')},
                            data: JSON.stringify(data),
                            contentType:'application/json;charset=UTF-8',
                            method: 'POST',
                            traditional:true,
                            success: function (res) {
                                if (res.code === 200){
                                    layer.closeAll();
                                    tableReload(false);
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                } else {
                                    layer.msg(res.msg)
                                }
                            }
                        })
                    });
                }
                break;
            case "viladate":
                var data = checkStatus.data;
                if (data.length === 0){
                    layer.msg('请选择数据');
                } else {
                    layer.confirm('确定校验'+(data.length===1?'此':data.length)+'条数据吗', function(){
                        $.ajax({
                            url: baseUrl+"/pla/viladate/auth",
                            headers: {'token': localStorage.getItem('token')},
                            data: JSON.stringify(data),
                            contentType:'application/json;charset=UTF-8',
                            method: 'POST',
                            traditional:true,
                            success: function (res) {
                                if (res.code === 200){
                                    layer.closeAll();
                                    tableReload(false);
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                } else {
                                    layer.msg(res.msg)
                                }
                            }
                        })
                    });
                }
        }
    })
src/main/webapp/views/pla/plaDetl.html
@@ -205,6 +205,8 @@
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData" style="display: none">删除</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-update" lay-event="updateData" style="display: none">修改</button>
        <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-viladate" lay-event="viladate" style="display: none">校验</button>
        <!-- 商品/物料 数据中心 -->
        <div class="dropdown-menu" style="float: right">
            <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm">&nbsp;数据同步 <i class="layui-icon layui-icon-drop"></i></button>
src/main/webapp/views/pla/returned.html
@@ -151,6 +151,7 @@
                        table.reload('productionInfoTable',{
                            data: dataOld
                        })
                        parent.layer.closeAll();
                    } else if (res.code === 403){
                    }else {
@@ -161,7 +162,6 @@
        });
        function tableReload(child) {
            debugger
            var searchData = {};
            $.each($('#search-box [name]').serializeArray(), function() {
                searchData[this.name] = this.value;
src/main/webapp/views/pla/sellout.html
@@ -247,7 +247,6 @@
            }
            for (var i in checkData){
                checkData[i].type = 'sellOut';
                checkData[i].orderNo = $('#orderNoV').val();
                checkData[i].customer = $('#customer').val();
                checkData[i].phone = $('#phone').val();
src/main/webapp/views/pla/update.html
@@ -17,9 +17,9 @@
    <form id="detail" class="layui-form" style="text-align: center">
        <div class="layui-inline"  style="width:80%;">
            <label class="layui-form-label"><span class="not-null">*</span>换包装:</label>
            <label class="layui-form-label">换包装:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="packageType" class="layui-input" type="text" style="display: none" lay-verify="required">
                <input id="packageType" class="layui-input" type="text" style="display: none">
                <input id="packageTypeV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()>
                <div class="cool-auto-complete-window">
                    <input class="cool-auto-complete-window-input" data-key="configTypeQueryByPackageType" data-value="packageType" onkeyup="autoLoad(this.getAttribute('data-key'))">
@@ -29,9 +29,9 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:80%;">
            <label class="layui-form-label"><span class="not-null">*</span>换托盘:</label>
            <label class="layui-form-label">换托盘:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="zpalletType" class="layui-input" type="text" style="display: none" lay-verify="required">
                <input id="zpalletType" class="layui-input" type="text" style="display: none">
                <input id="zpalletTypeV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()>
                <div class="cool-auto-complete-window">
                    <input class="cool-auto-complete-window-input" data-key="configTypeQueryByzpalletType" data-value="zpalletType" onkeyup="autoLoad(this.getAttribute('data-key'))">
@@ -41,9 +41,9 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:80%;">
            <label class="layui-form-label"><span class="not-null">*</span>缠膜:</label>
            <label class="layui-form-label">缠膜:</label>
            <div class="layui-input-inline cool-auto-complete">
                <input id="filmWrap" class="layui-input" type="text" style="display: none" lay-verify="required">
                <input id="filmWrap" class="layui-input" type="text" style="display: none" >
                <input id="filmWrapV" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" onfocus=this.blur()>
                <div class="cool-auto-complete-window">
                    <input class="cool-auto-complete-window-input" data-key="configTypeQueryByfilmWrap" data-value="filmWrap" onkeyup="autoLoad(this.getAttribute('data-key'))">
@@ -83,10 +83,10 @@
        form.on('submit(save)', function () {
            for(var i in checkData){
                checkData[i].packageType = $('#packageTypeV').val();
                checkData[i].zpalletType = $('#zpalletTypeV').val();
                checkData[i].filmWrap = $('#filmWrapV').val();
                checkData[i].step = 3;
                checkData[i].packageType = $('#packageTypeV').val() ? $('#packageTypeV').val() : checkData[i].packageType;
                checkData[i].zpalletType = $('#zpalletTypeV').val() ? $('#zpalletTypeV').val() : checkData[i].zpalletType;
                checkData[i].filmWrap = $('#filmWrapV').val() ? $('#filmWrapV').val() : checkData[i].filmWrap;
                checkData[i].step = 2;
            }
            $.ajax({