自动化立体仓库 - WMS系统
#
LSH
2024-05-17 35188af778496c29dc74254df1e07f777b769620
#
7个文件已修改
263 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/RowLastno.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/WcsController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/RowLastnoMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/rowLastno/rowLastno.js 124 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/rowLastno/rowLastno_detail.html 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/RowLastno.java
@@ -135,6 +135,13 @@
    @TableField("sign_type_other_boolean")
    private String signTypeOtherBoolean;
    /**
     * 其它标记类别(是否输送线互通)
     */
    @ApiModelProperty(value= "入库站点集合")
    @TableField("sta_no_list")
    private String staNoList;
    public RowLastno() {}
    public RowLastno(String wrkMk,Integer currentRow,Integer sRow,Integer eRow,Integer crnQty,String memo,Long modiUser,Date modiTime,Long appeUser,Date appeTime,Integer limintLoc) {
@@ -162,7 +169,7 @@
//            null,    // 修改时间
//            null,    // 创建者
//            null,    // 添加时间
//            null    //
//            null    //
//    );
    public Integer getWhsType() {
@@ -292,7 +299,6 @@
    public void setLimintLoc(Integer limintLoc) {
        this.limintLoc = limintLoc;
    }
    public Integer getsCrnNo() {
        return sCrnNo;
    }
@@ -333,4 +339,12 @@
        this.signTypeOtherBoolean = signTypeOtherBoolean;
    }
    public String getStaNoList() {
        return staNoList;
    }
    public void setStaNoList(String StaNoList) {
        this.staNoList = StaNoList;
    }
}
src/main/java/com/zy/asrs/utils/Utils.java
@@ -1,5 +1,6 @@
package com.zy.asrs.utils;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Arith;
import com.core.common.Cools;
import com.core.common.SpringUtils;
@@ -226,24 +227,17 @@
//    }
    public static Integer GetWhsType(Integer sourceStaNo) {
        switch (sourceStaNo){
            case 104:
            case 173:
            case 174:
            case 175:
            case 130:
            case 125:
                return 5;
            case 204:
            case 273:
            case 274:
            case 275:
            case 230:
            case 225:
                return 2;
            default:
                return 0;
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        List<RowLastno> rowLastnos = rowLastnoService.selectList(new EntityWrapper<RowLastno>());
        for (RowLastno rowLastno:rowLastnos){
            String[] staNoList = rowLastno.getStaNoList().split(";");
            for (String staNo : staNoList){
                if (staNo.equals(sourceStaNo.toString())){
                    return rowLastno.getWhsType();
                }
            }
        }
        return 0;
    }
    public static boolean BooleanWhsTypeStaIoType(Integer whsType) {  //查询相似物料开关
@@ -565,12 +559,12 @@
    /*
    * 最深库位排号 : curRow
    * 最浅库位排号 : nearRow
    * 最浅库位号,用于锁定列、层 : nearRow
    * 入库  true:pakin
    * 出库  false:pakin
    * */
     * 最深库位排号 : curRow
     * 最浅库位排号 : nearRow
     * 最浅库位号,用于锁定列、层 : nearRow
     * 入库  true:pakin
     * 出库  false:pakin
     * */
    // 外侧方向的货位  优先入库方向 ===>> 反之
    public static List<String> getGroupOutLocCrn(Integer curRow,Integer nearRow,String locNo,boolean pakin){
        List<String> result = new ArrayList<>();
src/main/java/com/zy/common/service/CommonService.java
@@ -311,6 +311,7 @@
            }else {
                staNo = basDevpService.selectById(staDesc.getCrnStn());
                if (!staNo.getAutoing().equals("Y")) {
                    log.error("目标站"+staDesc.getCrnStn()+"不可用");
//                throw new CoolException("目标站"+staDesc.getCrnStn()+"不可用");
                    crnNo = 0;
                }
@@ -328,25 +329,65 @@
        // 1.按规则查找库位
        if (Cools.isEmpty(locMast) && crnNo != 0) {
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("row1", nearRow).eq("loc_sts", "O").orderBy("lev1",true).orderBy("bay1",true));
            List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                    .eq("row1", nearRow)
                    .eq("loc_sts", "O")
                    .orderBy("lev1",true).orderBy("bay1",true));
            for (LocMast locMast1 : locMasts) {
                if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                    continue;
                }
                if (Utils.BooleanWhsTypeStaIoType(whsType)){
                    String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                    LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                            .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                    if (!Cools.isEmpty(locMast2)) {
                        locMast = locMast2;
                        break;
                    }
                }else {
                } else {
                    if (!Cools.isEmpty(locMast1)) {
                        locMast = locMast1;
                        break;
                    }
                }
            }
            if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(whsType)){
                for (LocMast locMast1 : locMasts) {
                    if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) {
                        continue;
                    }
                    if (Utils.BooleanWhsTypeStaIoType(whsType)){
                        String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo());
                        LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                .eq("loc_no", shallowLoc).eq("loc_sts", "O"));
                        if (!Cools.isEmpty(locMast2)) {
                            locMast = locMast2;
                            break;
                        } else {
                            locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                    .eq("loc_no", shallowLoc).eq("loc_sts", "F"));
                            if (!Cools.isEmpty(locMast2)) {
                                locMast = locMast2;
                                break;
                            } else {
                                locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>()
                                        .eq("loc_no", shallowLoc).eq("loc_sts", "D"));
                                if (!Cools.isEmpty(locMast2)) {
                                    locMast = locMast2;
                                    break;
                                }
                            }
                        }
                    } else {
                        if (!Cools.isEmpty(locMast1)) {
                            locMast = locMast1;
                            break;
                        }
                    }
                }
            }
        }
        if (!Cools.isEmpty(locMast) && !basCrnpService.checkSiteError(crnNo, true)) {
src/main/java/com/zy/common/web/WcsController.java
@@ -485,9 +485,9 @@
        BasDevp sourceStaNo = basDevpService.checkSiteStatus(devpNo, true);
        // 检索库位
        List<KeyValueVo> list = waitPakins.stream().map(item-> new KeyValueVo(item.getMatnr(), item.getBatch())).distinct().collect(Collectors.toList());
        List<String> matNos = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList());
        StartupDto dto = commonService.getLocNo(1, 1, devpNo, matNos.get(0),null,null, locTypeDto);
        List<String> matnrs = waitPakins.stream().map(WaitPakin::getMatnr).distinct().collect(Collectors.toList());
        List<String> batchs = waitPakins.stream().map(WaitPakin::getBatch).distinct().collect(Collectors.toList());
        StartupDto dto = commonService.getLocNo(1, 1, devpNo, matnrs.get(0),batchs.get(0),null, locTypeDto);
        int workNo = dto.getWorkNo();
        Date now = new Date();
        // 生成工作档
src/main/resources/mapper/RowLastnoMapper.xml
@@ -21,6 +21,7 @@
        <result column="sign_type" property="signType" />
        <result column="sign_type_other" property="signTypeOther" />
        <result column="sign_type_other_boolean" property="signTypeOtherBoolean" />
        <result column="sta_no_list" property="staNoList" />
    </resultMap>
src/main/webapp/static/js/rowLastno/rowLastno.js
@@ -28,6 +28,7 @@
            ,{field: 'sCrnNo', align: 'center',title: '起始堆垛机号'}
            ,{field: 'eCrnNo', align: 'center',title: '终止堆垛机号'}
            ,{field: 'crnQty', align: 'center',title: '堆垛机数量'}
            ,{field: 'staNoList', align: 'center',title: '站点集合'}
            ,{field: 'memo', align: 'center',title: '备注'}
            ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true}
            ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}
@@ -103,7 +104,7 @@
                    content: 'rowLastno_detail.html',
                    success: function(layero, index){
                        layer.getChildFrame('#data-detail-submit-edit', index).hide();
                        clearFormVal(layer.getChildFrame('#detail', index));
                        clearFormVal(layer.getChildFrame('#detail', index));
                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                    }
                });
@@ -231,35 +232,35 @@
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '修改详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: false,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: baseUrl+"/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                   } else if (res.code === 403){
                                       parent.location.href = "/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                    layer.open({
                        type: 2,
                        title: '修改详情',
                        maxmin: true,
                        area: [top.detailWidth, top.detailHeight],
                        shadeClose: false,
                        content: '../user/user_detail.html',
                        success: function(layero, index){
                            $.ajax({
                                url: baseUrl+"/user/"+ param +"/auth",
                                headers: {'token': localStorage.getItem('token')},
                                method: 'GET',
                                success: function (res) {
                                    if (res.code === 200){
                                        setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                        layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                    } else if (res.code === 403){
                                        parent.location.href = "/";
                                    }else {
                                        layer.msg(res.msg)
                                    }
                                }
                            })
                        }
                    });
                }
                break;
            case 'appeUser':
@@ -267,36 +268,36 @@
                if (param === undefined) {
                    layer.msg("无数据");
                } else {
                   layer.open({
                       type: 2,
                       title: '创详情',
                       maxmin: true,
                       area: [top.detailWidth, top.detailHeight],
                       shadeClose: false,
                       content: '../user/user_detail.html',
                       success: function(layero, index){
                           $.ajax({
                               url: baseUrl+"/user/"+ param +"/auth",
                               headers: {'token': localStorage.getItem('token')},
                               method: 'GET',
                               success: function (res) {
                                   if (res.code === 200){
                                       setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                       top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                       layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide();
                                       layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                       layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                       layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                       layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                   } else if (res.code === 403){
                                       parent.location.href = "/";
                                   }else {
                                       layer.msg(res.msg)
                                   }
                               }
                           })
                       }
                   });
                    layer.open({
                        type: 2,
                        title: '创详情',
                        maxmin: true,
                        area: [top.detailWidth, top.detailHeight],
                        shadeClose: false,
                        content: '../user/user_detail.html',
                        success: function(layero, index){
                            $.ajax({
                                url: baseUrl+"/user/"+ param +"/auth",
                                headers: {'token': localStorage.getItem('token')},
                                method: 'GET',
                                success: function (res) {
                                    if (res.code === 200){
                                        setFormVal(layer.getChildFrame('#detail', index), res.data, true);
                                        top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
                                        layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide();
                                        layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
                                        layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
                                        layero.find('iframe')[0].contentWindow.layui.form.render('select');
                                        layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
                                    } else if (res.code === 403){
                                        parent.location.href = "/";
                                    }else {
                                        layer.msg(res.msg)
                                    }
                                }
                            })
                        }
                    });
                }
                break;
@@ -328,9 +329,10 @@
            currentRow: $('#currentRow').val(),
            sRow: $('#sRow').val(),
            eRow: $('#eRow').val(),
            crnQty: $('#crnQty').val(),
            sCrnNo: $('#sCrnNo').val(),
            eCrnNo: $('#eCrnNo').val(),
            crnQty: $('#crnQty').val(),
            staNoList: $('#staNoList').val(),
            memo: $('#memo').val(),
            modiUser: $('#modiUser').val(),
            modiTime: top.strToDate($('#modiTime\\$').val()),
src/main/webapp/views/rowLastno/rowLastno_detail.html
@@ -15,14 +15,14 @@
<!-- 详情 -->
<div id="data-detail" class="layer_self_wrap">
    <form id="detail" class="layui-form">
    <!--
        <div class="layui-inline"  style="display: none">
            <label class="layui-form-label"><span class="not-null">*</span>编  号:</label>
            <div class="layui-input-inline">
                <input id="id" class="layui-input" type="text" placeholder="编号">
        <!--
            <div class="layui-inline"  style="display: none">
                <label class="layui-form-label"><span class="not-null">*</span>编  号:</label>
                <div class="layui-input-inline">
                    <input id="id" class="layui-input" type="text" placeholder="编号">
                </div>
            </div>
        </div>
    -->
        -->
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label"><span class="not-null">*</span>类  别:</label>
            <div class="layui-input-inline">
@@ -54,6 +54,12 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">堆垛机数量:</label>
            <div class="layui-input-inline">
                <input id="crnQty" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">起始堆垛机号:</label>
            <div class="layui-input-inline">
                <input id="sCrnNo" class="layui-input" type="text">
@@ -66,9 +72,9 @@
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
            <label class="layui-form-label">堆垛机数量:</label>
            <label class="layui-form-label">站点集合(;):</label>
            <div class="layui-input-inline">
                <input id="crnQty" class="layui-input" type="text">
                <input id="staNoList" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline"  style="width:31%;">
@@ -140,5 +146,4 @@
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/rowLastno/rowLastno.js" charset="utf-8"></script>
</html>
</html>