自动化立体仓库 - WMS系统
skyouc
2 天以前 de8a641769b80abca23a344b521bcdfe0dbca31f
src/main/java/com/zy/asrs/utils/Utils.java
@@ -16,6 +16,8 @@
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -46,6 +48,17 @@
                msgBuilder.insert(0, "0");
            }
            return msgBuilder.toString();
        }
    }
    public static boolean isValidFormat(String dateStr, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        sdf.setLenient(false); // 严格模式,必须完全匹配格式
        try {
            sdf.parse(dateStr);
            return true;
        } catch (ParseException e) {
            return false;
        }
    }
@@ -476,7 +489,7 @@
            }
            if ((curRow - sRow) % 4 == 0) {
                necessaryParameters[1] = curRow;    //curRow   最深库位排
                necessaryParameters[2] = (curRow - sRow + 2) / 4 + sCrnNo - 1;     //crnNo     堆垛机号
                necessaryParameters[2] = (curRow - sRow + 2) / 4 + sCrnNo;     //crnNo     堆垛机号
                necessaryParameters[3] = curRow + 1;    //nearRow  最浅库位排
            } else if ((curRow - sRow + 1) % 4 == 0) {
                necessaryParameters[1] = curRow;    //curRow   最深库位排