st: feat: 로그 조회, 입력-하수관로 조회, 입력-하수도보급률 예외 제출
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
import { ENDPOINT } from "@/shared/config";
|
||||
import { stClient } from "@/shared/api/client";
|
||||
import type {
|
||||
SeweragePipeFacilityAdminAreaListRequest,
|
||||
SeweragePipeFacilityAdminAreaListResponse,
|
||||
SeweragePipeFacilitiesListRequest,
|
||||
SeweragePipeFacilitiesListResponse,
|
||||
SeweragePipeInputConnectionStatusResponse,
|
||||
SeweragePipeInputFactInstallResponse,
|
||||
SeweragePipeInputManholeResponse,
|
||||
SeweragePipeInputPipeDiameterResponse,
|
||||
SeweragePipeInputPipeTypeResponse,
|
||||
SeweragePipeInputRegionalFactStatusSaveRequest,
|
||||
SeweragePipeInputRegionalFactStatusSaveApiResponse,
|
||||
SeweragePipeInputRegionalResponse,
|
||||
SeweragePipeRequestParams,
|
||||
StatisticsInputSewPipeService,
|
||||
} from "../../model/input/statistics-sewage-pipe-input-interface";
|
||||
|
||||
export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeService {
|
||||
public async getRegionalFactStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputRegionalResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputRegionalResponse> (
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getFactInstallStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputFactInstallResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputFactInstallResponse> (
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getPipeTypeStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputPipeTypeResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputPipeTypeResponse> (
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-type-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getPipeDiameterStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputPipeDiameterResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputPipeDiameterResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getManholeStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputManholeResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputManholeResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/manhole-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getConnectionStatus(param: SeweragePipeRequestParams): Promise<SeweragePipeInputConnectionStatusResponse> {
|
||||
const response = await stClient.get<SeweragePipeInputConnectionStatusResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getFacilitiesList(param: SeweragePipeFacilitiesListRequest): Promise<SeweragePipeFacilitiesListResponse> {
|
||||
const response = await stClient.get<SeweragePipeFacilitiesListResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/facilities`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getFacilityAdminAreaList(param: SeweragePipeFacilityAdminAreaListRequest): Promise<SeweragePipeFacilityAdminAreaListResponse> {
|
||||
const response = await stClient.get<SeweragePipeFacilityAdminAreaListResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/areas`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async saveRegionalFactStatus(param: SeweragePipeInputRegionalFactStatusSaveRequest): Promise<SeweragePipeInputRegionalFactStatusSaveApiResponse> {
|
||||
const response = await stClient.post<SeweragePipeInputRegionalFactStatusSaveApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/save`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
};
|
||||
|
||||
export const statisticsInputSewPipeApiService = new StatisticsInputSewPipeApiService();
|
||||
@@ -36,7 +36,7 @@ export class StatisticsManagementApiService {
|
||||
* @param params (yr, bsnmCd, sido, gugun)
|
||||
*/
|
||||
public async getStatsInputStatusList(
|
||||
params: { yr?: string; bsnmCd?: string; sido?: string; gugun?: string }
|
||||
params: { statsYr?: string; sewerBzmnCd?: string; ctpvNm?: string; sggNm?: string }
|
||||
): Promise<StatsInputStatusReviewApiResponse> {
|
||||
const response = await stClient.get<StatsInputStatusReviewApiResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.REVIEW}/input-status`,
|
||||
|
||||
@@ -9,6 +9,10 @@ import {
|
||||
type cancelSubmitRequest,
|
||||
type cancelSubmitResponse,
|
||||
type ImrRequest,
|
||||
type SubmitExceptionRequest,
|
||||
type SubmitExceptionResponse,
|
||||
type StatisticsLogRequest,
|
||||
type StatisticsLogResponse,
|
||||
} from "../model/statistics-interface";
|
||||
|
||||
export class StatisticsAPiService implements StatisticsService {
|
||||
@@ -27,6 +31,14 @@ export class StatisticsAPiService implements StatisticsService {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getSggAllList(sidoName: string): Promise<ApiResponse<Sgg[]>> {
|
||||
const response = await stClient.get<ApiResponse<Sgg[]>>(
|
||||
`${ENDPOINT.ST_SERVICE.COMMON}/sgg-all`,
|
||||
{ params: { sidoName } },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// 입력 - 제출 취소
|
||||
public async cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse> {
|
||||
const response = await stClient.put<cancelSubmitResponse>(
|
||||
@@ -43,6 +55,23 @@ export class StatisticsAPiService implements StatisticsService {
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// 예외 제출
|
||||
public async submitException(param: SubmitExceptionRequest): Promise<SubmitExceptionResponse> {
|
||||
const response = await stClient.post<SubmitExceptionResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/submit-exception`,
|
||||
param
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async getLogList(param: StatisticsLogRequest): Promise<StatisticsLogResponse> {
|
||||
const response = await stClient.get<StatisticsLogResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/logs`,
|
||||
{ params: param },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
}
|
||||
|
||||
export const statisticsAPi = new StatisticsAPiService();
|
||||
Reference in New Issue
Block a user