自动化立体仓库 - WMS系统
#
LSH
2024-05-17 35188af778496c29dc74254df1e07f777b769620
#
7个文件已修改
111 ■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/RowLastno.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 45 ●●●●● 补丁 | 查看 | 原始文档 | 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 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/rowLastno/rowLastno_detail.html 11 ●●●● 补丁 | 查看 | 原始文档 | 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) {
@@ -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,25 +227,18 @@
//    }
    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) {  //查询相似物料开关
        if (whsType == 1 || whsType==3 || whsType==4) {
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,14 +329,18 @@
        // 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;
@@ -347,6 +352,42 @@
                    }
                }
            }
            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}
@@ -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
@@ -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%;">
@@ -141,4 +147,3 @@
<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>