From c188e2e6389d7de65bb317f390c036fe9affd3f9 Mon Sep 17 00:00:00 2001 From: kangsunlee Date: Tue, 24 Jun 2025 14:01:09 +0900 Subject: [PATCH] =?UTF-8?q?[BO]=20=EC=9D=BC=EA=B3=84=EB=B6=80=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/GetDailyExpenseRecords.java | 1 - .../domain/GetDailyFarmingRecords.java | 1 - .../domain/GetDailyIncomeRecords.java | 1 - .../domain/GetDailyWorkRecords.java | 6 +- .../GetDailyRecordStatusDetailMapper.xml | 75 ++++++++++++------- .../resources/templates/households/{seq}.html | 20 ++--- 6 files changed, 59 insertions(+), 45 deletions(-) diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyExpenseRecords.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyExpenseRecords.java index 5ea5110a..a8a05235 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyExpenseRecords.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyExpenseRecords.java @@ -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; diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyFarmingRecords.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyFarmingRecords.java index d7593e43..c9bf3e75 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyFarmingRecords.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyFarmingRecords.java @@ -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; diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyIncomeRecords.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyIncomeRecords.java index 9f4a99c8..490c91b4 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyIncomeRecords.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyIncomeRecords.java @@ -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; diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyWorkRecords.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyWorkRecords.java index e057b165..0012c996 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyWorkRecords.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/getDailyRecordStatusDetail/ports/application/domain/GetDailyWorkRecords.java @@ -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; diff --git a/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml b/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml index 33fdb343..bd15f374 100644 --- a/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml +++ b/admin/src/main/resources/mappers/household/GetDailyRecordStatusDetailMapper.xml @@ -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 /* 최종수정날짜 */ diff --git a/admin/src/main/resources/templates/households/{seq}.html b/admin/src/main/resources/templates/households/{seq}.html index 90a994ff..ce1b0380 100644 --- a/admin/src/main/resources/templates/households/{seq}.html +++ b/admin/src/main/resources/templates/households/{seq}.html @@ -135,7 +135,7 @@
-
+
@@ -231,9 +231,9 @@
-
+

임업노동 투입 내역 (0건)

-
+
-
+
@@ -614,10 +614,10 @@ -
+ -
+
@@ -805,7 +805,7 @@ ${ifNullHyphen(item.incomeKind)} ${ifNullHyphen(item.sourcePurpose)} ${ifNullHyphen(item.quantity)} - ${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)} + ${ifNullHyphen(item.unitText)} ${formatNumberWithComma(item.price)} ${formatNumberWithComma(item.estimatedValue)} @@ -845,9 +845,9 @@ ${ifNullHyphen(item.itemName)} ${ifNullHyphen(item.workName)} ${ifNullHyphen(item.workLandArea)} - ${ifNullHyphen(item.areaUnitSelf != null ? item.areaUnitSelf : item.areaUnitCodeText)} + ${ifNullHyphen(item.areaUnitText)} ${ifNullHyphen(item.harvestQuantity)} - ${ifNullHyphen(item.harvestUnitSelf != null ? item.harvestUnitSelf : item.harvestUnitCodeText)} + ${ifNullHyphen(item.harvestUnitText)} ${ifNullHyphen(item.ownerTime)} ${ifNullHyphen(item.spouseTime)} ${ifNullHyphen(item.familyMHours)} @@ -896,7 +896,7 @@ ${ifNullHyphen(item.expenseKind)} ${ifNullHyphen(item.sourcePurpose)} ${ifNullHyphen(item.quantity)} - ${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)} + ${ifNullHyphen(item.unitText)} ${formatNumberWithComma(item.price)} ${formatNumberWithComma(item.estimatedValue)}