feat: 项目需求管理

This commit is contained in:
2025-11-19 11:23:19 +08:00
parent c038b42e09
commit f13ef3232b
78 changed files with 3621 additions and 10 deletions

View File

@@ -0,0 +1,17 @@
package org.nl.common.pojo;
import lombok.Builder;
import lombok.Data;
/**
* 下拉框字段
* @Author: lyd
* @Date: 2025/11/11
*/
@Data
@Builder
public class SelectListItem {
public String label;
public String value;
}

View File

@@ -17,6 +17,9 @@ import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;
/**
@@ -180,4 +183,17 @@ public class CommonTimeFormatUtil {
}
return result;
}
public static long calculateDaysBetween(Date startTime, Date endTime) {
// 将 Date 转换为 LocalDate
LocalDate startDate = startTime.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
LocalDate endDate = endTime.toInstant()
.atZone(ZoneId.systemDefault())
.toLocalDate();
// 计算天数差
return ChronoUnit.DAYS.between(startDate, endDate);
}
}