그냥 분기처리

This commit is contained in:
주수현
2025-07-23 17:38:12 +09:00
parent 836147cea1
commit 8d6b3add8e
4 changed files with 16 additions and 15 deletions

View File

@@ -50,8 +50,8 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
monthlyStatus.isForestNone() ? "/info/monthly" : String.format("/info/monthly/month/%s", command.getSearchMonth())));
YearMonth yearMonth = YearMonth.parse(command.getSearchMonth(), DateTimeFormatter.ofPattern("yyyyMM"));
//LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE); TODO 이걸로 돌려야됨.
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
boolean editable = !LocalDate.now().isAfter(maxMonth);
monthlyList.add(new CalendarChildren(

View File

@@ -83,11 +83,11 @@ class GetBankInputUIController {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
// TODO 이걸로 수정해야됨
// LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
// LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate minMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate today = LocalDate.now();
boolean editable = !today.isAfter(maxMonth);
boolean preEditable = !today.isBefore(minMonth);

View File

@@ -82,11 +82,10 @@ class GetBankOutputUIController {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
// TODO 이걸로 수정해야됨
// LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
// LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate minMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate today = LocalDate.now();
boolean editable = !today.isAfter(maxMonth);

View File

@@ -118,9 +118,11 @@ class CreateMonthlyUIController {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
//LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
// TODO 이걸로 돌려야됨
//LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate minMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
LocalDate today = LocalDate.now();
boolean editable = !today.isAfter(maxMonth);