feat: 02 하수관로 tab1 지역별 시설현황 조회 기능 추가

footer 추가 구현 필요
This commit is contained in:
2026-02-10 10:16:56 +09:00
parent 0b14d1c0b5
commit 0f7e8c1de3
4 changed files with 313 additions and 88 deletions
@@ -1,53 +1,87 @@
import { useState } from "react";
import { TabDataGrid } from "@rsone/components";
import { useState, useMemo } from "react";
// import { TabDataGrid } from "@rsone/components";
import TabDataGrid from "@/components/module/TabDataGrid";
import SearchForm from "@/components/module/SearchForm";
import SaveButton from "@/components/button/SaveButton";
import ApproveButton from "@/components/button/ApproveButton";
import ReviewOpinionButton from "@/components/button/ReviewOpinionButton";
import ReturnButton from "@/components/button/ReturnButton";
import { useAlertStore } from "@/shared/lib";
import { sewagePipeReviewApi } from "@/entities/statistics/api/statistics-sewage-pipe-review-service";
import { SewagePipeColumnInfoListRvw } from "@/components/util/column/review/SewagePipeRvwColumn";
import type { SearchFormValues } from "@/components/type/SearchForm.type";
import { toGridRows } from "@/components/util/grid/gridFunction";
// 하수도 통계 관리 02. 하수관로
const SewagePipeRvw = () => {
const [rowDataMap, setRowDataMap] = useState<Map<string, Record<string, string | number>[]>>(new Map());
const { setMessage: alert } = useAlertStore((state) => state);
const [rowDataMap, setRowDataMap] = useState<Map<string, any[]>>(new Map());
const [isLoading, setIsLoading] = useState<boolean>(false);
const approveFunc = () => {
console.log('approveFunc');
// 승인 로직
};
const columnInfo = useMemo(() => {
return SewagePipeColumnInfoListRvw.map((tab: any) => ({
...tab,
columns: tab.columns.map((col: any) => ({
...col,
editable: false as const,
styleName: col.styleName ?? ("rg-cell-readonly" as const),
})),
}));
}, []);
const saveFunc = () => {
console.log('submit');
// 저장 로직
};
const handleReset = () => setRowDataMap(new Map());
const reviewOpinionFunc = () => {
console.log('reviewOpinionFunc');
// 검토의견 작성
};
const handleSearch = async (values: SearchFormValues) => {
try {
setIsLoading(true);
const response = await sewagePipeReviewApi.getSewagePipeReviewList({
sido: values.sido,
gugun: values.gugun === 'ALL' ? '' : values.gugun,
bsnmCd: values.bsnmCd,
yr: values.year,
});
const returnFunc = () => {
console.log('returnFunc');
// 반려
};
if (response.status === 'success' && response.data) {
const rawList = response.data;
console.log("추출된 리스트 (rawList):", rawList);
const newRowDataMap = new Map<string, any[]>();
newRowDataMap.set('a', toGridRows(rawList));
setRowDataMap(newRowDataMap);
} else {
handleReset();
alert(response.message || "데이터가 없습니다.");
}
} catch (error) {
console.error("조회 에러:", error);
} finally {
setIsLoading(false);
}
};
return (
<>
<SearchForm fctName={true} />
<SearchForm onSubmit={handleSearch} onReset={handleReset} fctName={true} />
<div className="card !py-0">
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
<ReviewOpinionButton reviewOpinionFunc={reviewOpinionFunc} />
<ApproveButton approveFunc={approveFunc} />
<ReturnButton returnFunc={returnFunc} />
<SaveButton saveFunc={saveFunc} />
<ReviewOpinionButton reviewOpinionFunc={() => {}} />
<ApproveButton approveFunc={() => {}} />
<ReturnButton returnFunc={() => {}} />
<SaveButton saveFunc={() => {}} />
</div>
</div>
<TabDataGrid columnInfo={SewagePipeColumnInfoListRvw} isExcelImport={true} rowDataMap={rowDataMap} setRowDataMap={setRowDataMap} />
<TabDataGrid
columnInfo={columnInfo}
isExcelImport={true}
rowDataMap={rowDataMap}
setRowDataMap={setRowDataMap}
/>
</>
);
};
export default SewagePipeRvw;
@@ -1,5 +1,7 @@
import { ValueType } from "realgrid";
const baseYear = new Date().getFullYear();
import { footerIntArrayByDivision, footerDecimal3ArrayByDivision, footerAvgDecimalArrayByDivision } from "@/components/util/grid/footerSummary";
import type { GridView, DataColumn, ColumnFooter } from "@/components/type/DataGrid.type";
// 하수도 통계 관리 02. 하수관로
const rawList = [
@@ -9,87 +11,158 @@ const rawList = [
rowStartNum: 4,
fixedColumns: 2,
columns: [
/* 기본 정보 */
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' }, mergeCells: true },
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' }, mergeCells: true },
{ name: '구분', fieldName: '구분', header: { text: '구분' }, editable: false, sortdisable: true },
{
name: 'sido',
fieldName: 'sido',
header: { text: '시도' },
mergeCells: true,
editable: false,
sortdisable: true,
footer: [
{
valueCallback: (grid: GridView) => {
const divisionIndex = 0;
const dataSource = grid.getDataSource();
const uniqueValues = new Set<string>();
for (let i = 0; i < dataSource.getRowCount(); i++) {
const val = dataSource.getValue(i, 'rgnNm');
if (val) uniqueValues.add(String(val));
}
const divisionValues = Array.from(uniqueValues);
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + '합계' : '합계';
}
},
{
valueCallback: (grid: GridView) => {
const divisionIndex = 1;
const dataSource = grid.getDataSource();
const uniqueValues = new Set<string>();
for (let i = 0; i < dataSource.getRowCount(); i++) {
const val = dataSource.getValue(i, 'rgnNm');
if (val) uniqueValues.add(String(val));
}
const divisionValues = Array.from(uniqueValues);
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + '합계' : '합계';
}
}
]
},
{ name: 'gugun', fieldName: 'gugun', header: { text: '시군구' }, mergeCells: true, editable: false, sortdisable: true },
{
name: 'rgnNm',
fieldName: 'rgnNm',
header: { text: '구분' },
editable: false,
sortdisable: true,
footer: [
{
valueCallback: (grid: GridView) => {
const dataSource = grid.getDataSource();
const uniqueValues = new Set<string>();
for (let i = 0; i < dataSource.getRowCount(); i++) {
// 푸터 계산 시에도 displayYr 필드를 참조
const val = dataSource.getValue(i, 'displayYr');
if (val) uniqueValues.add(String(val));
}
const divisionValues = Array.from(uniqueValues);
return divisionValues.length > 0 ? divisionValues[0] + '합계' : '';
}
},
{
valueCallback: (grid: GridView) => {
const dataSource = grid.getDataSource();
const uniqueValues = new Set<string>();
for (let i = 0; i < dataSource.getRowCount(); i++) {
const val = dataSource.getValue(i, 'displayYr');
if (val) uniqueValues.add(String(val));
}
const divisionValues = Array.from(uniqueValues);
return divisionValues.length > 1 ? divisionValues[1] + '합계' : '';
}
}
]
},
/* 하수정비 기본계획 */
{ name: 'TARGET_YR', fieldName: '하수정보기본계획목표년도', header: { text: '하수정보기본계획목표년도' } },
{ name: 'PIPL_IMPRMN_PLAN_EXTN', fieldName: '총관로정비 계획연장(m)', header: { text: '총관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PIPL_PLAN_EXTN', fieldName: '총계획연장(m)', header: { text: '총계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PIPL_FCLTY_EXTN', fieldName: '총시설연장(m)', header: { text: '총시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PIPL_SUPPRT', fieldName: '하수관로 보급률(%)', header: { text: '하수관로\n보급률(%)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'targetYr', fieldName: 'targetYr', header: { text: '하수정보기본계획목표년도' } },
{ name: 'piplImprmnPlanExtn', fieldName: 'piplImprmnPlanExtn', header: { text: '총관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'piplPlanExtn', fieldName: 'piplPlanExtn', header: { text: '총계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'piplFcltyExtn', fieldName: 'piplFcltyExtn', header: { text: '총시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'piplSupprt', fieldName: 'piplSupprt', header: { text: '하수관로\n보급률(%)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
/* 합류식(m) */
{ name: 'CMBN_PLAN_AR', fieldName: '관로정비 계획면적(㎢)_합류', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'CMBN_IMPRMN_PLAN_EXTN', fieldName: '관로정비 계획연장(m)_합류', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_PLAN_EXTN', fieldName: '계획연장(m)_합류', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_FCLTY_EXTN', fieldName: '시설연장(m)_합류', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_RCTGL_EXTN', fieldName: '사각형(m)_합류', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_CICLE_EXTN', fieldName: '원형(m)_합류', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_OPSWR_EXTN', fieldName: '개거(m)_합류', header: { text: '개거(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'CMBN_SDGTTR_EXTN', fieldName: '측구(m)_합류', header: { text: '측구(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnPlanAr', fieldName: 'cmbnPlanAr', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'cmbnImprmnPlanExtn', fieldName: 'cmbnImprmnPlanExtn', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnPlanExtn', fieldName: 'cmbnPlanExtn', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnFcltyExtn', fieldName: 'cmbnFcltyExtn', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnRctglExtn', fieldName: 'cmbnRctglExtn', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnCicleExtn', fieldName: 'cmbnCicleExtn', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnOpswrExtn', fieldName: 'cmbnOpswrExtn', header: { text: '개거(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'cmbnSdgttrExtn', fieldName: 'cmbnSdgttrExtn', header: { text: '측구(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
/* 분류식 - 오수관로 */
{ name: 'PLTWTR_PLAN_AR', fieldName: '관로정비 계획면적(㎢)_오수', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'PLTWTR_IMPRMN_PLAN_EXTN', fieldName: '관로정비 계획연장(m)_오수', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PLTWTR_PLAN_EXTN', fieldName: '계획연장(m)_오수', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PLTWTR_FLCTY_EXTN', fieldName: '시설연장(m)_오수', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PLTWTR_SQRE_EXTN', fieldName: '사각형(m)_오수', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'PLTWTR_CICL_EXTN', fieldName: '원형(m)_오수', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'pltwtrPlanAr', fieldName: 'pltwtrPlanAr', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'pltwtrImprmnPlanExtn', fieldName: 'pltwtrImprmnPlanExtn', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'pltwtrPlanExtn', fieldName: 'pltwtrPlanExtn', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'pltwtrFlctyExtn', fieldName: 'pltwtrFlctyExtn', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'pltwtrSqreExtn', fieldName: 'pltwtrSqreExtn', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'pltwtrCiclExtn', fieldName: 'pltwtrCiclExtn', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
/* 분류식 - 우수관로 */
{ name: 'RAINWTR_PLAN_AR', fieldName: '관로정비 계획면적(㎢)_우수', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'RAINWTR_IMPRMN_PLAN_EXTN', fieldName: '관로정비 계획연장(m)_우수', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_PLAN_EXTN', fieldName: '계획연장(m)_우수', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_FLCTY_EXTN', fieldName: '시설연장(m)_우수', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_SQRE_EXTN', fieldName: '사각형(m)_우수', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_CICL_EXTN', fieldName: '원형(m)_우수', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_OPSWR_EXTN', fieldName: '개거(m)_우수', header: { text: '개거(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'RAINWTR_SDGTTR_EXTN', fieldName: '측구(m)_우수', header: { text: '측구(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrPlanAr', fieldName: 'rainwtrPlanAr', header: { text: '관로정비\n계획면적(㎢)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{ name: 'rainwtrImprmnPlanExtn', fieldName: 'rainwtrImprmnPlanExtn', header: { text: '관로정비\n계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrPlanExtn', fieldName: 'rainwtrPlanExtn', header: { text: '계획연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrFlctyExtn', fieldName: 'rainwtrFlctyExtn', header: { text: '시설연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrSqreExtn', fieldName: 'rainwtrSqreExtn', header: { text: '사각형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrCiclExtn', fieldName: 'rainwtrCiclExtn', header: { text: '원형(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrOpswrExtn', fieldName: 'rainwtrOpswrExtn', header: { text: '개거(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
{ name: 'rainwtrSdgttrExtn', fieldName: 'rainwtrSdgttrExtn', header: { text: '측구(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.00' },
/* 부속시설 */
{ name: 'MNHLE_SITE', fieldName: '합류식맨홀(개소)', header: { text: '합류식맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PLTWTR_MNHLE_SITE', fieldName: '오수맨홀(개소)', header: { text: '오수맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'RAINWTR_MNHLE_SITE', fieldName: '우수맨홀(개소)', header: { text: '우수맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PLTWTR_RCVR_SITE', fieldName: '오수받이(개소)', header: { text: '오수받이(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'RAINWTR_RCVR_SITE', fieldName: '빗물받이(개소)', header: { text: '빗물받이(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'SOILSPLL_SITE', fieldName: '우수토실(개소)', header: { text: '우수토실(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'SOILHOLE_SITE', fieldName: '우수토구(개소)', header: { text: '우수토구(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'mnhleSite', fieldName: 'mnhleSite', header: { text: '합류식맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrMnhleSite', fieldName: 'pltwtrMnhleSite', header: { text: '오수맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrMnhleSite', fieldName: 'rainwtrMnhleSite', header: { text: '우수맨홀(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrRcvrSite', fieldName: 'pltwtrRcvrSite', header: { text: '오수받이(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrRcvrSite', fieldName: 'rainwtrRcvrSite', header: { text: '빗물받이(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'soilspllSite', fieldName: 'soilspllSite', header: { text: '우수토실(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'soilholeSite', fieldName: 'soilholeSite', header: { text: '우수토구(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
/* 대장 및 기타 */
{ name: 'SEWER_REGSTR_CMPT_EXTN', fieldName: '하수도대장전산화연장(m)', header: { text: '하수도대장전산화연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'SEWER_REGSTR_CMPT_RT', fieldName: '하수도대장전산화율(%)', header: { text: '하수도대장전산화율(%)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
{ name: 'sewerRegstrCmptExtn', fieldName: 'sewerRegstrCmptExtn', header: { text: '하수도대장전산화연장(m)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'sewerRegstrCmptRt', fieldName: 'sewerRegstrCmptRt', header: { text: '하수도대장전산화율(%)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rmk', fieldName: 'rmk', header: { text: '비고' } },
],
columnLayout: [
{ name: 'areaGroup', header: { text: '행정구역' }, items: ['SIDO', 'GUGUN'] },
'구분',
'TARGET_YR', 'PIPL_IMPRMN_PLAN_EXTN', 'PIPL_PLAN_EXTN', 'PIPL_FCLTY_EXTN', 'PIPL_SUPPRT',
{ name: 'areaGroup', header: { text: '행정구역' }, items: ['sido', 'gugun'] },
'rgnNm',
'targetYr', 'piplImprmnPlanExtn', 'piplPlanExtn', 'piplFcltyExtn', 'piplSupprt',
{
name: 'combinedGroup', header: { text: '합류식(m)' },
items: [ 'CMBN_PLAN_AR', 'CMBN_IMPRMN_PLAN_EXTN', 'CMBN_PLAN_EXTN', 'CMBN_FCLTY_EXTN',
{ name: 'cmbnAmGroup', header: { text: '암거' }, items: ['CMBN_RCTGL_EXTN', 'CMBN_CICLE_EXTN'] },
'CMBN_OPSWR_EXTN', 'CMBN_SDGTTR_EXTN'
items: ['cmbnPlanAr', 'cmbnImprmnPlanExtn', 'cmbnPlanExtn', 'cmbnFcltyExtn',
{ name: 'cmbnAmGroup', header: { text: '암거' }, items: ['cmbnRctglExtn', 'cmbnCicleExtn'] },
'cmbnOpswrExtn', 'cmbnSdgttrExtn'
],
},
{
name: 'sepGroup', header: { text: '분류식(m)' },
items: [
{ name: 'foulPipeGroup', header: { text: '오수관로' },
items: ['PLTWTR_PLAN_AR', 'PLTWTR_IMPRMN_PLAN_EXTN', 'PLTWTR_PLAN_EXTN', 'PLTWTR_FLCTY_EXTN',
{ name: 'foulAmGroup', header: { text: '암거' }, items: ['PLTWTR_SQRE_EXTN', 'PLTWTR_CICL_EXTN'] }]
{
name: 'foulPipeGroup', header: { text: '오수관로' },
items: ['pltwtrPlanAr', 'pltwtrImprmnPlanExtn', 'pltwtrPlanExtn', 'pltwtrFlctyExtn',
{ name: 'foulAmGroup', header: { text: '암거' }, items: ['pltwtrSqreExtn', 'pltwtrCiclExtn'] }]
},
{ name: 'rainPipeGroup', header: { text: '우수관로' },
items: ['RAINWTR_PLAN_AR', 'RAINWTR_IMPRMN_PLAN_EXTN', 'RAINWTR_PLAN_EXTN', 'RAINWTR_FLCTY_EXTN',
{ name: 'rainAmGroup', header: { text: '암거' }, items: ['RAINWTR_SQRE_EXTN', 'RAINWTR_CICL_EXTN'] },
'RAINWTR_OPSWR_EXTN', 'RAINWTR_SDGTTR_EXTN']
{
name: 'rainPipeGroup', header: { text: '우수관로' },
items: ['rainwtrPlanAr', 'rainwtrImprmnPlanExtn', 'rainwtrPlanExtn', 'rainwtrFlctyExtn',
{ name: 'rainAmGroup', header: { text: '암거' }, items: ['rainwtrSqreExtn', 'rainwtrCiclExtn'] },
'rainwtrOpswrExtn', 'rainwtrSdgttrExtn']
}
],
},
'MNHLE_SITE',
{ name: 'fcltyGroup', header: { text: '부속시설(개소)' }, items: ['PLTWTR_MNHLE_SITE', 'RAINWTR_MNHLE_SITE'] },
'PLTWTR_RCVR_SITE', 'RAINWTR_RCVR_SITE', 'SOILSPLL_SITE', 'SOILHOLE_SITE', 'SEWER_REGSTR_CMPT_EXTN', 'SEWER_REGSTR_CMPT_RT', 'RMK'
'mnhleSite',
{ name: 'fcltyGroup', header: { text: '부속시설(개소)' }, items: ['pltwtrMnhleSite', 'rainwtrMnhleSite'] },
'pltwtrRcvrSite', 'rainwtrRcvrSite', 'soilspllSite', 'soilholeSite', 'sewerRegstrCmptExtn', 'sewerRegstrCmptRt', 'rmk'
]
},
{
@@ -141,7 +214,7 @@ const rawList = [
'SEP_RATE',
{
name: 'drainGroup', header: { text: '배수설비(개소)' },
items: [ 'DRNG_EQP_SM', 'CMBN_DRNG_EQP', { name: 'sepDrainGroup', header: { text: '분류식' }, items: ['SPRT_DRNG_EQP_SM', 'SPRT_DRNG_EQP_CNNC', 'SPRT_DRNG_EQP_DCNNC'] } ],
items: ['DRNG_EQP_SM', 'CMBN_DRNG_EQP', { name: 'sepDrainGroup', header: { text: '분류식' }, items: ['SPRT_DRNG_EQP_SM', 'SPRT_DRNG_EQP_CNNC', 'SPRT_DRNG_EQP_DCNNC'] }],
},
{
name: 'pipeGroup', header: { text: '하수관로' },
@@ -157,7 +230,7 @@ const rawList = [
},
{
name: 'branchGroup', header: { text: '지선(m)' },
items: [ 'BRNCHLN_SM', 'CMBN_BRNCHLN_EXTN', { name: 'sepBranchGroup', header: { text: '분류식' }, items: ['RAINWTR_BRNCHLN_EXTN', 'PLTWTR_BRNCHLN_EXTN'] } ]
items: ['BRNCHLN_SM', 'CMBN_BRNCHLN_EXTN', { name: 'sepBranchGroup', header: { text: '분류식' }, items: ['RAINWTR_BRNCHLN_EXTN', 'PLTWTR_BRNCHLN_EXTN'] }]
}
],
},
@@ -238,6 +311,6 @@ export const SewagePipeColumnInfoListRvw = rawList.map(tab => ({
...tab,
columns: tab.columns.map(col => ({
...col,
editable: false
editable: false
}))
}));
@@ -0,0 +1,34 @@
import axios from "axios";
import { ENDPOINT } from "@/shared/config";
import {
type SewagePipeReviewService,
type SewagePipeReviewApiResponse,
} from "../model/statistics-sewage-pipe-review-interface";
export class SewagePipeReviewApiService implements SewagePipeReviewService {
/**
* 02. 하수관로 지역별 시설현황 목록 조회 (Tab1)
* @param params (sido, gugun, yr, bsnmCd)
*/
public async getSewagePipeReviewList(
params: {
yr?: string;
bsnmCd?: string;
sido?: string;
gugun?: string;
}
): Promise<SewagePipeReviewApiResponse> {
const response = await axios.get<SewagePipeReviewApiResponse>(
`${ENDPOINT.ST_SERVICE.REVIEW}/pipe/tab1`,
{
params: params
}
);
return response.data;
}
}
export const sewagePipeReviewApi = new SewagePipeReviewApiService();
@@ -0,0 +1,84 @@
import type { ApiResponse } from "./statistics-interface";
/**
* 02. 하수관로 지역별 시설현황 아이템 인터페이스 (Tab1)
*/
export interface SewagePipeReviewItem {
// 기본 정보 및 행 제어
sido: string; // 시도
gugun: string; // 시군구
rgnNm: string; // 구분 (연도합계 표시용)
adstDong: string; // 행정구역명
adstCd: string; // 행정코드
yr: string; // 연도
rowType: 'OLD' | 'CURR'; // 전년도/당해년도 구분
displayYr: string; // 구분 표시용 (2024년확정 등)
// 하수정비 기본계획
targetYr: number; // 하수정보기본계획목표년도
piplImprmnPlanExtn: number; // 총관로정비 계획연장(m)
piplPlanExtn: number; // 총계획연장(m)
piplFcltyExtn: number; // 총시설연장(m)
piplSupprt: number; // 하수관로 보급률(%)
// 합류식 (CMBN)
cmbnPlanAr: number; // 관로정비 계획면적(㎢)
cmbnImprmnPlanExtn: number; // 관로정비 계획연장(m)
cmbnPlanExtn: number; // 계획연장(m)
cmbnFcltyExtn: number; // 시설연장(m)
cmbnRctglExtn: number; // 사각형(m)
cmbnCicleExtn: number; // 원형(m)
cmbnOpswrExtn: number; // 개거(m)
cmbnSdgttrExtn: number; // 측구(m)
// 분류식 - 오수관로 (PLTWTR)
pltwtrPlanAr: number; // 관로정비 계획면적(㎢)
pltwtrImprmnPlanExtn: number; // 관로정비 계획연장(m)
pltwtrPlanExtn: number; // 계획연장(m)
pltwtrFlctyExtn: number; // 시설연장(m)
pltwtrSqreExtn: number; // 사각형(m)
pltwtrCiclExtn: number; // 원형(m)
// 분류식 - 우수관로 (RAINWTR)
rainwtrPlanAr: number; // 관로정비 계획면적(㎢)
rainwtrImprmnPlanExtn: number; // 관로정비 계획연장(m)
rainwtrPlanExtn: number; // 계획연장(m)
rainwtrFlctyExtn: number; // 시설연장(m)
rainwtrSqreExtn: number; // 사각형(m)
rainwtrCiclExtn: number; // 원형(m)
rainwtrOpswrExtn: number; // 개거(m)
rainwtrSdgttrExtn: number; // 측구(m)
// 부속시설 (개소)
mnhleSite: number; // 합류식맨홀
pltwtrMnhleSite: number; // 오수맨홀
rainwtrMnhleSite: number; // 우수맨홀
pltwtrRcvrSite: number; // 오수받이
rainwtrRcvrSite: number; // 빗물받이
soilspllSite: number; // 우수토실
soilholeSite: number; // 우수토구
// 대장 및 기타
sewerRegstrCmptExtn: number; // 하수도대장 전산화연장(m)
sewerRegstrCmptRt: number; // 하수도대장 전산화율(%)
rmk: string; // 비고
}
export interface SewagePipeReviewResponseData {
sewagePipeList: SewagePipeReviewItem[];
}
export type SewagePipeReviewApiResponse = ApiResponse<SewagePipeReviewItem[]> & {
message: string;
};
export interface SewagePipeReviewService {
getSewagePipeReviewList(params: {
yr?: string; // 조회 연도
bsnmCd?: string; // 사업장 코드
sido?: string; // 시도
gugun?: string; // 구군
}): Promise<SewagePipeReviewApiResponse>;
}