自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-08-18 25bcc429993cc31d88a621e1b917ec0ab41d1ac0
src/main/java/com/zy/asrs/utils/Utils.java
@@ -3,6 +3,7 @@
import com.core.common.Arith;
import com.core.common.Cools;
import com.zy.common.properties.SlaveProperties;
import com.zy.common.service.CommonService;
import java.text.DecimalFormat;
import java.util.ArrayList;
@@ -161,6 +162,37 @@
    }
    public static Integer getGroupRow(String locNo, Boolean pakin){
        int row = getRow(locNo);
        if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) {
            return pakin?17:2;
        }
        if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) {
            return pakin?30:18;
        }
        throw new RuntimeException("库位解析异常");
    }
    public static List<String> getGroupLoc(String locNo){
        int row = getRow(locNo);
        if (CommonService.FIRST_GROUP_ROW_LIST.contains(row)) {
            List<String> result = new ArrayList<>();
            for (Integer row0 : CommonService.FIRST_GROUP_ROW_LIST) {
                result.add(zerofill(String.valueOf(row0), 2) + locNo.substring(2));
            }
            return result;
        }
        if (CommonService.SECOND_GROUP_ROW_LIST.contains(row)) {
            List<String> result = new ArrayList<>();
            for (Integer row0 : CommonService.SECOND_GROUP_ROW_LIST) {
                result.add(zerofill(String.valueOf(row0), 2) + locNo.substring(2));
            }
            return result;
        }
        throw new RuntimeException("库位解析异常");
    }
    public static void main(String[] args) {
        SlaveProperties slaveProperties = new SlaveProperties();
        slaveProperties.setDoubleDeep(true);