Files
frontend/apps/st/src/entities/statistics/model/input/statistics-sewage-supply-rate-input-interface.ts
T

182 lines
5.1 KiB
TypeScript

import type { ApiResponse } from "../statistics-interface";
// 하수도 보급률 데이터 항목
export interface SewerageSupplyRateStatusInfo {
laeSbmsnSttsCd: string | null;
laeSbmsnYmd: string | null;
laePicNm: string | null;
laePicTelNo: string | null;
laeKbrdrJbgdNm: string | null;
prvnStatus: string | null;
dcsnStatus: string | null;
wrterOpinionSm: string | null;
chckerOpinionSm: string | null;
laeIdfrDeptNm: string | null;
laeIdfrJbgdNm: string | null;
laeIdfrNm: string | null;
laeIdfrTelNo: string | null;
laeKbrdrDeptNm: string | null;
}
export interface SewerageSupplyRateCommonInfo {
sewerBzmnArea: number;
sewerBzmnCd: string;
sewerBzmnFrgnrWholPpltnCnt: number;
sewerBzmnDomplWholPpltnCnt: number;
sewerBzmnWholPpltnCnt: number;
piplFcltyExtn: number;
piplPlanExtn: number;
swagePplPsplyRt: number;
ctpvNm: string;
statsYr: string;
statsCd: string;
}
/** 검증 결과 한 건 (필드별 메시지) */
export interface VerificationResultItem {
vrfcCd: string;
rsnExpln: string;
nowVlCn: string;
compVlCn: string;
}
/** 필드명 → 검증 결과 배열. 예: { popltnSm: [{ type, rsn }], wstrPrmTrt: [...] } */
export type SewerageSupplyRateVerificationResult = Record<string, VerificationResultItem[]>;
/** 하수도 보급률 목록 API 응답 한 행 (실제 응답 필드만) */
export interface SewerageSupplyRateItem {
admdstCd: string;
sggNm: string;
admdstNm: string;
rvbsn: string | null;
trbtrNm: string;
mdbsn: string;
lgbsn: string;
mdmbsn: string;
spcCtpnRgnCn: string | null;
totalPopl: number;
poplSm: number;
frgnrPoplSm: number;
refArea: number;
wholPpltnCnt: number;
wholArea: number;
wholSwtrmtPpltnCnt: number;
wholPblSwtrmtPpltnCnt: number;
ts1SwtrmtPpltnCnt: number;
ts2SwtrmtPpltnCnt: number;
ts3SwtrmtPpltnCnt: number;
wholWwtPrcsPpltnCnt: number;
ts1WwtPrcsPpltnCnt: number;
ts2WwtPrcsPpltnCnt: number;
ts3WwtPrcsPpltnCnt: number;
yetCntnPpltnCnt: number;
staaArea: number;
wholStaaExcpPpltnCnt: number;
unprcsPpltnCnt: number;
drtwPrcsPpltnCnt: number;
spctnkPpltnCnt: number;
staaExcpArea: number;
staaPsplyRt: number;
altdPrcsPsplyRt: number;
sewerInstlRt: number;
rmrk: string | null;
verificationResult?: SewerageSupplyRateVerificationResult | null;
}
export interface SewerageSupplyRateResponseData {
statusInfo: SewerageSupplyRateStatusInfo;
sewerageSupplyRateList: SewerageSupplyRateItem[];
commonInfo: SewerageSupplyRateCommonInfo;
}
export type SewerageSupplyRateApiResponse = ApiResponse<SewerageSupplyRateResponseData> & {
message: string;
}
export interface SewerageSupplyRateRequestParams {
ctpvNm?: string;
sggNm?: string;
sewerBzmnCd?: string;
statsYr?: string;
mode?: string;
}
/** 하수도 보급률 저장 API 요청 body (한 행) */
export interface SewerageSupplyRateSaveItem {
sggNm: string | null;
admdstCd: string;
admdstNm: string;
trbtrNm: string;
spcCtpnRgnCn: string | null;
ts1SwtrmtPpltnCnt: number;
ts2SwtrmtPpltnCnt: number;
ts3SwtrmtPpltnCnt: number;
ts1WwtPrcsPpltnCnt: number;
ts2WwtPrcsPpltnCnt: number;
ts3WwtPrcsPpltnCnt: number;
yetCntnPpltnCnt: number;
staaArea: number;
unprcsPpltnCnt: number;
drtwPrcsPpltnCnt: number;
spctnkPpltnCnt: number;
staaExcpArea: number;
rmrk: string;
wholPpltnCnt: number;
wholArea: number;
wholSwtrmtPpltnCnt: number;
wholPblSwtrmtPpltnCnt: number;
wholWwtPrcsPpltnCnt: number;
wholStaaExcpPpltnCnt: number;
staaPsplyRt: number;
altdPrcsPsplyRt: number;
sewerInstlRt: number;
}
export interface SewerageSupplyRateSaveRequest {
statsYr: string;
ctpvNm: string;
sggNm: string;
sewerBzmnCd: string;
userId: string;
sewerBzmnFrgnrWholPpltnCnt?: number;
saveList?: SewerageSupplyRateSaveItem[];
submitList?: SewerageSupplyRateSaveItem[];
laePicNm?: string;
laeKbrdrJbgdNm?: string;
laeKbrdrDeptNm?: string;
laePicTelNo?: string;
laeIdfrNm?: string;
laeIdfrJbgdNm?: string;
laeIdfrDeptNm?: string;
laeIdfrTelNo?: string;
superAdmin?: string;
}
export interface SewerageSupplyRateSaveResponse {
data: string;
message?: string;
status: string;
}
export interface SewerageSupplyRateSubmitResponse {
data: {
finalStatus: string;
nvpassed: boolean;
}
message?: string;
status: string;
}
// 하수도 통계 입력 기간 조회
export interface CheckInputPeriodResponse {
status: string;
message: string;
data: boolean;
}
export interface StatisticsInputSewSupplyRateService {
getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise<SewerageSupplyRateApiResponse>;
checkInputPeriod(params: string): Promise<CheckInputPeriodResponse>;
saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSaveResponse>;
submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSubmitResponse>;
}