그냥 분기처리
This commit is contained in:
@@ -50,8 +50,8 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
|||||||
monthlyStatus.isForestNone() ? "/info/monthly" : String.format("/info/monthly/month/%s", command.getSearchMonth())));
|
monthlyStatus.isForestNone() ? "/info/monthly" : String.format("/info/monthly/month/%s", command.getSearchMonth())));
|
||||||
|
|
||||||
YearMonth yearMonth = YearMonth.parse(command.getSearchMonth(), DateTimeFormatter.ofPattern("yyyyMM"));
|
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 = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
||||||
boolean editable = !LocalDate.now().isAfter(maxMonth);
|
boolean editable = !LocalDate.now().isAfter(maxMonth);
|
||||||
|
|
||||||
monthlyList.add(new CalendarChildren(
|
monthlyList.add(new CalendarChildren(
|
||||||
|
|||||||
@@ -83,11 +83,11 @@ class GetBankInputUIController {
|
|||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||||
|
|
||||||
// TODO 이걸로 수정해야됨
|
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
// LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : 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 minMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
||||||
LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
boolean editable = !today.isAfter(maxMonth);
|
boolean editable = !today.isAfter(maxMonth);
|
||||||
boolean preEditable = !today.isBefore(minMonth);
|
boolean preEditable = !today.isBefore(minMonth);
|
||||||
|
|||||||
@@ -82,11 +82,10 @@ class GetBankOutputUIController {
|
|||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||||
|
|
||||||
// TODO 이걸로 수정해야됨
|
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
// LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : 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 minMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
||||||
LocalDate minMonth = yearMonth.minusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
|
||||||
|
|
||||||
LocalDate today = LocalDate.now();
|
LocalDate today = LocalDate.now();
|
||||||
boolean editable = !today.isAfter(maxMonth);
|
boolean editable = !today.isAfter(maxMonth);
|
||||||
|
|||||||
@@ -118,9 +118,11 @@ class CreateMonthlyUIController {
|
|||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||||
//LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
//LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
||||||
// TODO 이걸로 돌려야됨
|
LocalDate maxMonth = DailyRecordConstants.MODIFY_LIMIT_MONTH == 31 ?
|
||||||
//LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth() : yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
||||||
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atEndOfMonth();
|
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();
|
LocalDate today = LocalDate.now();
|
||||||
boolean editable = !today.isAfter(maxMonth);
|
boolean editable = !today.isAfter(maxMonth);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user