Merge branch 'dev' into 'deploy-dev-admin'
Dev See merge request korea-research/korea-research!48
This commit is contained in:
@@ -4,6 +4,7 @@ import app.module.admin.config.application.util.AdminUtil;
|
|||||||
import app.module.admin.config.application.util.DateUiUtil;
|
import app.module.admin.config.application.util.DateUiUtil;
|
||||||
import app.module.admin.usecase.household.getHouseholdStatus.ports.GetHouseholdStatusPortIn;
|
import app.module.admin.usecase.household.getHouseholdStatus.ports.GetHouseholdStatusPortIn;
|
||||||
import app.module.admin.usecase.household.getHouseholdStatus.ports.application.domain.GetHouseholdStatusCmd;
|
import app.module.admin.usecase.household.getHouseholdStatus.ports.application.domain.GetHouseholdStatusCmd;
|
||||||
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
@@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GetHouseholdStatusUIController {
|
class GetHouseholdStatusUIController {
|
||||||
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
||||||
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/households/{seq}")
|
@GetMapping(path = "/households/{seq}")
|
||||||
String operate(
|
String operate(
|
||||||
@@ -30,6 +32,8 @@ class GetHouseholdStatusUIController {
|
|||||||
model.addAttribute("recordMonth", recordMonth);
|
model.addAttribute("recordMonth", recordMonth);
|
||||||
model.addAttribute("userRole", AdminUtil.getLoginUserRole());
|
model.addAttribute("userRole", AdminUtil.getLoginUserRole());
|
||||||
|
|
||||||
|
model.addAttribute("unitCodes", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
|
||||||
// 임가 상세 정보
|
// 임가 상세 정보
|
||||||
model.addAttribute("householdInfo",
|
model.addAttribute("householdInfo",
|
||||||
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null));
|
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null));
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.persistence;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.GetForestProductStatusPortOut;
|
||||||
|
import java.util.Optional;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
class GetForestProductStatusDao implements GetForestProductStatusPortOut {
|
||||||
|
private final GetForestProductStatusMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<GetForestProductStatus> operate(GetForestProductStatusCmd cmd) {
|
||||||
|
return mapper.getForestProductStatus(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.persistence;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
import java.util.Optional;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface GetForestProductStatusMapper {
|
||||||
|
Optional<GetForestProductStatus> getForestProductStatus(GetForestProductStatusCmd cmd);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.web;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.GetForestProductStatusPortIn;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
class GetForestProductStatusController {
|
||||||
|
private final GetForestProductStatusPortIn portIn;
|
||||||
|
|
||||||
|
@GetMapping(path = "/api/forestProduct/{id}")
|
||||||
|
ResponseEntity<?> operate(@PathVariable Long id) {
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(portIn.operate(new GetForestProductStatusCmd(id)).orElse(null));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.web.model;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class GetForestProductStatusReqVO {
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.web.model;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class GetForestProductStatusResVO {
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
|
||||||
|
public interface GetForestProductStatusPortIn {
|
||||||
|
Optional<GetForestProductStatus> operate(GetForestProductStatusCmd cmd);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
|
||||||
|
public interface GetForestProductStatusPortOut {
|
||||||
|
Optional<GetForestProductStatus> operate(GetForestProductStatusCmd cmd);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatusCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.GetForestProductStatusPortIn;
|
||||||
|
import app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.GetForestProductStatusPortOut;
|
||||||
|
import java.util.Optional;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
class GetForestProductStatusService implements GetForestProductStatusPortIn {
|
||||||
|
private final GetForestProductStatusPortOut portOut;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<GetForestProductStatus> operate(GetForestProductStatusCmd cmd) {
|
||||||
|
return portOut.operate(cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class GetForestProductStatus {
|
||||||
|
private Long id;
|
||||||
|
private String streetNum;
|
||||||
|
private String landType;
|
||||||
|
private String town;
|
||||||
|
private String cropName;
|
||||||
|
private String landArea;
|
||||||
|
private String mainYield;
|
||||||
|
private String mainYieldUnitCode;
|
||||||
|
private String mainYieldUnit;
|
||||||
|
private String mainSaleAmount;
|
||||||
|
private String mainSaleUnitCode;
|
||||||
|
private String mainSaleUnit;
|
||||||
|
private String subYield;
|
||||||
|
private String subYieldUnitCode;
|
||||||
|
private String subYieldUnit;
|
||||||
|
private String subSaleAmount;
|
||||||
|
private String subSaleUnitCode;
|
||||||
|
private String subSaleUnit;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode
|
||||||
|
public class GetForestProductStatusCmd {
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@@ -30,7 +30,7 @@ class RemoveHouseholdVisitInfosController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
portIn.operate(
|
portIn.operate(
|
||||||
new RemoveHouseholdVisitInfosCmd(reqVO.getHouseholdSeq(), reqVO.getRemoveIds()));
|
new RemoveHouseholdVisitInfosCmd(reqVO.getHouseholdSeq(), reqVO.getVisitRemoveIds()));
|
||||||
|
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(new RemoveHouseholdVisitInfosResVO(
|
return ResponseEntity.status(HttpStatus.OK).body(new RemoveHouseholdVisitInfosResVO(
|
||||||
messageUtil.getMessage("operation.common.remove.done")));
|
messageUtil.getMessage("operation.common.remove.done")));
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ import lombok.Setter;
|
|||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class RemoveHouseholdVisitInfosReqVO {
|
public class RemoveHouseholdVisitInfosReqVO {
|
||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
private List<Long> removeIds;
|
private List<Long> visitRemoveIds;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper
|
||||||
|
namespace="app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.adapters.persistence.GetForestProductStatusMapper">
|
||||||
|
<select id="getForestProductStatus"
|
||||||
|
resultType="app.module.admin.usecase.household.tab.forestProduct.getForestProductStatus.ports.application.domain.GetForestProductStatus">
|
||||||
|
/* getForestProductStatus : 임산물 현황 상세 조회 */
|
||||||
|
SELECT id,
|
||||||
|
street_num,
|
||||||
|
land_type,
|
||||||
|
town,
|
||||||
|
crop_name,
|
||||||
|
land_area,
|
||||||
|
main_yield,
|
||||||
|
main_yield_unit_code,
|
||||||
|
main_yield_unit,
|
||||||
|
main_sale_amount,
|
||||||
|
main_sale_unit_code,
|
||||||
|
main_sale_unit,
|
||||||
|
sub_yield,
|
||||||
|
sub_yield_unit_code,
|
||||||
|
sub_yield_unit,
|
||||||
|
sub_sale_amount,
|
||||||
|
sub_sale_unit_code,
|
||||||
|
sub_sale_unit
|
||||||
|
FROM forest_product
|
||||||
|
WHERE id = #{id}
|
||||||
|
AND is_deleted = false
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -1356,6 +1356,11 @@ template {
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1620px) {
|
||||||
|
.component-modal .modal-container .modal-content {
|
||||||
|
max-height: 520px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
a .hide-txt {
|
a .hide-txt {
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
@@ -6841,7 +6846,7 @@ table:not(.type-form) tr:hover {
|
|||||||
}
|
}
|
||||||
table.type-form {
|
table.type-form {
|
||||||
border: 1px solid #dee2e6;
|
border: 1px solid #dee2e6;
|
||||||
table-layout: fixed;
|
table-layout: auto;
|
||||||
}
|
}
|
||||||
table.type-form tbody tr {
|
table.type-form tbody tr {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -6889,6 +6894,9 @@ table.type-form tbody th {
|
|||||||
color: #212529;
|
color: #212529;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
table.type-form tbody th[colspan="6"] {
|
||||||
|
padding: 20px 24px;
|
||||||
|
}
|
||||||
table.type-form .component-input {
|
table.type-form .component-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -6945,7 +6953,8 @@ table tbody td:last-of-type {
|
|||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
table tbody th {
|
table tbody th {
|
||||||
width: 16rem;
|
min-width: 14rem;
|
||||||
|
max-width: 16rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-area ul {
|
.summary-area ul {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -465,4 +465,8 @@ const formatNumberWithComma = (value) => {
|
|||||||
return Number(value).toLocaleString();
|
return Number(value).toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const limitMaxLength = (el) => {
|
||||||
|
const maxLength = parseInt(el.getAttribute('maxlength'), 10);
|
||||||
|
el.value = el.value.replace(/\D/g, '').slice(0, maxLength);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,14 @@
|
|||||||
<div class="content-inner">
|
<div class="content-inner">
|
||||||
<!-- 테이블 영역 -->
|
<!-- 테이블 영역 -->
|
||||||
<table class="type-form">
|
<table class="type-form">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
|||||||
@@ -0,0 +1,353 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
layout:decorate="~{layout/layout}">
|
||||||
|
|
||||||
|
<div class="layer-wrap" th:fragment="modalFragment">
|
||||||
|
<!-- 임산물 현황 등록 모달 폼 -->
|
||||||
|
<form autocomplete="off" method="get" name="reqForestProductForm">
|
||||||
|
<input type="hidden" name="forestProductId">
|
||||||
|
<input type="hidden" name="householdSeq" th:value="${seq}">
|
||||||
|
<input type="hidden" name="recordMonth">
|
||||||
|
|
||||||
|
<div class="component-modal mypage-wrap modal01 modal-forest-product" data-props-dimm-click="true" data-state="close">
|
||||||
|
<div class="modal-dimm"></div>
|
||||||
|
<div class="modal-frame">
|
||||||
|
<div class="modal-container">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-tit">
|
||||||
|
임산물 현황 등록
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-content-inner">
|
||||||
|
<!-- <i class="ico-required-mark" role="img" aria-label="필수">*</i><p>필수입력</p>-->
|
||||||
|
<table class="type-form confirm">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>지번</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="streetNum" name="streetNum">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>지목</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="landType" name="landType">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>읍면동</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="town" name="town">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>재배 작물명<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="cropName" name="cropName">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>면적(평)</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="landArea" name="landArea"
|
||||||
|
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>가능면적(평)</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="availableArea" name="availableArea"
|
||||||
|
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th colspan="6">주생산물</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>수확량</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="mainYield" name="mainYield"
|
||||||
|
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>단위</th>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="mainYieldUnitCode" onchange="selectedUnit(this);" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${unitCodes}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="component-input unit-self-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="mainYieldUnit" name="mainYieldUnit" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>판매량</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="mainSaleAmount" name="mainSaleAmount"
|
||||||
|
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>단위</th>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="mainSaleUnitCode" onchange="selectedUnit(this);" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${unitCodes}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="component-input unit-self-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="mainSaleUnit" name="mainSaleUnit" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th colspan="6">부생산물</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>수확량</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="subYield" name="subYield"
|
||||||
|
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>단위</th>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="subYieldUnitCode" onchange="selectedUnit(this);" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${unitCodes}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="component-input unit-self-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="subYieldUnit" name="subYieldUnit" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>판매량</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" id="subSaleAmount" name="subSaleAmount"
|
||||||
|
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>단위</th>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="subSaleUnitCode" onchange="selectedUnit(this);" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${unitCodes}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="component-input unit-self-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="subSaleUnit" name="subSaleUnit" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="component-btns bottom-btn-group">
|
||||||
|
<div class="btns-row align-right">
|
||||||
|
<button type="button" class="btn btn-primary">
|
||||||
|
<span class="btn-txt">등록</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="modal-close"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// 임산물현황등록 모달창 띄우기
|
||||||
|
const showForestProductModal = (id) => {
|
||||||
|
const f = document.reqForestProductForm;
|
||||||
|
f.recordMonth.value = document.reqForm.recordMonth.value;
|
||||||
|
|
||||||
|
resetForestProductForm();
|
||||||
|
|
||||||
|
if(id != null) {
|
||||||
|
f.forestProductId.value = id;
|
||||||
|
|
||||||
|
ajaxUtil._ajaxMethod(
|
||||||
|
`/api/forestProduct/${id}`,
|
||||||
|
{},
|
||||||
|
(response) => {
|
||||||
|
console.log("임산물현황 상세 응답값 : ", response);
|
||||||
|
setForestProductFormData(response);
|
||||||
|
},
|
||||||
|
function (code, rstData) {
|
||||||
|
console.log("error : ", code);
|
||||||
|
},
|
||||||
|
'get',
|
||||||
|
'json'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelector(".modal-forest-product").ui.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 임산물현황등록 상세 값 set
|
||||||
|
const setForestProductFormData = (data) => {
|
||||||
|
const form = document.reqForestProductForm;
|
||||||
|
if (!form) return;
|
||||||
|
|
||||||
|
form.forestProductId.value = data.id || '';
|
||||||
|
form.streetNum.value = data.streetNum || '';
|
||||||
|
form.landType.value = data.landType || '';
|
||||||
|
form.town.value = data.town || '';
|
||||||
|
form.cropName.value = data.cropName || '';
|
||||||
|
form.landArea.value = data.landArea ?? '';
|
||||||
|
form.availableArea.value = data.availableArea ?? '';
|
||||||
|
form.mainYield.value = data.mainYield ?? '';
|
||||||
|
form.mainSaleAmount.value = data.mainSaleAmount ?? '';
|
||||||
|
form.subYield.value = data.subYield ?? '';
|
||||||
|
form.subSaleAmount.value = data.subSaleAmount ?? '';
|
||||||
|
form.mainYieldUnit.value = data.mainYieldUnit || '';
|
||||||
|
form.mainSaleUnit.value = data.mainSaleUnit || '';
|
||||||
|
form.subYieldUnit.value = data.subYieldUnit || '';
|
||||||
|
form.subSaleUnit.value = data.subSaleUnit || '';
|
||||||
|
|
||||||
|
const unitSelectNames = [
|
||||||
|
'mainYieldUnitCode',
|
||||||
|
'mainSaleUnitCode',
|
||||||
|
'subYieldUnitCode',
|
||||||
|
'subSaleUnitCode'
|
||||||
|
];
|
||||||
|
|
||||||
|
unitSelectNames.forEach((name) => {
|
||||||
|
const select = form.querySelector(`select[name=${name}]`);
|
||||||
|
const value = data[name] || '';
|
||||||
|
if (select) {
|
||||||
|
select.value = value;
|
||||||
|
|
||||||
|
// unit-self-input 처리
|
||||||
|
const tr = select.closest('tr');
|
||||||
|
const unitArea = tr?.querySelector('.unit-self-input');
|
||||||
|
const unitInput = unitArea?.querySelector('input');
|
||||||
|
if (!unitArea || !unitInput) return;
|
||||||
|
|
||||||
|
if (value === 'code.record.unit.self') {
|
||||||
|
unitInput.disabled = false;
|
||||||
|
unitArea.classList.remove('input-disabled');
|
||||||
|
} else {
|
||||||
|
unitInput.disabled = true;
|
||||||
|
unitInput.value = '';
|
||||||
|
unitArea.classList.add('input-disabled');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// form 초기화
|
||||||
|
const resetForestProductForm = () => {
|
||||||
|
const form = document.reqForestProductForm;
|
||||||
|
if (!form) return;
|
||||||
|
|
||||||
|
// 모든 input 초기화
|
||||||
|
form.querySelectorAll('input').forEach((input) => {
|
||||||
|
input.value = '';
|
||||||
|
|
||||||
|
// 단위 직접입력는 다시 비활성화하고 클래스 추가
|
||||||
|
if (input.closest('.unit-self-input')) {
|
||||||
|
input.disabled = true;
|
||||||
|
input.closest('.unit-self-input').classList.add('input-disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 모든 select 초기화
|
||||||
|
form.querySelectorAll('select').forEach((select) => {
|
||||||
|
select.selectedIndex = 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="layer-wrap" th:fragment="modalFragment">
|
<div class="layer-wrap" th:fragment="modalFragment">
|
||||||
<form autocomplete="off" method="get" name="reqVisitForm">
|
<form autocomplete="off" method="get" name="reqVisitForm">
|
||||||
<input type="hidden" name="visitInfoId">
|
<input type="hidden" name="visitInfoId">
|
||||||
<input type="hidden" name="householdSeq">
|
<input type="hidden" name="householdSeq" th:value="${seq}">
|
||||||
|
|
||||||
<div class="component-modal mypage-wrap modal01 modal-visit-info" data-props-dimm-click="true" data-state="close">
|
<div class="component-modal mypage-wrap modal01 modal-visit-info" data-props-dimm-click="true" data-state="close">
|
||||||
<div class="modal-dimm"></div>
|
<div class="modal-dimm"></div>
|
||||||
@@ -19,6 +19,14 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-content-inner">
|
<div class="modal-content-inner">
|
||||||
<table class="type-form confirm">
|
<table class="type-form confirm">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@@ -107,7 +115,7 @@
|
|||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
// form 초기화
|
// form 초기화
|
||||||
const resetForm = () => {
|
const resetVisitForm = () => {
|
||||||
const form = document.reqVisitForm;
|
const form = document.reqVisitForm;
|
||||||
if (!form) return;
|
if (!form) return;
|
||||||
|
|
||||||
@@ -125,9 +133,8 @@
|
|||||||
// 임가방문정보 모달창 띄우기
|
// 임가방문정보 모달창 띄우기
|
||||||
const showVisitInfoModal = (id) => {
|
const showVisitInfoModal = (id) => {
|
||||||
const f = document.reqVisitForm;
|
const f = document.reqVisitForm;
|
||||||
f.householdSeq.value = householdSeq;
|
|
||||||
|
|
||||||
resetForm();
|
resetVisitForm();
|
||||||
|
|
||||||
if(id != null) {
|
if(id != null) {
|
||||||
f.visitInfoId.value = id;
|
f.visitInfoId.value = id;
|
||||||
@@ -137,7 +144,7 @@
|
|||||||
{},
|
{},
|
||||||
(response) => {
|
(response) => {
|
||||||
console.log("임가방문정보 상세 응답값 : ", response);
|
console.log("임가방문정보 상세 응답값 : ", response);
|
||||||
setFormData(response);
|
setVisitFormData(response);
|
||||||
},
|
},
|
||||||
function (code, rstData) {
|
function (code, rstData) {
|
||||||
console.log("error : ", code);
|
console.log("error : ", code);
|
||||||
@@ -151,7 +158,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 임가방문정보 상세 값 set
|
// 임가방문정보 상세 값 set
|
||||||
const setFormData = (data) => {
|
const setVisitFormData = (data) => {
|
||||||
const form = document.reqVisitForm;
|
const form = document.reqVisitForm;
|
||||||
if (!form) return;
|
if (!form) return;
|
||||||
|
|
||||||
@@ -184,7 +191,7 @@
|
|||||||
(response) => { // 성공
|
(response) => { // 성공
|
||||||
alert("등록이 완료되었습니다.");
|
alert("등록이 완료되었습니다.");
|
||||||
document.querySelector(".modal-visit-info").ui.close();
|
document.querySelector(".modal-visit-info").ui.close();
|
||||||
getVisitInfo(0);
|
getVisitInfo();
|
||||||
},
|
},
|
||||||
function (code, rstData) {
|
function (code, rstData) {
|
||||||
if(code == 422) alert(rstData.responseText);
|
if(code == 422) alert(rstData.responseText);
|
||||||
|
|||||||
@@ -451,7 +451,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
<input type="checkbox" id="checkbox_work_${item.id}" name="checkbox_work" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -501,7 +501,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
<input type="checkbox" id="checkbox_expense_${item.id}" name="checkbox_expense" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -542,7 +542,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
<input type="checkbox" id="checkbox_power_${item.id}" name="checkbox_power" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -579,7 +579,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
<input type="checkbox" id="checkbox_forestry_${item.id}" name="checkbox_forestry" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -618,7 +618,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}">
|
<input type="checkbox" id="checkbox_farming_${item.id}" name="checkbox_farming" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<button type="button" class="btn small btn-secondary">
|
<button type="button" class="btn small btn-secondary">
|
||||||
<span class=" btn-txt">삭제</span>
|
<span class=" btn-txt">삭제</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn small btn-primary">
|
<button type="button" class="btn small btn-primary" onclick="showForestProductModal();">
|
||||||
<span class="btn-txt">추가</span>
|
<span class="btn-txt">추가</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,7 +93,9 @@
|
|||||||
<td>${ifNullHyphen(item.landType)}</td><!-- 지목 -->
|
<td>${ifNullHyphen(item.landType)}</td><!-- 지목 -->
|
||||||
<td>${ifNullHyphen(item.town)}</td><!-- 읍면동 -->
|
<td>${ifNullHyphen(item.town)}</td><!-- 읍면동 -->
|
||||||
<td>${ifNullHyphen(item.availableArea)}</td><!-- 가능면적(평) -->
|
<td>${ifNullHyphen(item.availableArea)}</td><!-- 가능면적(평) -->
|
||||||
<td>${ifNullHyphen(item.cropName)}</td><!-- 재배작물명 -->
|
<td class="underline">
|
||||||
|
<a href="javascript:void(0);" onclick="showForestProductModal(${item.id});">${ifNullHyphen(item.cropName)}</a>
|
||||||
|
</td><!-- 재배작물명 -->
|
||||||
<td>${ifNullHyphen(item.landArea)}</td><!-- 면적(평) -->
|
<td>${ifNullHyphen(item.landArea)}</td><!-- 면적(평) -->
|
||||||
<td class="align-right">${ifNullHyphen(item.mainYield)}</td><!-- 주생산물 수확량 -->
|
<td class="align-right">${ifNullHyphen(item.mainYield)}</td><!-- 주생산물 수확량 -->
|
||||||
<td>${ifNullHyphen(item.mainYieldUnitText)}</td><!-- 주생산물 수확량 단위 -->
|
<td>${ifNullHyphen(item.mainYieldUnitText)}</td><!-- 주생산물 수확량 단위 -->
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<label class="checkbox-inner">
|
<label class="checkbox-inner">
|
||||||
<input type="checkbox" id="removeIds_${item.id}" name="removeIds" value="${item.id}">
|
<input type="checkbox" id="visitRemoveIds_${item.id}" name="visitRemoveIds" value="${item.id}">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -96,24 +96,27 @@
|
|||||||
|
|
||||||
// 임가방문정보 삭제
|
// 임가방문정보 삭제
|
||||||
const goDeleteVisitInfo = () => {
|
const goDeleteVisitInfo = () => {
|
||||||
const infoIds = $('input[name=removeIds]:checked');
|
const checkedIds = Array.from(
|
||||||
if(infoIds.length <= 0) {
|
document.querySelectorAll('input[name="visitRemoveIds"]:checked')
|
||||||
|
).map(el => Number(el.value));
|
||||||
|
|
||||||
|
if(checkedIds.length <= 0) {
|
||||||
alert("임가방문정보를 선택해주세요.");
|
alert("임가방문정보를 선택해주세요.");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
|
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
let dataOj = $(f).serializeObject();
|
|
||||||
|
|
||||||
console.log("dataOj", dataOj);
|
|
||||||
|
|
||||||
ajaxUtil._ajaxMethod(
|
ajaxUtil._ajaxMethod(
|
||||||
'/api/visitInfo/remove',
|
'/api/visitInfo/remove',
|
||||||
JSON.stringify(dataOj),
|
JSON.stringify({
|
||||||
|
householdSeq: f.householdSeq.value,
|
||||||
|
visitRemoveIds: checkedIds
|
||||||
|
}),
|
||||||
(response) => { // 성공
|
(response) => { // 성공
|
||||||
alert("방문정보가 삭제되었습니다.");
|
alert("방문정보가 삭제되었습니다.");
|
||||||
getVisitInfo(0);
|
getVisitInfo();
|
||||||
},
|
},
|
||||||
function (code, rstData) {
|
function (code, rstData) {
|
||||||
if(code == 422) alert(rstData.responseText);
|
if(code == 422) alert(rstData.responseText);
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
<div class="content-inner">
|
<div class="content-inner">
|
||||||
<!-- 테이블 영역 -->
|
<!-- 테이블 영역 -->
|
||||||
<table class="type-form">
|
<table class="type-form">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
|||||||
@@ -9,6 +9,14 @@
|
|||||||
<div class="content-inner">
|
<div class="content-inner">
|
||||||
<section>
|
<section>
|
||||||
<table class="type-form confirm">
|
<table class="type-form confirm">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<th>임가번호</th>
|
<th>임가번호</th>
|
||||||
@@ -175,13 +183,12 @@
|
|||||||
|
|
||||||
<!-- 임가방문정보 모달 -->
|
<!-- 임가방문정보 모달 -->
|
||||||
<th:block th:replace="households/modal/modal-visit-info :: modalFragment"/>
|
<th:block th:replace="households/modal/modal-visit-info :: modalFragment"/>
|
||||||
|
|
||||||
|
<!-- 임산물현황등록 모달 -->
|
||||||
|
<th:block th:replace="households/modal/modal-forest-product :: modalFragment"/>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
|
||||||
const householdSeq = document.reqForm.householdSeq.value;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// 일계부 완료상태
|
// 일계부 완료상태
|
||||||
const statusInfoMap = {
|
const statusInfoMap = {
|
||||||
@@ -301,6 +308,22 @@
|
|||||||
|
|
||||||
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">${noDataText}</td></tr>`);
|
$(target).append(`<tr><td colspan="${length}" style="text-align: center;">${noDataText}</td></tr>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 단위 선택 (직접입력 선택시 input 활성화)
|
||||||
|
const selectedUnit = (el) => {
|
||||||
|
const tr = el.closest('tr');
|
||||||
|
const unitArea = tr.querySelector('.unit-self-input');
|
||||||
|
const unitInput = tr.querySelector('.unit-self-input input');
|
||||||
|
|
||||||
|
if (el.value === 'code.record.unit.self') {
|
||||||
|
unitInput.disabled = false;
|
||||||
|
unitArea.classList.remove('input-disabled');
|
||||||
|
} else {
|
||||||
|
unitInput.disabled = true;
|
||||||
|
unitInput.value = '';
|
||||||
|
unitArea.classList.add('input-disabled');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
<form autocomplete="off" method="get" name="householdVisitReqForm" >
|
<form autocomplete="off" method="get" name="householdVisitReqForm" >
|
||||||
<input type="hidden" name="id" id="id" />
|
<input type="hidden" name="id" id="id" />
|
||||||
<table class="type-form confirm" >
|
<table class="type-form confirm" >
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
<tbody id="household-visit-detail">
|
<tbody id="household-visit-detail">
|
||||||
<tr>
|
<tr>
|
||||||
<th>방문일</th>
|
<th>방문일</th>
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.persistence;
|
package app.module.core.usecase.daily.record.adapters.persistence;
|
||||||
|
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
|
||||||
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.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
import app.module.core.config.application.util.AuditUtil;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
import app.module.core.config.application.util.DailyUtil;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.UpdateDailyRecordStatusCmd;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortOut;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.UpdateDailyRecordStatusCmd;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
@@ -64,11 +64,12 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus) {
|
public void updateByStatus(String recordMonth, Integer dayGroupNo, Long householdSeq, String targetType, String targetStatus) {
|
||||||
UpdateDailyRecordStatusCmd command = AuditUtil.update(
|
UpdateDailyRecordStatusCmd command = AuditUtil.update(
|
||||||
new UpdateDailyRecordStatusCmd(
|
new UpdateDailyRecordStatusCmd(
|
||||||
recordMonth,
|
recordMonth,
|
||||||
dayGroupNo,
|
dayGroupNo,
|
||||||
|
householdSeq,
|
||||||
"ALL".equals(targetType) ? targetStatus : null,
|
"ALL".equals(targetType) ? targetStatus : null,
|
||||||
!"ALL".equals(targetType) ? targetType : null,
|
!"ALL".equals(targetType) ? targetType : null,
|
||||||
!"ALL".equals(targetType) ? targetStatus : null
|
!"ALL".equals(targetType) ? targetStatus : null
|
||||||
@@ -76,7 +77,7 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ("ALL".equals(targetType)) {
|
if ("ALL".equals(targetType)) {
|
||||||
String allStatus = this.getUpdateAllStatus(recordMonth, dayGroupNo, command.getHouseholdSeq());
|
String allStatus = this.getUpdateAllStatus(recordMonth, dayGroupNo, householdSeq);
|
||||||
if (allStatus != null) {
|
if (allStatus != null) {
|
||||||
command.setAllStatus(allStatus);
|
command.setAllStatus(allStatus);
|
||||||
|
|
||||||
@@ -94,9 +95,9 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
/**
|
/**
|
||||||
* 일계부 전체 입력상태 변경
|
* 일계부 전체 입력상태 변경
|
||||||
*
|
*
|
||||||
* @param searchMonth
|
* @param searchMonth 검색 월(yyyyMM)
|
||||||
* @param dayGroupNo
|
* @param dayGroupNo 검색 그룸번호
|
||||||
* @param householdSeq
|
* @param householdSeq 임가 일련번호
|
||||||
*/
|
*/
|
||||||
private void updateByAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
private void updateByAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
String allStatus = this.getUpdateAllStatus(searchMonth, dayGroupNo, householdSeq);
|
String allStatus = this.getUpdateAllStatus(searchMonth, dayGroupNo, householdSeq);
|
||||||
@@ -105,6 +106,7 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
new UpdateDailyRecordStatusCmd(
|
new UpdateDailyRecordStatusCmd(
|
||||||
searchMonth,
|
searchMonth,
|
||||||
dayGroupNo,
|
dayGroupNo,
|
||||||
|
householdSeq,
|
||||||
allStatus,
|
allStatus,
|
||||||
null,
|
null,
|
||||||
null
|
null
|
||||||
@@ -119,11 +121,11 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO 변경할 전체 입력상태 조회
|
* 변경할 전체 입력상태 조회
|
||||||
*
|
*
|
||||||
* @param searchMonth
|
* @param searchMonth 검색 월(yyyyMM)
|
||||||
* @param dayGroupNo
|
* @param dayGroupNo 검색 그룸번호
|
||||||
* @param householdSeq
|
* @param householdSeq 임가 일련번호
|
||||||
* @return 변경할 전체 입력상태
|
* @return 변경할 전체 입력상태
|
||||||
*/
|
*/
|
||||||
private String getUpdateAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
private String getUpdateAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
@@ -197,6 +199,6 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
* @return true=입력대상인데 데이터가 없는 경우, false=입력대상 아니거나, 데이터가 있는 경우
|
* @return true=입력대상인데 데이터가 없는 경우, false=입력대상 아니거나, 데이터가 있는 경우
|
||||||
*/
|
*/
|
||||||
private boolean checkTargetDataNone(DailyTargetStatus status, Integer count) {
|
private boolean checkTargetDataNone(DailyTargetStatus status, Integer count) {
|
||||||
return DailyTargetStatus.TARGET.equals(status) && count == 0;
|
return this.checkTarget(status) && count == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.persistence;
|
package app.module.core.usecase.daily.record.adapters.persistence;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.core.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
import app.module.core.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
import app.module.core.usecase.daily.record.ports.application.domain.UpdateDailyRecordStatusCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.UpdateDailyRecordStatusCmd;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.persistence.model;
|
package app.module.core.usecase.daily.record.adapters.persistence.model;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.DailySort;
|
import app.module.core.config.application.enums.DailySort;
|
||||||
import app.module.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
@@ -59,7 +59,6 @@ public class DailyRecordDto {
|
|||||||
private List<DailySort> stepList;
|
private List<DailySort> stepList;
|
||||||
/**
|
/**
|
||||||
* 다음 단계로 이동될 단계 조회
|
* 다음 단계로 이동될 단계 조회
|
||||||
*
|
|
||||||
* @return 다음 단계명
|
* @return 다음 단계명
|
||||||
*/
|
*/
|
||||||
public String getNextStep() {
|
public String getNextStep() {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.persistence.model;
|
package app.module.core.usecase.daily.record.adapters.persistence.model;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.web.model;
|
package app.module.core.usecase.daily.record.adapters.web.model;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
@@ -13,6 +13,8 @@ public class CreateDailyRecordReqVO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
private int dayGroupNo;
|
private int dayGroupNo;
|
||||||
|
private Long householdSeq;
|
||||||
|
|
||||||
private LocalDate startDate;
|
private LocalDate startDate;
|
||||||
private LocalDate endDate;
|
private LocalDate endDate;
|
||||||
private String todayNone;
|
private String todayNone;
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package app.module.core.usecase.daily.record.adapters.web.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.ToString;
|
||||||
|
import org.apache.tika.utils.StringUtils;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
public class DailyUIReqVO {
|
||||||
|
public DailyUIReqVO() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public DailyUIReqVO(String searchMonth, Integer groupNo, Long householdSeq) {
|
||||||
|
this.searchMonth = searchMonth;
|
||||||
|
this.groupNo = groupNo;
|
||||||
|
this.householdSeq = householdSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DailyUIReqVO(String searchMonth, String groupNo, Long householdSeq) {
|
||||||
|
this.searchMonth = searchMonth;
|
||||||
|
if (!StringUtils.isBlank(groupNo)) {
|
||||||
|
this.groupNo = Integer.parseInt(groupNo);
|
||||||
|
}
|
||||||
|
this.householdSeq = householdSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 검색 월(yyyyMM)
|
||||||
|
*/
|
||||||
|
private String searchMonth;
|
||||||
|
/**
|
||||||
|
* 검색 그룸번호
|
||||||
|
*/
|
||||||
|
private Integer groupNo;
|
||||||
|
/**
|
||||||
|
* 임가 일련번호
|
||||||
|
*/
|
||||||
|
private Long householdSeq;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package app.module.core.usecase.daily.record.ports;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
|
import app.module.core.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||||
|
import app.module.core.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
|
|
||||||
|
public interface DailyRecordPortIn {
|
||||||
|
/**
|
||||||
|
* 일계부 항목 조회
|
||||||
|
*
|
||||||
|
* @param reqVO 검색 조건
|
||||||
|
* @return 항목 상세
|
||||||
|
*/
|
||||||
|
DailyRecordDto detail(String recordMonth, Integer dayGroupNo, Long householdSeq);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 항목 등록
|
||||||
|
*
|
||||||
|
* @param formVO 입력 데이터
|
||||||
|
*/
|
||||||
|
void create(CreateDailyRecordReqVO formVO);
|
||||||
|
|
||||||
|
void updateByStatus(String recordMonth, Integer dayGroupNo, Long householdSeq, String targetType, String targetStatus);
|
||||||
|
|
||||||
|
void updateByAllStatus(String recordMonth, Integer dayGroupNo, Long householdSeq);
|
||||||
|
}
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
package app.module.front.usecase.daily.record.ports;
|
package app.module.core.usecase.daily.record.ports;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
import app.module.core.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||||
|
|
||||||
public interface DailyRecordPortOut {
|
public interface DailyRecordPortOut {
|
||||||
/**
|
/**
|
||||||
@@ -20,5 +21,5 @@ public interface DailyRecordPortOut {
|
|||||||
*/
|
*/
|
||||||
void create(GetDailyRecordCmd findCmd, CreateDailyRecordCmd command);
|
void create(GetDailyRecordCmd findCmd, CreateDailyRecordCmd command);
|
||||||
|
|
||||||
void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus);
|
void updateByStatus(String recordMonth, Integer dayGroupNo, Long householdSeq, String targetType, String targetStatus);
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,15 @@
|
|||||||
package app.module.front.usecase.daily.record.ports.application;
|
package app.module.core.usecase.daily.record.ports.application;
|
||||||
|
|
||||||
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.core.config.application.enums.DailySort;
|
import app.module.core.config.application.enums.DailySort;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.core.config.application.util.AuditUtil;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
import app.module.core.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
import app.module.core.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortOut;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||||
|
import app.module.core.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -25,10 +24,8 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
private final DailyRecordPortOut portOut;
|
private final DailyRecordPortOut portOut;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DailyRecordDto detail(DailyUIReqVO reqVO) {
|
public DailyRecordDto detail(String recordMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
DailyRecordDto dailyRecord = portOut.detail(new GetDailyRecordCmd(reqVO.getSearchMonth(),
|
DailyRecordDto dailyRecord = portOut.detail(new GetDailyRecordCmd(recordMonth, dayGroupNo, householdSeq));
|
||||||
reqVO.getGroupNo(),
|
|
||||||
reqVO.getHouseholdSeq()));
|
|
||||||
|
|
||||||
if (dailyRecord != null) {
|
if (dailyRecord != null) {
|
||||||
List<DailySort> targetList = new ArrayList<>();
|
List<DailySort> targetList = new ArrayList<>();
|
||||||
@@ -71,13 +68,14 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(
|
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(
|
||||||
formVO.getRecordMonth(),
|
formVO.getRecordMonth(),
|
||||||
formVO.getDayGroupNo(),
|
formVO.getDayGroupNo(),
|
||||||
AuthUtil.getUserSeq());
|
formVO.getHouseholdSeq());
|
||||||
|
|
||||||
CreateDailyRecordCmd command = AuditUtil.create(
|
CreateDailyRecordCmd command = AuditUtil.create(
|
||||||
new CreateDailyRecordCmd(
|
new CreateDailyRecordCmd(
|
||||||
null,
|
null,
|
||||||
formVO.getRecordMonth(),
|
formVO.getRecordMonth(),
|
||||||
formVO.getDayGroupNo(),
|
formVO.getDayGroupNo(),
|
||||||
|
formVO.getHouseholdSeq(),
|
||||||
formVO.getStartDate(),
|
formVO.getStartDate(),
|
||||||
formVO.getEndDate(),
|
formVO.getEndDate(),
|
||||||
formVO.getAllStatus(),
|
formVO.getAllStatus(),
|
||||||
@@ -92,13 +90,13 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus) {
|
public void updateByStatus(String recordMonth, Integer dayGroupNo, Long householdSeq, String targetType, String targetStatus) {
|
||||||
portOut.updateByStatus(recordMonth, dayGroupNo, targetType, targetStatus);
|
portOut.updateByStatus(recordMonth, dayGroupNo, householdSeq, targetType, targetStatus);
|
||||||
portOut.updateByStatus(recordMonth, dayGroupNo, "ALL", null);
|
portOut.updateByStatus(recordMonth, dayGroupNo, householdSeq, "ALL", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateByAllStatus(String recordMonth, Integer dayGroupNo) {
|
public void updateByAllStatus(String recordMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
portOut.updateByStatus(recordMonth, dayGroupNo, "ALL", null);
|
portOut.updateByStatus(recordMonth, dayGroupNo, householdSeq, "ALL", null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.record.ports.application.domain;
|
package app.module.core.usecase.daily.record.ports.application.domain;
|
||||||
|
|
||||||
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
import app.module.core.config.adapters.persistence.component.AuditCommand;
|
||||||
import app.module.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -14,10 +14,12 @@ import java.time.LocalDate;
|
|||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ToString
|
@ToString
|
||||||
public class CreateDailyRecordCmd extends FrontAuditCommand {
|
public class CreateDailyRecordCmd extends AuditCommand {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
private int dayGroupNo;
|
private int dayGroupNo;
|
||||||
|
private Long householdSeq;
|
||||||
|
|
||||||
private LocalDate startDate;
|
private LocalDate startDate;
|
||||||
private LocalDate endDate;
|
private LocalDate endDate;
|
||||||
private DailyStatus allStatus;
|
private DailyStatus allStatus;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package app.module.front.usecase.daily.record.ports.application.domain;
|
package app.module.core.usecase.daily.record.ports.application.domain;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.record.ports.application.domain;
|
package app.module.core.usecase.daily.record.ports.application.domain;
|
||||||
|
|
||||||
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
import app.module.core.config.adapters.persistence.component.AuditCommand;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -10,9 +10,11 @@ import lombok.ToString;
|
|||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ToString
|
@ToString
|
||||||
public class UpdateDailyRecordStatusCmd extends FrontAuditCommand {
|
public class UpdateDailyRecordStatusCmd extends AuditCommand {
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
private Integer dayGroupNo;
|
private Integer dayGroupNo;
|
||||||
|
private Long householdSeq;
|
||||||
|
|
||||||
private String allStatus;
|
private String allStatus;
|
||||||
private String targetType;
|
private String targetType;
|
||||||
private String targetStatus;
|
private String targetStatus;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper">
|
<mapper namespace="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper">
|
||||||
|
|
||||||
<select id="getDailyRecord"
|
<select id="getDailyRecord"
|
||||||
resultType="app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto">
|
resultType="app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto">
|
||||||
select ddg.group_no, ddg.start_day, ddg.end_day
|
select ddg.group_no, ddg.start_day, ddg.end_day
|
||||||
, dr.id, dr.record_month, dr.day_group_no, dr.start_date, dr.end_date
|
, dr.id, dr.record_month, dr.day_group_no, dr.start_date, dr.end_date
|
||||||
, dr.all_status, dr.income_status, dr.work_status, dr.expense_status, dr.power_status, dr.forestry_status, dr.farming_status
|
, dr.all_status, dr.income_status, dr.work_status, dr.expense_status, dr.power_status, dr.forestry_status, dr.farming_status
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDailyRecordStatus"
|
<select id="getDailyRecordStatus"
|
||||||
resultType="app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
resultType="app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
||||||
select dr.id as daily_id
|
select dr.id as daily_id
|
||||||
, dr.day_group_no, dr.start_date, dr.end_date
|
, dr.day_group_no, dr.start_date, dr.end_date
|
||||||
, dr.all_status
|
, dr.all_status
|
||||||
@@ -10,9 +10,9 @@ 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.CalendarChildren;
|
||||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendar;
|
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.calendar.ports.application.domain.RecordCalendarCmd;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper;
|
import app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
import app.module.core.usecase.daily.record.ports.application.domain.GetDailyRecordCmd;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app.module.front.usecase.daily.calendar.adapters.persistence;
|
package app.module.front.usecase.daily.calendar.adapters.persistence;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.calendar.adapters.persistence.model.DailyRecordCalendarDto;
|
import app.module.front.usecase.daily.calendar.adapters.persistence.model.DailyRecordCalendarDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.core.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.adapters.persistence.model.MonthlyStatusDto;
|
||||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.calendar.adapters.web.model;
|
package app.module.front.usecase.daily.calendar.adapters.web.model;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ 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.RecordCalendar;
|
||||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package app.module.front.usecase.daily.calendar.ports.application;
|
package app.module.front.usecase.daily.calendar.ports.application;
|
||||||
|
|
||||||
import app.module.front.config.application.util.AuthUtil;
|
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.RecordCalendarPortIn;
|
||||||
import app.module.front.usecase.daily.calendar.ports.RecordCalendarPortOut;
|
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.RecordCalendar;
|
||||||
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
import app.module.front.usecase.daily.calendar.ports.application.domain.RecordCalendarCmd;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.module.front.usecase.daily.expense.adapters.web.model.CreateDailyExpe
|
|||||||
import app.module.front.usecase.daily.expense.adapters.web.model.RemoveDailyExpenseReqVO;
|
import app.module.front.usecase.daily.expense.adapters.web.model.RemoveDailyExpenseReqVO;
|
||||||
import app.module.front.usecase.daily.expense.adapters.web.validator.CreateDailyExpenseValidator;
|
import app.module.front.usecase.daily.expense.adapters.web.validator.CreateDailyExpenseValidator;
|
||||||
import app.module.front.usecase.daily.expense.ports.DailyExpensePortIn;
|
import app.module.front.usecase.daily.expense.ports.DailyExpensePortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@RequestMapping(path = "/api/record/expense")
|
@RequestMapping(path = "/api/record/expense")
|
||||||
public class DailyExpenseController {
|
public class DailyExpenseController {
|
||||||
private final CoreUtil coreUtil;
|
private final CoreUtil coreUtil;
|
||||||
private final DailyRecordPortIn dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
private final DailyExpensePortIn dailyExpensePortIn;
|
private final DailyExpensePortIn dailyExpensePortIn;
|
||||||
private final CreateDailyExpenseValidator createValidator;
|
private final CreateDailyExpenseValidator createValidator;
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ public class DailyExpenseController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordService.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|||||||
import app.module.front.usecase.daily.expense.adapters.persistence.model.DailyExpenseDto;
|
import app.module.front.usecase.daily.expense.adapters.persistence.model.DailyExpenseDto;
|
||||||
import app.module.front.usecase.daily.expense.adapters.web.model.DailyExpenseUIReqVO;
|
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.expense.ports.DailyExpensePortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -28,7 +28,7 @@ import java.util.List;
|
|||||||
@RequestMapping(path = "/record/expense")
|
@RequestMapping(path = "/record/expense")
|
||||||
public class DailyExpenseUIController {
|
public class DailyExpenseUIController {
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordPortIn dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
private final DailyExpensePortIn dailyExpensePortIn;
|
private final DailyExpensePortIn dailyExpensePortIn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,7 +108,7 @@ public class DailyExpenseUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordService.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.expense.ports.application;
|
package app.module.front.usecase.daily.expense.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
@@ -13,7 +14,7 @@ import app.module.front.usecase.daily.expense.ports.DailyExpensePortOut;
|
|||||||
import app.module.front.usecase.daily.expense.ports.application.domain.CreateDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.CreateDailyExpenseCmd;
|
||||||
import app.module.front.usecase.daily.expense.ports.application.domain.GetDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.GetDailyExpenseCmd;
|
||||||
import app.module.front.usecase.daily.expense.ports.application.domain.RemoveDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.RemoveDailyExpenseCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
import app.module.core.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ import java.util.List;
|
|||||||
public class DailyExpenseService implements DailyExpensePortIn {
|
public class DailyExpenseService implements DailyExpensePortIn {
|
||||||
private final DailyExpensePortOut portOut;
|
private final DailyExpensePortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyExpenseDto> list(DailyExpenseUIReqVO reqVO) {
|
public List<DailyExpenseDto> list(DailyExpenseUIReqVO reqVO) {
|
||||||
@@ -110,7 +111,7 @@ public class DailyExpenseService implements DailyExpensePortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -132,6 +133,6 @@ public class DailyExpenseService implements DailyExpensePortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarm
|
|||||||
import app.module.front.usecase.daily.farming.adapters.web.model.RemoveDailyFarmingReqVO;
|
import app.module.front.usecase.daily.farming.adapters.web.model.RemoveDailyFarmingReqVO;
|
||||||
import app.module.front.usecase.daily.farming.adapters.web.validator.CreateDailyFarmingValidator;
|
import app.module.front.usecase.daily.farming.adapters.web.validator.CreateDailyFarmingValidator;
|
||||||
import app.module.front.usecase.daily.farming.ports.application.DailyFarmingService;
|
import app.module.front.usecase.daily.farming.ports.application.DailyFarmingService;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@RequestMapping(path = "/api/record/farming")
|
@RequestMapping(path = "/api/record/farming")
|
||||||
public class DailyFarmingController {
|
public class DailyFarmingController {
|
||||||
private final CoreUtil coreUtil;
|
private final CoreUtil coreUtil;
|
||||||
private final DailyRecordPortIn dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
private final DailyFarmingService dailyFarmingPortIn;
|
private final DailyFarmingService dailyFarmingPortIn;
|
||||||
private final CreateDailyFarmingValidator createValidator;
|
private final CreateDailyFarmingValidator createValidator;
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ public class DailyFarmingController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordService.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|||||||
import app.module.front.usecase.daily.farming.adapters.persistence.model.DailyFarmingDto;
|
import app.module.front.usecase.daily.farming.adapters.persistence.model.DailyFarmingDto;
|
||||||
import app.module.front.usecase.daily.farming.adapters.web.model.DailyFarmingUIReqVO;
|
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.farming.ports.application.DailyFarmingService;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -108,7 +108,7 @@ public class DailyFarmingUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.farming.ports.application;
|
package app.module.front.usecase.daily.farming.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
@@ -13,7 +14,6 @@ import app.module.front.usecase.daily.farming.ports.DailyFarmingPortOut;
|
|||||||
import app.module.front.usecase.daily.farming.ports.application.domain.CreateDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.CreateDailyFarmingCmd;
|
||||||
import app.module.front.usecase.daily.farming.ports.application.domain.GetDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.GetDailyFarmingCmd;
|
||||||
import app.module.front.usecase.daily.farming.ports.application.domain.RemoveDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.RemoveDailyFarmingCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -26,7 +26,7 @@ import java.util.List;
|
|||||||
public class DailyFarmingService implements DailyFarmingPortIn {
|
public class DailyFarmingService implements DailyFarmingPortIn {
|
||||||
private final DailyFarmingPortOut portOut;
|
private final DailyFarmingPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyFarmingDto> list(DailyFarmingUIReqVO reqVO) {
|
public List<DailyFarmingDto> list(DailyFarmingUIReqVO reqVO) {
|
||||||
@@ -135,7 +135,7 @@ public class DailyFarmingService implements DailyFarmingPortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -157,6 +157,6 @@ public class DailyFarmingService implements DailyFarmingPortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.module.front.usecase.daily.forestry.adapters.web.model.CreateDailyFor
|
|||||||
import app.module.front.usecase.daily.forestry.adapters.web.model.RemoveDailyForestryReqVO;
|
import app.module.front.usecase.daily.forestry.adapters.web.model.RemoveDailyForestryReqVO;
|
||||||
import app.module.front.usecase.daily.forestry.adapters.web.validator.CreateDailyForestryValidator;
|
import app.module.front.usecase.daily.forestry.adapters.web.validator.CreateDailyForestryValidator;
|
||||||
import app.module.front.usecase.daily.forestry.ports.DailyForestryPortIn;
|
import app.module.front.usecase.daily.forestry.ports.DailyForestryPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -121,7 +121,7 @@ public class DailyForestryController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordService.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordService.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|||||||
import app.module.front.usecase.daily.forestry.adapters.persistence.model.DailyForestryDto;
|
import app.module.front.usecase.daily.forestry.adapters.persistence.model.DailyForestryDto;
|
||||||
import app.module.front.usecase.daily.forestry.adapters.web.model.DailyForestryUIReqVO;
|
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.forestry.ports.DailyForestryPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -108,7 +108,7 @@ public class DailyForestryUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.forestry.ports.application;
|
package app.module.front.usecase.daily.forestry.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
@@ -13,7 +14,7 @@ import app.module.front.usecase.daily.forestry.ports.DailyForestryPortOut;
|
|||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.CreateDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.CreateDailyForestryCmd;
|
||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.GetDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.GetDailyForestryCmd;
|
||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.RemoveDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.RemoveDailyForestryCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
import app.module.core.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -26,7 +27,7 @@ import java.util.List;
|
|||||||
public class DailyForestryService implements DailyForestryPortIn {
|
public class DailyForestryService implements DailyForestryPortIn {
|
||||||
private final DailyForestryPortOut portOut;
|
private final DailyForestryPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyForestryDto> list(DailyForestryUIReqVO reqVO) {
|
public List<DailyForestryDto> list(DailyForestryUIReqVO reqVO) {
|
||||||
@@ -108,7 +109,7 @@ public class DailyForestryService implements DailyForestryPortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -130,6 +131,6 @@ public class DailyForestryService implements DailyForestryPortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.module.front.usecase.daily.income.adapters.web.model.CreateDailyIncom
|
|||||||
import app.module.front.usecase.daily.income.adapters.web.model.RemoveDailyIncomeReqVO;
|
import app.module.front.usecase.daily.income.adapters.web.model.RemoveDailyIncomeReqVO;
|
||||||
import app.module.front.usecase.daily.income.adapters.web.validator.CreateDailyIncomeValidator;
|
import app.module.front.usecase.daily.income.adapters.web.validator.CreateDailyIncomeValidator;
|
||||||
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -121,7 +121,7 @@ public class DailyIncomeController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|||||||
import app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto;
|
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.adapters.web.model.DailyIncomeUIReqVO;
|
||||||
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -109,7 +109,7 @@ public class DailyIncomeUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.income.ports.application;
|
package app.module.front.usecase.daily.income.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
@@ -13,7 +14,7 @@ import app.module.front.usecase.daily.income.ports.DailyIncomePortOut;
|
|||||||
import app.module.front.usecase.daily.income.ports.application.domain.CreateDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.CreateDailyIncomeCmd;
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.GetDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.GetDailyIncomeCmd;
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.RemoveDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.RemoveDailyIncomeCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
import app.module.core.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ import java.util.List;
|
|||||||
public class DailyIncomeService implements DailyIncomePortIn {
|
public class DailyIncomeService implements DailyIncomePortIn {
|
||||||
private final DailyIncomePortOut portOut;
|
private final DailyIncomePortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyIncomeDto> list(DailyIncomeUIReqVO reqVO) {
|
public List<DailyIncomeDto> list(DailyIncomeUIReqVO reqVO) {
|
||||||
@@ -114,7 +115,7 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -136,6 +137,6 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import app.module.front.usecase.daily.power.adapters.web.model.CreateDailyPowerR
|
|||||||
import app.module.front.usecase.daily.power.adapters.web.model.RemoveDailyPowerReqVO;
|
import app.module.front.usecase.daily.power.adapters.web.model.RemoveDailyPowerReqVO;
|
||||||
import app.module.front.usecase.daily.power.adapters.web.validator.CreateDailyPowerValidator;
|
import app.module.front.usecase.daily.power.adapters.web.validator.CreateDailyPowerValidator;
|
||||||
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -121,7 +121,7 @@ public class DailyPowerController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import app.module.core.config.application.exception.NoRecordDataException;
|
|||||||
import app.module.front.usecase.daily.power.adapters.persistence.model.DailyPowerDto;
|
import app.module.front.usecase.daily.power.adapters.persistence.model.DailyPowerDto;
|
||||||
import app.module.front.usecase.daily.power.adapters.web.model.DailyPowerUIReqVO;
|
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.power.ports.DailyPowerPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
@@ -103,7 +103,7 @@ public class DailyPowerUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
package app.module.front.usecase.daily.power.ports.application;
|
package app.module.front.usecase.daily.power.ports.application;
|
||||||
|
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
import app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto;
|
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.CreateDailyIncomeCmd;
|
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.GetDailyIncomeCmd;
|
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.RemoveDailyIncomeCmd;
|
|
||||||
import app.module.front.usecase.daily.power.adapters.persistence.model.DailyPowerDto;
|
import app.module.front.usecase.daily.power.adapters.persistence.model.DailyPowerDto;
|
||||||
import app.module.front.usecase.daily.power.adapters.web.model.CreateDailyPowerReqVO;
|
import app.module.front.usecase.daily.power.adapters.web.model.CreateDailyPowerReqVO;
|
||||||
import app.module.front.usecase.daily.power.adapters.web.model.DailyPowerUIReqVO;
|
import app.module.front.usecase.daily.power.adapters.web.model.DailyPowerUIReqVO;
|
||||||
@@ -16,7 +11,7 @@ import app.module.front.usecase.daily.power.ports.DailyPowerPortOut;
|
|||||||
import app.module.front.usecase.daily.power.ports.application.domain.CreateDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.CreateDailyPowerCmd;
|
||||||
import app.module.front.usecase.daily.power.ports.application.domain.GetDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.GetDailyPowerCmd;
|
||||||
import app.module.front.usecase.daily.power.ports.application.domain.RemoveDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.RemoveDailyPowerCmd;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
import app.module.core.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -26,7 +21,7 @@ import java.util.List;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class DailyPowerService implements DailyPowerPortIn {
|
public class DailyPowerService implements DailyPowerPortIn {
|
||||||
private final DailyPowerPortOut portOut;
|
private final DailyPowerPortOut portOut;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyPowerDto> list(DailyPowerUIReqVO reqVO) {
|
public List<DailyPowerDto> list(DailyPowerUIReqVO reqVO) {
|
||||||
@@ -74,7 +69,7 @@ public class DailyPowerService implements DailyPowerPortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -96,6 +91,6 @@ public class DailyPowerService implements DailyPowerPortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.persistence.model;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class UpdateDailyRecordDto {
|
|
||||||
private String monthly;
|
|
||||||
private String updatedBy;
|
|
||||||
private String statusType;
|
|
||||||
private String statusCode;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.web;
|
package app.module.front.usecase.daily.record.adapters.web;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
|
||||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||||
|
import app.module.core.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||||
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
|
import app.module.front.config.application.util.AuthUtil;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
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.adapters.web.validator.CreateDailyRecordValidator;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -43,12 +45,13 @@ public class DailyRecordController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("reqVO: {}", reqVO);
|
log.debug("reqVO: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto detail = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto detail = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
formVO.setRecordMonth(reqVO.getSearchMonth());
|
formVO.setRecordMonth(reqVO.getSearchMonth());
|
||||||
formVO.setDayGroupNo(reqVO.getGroupNo());
|
formVO.setDayGroupNo(reqVO.getGroupNo());
|
||||||
formVO.setStartDate(detail.getStartDate());
|
formVO.setStartDate(detail.getStartDate());
|
||||||
formVO.setEndDate(detail.getEndDate());
|
formVO.setEndDate(detail.getEndDate());
|
||||||
formVO.setFarming(detail.isFarmingOpen());
|
formVO.setFarming(detail.isFarmingOpen());
|
||||||
|
formVO.setHouseholdSeq(reqVO.getHouseholdSeq());
|
||||||
log.debug("formVO: {}", formVO);
|
log.debug("formVO: {}", formVO);
|
||||||
|
|
||||||
dailyRecordPortIn.create(formVO);
|
dailyRecordPortIn.create(formVO);
|
||||||
@@ -72,10 +75,10 @@ public class DailyRecordController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("reqVO: {}, target: {}, status: {}", reqVO, targetType, targetStatus);
|
log.debug("reqVO: {}, target: {}, status: {}", reqVO, targetType, targetStatus);
|
||||||
|
|
||||||
DailyRecordDto detail = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto detail = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
|
|
||||||
// TODO : true / false 를 업데이트하는 것은 대상 타켓이 되는 것이라 판단하여 그냥 강제 업데이트할 것인가? valid 체크
|
// TODO : true / false 를 업데이트하는 것은 대상 타켓이 되는 것이라 판단하여 그냥 강제 업데이트할 것인가? valid 체크
|
||||||
dailyRecordPortIn.updateByStatus(detail.getRecordMonth(), detail.getGroupNo(), targetType, "Y".equals(targetStatus) ? DailyTargetStatus.TODAY_NONE.name() : DailyTargetStatus.TARGET.name());
|
dailyRecordPortIn.updateByStatus(detail.getRecordMonth(), detail.getGroupNo(), reqVO.getHouseholdSeq(), targetType, "Y".equals(targetStatus) ? DailyTargetStatus.TODAY_NONE.name() : DailyTargetStatus.TARGET.name());
|
||||||
|
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(reqVO);
|
return ResponseEntity.status(HttpStatus.OK).body(reqVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ import app.module.front.usecase.daily.income.adapters.web.model.DailyIncomeUIReq
|
|||||||
import app.module.front.usecase.daily.income.ports.DailyIncomePortIn;
|
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.adapters.web.model.DailyPowerUIReqVO;
|
||||||
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
import app.module.front.usecase.daily.power.ports.DailyPowerPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
||||||
import app.module.front.usecase.daily.work.ports.DailyWorkPortIn;
|
import app.module.front.usecase.daily.work.ports.DailyWorkPortIn;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -52,7 +52,7 @@ public class DailyRecordUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("reqVO: {}", reqVO);
|
log.debug("reqVO: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null) {
|
if (dailyRecord == null) {
|
||||||
throw new NoMatchingURIException("[Record] 잘못된 접근");
|
throw new NoMatchingURIException("[Record] 잘못된 접근");
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,7 @@ public class DailyRecordUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("reqVO: {}", reqVO);
|
log.debug("reqVO: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null) {
|
if (dailyRecord == null) {
|
||||||
throw new NoMatchingURIException("[Record] 잘못된 접근");
|
throw new NoMatchingURIException("[Record] 잘못된 접근");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package app.module.front.usecase.daily.record.adapters.web.validator;
|
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.core.config.application.enums.DailyStatus;
|
import app.module.core.config.application.enums.DailyStatus;
|
||||||
|
import app.module.core.config.application.util.MessageUtil;
|
||||||
|
import app.module.core.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.validation.Errors;
|
import org.springframework.validation.Errors;
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
package app.module.front.usecase.daily.record.ports;
|
|
||||||
|
|
||||||
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.DailyUIReqVO;
|
|
||||||
|
|
||||||
public interface DailyRecordPortIn {
|
|
||||||
/**
|
|
||||||
* 일계부 항목 조회
|
|
||||||
*
|
|
||||||
* @param reqVO 검색 조건
|
|
||||||
* @return 항목 상세
|
|
||||||
*/
|
|
||||||
DailyRecordDto detail(DailyUIReqVO reqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 일계부 항목 등록
|
|
||||||
*
|
|
||||||
* @param formVO 입력 데이터
|
|
||||||
*/
|
|
||||||
void create(CreateDailyRecordReqVO formVO);
|
|
||||||
|
|
||||||
void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus);
|
|
||||||
|
|
||||||
void updateByAllStatus(String recordMonth, Integer dayGroupNo);
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package app.module.front.usecase.daily.work.adapters.persistence;
|
package app.module.front.usecase.daily.work.adapters.persistence;
|
||||||
|
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.DailyRecordDao;
|
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
|
||||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||||
import app.module.front.usecase.daily.work.ports.DailyWorkPortOut;
|
import app.module.front.usecase.daily.work.ports.DailyWorkPortOut;
|
||||||
import app.module.front.usecase.daily.work.ports.application.domain.CreateDailyWorkCmd;
|
import app.module.front.usecase.daily.work.ports.application.domain.CreateDailyWorkCmd;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package app.module.front.usecase.daily.work.adapters.web;
|
|||||||
|
|
||||||
import app.module.core.config.application.exception.NoRecordDataException;
|
import app.module.core.config.application.exception.NoRecordDataException;
|
||||||
import app.module.core.config.application.util.CoreUtil;
|
import app.module.core.config.application.util.CoreUtil;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.RemoveDailyWorkReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.RemoveDailyWorkReqVO;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.validator.CreateDailyWorkValidator;
|
import app.module.front.usecase.daily.work.adapters.web.validator.CreateDailyWorkValidator;
|
||||||
@@ -125,7 +125,7 @@ public class DailyWorkController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package app.module.front.usecase.daily.work.adapters.web;
|
|||||||
|
|
||||||
import app.module.core.config.application.exception.NoRecordDataException;
|
import app.module.core.config.application.exception.NoRecordDataException;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.core.config.application.enums.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.adapters.web.model.DailyUIReqVO;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
||||||
import app.module.front.usecase.daily.work.ports.DailyWorkPortIn;
|
import app.module.front.usecase.daily.work.ports.DailyWorkPortIn;
|
||||||
@@ -109,7 +109,7 @@ public class DailyWorkUIController {
|
|||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
log.debug("getRecordUIReq: {}", reqVO);
|
log.debug("getRecordUIReq: {}", reqVO);
|
||||||
|
|
||||||
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO);
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(reqVO.getSearchMonth(), reqVO.getGroupNo(), reqVO.getHouseholdSeq());
|
||||||
if (dailyRecord == null || dailyRecord.getId() == null) {
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
throw new NoRecordDataException();
|
throw new NoRecordDataException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
package app.module.front.usecase.daily.work.ports.application;
|
package app.module.front.usecase.daily.work.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
import app.module.front.config.constants.CommonConstants;
|
import app.module.front.config.constants.CommonConstants;
|
||||||
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
import app.module.core.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
||||||
@@ -24,7 +25,7 @@ import java.util.List;
|
|||||||
public class DailyWorkService implements DailyWorkPortIn {
|
public class DailyWorkService implements DailyWorkPortIn {
|
||||||
private final DailyWorkPortOut portOut;
|
private final DailyWorkPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
private final DailyRecordService dailyRecordService;
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyWorkDto> list(DailyWorkUIReqVO reqVO) {
|
public List<DailyWorkDto> list(DailyWorkUIReqVO reqVO) {
|
||||||
@@ -124,7 +125,7 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -146,6 +147,6 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
, ds.expense_kind, ds.source_purpose
|
, ds.expense_kind, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||||
from daily_expense ds
|
from daily_expense ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_expense ds
|
from daily_expense ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
, ds.product_code, ds.product_self, ds.usage
|
, ds.product_code, ds.product_self, ds.usage
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.estimated_value
|
||||||
from daily_farming ds
|
from daily_farming ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_farming ds
|
from daily_farming ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
, ds.product_name, ds.usage
|
, ds.product_name, ds.usage
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.estimated_value
|
||||||
from daily_forestry ds
|
from daily_forestry ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_forestry ds
|
from daily_forestry ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
, ds.crop_code, ds.income_kind, ds.source_purpose
|
, ds.crop_code, ds.income_kind, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||||
from daily_income ds
|
from daily_income ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_income ds
|
from daily_income ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
select ds.id, ds.daily_record_seq
|
select ds.id, ds.daily_record_seq
|
||||||
, ds.equipment_name, ds.owned_hours, ds.leased_hours
|
, ds.equipment_name, ds.owned_hours, ds.leased_hours
|
||||||
from daily_power ds
|
from daily_power ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_power ds
|
from daily_power ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
, ds.hired_f_hours, ds.shared_m_hours, ds.shared_f_hours, ds.volunteer_m_hours, ds.volunteer_f_hours
|
, ds.hired_f_hours, ds.shared_m_hours, ds.shared_f_hours, ds.volunteer_m_hours, ds.volunteer_f_hours
|
||||||
, ds.is_deleted
|
, ds.is_deleted
|
||||||
from daily_work ds
|
from daily_work ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<select id="getRecordExistCount" resultType="int">
|
<select id="getRecordExistCount" resultType="int">
|
||||||
select count(1)
|
select count(1)
|
||||||
from daily_work ds
|
from daily_work ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = ${id}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLatestDate"
|
<select id="getLatestDate"
|
||||||
resultType="app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
resultType="app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto">
|
||||||
select dr.id as daily_id
|
select dr.id as daily_id
|
||||||
, dr.day_group_no, dr.start_date, dr.end_date
|
, dr.day_group_no, dr.start_date, dr.end_date
|
||||||
from daily_record dr
|
from daily_record dr
|
||||||
|
|||||||
@@ -15,14 +15,15 @@
|
|||||||
</hgroup>
|
</hgroup>
|
||||||
|
|
||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<form method="post" name="reqForm" id="reqForm" onsubmit="event.preventDefault(); formControl.authInfoUser(event);" th:action="@{/}">
|
<form method="post" name="reqForm" id="reqForm" onsubmit="formControl.authInfoUser(event); return false;">
|
||||||
|
<input type="hidden" name="_csrf" th:value="${_csrf.token}" th:if="${_csrf != null}" />
|
||||||
<div class="component-input" data-props-toggle-Password="true">
|
<div class="component-input" data-props-toggle-Password="true">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="password" class="label-txt">비밀번호</label>
|
<label for="password" class="label-txt">비밀번호</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password"
|
<input type="password" id="password" placeholder="비밀번호 4자리를 입력해 주세요" name="password"
|
||||||
maxlength="4">
|
inputmode="numeric" pattern="[0-9]*" maxlength="4">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-btns">
|
<div class="component-btns">
|
||||||
@@ -56,11 +57,12 @@
|
|||||||
|
|
||||||
let formControl = {
|
let formControl = {
|
||||||
authInfoUser(event) {
|
authInfoUser(event) {
|
||||||
event.preventDefault();
|
if (event && typeof event.preventDefault === 'function') {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
const f = document.reqForm;
|
const f = document.reqForm;
|
||||||
|
|
||||||
const obj = $(f).serializeObject();
|
const obj = $(f).serializeObject();
|
||||||
console.log(obj)
|
|
||||||
ajaxUtil._ajaxAsync(
|
ajaxUtil._ajaxAsync(
|
||||||
ENV.httpUrl.auth,
|
ENV.httpUrl.auth,
|
||||||
obj,
|
obj,
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="number" id="phone1Id" th:value="${userInfo.phone1}" readonly>
|
<input type="number" id="phone1Id" name="phone1" th:value="${userInfo.phone1}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -333,13 +333,13 @@
|
|||||||
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
||||||
},
|
},
|
||||||
confirmPopup() {
|
confirmPopup() {
|
||||||
const currentName = document.querySelector('input[name="ownerName"]').value;
|
const currentName = document.querySelector('input[name="ownerName"]').value.trim();
|
||||||
|
|
||||||
// 사용자가 이름을 변경했을 경우에만 개인정보 변경 동의서 모달 띄우기
|
if (currentName === '') { // 이름 비어있을 경우 유효성검사 실시
|
||||||
if (currentName !== ENV.initialOwnerName) {
|
formControl.updateUserInfo();
|
||||||
|
} else if (currentName !== ENV.initialOwnerName) { // 이름이 변경됐을 경우 개인정보동의 모달창 띄우기
|
||||||
ENV.module.confirmPopup.open();
|
ENV.module.confirmPopup.open();
|
||||||
} else {
|
} else {
|
||||||
// 이름 그대로면 바로 저장
|
|
||||||
formControl.updateUserInfo();
|
formControl.updateUserInfo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.expenseStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="EXPENSE"
|
data-type="EXPENSE"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.expenseStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.expenseStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.expenseStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(expenseList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
|
|
||||||
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
|
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="FARMING"
|
data-type="FARMING"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.farmingStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(farmingList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.forestryStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="FORESTRY"
|
data-type="FORESTRY"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.forestryStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.forestryStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.forestryStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(forestryList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.incomeStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="INCOME"
|
data-type="INCOME"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.incomeStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.incomeStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.incomeStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(incomeList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.powerStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="POWER"
|
data-type="POWER"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.powerStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.powerStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.powerStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(powerList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<main id="content" role="main"
|
<main id="content" role="main"
|
||||||
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
|
||||||
, btnDisabled=${(not btnActive)
|
, btnDisabled=${(not btnActive)
|
||||||
|| #strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}
|
|| #strings.equals(dailyRecord.workStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
|
||||||
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<hgroup class="tit-group">
|
<hgroup class="tit-group">
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<input type="checkbox" name="todayNone"
|
<input type="checkbox" name="todayNone"
|
||||||
data-type="WORK"
|
data-type="WORK"
|
||||||
th:disabled="${not btnActive}"
|
th:disabled="${not btnActive}"
|
||||||
th:checked="${#strings.equals(dailyRecord.workStatus, T(app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus).TODAY_NONE)}">
|
th:checked="${#strings.equals(dailyRecord.workStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||||
<span class="checkbox-item">
|
<span class="checkbox-item">
|
||||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||||
</span>
|
</span>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-l btn-primary _nextStep"
|
<button type="button" class="btn btn-l btn-primary _nextStep"
|
||||||
th:data-last="${dailyRecord.lastDay}"
|
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:disabled="${not #strings.equals(dailyRecord.workStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE) and #lists.isEmpty(workList)}"
|
||||||
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
th:onclick="krip.daily.goToNext([[${dailyRecord.nextStep}]], [[${reqVO.searchMonth}]], [[${reqVO.groupNo}]], [[${targetList}]])">
|
||||||
<span class="btn-txt">다음 단계로 이동</span>
|
<span class="btn-txt">다음 단계로 이동</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user