날짜 기준 15일 -> 월기준 15일로 변경 했는데 잘될지는 모르겟음 (TODO 15일로 변경 되어야됨)
임산물 / 은행자동이체도 바꾸엇지만 잘될지는 모르겠음,,,,ㅠ
This commit is contained in:
@@ -18,6 +18,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -48,12 +49,16 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
monthlyStatus.isForestNone() ? 0 : 1,
|
||||
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);
|
||||
boolean editable = !LocalDate.now().isAfter(maxMonth);
|
||||
|
||||
monthlyList.add(new CalendarChildren(
|
||||
"BANK",
|
||||
"은행 자동이체 내역 등록",
|
||||
null,
|
||||
monthlyStatus.isBankNone() ? 0 : 1,
|
||||
(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMM")).equals(command.getSearchMonth())) ? "/info/bank" : null));
|
||||
editable ? String.format("/info/bank/%s", command.getSearchMonth()) : null));
|
||||
|
||||
List<RecordCalendar> refineList = new ArrayList<>();
|
||||
for (DailyRecordCalendarDto calendar : calendarList) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.module.front.usecase.info.bankUI.getBankInputUI.adapters.web;
|
||||
|
||||
import app.module.core.config.application.enums.MonthStatus;
|
||||
import app.module.core.config.constants.DailyRecordConstants;
|
||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.info.bank.getBanks.ports.GetBanksPortIn;
|
||||
@@ -82,8 +83,8 @@ class GetBankInputUIController {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||
|
||||
LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
||||
LocalDate minMonth = yearMonth.minusMonths(1).atDay(15);
|
||||
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 today = LocalDate.now();
|
||||
boolean editable = !today.isAfter(maxMonth);
|
||||
boolean preEditable = !today.isBefore(minMonth);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.module.front.usecase.info.bankUI.getBankOutputUI.adapters.web;
|
||||
|
||||
import app.module.core.config.application.enums.MonthStatus;
|
||||
import app.module.core.config.constants.DailyRecordConstants;
|
||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.info.bank.getBanks.ports.GetBanksPortIn;
|
||||
@@ -81,10 +82,11 @@ class GetBankOutputUIController {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||
|
||||
LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
||||
LocalDate minMonth = yearMonth.minusMonths(1).atDay(15);
|
||||
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 today = LocalDate.now();
|
||||
boolean editable = !today.isAfter(maxMonth);
|
||||
|
||||
boolean preEditable = !today.isBefore(minMonth);
|
||||
|
||||
model.addAttribute("pastMonthlyInfo", pastMonthlyInfo);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package app.module.front.usecase.info.monthlyUI.createMonthlyUI.adapters.web;
|
||||
|
||||
import app.module.core.config.application.enums.MonthStatus;
|
||||
import app.module.core.config.constants.DailyRecordConstants;
|
||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.info.monthly.getMonthlyInputStatus.ports.GetMonthlyInputStatusPortIn;
|
||||
@@ -16,6 +17,7 @@ import app.module.front.usecase.info.monthlyProduct.getMonthlyForestProducts.por
|
||||
import app.module.front.usecase.info.monthlyProduct.getMonthlyForestProducts.ports.application.domain.GetMonthlyForestProducts;
|
||||
import app.module.front.usecase.info.monthlyProduct.getMonthlyForestProducts.ports.application.domain.GetMonthlyForestProductsCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -31,6 +33,7 @@ import java.time.YearMonth;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequiredArgsConstructor
|
||||
class CreateMonthlyUIController {
|
||||
@@ -114,10 +117,12 @@ class CreateMonthlyUIController {
|
||||
//수정 가능 여부 판단
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
||||
YearMonth yearMonth = YearMonth.parse(currentMonthlyInfo.getMonth(), formatter);
|
||||
LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
||||
//LocalDate maxMonth = yearMonth.plusMonths(1).atDay(15);
|
||||
LocalDate maxMonth = yearMonth.plusMonths(DailyRecordConstants.MODIFY_LIMIT_MONTH).atDay(DailyRecordConstants.MODIFY_LIMIT_DATE);
|
||||
log.info("####################maxMonth={}",maxMonth);
|
||||
LocalDate today = LocalDate.now();
|
||||
boolean editable = !today.isAfter(maxMonth);
|
||||
|
||||
log.info("####################editable={}",editable);
|
||||
|
||||
model.addAttribute("pastMonthlyInfo", pastMonthlyInfo);
|
||||
model.addAttribute("currentMonthlyInfo", currentMonthlyInfo);
|
||||
|
||||
@@ -819,8 +819,7 @@
|
||||
|
||||
// 오늘 날짜가 해당 달의 마지막 날인지 확인
|
||||
const today = new Date();
|
||||
//const lastDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0); // 해당 달의 마지막 날
|
||||
const lastDayOfMonth = new Date(today.getFullYear(), today.getMonth(), 22); // TODO 삭제 테스트를 위해 22일로 수정
|
||||
const lastDayOfMonth = new Date(today.getFullYear(), today.getMonth() + 1, 0); // 해당 달의 마지막 날
|
||||
// 마지막 alert 날짜 확인
|
||||
const lastAlertDate = sessionStorage.getItem('lastAlertDate');
|
||||
const todayDateString = today.toDateString();
|
||||
|
||||
Reference in New Issue
Block a user