From 84ae60edd6c8f2d3e474c17235d65afa6577a5fd Mon Sep 17 00:00:00 2001 From: yangsein Date: Mon, 15 Jun 2026 00:57:39 +0900 Subject: [PATCH] =?UTF-8?q?feat:[=EC=A7=91=EA=B3=84=ED=91=9C]=2011?= =?UTF-8?q?=ED=95=98=EC=88=98=EB=B0=8F=20=EB=B6=84=EB=87=A8=EC=B0=8C?= =?UTF-8?q?=EA=BA=BC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../total/SewageExcretaSlurgeTot.tsx | 206 +++++++++++++++++- .../DigestionTankTab2Column.ts | 42 ++++ .../HumanWasteSludgeTab4Column.ts | 37 ++++ .../SewageSludgeOperTab3Column.ts | 30 +++ .../SludgeProcessingTab1Column.ts | 103 +++++++++ .../statistics-sludge-total-interface.ts | 168 ++++++++++++++ 6 files changed, 583 insertions(+), 3 deletions(-) create mode 100644 apps/st/src/components/util/column/total/sludgeProcessing/DigestionTankTab2Column.ts create mode 100644 apps/st/src/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column.ts create mode 100644 apps/st/src/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column.ts create mode 100644 apps/st/src/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column.ts create mode 100644 apps/st/src/entities/statistics/model/statistics-total/statistics-sludge-total-interface.ts diff --git a/apps/st/src/components/statistics/total/SewageExcretaSlurgeTot.tsx b/apps/st/src/components/statistics/total/SewageExcretaSlurgeTot.tsx index c384f1461..c251aff5c 100644 --- a/apps/st/src/components/statistics/total/SewageExcretaSlurgeTot.tsx +++ b/apps/st/src/components/statistics/total/SewageExcretaSlurgeTot.tsx @@ -1,10 +1,210 @@ +import { useRef, useState } from "react"; + +import { useAlertStore } from "@/shared/lib"; +import { LoadingWithAnimation, Tabs, TabsContent, TabsList, TabsTrigger } from "@common/components"; + import SearchForm from "@/components/module/SearchForm"; +import DataGrid from "@/components/module/DataGrid"; +import type { SearchFormValues } from "@/components/type/SearchForm.type"; +import { toGridRows } from "@/components/util/grid/gridFunction"; + +// 4개 탭 컬럼 설정 임포트 +import { SludgeProcessingTab1ColumnConfig } from "@/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column"; +import { DigestionTankTab2ColumnConfig } from "@/components/util/column/total/sludgeProcessing/DigestionTankTab2Column"; +import { SewageSludgeOperTab3ColumnConfig } from "@/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column"; +import { HumanWasteSludgeTab4ColumnConfig } from "@/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column"; + +// API 인스턴스 및 인터페이스 임포트 (타입 안전성 확보) +import { statisticsTotalStatusApi } from "@/entities/statistics/api/statistics-total-service"; +import type { + SludgeSummaryRequest, + SludgeProcessingTab1Response, + DigestionTankOperTab2Response, + SewageSludgeOperTab3Response, + HumanWasteSludgeTab4Response +} from "@/entities/statistics/model/statistics-total/statistics-sludge-total-interface"; +import CellColorInfo from "./CellColorInfo"; + +// 탭 순회 설정 +const SludgeColumnListTot = [ + SludgeProcessingTab1ColumnConfig, + DigestionTankTab2ColumnConfig, + SewageSludgeOperTab3ColumnConfig, + HumanWasteSludgeTab4ColumnConfig +].filter(Boolean); + +const firstTabKey = SludgeColumnListTot[0]?.tabKey ?? "ST00110001"; const SewageExcretaSlurgeTot = () => { + const { setMessage: alert } = useAlertStore((state) => state); + + const [rowDataMap, setRowDataMap] = useState[]>>(new Map()); + const [isLoading, setIsLoading] = useState(false); + const [activeTab, setActiveTab] = useState(firstTabKey); + const lastSearchedValuesRef = useRef(null); + + const columnInfo = SludgeColumnListTot; + + const handleReset = () => { + setRowDataMap(new Map()); + setActiveTab(firstTabKey); + lastSearchedValuesRef.current = null; + }; + +const loadGridData = async (tabKey: string, values: SearchFormValues): Promise => { + setIsLoading(true); + const param: SludgeSummaryRequest = { + ctpvNm: values.sido === "ALL" ? "" : values.sido, + sggNm: values.gugun === "ALL" ? "" : values.gugun, + sewerBzmnCd: values.bsnmCd, + statsYr: values.year, + rowDataYn: values.isDetail, + summaryYn: values.isSummary !== 'ALL', + summaryYearCnt: values.isSummary !== 'ALL' ? Number(values.isSummary) : undefined + }; + + try { + // [TAB1] 하수및분뇨찌꺼기 > 찌꺼기처리시설현황 + if (tabKey === "ST00110001") { + const response: SludgeProcessingTab1Response = await statisticsTotalStatusApi.getSludgeProcessingTab1List(param); + if (response?.status === "success") { + setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[]))); + return true; + } + } + // [TAB2] 소화조 운영현황 + else if (tabKey === "ST00110002") { + const response: DigestionTankOperTab2Response = await statisticsTotalStatusApi.getSludgeTab2List(param); + if (response?.status === "success") { + setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[]))); + return true; + } + } + // [TAB3] 하수찌꺼기 처리시설 운영현황 + else if (tabKey === "ST00110003") { + const response: SewageSludgeOperTab3Response = await statisticsTotalStatusApi.getSludgeTab3List(param); + if (response?.status === "success") { + setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[]))); + return true; + } + } + // [TAB4] 분뇨찌꺼기 처리현황 + else if (tabKey === "ST00110004") { + const response: HumanWasteSludgeTab4Response = await statisticsTotalStatusApi.getSludgeTab4List(param); + if (response?.status === "success") { + setRowDataMap((prev) => new Map(prev).set(tabKey, toGridRows(response.data as object[]))); + return true; + } + } + + alert("데이터 조회 중 오류가 발생했습니다."); + return false; + } catch { + alert("서버 연결 중 오류가 발생했습니다."); + return false; + } finally { + setIsLoading(false); + } + }; + + /** 검색 버튼 이벤트: SearchForm의 Values 타입을 기반으로 호출 */ + const handleSearch = async (values: SearchFormValues) => { + try { + setIsLoading(true); + // 탭 변경 없이 현재 탭(activeTab)에 대해서만 명시적 타입 호출 + const ok = await loadGridData(activeTab, values); + if (ok) { + lastSearchedValuesRef.current = values; + } else { + lastSearchedValuesRef.current = null; + } + } catch (error) { + alert("데이터 조회 중 오류가 발생했습니다."); + lastSearchedValuesRef.current = null; + } finally { + setIsLoading(false); + } + }; + + /** 탭 변경 이벤트: 현재 탭 상태와 SearchForm의 마지막 값을 동기화 */ + const handleActiveTabChange = async (tabKey: string) => { + setActiveTab(tabKey); + + // 마지막 검색 값이 있으면 해당 탭만 새로 로드 + const values = lastSearchedValuesRef.current; + if (!values || rowDataMap.has(tabKey)) return; + + try { + setIsLoading(true); + await loadGridData(tabKey, values); + } catch (error) { + alert("데이터 조회 중 오류가 발생했습니다."); + } finally { + setIsLoading(false); + } + }; + return ( - <> - - +
+ + + {isLoading && ( +
+
+ +
+
+ )} + + + +
+ void handleActiveTabChange(v)} className="w-full" variant="default"> + + {columnInfo.map((info) => ( + {info.tabLabel} + ))} + + + {columnInfo.map((info) => { + const tabKey = info.tabKey; + const rowData = rowDataMap.get(tabKey) ?? []; + + return ( + + { + setRowDataMap((prev) => { + const next = new Map(prev); + const cur = next.get(tabKey) ?? []; + const n = typeof updater === "function" ? updater(cur) : updater; + next.set(tabKey, n); + return next; + }); + }} + isExcelImport={false} + isExcelExport={true} + showHeaderCheckbox={false} + fixedColumns={info.fixedColumns} + enableSort={false} + cellStyleCallback={({ row }) => { + const rowType = String(row.rowType ?? ''); + if (rowType === 'DETAIL') return undefined; + if (rowType === 'BIZ_SUM') return 'rg-cell-rowtype-biz-sum'; + if (rowType === 'SUMMARY') return 'rg-cell-rowtype-summary'; + return 'rg-cell-rowtype-other'; + }} + /> + + ); + })} + +
+
); }; diff --git a/apps/st/src/components/util/column/total/sludgeProcessing/DigestionTankTab2Column.ts b/apps/st/src/components/util/column/total/sludgeProcessing/DigestionTankTab2Column.ts new file mode 100644 index 000000000..65b1c50bc --- /dev/null +++ b/apps/st/src/components/util/column/total/sludgeProcessing/DigestionTankTab2Column.ts @@ -0,0 +1,42 @@ +import { ValueType } from "realgrid"; + +export const DigestionTankTab2ColumnConfig = { + tabKey: "ST00110002", + tabLabel: "소화조 운영현황", + rowStartNum: 3, // 행정구역, 하수처리장명 등 기본 정보 이후 다단 헤더가 있으므로 3단 지정 + fixedColumns: 1, + columns: [ + { name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false }, + { name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false }, + { name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false }, + { name: "fcltNm", fieldName: "fcltNm", header: { text: "하수\n처리장명" }, editable: false }, + + { name: "digesterYn", fieldName: "digesterYn", header: { text: "소화조 유/무\n(Y/N)선택" }, editable: false }, + { name: "dsgnCpct", fieldName: "dsgnCpct", header: { text: "설계\n용량(㎥)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false }, + { name: "actlOperCpct", fieldName: "actlOperCpct", header: { text: "실제운전\n용량(㎥)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false }, + { name: "inputQnt", fieldName: "inputQnt", header: { text: "투입량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "tsConc", fieldName: "tsConc", header: { text: "투입 TS 농도\n(%)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "oprtngDays", fieldName: "oprtngDays", header: { text: "가동일수\n(연간)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false }, + { name: "gnrtGasQnt", fieldName: "gnrtGasQnt", header: { text: "발생가스량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + + // 소화가스 이용현황(하위 항목) + { name: "gasTotal", fieldName: "gasTotal", header: { text: "계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "gasSale", fieldName: "gasSale", header: { text: "판매" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "gasGen", fieldName: "gasGen", header: { text: "발전" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "gasSelf", fieldName: "gasSelf", header: { text: "자체활용" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "gasEtc", fieldName: "gasEtc", header: { text: "기타(CNG등)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + + { name: "surplusGas", fieldName: "surplusGas", header: { text: "잉여가스량\n(㎥/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false } + ], + columnLayout: [ + { name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] }, + "fcltNm", + { name: "operGroup", header: { text: "소화조 운영현황" }, items: ["digesterYn", "dsgnCpct", "actlOperCpct", "inputQnt", "tsConc", "oprtngDays", "gnrtGasQnt", + { + name: "gasUsageGroup", + header: { text: "소화가스 이용현황(㎥/일)" }, + items: ["gasTotal", "gasSale", "gasGen", "gasSelf", "gasEtc"] + },"surplusGas" + ] }, + ] +}; \ No newline at end of file diff --git a/apps/st/src/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column.ts b/apps/st/src/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column.ts new file mode 100644 index 000000000..df6a57742 --- /dev/null +++ b/apps/st/src/components/util/column/total/sludgeProcessing/HumanWasteSludgeTab4Column.ts @@ -0,0 +1,37 @@ +import { ValueType } from "realgrid"; + +export const HumanWasteSludgeTab4ColumnConfig = { + tabKey: "ST00110004", + tabLabel: "분뇨찌꺼기(슬러지)처리현황", + rowStartNum: 2, // 행정구역 2단 레이아웃 + fixedColumns: 1, + columns: [ + { name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false }, + { name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false }, + { name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false }, + { name: "fcltNm", fieldName: "fcltNm", header: { text: "분뇨\n처리장명" }, editable: false }, + + { name: "gnam", fieldName: "gnam", header: { text: "발생량\n(A)=(B)+(C)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "wholDspsQnt", fieldName: "wholDspsQnt", header: { text: "계(B)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "rcycQnt", fieldName: "rcycQnt", header: { text: "재활용" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "olandLfvlm", fieldName: "olandLfvlm", header: { text: "육상매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrQnt", fieldName: "incnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "oceanInputQnt", fieldName: "oceanInputQnt", header: { text: "해양투기" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "fuelQnt", fieldName: "fuelQnt", header: { text: "연료화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "etcQnt", fieldName: "etcQnt", header: { text: "기타" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "nondspsQnt", fieldName: "nondspsQnt", header: { text: "미처분량\n(이월량)(C)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "swtrmtFcltNm", fieldName: "swtrmtFcltNm", header: { text: "타시설\n연계여부" }, editable: false } + ], + columnLayout: [ + { name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] }, + "fcltNm", + "gnam", + { + name: "dspsGroup", + header: { text: "처분량" }, + items: ["wholDspsQnt", "rcycQnt", "olandLfvlm", "incnrQnt", "oceanInputQnt", "fuelQnt", "etcQnt"] + }, + "nondspsQnt", + "swtrmtFcltNm" + ] +}; \ No newline at end of file diff --git a/apps/st/src/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column.ts b/apps/st/src/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column.ts new file mode 100644 index 000000000..c7a5786ce --- /dev/null +++ b/apps/st/src/components/util/column/total/sludgeProcessing/SewageSludgeOperTab3Column.ts @@ -0,0 +1,30 @@ +import { ValueType } from "realgrid"; + +export const SewageSludgeOperTab3ColumnConfig = { + tabKey: "ST00110003", + tabLabel: "하수찌꺼기 처리시설 운영현황", + rowStartNum: 2, + fixedColumns: 1, + columns: [ + { name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false }, + { name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false }, + { name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false }, + { name: "fcltNm", fieldName: "fcltNm", header: { text: "찌꺼기처리\n시설명" }, editable: false }, + + { name: "prcsMthExpln", fieldName: "prcsMthExpln", header: { text: "처리방식" }, editable: false }, + { name: "fcltCpct", fieldName: "fcltCpct", header: { text: "시설용량\n(톤/일)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "anlPrcsQnt", fieldName: "anlPrcsQnt", header: { text: "연간처리량\n(톤/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dayAvgOprtngHr", fieldName: "dayAvgOprtngHr", header: { text: "일평균\n가동시간\n(1~24)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "anlOprtngDayCnt", fieldName: "anlOprtngDayCnt", header: { text: "연중 가동일\n(1~330)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false }, + { name: "oprtngRt", fieldName: "oprtngRt", header: { text: "가동율(%)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false } + ], + columnLayout: [ + { name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] }, + "fcltNm", + { + name: "operStatusGroup", + header: { text: "처리시설 운영현황" }, + items: ["prcsMthExpln", "fcltCpct", "anlPrcsQnt", "dayAvgOprtngHr", "anlOprtngDayCnt", "oprtngRt"] + } + ] +}; \ No newline at end of file diff --git a/apps/st/src/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column.ts b/apps/st/src/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column.ts new file mode 100644 index 000000000..d61e6a535 --- /dev/null +++ b/apps/st/src/components/util/column/total/sludgeProcessing/SludgeProcessingTab1Column.ts @@ -0,0 +1,103 @@ +import { ValueType } from "realgrid"; + +export const SludgeProcessingTab1ColumnConfig = { + tabKey: "ST00110001", + tabLabel: "찌꺼기(슬러지)처리시설현황", + rowStartNum: 4, // 3단 그룹 대단위 레이아웃 명세이므로 4로 바인딩합니다. + fixedColumns: 1, + columns: [ + { name: "ctpvNm", fieldName: "ctpvNm", header: { text: "시도" }, editable: false }, + { name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false }, + { name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false }, + { name: "fcltNm", fieldName: "fcltNm", header: { text: "하수\n처리장명" }, editable: false }, + + // 찌꺼기발생량 + { name: "gnamWhol", fieldName: "gnamWhol", header: { text: "합계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "itslfQnt", fieldName: "itslfQnt", header: { text: "자체" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdInflwQnt", fieldName: "otsdInflwQnt", header: { text: "외부유입량" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + + // 이송 및 함수율 지표들 + { name: "transfTmplntNm", fieldName: "transfTmplntNm", header: { text: "이송처리장" }, editable: false }, + { name: "transfPrcsQnt", fieldName: "transfPrcsQnt", header: { text: "이송처리량\n(㎥/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "srpFncRt", fieldName: "srpFncRt", header: { text: "함수율\n(%, 탈수기준)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "wholSrpPrcsQnt", fieldName: "wholSrpPrcsQnt", header: { text: "찌꺼기\n처리량 합계\n(톤/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + + // 자체 처리 1차 대문 항목들 + { name: "itslfTs1Whol", fieldName: "itslfTs1Whol", header: { text: "자체찌꺼기\n처리량 소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "itslfTs1RclmQnt", fieldName: "itslfTs1RclmQnt", header: { text: "매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + + // 소각 후 처리(2차) 서브 항목들 + { name: "itslfTs1IncnrQnt", fieldName: "itslfTs1IncnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrPrcsWhol", fieldName: "incnrPrcsWhol", header: { text: "소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrPrcsLfvlm", fieldName: "incnrPrcsLfvlm", header: { text: "매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrPrcsPrdctRmtrlQnt", fieldName: "incnrPrcsPrdctRmtrlQnt", header: { text: "제품원료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrPrcsFmlyrQnt", fieldName: "incnrPrcsFmlyrQnt", header: { text: "복토재" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "incnrPrcsFcltNm", fieldName: "incnrPrcsFcltNm", header: { text: "시설(업체명)" }, editable: false }, + + // 고화 처리군 + { name: "itslfTs1AltdQnt", fieldName: "itslfTs1AltdQnt", header: { text: "고화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "stbznPrcsWhol", fieldName: "stbznPrcsWhol", header: { text: "소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "stbznPrcsLfvlm", fieldName: "stbznPrcsLfvlm", header: { text: "매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "stbznPrcsFmlyrQnt", fieldName: "stbznPrcsFmlyrQnt", header: { text: "복토재" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "stbznPrcsFcltNm", fieldName: "stbznPrcsFcltNm", header: { text: "시설(업체명)" }, editable: false }, + + // 건조 처리군 + { name: "itslfTs1DryQnt", fieldName: "itslfTs1DryQnt", header: { text: "건조" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsWhol", fieldName: "dryPrcsWhol", header: { text: "소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsLfvlm", fieldName: "dryPrcsLfvlm", header: { text: "매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsIncnrQnt", fieldName: "dryPrcsIncnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsFuelQnt", fieldName: "dryPrcsFuelQnt", header: { text: "연료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsPrdctRmtrlQnt", fieldName: "dryPrcsPrdctRmtrlQnt", header: { text: "제품원료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsFmlyrQnt", fieldName: "dryPrcsFmlyrQnt", header: { text: "복토재" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsCmpstgQnt", fieldName: "dryPrcsCmpstgQnt", header: { text: "퇴비화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "dryPrcsFcltNm", fieldName: "dryPrcsFcltNm", header: { text: "시설(업체명)" }, editable: false }, + + // 탄화 처리군 + { name: "itslfTs1FuelQnt", fieldName: "itslfTs1FuelQnt", header: { text: "탄화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "fuelPrcsWhol", fieldName: "fuelPrcsWhol", header: { text: "소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "fuelPrcsIncnrQnt", fieldName: "fuelPrcsIncnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "fuelPrcsFuelQnt", fieldName: "fuelPrcsFuelQnt", header: { text: "연료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "fuelPrcsFcltNm", fieldName: "fuelPrcsFcltNm", header: { text: "시설(업체명)" }, editable: false }, + + // 퇴비화 독립군 + { name: "itslfTs1CmpstgQnt", fieldName: "itslfTs1CmpstgQnt", header: { text: "퇴비화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "cmpsPrcsFcltBzentyNm", fieldName: "cmpsPrcsFcltBzentyNm", header: { text: "시설(업체명)" }, editable: false }, + + // 외부(민간) 위탁 처리현황 + { name: "otsdCnsgnWhol", fieldName: "otsdCnsgnWhol", header: { text: "소계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnRclmQnt", fieldName: "otsdCnsgnRclmQnt", header: { text: "매립" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnIncnrQnt", fieldName: "otsdCnsgnIncnrQnt", header: { text: "소각" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnFuelPwplQnt", fieldName: "otsdCnsgnFuelPwplQnt", header: { text: "연료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnPrdctRmtrlQnt", fieldName: "otsdCnsgnPrdctRmtrlQnt", header: { text: "제품원료" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnFmlyrQnt", fieldName: "otsdCnsgnFmlyrQnt", header: { text: "복토재" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnCmpstgQnt", fieldName: "otsdCnsgnCmpstgQnt", header: { text: "퇴비화" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false }, + { name: "otsdCnsgnFcltNm", fieldName: "otsdCnsgnFcltNm", header: { text: "시설(업체명)" }, editable: false }, + + // 수도권 광역 위탁 처리량 + { name: "cparTs2Whol", fieldName: "cparTs2Whol", header: { text: "수도권광역\n위탁처리량\n(톤/년)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0.0", editable: false } + ], + columnLayout: [ + { name: "areaGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] }, + "fcltNm", + { name: "gnamGroup", header: { text: "찌꺼기발생량(톤/년, 탈수기준)" }, items: ["gnamWhol", "itslfQnt", "otsdInflwQnt"] }, + "transfTmplntNm", "transfPrcsQnt", "srpFncRt", "wholSrpPrcsQnt", + { + name: "itslfProcessingGroup", + header: { text: "자체 찌꺼기 처리량 현황(톤/년)" }, + items: [ + "itslfTs1Whol", "itslfTs1RclmQnt","itslfTs1IncnrQnt", + { name: "incnrGroup", header: { text: "소각 후 처리(2차)" }, items: ["incnrPrcsWhol", "incnrPrcsLfvlm", "incnrPrcsPrdctRmtrlQnt", "incnrPrcsFmlyrQnt", "incnrPrcsFcltNm"] }, + "itslfTs1AltdQnt", + { name: "stbznGroup", header: { text: "고화 후 처리(2차)" }, items: [ "stbznPrcsWhol", "stbznPrcsLfvlm", "stbznPrcsFmlyrQnt", "stbznPrcsFcltNm"] }, + "itslfTs1DryQnt", + { name: "dryGroup", header: { text: "건조 후 처리(2차)" }, items: ["dryPrcsWhol", "dryPrcsLfvlm", "dryPrcsIncnrQnt", "dryPrcsFuelQnt", "dryPrcsPrdctRmtrlQnt", "dryPrcsFmlyrQnt", "dryPrcsCmpstgQnt", "dryPrcsFcltNm"] }, + "itslfTs1FuelQnt", + { name: "fuelGroup", header: { text: "탄화 후 처리(2차)" }, items: ["fuelPrcsWhol", "fuelPrcsIncnrQnt", "fuelPrcsFuelQnt", "fuelPrcsFcltNm"] }, + "itslfTs1CmpstgQnt", + { name: "cmpsGroup", header: { text: "퇴비화" }, items: ["cmpsPrcsFcltBzentyNm"] } + ] + }, + { name: "otsdGroup", header: { text: "외부(민간) 위탁 처리량(톤/년)" }, items: ["otsdCnsgnWhol", "otsdCnsgnRclmQnt", "otsdCnsgnIncnrQnt", "otsdCnsgnFuelPwplQnt", "otsdCnsgnPrdctRmtrlQnt", "otsdCnsgnFmlyrQnt", "otsdCnsgnCmpstgQnt", "otsdCnsgnFcltNm"] }, + "cparTs2Whol" + ] +}; \ No newline at end of file diff --git a/apps/st/src/entities/statistics/model/statistics-total/statistics-sludge-total-interface.ts b/apps/st/src/entities/statistics/model/statistics-total/statistics-sludge-total-interface.ts new file mode 100644 index 000000000..bae596f83 --- /dev/null +++ b/apps/st/src/entities/statistics/model/statistics-total/statistics-sludge-total-interface.ts @@ -0,0 +1,168 @@ +/** 11. 하수및분뇨찌꺼기 공통 검색 파라미터 DTO 규격 */ +export interface SludgeSummaryRequest { + ctpvNm?: string; + sggNm?: string; + statsYr?: string; + sewerBzmnCd?: string; + rowDataYn?: boolean; + summaryYn?: boolean; + summaryYearCnt?: number; +} + +/** [TAB1] 찌꺼기(슬러지) 처리시설 현황 데이터 행 항목 인터페이스 */ +export interface SludgeProcessingTotalItem { + statsYr: string; + ctpvNm: string; + sggNm: string | null; + admdstNm: string; + admdstCd: string; + rowType: string; + + // 기본 정보 + fcltNm: string; + + // 찌꺼기 발생량(톤/년, 탈수기준) + gnamWhol: number; + itslfQnt: number; + otsdInflwQnt: number; + + // 이송 및 함수율 + transfTmplntNm: string; + transfPrcsQnt: number; + srpFncRt: number; + wholSrpPrcsQnt: number; + + // 자체 찌꺼기 처리량 소계 및 매립 + itslfTs1Whol: number; + itslfTs1RclmQnt: number; + + // 소각 후 처리(2차) + itslfTs1IncnrQnt: number; + incnrPrcsWhol: number; + incnrPrcsLfvlm: number; + incnrPrcsPrdctRmtrlQnt: number; + incnrPrcsFmlyrQnt: number; + incnrPrcsFcltNm: string; + + // 고화 후 2차 + itslfTs1AltdQnt: number; + stbznPrcsWhol: number; + stbznPrcsLfvlm: number; + stbznPrcsFmlyrQnt: number; + stbznPrcsFcltNm: string; + + // 건조 후 2차 + itslfTs1DryQnt: number; + dryPrcsWhol: number; + dryPrcsLfvlm: number; + dryPrcsIncnrQnt: number; + dryPrcsFuelQnt: number; + dryPrcsPrdctRmtrlQnt: number; + dryPrcsFmlyrQnt: number; + dryPrcsCmpstgQnt: number; + dryPrcsFcltNm: string; + + // 탄화 후 2차 + itslfTs1FuelQnt: number; + fuelPrcsWhol: number; + fuelPrcsIncnrQnt: number; + fuelPrcsFuelQnt: number; + fuelPrcsFcltNm: string; + + // 퇴비화 + itslfTs1CmpstgQnt: number; + cmpsPrcsFcltBzentyNm: string; + + // 외부(민간) 위탁 처리량 + otsdCnsgnWhol: number; + otsdCnsgnRclmQnt: number; + otsdCnsgnIncnrQnt: number; + otsdCnsgnFuelPwplQnt: number; + otsdCnsgnPrdctRmtrlQnt: number; + otsdCnsgnFmlyrQnt: number; + otsdCnsgnCmpstgQnt: number; + otsdCnsgnFcltNm: string; + + // 수도권광역 위탁 처리량 + cparTs2Whol: number; +} + +/** TAB1 서버 단일 응답 랩퍼 규격 */ +export interface SludgeProcessingTab1Response { + status: string; + message?: string; + data: SludgeProcessingTotalItem[]; +} +// ============================================================================ +// [TAB2] 소화조 운영현황 명세 +// ============================================================================ +export interface DigestionTankOperStatusTotalItem { + statsYr: string; + ctpvNm: string; + sggNm: string; + admdstNm: string; + rowType: string; + fcltNm: string; + digesterYn: string; + dsgnCpct: number; + actlOperCpct: number; + inputQnt: number; + tsConc: number; + oprtngDays: number; + gnrtGasQnt: number; + gasTotal: number; + gasSale: number; + gasGen: number; + gasSelf: number; + gasEtc: number; + surplusGas: number; +} +export interface DigestionTankOperTab2Response { status: string; message?: string; data: DigestionTankOperStatusTotalItem[]; } + +export interface SewageSludgeOperStatusTotalItem { + statsYr: string; + ctpvNm: string; + sggNm: string; + admdstNm: string; + admdstCd: string; + rowType: string; + fcltNm: string; + prcsMthExpln: string; + fcltCpct: number; + anlPrcsQnt: number; + dayAvgOprtngHr: number; + anlOprtngDayCnt: number; + oprtngRt: number; +} + +export interface SewageSludgeOperTab3Response { + status: string; + message?: string; + data: SewageSludgeOperStatusTotalItem[]; +} + +export interface HumanWasteSludgeStatusTotalItem { + statsYr: string; + ctpvNm: string; + sggNm: string; + admdstNm: string; + admdstCd: string; + rowType: string; + fcltNm: string; + gnam: number; + wholDspsQnt: number; + rcycQnt: number; + olandLfvlm: number; + incnrQnt: number; + oceanInputQnt: number; + fuelQnt: number; + etcQnt: number; + nondspsQnt: number; + swtrmtFcltNm: string; +} + +export interface HumanWasteSludgeTab4Response { + status: string; + message?: string; + data: HumanWasteSludgeStatusTotalItem[]; +} \ No newline at end of file