내정보 > 최근 일계부 날짜 수정

This commit is contained in:
주수현
2025-06-20 13:50:43 +09:00
parent d775238165
commit 68039e2b34
3 changed files with 42 additions and 31 deletions

View File

@@ -2,6 +2,8 @@ package app.module.core.usecase.household.getHousehold.ports.application.domain;
import app.module.core.config.adapters.web.security.domain.CoreRole; import app.module.core.config.adapters.web.security.domain.CoreRole;
import app.module.core.config.application.enums.SignUpType; import app.module.core.config.application.enums.SignUpType;
import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Set; import java.util.Set;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -34,6 +36,8 @@ public class GetHousehold {
private Boolean isPanel; private Boolean isPanel;
private String memo; private String memo;
private String dropReason; private String dropReason;
private LocalDate latestRegisterStartDate;
private LocalDate latestRegisterEndDate;
private LocalDateTime createdAt; private LocalDateTime createdAt;
private String createdBy; private String createdBy;
private LocalDateTime updatedAt; private LocalDateTime updatedAt;

View File

@@ -7,32 +7,39 @@
<select id="findByHouseholdNum" <select id="findByHouseholdNum"
resultType="app.module.core.usecase.household.getHousehold.ports.application.domain.GetHousehold"> resultType="app.module.core.usecase.household.getHousehold.ports.application.domain.GetHousehold">
SELECT SELECT
seq, h.seq,
household_num, h.household_num,
owner_name, h.owner_name,
owner_age, h.owner_age,
tel, h.tel,
phone, h.phone,
password, h.password,
region_main_code, h.region_main_code,
region_sub_code, h.region_sub_code,
region_detail_code, h.region_detail_code,
address, h.address,
industry_large_code, h.industry_large_code,
industry_middle_code, h.industry_middle_code,
industry_sub_middle, h.industry_sub_middle,
industry_detail, h.industry_detail,
employment_code, h.employment_code,
is_panel, h.is_panel,
memo, h.memo,
drop_reason, h.drop_reason,
created_at, dr.start_date as latest_register_start_date,
created_by, dr.end_date as latest_register_end_date,
updated_at, h.created_at,
updated_by h.created_by,
FROM household h.updated_at,
WHERE household_num = #{householdNum} h.updated_by
AND is_deleted = false FROM household h
LEFT JOIN (
SELECT start_date , end_date ,household_seq
FROM daily_record dr
ORDER BY start_date desc
LIMIT 1 ) dr ON dr.household_seq = h.seq
WHERE h.household_num = #{householdNum}
AND h.is_deleted = false
</select> </select>
<resultMap id="HouseholdRoleHasPrivilegesMap" type="app.module.core.config.adapters.web.security.domain.CoreRole"> <resultMap id="HouseholdRoleHasPrivilegesMap" type="app.module.core.config.adapters.web.security.domain.CoreRole">
@@ -54,6 +61,7 @@
JOIN role r ON hhr.role_id = r.id AND r.is_deleted = false JOIN role r ON hhr.role_id = r.id AND r.is_deleted = false
LEFT JOIN role_has_privilege rhp ON r.id = rhp.role_id AND rhp.is_deleted = false LEFT JOIN role_has_privilege rhp ON r.id = rhp.role_id AND rhp.is_deleted = false
LEFT JOIN privilege p ON rhp.privilege_id = p.id AND p.is_deleted = false LEFT JOIN privilege p ON rhp.privilege_id = p.id AND p.is_deleted = false
LEFT JOIN daily_record dr ON dr.household_seq = hhr.household_seq
WHERE hhr.household_seq = #{seq} WHERE hhr.household_seq = #{seq}
AND hhr.is_deleted = false AND hhr.is_deleted = false
</select> </select>

View File

@@ -11,7 +11,7 @@
success : 성공(초록) success : 성공(초록)
info : 인포(파랑) info : 인포(파랑)
--> -->
<article class="alert-box warning" th:if="${isUnregisteredDate}"> <!-- TODO Controller 단에서 처리 필요. 임시 --> <article class="alert-box warning" > <!-- TODO Controller 단에서 처리 필요. 임시 항상 노출로 수정 -->
<p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p> <p class="tit"><strong th:text="${userInfo?.ownerName}">홍길동</strong>님,</p>
<span class="txt"> <span class="txt">
일계부를 등록하지 않은 날짜가 있습니다. <br> 일계부를 등록하지 않은 날짜가 있습니다. <br>
@@ -24,10 +24,9 @@
<dl class="info-card"> <dl class="info-card">
<dt class="name" th:text="${userInfo?.ownerName}"></dt> <dt class="name" th:text="${userInfo?.ownerName}"></dt>
<dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. --> <dd class="location" th:text="${userInfo?.address}"></dd><!-- TODO 임가 주소 위치 임시로 . 처리함. -->
<dd class="date" th:if="${latestRegisteredDate != null or !#strings.isEmpty(latestRegisteredDate)}" <dd class="date" th:if="${userInfo.latestRegisterStartDate != null or !#strings.isEmpty(userInfo.latestRegisterStartDate)}">
th:text="${'최근등록 : <span>'+latestRegisteredDate}+'</span>'"></dd> 최근등록 :<span th:text="${#temporals.format(userInfo.latestRegisterStartDate, 'M월 d일')+'-'+#temporals.format(userInfo.latestRegisterEndDate, 'd일')}"></span></dd>
<!-- TODO : 등록된 일계부가 없을 시 --> <dd class="date" th:if="${userInfo.latestRegisterStartDate == null or #strings.isEmpty(userInfo.latestRegisterStartDate)}">등록된 일계부가 없습니다.</dd>
<!-- <dd class="date">등록된 일게부가 없습니다.</dd> -->
</dl> </dl>
<th:block th:if="${notice != null}"> <th:block th:if="${notice != null}">
<a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box"> <a th:href="@{'/info/notice/' + ${notice.id}}" class="notice-box">