임산물현황 달 리스트
This commit is contained in:
@@ -7,8 +7,8 @@ import lombok.RequiredArgsConstructor;
|
||||
@RequiredArgsConstructor
|
||||
public enum MonthStatus {
|
||||
NONE("미등록"), // 미등록
|
||||
NOTHING("데이터없음으로 등록"), // 등록할것이 없음
|
||||
REGISTERED("데이터등록"); // 등록됨
|
||||
NOTHING("등록없음"), // 등록할것이 없음
|
||||
REGISTERED("등록완료"); // 등록됨
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
|
||||
@@ -25,4 +25,13 @@ public class GetMonthlyInputStatuss {
|
||||
private String createdBy;
|
||||
private LocalDateTime updatedAt;
|
||||
private String updatedBy;
|
||||
|
||||
public String getKoreanMonth() {
|
||||
if (month != null && month.contains("-")) {
|
||||
String[] parts = month.split("-");
|
||||
return parts[0] + "년 " + Integer.parseInt(parts[1]) + "월";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,4 +13,5 @@ public class GetMonthlyInputStatussCmd {
|
||||
|
||||
private String searchField;
|
||||
private String searchValue;
|
||||
private Long householdSeq;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
FROM monthly_input_status a
|
||||
WHERE a.is_deleted = false
|
||||
|
||||
<if test="cmd.householdSeq != null">
|
||||
AND a.household_seq = ${cmd.householdSeq}
|
||||
</if>
|
||||
|
||||
|
||||
<if test="cmd.searchField != null and cmd.searchField != ''">
|
||||
<choose>
|
||||
<when test="cmd.searchField eq 'month'">
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.module.front.usecase.info.monthly.getMonthlysUI.adapters.web;
|
||||
|
||||
import app.module.core.config.application.enums.MonthStatus;
|
||||
import app.module.core.config.application.util.CommonUtil;
|
||||
import app.module.core.usecase.household.getHousehold.ports.GetHouseholdPortIn;
|
||||
import app.module.core.usecase.household.getHousehold.ports.application.domain.GetHouseholdCmd;
|
||||
@@ -9,6 +10,7 @@ import app.module.core.usecase.monthly.getMonthlyInputStatuss.ports.application.
|
||||
import app.module.core.usecase.monthly.getMonthlyInputStatuss.ports.application.domain.GetMonthlyInputStatussCmd;
|
||||
import app.module.core.usecase.notice.getNotices.ports.application.domain.GetNotices;
|
||||
import app.module.core.usecase.notice.getNotices.ports.application.domain.GetNoticesCmd;
|
||||
import app.module.front.config.application.util.AuthUtil;
|
||||
import app.module.front.usecase.info.monthly.getMonthlysUI.adapters.web.model.GetMontylyssReqVO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
@@ -32,14 +34,18 @@ class GetMontylysUIController {
|
||||
@PageableDefault(sort = "month", direction = Sort.Direction.DESC, page = 0, size = 13) Pageable pageable,
|
||||
GetMontylyssReqVO reqVO) {
|
||||
|
||||
Page<GetMonthlyInputStatuss> notices =
|
||||
Page<GetMonthlyInputStatuss> list =
|
||||
portIn.operate(
|
||||
pageable,
|
||||
new GetMonthlyInputStatussCmd(
|
||||
reqVO.getSearchField(), reqVO.getSearchValue()));
|
||||
reqVO.getSearchField(), reqVO.getSearchValue(), AuthUtil.getUserSeq()));
|
||||
|
||||
model.addAttribute("reqVO", reqVO);
|
||||
model.addAttribute("list", notices);
|
||||
model.addAttribute("list", list);
|
||||
|
||||
// TODO 페키지명이 넘무 길어서 그냥
|
||||
model.addAttribute("MonthStatus", MonthStatus.class);
|
||||
|
||||
return "info/monthly/monthlys";
|
||||
}
|
||||
}
|
||||
@@ -11,22 +11,11 @@
|
||||
</h3>
|
||||
</hgroup>
|
||||
<ul class="product-col-list">
|
||||
<li>
|
||||
|
||||
<li th:each="item : ${list.content}" th:classappend="${item.forestProductStatus != MonthStatus.NONE} ? ' complete'">
|
||||
<a href="">
|
||||
<p class="list-tit">2025년 5월</p>
|
||||
<span class="tag">미등록</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="complete">
|
||||
<a href="">
|
||||
<p class="list-tit">2025년 5월</p>
|
||||
<span class="tag">등록완료</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="complete">
|
||||
<a href="">
|
||||
<p class="list-tit">2025년 5월</p>
|
||||
<span class="tag">등록완료</span>
|
||||
<p class="list-tit" th:text="${item.koreanMonth}"></p>
|
||||
<span class="tag" th:text="${item.forestProductStatus.desc}"></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user