Merge branch 'dev' into 0623_fetch
This commit is contained in:
@@ -48,8 +48,8 @@ public class AdminCreateValidator implements Validator {
|
||||
if (vo.getName() == null || vo.getName().isBlank()) {
|
||||
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
||||
}
|
||||
if (vo.getName().length() > 4) {
|
||||
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다.");
|
||||
if (vo.getName().length() > 10) {
|
||||
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
|
||||
}
|
||||
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
||||
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
||||
|
||||
@@ -34,8 +34,8 @@ public class AdminUpdateValidator implements Validator {
|
||||
if (vo.getName() == null || vo.getName().isBlank()) {
|
||||
errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
|
||||
}
|
||||
if (vo.getName().length() > 4) {
|
||||
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다.");
|
||||
if (vo.getName().length() > 10) {
|
||||
errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
|
||||
}
|
||||
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
|
||||
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");
|
||||
|
||||
@@ -2,6 +2,7 @@ package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.
|
||||
|
||||
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortOut;
|
||||
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
|
||||
import app.module.core.config.application.annotation.UpdateCommand;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -13,6 +14,7 @@ import org.springframework.stereotype.Repository;
|
||||
public class RemoveDailyDao implements RemoveDailyPortOut {
|
||||
private final RemoveDailyMapper mapper;
|
||||
|
||||
@UpdateCommand
|
||||
@Override
|
||||
public void operate(RemoveDailyCmd command) {
|
||||
if (command.getCurrentStep() != null) {
|
||||
|
||||
@@ -15,11 +15,9 @@ public class RemoveDailyService implements RemoveDailyPortIn {
|
||||
|
||||
@Override
|
||||
public void operate(RemoveDailyReqVO reqVO) {
|
||||
RemoveDailyCmd command = AuditUtil.update(
|
||||
new RemoveDailyCmd(
|
||||
reqVO.getSelectedIds(),
|
||||
reqVO.getCurrentStep())
|
||||
);
|
||||
RemoveDailyCmd command = new RemoveDailyCmd(
|
||||
reqVO.getSelectedIds(),
|
||||
reqVO.getCurrentStep());
|
||||
|
||||
portOut.operate(command);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.adapt
|
||||
|
||||
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.UpdateDailyNonePortOut;
|
||||
import app.module.admin.usecase.household.tab.dailyRecord.updateDailyNone.ports.application.domain.UpdateDailyNoneCmd;
|
||||
import app.module.core.config.application.annotation.UpdateCommand;
|
||||
import app.module.core.config.application.enums.DailySort;
|
||||
import app.module.core.config.application.enums.DailyTargetStatus;
|
||||
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||
@@ -16,6 +17,7 @@ class UpdateDailyNoneDao implements UpdateDailyNonePortOut {
|
||||
private final UpdateDailyNoneMapper mapper;
|
||||
private final DailyRecordPortIn dailyRecordPortIn;
|
||||
|
||||
@UpdateCommand
|
||||
@Override
|
||||
public void create(UpdateDailyNoneCmd command) {
|
||||
command.setDailyRecordSeq(mapper.getDailyRecordSeq(command));
|
||||
|
||||
@@ -18,15 +18,13 @@ public class UpdateDailyNoneService implements UpdateDailyNonePortIn {
|
||||
public void create(UpdateDailyNoneReqVO formVO) {
|
||||
DailyTargetStatus currentStatus = "Y".equals(formVO.getTodayNone()) ? DailyTargetStatus.TODAY_NONE : DailyTargetStatus.TARGET;
|
||||
|
||||
UpdateDailyNoneCmd command = AuditUtil.update(
|
||||
new UpdateDailyNoneCmd(
|
||||
formVO.getRecordMonth(),
|
||||
formVO.getGroupNo(),
|
||||
formVO.getHouseholdSeq(),
|
||||
formVO.getCurrentStep(),
|
||||
currentStatus,
|
||||
null)
|
||||
);
|
||||
UpdateDailyNoneCmd command = new UpdateDailyNoneCmd(
|
||||
formVO.getRecordMonth(),
|
||||
formVO.getGroupNo(),
|
||||
formVO.getHouseholdSeq(),
|
||||
formVO.getCurrentStep(),
|
||||
currentStatus,
|
||||
null);
|
||||
|
||||
portOut.create(command);
|
||||
}
|
||||
|
||||
@@ -115,4 +115,5 @@ public class ResearcherDao implements ResearcherPortOut {
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.Objects;
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping(path = "/api/researcher")
|
||||
class ResearcherApiController {
|
||||
|
||||
private final ResearcherPortIn researcherPortIn;
|
||||
|
||||
@GetMapping(path = "/list")
|
||||
@@ -63,4 +64,5 @@ class ResearcherApiController {
|
||||
ResponseEntity<?> updateMappingHousehold(@RequestBody MappingHouseholdListReqVO reqVO ) {
|
||||
return ResponseEntity.status(HttpStatus.OK).body(researcherPortIn.updateMappingHousehold(reqVO));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import org.springframework.data.domain.Page;
|
||||
import java.util.List;
|
||||
|
||||
public interface ResearcherPortIn {
|
||||
|
||||
Page<ResearchersDto> list(ResearchersListReqVO reqVO);
|
||||
ResearchersDto detail(Integer adminSeq);
|
||||
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
@@ -17,4 +18,5 @@ public interface ResearcherPortIn {
|
||||
Integer visitHouseholdDelete(List<Integer> selectIds);
|
||||
Page<GetPopupHouseholds> searchMappingHousehold(HouseholdSearchReqVO reqVO);
|
||||
Integer updateMappingHousehold(MappingHouseholdListReqVO reqVO);
|
||||
|
||||
}
|
||||
@@ -64,9 +64,9 @@ app:
|
||||
permit: 5
|
||||
session:
|
||||
validity:
|
||||
# 세션 유효기간(초) - 1시간 (3600초)
|
||||
# 세션 유효기간(초) - 무한정으로 수정,,,
|
||||
period:
|
||||
seconds: 3600
|
||||
seconds: -1
|
||||
maximum:
|
||||
# 최대 세션 갯수 (1일 경우 중복 로그인 불가)
|
||||
num: 1
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
left join household h ON h.seq = rhh.household_seq AND h.is_panel IS true and h.is_deleted = false
|
||||
where
|
||||
ahr.role_id = 'ROLE_RESEARCHER'
|
||||
<if test="searchField == '' and searchValue != null and searchValue != ''">
|
||||
and ( a.name LIKE CONCAT('%', #{searchValue}, '%') or a.phone LIKE CONCAT('%', #{searchValue}, '%') )
|
||||
</if>
|
||||
<if test="searchField == 'name' and searchValue != null and searchValue != ''">
|
||||
and a.name LIKE CONCAT('%', #{searchValue}, '%')
|
||||
</if>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="input-field">
|
||||
<input id="name" type="text" name="name"
|
||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
||||
th:field="*{name}"/>
|
||||
th:field="*{name}" maxlength="10"/>
|
||||
<div class="invalid-feedback fw-bold"
|
||||
th:if="${#fields.hasErrors('name')}">
|
||||
에러 메세지
|
||||
@@ -97,12 +97,12 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}">
|
||||
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}" maxlength="4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}">
|
||||
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}" maxlength="4">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -165,7 +165,6 @@
|
||||
f.searchDisabled.value = '';
|
||||
}
|
||||
|
||||
|
||||
function goUpdate(adminId) {
|
||||
location.href = '/settings/admins/update/' + adminId; // 쿼리 파라미터 없이 이동
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="input-field">
|
||||
<input id="name" type="text" name="name"
|
||||
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
|
||||
th:field="*{name}"/>
|
||||
th:field="*{name}" maxlength="10" />
|
||||
<div class="invalid-feedback fw-bold"
|
||||
th:if="${#fields.hasErrors('name')}">
|
||||
에러 메세지
|
||||
@@ -89,7 +89,7 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="phone1" name="phone1" placeholder=""
|
||||
<input type="number" id="phone1" name="phone1" placeholder="" maxlength="4"
|
||||
th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}">
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,7 +99,7 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="phone2" name="phone2" placeholder=""
|
||||
<input type="number" id="phone2" name="phone2" placeholder="" maxlength="4"
|
||||
th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -145,6 +145,7 @@
|
||||
(response) => {
|
||||
console.log("임가방문정보 상세 응답값 : ", response);
|
||||
setVisitFormData(response);
|
||||
document.querySelector(".modal-visit-info").ui.open();
|
||||
},
|
||||
function (code, rstData) {
|
||||
console.log("error : ", code);
|
||||
@@ -152,9 +153,9 @@
|
||||
'get',
|
||||
'json'
|
||||
);
|
||||
} else {
|
||||
document.querySelector(".modal-visit-info").ui.open();
|
||||
}
|
||||
|
||||
document.querySelector(".modal-visit-info").ui.open();
|
||||
}
|
||||
|
||||
// 임가방문정보 상세 값 set
|
||||
|
||||
@@ -222,9 +222,6 @@
|
||||
etUI.dialog.confirm({
|
||||
title: '삭제 안내',
|
||||
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||
negativeCallback: function () {
|
||||
|
||||
},
|
||||
positiveCallback: function () {
|
||||
goDeleteForestProduct(checkedIds);
|
||||
},
|
||||
@@ -234,7 +231,6 @@
|
||||
// 임산물현황 삭제
|
||||
const goDeleteForestProduct = (checkedIds) => {
|
||||
const f = document.reqForm;
|
||||
console.log("f.monthlyInputStatusId.value", f.monthlyInputStatusId.value);
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/forestProducts/delete',
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<h3></h3>
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn small btn-secondary" onclick="goDeleteVisitInfo();">
|
||||
<button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
|
||||
<span class=" btn-txt">삭제</span>
|
||||
</button>
|
||||
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
|
||||
@@ -94,38 +94,47 @@
|
||||
);
|
||||
}
|
||||
|
||||
// 임가방문정보 삭제
|
||||
const goDeleteVisitInfo = () => {
|
||||
// 임가방문정보 삭제 confirm
|
||||
const showDeleteVisitInfoConfirm = () => {
|
||||
const checkedIds = Array.from(
|
||||
document.querySelectorAll('input[name="visitRemoveIds"]:checked')
|
||||
).map(el => Number(el.value));
|
||||
|
||||
if(checkedIds.length <= 0) {
|
||||
alert("임가방문정보를 선택해주세요.");
|
||||
return
|
||||
return;
|
||||
}
|
||||
|
||||
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) {
|
||||
const f = document.reqForm;
|
||||
etUI.dialog.confirm({
|
||||
title: '삭제 안내',
|
||||
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
|
||||
positiveCallback: function () {
|
||||
goDeleteVisitInfo(checkedIds);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/visitInfo/remove',
|
||||
JSON.stringify({
|
||||
householdSeq: f.householdSeq.value,
|
||||
visitRemoveIds: checkedIds
|
||||
}),
|
||||
(response) => { // 성공
|
||||
alert("방문정보가 삭제되었습니다.");
|
||||
getVisitInfo();
|
||||
},
|
||||
function (code, rstData) {
|
||||
if(code == 422) alert(rstData.responseText);
|
||||
},
|
||||
'delete',
|
||||
'json',
|
||||
{ handle422Type: 'alert' }
|
||||
);
|
||||
}
|
||||
// 임가방문정보 삭제
|
||||
const goDeleteVisitInfo = (checkedIds) => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/visitInfo/remove',
|
||||
JSON.stringify({
|
||||
householdSeq: f.householdSeq.value,
|
||||
visitRemoveIds: checkedIds
|
||||
}),
|
||||
() => { // 성공
|
||||
alert("방문정보가 삭제되었습니다.");
|
||||
getVisitInfo();
|
||||
},
|
||||
function (code, rstData) {
|
||||
if(code == 422) alert(rstData.responseText);
|
||||
},
|
||||
'delete',
|
||||
'json',
|
||||
{ handle422Type: 'alert' }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요.">
|
||||
<input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요." onkeypress="if(event.key === 'Enter') goSearch();">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,6 +181,8 @@
|
||||
f.searchValue.value = '';
|
||||
f.searchArea.value = '';
|
||||
f.searchAccountDisabled.value = '';
|
||||
f.method = 'GET';
|
||||
f.submit();
|
||||
}
|
||||
// 상세페이지 이동
|
||||
function goDetail(seq) {
|
||||
|
||||
Reference in New Issue
Block a user