Merge branch 'iipbs/st/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/st/dev
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
import {
|
||||
import {
|
||||
type StatisticsInputSewSupplyRateService,
|
||||
type SewerageSupplyRateRequestParams,
|
||||
type SewerageSupplyRateApiResponse,
|
||||
@@ -12,39 +12,33 @@ import {
|
||||
|
||||
export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSewSupplyRateService {
|
||||
public async getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise<SewerageSupplyRateApiResponse> {
|
||||
const response = await axios.get<SewerageSupplyRateApiResponse> (
|
||||
const response = await stClient.get<SewerageSupplyRateApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`,
|
||||
{
|
||||
params: params
|
||||
}
|
||||
{ params }
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async checkInputPeriod(params: string): Promise<CheckInputPeriodResponse> {
|
||||
const response = await axios.get<CheckInputPeriodResponse> (
|
||||
const response = await stClient.get<CheckInputPeriodResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?year=${params}`,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSaveApiResponse> {
|
||||
const response = await axios.post<SewerageSupplyRateSaveApiResponse> (
|
||||
const response = await stClient.post<SewerageSupplyRateSaveApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`,
|
||||
params
|
||||
params,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise<SewerageSupplyRateSaveApiResponse> {
|
||||
const response = await axios.post<SewerageSupplyRateSaveApiResponse> (
|
||||
const response = await stClient.post<SewerageSupplyRateSaveApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/submit`,
|
||||
params
|
||||
params,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
import type {
|
||||
import type {
|
||||
StatisticsInputStatusService,
|
||||
StatsInputStatusListRequestParams,
|
||||
StatsInputStatusListApiResponse,
|
||||
@@ -9,15 +9,12 @@ import type {
|
||||
|
||||
export class StatisticsInputStatusApiService implements StatisticsInputStatusService {
|
||||
public async getStatisticsInputStatusList(param: StatsInputStatusListRequestParams): Promise<StatsInputStatusListApiResponse> {
|
||||
const response = await axios.get<StatsInputStatusListApiResponse> (
|
||||
const response = await stClient.get<StatsInputStatusListApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/stats-input-status`,
|
||||
{
|
||||
params: param
|
||||
}
|
||||
{ params: param },
|
||||
);
|
||||
|
||||
return response.data;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export const StatisticsInputStatusApi = new StatisticsInputStatusApiService();
|
||||
@@ -1,5 +1,5 @@
|
||||
import axios from "axios";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
|
||||
import {
|
||||
@@ -38,7 +38,7 @@ export class StatisticsManagementApiService {
|
||||
public async getStatsInputStatusList(
|
||||
params: { yr?: string; bsnmCd?: string; sido?: string; gugun?: string }
|
||||
): Promise<StatsInputStatusReviewApiResponse> {
|
||||
const response = await axios.get<StatsInputStatusReviewApiResponse>(
|
||||
const response = await stClient.get<StatsInputStatusReviewApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/input-status`,
|
||||
{ params }
|
||||
);
|
||||
@@ -52,7 +52,7 @@ export class StatisticsManagementApiService {
|
||||
public async getSewerageSupplyRateReviewList(
|
||||
params: SewerageSupplyRateReviewRequestParams
|
||||
): Promise<SewerageSupplyRateReviewApiResponse> {
|
||||
const response = await axios.get<SewerageSupplyRateReviewApiResponse>(
|
||||
const response = await stClient.get<SewerageSupplyRateReviewApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/supply-rate`,
|
||||
{ params }
|
||||
);
|
||||
@@ -66,7 +66,7 @@ export class StatisticsManagementApiService {
|
||||
public async getSewagePipeReviewRegionalList(
|
||||
params: SewagePipeReviewRequestParams
|
||||
): Promise<SewagePipeReviewRegionalApiResponse> {
|
||||
const response = await axios.get<SewagePipeReviewRegionalApiResponse>(
|
||||
const response = await stClient.get<SewagePipeReviewRegionalApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/regional-status`,
|
||||
{ params }
|
||||
);
|
||||
@@ -80,7 +80,7 @@ export class StatisticsManagementApiService {
|
||||
public async getSewagePipeFacilityList(
|
||||
params: SewagePipeReviewRequestParams
|
||||
): Promise<SewagePipeFacilityApiResponse> {
|
||||
const response = await axios.get<SewagePipeFacilityApiResponse>(
|
||||
const response = await stClient.get<SewagePipeFacilityApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/facility-status`,
|
||||
{ params }
|
||||
);
|
||||
@@ -99,7 +99,7 @@ export class StatisticsManagementApiService {
|
||||
gugun?: string;
|
||||
}
|
||||
): Promise<SewerPipeTypeApiResponse> {
|
||||
const response = await axios.get<SewerPipeTypeApiResponse>(
|
||||
const response = await stClient.get<SewerPipeTypeApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/type-status`,
|
||||
{ params }
|
||||
);
|
||||
@@ -118,7 +118,7 @@ export class StatisticsManagementApiService {
|
||||
gugun?: string;
|
||||
}
|
||||
): Promise<SewerPipeDiamApiResponse> {
|
||||
const response = await axios.get<SewerPipeDiamApiResponse>(
|
||||
const response = await stClient.get<SewerPipeDiamApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/diam-status`,
|
||||
{ params }
|
||||
);
|
||||
@@ -132,7 +132,7 @@ export class StatisticsManagementApiService {
|
||||
public async getSewerPipeMtcList(
|
||||
params: SewerPipeMtcRequestParams
|
||||
): Promise<SewerPipeMtcApiResponse> {
|
||||
const response = await axios.get<SewerPipeMtcApiResponse>(
|
||||
const response = await stClient.get<SewerPipeMtcApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/repair`,
|
||||
{ params }
|
||||
);
|
||||
@@ -151,7 +151,7 @@ export class StatisticsManagementApiService {
|
||||
gugun?: string;
|
||||
}
|
||||
): Promise<SewerPipeDrdgApiResponse> {
|
||||
const response = await axios.get<SewerPipeDrdgApiResponse>(
|
||||
const response = await stClient.get<SewerPipeDrdgApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/dredging`,
|
||||
{ params }
|
||||
);
|
||||
@@ -170,7 +170,7 @@ export class StatisticsManagementApiService {
|
||||
gugun?: string;
|
||||
}
|
||||
): Promise<SewerReservoirRegionalApiResponse> {
|
||||
const response = await axios.get<SewerReservoirRegionalApiResponse>(
|
||||
const response = await stClient.get<SewerReservoirRegionalApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/facilities`,
|
||||
{ params }
|
||||
);
|
||||
@@ -189,7 +189,7 @@ export class StatisticsManagementApiService {
|
||||
gugun?: string;
|
||||
}
|
||||
): Promise<PumpingStationRegionalApiResponse> {
|
||||
const response = await axios.get<PumpingStationRegionalApiResponse>(
|
||||
const response = await stClient.get<PumpingStationRegionalApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/pumping-stations`,
|
||||
{ params }
|
||||
);
|
||||
@@ -209,7 +209,7 @@ export class StatisticsManagementApiService {
|
||||
bscFctNm?: string; // 펌프장명 (시설명)
|
||||
}
|
||||
): Promise<MediationPumpStationApiResponse> {
|
||||
const response = await axios.get<MediationPumpStationApiResponse>(
|
||||
const response = await stClient.get<MediationPumpStationApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/mediation-pump-stations`,
|
||||
{ params }
|
||||
);
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
import axios from "axios";
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
|
||||
import {
|
||||
type StatisticsService,
|
||||
type SearchCondition,
|
||||
type ApiResponse,
|
||||
type Sgg
|
||||
type Sgg,
|
||||
} from "../model/statistics-interface";
|
||||
|
||||
export class StatisticsAPiService implements StatisticsService {
|
||||
|
||||
public async getSidoList(): Promise<ApiResponse<SearchCondition>> {
|
||||
const response = await axios.get<ApiResponse<SearchCondition>>(
|
||||
const response = await stClient.get<ApiResponse<SearchCondition>>(
|
||||
`${ENDPOINT.ST_SERVICE.COMMON}/search-condition`,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
};
|
||||
}
|
||||
|
||||
public async getSggList(sidoName: string): Promise<ApiResponse<Sgg[]>> {
|
||||
const response = await axios.get<ApiResponse<Sgg[]>>(
|
||||
const response = await stClient.get<ApiResponse<Sgg[]>>(
|
||||
`${ENDPOINT.ST_SERVICE.COMMON}/sgg`,
|
||||
{
|
||||
params: {
|
||||
sidoName: sidoName,
|
||||
},
|
||||
}
|
||||
{ params: { sidoName } },
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user