自动化立体仓库 - WMS系统
1
zhang
5 天以前 f4a02e646e174cb6d134286d30ac75120bc6e972
1
3个文件已修改
55 ■■■■ 已修改文件
src/main/java/com/zy/asrs/utils/Utils.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/service/CommonService.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/Utils.java
@@ -8,17 +8,10 @@
import com.zy.asrs.entity.LocMast;
import com.zy.asrs.entity.RowLastno;
import com.zy.asrs.service.RowLastnoService;
import com.zy.common.CodeBuilder;
import com.zy.common.model.LocDetlDto;
import com.zy.common.properties.SlaveProperties;
import com.zy.common.service.CommonService;
import com.zy.system.service.UserService;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
@@ -123,7 +116,7 @@
     */
    public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) {
        int row = getRow(deepLoc);
        boolean deepLocLeft = isDeepLoc(slaveProperties, row);//判断是否为左深库位
        boolean deepLocLeft = isDeepLocLeft(slaveProperties, row);//判断是否为左深库位
        int shallowRow = deepLocLeft? (row + 1) : (row - 1);
        return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2);
    }
@@ -137,6 +130,24 @@
        int shallowRow = deepLocLeft? (row - 1) : (row + 1);
        return zerofill(String.valueOf(shallowRow), 2) + shallowLoc.substring(2);
    }
    /**
     * 获取 浅库位对应的深库位号,如果没有深库位,则返回为空
     */
    public static String getDeepLoc2(SlaveProperties slaveProperties, String shallowLoc) {
        int row = getRow(shallowLoc);
        boolean deepLocLeft = isDeepLoc(slaveProperties, row);//判断是否为深库位
        if (!deepLocLeft) {
            return null;
        }
        //4,7,11,15,19,23
        if (row == 4 || row == 7 || row == 11 || row == 15 || row == 19 || row == 23) {
            return zerofill(String.valueOf(row + 1), 2) + shallowLoc.substring(2);
        } else {
            return zerofill(String.valueOf(row - 1), 2) + shallowLoc.substring(2);
        }
    }
    /**
     * 获取 深库位排对应的浅库位排
@@ -464,6 +475,7 @@
        return necessaryParameters;
    }
    //四向库(牛眼\光泰)
    public static int[] LocNecessaryParametersDoubleExtension6(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
src/main/java/com/zy/common/service/CommonService.java
@@ -235,7 +235,12 @@
                //尝试找1号弯轨堆垛机库位
                crnNo = 1;
                if (basCrnpService.checkSiteError(crnNo, true)) {
                    List<Integer> nearRowList = new ArrayList<Integer>(){{add(4);add(6);add(3);add(1);}};
                    List<Integer> nearRowList = new ArrayList<Integer>() {{
                        add(4);
                        add(6);
                        add(3);
                        add(1);
                    }};
                    for (Integer near : nearRowList) {
                        List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                                .eq("row1", near)
@@ -261,7 +266,12 @@
                //尝试找1号弯轨堆垛机库位
                crnNo = 1;
                if (basCrnpService.checkSiteError(crnNo, true)) {
                    List<Integer> nearRowList = new ArrayList<Integer>(){{add(4);add(6);add(3);add(1);}};
                    List<Integer> nearRowList = new ArrayList<Integer>() {{
                        add(4);
                        add(6);
                        add(3);
                        add(1);
                    }};
                    for (Integer near : nearRowList) {
                        List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                                .eq("row1", near)
@@ -554,9 +564,16 @@
        if (crnNo == 1) {
            configService.updateValue("123CrnSearchList", String.valueOf(0));
        }
        //针对1号堆垛机打的补丁,防止找到库位时,找到最浅库位
        String deepLoc2 = Utils.getDeepLoc2(slaveProperties, locMast.getLocNo());
        if (!Cools.isEmpty(deepLoc2)) {
            LocMast locMastNew = locMastService.selectOne(new EntityWrapper<LocMast>()
                    .eq("loc_no", deepLoc2).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()));
            if (!Cools.isEmpty(locMastNew)) {
                locMast = locMastNew;
            }
        }
        String locNo = locMast.getLocNo();
        // 生成工作号
        int workNo = getWorkNo(0);
        // 返回dto
src/main/resources/application.yml
@@ -70,7 +70,7 @@
  # 左深库位排号
  doubleLocsLeft: 4,7,11,15,19,23
  # 右深库位排号
  doubleLocsRight: 3,7,10,14,18,22,26
  doubleLocsRight: 3,10,14,18,22,26
# wms参数配置
wms-parameter:
  # 自动补空板功能开关