[BO] 일계부 오류 수정

This commit is contained in:
kangsunlee
2025-06-24 14:01:09 +09:00
parent 1b00e22ed0
commit c188e2e638
6 changed files with 59 additions and 45 deletions

View File

@@ -18,7 +18,6 @@ public class GetDailyExpenseRecords {
private String quantity;
private String unitCode;
private String unitText;
private String unitSelf;
private String price;
private String estimatedValue;
private String updatedBy;

View File

@@ -15,7 +15,6 @@ public class GetDailyFarmingRecords {
private String productName;
private String usage;
private BigDecimal quantity;
private String unitCode;
private String unitText;
private String estimatedValue;
private String updatedBy;

View File

@@ -21,7 +21,6 @@ public class GetDailyIncomeRecords {
private BigDecimal quantity;
private String unitCode;
private String unitText;
private String unitSelf;
private String price;
private String estimatedValue;
private String updatedBy;

View File

@@ -14,11 +14,9 @@ public class GetDailyWorkRecords {
private String itemName;
private String workName;
private String workLandArea;
private String areaUnitCodeText;
private String areaUnitSelf;
private String areaUnitText;
private String harvestQuantity;
private String harvestUnitCodeText;
private String harvestUnitSelf;
private String harvestUnitText;
private String ownerTime;
private String spouseTime;
private String familyMHours;

View File

@@ -30,8 +30,11 @@
di.source_purpose, /* 수입원(용도) */
di.quantity, /* 수량 */
di.unit_code, /* 단위 코드 */
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
di.unit_self, /* 단위(직접입력) */
CASE
WHEN di.unit_code = 'code.record.unit.self'
THEN di.unit_self
ELSE ui_unit.code_text
END AS unit_text, /* 단위 코드 텍스트 */
di.price, /* 현금 */
di.estimated_value, /* 현물평가액 */
di.updated_by, /* 최종수정자 */
@@ -51,26 +54,32 @@
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyWorkRecords">
/* getDailyWorkRecords : 일계부 등록 현황 상세 임업노동 투입 내역 조회 */
SELECT dw.id,
dw.item_name, /* 품목명 */
dw.work_name, /* 작업명*/
dw.work_land_area, /* 작업 면적 */
ui_area.code_text AS areaUnitCodeText, /* 작업면적 단위(코드매핑) */
dw.area_unit_self, /* 작업면적 단위(직접입력) */
dw.harvest_quantity, /* 수확량 */
ui_harvest.code_text AS harvestUnitCodeText, /* 수확량 단위 (코드매핑) */
dw.harvest_unit_self, /* 수확량 단위 (직접입력) */
dw.owner_time, /* 경영주 시간 */
dw.spouse_time, /* 배우자 시간 */
dw.family_m_hours, /* 가족노동(남) */
dw.family_f_hours, /* 가족노동(여) */
dw.hired_m_hours, /* 고용노동(남) */
dw.hired_f_hours, /* 고용노동(여) */
dw.shared_m_hours, /* 품앗이(남) */
dw.shared_f_hours, /* 품앗이(여) */
dw.volunteer_m_hours, /* 일손돕기(남) */
dw.volunteer_f_hours, /* 일손돕기(여) */
dw.updated_by, /* 최종수정자 */
dw.updated_at /* 최종수정날짜 */
dw.item_name, /* 품목명 */
dw.work_name, /* 작업명*/
dw.work_land_area, /* 작업 면적 */
CASE
WHEN dw.area_unit_code = 'code.record.unit.self'
THEN dw.area_unit_self
ELSE ui_area.code_text
END AS areaUnitText, /* 작업면적 단위 텍스트 */
dw.harvest_quantity, /* 수확량 */
CASE
WHEN dw.harvest_unit_code = 'code.record.unit.self'
THEN dw.harvest_unit_self
ELSE ui_harvest.code_text
END AS harvestUnitText, /* 수확량 단위 텍스트 */
dw.owner_time, /* 경영주 시간 */
dw.spouse_time, /* 배우자 시간 */
dw.family_m_hours, /* 가족노동(남) */
dw.family_f_hours, /* 가족노동(여) */
dw.hired_m_hours, /* 고용노동(남) */
dw.hired_f_hours, /* 고용노동(여) */
dw.shared_m_hours, /* 품앗이(남) */
dw.shared_f_hours, /* 품앗이(여) */
dw.volunteer_m_hours, /* 일손돕기(남) */
dw.volunteer_f_hours, /* 일손돕기(여) */
dw.updated_by, /* 최종수정자 */
dw.updated_at /* 최종수정날짜 */
FROM daily_work dw
LEFT JOIN uicode ui_area
ON ui_area.parent_id = 'code.record.unit'
@@ -92,8 +101,11 @@
de.source_purpose, /* 지출원(용도) */
de.quantity, /* 수량 */
de.unit_code, /* 단위 */
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
de.unit_self, /* 단위(직접입력) */
CASE
WHEN de.unit_code = 'code.record.unit.self'
THEN de.unit_self
ELSE ui_unit.code_text
END AS unit_text, /* 단위 코드 텍스트 */
de.price, /* 현금 */
de.estimated_value, /* 현물평가액 */
de.updated_by, /* 최종수정자 */
@@ -128,7 +140,11 @@
df.usage, /* 용도 */
df.quantity, /* 수량 */
df.unit_code, /* 단위 코드 */
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
CASE
WHEN df.unit_code = 'code.record.unit.self'
THEN df.unit_self
ELSE ui_unit.code_text
END AS unit_text, /* 단위 코드 텍스트 */
df.estimated_value, /* 현물평가액 */
df.updated_by, /* 최종수정자 */
TO_CHAR(df.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
@@ -145,14 +161,17 @@
/* getDailyFarmingRecords : 일계부 등록 현황 상세 자가농업 생산물 중 자가소비량 조회 */
SELECT df.id, /* 자가농업 id */
CASE
WHEN df.product_self is not null
WHEN df.product_code = 'code.record.farming.self'
THEN df.product_self
ELSE ui_product.code_text
END AS product_name, /* 생산물명 */
df.usage, /* 용도 */
df.quantity, /* 수량 */
df.unit_code, /* 단위 코드 */
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
CASE
WHEN df.unit_code = 'code.record.unit.self'
THEN df.unit_self
ELSE ui_unit.code_text
END AS unit_text, /* 단위 코드 텍스트 */
df.estimated_value, /* 현물평가액 */
df.updated_by, /* 최종수정자 */
TO_CHAR(df.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */

View File

@@ -135,7 +135,7 @@
</div>
<div class="tab-body">
<div class="tab-content daily-record" data-tab-value="tab1">
<div class="tab-content daily-record" data-tab-value="tab1" >
<!-- 일계부 등록 현황 리스트 -->
<div class="daily-record-content daily-record-list">
<div class="content-inner">
@@ -231,9 +231,9 @@
<!-- 임업노동 투입 내역 -->
<section class="table-group">
<div class="table-tit-group" th:unless="${activeProfile != 'local'}">
<div class="table-tit-group">
<h3>임업노동 투입 내역 <strong>(<span id="workCount">0</span>건)</strong></h3>
<div class="component-btns bottom-btn-group">
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
<div class="btns-row align-right">
<button type="button" class="btn small">
<span class="btn-txt">등록여부</span>
@@ -590,8 +590,8 @@
</div>
</div>
</div>
</div>
<div class="component-btns bottom-btn-group">
<div class="btns-row two-col">
<div class="btns-col-1">
@@ -614,10 +614,10 @@
</form>
<!-- 조사원 매핑 모달 -->
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
<th:block th:replace="common/modal-researcher-mapping :: modalFragment"/>
<!-- 임가방문정보 모달 -->
<div th:replace="households/modal/modal-visit-info :: modalFragment"></div>
<th:block th:replace="households/modal/modal-visit-info :: modalFragment"/>
</section>
<section layout:fragment="script">
@@ -805,7 +805,7 @@
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
<td>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
<td>
@@ -845,9 +845,9 @@
<td class="underline">${ifNullHyphen(item.itemName)}</td><!-- 품목명 -->
<td>${ifNullHyphen(item.workName)}</td><!-- 작업명 -->
<td class="align-right">${ifNullHyphen(item.workLandArea)}</td><!-- 작업면적 -->
<td>${ifNullHyphen(item.areaUnitSelf != null ? item.areaUnitSelf : item.areaUnitCodeText)}</td><!-- 작업면적 단위 -->
<td>${ifNullHyphen(item.areaUnitText)}</td><!-- 작업면적 단위 -->
<td class="align-right">${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
<td>${ifNullHyphen(item.harvestUnitSelf != null ? item.harvestUnitSelf : item.harvestUnitCodeText)}</td><!-- 수확량 단위 -->
<td>${ifNullHyphen(item.harvestUnitText)}</td><!-- 수확량 단위 -->
<td>${ifNullHyphen(item.ownerTime)}</td><!-- 경영주 시간 -->
<td>${ifNullHyphen(item.spouseTime)}</td><!-- 배우자 시간 -->
<td>${ifNullHyphen(item.familyMHours)}</td><!-- 가족노동(남) -->
@@ -896,7 +896,7 @@
<td class="underline">${ifNullHyphen(item.expenseKind)}</td><!-- 지출의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
<td>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
<td>