自动化立体仓库 - WMS系统
#
lsh
2024-06-12 c372044e2081581bcf7df4969ea33552ad3bd9d8
src/main/java/com/zy/asrs/utils/Utils.java
@@ -279,30 +279,31 @@
    //库位排号分配
    public static int[] LocNecessaryParameters(Integer whsType, Integer curRow, Integer crnNumber) {
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        switch (whsType){
            case 1://经典双伸库位
                return LocNecessaryParametersDoubleExtension(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善
            case 2://经典单伸库位(2排货架)
                return LocNecessaryParametersDoubleExtension2(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //已完善
            case 3://经典单双伸库位  左单右双(小单大双)
                return LocNecessaryParametersDoubleExtension3(whsType, curRow, crnNumber); //未完善
                return LocNecessaryParametersDoubleExtension3(rowLastno, curRow, crnNumber); //未完善
            case 4://经典单双伸库位  左双右单(小双大单)
                return LocNecessaryParametersDoubleExtension4(whsType, curRow, crnNumber); //未完善
                return LocNecessaryParametersDoubleExtension4(rowLastno, curRow, crnNumber); //未完善
            case 5://双工位单伸库位(4排货架)
                return LocNecessaryParametersDoubleExtension5(whsType, curRow, crnNumber); //已完善
                return LocNecessaryParametersDoubleExtension5(rowLastno, curRow, crnNumber); //已完善
            default:
                return LocNecessaryParametersMove(whsType, curRow, crnNumber);//moveCrnNo
                return LocNecessaryParametersMove(rowLastno, curRow, crnNumber);//moveCrnNo
        }
    }
    //经典双伸库位
    public static int[] LocNecessaryParametersDoubleExtension(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 4 + sRow - 1)) {
@@ -335,7 +336,7 @@
    }
    //经典双伸库位移库
    public static int[] LocNecessaryParametersMove(Integer whsType, Integer curRow, Integer moveCrnNo) {
    public static int[] LocNecessaryParametersMove(RowLastno rowLastno, Integer curRow, Integer moveCrnNo) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        necessaryParameters[0] = 2; // 轮询次数
        if (curRow.equals(moveCrnNo*4-2)){
@@ -351,13 +352,11 @@
    }
    //经典单伸库位
    public static int[] LocNecessaryParametersDoubleExtension2(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension2(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 2 + sRow - 1)) {
@@ -390,13 +389,11 @@
    }
    //经典单双伸库位  左单右双(小单大双)
    public static int[] LocNecessaryParametersDoubleExtension3(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension3(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 3 + sRow - 1)) {
@@ -429,13 +426,11 @@
    }
    //经典单双伸库位  左双右单(小双大单)
    public static int[] LocNecessaryParametersDoubleExtension4(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension4(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 3 + sRow - 1)) {
@@ -468,13 +463,11 @@
    }
    //双工位单伸库位
    public static int[] LocNecessaryParametersDoubleExtension5(Integer whsType, Integer curRow, Integer crnNumber) {
    public static int[] LocNecessaryParametersDoubleExtension5(RowLastno rowLastno, Integer curRow, Integer crnNumber) {
        int[] necessaryParameters = new int[]{0, 0, 0, 0};
        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
        RowLastno rowLastno = rowLastnoService.selectById(whsType);
        Integer sRow = rowLastno.getsRow();
        Integer sCrnNo = rowLastno.getsCrnNo();
        if (BooleanWhsTypeSta(whsType)) {
        if (BooleanWhsTypeSta(rowLastno.getWhsType())) {
            necessaryParameters[0] = crnNumber; // 轮询次数
            //满板正常入库
            if (curRow.equals(crnNumber * 4 + sRow - 1)) {