Merge branch 'dev' into 'deploy-dev-front'
Dev See merge request korea-research/korea-research!42
This commit is contained in:
@@ -1,102 +0,0 @@
|
||||
package app.module.front.config.application.util;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DailyUtil {
|
||||
|
||||
/**
|
||||
* int -> localdate
|
||||
* @param month 월(yyyyMM)
|
||||
* @param day 일(d)
|
||||
* @return LocalDate
|
||||
*/
|
||||
public LocalDate getDayToLocalDate(String month, int day) {
|
||||
SimpleDateFormat beforeSdf = new SimpleDateFormat("yyyyMMdd", Locale.KOREAN);
|
||||
SimpleDateFormat afterSdf = new SimpleDateFormat("yyyy-MM-dd", Locale.KOREAN);
|
||||
|
||||
try {
|
||||
Date formatDate = beforeSdf.parse(month + String.format("%02d", day));
|
||||
|
||||
return LocalDate.parse(afterSdf.format(formatDate));
|
||||
} catch (Exception e) {
|
||||
log.warn("[DailyUtil][getDayToLocalDate] month={}, day={}", month, day, e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 마지막 일 여부
|
||||
*
|
||||
* @param searchDate 종료일(yyyy-MM-dd)
|
||||
* @return true=마지막 일, false=마지막 일 아님
|
||||
*/
|
||||
public boolean isLastDay(LocalDate searchDate) {
|
||||
if (searchDate != null) {
|
||||
LocalDate lastDate = searchDate.withDayOfMonth(searchDate.lengthOfMonth());
|
||||
|
||||
return searchDate == lastDate;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색 일의 마지막 일 조회
|
||||
* @param searchDate 검색
|
||||
* @return 마지막 일
|
||||
*/
|
||||
public int getLastDay(LocalDate searchDate) {
|
||||
return searchDate.withDayOfMonth(searchDate.lengthOfMonth()).getDayOfMonth();
|
||||
}
|
||||
|
||||
/**
|
||||
* 자가농업 항목 오픈 여부
|
||||
* [정책] 자가농업 생산물 중 자가소비량은 7일차 등록일에만 노출 및 선택, 21일 이후는 마지막 날
|
||||
*
|
||||
* @param groupNo
|
||||
* @param searchDate 종료일
|
||||
* @return true=대상, false=대상 아님
|
||||
*/
|
||||
public boolean isFarmingOpen(int groupNo, LocalDate searchDate) {
|
||||
return groupNo == 4 || groupNo == 8 || groupNo == 12 || isLastDay(searchDate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 데이터 수정 가능 여부
|
||||
* [정책] 15일전까지 데이터 수정 가능(등록도 불가)
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return true=수정 가능, false=수정 불가
|
||||
*/
|
||||
public boolean isModifiable(LocalDate startDate, LocalDate endDate) {
|
||||
// TODO : 15일로 변경, 테스트를 위해 30일로 진행중
|
||||
LocalDate limitStart = LocalDate.now().minusDays(30);
|
||||
log.debug("isModifiable @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
||||
|
||||
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate) || limitStart.isEqual(endDate));
|
||||
}
|
||||
|
||||
/**
|
||||
* 데이터 등록 가능 여부
|
||||
* @param startDate
|
||||
* @param endDate
|
||||
* @return
|
||||
*/
|
||||
public boolean isRegisterPossible(LocalDate startDate, LocalDate endDate) {
|
||||
// TODO : 15일로 변경, 테스트를 위해 60일로 진행중
|
||||
LocalDate limitStart = LocalDate.now().minusDays(60);
|
||||
log.debug("isRegisterPossible @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
||||
|
||||
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate));
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,18 @@
|
||||
package app.module.front.usecase.daily.calendar.adapters.persistence;
|
||||
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.MonthStatus;
|
||||
import app.module.front.config.application.util.DailyUtil;
|
||||
import app.module.core.config.application.util.DailyUtil;
|
||||
import app.module.front.usecase.daily.calendar.adapters.persistence.model.DailyRecordCalendarDto;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||
import app.module.front.usecase.daily.calendar.adapters.persistence.model.MonthlyStatusDto;
|
||||
import app.module.front.usecase.daily.calendar.ports.RecordCalendarPortOut;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendar;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.CalendarChildren;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendar;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -43,14 +42,14 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
monthlyList.add(new CalendarChildren(
|
||||
"MONTHLY",
|
||||
"임산물 현황 등록",
|
||||
null, // TODO
|
||||
null,
|
||||
monthlyStatus.isForestNone() ? 0 : 1,
|
||||
monthlyStatus.isForestNone() ? "/info/monthly" : String.format("/info/monthly/month/%s", command.getSearchMonth())));
|
||||
|
||||
monthlyList.add(new CalendarChildren(
|
||||
"BANK",
|
||||
"은행 자동이체 내역 등록",
|
||||
null, // TODO
|
||||
null,
|
||||
monthlyStatus.isBankNone() ? 0 : 1,
|
||||
(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyyMM")).equals(command.getSearchMonth())) ? "/info/bank" : null));
|
||||
|
||||
@@ -60,9 +59,9 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
refine.setNo(calendar.getGroupNo());
|
||||
refine.setStart(calendar.getStartDay());
|
||||
refine.setEnd(calendar.getEndDay());
|
||||
|
||||
refine.setStartDate(dailyUtil.getDayToLocalDate(command.getSearchMonth(), calendar.getStartDay()));
|
||||
refine.setEndDate(dailyUtil.getDayToLocalDate(command.getSearchMonth(), calendar.getEndDay()));
|
||||
|
||||
refine.setRegistrable(dailyUtil.isRegisterPossible(refine.getStartDate(), refine.getEndDate()));
|
||||
refine.setModifiable(dailyUtil.isModifiable(refine.getStartDate(), refine.getEndDate()));
|
||||
|
||||
@@ -72,64 +71,59 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
|
||||
List<CalendarChildren> childList = new ArrayList<>();
|
||||
if (findStatus == null) {
|
||||
// 등록이 가능하지 않을 경우 미작성 데이터 반환
|
||||
if (!dailyUtil.isRegisterPossible(refine.getStartDate(), refine.getEndDate())) {
|
||||
childList.addAll(this.getNoneChildList(dailyUtil.isFarmingOpen(refine.getNo(), refine.getEndDate())));
|
||||
childList.addAll(this.getNoneChildrenList(dailyUtil.isFarmingOpen(refine.getNo(), refine.getEndDate())));
|
||||
}
|
||||
|
||||
} else {
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getIncomeStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getIncomeStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getIncomeStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.INCOME.name(),
|
||||
DailySort.INCOME.getDesc(),
|
||||
findStatus.getIncomeStatus(),
|
||||
findStatus.getIncomeCount(),
|
||||
String.format(pathFormat, "income", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.INCOME.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getWorkStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getWorkStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getWorkStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.WORK.name(),
|
||||
DailySort.WORK.getDesc(),
|
||||
findStatus.getWorkStatus(),
|
||||
findStatus.getWorkCount(),
|
||||
String.format(pathFormat, "work", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.WORK.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getExpenseStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getExpenseStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getExpenseStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.EXPENSE.name(),
|
||||
DailySort.EXPENSE.getDesc(),
|
||||
findStatus.getExpenseStatus(),
|
||||
findStatus.getExpenseCount(),
|
||||
String.format(pathFormat, "expense", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.EXPENSE.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getPowerStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getPowerStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getPowerStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.POWER.name(),
|
||||
DailySort.POWER.getDesc(),
|
||||
findStatus.getPowerStatus(),
|
||||
findStatus.getPowerCount(),
|
||||
String.format(pathFormat, "power", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.POWER.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getForestryStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getForestryStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getForestryStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.FORESTRY.name(),
|
||||
DailySort.FORESTRY.getDesc(),
|
||||
findStatus.getForestryStatus(),
|
||||
findStatus.getForestryCount(),
|
||||
String.format(pathFormat, "forestry", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.FORESTRY.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
if (DailyTargetStatus.TARGET.equals(findStatus.getFarmingStatus())
|
||||
|| DailyTargetStatus.TODAY_NONE.equals(findStatus.getFarmingStatus())) {
|
||||
if (!DailyTargetStatus.NONE.equals(findStatus.getFarmingStatus())) {
|
||||
childList.add(new CalendarChildren(
|
||||
DailySort.FARMING.name(),
|
||||
DailySort.FARMING.getDesc(),
|
||||
findStatus.getFarmingStatus(),
|
||||
findStatus.getFarmingCount(),
|
||||
String.format(pathFormat, "farming", command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
String.format(pathFormat, DailySort.FARMING.name().toLowerCase(), command.getSearchMonth(), findStatus.getDayGroupNo())));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,55 +135,23 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
return refineList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 미작성 목록 조회
|
||||
*
|
||||
* @param farmingOpen
|
||||
* @return 미작성 목록
|
||||
*/
|
||||
private List<CalendarChildren> getNoneChildList(boolean farmingOpen) {
|
||||
List<CalendarChildren> childList = new ArrayList<>();
|
||||
for (DailySort type : DailySort.values()) {
|
||||
if (!DailySort.FARMING.equals(type) || (DailySort.FARMING.equals(type) && farmingOpen)) {
|
||||
childList.add(new CalendarChildren(type.name(),type.getDesc()));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public int getDataNoneCountBySomeDayAfter(Long householdSeq) {
|
||||
|
||||
return childList;
|
||||
return recordCalendarMapper.getDataNoneCountBySomeDayAfter(householdSeq);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDataNoneCountBySomeDayAfter(RecordCalendarCmd command) {
|
||||
int dataNoneCount = recordCalendarMapper.getDataNoneCountBySomeDayAfter(command);
|
||||
public DailyRecordStatusDto getLatestDate(Long householdSeq) {
|
||||
|
||||
return dataNoneCount != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLatestDate(RecordCalendarCmd command) {
|
||||
String returnValue = null;
|
||||
DailyRecordStatusDto detail = recordCalendarMapper.getLatestDate(command);
|
||||
if (detail != null && detail.getStartDate() != null && detail.getEndDate() != null) {
|
||||
if (detail.getStartDate().getMonth() != detail.getEndDate().getMonth()) {
|
||||
// 종료일의 달이 변경되면 시작일=종료일 처리
|
||||
detail.setEndDate(detail.getStartDate());
|
||||
}
|
||||
|
||||
if (detail.getStartDate().equals(detail.getEndDate())) {
|
||||
returnValue = detail.getStartDate().format(DateTimeFormatter.ofPattern("yyyy년 M월 d일"));
|
||||
} else {
|
||||
returnValue = detail.getStartDate().format(DateTimeFormatter.ofPattern("yyyy년 M월 d")) + "~" + detail.getEndDate().format(DateTimeFormatter.ofPattern("d일"));
|
||||
}
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
return recordCalendarMapper.getLatestDate(householdSeq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 특정월의 일 그룹 조회
|
||||
*
|
||||
* @param command
|
||||
* @return
|
||||
* @param command 검색 조건
|
||||
* @return 일 그룹 목록
|
||||
*/
|
||||
private List<DailyRecordCalendarDto> getCalendarList(RecordCalendarCmd command) {
|
||||
List<DailyRecordCalendarDto> calendarList = recordCalendarMapper.getCalendarByDailyRecord(command);
|
||||
@@ -197,8 +159,8 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
List<DailyRecordCalendarDto> refineList = new ArrayList<>();
|
||||
for (DailyRecordCalendarDto calendar : calendarList) {
|
||||
LocalDate startDate = dailyUtil.getDayToLocalDate(command.getSearchMonth(), calendar.getStartDay());
|
||||
LocalDate endDate = dailyUtil.getDayToLocalDate(command.getSearchMonth(), calendar.getEndDay());
|
||||
int lastDay = dailyUtil.getLastDay(startDate);
|
||||
|
||||
calendar.setStartDate(startDate.toString());
|
||||
|
||||
if ((lastDay == 28 || lastDay == 30) && calendar.getStartDay() == lastDay) {
|
||||
@@ -215,8 +177,8 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
/**
|
||||
* 특정월의 일계부 등록 상태 조회
|
||||
*
|
||||
* @param command
|
||||
* @return
|
||||
* @param command 검색 조건
|
||||
* @return 일계부 목록
|
||||
*/
|
||||
private List<DailyRecordStatusDto> getDailyRecordStatus(RecordCalendarCmd command) {
|
||||
List<DailyRecordStatusDto> statusList = dailyRecordMapper.getDailyRecordStatus(new GetDailyRecordCmd(command.getSearchMonth(), null, command.getHouseholdSeq()));
|
||||
@@ -238,4 +200,21 @@ public class RecordCalendarDao implements RecordCalendarPortOut {
|
||||
|
||||
return detail == null ? new MonthlyStatusDto(MonthStatus.NONE, MonthStatus.NONE, MonthStatus.NONE) : detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 미작성 목록 조회
|
||||
*
|
||||
* @param farmingOpen 자가농업 항목 오픈 여부
|
||||
* @return 미작성 목록
|
||||
*/
|
||||
private List<CalendarChildren> getNoneChildrenList(boolean farmingOpen) {
|
||||
List<CalendarChildren> childList = new ArrayList<>();
|
||||
for (DailySort type : DailySort.values()) {
|
||||
if (!DailySort.FARMING.equals(type) || (DailySort.FARMING.equals(type) && farmingOpen)) {
|
||||
childList.add(new CalendarChildren(type.name(),type.getDesc()));
|
||||
}
|
||||
}
|
||||
|
||||
return childList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,16 +29,16 @@ public interface RecordCalendarMapper {
|
||||
/**
|
||||
* 3일전 ~ 15일전 미등록된 데이터 개수 조회
|
||||
*
|
||||
* @param command 검색 조건
|
||||
* @param householdSeq 임가회원 일련번호
|
||||
* @return 미등록 건 수
|
||||
*/
|
||||
Integer getDataNoneCountBySomeDayAfter(RecordCalendarCmd command);
|
||||
Integer getDataNoneCountBySomeDayAfter(Long householdSeq);
|
||||
|
||||
/**
|
||||
* 최신 등록일 데이터 조회
|
||||
*
|
||||
* @param command 검색 조건
|
||||
* @param householdSeq 임가회원 일련번호
|
||||
* @return 최신 등록 데이터
|
||||
*/
|
||||
DailyRecordStatusDto getLatestDate(RecordCalendarCmd command);
|
||||
DailyRecordStatusDto getLatestDate(Long householdSeq);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@ import java.util.List;
|
||||
public class RecordCalendarController {
|
||||
private final RecordCalendarPortIn recordCalendarPortIn;
|
||||
|
||||
/**
|
||||
* 일계부 월별 목록
|
||||
*
|
||||
* @param searchMonth 검색 월(yyyyMM)
|
||||
*/
|
||||
@GetMapping(path = "/{searchMonth}")
|
||||
public ResponseEntity<?> list(@PathVariable("searchMonth") String searchMonth) {
|
||||
RecordCalendarUIReqVO reqVO = new RecordCalendarUIReqVO(searchMonth);
|
||||
|
||||
@@ -16,6 +16,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
public class RecordCalendarUIController {
|
||||
private final RecordCalendarPortIn recordCalendarPortIn;
|
||||
|
||||
/**
|
||||
* 일계부 월별 현황 화면
|
||||
*
|
||||
* @param model Model
|
||||
*/
|
||||
@GetMapping(path = "")
|
||||
public String index(Model model) {
|
||||
RecordCalendarUIReqVO reqVO = new RecordCalendarUIReqVO();
|
||||
|
||||
@@ -27,7 +27,7 @@ public class RecordCalendarUIReqVO extends DailyUIReqVO {
|
||||
}
|
||||
|
||||
/**
|
||||
* 검색 일(yyyy-MM-dd)
|
||||
* 검색일(yyyy-MM-dd)
|
||||
*/
|
||||
private LocalDate searchDate;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public interface RecordCalendarPortIn {
|
||||
boolean getDataNoneCountBySomeDayAfter();
|
||||
|
||||
/**
|
||||
* 일계부 최신 데이터 조회
|
||||
* 일계부 최신 데이터 등록일 조회
|
||||
*
|
||||
* @return 최신 등록 기간
|
||||
*/
|
||||
|
||||
@@ -2,13 +2,14 @@ package app.module.front.usecase.daily.calendar.ports;
|
||||
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendar;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface RecordCalendarPortOut {
|
||||
List<RecordCalendar> operate(RecordCalendarCmd command);
|
||||
|
||||
boolean getDataNoneCountBySomeDayAfter(RecordCalendarCmd command);
|
||||
int getDataNoneCountBySomeDayAfter(Long householdSeq);
|
||||
|
||||
String getLatestDate(RecordCalendarCmd command);
|
||||
DailyRecordStatusDto getLatestDate(Long householdSeq);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
package app.module.front.usecase.daily.calendar.ports.application;
|
||||
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.daily.calendar.adapters.web.model.RecordCalendarUIReqVO;
|
||||
import app.module.front.usecase.daily.calendar.ports.RecordCalendarPortIn;
|
||||
import app.module.front.usecase.daily.calendar.ports.RecordCalendarPortOut;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.CalendarChildren;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendar;
|
||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@@ -25,15 +28,28 @@ public class RecordCalendarService implements RecordCalendarPortIn {
|
||||
|
||||
@Override
|
||||
public boolean getDataNoneCountBySomeDayAfter() {
|
||||
RecordCalendarUIReqVO reqVO = new RecordCalendarUIReqVO();
|
||||
int dataNoneCount = portOut.getDataNoneCountBySomeDayAfter(AuthUtil.getUserSeq());
|
||||
|
||||
return portOut.getDataNoneCountBySomeDayAfter(new RecordCalendarCmd(reqVO.getSearchMonth(), reqVO.getHouseholdSeq()));
|
||||
return dataNoneCount != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLatestDate() {
|
||||
RecordCalendarUIReqVO reqVO = new RecordCalendarUIReqVO();
|
||||
String returnValue = null;
|
||||
DailyRecordStatusDto detail = portOut.getLatestDate(AuthUtil.getUserSeq());
|
||||
if (detail != null && detail.getStartDate() != null && detail.getEndDate() != null) {
|
||||
if (detail.getStartDate().getMonth() != detail.getEndDate().getMonth()) {
|
||||
// 종료일의 달이 변경되면 시작일=종료일 처리
|
||||
detail.setEndDate(detail.getStartDate());
|
||||
}
|
||||
|
||||
return portOut.getLatestDate(new RecordCalendarCmd(reqVO.getSearchMonth(), reqVO.getHouseholdSeq()));
|
||||
if (detail.getStartDate().equals(detail.getEndDate())) {
|
||||
returnValue = detail.getStartDate().format(DateTimeFormatter.ofPattern("yyyy년 M월 d일"));
|
||||
} else {
|
||||
returnValue = detail.getStartDate().format(DateTimeFormatter.ofPattern("yyyy년 M월 d")) + "~" + detail.getEndDate().format(DateTimeFormatter.ofPattern("d일"));
|
||||
}
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package app.module.front.usecase.daily.calendar.ports.application.domain;
|
||||
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import lombok.AllArgsConstructor;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.module.front.usecase.daily.expense.adapters.persistence.model.DailyEx
|
||||
import app.module.front.usecase.daily.expense.adapters.web.model.DailyExpenseUIReqVO;
|
||||
import app.module.front.usecase.daily.expense.ports.DailyExpensePortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.module.front.usecase.daily.farming.adapters.persistence.model.DailyFa
|
||||
import app.module.front.usecase.daily.farming.adapters.web.model.DailyFarmingUIReqVO;
|
||||
import app.module.front.usecase.daily.farming.ports.application.DailyFarmingService;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.module.front.usecase.daily.forestry.adapters.persistence.model.DailyF
|
||||
import app.module.front.usecase.daily.forestry.adapters.web.model.DailyForestryUIReqVO;
|
||||
import app.module.front.usecase.daily.forestry.ports.DailyForestryPortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -6,7 +6,7 @@ import app.module.front.usecase.daily.income.adapters.persistence.model.DailyInc
|
||||
import app.module.front.usecase.daily.income.adapters.web.model.DailyIncomeUIReqVO;
|
||||
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -5,7 +5,7 @@ import app.module.front.usecase.daily.power.adapters.persistence.model.DailyPowe
|
||||
import app.module.front.usecase.daily.power.adapters.web.model.DailyPowerUIReqVO;
|
||||
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package app.module.front.usecase.daily.record.adapters.persistence;
|
||||
|
||||
import app.module.front.config.application.util.AuditUtil;
|
||||
import app.module.front.config.application.util.DailyUtil;
|
||||
import app.module.core.config.application.util.DailyUtil;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||
@@ -14,11 +14,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@Slf4j
|
||||
@Repository
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.module.front.usecase.daily.record.adapters.persistence.model;
|
||||
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package app.module.front.usecase.daily.record.adapters.persistence.model;
|
||||
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package app.module.front.usecase.daily.record.adapters.web;
|
||||
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.adapters.web.validator.CreateDailyRecordValidator;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
|
||||
@@ -7,15 +7,13 @@ import app.module.front.usecase.daily.farming.adapters.web.model.DailyFarmingUIR
|
||||
import app.module.front.usecase.daily.farming.ports.DailyFarmingPortIn;
|
||||
import app.module.front.usecase.daily.forestry.adapters.web.model.DailyForestryUIReqVO;
|
||||
import app.module.front.usecase.daily.forestry.ports.DailyForestryPortIn;
|
||||
import app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto;
|
||||
import app.module.front.usecase.daily.income.adapters.web.model.DailyIncomeUIReqVO;
|
||||
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
||||
import app.module.front.usecase.daily.power.adapters.web.model.DailyPowerUIReqVO;
|
||||
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.adapters.web.validator.CreateDailyRecordValidator;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
||||
import app.module.front.usecase.daily.work.ports.DailyWorkPortIn;
|
||||
@@ -27,8 +25,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package app.module.front.usecase.daily.record.adapters.web.model;
|
||||
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package app.module.front.usecase.daily.record.adapters.web.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum DailySort {
|
||||
INCOME("수입"),
|
||||
WORK("임업노동 투입"),
|
||||
EXPENSE("지출"),
|
||||
POWER("동력 사용시간"),
|
||||
FORESTRY("임업생산물 중 자가소비량"),
|
||||
FARMING("농업생산물 중 자가소비량"),
|
||||
;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package app.module.front.usecase.daily.record.adapters.web.model;
|
||||
|
||||
public enum DailyStatus {
|
||||
/**
|
||||
* 미완료
|
||||
*/
|
||||
WAITING,
|
||||
/**
|
||||
* 등록 없음
|
||||
*/
|
||||
TODAY_NONE,
|
||||
/**
|
||||
* 등록 완료
|
||||
*/
|
||||
DONE,
|
||||
;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package app.module.front.usecase.daily.record.adapters.web.model;
|
||||
|
||||
public enum DailyTargetStatus {
|
||||
/**
|
||||
* 등록 대상 (테이터 건 수 체크)
|
||||
*/
|
||||
TARGET,
|
||||
/**
|
||||
* 금일 없음 (데이터 건 수 체크하지 않음)
|
||||
*/
|
||||
TODAY_NONE,
|
||||
/**
|
||||
* 대상 아님
|
||||
*/
|
||||
NONE,
|
||||
;
|
||||
}
|
||||
@@ -2,7 +2,7 @@ package app.module.front.usecase.daily.record.adapters.web.validator;
|
||||
|
||||
import app.module.core.config.application.util.MessageUtil;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.Errors;
|
||||
|
||||
@@ -4,8 +4,8 @@ import app.module.front.config.application.util.AuditUtil;
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
||||
@@ -15,7 +15,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package app.module.front.usecase.daily.record.ports.application.domain;
|
||||
|
||||
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||
import app.module.core.config.application.enums.DailyStatus;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -3,7 +3,7 @@ package app.module.front.usecase.daily.work.adapters.web;
|
||||
import app.module.core.config.application.exception.NoRecordDataException;
|
||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailySort;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||
|
||||
@@ -74,16 +74,9 @@
|
||||
-- 이전월 마지막 DAY 로 시작, 종료일이 같은지 여부
|
||||
or start_day = DATE_PART('day', date_trunc('month', CURRENT_DATE) - INTERVAL '1 days')
|
||||
or end_day = DATE_PART('day', date_trunc('month', CURRENT_DATE) - INTERVAL '1 days')
|
||||
|
||||
/*
|
||||
-- 현재 DAY 로 시작, 종료일이 같은지 여부
|
||||
or start_day = DATE_PART('day', CURRENT_DATE - INTERVAL '3 days')
|
||||
*/
|
||||
)
|
||||
)
|
||||
--select count(tdg.group_no), count(dr.id)
|
||||
select case when count(tdg.group_no) = count(dr.id) then 0 else count(tdg.group_no) - count(dr.id) end
|
||||
--select *
|
||||
from temp_day_group tdg
|
||||
left join
|
||||
daily_record dr on dr.record_month = tdg.current_month and dr.day_group_no = tdg.group_no
|
||||
|
||||
@@ -8511,6 +8511,7 @@ button.swiper-pagination-bullet {
|
||||
font-size: 1.6rem;
|
||||
line-height: 140%;
|
||||
color: #868e96;
|
||||
word-break: break-all;
|
||||
}
|
||||
.regist-item-area .item-list .list-item .detail-list li p::before {
|
||||
position: absolute;
|
||||
@@ -8523,7 +8524,8 @@ button.swiper-pagination-bullet {
|
||||
line-height: 140%;
|
||||
}
|
||||
.regist-item-area .item-list .list-item .detail-list li span {
|
||||
max-width: 80%;
|
||||
min-width: 40%;
|
||||
word-break: break-all;
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
@@ -8667,13 +8669,20 @@ button.swiper-pagination-bullet {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-column-list li a {
|
||||
.btn-column-list li {
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 2rem 1.6rem;
|
||||
background-color: #ffffff;
|
||||
border-radius: 0.8rem;
|
||||
box-shadow: 0px 1px 8px -2px rgba(16, 24, 40, 0.05);
|
||||
box-shadow: 0px 1px 4px -2px rgba(16, 24, 40, 0.04), 0px 1px 8px -2px rgba(16, 24, 40, 0.05);
|
||||
}
|
||||
.btn-column-list li a {
|
||||
position: relative;
|
||||
padding: 2rem 5.2rem 2rem 1.6rem;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.btn-column-list li a::before {
|
||||
position: absolute;
|
||||
@@ -8685,8 +8694,19 @@ button.swiper-pagination-bullet {
|
||||
-webkit-transform: translateY(-50%);
|
||||
transform: translateY(-50%);
|
||||
right: 2rem;
|
||||
}
|
||||
.btn-column-list li.edit {
|
||||
padding: 0;
|
||||
}
|
||||
.btn-column-list li.edit a::before {
|
||||
background: url("../images/common/ico_edit.svg") center/contain no-repeat;
|
||||
}
|
||||
.btn-column-list li.view {
|
||||
padding: 0;
|
||||
}
|
||||
.btn-column-list li.view a::before {
|
||||
background: url("../images/common/ico_arr_right_gray.svg") center/contain no-repeat;
|
||||
}
|
||||
.btn-column-list li .label {
|
||||
font-size: 2rem;
|
||||
line-height: 140%;
|
||||
|
||||
@@ -1,37 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-error}"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<html layout:decorate="~{layout/layout-error}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<head>
|
||||
<title>404</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<section layout:fragment="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="p-5 mb-4 bg-light rounded-3">
|
||||
<div class="container-fluid py-5">
|
||||
<h1 class="display-5 fw-bold"><i class="bi bi-eye-slash-fill"></i>
|
||||
Oops, 404 Not Found :-(</h1>
|
||||
<p class="col-md-8 fs-4">
|
||||
존재하지 않는 URI 주소로 접근했습니다. 다시 확인해주세요.
|
||||
</p>
|
||||
<p class="col-md-8 fs-5">
|
||||
<div layout:fragment="content" th:classappend="error-wrap">
|
||||
<main id="content" role="main">
|
||||
<div class="info-msg">
|
||||
<strong>요청하신 페이지를<br>
|
||||
찾을 수 없습니다</strong>
|
||||
<span>페이지를 찾을 수 없습니다.<br>
|
||||
일계부 첫 화면으로 이동해 주세요.</span>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<button type="button" class="fill" th:onclick="|location.href='#{uri.front.record.calendar.path}'|">일계부로 이동</button>
|
||||
</div>
|
||||
</main>
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
<div class="info-msg">
|
||||
<span>Error</span> <span class="text-muted" th:text="${error}"></span>
|
||||
<br/>
|
||||
<span>Message</span> <span class="text-muted" th:text="${message}"></span>
|
||||
</p>
|
||||
<button class="btn btn-primary btn-lg" onclick="location.href='/'" type="button">홈으로 이동
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,43 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-error}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<head>
|
||||
<title>500 - 에러발생</title>
|
||||
<title>500</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<section layout:fragment="content">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<div class="p-5 mb-4 bg-light rounded-3">
|
||||
<div class="container-fluid py-5">
|
||||
<h1 class="display-5 fw-bold"><i class="bi bi-cone-striped"></i>
|
||||
Oops, <span class="text-muted">에러가 발생했습니다!</span> :-(</h1>
|
||||
<p class="col-md-8 fs-4">
|
||||
아래 에러 메세지를 담당자에게 전달해주세요.
|
||||
</p>
|
||||
<p class="col-md-8 fs-5">
|
||||
<div layout:fragment="content" th:classappend="error-wrap">
|
||||
<main id="content" role="main">
|
||||
<div class="info-msg">
|
||||
<strong>요청하신 작업을<br> 완료할 수 없습니다.</strong>
|
||||
<span>서비스 이용 중 문제가 발생했습니다.<br>
|
||||
잠시 후 다시 시도해 주세요.</span>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<button type="button" class="strock" th:onclick="|location.href='#{uri.front.record.calendar.path}'|">일계부로 이동</button>
|
||||
<button type="button" class="fill" th:onclick="location.reload()">다시 시도</button>
|
||||
</div>
|
||||
</main>
|
||||
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||
<div class="info-msg">
|
||||
<span>Error</span> <span class="text-muted" th:text="${error}"></span>
|
||||
<br/>
|
||||
<span>Message</span> <span class="text-muted" th:text="${message}"></span>
|
||||
<!-- <br/>-->
|
||||
<!-- <span>Status</span> <span th:text="${status}" class="text-muted"></span>-->
|
||||
<!-- <br/>-->
|
||||
<!-- <span>Path</span> <span th:text="${path}" class="text-muted"></span>-->
|
||||
<!-- <br/>-->
|
||||
<!-- <span>Timestamp</span> <span th:text="${timestamp}" class="text-muted"></span>-->
|
||||
</p>
|
||||
<hr>
|
||||
<button class="btn btn-primary btn-lg" onclick="history.go(-1)" type="button">이전으로 이동
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</th:block>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
@@ -15,7 +15,7 @@
|
||||
</hgroup>
|
||||
|
||||
<section class="form-group">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser();" th:action="@{/}">
|
||||
<form method="post" name="reqForm" id="reqForm" onsubmit="event.preventDefault(); formControl.authInfoUser(event);" th:action="@{/}">
|
||||
<div class="component-input" data-props-toggle-Password="true">
|
||||
<div class="input-label">
|
||||
<label for="password" class="label-txt">비밀번호</label>
|
||||
@@ -55,7 +55,8 @@
|
||||
};
|
||||
|
||||
let formControl = {
|
||||
authInfoUser() {
|
||||
authInfoUser(event) {
|
||||
event.preventDefault();
|
||||
const f = document.reqForm;
|
||||
|
||||
const obj = $(f).serializeObject();
|
||||
|
||||
@@ -85,14 +85,14 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" th:field="*{tel2}" maxlength="4"
|
||||
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
<input type="text" th:field="*{tel2}"
|
||||
maxlength="4" inputmode="tel" pattern="[0-9]*" oninput="kri.form.maxlength(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" th:field="*{tel3}" maxlength="4"
|
||||
oninput="this.value=this.value.replace(/[^0-9]/g,'')"/>
|
||||
<input type="text" th:field="*{tel3}"
|
||||
maxlength="4" inputmode="tel" pattern="[0-9]*" oninput="kri.form.maxlength(this)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,13 +114,13 @@
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0006" th:field="*{phone2}"
|
||||
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
maxlength="4" inputmode="tel" pattern="[0-9]*" oninput="kri.form.maxlength(this)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0007" th:field="*{phone3}"
|
||||
maxlength="4" oninput="this.value=this.value.replace(/[^0-9]/g,'')">
|
||||
maxlength="4" inputmode="tel" pattern="[0-9]*" oninput="kri.form.maxlength(this)">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" lang="ko">
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||
<meta charset="utf-8" />
|
||||
<title>Error | KRI 임가경제조사 일계부</title>
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="" />
|
||||
<meta property="og:title" content="" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:image" content="pathImages/" />
|
||||
<link rel="icon" type="image/x-icon" href="pathImages/" />
|
||||
<link rel="shortcut icon" type="image/x-icon" href="pathImages/" />
|
||||
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
|
||||
<link rel="preload" as="font" type="font/woff2" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/PretendardVariable.woff2" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css" />
|
||||
<style>
|
||||
* {margin: 0; padding: 0;}
|
||||
body, html {height: 100%; font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;}
|
||||
#wrap {height: 100%;}
|
||||
.error-wrap {padding-top: 120px;}
|
||||
.error-wrap main {display: flex; flex-direction: column; width: 310px; margin: 0 auto; padding-top: 88px; background:url('../../assets/images/common/ico_nodata.svg') center top / 64px no-repeat;}
|
||||
.info-msg {display: flex; flex-direction: column; align-items: center;}
|
||||
.info-msg strong {display: block; font-size: 24px; font-weight: 700; color: #212529; line-height: 140%; text-align: center;}
|
||||
.info-msg span {display: block; margin-top: 8px; font-size: 15px; font-weight: 400; color: #495057; line-height: 140%; text-align: center;}
|
||||
.btns {display: flex; gap: 8px; margin-top: 32px;}
|
||||
.btns button {flex: 1; display: inline-block; height: 52px; font-size: 18px; font-weight: 600; border-radius: 8px;}
|
||||
.btns .strock {color: #4BBC43; border: 1px solid #4BBC43; background: #ffffff;}
|
||||
.btns .fill {color: #ffffff; border: 0; background: #4BBC43;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<section layout:fragment="content">
|
||||
<p>Page content goes here</p>
|
||||
</section>
|
||||
|
||||
<div class="container">
|
||||
<footer class="py-3 my-4 border-top">
|
||||
<div class="text-center">
|
||||
<span class="text-muted">© 2022 All rights reserved</span>
|
||||
</div>
|
||||
</footer>
|
||||
<div id="wrap">
|
||||
<div id="container" layout:fragment="content">
|
||||
page content
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -818,11 +818,33 @@
|
||||
{{include tmpl="#titleTmpl" /}}
|
||||
|
||||
<ul class="btn-column-list">
|
||||
{{if modifiable}}
|
||||
{{for list tmpl="#basicRowTmpl1" /}}
|
||||
{{else}}
|
||||
{{for list tmpl="#basicRowTmpl2" /}}
|
||||
{{/if}}
|
||||
{{for list ~edit=modifiable}}
|
||||
{{if status == null}}
|
||||
<li>
|
||||
<p class="label">{{:codeLabel}}</p>
|
||||
<p class="value">미작성</p>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="{{if ~edit}}edit{{else}}view{{/if}}">
|
||||
{{if status == 'TARGET' && total != 0}}
|
||||
<a href="{{:path}}?type=update">
|
||||
<p class="label">{{:codeLabel}}</p>
|
||||
<p class="value"><em>총 <b>{{:total}}</b>건</em></p>
|
||||
</a>
|
||||
{{else status == 'TARGET' && total == 0}}
|
||||
<a href="{{:path}}?type=update">
|
||||
<p class="label">{{:codeLabel}}</p>
|
||||
<p class="value">미완료</p>
|
||||
</a>
|
||||
{{else status == 'TODAY_NONE'}}
|
||||
<a href="{{:path}}?type=update">
|
||||
<p class="label">{{:codeLabel}}</p>
|
||||
<p class="value">없음</p>
|
||||
</a>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
</ul>
|
||||
|
||||
{{include tmpl="#etcRowTmpl" /}}
|
||||
@@ -834,38 +856,6 @@
|
||||
<p class="date">{{:date.start}} ~ {{:date.end}}</p>
|
||||
{{/if}}
|
||||
</script>
|
||||
<script id="basicRowTmpl1" type="text/x-jsrender">
|
||||
<li>
|
||||
<a href="{{:path}}?type=update">
|
||||
<p class="label">{{:codeLabel}}</p>
|
||||
{{if status == null}}
|
||||
<p class="value">미작성</p>
|
||||
{{else status == 'TARGET' && total != 0}}
|
||||
<p class="value"><em>총 <b>{{:total}}</b>건</em></p>
|
||||
{{else status == 'TARGET' && total == 0}}
|
||||
<p class="value">미완료</p>
|
||||
{{else status == 'TODAY_NONE'}}
|
||||
<p class="value">없음</p>
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
</script>
|
||||
<script id="basicRowTmpl2" type="text/x-jsrender">
|
||||
<li>
|
||||
<a href="{{:path}}?type=update">
|
||||
<p class="label">{{:codeLabel}}, TODO: 수정버튼삭제필요</p>
|
||||
{{if status == null}}
|
||||
<p class="value">미작성</p>
|
||||
{{else status == 'TARGET' && total != 0}}
|
||||
<p class="value"><em>총 <b>{{:total}}</b>건</em></p>
|
||||
{{else status == 'TARGET' && total == 0}}
|
||||
<p class="value">미완료</p>
|
||||
{{else status == 'TODAY_NONE'}}
|
||||
<p class="value">없음</p>
|
||||
{{/if}}
|
||||
</a>
|
||||
</li>
|
||||
</script>
|
||||
<script id="etcRowTmpl" type="text/x-jsrender">
|
||||
<div class="regist-btn-area">
|
||||
{{for monthlyList}}
|
||||
|
||||
@@ -105,9 +105,10 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(expenseList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -116,7 +116,8 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(farmingList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
|
||||
@@ -108,9 +108,10 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(forestryList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -127,7 +127,8 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(incomeList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
|
||||
@@ -93,9 +93,10 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(powerList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -154,9 +154,10 @@
|
||||
<button type="button" class="btn btn-l btn-secondary" onclick="krip.daily.goToPrev();">
|
||||
<span class="btn-txt">이전 단계로 이동</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-l btn-primary"
|
||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||
th:data-last="${dailyRecord.lastDay}"
|
||||
th:disabled="${not #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(workList)}"
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]])">
|
||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||
<span class="btn-txt">다음 단계로 이동</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user