Merge branch 'bo_fixes' into 'dev'

[BO] 수정사항 반영

See merge request korea-research/korea-research!110
This commit is contained in:
이강선 매니저/ST
2025-07-15 08:40:24 +00:00
13 changed files with 64 additions and 57 deletions

View File

@@ -10,9 +10,6 @@ import org.springframework.validation.Validator;
@Component @Component
public class AdminUpdateValidator implements Validator { public class AdminUpdateValidator implements Validator {
// 비밀번호: 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상
private final String PASSWORD_REGEX = "^(?=.*[0-9])(?=.*[!@#$%_\\-]).{5}$";
@Override @Override
public boolean supports(Class<?> clazz) { public boolean supports(Class<?> clazz) {
return AdminUpdateBindingVO.class.equals(clazz); return AdminUpdateBindingVO.class.equals(clazz);
@@ -66,11 +63,5 @@ public class AdminUpdateValidator implements Validator {
errors.rejectValue("regionMainCode", "valid.common.required","필수입력항목을 확인해주세요."); errors.rejectValue("regionMainCode", "valid.common.required","필수입력항목을 확인해주세요.");
} }
}); });
// [2] 비밀번호 형식 검사
if (!vo.getUpdatePassword().matches(PASSWORD_REGEX)) {
errors.rejectValue("updatePassword", "valid.common.password.wrong",
"비밀번호는 5자, 숫자 + 특수문자(!@#$%_-) 1개 이상입니다.");
}
} }
} }

View File

@@ -24,18 +24,10 @@
region_sub_code, region_sub_code,
region_detail_code, region_detail_code,
address, address,
<if test="industryLargeCode != null and industryLargeCode != ''">
industry_large_code, industry_large_code,
</if>
<if test="industryMiddleCode != null and industryMiddleCode != ''">
industry_middle_code, industry_middle_code,
</if>
<if test="industrySubMiddle != null and industrySubMiddle != ''">
industry_sub_middle, industry_sub_middle,
</if>
<if test="industryDetail != null and industryDetail != ''">
industry_detail, industry_detail,
</if>
is_panel, is_panel,
usage_type, usage_type,
employment_type, employment_type,

View File

@@ -18,18 +18,10 @@
region_sub_code = #{regionSubCode}, region_sub_code = #{regionSubCode},
region_detail_code = #{regionDetailCode}, region_detail_code = #{regionDetailCode},
address = #{address}, address = #{address},
<if test="industryLargeCode != null and industryLargeCode != ''">
industry_large_code = #{industryLargeCode}, industry_large_code = #{industryLargeCode},
</if>
<if test="industryMiddleCode != null and industryMiddleCode != ''">
industry_middle_code = #{industryMiddleCode}, industry_middle_code = #{industryMiddleCode},
</if>
<if test="industrySubMiddle != null and industrySubMiddle != ''">
industry_sub_middle = #{industrySubMiddle}, industry_sub_middle = #{industrySubMiddle},
</if>
<if test="industryDetail != null and industryDetail != ''">
industry_detail = #{industryDetail}, industry_detail = #{industryDetail},
</if>
is_panel = #{isPanel}, is_panel = #{isPanel},
<if test="usageType != null and usageType != ''"> <if test="usageType != null and usageType != ''">
usage_type = #{usageType}, usage_type = #{usageType},

View File

@@ -342,9 +342,15 @@
) AS hvr ) AS hvr
<where> <where>
1=1 1=1
<if test="cmd.ownerField != null and cmd.ownerField != ''"> <if test="cmd.ownerValue != null and cmd.ownerValue != ''">
/* 경영주 검색 */ /* 경영주 검색 */
<choose> <choose>
<when test="cmd.ownerField == ''">
AND (
hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%'
OR hvr.householdPhone ILIKE '%' || #{cmd.ownerValue} || '%'
)
</when>
<when test="cmd.ownerField eq 'name'"> <when test="cmd.ownerField eq 'name'">
AND hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%' AND hvr.householdName ILIKE '%' || #{cmd.ownerValue} || '%'
</when> </when>

View File

@@ -492,8 +492,9 @@ const setSelectBoxUiCode = ({
codeList, codeList,
parentSelector, parentSelector,
childSelector, childSelector,
defaultOptionText = '전체',
selectedParentCode = '', selectedParentCode = '',
selectedChildCode = '' selectedChildCode = '',
}) => { }) => {
const $parent = $(parentSelector); const $parent = $(parentSelector);
const $child = $(childSelector); const $child = $(childSelector);
@@ -501,16 +502,20 @@ const setSelectBoxUiCode = ({
if (!codeList?.nodes || !$parent.length || !$child.length) return; if (!codeList?.nodes || !$parent.length || !$child.length) return;
const renderOptions = ($el, list, selected) => { const renderOptions = ($el, list, selected) => {
$el.html('<option value="">전체</option>'); $el.html(`<option value="">${defaultOptionText}</option>`);
list.forEach(item => { list.forEach(item => {
const val = item.id.split('.').pop(); const val = item.id.split('.').pop();
const isSelected = item.id === selected ? 'selected' : ''; const isSelected = item.id === selected ? 'selected' : '';
$el.append(`<option value="${item.id}" ${isSelected}>${val}. ${item.codeText}</option>`); $el.append(`<option value="${item.id}" ${isSelected}>${val}. ${item.codeText}</option>`);
}); });
if (selected) {
$el.val(selected);
}
}; };
const loadChildren = (parentId, selectedChild = '') => { const loadChildren = (parentId, selectedChild = '') => {
$child.html('<option value="">전체</option>'); $child.html(`<option value="">${defaultOptionText}</option>`);
if (!parentId) return; if (!parentId) return;
const parent = codeList.nodes.find(n => n.id === parentId); const parent = codeList.nodes.find(n => n.id === parentId);

View File

@@ -168,7 +168,6 @@
<th:block th:each="item, status : ${menuHierarchy}"> <th:block th:each="item, status : ${menuHierarchy}">
<a th:if="${status.first}" th:href="${item.uri}" >홈</a> <a th:if="${status.first}" th:href="${item.uri}" >홈</a>
<a th:if="${!status.first and item.id != currentURI.id}" <a th:if="${!status.first and item.id != currentURI.id}"
th:href="${item.uri}"
th:text="${@coreUtil.getUriTitle(item)}"></a> th:text="${@coreUtil.getUriTitle(item)}"></a>
<span th:if="${!status.first and item.id == currentURI.id}" th:text="${@coreUtil.getUriTitle(item)}" ></span> <span th:if="${!status.first and item.id == currentURI.id}" th:text="${@coreUtil.getUriTitle(item)}" ></span>
</th:block> </th:block>

View File

@@ -10,7 +10,7 @@
<div class="modal-header"> <div class="modal-header">
<h3 class="modal-tit" >임가 매핑</h3> <h3 class="modal-tit" >임가 매핑</h3>
</div> </div>
<form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm"> <form autocomplete="off" method="get" name="reqHouseholdForm" id="reqHouseholdForm" onsubmit="return false;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-content-inner"> <div class="modal-content-inner">
<section class="filter-wrap"> <section class="filter-wrap">
@@ -34,7 +34,8 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="text" id="ownerValue" name="ownerValue" placeholder="입력" th:value="${ownerValue}"> <input type="text" id="ownerValue" name="ownerValue" placeholder="입력" th:value="${ownerValue}"
onkeydown="if(event.key === 'Enter'){ event.preventDefault(); initSearchHousehold(); }">
</div> </div>
</div> </div>
</div> </div>
@@ -94,7 +95,7 @@
<button type="button" class="btn" onclick="resetSearchForm()"> <button type="button" class="btn" onclick="resetSearchForm()">
<span class="btn-txt">초기화</span> <span class="btn-txt">초기화</span>
</button> </button>
<button type="button" class="btn btn-primary" th:onclick="|searchHouseholdList(0,${regionMainCode})|"> <button type="button" class="btn btn-primary" onclick="initSearchHousehold();">
<span class="btn-txt">검색</span> <span class="btn-txt">검색</span>
</button> </button>
</div> </div>
@@ -161,6 +162,7 @@
codeList: regionList, codeList: regionList,
parentSelector: '#regionSubCode', parentSelector: '#regionSubCode',
childSelector: '#regionDetailCode', childSelector: '#regionDetailCode',
defaultOptionText: '전체'
}); });
document.querySelector(".modal01").ui.open(); document.querySelector(".modal01").ui.open();
@@ -178,6 +180,8 @@
$('#isPanel').val(''); $('#isPanel').val('');
$('#searchMapping').val(''); $('#searchMapping').val('');
$('#ownerValue').val(''); $('#ownerValue').val('');
initSearchHousehold();
}; };
const searchHouseholdList = (pageNo,regionMainCode) => { const searchHouseholdList = (pageNo,regionMainCode) => {
@@ -214,6 +218,16 @@
</tr> </tr>
`); `);
}); });
// nodata 처리
if (!$(response.content).length) {
tbody.append(`
<tr>
<td colspan="8" class="text-center text-muted">임가정보가 존재하지 않습니다.</td>
</tr>
`);
}
// Pagination 구성하기 // Pagination 구성하기
const paging = $('.mapping-paging'); const paging = $('.mapping-paging');
paging.empty(); paging.empty();
@@ -271,6 +285,11 @@
); );
} }
}; };
const initSearchHousehold = () => {
const regionMainCode = document.querySelector('[name="regionMainCode"]')?.value || '';
searchHouseholdList(0, regionMainCode);
};
</script> </script>
</div> </div>
</html> </html>

View File

@@ -121,7 +121,7 @@
<td> <td>
<div class="component-select"> <div class="component-select">
<select class="select-list" name="regionMainCode" required> <select class="select-list" name="regionMainCode" required>
<option value="">전체</option> <option value="">선택</option>
<option th:each="item : ${regionMainList}" <option th:each="item : ${regionMainList}"
th:value="${item.id}" th:value="${item.id}"
th:text="${item.codeText}"> th:text="${item.codeText}">
@@ -132,7 +132,7 @@
<td> <td>
<div class="component-select"> <div class="component-select">
<select class="select-list" name="regionSubCode" id="regionSubCode" required> <select class="select-list" name="regionSubCode" id="regionSubCode" required>
<option value="">전체</option> <option value="">선택</option>
</select> </select>
</div> </div>
</td> </td>
@@ -140,7 +140,7 @@
<td> <td>
<div class="component-select"> <div class="component-select">
<select class="select-list" name="regionDetailCode" id="regionDetailCode" required> <select class="select-list" name="regionDetailCode" id="regionDetailCode" required>
<option value="">전체</option> <option value="">선택</option>
</select> </select>
</div> </div>
</td> </td>
@@ -160,7 +160,7 @@
<td> <td>
<div class="component-select"> <div class="component-select">
<select class="select-list" name="industryLargeCode" id="industryLargeCode"> <select class="select-list" name="industryLargeCode" id="industryLargeCode">
<option value="">전체</option> <option value="">선택</option>
</select> </select>
</div> </div>
</td> </td>
@@ -168,7 +168,7 @@
<td> <td>
<div class="component-select"> <div class="component-select">
<select class="select-list" name="industryMiddleCode" id="industryMiddleCode"> <select class="select-list" name="industryMiddleCode" id="industryMiddleCode">
<option value="">전체</option>> <option value="">선택</option>>
</select> </select>
</div> </div>
</td> </td>
@@ -320,7 +320,8 @@
setSelectBoxUiCode({ setSelectBoxUiCode({
codeList: regionList, codeList: regionList,
parentSelector: '#regionSubCode', parentSelector: '#regionSubCode',
childSelector: '#regionDetailCode' childSelector: '#regionDetailCode',
defaultOptionText: '선택'
}); });
// 업종 대분류, 중분류 셀렉트박스 세팅 // 업종 대분류, 중분류 셀렉트박스 세팅
@@ -328,6 +329,7 @@
codeList: industryLargeList, codeList: industryLargeList,
parentSelector: '#industryLargeCode', parentSelector: '#industryLargeCode',
childSelector: '#industryMiddleCode', childSelector: '#industryMiddleCode',
defaultOptionText: '선택'
}); });
}); });
</script> </script>

View File

@@ -307,22 +307,27 @@
$(document).ready(function () { $(document).ready(function () {
// 지역, 세부지역 셀렉트박스 세팅 // 지역, 세부지역 셀렉트박스 세팅
setSelectBoxUiCode({ setSelectBoxUiCode({
codeList: regionList, codeList: regionList,
parentSelector: '#regionSubCode', parentSelector: '#regionSubCode',
childSelector: '#regionDetailCode', childSelector: '#regionDetailCode',
defaultOptionText: '전체',
selectedParentCode: selectedRegionSubCode, selectedParentCode: selectedRegionSubCode,
selectedChildCode: selectedRegionDetailCode selectedChildCode: selectedRegionDetailCode
}); });
// 업종 대분류, 중분류 셀렉트박스 세팅 // 업종 대분류, 중분류 셀렉트박스 세팅
setSelectBoxUiCode({ setSelectBoxUiCode({
codeList: industryLargeList, codeList: industryLargeList,
parentSelector: '#industryLargeCode', parentSelector: '#industryLargeCode',
childSelector: '#industryMiddleCode', childSelector: '#industryMiddleCode',
selectedParentCode: selectedIndustryLargeCode, defaultOptionText: '전체',
selectedChildCode: selectedIndustryMiddleCode selectedParentCode: selectedIndustryLargeCode,
}); selectedChildCode: selectedIndustryMiddleCode
});
// 최초 리스트 로드
getHouseholds(document.reqForm.page.value);
}); });
</script> </script>
@@ -409,9 +414,6 @@
'json' 'json'
); );
} }
// 최초 리스트 로드
getHouseholds(document.reqForm.page.value);
</script> </script>
<script th:inline="javascript"> <script th:inline="javascript">

View File

@@ -191,9 +191,6 @@
<h3>지출 <strong>(<span id="expenseCount">0</span>건)</strong></h3> <h3>지출 <strong>(<span id="expenseCount">0</span>건)</strong></h3>
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row align-right">
<button type="button" class="btn small">
<span class="btn-txt">영수증 다운로드 <i class="ico-download" aria-hidden="true"></i></span>
</button>
<button type="button" class="btn small"> <button type="button" class="btn small">
<span class="btn-txt"> <span class="btn-txt">
<label class="radio-inner"> <label class="radio-inner">

View File

@@ -313,7 +313,7 @@
<div class="input-textarea-field"> <div class="input-textarea-field">
<textarea id="memo" name="memo" class="textarea" <textarea id="memo" name="memo" class="textarea"
placeholder="" placeholder=""
th:value="${householdInfo.memo}"></textarea> th:text="${householdInfo.memo}"></textarea>
</div> </div>
</div> </div>
</td> </td>
@@ -353,6 +353,7 @@
codeList: regionList, codeList: regionList,
parentSelector: '#regionSubCode', parentSelector: '#regionSubCode',
childSelector: '#regionDetailCode', childSelector: '#regionDetailCode',
defaultOptionText: '선택',
selectedParentCode: selectedRegionSubCode, selectedParentCode: selectedRegionSubCode,
selectedChildCode: selectedRegionDetailCode selectedChildCode: selectedRegionDetailCode
}); });
@@ -362,6 +363,7 @@
codeList: industryLargeList, codeList: industryLargeList,
parentSelector: '#industryLargeCode', parentSelector: '#industryLargeCode',
childSelector: '#industryMiddleCode', childSelector: '#industryMiddleCode',
defaultOptionText: '선택',
selectedParentCode: selectedIndustryLargeCode, selectedParentCode: selectedIndustryLargeCode,
selectedChildCode: selectedIndustryMiddleCode selectedChildCode: selectedIndustryMiddleCode
}); });

View File

@@ -64,7 +64,7 @@
</div> </div>
<div class="component-btns"> <div class="component-btns">
<div class="btns-row"> <div class="btns-row">
<button type="button" class="btn" onclick="goInit();"> <button type="button" class="btn" onclick="location.href = location.pathname">
<span class="btn-txt">초기화</span> <span class="btn-txt">초기화</span>
</button> </button>
<button type="button" class="btn btn-primary" onclick="goSearch();" > <button type="button" class="btn btn-primary" onclick="goSearch();" >

View File

@@ -31,7 +31,7 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="password" id="floatingPassword" name="password" placeholder="비밀번호 입력"> <input type="password" id="floatingPassword" name="password" placeholder="비밀번호 입력" maxlength="5">
</div> </div>
</div> </div>
</div> </div>