Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
주수현
2025-07-14 14:36:07 +09:00
9 changed files with 36 additions and 26 deletions

View File

@@ -14,6 +14,7 @@ public class GetForestProductStatus {
private String streetNum;
private String landType;
private String town;
private String availableArea;
private String cropName;
private String landArea;
private String mainYield;

View File

@@ -20,26 +20,26 @@ public class SaveHouseholdVisitInfoValidator implements Validator {
SaveHouseholdVisitInfoReqVO vo = (SaveHouseholdVisitInfoReqVO) target;
if (vo.getHouseholdSeq() == null) {
errors.reject("householdSeq", "임가 정보가 없습니다.");
errors.rejectValue("householdSeq", "error.householdSeq", "임가 정보가 없습니다.");
return;
}
if (vo.getVisitDate() == null) {
errors.reject("visitDate", "방문일자를 입력해 주세요.");
errors.rejectValue("visitDate", "error.visitDate","방문일자를 입력해 주세요.");
return;
}
if (vo.getVisitDate().after(new Date())) {
errors.reject("visitDate", "미래 날짜는 입력할 수 없습니다.");
errors.rejectValue("visitDate", "error.visitDate","미래 날짜는 입력할 수 없습니다.");
return;
}
if (vo.getManagementType() == null) {
errors.reject("managementType", "방문조사 유형을 선택해 주세요.");
errors.rejectValue("managementType", "error.managementType","방문조사 유형을 선택해 주세요.");
}
if (!StringUtils.hasText(vo.getContent())) {
errors.reject("content", "내용을 입력해 주세요.");
errors.rejectValue("content", "error.content","내용을 입력해 주세요.");
}
}
}

View File

@@ -10,6 +10,7 @@
street_num,
land_type,
town,
available_area,
crop_name,
land_area,
main_yield,

View File

@@ -461,7 +461,8 @@ const ifNullHyphen = (value, fallback = '-') => {
}
const formatNumberWithComma = (value) => {
if (value == null || isNaN(value)) return '-';
if (value == null || value === '' || Number(value) === 0) return '-';
if (isNaN(value)) return '-';
return Number(value).toLocaleString();
}

View File

@@ -49,7 +49,7 @@
<!-- 직접입력 항목 -->
<div class="component-input self-input">
<div class="input-field">
<input type="text" class="transfer-category-self" name="transferCategory" disabled>
<input type="text" class="transfer-category-self" name="transferCategory" maxlength="30" disabled>
</div>
</div>
</div>
@@ -91,7 +91,7 @@
<!-- 직접입력 수량 단위 -->
<div class="component-input self-input">
<div class="input-field">
<input type="text" id="unit" name="unit" disabled>
<input type="text" id="unit" name="unit" maxlength="30" disabled>
</div>
</div>
</div>
@@ -104,7 +104,7 @@
<div class="component-input">
<div class="input-field">
<input type="number" id="price" name="price"
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
</div>
</div>
</td>

View File

@@ -66,7 +66,7 @@
<!-- 직접입력 항목 -->
<div class="component-input self-input">
<div class="input-field">
<input type="text" class="transfer-category-self" name="transferCategory" disabled>
<input type="text" class="transfer-category-self" name="transferCategory" maxlength="30" disabled>
</div>
</div>
</div>
@@ -119,7 +119,7 @@
<!-- 직접입력 수량 단위 -->
<div class="component-input self-input">
<div class="input-field">
<input type="text" id="unit" name="unit" disabled>
<input type="text" id="unit" name="unit" maxlength="30" disabled>
</div>
</div>
</div>
@@ -132,7 +132,7 @@
<div class="component-input">
<div class="input-field">
<input type="number" id="price" name="price"
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
</div>
</div>
</td>

View File

@@ -38,7 +38,7 @@
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="streetNum" name="streetNum">
<input type="text" id="streetNum" name="streetNum" maxlength="10">
</div>
</div>
</td>
@@ -47,7 +47,7 @@
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="landType" name="landType">
<input type="text" id="landType" name="landType" maxlength="10">
</div>
</div>
</td>
@@ -56,7 +56,7 @@
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="town" name="town">
<input type="text" id="town" name="town" maxlength="10">
</div>
</div>
</td>
@@ -67,7 +67,7 @@
<td>
<div class="component-input">
<div class="input-field">
<input type="text" id="cropName" name="cropName">
<input type="text" id="cropName" name="cropName" maxlength="10">
</div>
</div>
</td>
@@ -77,7 +77,7 @@
<div class="component-input">
<div class="input-field">
<input type="number" id="landArea" name="landArea"
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
</div>
</div>
</td>
@@ -87,7 +87,7 @@
<div class="component-input">
<div class="input-field">
<input type="number" id="availableArea" name="availableArea"
maxlength="30" inputmode="numeric" oninput="limitMaxLength(this);">
maxlength="10" inputmode="numeric" oninput="limitMaxLength(this);">
</div>
</div>
</td>

View File

@@ -126,7 +126,7 @@
<td class="underline"><a href="javascript:void(0);" onclick="showBankIncomeModal(${item.id})">${ifNullHyphen(item.categoryText)}</td> <!-- 수입의 종류 -->
<td>${ifNullHyphen(item.target)}</td><!-- 대상 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td class="align-right">${formatNumberWithComma(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>
@@ -161,7 +161,7 @@
</td>
<td class="underline"><a href="javascript:void(0);" onclick="showBankExpenseModal(${item.id})">${ifNullHyphen(item.categoryText)}</a></td> <!-- 지출의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
<td class="align-right">${formatNumberWithComma(item.count)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
</tr>

View File

@@ -114,18 +114,18 @@
<td>${ifNullHyphen(item.streetNum)}</td> <!-- 지번 -->
<td>${ifNullHyphen(item.landType)}</td><!-- 지목 -->
<td>${ifNullHyphen(item.town)}</td><!-- 읍면동 -->
<td>${ifNullHyphen(item.availableArea)}</td><!-- 가능면적(평) -->
<td>${formatNumberWithComma(item.availableArea)}</td><!-- 가능면적(평) -->
<td class="underline">
<a href="javascript:void(0);" onclick="showForestProductModal(${item.id});">${ifNullHyphen(item.cropName)}</a>
</td><!-- 재배작물명 -->
<td>${ifNullHyphen(item.landArea)}</td><!-- 면적(평) -->
<td class="align-right">${ifNullHyphen(item.mainYield)}</td><!-- 주생산물 수확량 -->
<td>${formatNumberWithComma(item.landArea)}</td><!-- 면적(평) -->
<td class="align-right">${formatNumberWithComma(item.mainYield)}</td><!-- 주생산물 수확량 -->
<td>${ifNullHyphen(item.mainYieldUnitText)}</td><!-- 주생산물 수확량 단위 -->
<td class="align-right">${ifNullHyphen(item.mainSaleAmount)}</td><!-- 주생산물 판매량 -->
<td class="align-right">${formatNumberWithComma(item.mainSaleAmount)}</td><!-- 주생산물 판매량 -->
<td>${ifNullHyphen(item.mainSaleAmountUnitText)}</td><!-- 주생산물 판매량 단위 -->
<td class="align-right">${ifNullHyphen(item.subYield)}</td><!-- 부생산물 수확량 -->
<td class="align-right">${formatNumberWithComma(item.subYield)}</td><!-- 부생산물 수확량 -->
<td>${ifNullHyphen(item.subYieldUnitText)}</td><!-- 부생산물 수확량 단위 -->
<td class="align-right">${ifNullHyphen(item.subSaleAmount)}</td><!-- 부생산물 판매량 -->
<td class="align-right">${formatNumberWithComma(item.subSaleAmount)}</td><!-- 부생산물 판매량 -->
<td>${ifNullHyphen(item.subSaleAmountUnitText)}</td><!-- 부생산물 판매량 단위 -->
</tr>
`;
@@ -218,11 +218,18 @@
document.querySelectorAll('input[name="forestRemoveIds"]:checked')
).map(el => Number(el.value));
const totalRows = document.querySelectorAll('input[name="forestRemoveIds"]').length;
if(checkedIds.length <= 0) {
alert("임산물을 선택해주세요.");
return
}
if (checkedIds.length === totalRows) {
alert("등록내용은 최소 1건이 남아있어야 합니다.");
return;
}
etUI.dialog.confirm({
title: '삭제 안내',
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',