st: fix: 입력단 api 수정
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
import {
|
||||
type StatisticsInputSewSupplyRateService,
|
||||
type SewerageSupplyRateRequestParams,
|
||||
type SewerageSupplyRateApiResponse,
|
||||
type CheckInputPeriodResponse,
|
||||
type SewerageSupplyRateSaveRequest,
|
||||
type SewerageSupplyRateSaveApiResponse,
|
||||
} from "../../model/input/statistics-sewage-supply-rate-input-interface";
|
||||
|
||||
export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSewSupplyRateService {
|
||||
public async getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise<SewerageSupplyRateApiResponse> {
|
||||
const response = await stClient.get<SewerageSupplyRateApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`,
|
||||
{ params }
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async checkInputPeriod(params: string): Promise<CheckInputPeriodResponse> {
|
||||
const response = await stClient.get<CheckInputPeriodResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?statsYr=${params}`,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSaveApiResponse> {
|
||||
const response = await stClient.post<SewerageSupplyRateSaveApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/save`,
|
||||
params,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSaveApiResponse> {
|
||||
const response = await stClient.post<SewerageSupplyRateSaveApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/submit`,
|
||||
params,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const statisticsInputSewSupplyRateApi = new StatisticsInputSewSupplyRateApiService();
|
||||
@@ -0,0 +1,20 @@
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
import type {
|
||||
StatisticsInputStatusService,
|
||||
StatsInputStatusListRequestParams,
|
||||
StatsInputStatusListApiResponse,
|
||||
} from "../../model/input/statistics-input-status-interface";
|
||||
|
||||
export class StatisticsInputStatusApiService implements StatisticsInputStatusService {
|
||||
public async getStatisticsInputStatusList(param: StatsInputStatusListRequestParams): Promise<StatsInputStatusListApiResponse> {
|
||||
const response = await stClient.get<StatsInputStatusListApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/stats-input-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const StatisticsInputStatusApi = new StatisticsInputStatusApiService();
|
||||
Reference in New Issue
Block a user