Merge remote-tracking branch 'origin/feature/review-skeleton-sein' into iipbs/st/dev
This commit is contained in:
@@ -1,42 +1,76 @@
|
||||
import { useState } from "react";
|
||||
|
||||
// import { DataGrid } from "@rsone/components";
|
||||
import DataGrid from "@/components/module/DataGrid";
|
||||
import { DataGrid } from "@rsone/components";
|
||||
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 { sewerageSupplyRateReviewApi } from "@/entities/statistics/api/statistics-management-service";
|
||||
|
||||
|
||||
import type { SewerageSupplyRateReviewItem } from "@/entities/statistics/model/statistics-management-interface";
|
||||
import { SeweragePenetrationRateInfoList } from "@/components/util/column/review/SeweragePenetrationRateRvwColumn";
|
||||
import type { SearchFormValues } from "@/components/type/SearchForm.type";
|
||||
|
||||
// 하수도 통계 관리 01. 하수도 보급률
|
||||
// 하수도 통계 검토 01. 하수도 보급률
|
||||
const SeweragePenetrationRateRvw = () => {
|
||||
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 handleReset = () => {
|
||||
setRowData([]);
|
||||
};
|
||||
|
||||
const saveFunc = () => {
|
||||
console.log('submit');
|
||||
// 저장 로직
|
||||
const handleSearch = async (values: SearchFormValues) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
|
||||
const response = await sewerageSupplyRateReviewApi.getSewerageSupplyRateReviewList({
|
||||
sido: "경기도",
|
||||
gugun: "과천시",
|
||||
yr: 2024,
|
||||
bsnmCd: "4129000000"
|
||||
});
|
||||
|
||||
console.log("네트워크 응답 전체:", response);
|
||||
|
||||
if (response.status === 'success' && response.data) {
|
||||
const rawList = response.data.sewerageSupplyRateList;
|
||||
|
||||
console.log("받아온 리스트:", rawList);
|
||||
|
||||
|
||||
const convertedData: SewerageSupplyRateReviewItem[] = rawList.map((item) => ({
|
||||
...item,
|
||||
|
||||
speclCntrplnAr: !item.speclCntrplnAr ? '해당없음' : item.speclCntrplnAr,
|
||||
}));
|
||||
|
||||
setRowData(convertedData);
|
||||
|
||||
} else {
|
||||
setRowData([]);
|
||||
alert(response.message || "데이터가 없습니다.");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("조회 중 에러 발생:", error);
|
||||
alert('데이터 조회 중 오류가 발생했습니다.');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
const reviewOpinionFunc = () => {
|
||||
console.log('reviewOpinionFunc');
|
||||
// 검토의견 작성
|
||||
};
|
||||
|
||||
const returnFunc = () => {
|
||||
console.log('returnFunc');
|
||||
// 반려
|
||||
};
|
||||
const approveFunc = () => console.log('approveFunc');
|
||||
const saveFunc = () => console.log('submit');
|
||||
const reviewOpinionFunc = () => console.log('reviewOpinionFunc');
|
||||
const returnFunc = () => console.log('returnFunc');
|
||||
|
||||
return (
|
||||
<>
|
||||
<SearchForm />
|
||||
<SearchForm onSubmit={handleSearch} onReset={handleReset} />
|
||||
<div className="card !py-0">
|
||||
<div className="flex justify-end items-center gap-[0.6rem] m-[0.6rem]">
|
||||
<ReviewOpinionButton reviewOpinionFunc={reviewOpinionFunc} />
|
||||
@@ -51,7 +85,7 @@ const SeweragePenetrationRateRvw = () => {
|
||||
fixedColumns={SeweragePenetrationRateInfoList.fixedColumns}
|
||||
rowStartNum={SeweragePenetrationRateInfoList.rowStartNum}
|
||||
rowData={rowData}
|
||||
setRowData={setRowData}
|
||||
setRowData={setRowData}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -8,17 +8,12 @@ const rawExcretaRelatedList = [
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
columns: [
|
||||
/* 1. 행정 및 조직 정보 */
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' } },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' } },
|
||||
{ name: 'OCGNZ', fieldName: '직제', header: { text: '직제' } },
|
||||
{ name: 'YR_GBN', fieldName: '구분', header: { text: '구분' } },
|
||||
|
||||
/* 2. 인력 총계 및 행정직 */
|
||||
{ name: 'TOT_WTR_QRM', fieldName: '직원총수', header: { text: '직원총수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ADMINIST_JSSFC', fieldName: '행정직', header: { text: '행정직' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 3. 기술직 상세 (단위: 명) */
|
||||
{ name: 'TCHNLGY_JSSFC_SM', fieldName: '계(기술직)', header: { text: '계' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ENGRK_JSSFC', fieldName: '토목', header: { text: '토목' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'MCHN_JSSFC', fieldName: '기계', header: { text: '기계' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
@@ -26,26 +21,18 @@ const rawExcretaRelatedList = [
|
||||
{ name: 'CHMSTRY_JSSFC', fieldName: '화공', header: { text: '화공' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ENVRN_JSSFC', fieldName: '환경', header: { text: '환경' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'TCHNLGY_ETC', fieldName: '기타(기술직)', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 4. 기타 및 비고 */
|
||||
{ name: 'ETC', fieldName: '기타', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['시도', '시군구'] },
|
||||
'직제',
|
||||
'구분',
|
||||
'직원총수',
|
||||
'행정직',
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['SIDO', 'GUGUN'] },
|
||||
'OCGNZ', 'YR_GBN', 'TOT_WTR_QRM', 'ADMINIST_JSSFC',
|
||||
{
|
||||
name: 'techJobGroup',
|
||||
header: { text: '기술직' },
|
||||
items: [
|
||||
'계(기술직)', '토목', '기계', '전기', '화공', '환경', '기타(기술직)'
|
||||
]
|
||||
items: ['TCHNLGY_JSSFC_SM', 'ENGRK_JSSFC', 'MCHN_JSSFC', 'ELCTY_JSSFC', 'CHMSTRY_JSSFC', 'ENVRN_JSSFC', 'TCHNLGY_ETC']
|
||||
},
|
||||
'기타',
|
||||
'비고',
|
||||
'ETC', 'RMK'
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -54,17 +41,12 @@ const rawExcretaRelatedList = [
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 1,
|
||||
columns: [
|
||||
/* 1. 행정 및 조직 정보 */
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' } },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' } },
|
||||
{ name: 'OCGNZ', fieldName: '직제', header: { text: '직제' } },
|
||||
{ name: 'YR_GBN', fieldName: '구분', header: { text: '구분' } },
|
||||
|
||||
/* 2. 인력 총계 및 행정직 */
|
||||
{ name: 'TOT_WTR_QRM', fieldName: '직원총수', header: { text: '직원총수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ADMINIST_JSSFC', fieldName: '행정직', header: { text: '행정직' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 3. 기술직 상세 (단위: 명) */
|
||||
{ name: 'TCHNLGY_JSSFC_SM', fieldName: '계(기술직)', header: { text: '계' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ENGRK_JSSFC', fieldName: '토목', header: { text: '토목' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'MCHN_JSSFC', fieldName: '기계', header: { text: '기계' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
@@ -72,22 +54,18 @@ const rawExcretaRelatedList = [
|
||||
{ name: 'CHMSTRY_JSSFC', fieldName: '화공', header: { text: '화공' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ENVRN_JSSFC', fieldName: '환경', header: { text: '환경' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'TCHNLGY_ETC', fieldName: '기타(기술직)', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 4. 기타 및 비고 */
|
||||
{ name: 'ETC', fieldName: '기타', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['시도', '시군구'] },
|
||||
'직제', '구분', '직원총수', '행정직',
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['SIDO', 'GUGUN'] },
|
||||
'OCGNZ', 'YR_GBN', 'TOT_WTR_QRM', 'ADMINIST_JSSFC',
|
||||
{
|
||||
name: 'techJobGroup',
|
||||
header: { text: '기술직' },
|
||||
items: [
|
||||
'계(기술직)', '토목', '기계', '전기', '화공', '환경', '기타(기술직)'
|
||||
]
|
||||
items: ['TCHNLGY_JSSFC_SM', 'ENGRK_JSSFC', 'MCHN_JSSFC', 'ELCTY_JSSFC', 'CHMSTRY_JSSFC', 'ENVRN_JSSFC', 'TCHNLGY_ETC']
|
||||
},
|
||||
'기타', '비고',
|
||||
'ETC', 'RMK'
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -96,35 +74,28 @@ const rawExcretaRelatedList = [
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
columns: [
|
||||
/* 1. 행정 및 기본 정보 */
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' } },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' } },
|
||||
{ name: 'YR_GBN', fieldName: '구분', header: { text: '구분' } },
|
||||
|
||||
/* 2. 업체 및 인력 현황 */
|
||||
{ name: 'ECSCS_SM', fieldName: '업체수(개소)', header: { text: '업체수(개소)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ECSCS_BSMN', fieldName: '종사인원(명)', header: { text: '종사인원(명)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 3. 시설(차량) 확보현황 (단위: 대수) */
|
||||
{ name: 'VHCLE_SM', fieldName: '계(차량)', header: { text: '계' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'THREE_BELOW', fieldName: '3톤이하', header: { text: '3톤이하' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'FOUR_BELOW', fieldName: '4.5톤이하', header: { text: '4.5톤이하' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'EIGHT_BELOW', fieldName: '8톤이하', header: { text: '8톤이하' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'ETC', fieldName: '기타(차량)', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 4. 실적 및 비고 */
|
||||
{ name: 'ETC_VHCLE', fieldName: '기타(차량)', header: { text: '기타' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' }, // name 중복 방지를 위해 ETC_VHCLE로 수정 권장
|
||||
{ name: 'COLCT_TRSP_ACMSLT', fieldName: '수집·운반실적(㎥/년)', header: { text: '수집·운반실적\n(㎥/년)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['시도', '시군구'] },
|
||||
'구분', '업체수(개소)', '종사인원(명)',
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['SIDO', 'GUGUN'] },
|
||||
'YR_GBN', 'ECSCS_SM', 'ECSCS_BSMN',
|
||||
{
|
||||
name: 'vehicleGroup',
|
||||
header: { text: '시설(차량) 확보현황(대수)' },
|
||||
items: ['계(차량)', '3톤이하', '4.5톤이하', '8톤이하', '기타(차량)']
|
||||
items: ['VHCLE_SM', 'THREE_BELOW', 'FOUR_BELOW', 'EIGHT_BELOW', 'ETC_VHCLE']
|
||||
},
|
||||
'수집·운반실적(㎥/년)', '비고'
|
||||
'COLCT_TRSP_ACMSLT', 'RMK'
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -133,33 +104,24 @@ const rawExcretaRelatedList = [
|
||||
rowStartNum: 2,
|
||||
fixedColumns: 2,
|
||||
columns: [
|
||||
/* 1. 행정 및 기본 정보 */
|
||||
{ name: 'SIDO', fieldName: '시도', header: { text: '시도' } },
|
||||
{ name: 'GUGUN', fieldName: '시군구', header: { text: '시군구' } },
|
||||
{ name: 'YR_GBN', fieldName: '구분', header: { text: '구분' } },
|
||||
|
||||
/* 2. 개인하수처리시설 설계ㆍ시공업 */
|
||||
{ name: 'CNSTRCT_ENTRPS', fieldName: '업소수(시공업)', header: { text: '업소수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'CNSTRCT_BSMN', fieldName: '종사인원(명)_시공업', header: { text: '종사인원(명)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 3. 개인하수처리시설 제조업 */
|
||||
{ name: 'MNFCTUR_ENTRPS', fieldName: '업소수(제조업)', header: { text: '업소수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'MNFCTUR_BSMN', fieldName: '종사인원(명)_제조업', header: { text: '종사인원(명)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 4. 개인하수처리시설 관리업 */
|
||||
{ name: 'MGMT_ENTRPS', fieldName: '업소수(관리업)', header: { text: '업소수' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
{ name: 'MGMT_BSMN', fieldName: '종사인원(명)_관리업', header: { text: '종사인원(명)' }, valueType: ValueType.NUMBER, numberFormat: '#,##0' },
|
||||
|
||||
/* 5. 기타 및 비고 */
|
||||
{ name: 'RMK', fieldName: '비고', header: { text: '비고' } }
|
||||
],
|
||||
columnLayout: [
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['시도', '시군구'] },
|
||||
'구분',
|
||||
{ name: 'constructGroup', header: { text: '개인하수처리시설 설계ㆍ시공업' }, items: ['업소수(시공업)', '종사인원(명)_시공업'] },
|
||||
{ name: 'manufactureGroup', header: { text: '개인하수처리시설 제조업' }, items: ['업소수(제조업)', '종사인원(명)_제조업'] },
|
||||
{ name: 'managementGroup', header: { text: '개인하수처리시설 관리업' }, items: ['업소수(관리업)', '종사인원(명)_관리업'] },
|
||||
'비고'
|
||||
{ name: 'addrGroup', header: { text: '행정구역' }, items: ['SIDO', 'GUGUN'] },
|
||||
'YR_GBN',
|
||||
{ name: 'constructGroup', header: { text: '개인하수처리시설 설계ㆍ시공업' }, items: ['CNSTRCT_ENTRPS', 'CNSTRCT_BSMN'] },
|
||||
{ name: 'manufactureGroup', header: { text: '개인하수처리시설 제조업' }, items: ['MNFCTUR_ENTRPS', 'MNFCTUR_BSMN'] },
|
||||
{ name: 'managementGroup', header: { text: '개인하수처리시설 관리업' }, items: ['MGMT_ENTRPS', 'MGMT_BSMN'] },
|
||||
'RMK'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -2,174 +2,128 @@ import { ValueType } from "realgrid";
|
||||
import { footerIntArrayByDivision, footerDecimal3ArrayByDivision, footerAvgDecimalArrayByDivision } from "@/components/util/grid/footerSummary";
|
||||
import type { GridView, DataColumn, ColumnFooter } from "@/components/type/DataGrid.type";
|
||||
|
||||
// 하수도 통계 관리 01. 하수도 보급률
|
||||
export const SeweragePenetrationRateInfoList = {
|
||||
columns: [
|
||||
{
|
||||
name: 'sido',
|
||||
fieldName: '시도',
|
||||
fieldName: 'sido',
|
||||
header: { text: '시도' },
|
||||
mergeCells: true,
|
||||
editable: false,
|
||||
sortdisable: true,
|
||||
footer: [
|
||||
{
|
||||
valueCallback: (
|
||||
grid: GridView,
|
||||
column: DataColumn,
|
||||
footerIndex: number,
|
||||
columnFooter: ColumnFooter,
|
||||
value: number | string | undefined
|
||||
) => {
|
||||
// 첫 번째 footer 행: 첫 번째 "구분" 값 + "합계"
|
||||
valueCallback: (grid: GridView, column: DataColumn, footerIndex: number, columnFooter: ColumnFooter, value: number | string | undefined) => {
|
||||
const divisionIndex = 0;
|
||||
const dataSource = grid.getDataSource();
|
||||
const rowCount = dataSource.getRowCount();
|
||||
const uniqueValues = new Set<string>();
|
||||
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
const divisionValue = dataSource.getValue(i, '구분');
|
||||
const divisionValue = dataSource.getValue(i, 'rgnNm');
|
||||
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
||||
uniqueValues.add(String(divisionValue));
|
||||
}
|
||||
}
|
||||
|
||||
const divisionValues = Array.from(uniqueValues);
|
||||
if (divisionValues.length > divisionIndex) {
|
||||
return divisionValues[divisionIndex] + '합계';
|
||||
}
|
||||
if (divisionValues.length > divisionIndex) return divisionValues[divisionIndex] + '합계';
|
||||
return '합계';
|
||||
}
|
||||
},
|
||||
{
|
||||
valueCallback: (
|
||||
grid: GridView,
|
||||
column: DataColumn,
|
||||
footerIndex: number,
|
||||
columnFooter: ColumnFooter,
|
||||
value: number | string | undefined
|
||||
) => {
|
||||
// 두 번째 footer 행: 두 번째 "구분" 값 + "합계"
|
||||
valueCallback: (grid: GridView, column: DataColumn, footerIndex: number, columnFooter: ColumnFooter, value: number | string | undefined) => {
|
||||
const divisionIndex = 1;
|
||||
const dataSource = grid.getDataSource();
|
||||
const rowCount = dataSource.getRowCount();
|
||||
const uniqueValues = new Set<string>();
|
||||
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
const divisionValue = dataSource.getValue(i, '구분');
|
||||
const divisionValue = dataSource.getValue(i, 'rgnNm');
|
||||
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
||||
uniqueValues.add(String(divisionValue));
|
||||
}
|
||||
}
|
||||
|
||||
const divisionValues = Array.from(uniqueValues);
|
||||
if (divisionValues.length > divisionIndex) {
|
||||
return divisionValues[divisionIndex] + '합계';
|
||||
}
|
||||
if (divisionValues.length > divisionIndex) return divisionValues[divisionIndex] + '합계';
|
||||
return '합계';
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ name: 'sgg', fieldName: '시군구', header: { text: '시군구' }, mergeCells: true, editable: false, sortdisable: true },
|
||||
{ name: 'gugun', fieldName: 'gugun', header: { text: '시군구' }, mergeCells: true, editable: false, sortdisable: true },
|
||||
{ name: 'adstDong', fieldName: 'adstDong', header: { text: '행정구역명' }, mergeCells: true, editable: false, sortdisable: true },
|
||||
{
|
||||
name: '구분',
|
||||
fieldName: '구분',
|
||||
name: 'rgnNm',
|
||||
fieldName: 'rgnNm',
|
||||
header: { text: '구분' },
|
||||
editable: false,
|
||||
sortdisable: true,
|
||||
footer: [
|
||||
{
|
||||
valueCallback: (
|
||||
grid: GridView,
|
||||
column: DataColumn,
|
||||
footerIndex: number,
|
||||
columnFooter: ColumnFooter,
|
||||
value: number | string | undefined
|
||||
) => {
|
||||
// 첫 번째 footer 행: 첫 번째 "구분" 값 사용 (footerIndex는 0이어야 함)
|
||||
const divisionIndex = 0; // 첫 번째 footer 요소는 항상 첫 번째 "구분" 값 사용
|
||||
valueCallback: (grid: GridView, column: DataColumn, footerIndex: number, columnFooter: ColumnFooter, value: number | string | undefined) => {
|
||||
const divisionIndex = 0;
|
||||
const dataSource = grid.getDataSource();
|
||||
const rowCount = dataSource.getRowCount();
|
||||
const uniqueValues = new Set<string>();
|
||||
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
const divisionValue = dataSource.getValue(i, '구분');
|
||||
const divisionValue = dataSource.getValue(i, 'rgnNm');
|
||||
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
||||
uniqueValues.add(String(divisionValue));
|
||||
}
|
||||
}
|
||||
|
||||
const divisionValues = Array.from(uniqueValues);
|
||||
if (divisionValues.length > divisionIndex) {
|
||||
const result = divisionValues[divisionIndex] + '합계';
|
||||
return result;
|
||||
}
|
||||
return '';
|
||||
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + '합계' : '';
|
||||
}
|
||||
},
|
||||
{
|
||||
valueCallback: (
|
||||
grid: GridView,
|
||||
column: DataColumn,
|
||||
footerIndex: number,
|
||||
columnFooter: ColumnFooter,
|
||||
value: number | string | undefined
|
||||
) => {
|
||||
// 두 번째 footer 행: 두 번째 "구분" 값 사용 (footerIndex는 1이어야 함)
|
||||
const divisionIndex = 1; // 두 번째 footer 요소는 항상 두 번째 "구분" 값 사용
|
||||
valueCallback: (grid: GridView, column: DataColumn, footerIndex: number, columnFooter: ColumnFooter, value: number | string | undefined) => {
|
||||
const divisionIndex = 1;
|
||||
const dataSource = grid.getDataSource();
|
||||
const rowCount = dataSource.getRowCount();
|
||||
const uniqueValues = new Set<string>();
|
||||
|
||||
for (let i = 0; i < rowCount; i++) {
|
||||
const divisionValue = dataSource.getValue(i, '구분');
|
||||
const divisionValue = dataSource.getValue(i, 'rgnNm');
|
||||
if (divisionValue !== null && divisionValue !== undefined && divisionValue !== '') {
|
||||
uniqueValues.add(String(divisionValue));
|
||||
}
|
||||
}
|
||||
|
||||
const divisionValues = Array.from(uniqueValues);
|
||||
if (divisionValues.length > divisionIndex) {
|
||||
const result = divisionValues[divisionIndex] + '합계';
|
||||
return result;
|
||||
}
|
||||
return '';
|
||||
return divisionValues.length > divisionIndex ? divisionValues[divisionIndex] + '합계' : '';
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ name: '수계', fieldName: '수계', header: { text: '수계' } },
|
||||
{ name: 'bstrm', fieldName: '지류', header: { text: '지류' } },
|
||||
{ name: 'mdbsn', fieldName: '세부단위유역', header: { text: '세부단위유역' } },
|
||||
{ name: 'lgbsn', fieldName: '중권역', header: { text: '중권역' } },
|
||||
{ name: 'mdmbsn', fieldName: '소권역', header: { text: '소권역' } },
|
||||
{ name: 'specl_cntrpln_ar', fieldName: '특별대책지역', header: { text: '특별대책지역' } },
|
||||
{ name: 'total_popl', fieldName: '총인구', header: { text: '총인구' }, footer: footerIntArrayByDivision, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'ar_sm', fieldName: '총면적(㎢)', header: { text: '총면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: '계', fieldName: '계', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0', styleName: 'rg-cell-total' },
|
||||
//공공하수처리인구
|
||||
{ name: '합계', fieldName: '합계', header: { text: '합계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '1차처리', fieldName: '1차처리', header: { text: '1차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '2차처리', fieldName: '2차처리', header: { text: '2차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '3차처리', fieldName: '3차처리', header: { text: '3차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
//폐수처리인구(명)
|
||||
{ name: '(폐수처리인구)합계', fieldName: '(폐수처리인구)합계', header: { text: '합계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '(폐수처리인구)1차처리', fieldName: '(폐수처리인구)1차처리', header: { text: '1차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '(폐수처리인구)2차처리', fieldName: '(폐수처리인구)2차처리', header: { text: '2차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: '(폐수처리인구)3차처리', fieldName: '(폐수처리인구)3차처리', header: { text: '3차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'rvbsn', fieldName: 'rvbsn', header: { text: '수계' } },
|
||||
{ name: 'bstrm', fieldName: 'bstrm', header: { text: '지류' } },
|
||||
{ name: 'mdbsn', fieldName: 'mdbsn', header: { text: '세부단위유역' } },
|
||||
{ name: 'lgbsn', fieldName: 'lgbsn', header: { text: '중권역' } },
|
||||
{ name: 'mdmbsn', fieldName: 'mdmbsn', header: { text: '소권역' } },
|
||||
{ name: 'speclCntrplnAr', fieldName: 'speclCntrplnAr', header: { text: '특별대책지역' } },
|
||||
{ name: 'popltnSm', fieldName: 'popltnSm', header: { text: '총인구' }, footer: footerIntArrayByDivision, editable: false, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'arSm', fieldName: 'arSm', header: { text: '총면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'swgeProcZoneInnerSm', fieldName: 'swgeProcZoneInnerSm', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0', styleName: 'rg-cell-total' },
|
||||
|
||||
// 공공하수처리인구
|
||||
{ name: 'pblswrgPopltnSm', fieldName: 'pblswrgPopltnSm', header: { text: '합계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'pblswrgPrmTrt', fieldName: 'pblswrgPrmTrt', header: { text: '1차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'pblswrgScdTrt', fieldName: 'pblswrgScdTrt', header: { text: '2차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'pblswrgTertTrt', fieldName: 'pblswrgTertTrt', header: { text: '3차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
// 폐수처리인구(명)
|
||||
{ name: 'wstrPopltnSm', fieldName: 'wstrPopltnSm', header: { text: '합계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'wstrPrmTrt', fieldName: 'wstrPrmTrt', header: { text: '1차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'wstrScdTrt', fieldName: 'wstrScdTrt', header: { text: '2차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'wstrTertTrt', fieldName: 'wstrTertTrt', header: { text: '3차처리' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
|
||||
{ name: 'not_conect_popltn', fieldName: '미접속인구', header: { text: '미접속인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'swge_proc_zone_inner_ar', fieldName: 'swge_proc_zone_inner_ar', header: { text: '면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'swge_proc_zone_outer_sm', fieldName: 'swge_proc_zone_outer_sm', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'town_unproc_popltn', fieldName: '미처리인구', header: { text: '미처리인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'town_swtt_popltn', fieldName: '오수처리인구', header: { text: '오수처리인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'town_wrrtn_popltn', fieldName: '정화조인구', header: { text: '정화조인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'swge_proc_zone_outer_ar', fieldName: 'swge_proc_zone_outer_ar', header: { text: '면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'pblswrg_popltn_suprt', fieldName: '공공하수처리구역인구보급율(%)', header: { text: '공공하수처리구역인구보급율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'adtrt_popltn_suprt', fieldName: '고도처리인구보급율(%)', header: { text: `고도처리인구보급율(%)` }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'swrg_instlrt', fieldName: '하수도설치율(%)', header: { text: '하수도설치율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'rmk', fieldName: '비고', header: { text: '비고' } },
|
||||
{ name: 'notConectPopltn', fieldName: 'notConectPopltn', header: { text: '미접속인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'swgeProcZoneInnerAr', fieldName: 'swgeProcZoneInnerAr', header: { text: '면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'swgeProcZoneOuterSm', fieldName: 'swgeProcZoneOuterSm', header: { text: '계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'townUnprocPopltn', fieldName: 'townUnprocPopltn', header: { text: '미처리인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'townSwttPopltn', fieldName: 'townSwttPopltn', header: { text: '오수처리인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'townWrrtnPopltn', fieldName: 'townWrrtnPopltn', header: { text: '정화조인구' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'swgeProcZoneOuterAr', fieldName: 'swgeProcZoneOuterAr', header: { text: '면적(㎢)' }, footer: footerDecimal3ArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'pblswrgPopltnSuprt', fieldName: 'pblswrgPopltnSuprt', header: { text: '공공하수처리구역인구보급율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'adtrtPopltnSuprt', fieldName: 'adtrtPopltnSuprt', header: { text: '고도처리인구보급율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'swrgInstlrt', fieldName: 'swrgInstlrt', header: { text: '하수도설치율(%)' }, footer: footerAvgDecimalArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0.000' },
|
||||
{ name: 'rmk', fieldName: 'rmk', header: { text: '비고' } },
|
||||
],
|
||||
columnLayout: [
|
||||
{
|
||||
@@ -177,55 +131,56 @@ export const SeweragePenetrationRateInfoList = {
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정구역' },
|
||||
items: [
|
||||
{ column: 'sido', footerUserSpans: [{ colspan: 3 }, { colspan: 3 }] }, // 첫 번째 footer 행과 두 번째 footer 행 모두 병합
|
||||
'sgg',
|
||||
{ column: 'sido', footerUserSpans: [{ colspan: 4 }, { colspan: 4 }] },
|
||||
'gugun',
|
||||
'adstDong',
|
||||
]
|
||||
},
|
||||
'구분',
|
||||
'수계',
|
||||
'rgnNm',
|
||||
'rvbsn',
|
||||
'bstrm',
|
||||
{
|
||||
name: 'groupB',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '수계영향권별분류류' },
|
||||
header: { text: '수계영향권별분류' },
|
||||
items: ['mdbsn', 'lgbsn', 'mdmbsn'],
|
||||
},
|
||||
'specl_cntrpln_ar',
|
||||
'total_popl',
|
||||
'ar_sm',
|
||||
'speclCntrplnAr',
|
||||
'popltnSm',
|
||||
'arSm',
|
||||
{
|
||||
name: 'groupD',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '하수처리구역내' },
|
||||
items: [
|
||||
'계',
|
||||
'swgeProcZoneInnerSm',
|
||||
{
|
||||
name: 'pblswrgGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '공공하수처리인구(명)' },
|
||||
items: ['합계', '1차처리', '2차처리', '3차처리'],
|
||||
items: ['pblswrgPopltnSm', 'pblswrgPrmTrt', 'pblswrgScdTrt', 'pblswrgTertTrt'],
|
||||
},
|
||||
{
|
||||
name: 'wstrGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '폐수처리인구(명)' },
|
||||
items: ['(폐수처리인구)합계', '(폐수처리인구)1차처리', '(폐수처리인구)2차처리', '(폐수처리인구)3차처리'],
|
||||
items: ['wstrPopltnSm', 'wstrPrmTrt', 'wstrScdTrt', 'wstrTertTrt'],
|
||||
},
|
||||
'not_conect_popltn',
|
||||
'swge_proc_zone_inner_ar'
|
||||
'notConectPopltn',
|
||||
'swgeProcZoneInnerAr'
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'groupE',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '하수처리구역외' },
|
||||
items: ['swge_proc_zone_outer_sm', 'town_unproc_popltn', 'town_swtt_popltn', 'town_wrrtn_popltn', 'swge_proc_zone_outer_ar'],
|
||||
items: ['swgeProcZoneOuterSm', 'townUnprocPopltn', 'townSwttPopltn', 'townWrrtnPopltn', 'swgeProcZoneOuterAr'],
|
||||
},
|
||||
'pblswrg_popltn_suprt',
|
||||
'adtrt_popltn_suprt',
|
||||
'swrg_instlrt',
|
||||
'pblswrgPopltnSuprt',
|
||||
'adtrtPopltnSuprt',
|
||||
'swrgInstlrt',
|
||||
'rmk',
|
||||
],
|
||||
fixedColumns: 2,
|
||||
fixedColumns: 2,
|
||||
rowStartNum: 3
|
||||
};
|
||||
@@ -1,34 +1,97 @@
|
||||
import { ValueType } from "realgrid";
|
||||
|
||||
/**
|
||||
하수도 통계 관리 00. 통계 입력 현황
|
||||
하수도 통계 검토 00. 통계 입력 현황
|
||||
* 단일 Tab
|
||||
*/
|
||||
const StatsInputStatusInfoColumnRaw = {
|
||||
columns: [
|
||||
{ name: 'sido', fieldName: '시도', header: { text: '시도' } },
|
||||
{ name: 'gugun', fieldName: '시군구', header: { text: '시군구' } },
|
||||
{ name: 'status', fieldName: '진행상태', header: { text: '진행상태' } },
|
||||
// 기본 정보
|
||||
{ name: 'sido', fieldName: 'sido', header: { text: '시도' }, width: 80 },
|
||||
{ name: 'gugun', fieldName: 'gugun', header: { text: '시군구' }, width: 100 },
|
||||
{ name: 'status', fieldName: 'status', header: { text: '진행상태' }, width: 100 },
|
||||
|
||||
// 동적 컬럼 생성 (1~15번 그룹)
|
||||
...[1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15].flatMap(num => {
|
||||
const id = num.toString();
|
||||
return [
|
||||
// fieldName을 header.text와 동일하게 수정 (단, 데이터 구분을 위해 ID 포함)
|
||||
{ name: `locg_charger_${id}`, fieldName: `제출자_${id}`, header: { text: '제출자' } },
|
||||
{ name: `locg_cttpc_${id}`, fieldName: `연락처_${id}`, header: { text: '연락처' } },
|
||||
{ name: `locg_status_nm_${id}`, fieldName: `지자체진행상태_${id}`, header: { text: '지자체진행상태' } },
|
||||
{ name: `status_${id}`, fieldName: `진행상태_${id}`, header: { text: '진행상태' } }
|
||||
];
|
||||
}),
|
||||
// 01. 하수도보급율
|
||||
{ name: 'locg_charger_1', fieldName: 'locg_charger_1', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_1', fieldName: 'locg_cttpc_1', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_1', fieldName: 'locg_status_nm_1', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_1', fieldName: 'status_1', header: { text: '진행상태' } },
|
||||
|
||||
// 02. 하수관로 (DB/JSON 키: _3)
|
||||
{ name: 'locg_charger_3', fieldName: 'locg_charger_3', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_3', fieldName: 'locg_cttpc_3', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_3', fieldName: 'locg_status_nm_3', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_3', fieldName: 'status_3', header: { text: '진행상태' } },
|
||||
|
||||
// 03. 하수관로유지관리 (_4)
|
||||
{ name: 'locg_charger_4', fieldName: 'locg_charger_4', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_4', fieldName: 'locg_cttpc_4', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_4', fieldName: 'locg_status_nm_4', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_4', fieldName: 'status_4', header: { text: '진행상태' } },
|
||||
|
||||
// 04. 하수저류시설 (_5)
|
||||
{ name: 'locg_charger_5', fieldName: 'locg_charger_5', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_5', fieldName: 'locg_cttpc_5', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_5', fieldName: 'locg_status_nm_5', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_5', fieldName: 'status_5', header: { text: '진행상태' } },
|
||||
|
||||
// 05. 펌프장 (_6)
|
||||
{ name: 'locg_charger_6', fieldName: 'locg_charger_6', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_6', fieldName: 'locg_cttpc_6', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_6', fieldName: 'locg_status_nm_6', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_6', fieldName: 'status_6', header: { text: '진행상태' } },
|
||||
|
||||
// 06. 공공하수처리시설 (_7)
|
||||
{ name: 'locg_charger_7', fieldName: 'locg_charger_7', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_7', fieldName: 'locg_cttpc_7', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_7', fieldName: 'locg_status_nm_7', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_7', fieldName: 'status_7', header: { text: '진행상태' } },
|
||||
|
||||
// 07. 분뇨처리시설 (_8)
|
||||
{ name: 'locg_charger_8', fieldName: 'locg_charger_8', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_8', fieldName: 'locg_cttpc_8', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_8', fieldName: 'locg_status_nm_8', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_8', fieldName: 'status_8', header: { text: '진행상태' } },
|
||||
|
||||
// 08. 개인하수처리시설 (_9)
|
||||
{ name: 'locg_charger_9', fieldName: 'locg_charger_9', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_9', fieldName: 'locg_cttpc_9', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_9', fieldName: 'locg_status_nm_9', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_9', fieldName: 'status_9', header: { text: '진행상태' } },
|
||||
|
||||
// 09. 하수도재정 (_10)
|
||||
{ name: 'locg_charger_10', fieldName: 'locg_charger_10', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_10', fieldName: 'locg_cttpc_10', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_10', fieldName: 'locg_status_nm_10', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_10', fieldName: 'status_10', header: { text: '진행상태' } },
|
||||
|
||||
// 10. 물재이용 (_11)
|
||||
{ name: 'locg_charger_11', fieldName: 'locg_charger_11', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_11', fieldName: 'locg_cttpc_11', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_11', fieldName: 'locg_status_nm_11', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_11', fieldName: 'status_11', header: { text: '진행상태' } },
|
||||
|
||||
// 11. 하수및분뇨찌꺼기 (_12)
|
||||
{ name: 'locg_charger_12', fieldName: 'locg_charger_12', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_12', fieldName: 'locg_cttpc_12', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_12', fieldName: 'locg_status_nm_12', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_12', fieldName: 'status_12', header: { text: '진행상태' } },
|
||||
|
||||
// 12. 하수및분뇨관련산업 (_13)
|
||||
{ name: 'locg_charger_13', fieldName: 'locg_charger_13', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_13', fieldName: 'locg_cttpc_13', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_13', fieldName: 'locg_status_nm_13', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_13', fieldName: 'status_13', header: { text: '진행상태' } },
|
||||
|
||||
// 13. 하수도서비스수준 (_15)
|
||||
{ name: 'locg_charger_15', fieldName: 'locg_charger_15', header: { text: '제출자' } },
|
||||
{ name: 'locg_cttpc_15', fieldName: 'locg_cttpc_15', header: { text: '연락처' } },
|
||||
{ name: 'locg_status_nm_15', fieldName: 'locg_status_nm_15', header: { text: '지자체진행상태' } },
|
||||
{ name: 'status_15', fieldName: 'status_15', header: { text: '진행상태' } },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
{
|
||||
name: 'addrGroup',
|
||||
header: { text: '구분' },
|
||||
items: ['sido', 'gugun']
|
||||
},
|
||||
{ name: 'addrGroup', header: { text: '구분' }, items: ['sido', 'gugun'] },
|
||||
'status',
|
||||
{ name: 'group01', header: { text: '01. 하수도보급율' }, items: ['locg_charger_1', 'locg_cttpc_1', 'locg_status_nm_1', 'status_1'] },
|
||||
{ name: 'group02', header: { text: '02. 하수관로' }, items: ['locg_charger_3', 'locg_cttpc_3', 'locg_status_nm_3', 'status_3'] },
|
||||
@@ -41,13 +104,11 @@ const StatsInputStatusInfoColumnRaw = {
|
||||
{ name: 'group09', header: { text: '09. 하수도재정' }, items: ['locg_charger_10', 'locg_cttpc_10', 'locg_status_nm_10', 'status_10'] },
|
||||
{ name: 'group10', header: { text: '10. 물재이용' }, items: ['locg_charger_11', 'locg_cttpc_11', 'locg_status_nm_11', 'status_11'] },
|
||||
{ name: 'group11', header: { text: '11. 하수및분뇨찌꺼기' }, items: ['locg_charger_12', 'locg_cttpc_12', 'locg_status_nm_12', 'status_12'] },
|
||||
{ name: 'group12', header: { text: '12. 하수및분뇨관련사업' }, items: ['locg_charger_13', 'locg_cttpc_13', 'locg_status_nm_13', 'status_13'] },
|
||||
{ name: 'group12', header: { text: '12. 하수및분뇨관련산업' }, items: ['locg_charger_13', 'locg_cttpc_13', 'locg_status_nm_13', 'status_13'] },
|
||||
{ name: 'group13', header: { text: '13. 하수도서비스수준' }, items: ['locg_charger_15', 'locg_cttpc_15', 'locg_status_nm_15', 'status_15'] }
|
||||
]
|
||||
};
|
||||
/**
|
||||
* 최종 Export 객체 (수정 불가 설정 적용)
|
||||
*/
|
||||
|
||||
export const StatsInputStatusInfoList = {
|
||||
...StatsInputStatusInfoColumnRaw,
|
||||
columns: StatsInputStatusInfoColumnRaw.columns.map(col => ({
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import axios from "axios";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
|
||||
import {
|
||||
type SewerageSupplyRateReviewService,
|
||||
type SewerageSupplyRateReviewRequestParams,
|
||||
type SewerageSupplyRateReviewApiResponse,
|
||||
} from "../model/statistics-management-interface";
|
||||
|
||||
|
||||
export class SewerageSupplyRateReviewApiService implements SewerageSupplyRateReviewService {
|
||||
/**
|
||||
* 하수도 보급률 검토 목록 조회
|
||||
* @param params (sido, gugun, yr, bsnmCd)
|
||||
*/
|
||||
public async getSewerageSupplyRateReviewList(
|
||||
params: SewerageSupplyRateReviewRequestParams
|
||||
): Promise<SewerageSupplyRateReviewApiResponse> {
|
||||
const response = await axios.get<SewerageSupplyRateReviewApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/supply-rate`,
|
||||
{
|
||||
params: params
|
||||
}
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
export const sewerageSupplyRateReviewApi = new SewerageSupplyRateReviewApiService();
|
||||
@@ -0,0 +1,92 @@
|
||||
import type { ApiResponse } from "./statistics-interface";
|
||||
|
||||
// 검토 하수도 보급률 데이터 항목
|
||||
export interface SewerageSupplyRateReviewItem {
|
||||
|
||||
/* ======================================================================
|
||||
* 행 및 지역 기본 정보
|
||||
* ====================================================================== */
|
||||
sido: string;
|
||||
gugun: string;
|
||||
adstDong: string;
|
||||
rgnNm: string;
|
||||
displayYear: string;
|
||||
rowType: 'OLD' | 'CURR';
|
||||
adstCd: string;
|
||||
bsnmCd: string;
|
||||
yr: number;
|
||||
|
||||
/* ======================================================================
|
||||
* 수계 및 지역 정보
|
||||
* ====================================================================== */
|
||||
rvbsn: string;
|
||||
lgbsn: string;
|
||||
mdbsn: string;
|
||||
mdmbsn: string;
|
||||
wrssm: string | null;
|
||||
bstrm: string;
|
||||
speclCntrplnAr: string | null;
|
||||
|
||||
/* ======================================================================
|
||||
* 인구 및 면적 데이터 (공통 필드명)
|
||||
* ====================================================================== */
|
||||
popltnSm: number; // 총인구
|
||||
arSm: number; // 총면적(㎢)
|
||||
|
||||
/* 하수처리구역내 (groupD) */
|
||||
swgeProcZoneInnerSm: number; // 계
|
||||
pblswrgPopltnSm: number; // 공공하수처리인구-합계
|
||||
pblswrgPrmTrt: number; // 1차처리
|
||||
pblswrgScdTrt: number; // 2차처리
|
||||
pblswrgTertTrt: number; // 3차처리
|
||||
|
||||
wstrPopltnSm: number; // 폐수처리인구-합계
|
||||
wstrPrmTrt: number; // 1차처리
|
||||
wstrScdTrt: number; // 2차처리
|
||||
wstrTertTrt: number; // 3차처리
|
||||
|
||||
notConectPopltn: number; // 미접속인구
|
||||
swgeProcZoneInnerAr: number; // 면적(㎢)
|
||||
|
||||
/* 하수처리구역외 (groupE) */
|
||||
swgeProcZoneOuterSm: number; // 계
|
||||
townUnprocPopltn: number; // 미처리인구 (Town + Uptown 합산값)
|
||||
townSwttPopltn: number; // 오수처리인구 (Town + Uptown 합산값)
|
||||
townWrrtnPopltn: number; // 정화조인구 (Town + Uptown 합산값)
|
||||
swgeProcZoneOuterAr: number; // 면적(㎢)
|
||||
|
||||
/* ======================================================================
|
||||
* 보급률 및 기타
|
||||
* ====================================================================== */
|
||||
pblswrgPopltnSuprt: number; // 공공하수보급률(%)
|
||||
adtrtPopltnSuprt: number; // 고도처리보급률(%)
|
||||
swrgInstlrt: number; // 하수도설치율(%)
|
||||
rmk: string | null; // 비고
|
||||
|
||||
/* ======================================================================
|
||||
* Flag (필요 시 유지)
|
||||
* ====================================================================== */
|
||||
lcnt: number | null;
|
||||
ocnt: number | null;
|
||||
|
||||
}
|
||||
|
||||
export interface SewerageSupplyRateReviewResponseData {
|
||||
sewerageSupplyRateList: SewerageSupplyRateReviewItem[];
|
||||
}
|
||||
|
||||
export type SewerageSupplyRateReviewApiResponse = ApiResponse<SewerageSupplyRateReviewResponseData> & {
|
||||
message: string;
|
||||
};
|
||||
|
||||
|
||||
export interface SewerageSupplyRateReviewRequestParams {
|
||||
sido?: string;
|
||||
gugun?: string;
|
||||
yr?: number;
|
||||
bsnmCd?: string;
|
||||
}
|
||||
|
||||
export interface SewerageSupplyRateReviewService {
|
||||
getSewerageSupplyRateReviewList(params: SewerageSupplyRateReviewRequestParams): Promise<SewerageSupplyRateReviewApiResponse>;
|
||||
}
|
||||
@@ -67,6 +67,7 @@ export const ENDPOINT = {
|
||||
ST_SERVICE: {
|
||||
COMMON: "/st-management-service/api/v1/common",
|
||||
INPUT: "/st-input-service/api/v1/input",
|
||||
REVIEW: "/st-management-service/api/v1/review",
|
||||
INPUTCOMMON: "/st-input-service/api/v1/common",
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user