家族-收入-周期列表-按成员加入时间做限制

This commit is contained in:
2025-10-16 15:08:13 +08:00
parent e203815cff
commit f9f0ef73a3

View File

@@ -48,7 +48,7 @@ public class HalfMonthCycleTimeUtil {
}
public static ZonedDateTime getCycleTimeZdt(ZonedDateTime zdt) {
return getCycleDateZdt(zdt).withHour(0).withMinute(0).withSecond(0);
return getCycleDateZdt(zdt).withHour(0).withMinute(0).withSecond(0).withNano(0);
}
public static String getCycleDate(ZonedDateTime zdt) {
@@ -116,13 +116,13 @@ public class HalfMonthCycleTimeUtil {
List<CycleDateVo> list = new ArrayList<>();
ZonedDateTime limitZdt = ZonedDateTime.ofInstant(limit.toInstant(), zoneId);
ZonedDateTime limitStartTime = getCycleDateZdt(limitZdt);
ZonedDateTime limitStartTime = getCycleTimeZdt(limitZdt);
Date date = new Date();
ZonedDateTime zdt = ZonedDateTime.ofInstant(date.toInstant(), zoneId);
ZonedDateTime startTime = getCycleTimeZdt(zdt);
while (zdt.isAfter(limitStartTime)) {
while (startTime.isEqual(limitStartTime) || startTime.isAfter(limitStartTime)) {
ZonedDateTime endTime = getCycleEndTimeZdt(zdt);
CycleDateVo vo = new CycleDateVo();