196 lines
6.5 KiB
TypeScript
196 lines
6.5 KiB
TypeScript
import { ENDPOINT } from "@/shared/config";
|
|
import { stClient } from "@/shared/api/client";
|
|
|
|
|
|
import {
|
|
type StatsInputStatusReviewApiResponse
|
|
} from "../model/statistics-input-review-interface";
|
|
import {
|
|
type SewerageSupplyRateReviewRequestParams,
|
|
type SewerageSupplyRateReviewApiResponse,
|
|
} from "../model/statistics-sewerage-penetration-review-interface";
|
|
import {
|
|
type SewagePipeReviewRequestParams,
|
|
type SewagePipeReviewRegionalApiResponse,
|
|
type SewagePipeFacilityApiResponse,
|
|
type SewerPipeTypeApiResponse,
|
|
type SewerPipeDiamApiResponse,
|
|
} from "../model/statistics-sewage-pipe-review-interface";
|
|
import {
|
|
type SewerPipeMtcApiResponse,
|
|
type SewerPipeDrdgApiResponse,
|
|
type SewerPipeMtcRequestParams
|
|
} from "../model/statistics-sewage-pipe-mtc-review-interface";
|
|
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 {
|
|
/**
|
|
* 00. 통계 입력 현황 목록 조회
|
|
* @param params (yr, bsnmCd, sido, gugun)
|
|
*/
|
|
public async getStatsInputStatusList(
|
|
params: { statsYr?: string; sewerBzmnCd?: string; ctpvNm?: string; sggNm?: string }
|
|
): Promise<StatsInputStatusReviewApiResponse> {
|
|
const response = await stClient.get<StatsInputStatusReviewApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/input-status`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 01. 하수도 보급률 검토 목록 조회
|
|
* @param params (sido, gugun, yr, bsnmCd)
|
|
*/
|
|
public async getSewerageSupplyRateReviewList(
|
|
params: SewerageSupplyRateReviewRequestParams
|
|
): Promise<SewerageSupplyRateReviewApiResponse> {
|
|
const response = await stClient.get<SewerageSupplyRateReviewApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/supply-rate`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 02. 하수관로 지역별 시설현황 목록 조회 (Tab1)
|
|
* @param params (sido, gugun, yr, bsnmCd)
|
|
*/
|
|
public async getSewagePipeReviewRegionalList(
|
|
params: SewagePipeReviewRequestParams
|
|
): Promise<SewagePipeReviewRegionalApiResponse> {
|
|
const response = await stClient.get<SewagePipeReviewRegionalApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/regional-status`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 02. 하수관로 시설별 설치현황 목록 조회 (Tab2)
|
|
* @param params (sido, gugun, yr, bsnmCd)
|
|
*/
|
|
public async getSewagePipeFacilityList(
|
|
params: SewagePipeReviewRequestParams
|
|
): Promise<SewagePipeFacilityApiResponse> {
|
|
const response = await stClient.get<SewagePipeFacilityApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/facility-status`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 02. 하수관로 관종별 시설현황 조회 (Tab3)
|
|
* @param params (sido, gugun, yr, bsnmCd)
|
|
*/
|
|
public async getSewagePipeTypeList(
|
|
params: SewagePipeReviewRequestParams
|
|
): Promise<SewerPipeTypeApiResponse> {
|
|
const response = await stClient.get<SewerPipeTypeApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/type-status`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 02. 하수관로 관경별 시설현황 조회 (Tab 4)
|
|
* @param params (sido, gugun, yr, bsnmCd)
|
|
*/
|
|
public async getSewagePipeDiamList(
|
|
params: SewagePipeReviewRequestParams
|
|
): Promise<SewerPipeDiamApiResponse> {
|
|
const response = await stClient.get<SewerPipeDiamApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/diam-status`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 03. 하수관로 유지관리 개보수 현황 조회
|
|
* @param params (yr, bsnmCd, sido, gugun)
|
|
*/
|
|
public async getSewerPipeMtcList(
|
|
params: SewerPipeMtcRequestParams
|
|
): Promise<SewerPipeMtcApiResponse> {
|
|
const response = await stClient.get<SewerPipeMtcApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/repair`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 03. 하수관로 유지관리 관로준설 현황 조회 (Tab B)
|
|
* @param params (yr, bsnmCd, sido, gugun)
|
|
*/
|
|
public async getSewerPipeDrdgList(
|
|
params: SewerPipeMtcRequestParams
|
|
): Promise<SewerPipeDrdgApiResponse> {
|
|
const response = await stClient.get<SewerPipeDrdgApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/dredging`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 04. 하수저류시설 tab1. 시설현황 조회
|
|
* @param params (yr, bsnmCd, sido, gugun)
|
|
*/
|
|
public async getSewerReservoirList(
|
|
params: SewerPipeMtcRequestParams
|
|
): Promise<SewerReservoirRegionalApiResponse> {
|
|
const response = await stClient.get<SewerReservoirRegionalApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/facilities`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 04. 빗물펌프장 tab2. 조회
|
|
* @param params (yr, bsnmCd, sido, gugun)
|
|
*/
|
|
public async getPumpStationList(
|
|
params: SewerPipeMtcRequestParams
|
|
): Promise<PumpingStationRegionalApiResponse> {
|
|
const response = await stClient.get<PumpingStationRegionalApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/pumping-stations`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
/**
|
|
* 05. 중계펌프장 통계관리 조회
|
|
* @param params (yr, bsnmCd, sido, gugun, bscFctNm)
|
|
*/
|
|
public async getMediationPumpStationList(
|
|
params: {
|
|
ctpvNm?: string;
|
|
sggNm?: string;
|
|
statsYr?: string;
|
|
sewerBzmnCd?: string;
|
|
pumpstNm?: string;
|
|
}
|
|
): Promise<MediationPumpStationApiResponse> {
|
|
const response = await stClient.get<MediationPumpStationApiResponse>(
|
|
`${ENDPOINT.ST_SERVICE.REVIEW}/mediation-pump-stations`,
|
|
{ params }
|
|
);
|
|
return response.data;
|
|
}
|
|
}
|
|
|
|
// 통합 인스턴스 수출
|
|
export const statisticsManagementApi = new StatisticsManagementApiService(); |