自动化立体仓库 - WCS系统
*
hmpc
2025-01-21 974ee1298c9db729077f86ae6e773c6a44d5e77d
src/main/java/com/zy/asrs/utils/TimeCalculatorUtils.java
@@ -156,6 +156,17 @@
        return endDay.getTime() - startDay.getTime();
    }
    //获秒差异
    public static long differenceInSeconds(Date startDay, Date endDay) {
        if (startDay == null || endDay == null) {
            throw new IllegalArgumentException("Dates cannot be null");
        }
        // 获取毫秒差异,并转换为秒
        long millisecondsDifference = endDay.getTime() - startDay.getTime();
        return millisecondsDifference / 1000;
    }
    public static boolean CompareData(Date startDay,Date endDay){
        // 将日期字符串解析为LocalDate对象