feat:행정동 탭코드 추가
This commit is contained in:
@@ -8,6 +8,20 @@ import type {
|
||||
DomesticPopulationMappingItem,
|
||||
} from "../model/ppltn/statistics-domestic-population-interface";
|
||||
|
||||
// 1. 응답 데이터의 타입을 정의합니다 (이미 정의된 것이 있다면 그것을 사용하세요)
|
||||
interface ChartDataResponse {
|
||||
status: string;
|
||||
data: {
|
||||
X_AXIS: string[];
|
||||
TOT: number[];
|
||||
ORIGIN_MALE: (number | null)[];
|
||||
ORIGIN_FEMALE: (number | null)[];
|
||||
FOREIGN_MALE: (number | null)[];
|
||||
FOREIGN_FEMALE: (number | null)[];
|
||||
};
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export class StatisticsPpltnApiService {
|
||||
|
||||
/** 내국인 엑셀 임시 업로드 */
|
||||
@@ -154,6 +168,52 @@ export class StatisticsPpltnApiService {
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/* ════════════════════════════════════
|
||||
행정인구현황
|
||||
════════════════════════════════════ */
|
||||
|
||||
/** 행정인구현황 — 체크박스 조건에 따른 인구 현황 조회 */
|
||||
public async searchPopByEachCondition(
|
||||
statsYr: string,
|
||||
oMale: boolean,
|
||||
oFemale: boolean,
|
||||
fMale: boolean,
|
||||
fFemale: boolean,
|
||||
): Promise<{ status: string; data: object[]; message?: string }> {
|
||||
const response = await stClient.post<{ status: string; data: object[]; message?: string }>(
|
||||
`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/pop-by-condition`,
|
||||
{
|
||||
statsYr,
|
||||
oMale: oMale ? "TRUE" : "FALSE",
|
||||
oFemale: oFemale ? "TRUE" : "FALSE",
|
||||
fMale: fMale ? "TRUE" : "FALSE",
|
||||
fFemale: fFemale ? "TRUE" : "FALSE",
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/** 행정인구현황 시각화 — 기준연도 기준 최대 5년치 차트 데이터 조회 */
|
||||
public async getChartDatas1(
|
||||
statsYr: string,
|
||||
oMale: boolean,
|
||||
oFemale: boolean,
|
||||
fMale: boolean,
|
||||
fFemale: boolean,
|
||||
): Promise<ChartDataResponse> {
|
||||
const response = await stClient.post<ChartDataResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/chart-datas`,
|
||||
{
|
||||
statsYr,
|
||||
oMale: oMale ? "TRUE" : "FALSE",
|
||||
oFemale: oFemale ? "TRUE" : "FALSE",
|
||||
fMale: fMale ? "TRUE" : "FALSE",
|
||||
fFemale: fFemale ? "TRUE" : "FALSE",
|
||||
},
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user