import type { ApiResponse } from "./statistics-interface"; // 하수도 보급률 데이터 항목 export interface SewerageSupplyRateStatusInfo { locgStatus: string; locgDt: string; locgCharger: string; locgCttpc: string; prvnStatus: string; dcsnStatus: string; wrterOpinionSm: string | null; chckerOpinionSm: string | null; 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; export interface SewerageSupplyRateItem { sido: string; gugun: string; adstDong: string; rgnNm: string; adstCd: string; yr: string; bsnmCd: string; rvbsn: string; lgbsn: string; mdbsn: string; mdmbsn: string; totalPopl: number; poplSm: number; frgnrPoplSm: number; area: number; bsnmTotalPopl: number; bsnmPoplSm: number; bsnmFrgnrPoplSm: number; bsnmArea: number; piplPlanExtn: number; piplFcltyExtn: number; piplSupprt: number; wrssm: string | null; bstrm: string; speclCntrplnAr: string | null; popltnSm: number; arSm: number; swgeProcZoneInnerSm: number; pblswrgPopltnSm: number; pblswrgPrmTrt: number; pblswrgScdTrt: number; pblswrgTertTrt: number; wstrPopltnSm: number; wstrPrmTrt: number; wstrScdTrt: number; wstrTertTrt: number; swgeProcZoneInnerAr: number; swgeProcZoneOuterSm: number; townUnprocPopltn: number; townSwttPopltn: number; townWrrtnPopltn: number; uptownUnprPopltn: number; uptownSwttPopltn: number; uptownWrrtnPopltn: number; swgeProcZoneOuterAr: number; pblswrgPopltnSuprt: number; adtrtPopltnSuprt: number; swrgInstlrt: number; wrterOpinion: string | null; chckerOpinion: string | null; notConectPopltn: number; rmk: string; chkWrssm: string; chkBstrm: string; chkSpeclCntrplnAr: string; chkPopltnSm: string; chkArSm: string; chkSwgeProcZoneInnerSm: string; chkPblswrgPopltnSm: string; chkPblswrgPrmTrt: string; chkPblswrgScdTrt: string; chkPblswrgTertTrt: string; chkWstrPopltnSm: string; chkWstrPrmTrt: string; chkWstrScdTrt: string; chkWstrTertTrt: string; chkSwgeProcZoneInnerAr: string; chkSwgeProcZoneOuterSm: string; chkTownUnprocPopltn: string; chkTownSwttPopltn: string; chkTownWrrtnPopltn: string; chkUptownUnprPopltn: string; chkUptownSwttPopltn: string; chkUptownWrrtnPopltn: string; chkSwgeProcZoneOuterAr: string; chkPblswrgPopltnSuprt: string; chkAdtrtPopltnSuprt: string; chkSwrgInstlrt: string; chkNotConectPopltn: string; verificationResult?: SewerageSupplyRateVerificationResult; } export interface SewerageSupplyRateResponseData { statusInfo: SewerageSupplyRateStatusInfo; sewerageSupplyRateList: SewerageSupplyRateItem[]; commonInfo: SewerageSupplyRateCommonInfo; } export type SewerageSupplyRateApiResponse = ApiResponse & { message: string; } export interface SewerageSupplyRateRequestParams { sido?: string; gugun?: string; bsnmCd?: string; yr?: 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; // 하수도 통계 입력 기간 조회 export interface CheckInputPeriodResponse { status: string; message: string; data: boolean; } export interface StatisticsInputService { getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise; checkInputPeriod(params: string): Promise; saveSewerageSupplyRate(params: SewerageSupplyRateSaveItem[]): Promise; }