feat: 05.펌프장 조회 기능 추가

This commit is contained in:
2026-02-20 14:02:27 +09:00
parent 842ec36c32
commit b6a75f6ee0
4 changed files with 343 additions and 71 deletions
@@ -1,26 +1,82 @@
import { useState } from "react";
import { DataGrid } from "@rsone/components";
import { useState, useMemo } from "react";
import DataGrid from "@/components/module/DataGrid";
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 { LoadingWithAnimation } from "@common/components";
import { useAlertStore } from "@/shared/lib";
import { PumpingStationInfoList } from "@/components/util/column/review/PumpingStationRvwColumn";
import { statisticsManagementApi } from "@/entities/statistics/api/statistics-management-service";
import type { SearchFormValues } from "@/components/type/SearchForm.type";
import { toGridRows } from "@/components/util/grid/gridFunction";
// 하수도 통계 관리 05.펌프장
// 하수도 통계 검토 05.중계펌프장
const PumpingStationRvw = () => {
const [rowData, setRowData] = useState<Record<string, string | number>[]>([]);
const { setMessage: alert } = useAlertStore((state) => state);
const [rowData, setRowData] = useState<any[]>([]);
const [isLoading, setIsLoading] = useState<boolean>(false);
const approveFunc = () => { console.log('approveFunc'); };
const saveFunc = () => { console.log('submit'); };
const reviewOpinionFunc = () => { console.log('reviewOpinionFunc'); };
const returnFunc = () => { console.log('returnFunc'); };
const columnInfo = useMemo(() => {
const { columns, columnLayout, fixedColumns, rowStartNum } = PumpingStationInfoList;
return {
columnLayout,
fixedColumns,
rowStartNum,
columns: columns.map((col) => ({
...col,
editable: false as const, // 검토 화면이므로 읽기 전용
styleName: col.styleName ?? ("rg-cell-readonly" as const),
})),
};
}, []);
const handleReset = () => {
setRowData([]);
};
const handleSearch = async (values: SearchFormValues) => {
if (values.sido === '' || values.sido === 'ALL') {
alert('시도를 선택해주세요.');
return;
}
try {
setIsLoading(true);
const response = await statisticsManagementApi.getMediationPumpStationList({
sido: values.sido,
gugun: values.gugun === 'ALL' ? '' : values.gugun,
bsnmCd: values.bsnmCd,
yr: values.year,
bscFctNm: values.fctName, // 시설명 검색
});
if (response.status === 'success' && response.data) {
setRowData(toGridRows(response.data));
} else {
setRowData([]);
alert(response.message || "데이터가 없습니다.");
}
} catch (error) {
console.error("중계펌프장 조회 중 에러 발생:", error);
alert('데이터 조회 중 오류가 발생했습니다.');
} finally {
setIsLoading(false);
}
};
const approveFunc = () => console.log('approveFunc');
const saveFunc = () => console.log('submit');
const reviewOpinionFunc = () => console.log('reviewOpinionFunc');
const returnFunc = () => console.log('returnFunc');
return (
<>
<SearchForm fctName={true} />
<div className="relative">
<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} />
@@ -29,8 +85,24 @@ const PumpingStationRvw = () => {
<SaveButton saveFunc={saveFunc} />
</div>
</div>
<DataGrid columnInfo={PumpingStationInfoList} isExcelImport={false} rowStartNum={3} fixedColumns={3} rowData={rowData} setRowData={setRowData} />
</>
{isLoading && (
<div className="absolute inset-0 z-50 [data-theme='black']:bg-transparent rounded-lg p-10 flex justify-center items-center">
<div className="relative size-[5rem]">
<LoadingWithAnimation color="primary" />
</div>
</div>
)}
<DataGrid
columnInfo={columnInfo}
isExcelImport={false}
fixedColumns={columnInfo.fixedColumns}
rowStartNum={columnInfo.rowStartNum}
rowData={rowData}
setRowData={setRowData}
/>
</div>
);
};
@@ -1,106 +1,198 @@
import { ValueType } from "realgrid";
import { footerIntArrayByDivision, footerDecimal3ArrayByDivision, footerAvgDecimalArrayByDivision } from "@/components/util/grid/footerSummary";
import type { GridView, DataColumn, ColumnFooter } from "@/components/type/DataGrid.type";
// 하수도 통계 관리 05.펌프장
export const rawPumpingStationInfoList = {
columns: [
/* 1. 행정구역 및 기본정보 */
{ name: 'sido', fieldName: '시도', header: { text: '시도' } },
{ name: 'sgg', fieldName: '구군', header: { text: '구군' } },
{ name: 'PUMP_NM', fieldName: '펌프장명', header: { text: '펌프장명' } },
{ name: 'GBN', fieldName: '구분', header: { text: '구분' } },
{ name: 'TRT_FCT_NM', fieldName: '처리장명', header: { text: '처리장명' } },
{ name: 'TYPE_GBN', fieldName: '구분(합류식분류식)', header: { text: '구분(합류식분류식)' } },
{ name: 'ADDR', fieldName: '위치', header: { text: '위치' } },
{ name: 'RN_DT', fieldName: '가동년월일 yyyy-mm-dd', header: { text: '가동년월일\nyyyy-mm-dd' } },
{ name: 'DSN_AR', fieldName: '계획배수면적(km2)', header: { text: '계획배수면적\n(km2)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.000' },
{
name: 'sido',
fieldName: 'sido',
header: { text: '시도' },
mergeCells: true,
editable: false,
sortdisable: true,
footer: [
{
valueCallback: (grid: GridView) => {
const divisionIndex = 0;
const dataSource = grid.getDataSource();
const rowCount = dataSource.getRowCount();
const uniqueValues = new Set<string>();
for (let i = 0; i < rowCount; i++) {
const val = dataSource.getValue(i, 'displayYear');
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 rowCount = dataSource.getRowCount();
const uniqueValues = new Set<string>();
for (let i = 0; i < rowCount; i++) {
const val = dataSource.getValue(i, 'displayYear');
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: 'pumpNm', fieldName: 'pumpNm', header: { text: '펌프장명' }, mergeCells: true, editable: false, sortdisable: true },
{
name: 'displayYear',
fieldName: 'displayYear',
header: { text: '구분' },
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, 'displayYear');
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, 'displayYear');
if (val) uniqueValues.add(String(val));
}
const divisionValues = Array.from(uniqueValues);
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + '합계' : '';
}
}
]
},
{ name: 'bscFctNm', fieldName: 'bscFctNm', header: { text: '처리장명' } },
{ name: 'pumpCls', fieldName: 'pumpCls', header: { text: '구분\n(합류/분류)' } },
{ name: 'addr', fieldName: 'addr', header: { text: '위치' }, styleName: 'rg-cell-left' },
{ name: 'rnDt', fieldName: 'rnDt', header: { text: '가동년월일\nyyyy-mm-dd' } },
{
name: 'planDrhgAr', fieldName: 'planDrhgAr', header: { text: '계획배수면적\n(km2)' },
footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.000'
},
/* 2. 계획배수량 (m3/hr) */
{ name: 'DSN_QTY_A', fieldName: '청천시(A)', header: { text: '청천시(A)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'DSN_QTY_B', fieldName: '우천시(B)', header: { text: '우천시(B)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'DSN_QTY_DIFF', fieldName: '우수량(B-A)', header: { text: '우수량(B-A)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'finewtDrngVl', fieldName: 'finewtDrngVl', header: { text: '청천시(A)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtDrngVl', fieldName: 'rainwtDrngVl', header: { text: '우천시(B)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'vlWtr', fieldName: 'vlWtr', header: { text: '우수량(B-A)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
/* 3. 총 양수량 (m3/min) */
{ name: 'TOT_PUMP_QTY_O', fieldName: '오수펌프 총양수량', header: { text: '오수펌프\n총양수량' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'TOT_PUMP_QTY_W', fieldName: '우수펌프 총양수량', header: { text: '우수펌프\n총양수량' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrTotCpcty', fieldName: 'pltwtrTotCpcty', header: { text: '오수펌프\n총양수량' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrTotCpcty', fieldName: 'rainwtrTotCpcty', header: { text: '우수펌프\n총양수량' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
/* 4. 오수펌프 상세 (1, 2, 3) */
{ name: 'PUMP_O1_D', fieldName: '구경(mm)_오수1', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O1_Q', fieldName: '양수량(m3/min)_오수1', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O1_C', fieldName: '펌프대수_오수1', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_O1_S', fieldName: '예비대수_오수1', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpCalbr1', fieldName: 'pltwtrPumpCalbr1', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCpcty1', fieldName: 'pltwtrPumpCpcty1', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCnt1', fieldName: 'pltwtrPumpCnt1', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpPreparCnt1', fieldName: 'pltwtrPumpPreparCnt1', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpCalbr2', fieldName: 'pltwtrPumpCalbr2', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCpcty2', fieldName: 'pltwtrPumpCpcty2', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCnt2', fieldName: 'pltwtrPumpCnt2', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpPreparCnt2', fieldName: 'pltwtrPumpPreparCnt2', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_O2_D', fieldName: '구경(mm)_오수2', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O2_Q', fieldName: '양수량(m3/min)_오수2', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O2_C', fieldName: '펌프대수_오수2', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_O2_S', fieldName: '예비대수_오수2', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_O3_D', fieldName: '구경(mm)_오수3', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O3_Q', fieldName: '양수량(m3/min)_오수3', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_O3_C', fieldName: '펌프대수_오수3', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_O3_S', fieldName: '예비대수_오수3', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpCalbr3', fieldName: 'pltwtrPumpCalbr3', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCpcty3', fieldName: 'pltwtrPumpCpcty3', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'pltwtrPumpCnt3', fieldName: 'pltwtrPumpCnt3', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'pltwtrPumpPreparCnt3', fieldName: 'pltwtrPumpPreparCnt3', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
/* 5. 우수펌프 상세 (1, 2, 3) */
{ name: 'PUMP_W1_D', fieldName: '구경(mm)_우수1', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W1_Q', fieldName: '양수량(m3/min)_우수1', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W1_C', fieldName: '펌프대수_우수1', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_W1_S', fieldName: '예비대수_우수1', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpCalbr1', fieldName: 'rainwtrPumpCalbr1', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCpcty1', fieldName: 'rainwtrPumpCpcty1', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCnt1', fieldName: 'rainwtrPumpCnt1', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpPreparCnt1', fieldName: 'rainwtrPumpPreparCnt1', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_W2_D', fieldName: '구경(mm)_우수2', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W2_Q', fieldName: '양수량(m3/min)_우수2', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W2_C', fieldName: '펌프대수_우수2', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_W2_S', fieldName: '예비대수_우수2', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpCalbr2', fieldName: 'rainwtrPumpCalbr2', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCpcty2', fieldName: 'rainwtrPumpCpcty2', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCnt2', fieldName: 'rainwtrPumpCnt2', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpPreparCnt2', fieldName: 'rainwtrPumpPreparCnt2', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_W3_D', fieldName: '구경(mm)_우수3', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W3_Q', fieldName: '양수량(m3/min)_우수3', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'PUMP_W3_C', fieldName: '펌프대수_우수3', header: { text: '펌프대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'PUMP_W3_S', fieldName: '예비대수_우수3', header: { text: '예비대수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpCalbr3', fieldName: 'rainwtrPumpCalbr3', header: { text: '구경(mm)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCpcty3', fieldName: 'rainwtrPumpCpcty3', header: { text: '양수량\n(m3/min)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rainwtrPumpCnt3', fieldName: 'rainwtrPumpCnt3', header: { text: '펌프대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
{ name: 'rainwtrPumpPreparCnt3', fieldName: 'rainwtrPumpPreparCnt3', header: { text: '예비대수' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
/* 6. 운영 정보 */
{ name: 'PWR_USAGE', fieldName: '연간전력사용량(kWh/년)', header: { text: '연간전력사용량\n(kWh/년)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
/* 6. 기타 및 운영 */
{ name: 'elcpwAmnt', fieldName: 'elcpwAmnt', header: { text: '연간전력사용량\n(kWh/년)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, numberFormat: '#,##0.0' },
{ name: 'rmk', fieldName: 'rmk', header: { text: '비고' } },
],
columnLayout: [
{ name: 'groupA', header: { text: '행정구역' }, items: ['sido', 'sgg'] },
'PUMP_NM', 'GBN', 'TRT_FCT_NM', 'TYPE_GBN', 'ADDR', 'RN_DT', 'DSN_AR',
{
name: 'groupA',
header: { text: '행정구역' },
items: [
{ column: 'sido', footerUserSpans: [{ colspan: 3 }, { colspan: 3 }] },
'gugun',
'pumpNm',
]
},
'displayYear',
'bscFctNm',
'pumpCls',
'addr',
'rnDt',
'planDrhgAr',
{
name: 'groupB',
header: { text: '계획시간대최대배수량(m3/hr)' },
items: ['DSN_QTY_A', 'DSN_QTY_B', 'DSN_QTY_DIFF'],
items: ['finewtDrngVl', 'rainwtDrngVl', 'vlWtr'],
},
{
name: 'groupC',
header: { text: '배수능력' },
items: [
'TOT_PUMP_QTY_O',
'pltwtrTotCpcty',
{
name: 'pumpO_Detail',
header: { text: '오수펌프 상세' },
items: [
{ name: 'O1', header: { text: '오수펌프(1)' }, items: ['PUMP_O1_D', 'PUMP_O1_Q', 'PUMP_O1_C', 'PUMP_O1_S'] },
{ name: 'O2', header: { text: '오수펌프(2)' }, items: ['PUMP_O2_D', 'PUMP_O2_Q', 'PUMP_O2_C', 'PUMP_O2_S'] },
{ name: 'O3', header: { text: '오수펌프(3)' }, items: ['PUMP_O3_D', 'PUMP_O3_Q', 'PUMP_O3_C', 'PUMP_O3_S'] }
{ name: 'O1', header: { text: '오수펌프(1)' }, items: ['pltwtrPumpCalbr1', 'pltwtrPumpCpcty1', 'pltwtrPumpCnt1', 'pltwtrPumpPreparCnt1'] },
{ name: 'O2', header: { text: '오수펌프(2)' }, items: ['pltwtrPumpCalbr2', 'pltwtrPumpCpcty2', 'pltwtrPumpCnt2', 'pltwtrPumpPreparCnt2'] },
{ name: 'O3', header: { text: '오수펌프(3)' }, items: ['pltwtrPumpCalbr3', 'pltwtrPumpCpcty3', 'pltwtrPumpCnt3', 'pltwtrPumpPreparCnt3'] }
]
},
'TOT_PUMP_QTY_W',
'rainwtrTotCpcty',
{
name: 'pumpW_Detail',
header: { text: '우수펌프 상세' },
items: [
{ name: 'W1', header: { text: '우수펌프(1)' }, items: ['PUMP_W1_D', 'PUMP_W1_Q', 'PUMP_W1_C', 'PUMP_W1_S'] },
{ name: 'W2', header: { text: '우수펌프(2)' }, items: ['PUMP_W2_D', 'PUMP_W2_Q', 'PUMP_W2_C', 'PUMP_W2_S'] },
{ name: 'W3', header: { text: '우수펌프(3)' }, items: ['PUMP_W3_D', 'PUMP_W3_Q', 'PUMP_W3_C', 'PUMP_W3_S'] }
{ name: 'W1', header: { text: '우수펌프(1)' }, items: ['rainwtrPumpCalbr1', 'rainwtrPumpCpcty1', 'rainwtrPumpCnt1', 'rainwtrPumpPreparCnt1'] },
{ name: 'W2', header: { text: '우수펌프(2)' }, items: ['rainwtrPumpCalbr2', 'rainwtrPumpCpcty2', 'rainwtrPumpCnt2', 'rainwtrPumpPreparCnt2'] },
{ name: 'W3', header: { text: '우수펌프(3)' }, items: ['rainwtrPumpCalbr3', 'rainwtrPumpCpcty3', 'rainwtrPumpCnt3', 'rainwtrPumpPreparCnt3'] }
]
}
],
},
'PWR_USAGE', 'RMK',
]
'elcpwAmnt',
'rmk',
],
fixedColumns: 2,
rowStartNum: 3
};
export const PumpingStationInfoList = {
...rawPumpingStationInfoList,
columns: rawPumpingStationInfoList.columns.map(col => ({
...col,
editable: false
editable: false,
styleName: col.styleName ?? "rg-cell-readonly"
}))
};
@@ -23,7 +23,9 @@ import {
type SewerReservoirRegionalApiResponse,
type PumpingStationRegionalApiResponse
} from "../model/sewage-reservoir-pump-review-interface";
import {
type MediationPumpStationApiResponse,
} from "../model/statistics-pumping-station-review-interface";
export class StatisticsManagementApiService {
@@ -217,6 +219,26 @@ public async getPumpStationList(
);
return response.data;
}
/**
* 05. 중계펌프장 통계관리 조회
* @param params (yr, bsnmCd, sido, gugun, bscFctNm)
*/
public async getMediationPumpStationList(
params: {
yr?: string; // 조회 연도
bsnmCd?: string; // 사업소 코드
sido?: string; // 시도
gugun?: string; // 구군
bscFctNm?: string; // 펌프장명 (시설명)
}
): Promise<MediationPumpStationApiResponse> {
const response = await axios.get<MediationPumpStationApiResponse>(
`${ENDPOINT.ST_SERVICE.REVIEW}/mediation-pump-stations`,
{ params }
);
return response.data;
}
}
// 통합 인스턴스 수출
@@ -0,0 +1,86 @@
import type { ApiResponse } from "./statistics-interface";
/**
* 중계펌프장 통계관리 아이템 인터페이스
*/
export interface MediationPumpStationItem {
// 기본 정보 및 행 제어
sido: string; // 시도
gugun: string; // 시군구
adstCd: string; // 행정코드
pumpNm: string; // 펌프장명
yr: string; // 연도
displayYear: string; // 구분 표시용 (2024년확정 등)
rowType: 'OLD' | 'CURR'; // 전년도/당해년도 구분
// 주요 제원
bscFctNm: string; // 처리장명
pumpCls: string; // 구분 (합류식/분류식)
addr: string; // 위치
rnDt: string; // 가동년월일
planDrhgAr: number; // 계획배수면적(㎢)
finewtDrngVl: number; // 계획시간대최대배수량 - 청천시(A)
rainwtDrngVl: number; // 계획시간대최대배수량 - 우천시(B)
vlWtr: number; // 계획시간대최대배수량 - 우수량(B-A)
// 오수펌프 상세 (PLTWTR)
pltwtrTotCpcty: number; // 오수 총양수량(㎥/min)
pltwtrPumpCalbr1: number; // 오수펌프1 구경(mm)
pltwtrPumpCpcty1: number; // 오수펌프1 양수량(㎥/min)
pltwtrPumpCnt1: number; // 오수펌프1 펌프대수
pltwtrPumpPreparCnt1: number; // 오수펌프1 예비대수
pltwtrPumpCalbr2: number; // 오수펌프2 구경(mm)
pltwtrPumpCpcty2: number; // 오수펌프2 양수량(㎥/min)
pltwtrPumpCnt2: number; // 오수펌프2 펌프대수
pltwtrPumpPreparCnt2: number; // 오수펌프2 예비대수
pltwtrPumpCalbr3: number; // 오수펌프3 구경(mm)
pltwtrPumpCpcty3: number; // 오수펌프3 양수량(㎥/min)
pltwtrPumpCnt3: number; // 오수펌프3 펌프대수
pltwtrPumpPreparCnt3: number; // 오수펌프3 예비대수
// 우수펌프 상세 (RAINWTR)
rainwtrTotCpcty: number; // 우수 총양수량(㎥/min)
rainwtrPumpCalbr1: number; // 우수펌프1 구경(mm)
rainwtrPumpCpcty1: number; // 우수펌프1 양수량(㎥/min)
rainwtrPumpCnt1: number; // 우수펌프1 펌프대수
rainwtrPumpPreparCnt1: number; // 우수펌프1 예비대수
rainwtrPumpCalbr2: number; // 우수펌프2 구경(mm)
rainwtrPumpCpcty2: number; // 우수펌프2 양수량(㎥/min)
rainwtrPumpCnt2: number; // 우수펌프2 펌프대수
rainwtrPumpPreparCnt2: number; // 우수펌프2 예비대수
rainwtrPumpCalbr3: number; // 우수펌프3 구경(mm)
rainwtrPumpCpcty3: number; // 우수펌프3 양수량(㎥/min)
rainwtrPumpCnt3: number; // 우수펌프3 펌프대수
rainwtrPumpPreparCnt3: number; // 우수펌프3 예비대수
// 기타
elcpwAmnt: number; // 연간전력사용량(kWh/년)
rmk: string; // 비고
lcnt: string; // 당해 존재 여부 ('1'|'0')
ocnt: string; // 전년 존재 여부 ('1'|'0')
}
export interface MediationPumpStationResponseData {
pumpStationList: MediationPumpStationItem[];
}
export type MediationPumpStationApiResponse = ApiResponse<MediationPumpStationItem[]> & {
message: string;
};
export interface MediationPumpStationService {
getMediationPumpStationList(params: {
yr?: string; // 조회 연도
bsnmCd?: string; // 사업소 코드
sido?: string; // 시도
gugun?: string; // 구군
bscFctNm?: string; // 펌프장명
}): Promise<MediationPumpStationApiResponse>;
}