From 15f29bdf1169f99f4ebab621c0ca0b1e8b1e5386 Mon Sep 17 00:00:00 2001 From: kangsunlee Date: Tue, 15 Jul 2025 17:40:06 +0900 Subject: [PATCH] =?UTF-8?q?[BO]=20=EC=88=98=EC=A0=95=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/validator/AdminUpdateValidator.java | 9 ------- .../household/CreateHouseholdMapper.xml | 8 ------ .../household/UpdateHouseholdMapper.xml | 8 ------ .../mappers/researcher/ResearcherMapper.xml | 8 +++++- admin/src/main/resources/static/ui/uiUtil.js | 11 +++++--- .../templates/common/components.html | 1 - .../common/modal-household-mapping.html | 25 +++++++++++++++--- .../templates/households/create.html | 14 +++++----- .../templates/households/households.html | 26 ++++++++++--------- .../households/tab/daily-record.html | 3 --- .../templates/households/update/{seq}.html | 4 ++- .../templates/researcher/researchers.html | 2 +- .../resources/templates/security/login.html | 2 +- 13 files changed, 64 insertions(+), 57 deletions(-) diff --git a/admin/src/main/java/app/module/admin/usecase/admin/saveAdmin/adapters/web/validator/AdminUpdateValidator.java b/admin/src/main/java/app/module/admin/usecase/admin/saveAdmin/adapters/web/validator/AdminUpdateValidator.java index a9a06577..2f1f0e60 100644 --- a/admin/src/main/java/app/module/admin/usecase/admin/saveAdmin/adapters/web/validator/AdminUpdateValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/admin/saveAdmin/adapters/web/validator/AdminUpdateValidator.java @@ -10,9 +10,6 @@ import org.springframework.validation.Validator; @Component public class AdminUpdateValidator implements Validator { - // 비밀번호: 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상 - private final String PASSWORD_REGEX = "^(?=.*[0-9])(?=.*[!@#$%_\\-]).{5}$"; - @Override public boolean supports(Class clazz) { return AdminUpdateBindingVO.class.equals(clazz); @@ -66,11 +63,5 @@ public class AdminUpdateValidator implements Validator { errors.rejectValue("regionMainCode", "valid.common.required","필수입력항목을 확인해주세요."); } }); - - // [2] 비밀번호 형식 검사 - if (!vo.getUpdatePassword().matches(PASSWORD_REGEX)) { - errors.rejectValue("updatePassword", "valid.common.password.wrong", - "비밀번호는 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상입니다."); - } } } diff --git a/admin/src/main/resources/mappers/household/CreateHouseholdMapper.xml b/admin/src/main/resources/mappers/household/CreateHouseholdMapper.xml index d76fd0ce..4aee8c9a 100644 --- a/admin/src/main/resources/mappers/household/CreateHouseholdMapper.xml +++ b/admin/src/main/resources/mappers/household/CreateHouseholdMapper.xml @@ -24,18 +24,10 @@ region_sub_code, region_detail_code, address, - industry_large_code, - - industry_middle_code, - - industry_sub_middle, - - industry_detail, - is_panel, usage_type, employment_type, diff --git a/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml b/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml index 5d16fa24..ca0668e3 100644 --- a/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml +++ b/admin/src/main/resources/mappers/household/UpdateHouseholdMapper.xml @@ -18,18 +18,10 @@ region_sub_code = #{regionSubCode}, region_detail_code = #{regionDetailCode}, address = #{address}, - industry_large_code = #{industryLargeCode}, - - industry_middle_code = #{industryMiddleCode}, - - industry_sub_middle = #{industrySubMiddle}, - - industry_detail = #{industryDetail}, - is_panel = #{isPanel}, usage_type = #{usageType}, diff --git a/admin/src/main/resources/mappers/researcher/ResearcherMapper.xml b/admin/src/main/resources/mappers/researcher/ResearcherMapper.xml index c5745ffa..18185429 100644 --- a/admin/src/main/resources/mappers/researcher/ResearcherMapper.xml +++ b/admin/src/main/resources/mappers/researcher/ResearcherMapper.xml @@ -342,9 +342,15 @@ ) AS hvr 1=1 - + /* 경영주 검색 */ + + AND ( + hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%' + OR hvr.householdPhone ILIKE '%' || #{cmd.ownerValue} || '%' + ) + AND hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%' diff --git a/admin/src/main/resources/static/ui/uiUtil.js b/admin/src/main/resources/static/ui/uiUtil.js index 3d681c70..816ba08e 100644 --- a/admin/src/main/resources/static/ui/uiUtil.js +++ b/admin/src/main/resources/static/ui/uiUtil.js @@ -492,8 +492,9 @@ const setSelectBoxUiCode = ({ codeList, parentSelector, childSelector, + defaultOptionText = '전체', selectedParentCode = '', - selectedChildCode = '' + selectedChildCode = '', }) => { const $parent = $(parentSelector); const $child = $(childSelector); @@ -501,16 +502,20 @@ const setSelectBoxUiCode = ({ if (!codeList?.nodes || !$parent.length || !$child.length) return; const renderOptions = ($el, list, selected) => { - $el.html(''); + $el.html(``); list.forEach(item => { const val = item.id.split('.').pop(); const isSelected = item.id === selected ? 'selected' : ''; $el.append(``); }); + + if (selected) { + $el.val(selected); + } }; const loadChildren = (parentId, selectedChild = '') => { - $child.html(''); + $child.html(``); if (!parentId) return; const parent = codeList.nodes.find(n => n.id === parentId); diff --git a/admin/src/main/resources/templates/common/components.html b/admin/src/main/resources/templates/common/components.html index 39bccce9..fc9b66dd 100644 --- a/admin/src/main/resources/templates/common/components.html +++ b/admin/src/main/resources/templates/common/components.html @@ -168,7 +168,6 @@ 홈 diff --git a/admin/src/main/resources/templates/common/modal-household-mapping.html b/admin/src/main/resources/templates/common/modal-household-mapping.html index 073890fb..4c139999 100644 --- a/admin/src/main/resources/templates/common/modal-household-mapping.html +++ b/admin/src/main/resources/templates/common/modal-household-mapping.html @@ -10,7 +10,7 @@ -
+ @@ -94,7 +95,7 @@ - @@ -161,6 +162,7 @@ codeList: regionList, parentSelector: '#regionSubCode', childSelector: '#regionDetailCode', + defaultOptionText: '전체' }); document.querySelector(".modal01").ui.open(); @@ -178,6 +180,8 @@ $('#isPanel').val(''); $('#searchMapping').val(''); $('#ownerValue').val(''); + + initSearchHousehold(); }; const searchHouseholdList = (pageNo,regionMainCode) => { @@ -214,6 +218,16 @@ `); }); + + // nodata 처리 + if (!$(response.content).length) { + tbody.append(` + + 임가정보가 존재하지 않습니다. + + `); + } + // Pagination 구성하기 const paging = $('.mapping-paging'); paging.empty(); @@ -271,6 +285,11 @@ ); } }; + + const initSearchHousehold = () => { + const regionMainCode = document.querySelector('[name="regionMainCode"]')?.value || ''; + searchHouseholdList(0, regionMainCode); + }; \ No newline at end of file diff --git a/admin/src/main/resources/templates/households/create.html b/admin/src/main/resources/templates/households/create.html index ae0bbb64..5b985079 100644 --- a/admin/src/main/resources/templates/households/create.html +++ b/admin/src/main/resources/templates/households/create.html @@ -121,7 +121,7 @@
- +
@@ -140,7 +140,7 @@
@@ -160,7 +160,7 @@
@@ -168,7 +168,7 @@
@@ -320,7 +320,8 @@ setSelectBoxUiCode({ codeList: regionList, parentSelector: '#regionSubCode', - childSelector: '#regionDetailCode' + childSelector: '#regionDetailCode', + defaultOptionText: '선택' }); // 업종 대분류, 중분류 셀렉트박스 세팅 @@ -328,6 +329,7 @@ codeList: industryLargeList, parentSelector: '#industryLargeCode', childSelector: '#industryMiddleCode', + defaultOptionText: '선택' }); }); diff --git a/admin/src/main/resources/templates/households/households.html b/admin/src/main/resources/templates/households/households.html index 1d8dd70c..9de2bce3 100644 --- a/admin/src/main/resources/templates/households/households.html +++ b/admin/src/main/resources/templates/households/households.html @@ -307,22 +307,27 @@ $(document).ready(function () { // 지역, 세부지역 셀렉트박스 세팅 - setSelectBoxUiCode({ + setSelectBoxUiCode({ codeList: regionList, parentSelector: '#regionSubCode', childSelector: '#regionDetailCode', + defaultOptionText: '전체', selectedParentCode: selectedRegionSubCode, selectedChildCode: selectedRegionDetailCode }); - // 업종 대분류, 중분류 셀렉트박스 세팅 - setSelectBoxUiCode({ - codeList: industryLargeList, - parentSelector: '#industryLargeCode', - childSelector: '#industryMiddleCode', - selectedParentCode: selectedIndustryLargeCode, - selectedChildCode: selectedIndustryMiddleCode - }); + // 업종 대분류, 중분류 셀렉트박스 세팅 + setSelectBoxUiCode({ + codeList: industryLargeList, + parentSelector: '#industryLargeCode', + childSelector: '#industryMiddleCode', + defaultOptionText: '전체', + selectedParentCode: selectedIndustryLargeCode, + selectedChildCode: selectedIndustryMiddleCode + }); + + // 최초 리스트 로드 + getHouseholds(document.reqForm.page.value); }); @@ -409,9 +414,6 @@ 'json' ); } - - // 최초 리스트 로드 - getHouseholds(document.reqForm.page.value);