192 lines
5.0 KiB
TypeScript
192 lines
5.0 KiB
TypeScript
import type { ApiResponse, SewerageStatusInfo, StatisticsInputCommonInfoBase } from "../statistics-interface";
|
|
|
|
/** 펌프장(ST00050001) — `PumpingStationInpColumn` tabKey */
|
|
export const PUMPING_STATION_STATS_CD = "ST00050001" as const;
|
|
|
|
/** 검증 결과 한 건 */
|
|
export interface PumpingStationVerificationResultItem {
|
|
vrfcCd: string;
|
|
rsnExpln: string;
|
|
nowVlCn: string;
|
|
compVlCn: string;
|
|
}
|
|
|
|
/** 필드명 → 검증 결과 배열 */
|
|
export type PumpingStationVerificationResult = Record<
|
|
string,
|
|
PumpingStationVerificationResultItem[]
|
|
>;
|
|
|
|
/** 펌프장 조회 `data.commonInfo` */
|
|
export interface PumpingStationCommonInfo extends StatisticsInputCommonInfoBase {
|
|
statsYr: string;
|
|
ctpvNm: string;
|
|
sewerBzmnCd: string;
|
|
statsCd: string;
|
|
verificationResult?: PumpingStationVerificationResult;
|
|
}
|
|
|
|
/**
|
|
* 펌프장 조회 `data.pumpingStationList[]` 한 행.
|
|
* `PumpingStationInpColumn` fieldName과 동일 (`ctpvNm` 그리드 값은 `commonInfo.ctpvNm` 시도명).
|
|
*/
|
|
export interface PumpingStationItem {
|
|
admdstCd: string;
|
|
sggNm: string;
|
|
admdstNm: string;
|
|
fcltSn: string;
|
|
swtrmtFcltNm: string;
|
|
fcltNm: string;
|
|
pumpSeNm: string;
|
|
fcltPstnCn: string;
|
|
oprtngStrtYmd: string;
|
|
planMltvArea: number;
|
|
sndyArea: number;
|
|
rainArea: number;
|
|
exlnQnt: number;
|
|
drtwPumpGrssPpqty: number;
|
|
drtwPumpN1DmtrArea: number;
|
|
drtwPumpN1Ppqty: number;
|
|
drtwPumpN1Cnt: number;
|
|
drtwPumpN1RsrvCnt: number;
|
|
drtwPumpN2DmtrArea: number;
|
|
drtwPumpN2Ppqty: number;
|
|
drtwPumpN2Cnt: number;
|
|
drtwPumpN2RsrvCnt: number;
|
|
drtwPumpN3DmtrArea: number;
|
|
drtwPumpN3Ppqty: number;
|
|
drtwPumpN3Cnt: number;
|
|
drtwPumpN3RsrvCnt: number;
|
|
exlnPumpGrssPpqty: number;
|
|
exlnPumpN1DmtrArea: number;
|
|
exlnPumpN1Ppqty: number;
|
|
exlnPumpN1Cnt: number;
|
|
exlnPumpN1RsrvCnt: number;
|
|
exlnPumpN2DmtrArea: number;
|
|
exlnPumpN2Ppqty: number;
|
|
exlnPumpN2Cnt: number;
|
|
exlnPumpN2RsrvCnt: number;
|
|
exlnPumpN3DmtrArea: number;
|
|
exlnPumpN3Ppqty: number;
|
|
exlnPumpN3Cnt: number;
|
|
exlnPumpN3RsrvCnt: number;
|
|
anlElpwrUseQnt: number;
|
|
rmrk: string | null;
|
|
verificationResult?: PumpingStationVerificationResult;
|
|
}
|
|
|
|
export interface PumpingStationResponseData {
|
|
statusInfo: SewerageStatusInfo;
|
|
commonInfo: PumpingStationCommonInfo;
|
|
pumpingStationList: PumpingStationItem[];
|
|
}
|
|
|
|
export type PumpingStationApiResponse = ApiResponse<PumpingStationResponseData> & {
|
|
message: string;
|
|
};
|
|
|
|
/** 펌프장(ST00050001) 조회 요청 파라미터 */
|
|
export interface PumpingStationRequestParams {
|
|
ctpvNm?: string;
|
|
sggNm?: string;
|
|
sewerBzmnCd?: string;
|
|
statsYr?: string;
|
|
mode?: string;
|
|
fcltNm?: string;
|
|
}
|
|
|
|
/**
|
|
* 펌프장(ST00050001) 저장 — `saveList` / `deleteList` 항목.
|
|
* `sggNm`·계산필드·검증결과는 저장 요청에서 제외.
|
|
*/
|
|
export type PumpingStationSaveItem = Omit<
|
|
PumpingStationItem,
|
|
| "sggNm"
|
|
| "verificationResult"
|
|
| "exlnQnt"
|
|
| "drtwPumpGrssPpqty"
|
|
| "exlnPumpGrssPpqty"
|
|
| "oprtngStrtYmd"
|
|
| "admdstCd"
|
|
| "admdstNm"
|
|
| "fcltSn"
|
|
| "swtrmtFcltNm"
|
|
| "fcltNm"
|
|
| "pumpSeNm"
|
|
| "fcltPstnCn"
|
|
> & {
|
|
admdstCd: string | null;
|
|
admdstNm: string | null;
|
|
fcltSn: string | null;
|
|
swtrmtFcltNm: string | null;
|
|
fcltNm: string | null;
|
|
pumpSeNm: string | null;
|
|
fcltPstnCn: string | null;
|
|
oprtngStrtYmd: string | null;
|
|
};
|
|
|
|
/** 펌프장(ST00050001) 저장 API 요청 */
|
|
export interface PumpingStationSaveRequest {
|
|
statsYr: string;
|
|
ctpvNm: string;
|
|
sggNm: string;
|
|
sewerBzmnCd: string;
|
|
userId: string;
|
|
superAdmin?: string;
|
|
noApplicable?: boolean;
|
|
saveList: PumpingStationSaveItem[];
|
|
deleteList: PumpingStationSaveItem[];
|
|
}
|
|
|
|
export interface PumpingStationSaveResponse {
|
|
status: string;
|
|
message?: string;
|
|
data?: string;
|
|
}
|
|
|
|
export type PumpingStationSubmitItem = PumpingStationSaveItem;
|
|
|
|
/** 펌프장(ST00050001) 제출 API 요청 */
|
|
export interface PumpingStationSubmitRequest {
|
|
statsYr: string;
|
|
ctpvNm: string;
|
|
sggNm: string;
|
|
sewerBzmnCd: string;
|
|
userId: string;
|
|
|
|
laePicNm: string;
|
|
laePicTelNo: string;
|
|
laeKbrdrDeptNm: string;
|
|
laeKbrdrJbgdNm: string;
|
|
laeIdfrNm: string;
|
|
laeIdfrTelNo: string;
|
|
laeIdfrDeptNm: string;
|
|
laeIdfrJbgdNm: string;
|
|
|
|
superAdmin?: string;
|
|
noApplicable?: boolean;
|
|
submitList: PumpingStationSubmitItem[];
|
|
deleteList: PumpingStationSubmitItem[];
|
|
}
|
|
|
|
export interface PumpingStationSubmitResponse {
|
|
status: string;
|
|
message?: string;
|
|
data?: {
|
|
finalStatus: string;
|
|
nvpassed: boolean;
|
|
};
|
|
}
|
|
|
|
export interface StatisticsInputPumpingStationService {
|
|
getPumpingStationList(
|
|
params: PumpingStationRequestParams,
|
|
): Promise<PumpingStationApiResponse>;
|
|
savePumpingStationList(
|
|
request: PumpingStationSaveRequest,
|
|
): Promise<PumpingStationSaveResponse>;
|
|
submitPumpingStationList(
|
|
request: PumpingStationSubmitRequest,
|
|
): Promise<PumpingStationSubmitResponse>;
|
|
}
|