Merge branch 'iipbs/st/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/st/dev

This commit is contained in:
2026-02-12 17:00:45 +09:00
14 changed files with 843 additions and 244 deletions
@@ -6,6 +6,8 @@ import {
type SewerageSupplyRateRequestParams,
type SewerageSupplyRateApiResponse,
type CheckInputPeriodResponse,
type SewerageSupplyRateSaveItem,
type SewerageSupplyRateSaveApiResponse,
} from "../model/statistics-input-interface";
export class StatisticsInputAPiService implements StatisticsInputService {
@@ -27,6 +29,15 @@ export class StatisticsInputAPiService implements StatisticsInputService {
return response.data;
}
public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveItem[]): Promise<SewerageSupplyRateSaveApiResponse> {
const response = await axios.post<SewerageSupplyRateSaveApiResponse> (
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`,
params
);
return response.data;
}
}
export const statisticsInputAPi = new StatisticsInputAPiService();
@@ -6,12 +6,15 @@ import {
type StatsInputStatusReviewApiResponse
} from "../model/statistics-input-review-interface";
import {
type SewagePipeReviewApiResponse
type SewagePipeReviewRegionalApiResponse
} from "../model/statistics-sewage-pipe-review-interface";
import {
type SewerageSupplyRateReviewRequestParams,
type SewerageSupplyRateReviewApiResponse,
} from "../model/statistics-sewerage-penetration-review-interface";
import {
type SewagePipeFacilityApiResponse
} from "../model/statistics-sewage-pipe-review-interface";
export class StatisticsManagementApiService {
/**
@@ -58,16 +61,34 @@ export class StatisticsManagementApiService {
* 02. 하수관로 지역별 시설현황 목록 조회 (Tab1)
* @param params (sido, gugun, yr, bsnmCd)
*/
public async getSewagePipeReviewList(
public async getSewagePipeReviewRegionalList(
params: {
yr?: string;
bsnmCd?: string;
sido?: string;
gugun?: string;
}
): Promise<SewagePipeReviewApiResponse> {
const response = await axios.get<SewagePipeReviewApiResponse>(
`${ENDPOINT.ST_SERVICE.REVIEW}/pipe/tab1`,
): Promise<SewagePipeReviewRegionalApiResponse> {
const response = await axios.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: {
yr?: string;
bsnmCd?: string;
sido?: string;
gugun?: string;
}
): Promise<SewagePipeFacilityApiResponse> {
const response = await axios.get<SewagePipeFacilityApiResponse>(
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/facility-status`,
{ params }
);
return response.data;
@@ -13,6 +13,28 @@ export interface SewerageSupplyRateStatusInfo {
returnOpinionSm: string | null;
}
export interface SewerageSupplyRateCommonInfo {
bsnmArea: number;
bsnmCd: string;
bsnmFrgnrPoplSm: number;
bsnmPoplSm: number;
bsnmTotalPopl: number;
piplFcltyExtn: number;
piplPlanExtn: number;
piplSupprt: number;
sido: string;
yr: string;
}
/** 검증 결과 한 건 (필드별 메시지) */
export interface VerificationResultItem {
type: string;
rsn: string;
}
/** 필드명 → 검증 결과 배열. 예: { popltnSm: [{ type, rsn }], wstrPrmTrt: [...] } */
export type SewerageSupplyRateVerificationResult = Record<string, VerificationResultItem[]>;
export interface SewerageSupplyRateItem {
sido: string;
gugun: string;
@@ -93,11 +115,13 @@ export interface SewerageSupplyRateItem {
chkAdtrtPopltnSuprt: string;
chkSwrgInstlrt: string;
chkNotConectPopltn: string;
verificationResult?: SewerageSupplyRateVerificationResult;
}
export interface SewerageSupplyRateResponseData {
statusInfo: SewerageSupplyRateStatusInfo;
sewerageSupplyRateList: SewerageSupplyRateItem[];
commonInfo: SewerageSupplyRateCommonInfo;
}
export type SewerageSupplyRateApiResponse = ApiResponse<SewerageSupplyRateResponseData> & {
@@ -109,10 +133,53 @@ export interface SewerageSupplyRateRequestParams {
gugun?: string;
bsnmCd?: string;
yr?: string;
demoYr?: string;
mode?: string;
}
/** 하수도 보급률 저장 API 요청 body (한 행) */
export interface SewerageSupplyRateSaveItem {
bsnmCd: string;
sido: string;
gugun: string | null;
yr: string;
adstCd: string;
adstDong: string;
bstrm: string;
speclCntrplnAr: string | null;
pblswrgPrmTrt: number;
pblswrgScdTrt: number;
pblswrgTertTrt: number;
wstrPrmTrt: number;
wstrScdTrt: number;
wstrTertTrt: number;
notConectPopltn: number;
swgeProcZoneInnerAr: number;
townUnprocPopltn: number;
townSwttPopltn: number;
townWrrtnPopltn: number;
swgeProcZoneOuterAr: number;
rmk: string;
popltnSm: number;
arSm: number;
swgeProcZoneInnerSm: number;
pblswrgPopltnSm: number;
wstrPopltnSm: number;
swgeProcZoneOuterSm: number;
pblswrgPopltnSuprt: number;
adtrtPopltnSuprt: number;
swrgInstlrt: number;
userId: string;
}
export interface SewerageSupplyRateSaveData {
hasMismatch?: boolean;
mismatchIdList?: string[];
httpStatus?: number;
code?: string;
}
export type SewerageSupplyRateSaveApiResponse = ApiResponse<SewerageSupplyRateSaveData>;
// 하수도 통계 입력 기간 조회
export interface CheckInputPeriodResponse {
status: string;
@@ -122,4 +189,6 @@ export interface CheckInputPeriodResponse {
export interface StatisticsInputService {
getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise<SewerageSupplyRateApiResponse>;
checkInputPeriod(params: string): Promise<CheckInputPeriodResponse>;
saveSewerageSupplyRate(params: SewerageSupplyRateSaveItem[]): Promise<SewerageSupplyRateSaveApiResponse>;
}
@@ -1,9 +1,9 @@
import type { ApiResponse } from "./statistics-interface";
/**
* 02. 하수관로 지역별 시설현황 아이템 인터페이스 (Tab1)
* 02. 하수관로 tab1.지역별 시설현황 아이템 인터페이스 (Tab1)
*/
export interface SewagePipeReviewItem {
export interface SewagePipeReviewrRegionalItem {
// 기본 정보 및 행 제어
sido: string; // 시도
gugun: string; // 시군구
@@ -64,11 +64,11 @@ export interface SewagePipeReviewItem {
}
export interface SewagePipeReviewResponseData {
sewagePipeList: SewagePipeReviewItem[];
sewagePipeList: SewagePipeReviewrRegionalItem[];
}
export type SewagePipeReviewApiResponse = ApiResponse<SewagePipeReviewItem[]> & {
export type SewagePipeReviewRegionalApiResponse = ApiResponse<SewagePipeReviewrRegionalItem[]> & {
message: string;
};
@@ -79,5 +79,74 @@ export interface SewagePipeReviewService {
bsnmCd?: string; // 사업장 코드
sido?: string; // 시도
gugun?: string; // 구군
}): Promise<SewagePipeReviewApiResponse>;
}): Promise<SewagePipeReviewRegionalApiResponse>;
}
export interface SewagePipeReviewFacilityItem {
// 1. 행정구역 및 기본 정보
sido: string; // 시도
gugun: string; // 시군구
adstCd: string; // 행정코드
adstDong: string; // 행정구역명
yr: string; // 연도
rowType: 'OLD' | 'CURR'; // 전년도/당해년도 구분
displayYear: string; // 구분 표시용 (2024년확정 등)
// 2. 시설 정보
bscFctNm: string; // 하수처리장명
fctCpc: number; // 하수처리시설용량(㎥/일)
// 3. 처리구역면적(㎢)
procZoneSm: number; // 합계(면적)
cmbnProcZoneAr: number; // 합류식(면적)
sprtProcZoneAr: number; // 분류식(면적)
sepRate: number; // 분류식화 (%)
// 4. 배수설비(개소)
drngEqpSm: number; // 합계(배수)
cmbnDrngEqp: number; // 합류식(배수)
sprtDrngEqpSm: number; // 합계(분류배수)
sprtDrngEqpCnnc: number; // 연결
sprtDrngEqpDcnnc: number; // 미연결
// 5. 하수관로 (m)
piplFcltyExtn: number; // 총 시설연장(m)
icgMnnSm: number; // 합계(차집/오수간선)
icgExtn: number; // 차집
mnnExtn: number; // 오수간선
// 6. 토실/토구 (개소)
cmbnSoilholeSite: number; // 우수토실(합류)
sprtSoilholeSite: number; // 우수토실(분류)
sprtSoilspllSite: number; // 우수토구(분류)
// 7. 지선 (m)
brnchlnSm: number; // 합계(지선)
cmbnBrnchlnExtn: number; // 합류식(지선)
rainwtrBrnchlnExtn: number; // 우수(지선)
pltwtrBrnchlnExtn: number; // 오수(지선)
// 비고
rmk: string; // 비고
}
export interface SewagePipeFacilityResponseData {
facilityPipeList: SewagePipeReviewFacilityItem[];
}
export type SewagePipeFacilityApiResponse = ApiResponse<SewagePipeReviewFacilityItem[]> & {
message: string;
};
export interface SewagePipeFacilityService {
getSewagePipeFacilityList(params: {
yr?: string; // 조회 연도
bsnmCd?: string; // 사업장 코드
sido?: string; // 시도
gugun?: string; // 구군
}): Promise<SewagePipeFacilityApiResponse>;
}