st: refactor: 시도 및 검색연도 로직 수정

feat: 하수도보급률 전년도 데이터 가져오기 기능 추가 및 데이터 조회 시 입력 기한에 맞춰 그리드 셀 수정 or 수정 불가 로직 추가
This commit is contained in:
2026-02-04 15:21:38 +09:00
parent 6f07aca860
commit 42d6010efa
7 changed files with 123 additions and 56 deletions
@@ -5,6 +5,7 @@ import {
type StatisticsInputService,
type SewerageSupplyRateRequestParams,
type SewerageSupplyRateApiResponse,
type CheckInputPeriodResponse,
} from "../model/statistics-input-interface";
export class StatisticsInputAPiService implements StatisticsInputService {
@@ -18,6 +19,14 @@ export class StatisticsInputAPiService implements StatisticsInputService {
return response.data;
}
public async checkInputPeriod(params: string): Promise<CheckInputPeriodResponse> {
const response = await axios.get<CheckInputPeriodResponse> (
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?year=${params}`,
);
return response.data;
}
}
export const statisticsInputAPi = new StatisticsInputAPiService();
@@ -3,16 +3,16 @@ import { ENDPOINT } from "@/shared/config";
import {
type StatisticsService,
type Sido,
type SearchCondition,
type ApiResponse,
type Sgg
} from "../model/statistics-interface";
export class StatisticsAPiService implements StatisticsService {
public async getSidoList(): Promise<ApiResponse<Sido[]>> {
const response = await axios.get<ApiResponse<Sido[]>>(
`${ENDPOINT.ST_SERVICE.COMMON}/sido`,
public async getSidoList(): Promise<ApiResponse<SearchCondition>> {
const response = await axios.get<ApiResponse<SearchCondition>>(
`${ENDPOINT.ST_SERVICE.COMMON}/search-condition`,
);
return response.data;