diff --git a/apps/st/app/api/auth/logout/route.ts b/apps/st/app/api/auth/logout/route.ts deleted file mode 100644 index fdcc9df7c..000000000 --- a/apps/st/app/api/auth/logout/route.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { cookies } from "next/headers"; -import { NextResponse } from "next/server"; -import { - ACCESS_TOKEN, - AUTH_USER_ID, - CLAIM_NAME, - REFRESH_TOKEN, -} from "@/shared/config"; - -export async function POST() { - const cookieStore = await cookies(); - cookieStore.delete(ACCESS_TOKEN); - cookieStore.delete(REFRESH_TOKEN); - cookieStore.delete(AUTH_USER_ID); - cookieStore.delete(CLAIM_NAME); - return NextResponse.json({ message: "Logged out" }, { status: 200 }); -} diff --git a/apps/st/src/components/statistics/management/LogHistoryDetailDialog.tsx b/apps/st/src/components/statistics/management/LogHistoryDetailDialog.tsx index 416543fa1..46675c000 100644 --- a/apps/st/src/components/statistics/management/LogHistoryDetailDialog.tsx +++ b/apps/st/src/components/statistics/management/LogHistoryDetailDialog.tsx @@ -25,6 +25,7 @@ import { emptyLogHistoryDetailColumnInfo, LOG_DETAIL_DETAILS_FIELD, LOG_DETAIL_DETAILS_RAW_FIELD, + normalizeLogDetailList, type LogDetailVerificationItem, prepareLogDetailRowsForGrid, } from "@/components/util/column/management/LogHistoryDetailColumn"; @@ -113,9 +114,7 @@ export function LogHistoryDetailDialog({ return; } - const list = Array.isArray(response.data) - ? response.data - : []; + const list = normalizeLogDetailList(response.data); const nextColumnInfo = buildLogHistoryDetailColumnInfo(list); const nextRows = alignLogDetailRowsToColumns( prepareLogDetailRowsForGrid(list), diff --git a/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx b/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx index 75416eb35..38797a591 100644 --- a/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx +++ b/apps/st/src/components/statistics/verification/StatisticsVerificationReport.tsx @@ -173,6 +173,7 @@ function StatisticsVerificationReport() { ); const resultGridRef = useRef(null); const prevLengthRef = useRef(0); + const rejectedVrfcSnRef = useRef>(new Set()); const { data: sidoData } = useStAnlsSidoCombo(); const { data: sigunguData } = useStAnlsSigunguCombo( @@ -299,10 +300,14 @@ function StatisticsVerificationReport() { dataProvider.addRows?.(mergedNewRows); } else { // 초기 조회 또는 재조회 시 데이터 처리 - const checkedKeys = captureCheckedVrfcSn(); + const rejectedKeys = rejectedVrfcSnRef.current; + const checkedKeys = captureCheckedVrfcSn().filter( + (key) => !rejectedKeys.has(key), + ); const mergedRows = mergeWithEditedMap(nextRows); dataProvider.setRows?.(mergedRows); restoreCheckedVrfcSn(checkedKeys, mergedRows); + rejectedKeys.clear(); } prevLengthRef.current = nextRows.length; @@ -514,6 +519,10 @@ function StatisticsVerificationReport() { try { if (await confirm("반려하시겠습니까?")) { await onRejectStats(rejectRequests); + rejectRequests.forEach(({ vrfcSn }) => { + if (!Number.isNaN(vrfcSn)) + rejectedVrfcSnRef.current.add(vrfcSn); + }); } } catch { alert("반려 중 오류가 발생했습니다."); diff --git a/apps/st/src/components/util/column/management/LogHistoryDetailColumn.ts b/apps/st/src/components/util/column/management/LogHistoryDetailColumn.ts index 220aa70e5..e10e68df8 100644 --- a/apps/st/src/components/util/column/management/LogHistoryDetailColumn.ts +++ b/apps/st/src/components/util/column/management/LogHistoryDetailColumn.ts @@ -32,9 +32,46 @@ const FIELD_HEADER: Record = { sggNm: "시군구", admdstCd: "행정구역코드", admdstNm: "행정구역명", + vrfcSn: "검증순번", + vrfcNm: "검증명", + trgtStatsCd: "대상통계코드", + trgtStatsNm: "대상통계명", + vrfcClsfCd: "검증분류코드", + vrfcClsfNm: "검증분류명", + dcptDigtCnt: "소수점자릿수", + dcptPrcsMthCd: "소수점처리방법코드", + dcptPrcsMthNm: "소수점처리방법명", + useYn: "사용여부", + regDt: "등록일시", + mdfcnDt: "수정일시", [LOG_DETAIL_DETAILS_FIELD]: "상세", }; +/** 검증 규칙 로그 상세(vrfcSn 등) 컬럼 표시 순서 */ +const VERIFICATION_FIELD_ORDER = [ + "vrfcSn", + "vrfcNm", + "trgtStatsCd", + "trgtStatsNm", + "vrfcClsfCd", + "vrfcClsfNm", + "dcptDigtCnt", + "dcptPrcsMthCd", + "dcptPrcsMthNm", + "useYn", + "regDt", + "mdfcnDt", +] as const; + +/** API `data`가 배열 또는 단일 객체일 때 그리드 행 배열로 정규화 */ +export function normalizeLogDetailList( + data: StatisticsLogDetailRow[] | StatisticsLogDetailRow | null | undefined, +): StatisticsLogDetailRow[] { + if (Array.isArray(data)) return data; + if (data != null && typeof data === "object") return [data]; + return []; +} + function parseLogDetailsValue( value: unknown, ): LogDetailVerificationItem[] | null { @@ -104,11 +141,20 @@ function collectFieldNames(rows: StatisticsLogDetailRow[]): string[] { keys.add(key); } } + const verification = VERIFICATION_FIELD_ORDER.filter((k) => keys.has(k)); const common = COMMON_FIELD_ORDER.filter((k) => keys.has(k)); + const ordered = new Set([ + ...verification, + ...common, + LOG_DETAIL_DETAILS_FIELD, + ]); const rest = [...keys] - .filter((k) => !COMMON_FIELD_ORDER.includes(k as (typeof COMMON_FIELD_ORDER)[number])) + .filter((k) => !ordered.has(k) && k !== LOG_DETAIL_DETAILS_RAW_FIELD) .sort((a, b) => a.localeCompare(b, "ko")); - return [...common, ...rest]; + const details = keys.has(LOG_DETAIL_DETAILS_FIELD) + ? [LOG_DETAIL_DETAILS_FIELD] + : []; + return [...verification, ...common, ...rest, ...details]; } function isNumericField(rows: StatisticsLogDetailRow[], fieldName: string): boolean { diff --git a/apps/st/src/entities/auth/api/auth-service.ts b/apps/st/src/entities/auth/api/auth-service.ts index ea77f8a36..48ead6a84 100644 --- a/apps/st/src/entities/auth/api/auth-service.ts +++ b/apps/st/src/entities/auth/api/auth-service.ts @@ -12,10 +12,11 @@ import { } from "@common/auth"; import { - clearAuthToken, clearRefreshTimer, + removeToken, setToken, setupRefreshTimer, + tokenManager, } from "../lib/token-manager"; import { clearTabStorePersist } from "@/store/tab-store"; @@ -83,7 +84,7 @@ async function silentRefresh(): Promise { `[silentRefresh] Failed at ${new Date().toISOString()}`, error, ); - clearAuthToken(); + tokenManager.clearAuthToken(); if (typeof window !== "undefined") { window.dispatchEvent(new CustomEvent("auth:logout")); } @@ -91,7 +92,10 @@ async function silentRefresh(): Promise { } export async function logout(): Promise { - clearAuthToken(); + tokenManager.clearAuthToken(); + removeToken("site-id-key"); + removeToken("site-theme-key"); + if (typeof window !== "undefined") { window.dispatchEvent(new CustomEvent("auth:logout")); } diff --git a/apps/st/src/entities/auth/lib/token-manager.ts b/apps/st/src/entities/auth/lib/token-manager.ts index 85574f244..83affbcaf 100644 --- a/apps/st/src/entities/auth/lib/token-manager.ts +++ b/apps/st/src/entities/auth/lib/token-manager.ts @@ -9,7 +9,6 @@ export const { removeToken, setupRefreshTimer, clearRefreshTimer, - clearAuthToken, getAccessToken, getRefreshToken, getUserId, diff --git a/apps/st/src/entities/statistics/api/dashboard/dashboard-service.ts b/apps/st/src/entities/statistics/api/dashboard/dashboard-service.ts index 0bb830e61..d23946f20 100644 --- a/apps/st/src/entities/statistics/api/dashboard/dashboard-service.ts +++ b/apps/st/src/entities/statistics/api/dashboard/dashboard-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { diff --git a/apps/st/src/entities/statistics/api/dashboard/schedule-info-service.ts b/apps/st/src/entities/statistics/api/dashboard/schedule-info-service.ts index b9b593d0b..7c0363be3 100644 --- a/apps/st/src/entities/statistics/api/dashboard/schedule-info-service.ts +++ b/apps/st/src/entities/statistics/api/dashboard/schedule-info-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { diff --git a/apps/st/src/entities/statistics/api/general-verification-service.ts b/apps/st/src/entities/statistics/api/general-verification-service.ts index 4e3f3a478..b12f0d0a9 100644 --- a/apps/st/src/entities/statistics/api/general-verification-service.ts +++ b/apps/st/src/entities/statistics/api/general-verification-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service.ts index e4489bc1a..e0261b506 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -12,17 +12,16 @@ import { type StatisticsInputExcretaTreatmentFacilityService, } from "../../model/input/statistics-input-excreta-treatment-facility-interface"; -export class StatisticsInputExcretaTreatmentFacilityApiService - implements StatisticsInputExcretaTreatmentFacilityService -{ +export class StatisticsInputExcretaTreatmentFacilityApiService implements StatisticsInputExcretaTreatmentFacilityService { /** 분뇨처리시설 조회 — ST00070001 */ public async getExcretaTreatmentFacilityList( params: ExcretaTreatmentFacilityRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility`, + withAuthHeader({ params }), + ); return response.data; } @@ -30,10 +29,11 @@ export class StatisticsInputExcretaTreatmentFacilityApiService public async saveExcretaTreatmentFacilityList( request: ExcretaTreatmentFacilitySaveRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility/save`, - request, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility/save`, + request, + ); return response.data; } @@ -41,10 +41,11 @@ export class StatisticsInputExcretaTreatmentFacilityApiService public async submitExcretaTreatmentFacilityList( request: ExcretaTreatmentFacilitySubmitRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility/submit`, - request, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/excreta-treatment-facility/submit`, + request, + ); return response.data; } } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-private-sewage-facility-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-private-sewage-facility-service.ts index bcb23018c..0d5ff20c5 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-private-sewage-facility-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-private-sewage-facility-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -26,9 +26,7 @@ import { const BASE = `${ENDPOINT.ST_SERVICE.INPUT}/private-sewage-facility`; -export class StatisticsInputPrivateSewageFacilityApiService - implements StatisticsInputPrivateSewageFacilityService -{ +export class StatisticsInputPrivateSewageFacilityApiService implements StatisticsInputPrivateSewageFacilityService { /** 처리용량별 오수처리시설 현황 조회 — ST00080001 */ public async getSewageTreatFactStatusList( params: SewageTreatFactStatusRequestParams, @@ -55,10 +53,11 @@ export class StatisticsInputPrivateSewageFacilityApiService public async submitSewageTreatFactStatus( request: SewageTreatFactStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/sewage-treat-fact-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/sewage-treat-fact-status/submit`, + request, + ); return response.data; } @@ -99,10 +98,11 @@ export class StatisticsInputPrivateSewageFacilityApiService public async getPrivateSewageDesigStatusList( params: PrivateSewageDesigStatusRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/desig-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/desig-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -110,10 +110,11 @@ export class StatisticsInputPrivateSewageFacilityApiService public async savePrivateSewageDesigStatus( request: PrivateSewageDesigStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/desig-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/desig-status/save`, + request, + ); return response.data; } @@ -121,10 +122,11 @@ export class StatisticsInputPrivateSewageFacilityApiService public async submitPrivateSewageDesigStatus( request: PrivateSewageDesigStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/desig-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/desig-status/submit`, + request, + ); return response.data; } } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-pumping-station-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-pumping-station-service.ts index 7538acb7d..63492d7aa 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-pumping-station-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-pumping-station-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -47,4 +47,5 @@ export class StatisticsInputPumpingStationApiService implements StatisticsInputP } } -export const statisticsInputPumpingStationApi = new StatisticsInputPumpingStationApiService(); +export const statisticsInputPumpingStationApi = + new StatisticsInputPumpingStationApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sew-supply-rate-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sew-supply-rate-service.ts index fce1895d4..4d1b3cc52 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sew-supply-rate-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sew-supply-rate-service.ts @@ -1,19 +1,21 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; import { - type StatisticsInputSewSupplyRateService, - type SewerageSupplyRateRequestParams, - type SewerageSupplyRateApiResponse, type CheckInputPeriodResponse, + type SewerageSupplyRateApiResponse, + type SewerageSupplyRateRequestParams, type SewerageSupplyRateSaveRequest, - type SewerageSupplyRateSubmitResponse, type SewerageSupplyRateSaveResponse, + type SewerageSupplyRateSubmitResponse, + type StatisticsInputSewSupplyRateService, } from "../../model/input/statistics-sewage-supply-rate-input-interface"; export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSewSupplyRateService { - public async getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise { + public async getSewerageSupplyRateList( + params: SewerageSupplyRateRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate`, withAuthHeader({ params }), @@ -21,14 +23,18 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe return response.data; } - public async checkInputPeriod(params: string): Promise { + public async checkInputPeriod( + params: string, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUTCOMMON}/check-input-period?statsYr=${params}`, ); return response.data; } - public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise { + public async saveSewerageSupplyRate( + params: SewerageSupplyRateSaveRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/save`, params, @@ -36,7 +42,9 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe return response.data; } - public async submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise { + public async submitSewerageSupplyRate( + params: SewerageSupplyRateSaveRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/submit`, params, @@ -45,4 +53,5 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe } } -export const statisticsInputSewSupplyRateApi = new StatisticsInputSewSupplyRateApiService(); \ No newline at end of file +export const statisticsInputSewSupplyRateApi = + new StatisticsInputSewSupplyRateApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-related-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-related-service.ts index 61baeca8e..d1a1f08da 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-related-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-related-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -23,17 +23,16 @@ import type { const BASE = `${ENDPOINT.ST_SERVICE.INPUT}/sewage-excreta-related`; -export class StatisticsInputSewageExcretaRelatedApiService - implements StatisticsInputSewageExcretaRelatedService -{ +export class StatisticsInputSewageExcretaRelatedApiService implements StatisticsInputSewageExcretaRelatedService { /** 공공기관 하수분야 조회 — ST00120001 */ public async getPublicInstitutionSewerIndustryList( params: SewageExcretaRelatedRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/public-institution-sewer-industry`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/public-institution-sewer-industry`, + withAuthHeader({ params }), + ); return response.data; } @@ -63,10 +62,11 @@ export class StatisticsInputSewageExcretaRelatedApiService public async getPublicInstitutionExcretaIndustryList( params: SewageExcretaRelatedRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/public-institution-excreta-industry`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/public-institution-excreta-industry`, + withAuthHeader({ params }), + ); return response.data; } @@ -129,10 +129,11 @@ export class StatisticsInputSewageExcretaRelatedApiService public async getPrivateSewageTreatRelatedIndustryList( params: SewageExcretaRelatedRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/private-sewage-treat-related-industry`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/private-sewage-treat-related-industry`, + withAuthHeader({ params }), + ); return response.data; } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service.ts index 4d47e0e24..57a908a37 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -31,17 +31,16 @@ import type { const BASE = `${ENDPOINT.ST_SERVICE.INPUT}/sewage-excreta-slurge`; -export class StatisticsInputSewageExcretaSlurgeApiService - implements StatisticsInputSewageExcretaSlurgeService -{ +export class StatisticsInputSewageExcretaSlurgeApiService implements StatisticsInputSewageExcretaSlurgeService { /** 찌꺼기(슬러지)처리시설현황 조회 — ST00110001 */ public async getSlurgeProcessingFacStatusList( params: SewageExcretaSlurgeRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/slurge-processing-fac-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/slurge-processing-fac-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -49,10 +48,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async saveSlurgeProcessingFacStatus( request: SlurgeProcessingFacStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/slurge-processing-fac-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/slurge-processing-fac-status/save`, + request, + ); return response.data; } @@ -60,10 +60,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async submitSlurgeProcessingFacStatus( request: SlurgeProcessingFacStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/slurge-processing-fac-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/slurge-processing-fac-status/submit`, + request, + ); return response.data; } @@ -82,10 +83,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async saveDigestorOperatingStatus( request: DigestorOperatingStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/digestor-operating-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/digestor-operating-status/save`, + request, + ); return response.data; } @@ -93,10 +95,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async submitDigestorOperatingStatus( request: DigestorOperatingStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/digestor-operating-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/digestor-operating-status/submit`, + request, + ); return response.data; } @@ -104,10 +107,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async getSewageSlurgeProcessingFacStatusList( params: SewageExcretaSlurgeRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/sewage-slurge-processing-fac-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/sewage-slurge-processing-fac-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -115,10 +119,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async saveSewageSlurgeProcessingFacStatus( request: SewageSlurgeProcessingFacStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/sewage-slurge-processing-fac-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/sewage-slurge-processing-fac-status/save`, + request, + ); return response.data; } @@ -126,10 +131,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async submitSewageSlurgeProcessingFacStatus( request: SewageSlurgeProcessingFacStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/sewage-slurge-processing-fac-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/sewage-slurge-processing-fac-status/submit`, + request, + ); return response.data; } @@ -137,10 +143,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async getExcretaSlurgeProcessingStatusList( params: SewageExcretaSlurgeRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/excreta-slurge-processing-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/excreta-slurge-processing-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -148,10 +155,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async saveExcretaSlurgeProcessingStatus( request: ExcretaSlurgeProcessingStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/excreta-slurge-processing-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/excreta-slurge-processing-status/save`, + request, + ); return response.data; } @@ -159,10 +167,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async submitExcretaSlurgeProcessingStatus( request: ExcretaSlurgeProcessingStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/excreta-slurge-processing-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/excreta-slurge-processing-status/submit`, + request, + ); return response.data; } @@ -170,10 +179,11 @@ export class StatisticsInputSewageExcretaSlurgeApiService public async getPublicSewageFacilitiesList( params: PublicSewageFacilitiesListRequest, ): Promise { - const response = await stClient.get( - `${BASE}/public-sewage-facilities`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/public-sewage-facilities`, + withAuthHeader({ params }), + ); return response.data; } } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service.ts index cc366f08d..e7d2253c9 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -18,61 +18,69 @@ import type { } from "../../model/input/statistics-input-sewage-pipe-maintain-interface"; export class SewagePipeMaintainApiService implements SewagePipeMaintainService { - public async getSewagePipeMaintainRepair(param: SewagePipeMaintainRequestParams): Promise { + public async getSewagePipeMaintainRepair( + param: SewagePipeMaintainRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/repair`, - withAuthHeader({ params: param }) + withAuthHeader({ params: param }), ); return response.data; - }; + } - public async getSewagePipeMaintainDredging(param: SewagePipeMaintainRequestParams): Promise { + public async getSewagePipeMaintainDredging( + param: SewagePipeMaintainRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/dredging`, - withAuthHeader({ params: param }) + withAuthHeader({ params: param }), ); return response.data; - }; + } public async saveSewagePipeMaintainRepair( param: SewagePipeMaintainRepairSaveRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/repair/save`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/repair/save`, + param, + ); return response.data; } public async submitSewagePipeMaintainRepair( param: SewagePipeMaintainRepairSubmitRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/repair/submit`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/repair/submit`, + param, + ); return response.data; } public async saveSewagePipeMaintainDredging( param: SewagePipeMaintainDredgingSaveRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/dredging/save`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/dredging/save`, + param, + ); return response.data; } public async submitSewagePipeMaintainDredging( param: SewagePipeMaintainDredgingSubmitRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/dredging/submit`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe-maintain/dredging/submit`, + param, + ); return response.data; } } -export const sewagePipeMaintainApiService = new SewagePipeMaintainApiService(); \ No newline at end of file +export const sewagePipeMaintainApiService = new SewagePipeMaintainApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service.ts index 9e187ce30..780320b46 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service.ts @@ -1,25 +1,27 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; import { - type StatisticsInputSewageReservoirPumpService, + type RainfallPumpStationApiResponse, + type RainfallPumpStationSaveRequest, + type RainfallPumpStationSaveResponse, + type RainfallPumpStationSubmitRequest, + type RainfallPumpStationSubmitResponse, type SewageReservoirApiResponse, type SewageReservoirRequestParams, type SewageReservoirSaveRequest, type SewageReservoirSaveResponse, type SewageReservoirSubmitRequest, type SewageReservoirSubmitResponse, - type RainfallPumpStationApiResponse, - type RainfallPumpStationSaveRequest, - type RainfallPumpStationSaveResponse, - type RainfallPumpStationSubmitRequest, - type RainfallPumpStationSubmitResponse, + type StatisticsInputSewageReservoirPumpService, } from "../../model/input/statistics-input-sewage-reservoir-pump-interface"; export class StatisticsInputSewageReservoirPumpApiService implements StatisticsInputSewageReservoirPumpService { /** 하수저류시설 조회 — ST00040001 */ - public async getSewageReservoirList(params: SewageReservoirRequestParams): Promise { + public async getSewageReservoirList( + params: SewageReservoirRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-reservoir-pump/sewage-reservoir`, withAuthHeader({ params }), @@ -83,4 +85,5 @@ export class StatisticsInputSewageReservoirPumpApiService implements StatisticsI } } -export const statisticsInputSewageReservoirPumpApi = new StatisticsInputSewageReservoirPumpApiService(); +export const statisticsInputSewageReservoirPumpApi = + new StatisticsInputSewageReservoirPumpApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-finance-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-finance-service.ts index 1bac7543c..f817079e4 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-finance-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-finance-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -30,9 +30,7 @@ import { const BASE = `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-finance`; -export class StatisticsInputSewerageFinanceApiService - implements StatisticsInputSewerageFinanceService -{ +export class StatisticsInputSewerageFinanceApiService implements StatisticsInputSewerageFinanceService { /** 하수도재정 결산 조회 — ST00090001 */ public async getSewerageFinanceSettleList( params: SewerageFinanceSettleRequestParams, @@ -59,10 +57,11 @@ export class StatisticsInputSewerageFinanceApiService public async submitSewerageFinanceSettle( request: SewerageFinanceSettleSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/settle/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/settle/submit`, + request, + ); return response.data; } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-service-level-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-service-level-service.ts index 478ad0696..652a6acc4 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-service-level-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-sewerage-service-level-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -19,17 +19,16 @@ import { const BASE = `${ENDPOINT.ST_SERVICE.INPUT}/sewerage-service-level`; -export class StatisticsInputSewerageServiceLevelApiService - implements StatisticsInputSewerageServiceLevelService -{ +export class StatisticsInputSewerageServiceLevelApiService implements StatisticsInputSewerageServiceLevelService { /** 민원 조회 — ST00130001 */ public async getComplaintList( params: SewerageServiceLevelComplaintRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/complaint`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/complaint`, + withAuthHeader({ params }), + ); return response.data; } @@ -49,10 +48,11 @@ export class StatisticsInputSewerageServiceLevelApiService public async saveComplaintList( request: SewerageServiceLevelComplaintSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/complaint/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/complaint/save`, + request, + ); return response.data; } @@ -60,10 +60,11 @@ export class StatisticsInputSewerageServiceLevelApiService public async saveResidentFriendlyFactList( request: SewerageServiceLevelResidentFriendlyFactSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/resident-friendly-fact/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/resident-friendly-fact/save`, + request, + ); return response.data; } diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-status-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-status-service.ts index 20e446d41..3d3d164aa 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-status-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-status-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { diff --git a/apps/st/src/entities/statistics/api/input/statistics-input-water-reuse-service.ts b/apps/st/src/entities/statistics/api/input/statistics-input-water-reuse-service.ts index 87ec895be..b825c2604 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-input-water-reuse-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-input-water-reuse-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -41,10 +41,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async getPublicSewageTreatWaterReuseList( params: WaterReuseRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/public-sewage`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/public-sewage`, + withAuthHeader({ params }), + ); return response.data; } @@ -52,10 +53,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async savePublicSewageTreatWaterReuse( request: PublicSewageTreatWaterReuseSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/public-sewage/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/public-sewage/save`, + request, + ); return response.data; } @@ -63,10 +65,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async submitPublicSewageTreatWaterReuse( request: PublicSewageTreatWaterReuseSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/public-sewage/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/public-sewage/submit`, + request, + ); return response.data; } @@ -129,10 +132,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async submitRainFallUtilFactStatus( request: RainFallUtilFactStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/rainfall-util-fact-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/rainfall-util-fact-status/submit`, + request, + ); return response.data; } @@ -140,10 +144,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async getTreatWaterReuseDesignConstStatusList( params: WaterReuseRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/treat-water-reuse-design-const-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/treat-water-reuse-design-const-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -151,10 +156,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async saveTreatWaterReuseDesignConstStatus( request: TreatWaterReuseDesignConstStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/treat-water-reuse-design-const-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/treat-water-reuse-design-const-status/save`, + request, + ); return response.data; } @@ -162,10 +168,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async submitTreatWaterReuseDesignConstStatus( request: TreatWaterReuseDesignConstStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/treat-water-reuse-design-const-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/treat-water-reuse-design-const-status/submit`, + request, + ); return response.data; } @@ -173,10 +180,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async getTreatWaterReuseBusinessApprStatusList( params: WaterReuseRequestParams, ): Promise { - const response = await stClient.get( - `${BASE}/treat-water-reuse-business-appr-status`, - withAuthHeader({ params }), - ); + const response = + await stClient.get( + `${BASE}/treat-water-reuse-business-appr-status`, + withAuthHeader({ params }), + ); return response.data; } @@ -184,10 +192,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async saveTreatWaterReuseBusinessApprStatus( request: TreatWaterReuseBusinessApprStatusSaveRequest, ): Promise { - const response = await stClient.put( - `${BASE}/treat-water-reuse-business-appr-status/save`, - request, - ); + const response = + await stClient.put( + `${BASE}/treat-water-reuse-business-appr-status/save`, + request, + ); return response.data; } @@ -195,10 +204,11 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async submitTreatWaterReuseBusinessApprStatus( request: TreatWaterReuseBusinessApprStatusSubmitRequest, ): Promise { - const response = await stClient.put( - `${BASE}/treat-water-reuse-business-appr-status/submit`, - request, - ); + const response = + await stClient.put( + `${BASE}/treat-water-reuse-business-appr-status/submit`, + request, + ); return response.data; } @@ -206,12 +216,14 @@ export class StatisticsInputWaterReuseApiService implements StatisticsInputWater public async updateWaterReuseOperationData( request: WaterReuseOperationDataUpdateRequest, ): Promise { - const response = await stClient.put( - `${BASE}/operation-data/update`, - request, - ); + const response = + await stClient.put( + `${BASE}/operation-data/update`, + request, + ); return response.data; } } -export const statisticsInputWaterReuseApi = new StatisticsInputWaterReuseApiService(); +export const statisticsInputWaterReuseApi = + new StatisticsInputWaterReuseApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-public-sewage-facility-input-service.ts b/apps/st/src/entities/statistics/api/input/statistics-public-sewage-facility-input-service.ts index bc81d6a8b..a1e1abb85 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-public-sewage-facility-input-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-public-sewage-facility-input-service.ts @@ -1,16 +1,16 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; import type { + PublicSewageFacilityOperationDataUpdateRequest, + PublicSewageFacilityOperationDataUpdateResponse, PublicSewageFacilityRequestParams, PublicSewageFacilityResponse, PublicSewageFacilitySaveRequest, PublicSewageFacilitySaveResponse, PublicSewageFacilitySubmitRequest, PublicSewageFacilitySubmitResponse, - PublicSewageFacilityOperationDataUpdateRequest, - PublicSewageFacilityOperationDataUpdateResponse, PublicSewageMainFacilityMappingSaveRequest, PublicSewageMainFacilityMappingSaveResponse, PublicSewageMainFacilityResponse, @@ -20,7 +20,9 @@ import type { } from "../../model/input/statistics-public-sewage-facility-input-interface"; export class StatisticsInputPublicSewageFacilityApiService implements StatisticsInputPublicSewageFacilityService { - public async getPublicSewageFacility(param: PublicSewageFacilityRequestParams): Promise { + public async getPublicSewageFacility( + param: PublicSewageFacilityRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/facility`, withAuthHeader({ params: param }), @@ -28,7 +30,9 @@ export class StatisticsInputPublicSewageFacilityApiService implements Statistics return response.data; } - public async getPublicSewageMainFacility(param: PublicSewageFacilityRequestParams): Promise { + public async getPublicSewageMainFacility( + param: PublicSewageFacilityRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/main-facility`, withAuthHeader({ params: param }), @@ -49,10 +53,11 @@ export class StatisticsInputPublicSewageFacilityApiService implements Statistics public async saveMainFacilityMapping( param: PublicSewageMainFacilityMappingSaveRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/main-facility/save`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/main-facility/save`, + param, + ); return response.data; } @@ -79,12 +84,14 @@ export class StatisticsInputPublicSewageFacilityApiService implements Statistics public async updatePublicSewageFacilityOperationData( param: PublicSewageFacilityOperationDataUpdateRequest, ): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/operation-data/update`, - param, - ); + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/public-sewage-facility/operation-data/update`, + param, + ); return response.data; } } -export const statisticsInputPublicSewageFacilityApiService = new StatisticsInputPublicSewageFacilityApiService(); +export const statisticsInputPublicSewageFacilityApiService = + new StatisticsInputPublicSewageFacilityApiService(); diff --git a/apps/st/src/entities/statistics/api/input/statistics-sewage-pipe-input-service.ts b/apps/st/src/entities/statistics/api/input/statistics-sewage-pipe-input-service.ts index c506a5085..eb3df5271 100644 --- a/apps/st/src/entities/statistics/api/input/statistics-sewage-pipe-input-service.ts +++ b/apps/st/src/entities/statistics/api/input/statistics-sewage-pipe-input-service.ts @@ -1,75 +1,88 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; + import type { + SeweragePipeFacilitiesListRequest, + SeweragePipeFacilitiesListResponse, SeweragePipeFacilityAdminAreaListRequest, SeweragePipeFacilityAdminAreaListResponse, SeweragePipeFactConnectionSaveRequest, SeweragePipeFactConnectionSaveResponse, - SeweragePipeFacilitiesListRequest, - SeweragePipeFacilitiesListResponse, SeweragePipeInputConnectionStatusResponse, SeweragePipeInputFactInstallResponse, + SeweragePipeInputFactInstallStatusSaveRequest, + SeweragePipeInputFactInstallStatusSaveResponse, + SeweragePipeInputFactInstallStatusSubmitRequest, + SeweragePipeInputFactInstallStatusSubmitResponse, SeweragePipeInputManholeResponse, + SeweragePipeInputManholeStatusSaveRequest, + SeweragePipeInputManholeStatusSaveResponse, + SeweragePipeInputManholeStatusSubmitRequest, SeweragePipeInputPipeDiameterResponse, + SeweragePipeInputPipeDiameterStatusSaveRequest, + SeweragePipeInputPipeDiameterStatusSaveResponse, + SeweragePipeInputPipeDiameterStatusSubmitRequest, SeweragePipeInputPipeTypeResponse, + SeweragePipeInputPipeTypeStatusSaveRequest, + SeweragePipeInputPipeTypeStatusSaveResponse, + SeweragePipeInputPipeTypeStatusSubmitRequest, SeweragePipeInputRegionalFactStatusSaveRequest, SeweragePipeInputRegionalFactStatusSaveResponse, SeweragePipeInputRegionalFactStatusSubmitRequest, SeweragePipeInputRegionalFactStatusSubmitResponse, - SeweragePipeInputFactInstallStatusSubmitRequest, - SeweragePipeInputFactInstallStatusSubmitResponse, SeweragePipeInputRegionalResponse, + SeweragePipeInputSubmitResponse, SeweragePipeRequestParams, StatisticsInputSewPipeService, - SeweragePipeInputFactInstallStatusSaveRequest, - SeweragePipeInputFactInstallStatusSaveResponse, - SeweragePipeInputPipeTypeStatusSaveRequest, - SeweragePipeInputPipeTypeStatusSaveResponse, - SeweragePipeInputPipeTypeStatusSubmitRequest, - SeweragePipeInputPipeDiameterStatusSaveRequest, - SeweragePipeInputPipeDiameterStatusSaveResponse, - SeweragePipeInputPipeDiameterStatusSubmitRequest, - SeweragePipeInputManholeStatusSaveRequest, - SeweragePipeInputManholeStatusSaveResponse, - SeweragePipeInputManholeStatusSubmitRequest, - SeweragePipeInputSubmitResponse, } from "../../model/input/statistics-sewage-pipe-input-interface"; export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeService { - public async getRegionalFactStatus(param: SeweragePipeRequestParams): Promise { - const response = await stClient.get ( + public async getRegionalFactStatus( + param: SeweragePipeRequestParams, + ): Promise { + const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status`, withAuthHeader({ params: param }), ); return response.data; } - public async getFactInstallStatus(param: SeweragePipeRequestParams): Promise { - const response = await stClient.get ( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status`, - withAuthHeader({ params: param }), - ); + public async getFactInstallStatus( + param: SeweragePipeRequestParams, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status`, + withAuthHeader({ params: param }), + ); return response.data; } - public async getPipeTypeStatus(param: SeweragePipeRequestParams): Promise { - const response = await stClient.get ( + public async getPipeTypeStatus( + param: SeweragePipeRequestParams, + ): Promise { + const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-type-status`, withAuthHeader({ params: param }), ); return response.data; } - public async getPipeDiameterStatus(param: SeweragePipeRequestParams): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status`, - withAuthHeader({ params: param }), - ); + public async getPipeDiameterStatus( + param: SeweragePipeRequestParams, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status`, + withAuthHeader({ params: param }), + ); return response.data; } - public async getManholeStatus(param: SeweragePipeRequestParams): Promise { + public async getManholeStatus( + param: SeweragePipeRequestParams, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/manhole-status`, withAuthHeader({ params: param }), @@ -77,15 +90,20 @@ export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeS return response.data; } - public async getConnectionStatus(param: SeweragePipeRequestParams): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status`, - withAuthHeader({ params: param }), - ); + public async getConnectionStatus( + param: SeweragePipeRequestParams, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status`, + withAuthHeader({ params: param }), + ); return response.data; } - public async getFacilitiesList(param: SeweragePipeFacilitiesListRequest): Promise { + public async getFacilitiesList( + param: SeweragePipeFacilitiesListRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/facilities`, withAuthHeader({ params: param }), @@ -93,63 +111,86 @@ export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeS return response.data; } - public async getFacilityAdminAreaList(param: SeweragePipeFacilityAdminAreaListRequest): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/areas`, - withAuthHeader({ params: param }), - ); + public async getFacilityAdminAreaList( + param: SeweragePipeFacilityAdminAreaListRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/areas`, + withAuthHeader({ params: param }), + ); return response.data; } - public async saveFactConnection(param: SeweragePipeFactConnectionSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/save`, - param, - ); + public async saveFactConnection( + param: SeweragePipeFactConnectionSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-connection-status/popup/save`, + param, + ); return response.data; } - public async saveRegionalFactStatus(param: SeweragePipeInputRegionalFactStatusSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/save`, - param, - ); + public async saveRegionalFactStatus( + param: SeweragePipeInputRegionalFactStatusSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/save`, + param, + ); return response.data; } - public async submitRegionalFactStatus(param: SeweragePipeInputRegionalFactStatusSubmitRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/submit`, - param, - ); + public async submitRegionalFactStatus( + param: SeweragePipeInputRegionalFactStatusSubmitRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/submit`, + param, + ); return response.data; } - public async saveFactInstallStatus(param: SeweragePipeInputFactInstallStatusSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status/save`, - param, - ); + public async saveFactInstallStatus( + param: SeweragePipeInputFactInstallStatusSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status/save`, + param, + ); return response.data; } - public async submitFactInstallStatus(param: SeweragePipeInputFactInstallStatusSubmitRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status/submit`, - param, - ); + public async submitFactInstallStatus( + param: SeweragePipeInputFactInstallStatusSubmitRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/facility-install-status/submit`, + param, + ); return response.data; } - public async savePipeTypeStatus(param: SeweragePipeInputPipeTypeStatusSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-type-status/save`, - param, - ); + public async savePipeTypeStatus( + param: SeweragePipeInputPipeTypeStatusSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-type-status/save`, + param, + ); return response.data; } - public async submitPipeTypeStatus(param: SeweragePipeInputPipeTypeStatusSubmitRequest): Promise { + public async submitPipeTypeStatus( + param: SeweragePipeInputPipeTypeStatusSubmitRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-type-status/submit`, param, @@ -157,15 +198,20 @@ export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeS return response.data; } - public async savePipeDiameterStatus(param: SeweragePipeInputPipeDiameterStatusSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status/save`, - param, - ); + public async savePipeDiameterStatus( + param: SeweragePipeInputPipeDiameterStatusSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status/save`, + param, + ); return response.data; } - public async submitPipeDiameterStatus(param: SeweragePipeInputPipeDiameterStatusSubmitRequest): Promise { + public async submitPipeDiameterStatus( + param: SeweragePipeInputPipeDiameterStatusSubmitRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/pipe-diameter-status/submit`, param, @@ -173,21 +219,27 @@ export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeS return response.data; } - public async saveManholeStatus(param: SeweragePipeInputManholeStatusSaveRequest): Promise { - const response = await stClient.put( - `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/manhole-status/save`, - param, - ); + public async saveManholeStatus( + param: SeweragePipeInputManholeStatusSaveRequest, + ): Promise { + const response = + await stClient.put( + `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/manhole-status/save`, + param, + ); return response.data; } - public async submitManholeStatus(param: SeweragePipeInputManholeStatusSubmitRequest): Promise { + public async submitManholeStatus( + param: SeweragePipeInputManholeStatusSubmitRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/manhole-status/submit`, param, ); return response.data; } -}; +} -export const statisticsInputSewPipeApiService = new StatisticsInputSewPipeApiService(); \ No newline at end of file +export const statisticsInputSewPipeApiService = + new StatisticsInputSewPipeApiService(); diff --git a/apps/st/src/entities/statistics/api/sewer-st-user-service.ts b/apps/st/src/entities/statistics/api/sewer-st-user-service.ts index fb0184820..89ee337a9 100644 --- a/apps/st/src/entities/statistics/api/sewer-st-user-service.ts +++ b/apps/st/src/entities/statistics/api/sewer-st-user-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; import type { diff --git a/apps/st/src/entities/statistics/api/statistics-management-service.ts b/apps/st/src/entities/statistics/api/statistics-management-service.ts index 93bed5573..94f1636c5 100644 --- a/apps/st/src/entities/statistics/api/statistics-management-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-management-service.ts @@ -1,81 +1,80 @@ +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; -import { stClient } from "@/shared/api/client"; - -import type { - StatsInputStatusReviewApiResponse, - ReviewHistoryRequest, - ReviewHistoryResponse, -} from "../model/statistics-input-review-interface"; -import { - type SewerageSupplyRateReviewRequestParams, - type SewerageSupplyRateReviewApiResponse, -} from "../model/statistics-sewerage-penetration-review-interface"; -import { - type SewagePipeReviewRequestParams, - type SewagePipeReviewRegionalApiResponse, - type SewagePipeFacilityApiResponse, - type SewerPipeTypeApiResponse, - type SewerPipeDiamApiResponse, - type SewagePipeManholeApiResponse, -} from "../model/statistics-sewage-pipe-review-interface"; -import { - type SewerPipeMtcApiResponse, - type SewerPipeDrdgApiResponse, - type SewerPipeMtcRequestParams -} from "../model/statistics-sewage-pipe-mtc-review-interface"; import { + type PumpingStationRegionalApiResponse, type SewerReservoirRegionalApiResponse, - type PumpingStationRegionalApiResponse } from "../model/sewage-reservoir-pump-review-interface"; -import { - type MediationPumpStationApiResponse, -} from "../model/statistics-pumping-station-review-interface"; -import { - type PublicSewageFacilityReviewApiResponse, - type PublicSewageFacilityReviewRequestParams, -} from "../model/statistics-public-sewage-facility-review-interface"; import { type ExcretaTreatmentFacilityReviewApiResponse, type ExcretaTreatmentFacilityReviewRequestParams, } from "../model/statistics-excreta-treatment-facility-review-interface"; +import type { + ReviewHistoryRequest, + ReviewHistoryResponse, + StatsInputStatusReviewApiResponse, +} from "../model/statistics-input-review-interface"; import { type PrivateSewageFacilityReviewApiResponse, type PrivateSewageFacilityReviewRequestParams, } from "../model/statistics-private-sewage-facility-review-interface"; import { - type SewerageFinanceReviewApiResponse, - type SewerageFinanceReviewRequestParams, -} from "../model/statistics-sewerage-finance-review-interface"; -import { - type WaterReuseReviewApiResponse, - type WaterReuseReviewRequestParams, -} from "../model/statistics-water-reuse-review-interface"; -import { - type SewageExcretaSlurgeReviewApiResponse, - type SewageExcretaSlurgeReviewRequestParams, -} from "../model/statistics-sewage-excreta-slurge-review-interface"; + type PublicSewageFacilityReviewApiResponse, + type PublicSewageFacilityReviewRequestParams, +} from "../model/statistics-public-sewage-facility-review-interface"; +import { type MediationPumpStationApiResponse } from "../model/statistics-pumping-station-review-interface"; import { type SewageExcretaRelatedReviewApiResponse, type SewageExcretaRelatedReviewRequestParams, } from "../model/statistics-sewage-excreta-related-review-interface"; +import { + type SewageExcretaSlurgeReviewApiResponse, + type SewageExcretaSlurgeReviewRequestParams, +} from "../model/statistics-sewage-excreta-slurge-review-interface"; +import { + type SewerPipeDrdgApiResponse, + type SewerPipeMtcApiResponse, + type SewerPipeMtcRequestParams, +} from "../model/statistics-sewage-pipe-mtc-review-interface"; +import { + type SewagePipeFacilityApiResponse, + type SewagePipeManholeApiResponse, + type SewagePipeReviewRegionalApiResponse, + type SewagePipeReviewRequestParams, + type SewerPipeDiamApiResponse, + type SewerPipeTypeApiResponse, +} from "../model/statistics-sewage-pipe-review-interface"; +import { + type SewerageFinanceReviewApiResponse, + type SewerageFinanceReviewRequestParams, +} from "../model/statistics-sewerage-finance-review-interface"; +import { + type SewerageSupplyRateReviewApiResponse, + type SewerageSupplyRateReviewRequestParams, +} from "../model/statistics-sewerage-penetration-review-interface"; import { type SewerageServiceLevelReviewApiResponse, type SewerageServiceLevelReviewRequestParams, } from "../model/statistics-sewerage-service-level-review-interface"; - +import { + type WaterReuseReviewApiResponse, + type WaterReuseReviewRequestParams, +} from "../model/statistics-water-reuse-review-interface"; export class StatisticsManagementApiService { /** * 00. 통계 입력 현황 목록 조회 * @param params (yr, bsnmCd, sido, gugun) */ - public async getStatsInputStatusList( - params: { statsYr?: string; sewerBzmnCd?: string; ctpvNm?: string; sggNm?: string } - ): Promise { + public async getStatsInputStatusList(params: { + statsYr?: string; + sewerBzmnCd?: string; + ctpvNm?: string; + sggNm?: string; + }): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/input-status`, - { params } + { params }, ); return response.data; } @@ -85,12 +84,13 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd) */ public async getSewerageSupplyRateReviewList( - params: SewerageSupplyRateReviewRequestParams + params: SewerageSupplyRateReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/supply-rate`, - { params } - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/supply-rate`, + { params }, + ); return response.data; } @@ -99,12 +99,13 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd, fctName) */ public async getPublicSewageFacilityReviewList( - params: PublicSewageFacilityReviewRequestParams + params: PublicSewageFacilityReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/public-sewage`, - { params } - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/public-sewage`, + { params }, + ); return response.data; } @@ -115,10 +116,11 @@ export class StatisticsManagementApiService { public async getExcretaTreatmentFacilityReviewList( params: ExcretaTreatmentFacilityReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/excreta-treatment`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/excreta-treatment`, + { params }, + ); return response.data; } @@ -127,12 +129,13 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd) */ public async getSewagePipeReviewRegionalList( - params: SewagePipeReviewRequestParams + params: SewagePipeReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/regional-status`, - { params } - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/regional-status`, + { params }, + ); return response.data; } @@ -141,25 +144,25 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd) */ public async getSewagePipeFacilityList( - params: SewagePipeReviewRequestParams + params: SewagePipeReviewRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/facility-status`, - { params } + { params }, ); return response.data; } /** - * 02. 하수관로 관종별 시설현황 조회 (Tab3) - * @param params (sido, gugun, yr, bsnmCd) - */ + * 02. 하수관로 관종별 시설현황 조회 (Tab3) + * @param params (sido, gugun, yr, bsnmCd) + */ public async getSewagePipeTypeList( - params: SewagePipeReviewRequestParams + params: SewagePipeReviewRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/type-status`, - { params } + { params }, ); return response.data; } @@ -169,11 +172,11 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd) */ public async getSewagePipeDiamList( - params: SewagePipeReviewRequestParams + params: SewagePipeReviewRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/diam-status`, - { params } + { params }, ); return response.data; } @@ -183,11 +186,11 @@ export class StatisticsManagementApiService { * @param params (sido, gugun, yr, bsnmCd) */ public async getSewagePipeManholeList( - params: SewagePipeReviewRequestParams + params: SewagePipeReviewRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe/manhole`, - { params } + { params }, ); return response.data; } @@ -197,11 +200,11 @@ export class StatisticsManagementApiService { * @param params (yr, bsnmCd, sido, gugun) */ public async getSewerPipeMtcList( - params: SewerPipeMtcRequestParams + params: SewerPipeMtcRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/repair`, - { params } + { params }, ); return response.data; } @@ -211,11 +214,11 @@ export class StatisticsManagementApiService { * @param params (yr, bsnmCd, sido, gugun) */ public async getSewerPipeDrdgList( - params: SewerPipeMtcRequestParams + params: SewerPipeMtcRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-pipe-mtc/dredging`, - { params } + { params }, ); return response.data; } @@ -225,11 +228,11 @@ export class StatisticsManagementApiService { * @param params (yr, bsnmCd, sido, gugun) */ public async getSewerReservoirList( - params: SewerPipeMtcRequestParams + params: SewerPipeMtcRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/facilities`, - { params } + { params }, ); return response.data; } @@ -239,11 +242,11 @@ export class StatisticsManagementApiService { * @param params (yr, bsnmCd, sido, gugun) */ public async getPumpStationList( - params: SewerPipeMtcRequestParams + params: SewerPipeMtcRequestParams, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/sewer-reservoir/pumping-stations`, - { params } + { params }, ); return response.data; } @@ -252,18 +255,16 @@ export class StatisticsManagementApiService { * 05. 중계펌프장 통계관리 조회 * @param params (yr, bsnmCd, sido, gugun, bscFctNm) */ - public async getMediationPumpStationList( - params: { - ctpvNm?: string; - sggNm?: string; - statsYr?: string; - sewerBzmnCd?: string; - fcltNm?: string; - } - ): Promise { + public async getMediationPumpStationList(params: { + ctpvNm?: string; + sggNm?: string; + statsYr?: string; + sewerBzmnCd?: string; + fcltNm?: string; + }): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/mediation-pump-stations`, - { params } + { params }, ); return response.data; } @@ -274,10 +275,11 @@ export class StatisticsManagementApiService { public async getPrivateSewageTreatFactStatusReviewList( params: PrivateSewageFacilityReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/private-sevage`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/private-sevage`, + { params }, + ); return response.data; } @@ -287,10 +289,11 @@ export class StatisticsManagementApiService { public async getSepticTankStatusReviewList( params: PrivateSewageFacilityReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/private-tank-status`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/private-tank-status`, + { params }, + ); return response.data; } @@ -300,10 +303,11 @@ export class StatisticsManagementApiService { public async getPrivateSewageDesigStatusReviewList( params: PrivateSewageFacilityReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/private-mgmt-area`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/private-mgmt-area`, + { params }, + ); return response.data; } @@ -430,10 +434,11 @@ export class StatisticsManagementApiService { public async getSludgeProcessingReviewList( params: SewageExcretaSlurgeReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-processing`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-processing`, + { params }, + ); return response.data; } @@ -443,10 +448,11 @@ export class StatisticsManagementApiService { public async getSludgeDigestionTankReviewList( params: SewageExcretaSlurgeReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-digestion-tank`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-digestion-tank`, + { params }, + ); return response.data; } @@ -456,10 +462,11 @@ export class StatisticsManagementApiService { public async getSludgeFacilityOperReviewList( params: SewageExcretaSlurgeReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-facility-oper`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-facility-oper`, + { params }, + ); return response.data; } @@ -469,10 +476,11 @@ export class StatisticsManagementApiService { public async getHumanWasteSludgeReviewList( params: SewageExcretaSlurgeReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-human-waste`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sludge-human-waste`, + { params }, + ); return response.data; } @@ -482,10 +490,11 @@ export class StatisticsManagementApiService { public async getPublicSewageStaffReviewList( params: SewageExcretaRelatedReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/public-sewage-staff`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/public-sewage-staff`, + { params }, + ); return response.data; } @@ -495,10 +504,11 @@ export class StatisticsManagementApiService { public async getPublicHumanWasteStaffReviewList( params: SewageExcretaRelatedReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/public-human-waste-staff`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/public-human-waste-staff`, + { params }, + ); return response.data; } @@ -508,10 +518,11 @@ export class StatisticsManagementApiService { public async getHumanWasteCollectionReviewList( params: SewageExcretaRelatedReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/human-waste-collection`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/human-waste-collection`, + { params }, + ); return response.data; } @@ -521,10 +532,11 @@ export class StatisticsManagementApiService { public async getIndvSwtrmtRelBsnsReviewList( params: SewageExcretaRelatedReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/indv-swtrmt-rel-bsns`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/indv-swtrmt-rel-bsns`, + { params }, + ); return response.data; } @@ -534,10 +546,11 @@ export class StatisticsManagementApiService { public async getSewageComplaintReviewList( params: SewerageServiceLevelReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/sewage-complaint`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/sewage-complaint`, + { params }, + ); return response.data; } @@ -547,21 +560,24 @@ export class StatisticsManagementApiService { public async getResidentFriendlyFacilityReviewList( params: SewerageServiceLevelReviewRequestParams, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/resident-friendly-facility`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/resident-friendly-facility`, + { params }, + ); return response.data; } - public async getReviewHistory(params: ReviewHistoryRequest): Promise { + public async getReviewHistory( + params: ReviewHistoryRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/history`, - { params } + { params }, ); return response.data; } } // 통합 인스턴스 수출 -export const statisticsManagementApi = new StatisticsManagementApiService(); \ No newline at end of file +export const statisticsManagementApi = new StatisticsManagementApiService(); diff --git a/apps/st/src/entities/statistics/api/statistics-ppltn-service.ts b/apps/st/src/entities/statistics/api/statistics-ppltn-service.ts index 84565434d..a4dbffa97 100644 --- a/apps/st/src/entities/statistics/api/statistics-ppltn-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-ppltn-service.ts @@ -1,29 +1,28 @@ +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; -import { stClient } from "@/shared/api/client"; import type { - DomesticPopulationListResponse, DomesticPopulationFinalResponse, - UpperCodesByNameResponse, + DomesticPopulationListResponse, DomesticPopulationMappingItem, + UpperCodesByNameResponse, } 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; + 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 { - /** 내국인 엑셀 임시 업로드 */ public async uploadDomesticPopulationExcel( file: File, @@ -33,11 +32,12 @@ export class StatisticsPpltnApiService { formData.append("file", file); formData.append("statsYr", statsYr); - const response = await stClient.post<{ status: string; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/domestic-population-excel`, - formData, - { headers: { "Content-Type": "multipart/form-data" } }, - ); + const response = await stClient.post<{ + status: string; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/domestic-population-excel`, formData, { + headers: { "Content-Type": "multipart/form-data" }, + }); return response.data; } @@ -71,22 +71,22 @@ export class StatisticsPpltnApiService { public async getUpperCodesByName( statsYr: string, admdstNm: string, - admdstCd: string + admdstCd: string, ): Promise { // GET 요청으로 변경하고 params 객체를 추가합니다. const response = await stClient.get( `${ENDPOINT.ST_SERVICE.PPLTN}/upper-codes-by-name`, - { - params: { statsYr, admdstNm,admdstCd } + { + params: { statsYr, admdstNm, admdstCd }, }, ); return response.data; } - + /* ════════════════════════════════════ 외국인 ════════════════════════════════════ */ - + /** 외국인 엑셀 임시 업로드 */ public async uploadForeignPopulationExcel( file: File, @@ -95,14 +95,15 @@ export class StatisticsPpltnApiService { const formData = new FormData(); formData.append("file", file); formData.append("statsYr", statsYr); - const response = await stClient.post<{ status: string; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-excel`, - formData, - { headers: { "Content-Type": "multipart/form-data" } }, - ); + const response = await stClient.post<{ + status: string; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-excel`, formData, { + headers: { "Content-Type": "multipart/form-data" }, + }); return response.data; } - + /** 외국인 임시 적재 리스트 조회 * @param opt1 "1" = 전체 리스트(좌측), "2" = 미매핑 리스트(우측) */ @@ -110,30 +111,35 @@ export class StatisticsPpltnApiService { statsYr: string, opt1: "1" | "2", ): Promise<{ status: string; data: object[]; message?: string }> { - const response = await stClient.get<{ status: string; data: object[]; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-list`, - { params: { statsYr, opt1 } }, - ); + const response = await stClient.get<{ + status: string; + data: object[]; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-list`, { + params: { statsYr, opt1 }, + }); return response.data; } - + /** 외국인 최종 마스터 반영 */ public async saveForeignPopulationFinal( statsYr: string, regList: DomesticPopulationMappingItem[], ): Promise<{ status: string; message?: string }> { - const response = await stClient.post<{ status: string; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-final`, - { statsYr, regList }, - ); + const response = await stClient.post<{ + status: string; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/foreign-population-final`, { + statsYr, + regList, + }); return response.data; } - /* ════════════════════════════════════ 행정동갱신 ════════════════════════════════════ */ - + /** 행정동 갱신 — 감축/추가 행정구역 조회 * @param opt1 "1" = 추가된 행정구역, "2" = 감축된 행정구역 */ @@ -141,25 +147,31 @@ export class StatisticsPpltnApiService { statsYr: string, opt1: "1" | "2", ): Promise<{ status: string; data: object[]; message?: string }> { - const response = await stClient.get<{ status: string; data: object[]; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/search`, - { params: { statsYr, opt1 } }, - ); + const response = await stClient.get<{ + status: string; + data: object[]; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/search`, { + params: { statsYr, opt1 }, + }); return response.data; } - + /** 행정동 갱신 — 감축/추가 반영 */ public async saveChangedArea( reducedList: object[], addedList: object[], ): Promise<{ status: string; message?: string }> { - const response = await stClient.post<{ status: string; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/save`, - { reducedList, addedList }, - ); + const response = await stClient.post<{ + status: string; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/save`, { + reducedList, + addedList, + }); return response.data; } - + // /** 행정동 갱신 — 법정동코드 후보 조회 (행정동명 클릭 시) */ // public async getRenewalUpperCodesByName( // statsYr: string, @@ -167,29 +179,29 @@ export class StatisticsPpltnApiService { // ): Promise { // const response = await stClient.get( // `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/upper-codes-by-name`, - // { - // params: { statsYr, admdstNm } + // { + // params: { statsYr, admdstNm } // }, // ); // return response.data; // } /** 행정동 갱신 — 법정동코드 후보 조회 */ -public async getLawCdsByName( - adstCd : string, -): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/law-codes-by-name`, - { - params: { adstCd } - }, - ); - return response.data; -} - /* ════════════════════════════════════ + public async getLawCdsByName( + adstCd: string, + ): Promise { + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/law-codes-by-name`, + { + params: { adstCd }, + }, + ); + return response.data; + } + /* ════════════════════════════════════ 행정인구현황 ════════════════════════════════════ */ - + /** 행정인구현황 — 체크박스 조건에 따른 인구 현황 조회 */ public async searchPopByEachCondition( statsYr: string, @@ -198,18 +210,19 @@ public async getLawCdsByName( fMale: boolean, fFemale: boolean, ): Promise<{ status: string; data: object[]; message?: string }> { - const response = await stClient.get<{ status: string; data: object[]; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/pop-by-condition`, - { - params: { - statsYr, - oMale: oMale ? "TRUE" : "FALSE", - oFemale: oFemale ? "TRUE" : "FALSE", - fMale: fMale ? "TRUE" : "FALSE", - fFemale: fFemale ? "TRUE" : "FALSE", - } + const response = await stClient.get<{ + status: string; + data: object[]; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/pop-by-condition`, { + params: { + statsYr, + oMale: oMale ? "TRUE" : "FALSE", + oFemale: oFemale ? "TRUE" : "FALSE", + fMale: fMale ? "TRUE" : "FALSE", + fFemale: fFemale ? "TRUE" : "FALSE", }, - ); + }); return response.data; } @@ -230,21 +243,23 @@ public async getLawCdsByName( oFemale: oFemale ? "TRUE" : "FALSE", fMale: fMale ? "TRUE" : "FALSE", fFemale: fFemale ? "TRUE" : "FALSE", - } + }, }, ); return response.data; } /** 행정동 갱신 — MATERIALIZED VIEW 갱신 */ - public async refreshMaterializedViews(): Promise<{ status: string; message?: string }> { - const response = await stClient.post<{ status: string; message?: string }>( - `${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/refresh`, - ); + public async refreshMaterializedViews(): Promise<{ + status: string; + message?: string; + }> { + const response = await stClient.post<{ + status: string; + message?: string; + }>(`${ENDPOINT.ST_SERVICE.PPLTN}/admdst-renewal/refresh`); return response.data; } } - - -export const statisticsPpltnApi = new StatisticsPpltnApiService(); \ No newline at end of file +export const statisticsPpltnApi = new StatisticsPpltnApiService(); diff --git a/apps/st/src/entities/statistics/api/statistics-service.ts b/apps/st/src/entities/statistics/api/statistics-service.ts index 557c47150..5762b0bfe 100644 --- a/apps/st/src/entities/statistics/api/statistics-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-service.ts @@ -1,4 +1,4 @@ -import { client, stClient } from "@/shared/api/client"; +import { client, stClient } from "@/shared/api"; import { withAuthHeader } from "@/shared/api/with-auth-header"; import { ENDPOINT } from "@/shared/config"; @@ -98,7 +98,9 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - public async getStatsInputPeriodDetail(params: StatsInputPeriodDetailRequest): Promise { + public async getStatsInputPeriodDetail( + params: StatsInputPeriodDetailRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.DASHBOARD}/schedule-info/detail`, withAuthHeader({ params }), @@ -122,10 +124,11 @@ export class StatisticsApiService implements StatisticsService { public async deleteStatsInputPeriod( param: StatsInputPeriodDeleteRequest, ): Promise { - const response = await stClient.delete( - `${ENDPOINT.ST_SERVICE.DASHBOARD}/schedule-info`, - withAuthHeader({ data: param }), - ); + const response = + await stClient.delete( + `${ENDPOINT.ST_SERVICE.DASHBOARD}/schedule-info`, + withAuthHeader({ data: param }), + ); return response.data; } @@ -241,7 +244,9 @@ export class StatisticsApiService implements StatisticsService { } const type = first.type; if (!items.every((i) => i.type === type)) { - throw new Error("saveInputReturn: 모든 항목의 type이 같아야 합니다."); + throw new Error( + "saveInputReturn: 모든 항목의 type이 같아야 합니다.", + ); } const body = items.map(({ type: _t, rjctOpnnCn, ...rest }) => { const row: Record = { @@ -288,7 +293,9 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - public async getVerificationResultList(param: VerificationResultListRequest): Promise { + public async getVerificationResultList( + param: VerificationResultListRequest, + ): Promise { const { statsCd, ...rest } = param; const params: VerificationResultListRequest = { ...rest, @@ -301,7 +308,9 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - public async SubmitVerifyException(param: SubmitVerifyExceptionRequest): Promise { + public async SubmitVerifyException( + param: SubmitVerifyExceptionRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUTVERIFY}/results/exception`, param, @@ -309,7 +318,9 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - public async getReviewerInfo(param: ReviewerInfoRequest): Promise { + public async getReviewerInfo( + param: ReviewerInfoRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.REVIEW}/reviewer-info`, withAuthHeader({ params: param }), @@ -317,31 +328,40 @@ export class StatisticsApiService implements StatisticsService { return response.data; } - public async getStatiscicsManagementReviewHistory(param: StatiscicsManagementReviewHistoryRequest): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.REVIEW}/stats-review`, - { params: param }, - ); + public async getStatiscicsManagementReviewHistory( + param: StatiscicsManagementReviewHistoryRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.REVIEW}/stats-review`, + { params: param }, + ); return response.data; } - public async StatiscicsExceptionReset(param: StatiscicsExceptionResetRequest): Promise { + public async StatiscicsExceptionReset( + param: StatiscicsExceptionResetRequest, + ): Promise { const response = await stClient.put( `${ENDPOINT.ST_SERVICE.INPUTVERIFY}/results/exception/reset`, param, ); return response.data; } - - public async CheckStatusCode(param: CheckStatusCodeRequest): Promise { + + public async CheckStatusCode( + param: CheckStatusCodeRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.INPUTCOMMON}/status-code`, { params: param }, ); return response.data; } - - public async getUnSubmitData(param: unSubmitDataRequest): Promise { + + public async getUnSubmitData( + param: unSubmitDataRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.DASHBOARD}/submission-status`, { params: param }, diff --git a/apps/st/src/entities/statistics/api/statistics-sewerage-aggregate-summary-service.ts b/apps/st/src/entities/statistics/api/statistics-sewerage-aggregate-summary-service.ts index 1cbade954..1df4403b8 100644 --- a/apps/st/src/entities/statistics/api/statistics-sewerage-aggregate-summary-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-sewerage-aggregate-summary-service.ts @@ -1,4 +1,4 @@ -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { SEWERAGE_AGGREGATE_SUMMARY_EXCEL_MIME, @@ -17,7 +17,9 @@ const DOWNLOAD_TIMEOUT_MS = 3_600_000; function parseDownloadFileName(contentDisposition: string): string | undefined { if (!contentDisposition) return undefined; - const utf8Match = contentDisposition.match(/filename\*\s*=\s*UTF-8''([^;]+)/i); + const utf8Match = contentDisposition.match( + /filename\*\s*=\s*UTF-8''([^;]+)/i, + ); if (utf8Match?.[1]) { return decodeURIComponent(utf8Match[1].trim()); } @@ -44,13 +46,13 @@ async function parseBlobErrorMessage(data: Blob): Promise { } } -export class StatisticsSewerageAggregateSummaryApiService - implements StatisticsSewerageAggregateSummaryService -{ +export class StatisticsSewerageAggregateSummaryApiService implements StatisticsSewerageAggregateSummaryService { /** 하수도 통계 총괄표 — 통계항목(탭) 목록 */ public async getAggregateSummaryTabList(): Promise { const response = - await stClient.get(INDICATORS_URL); + await stClient.get( + INDICATORS_URL, + ); return response.data; } @@ -70,8 +72,12 @@ export class StatisticsSewerageAggregateSummaryApiService signal: AbortSignal.timeout(DOWNLOAD_TIMEOUT_MS), }); - const contentType = String(response.headers.get("content-type") ?? ""); - const contentDisposition = String(response.headers.get("content-disposition") ?? ""); + const contentType = String( + response.headers.get("content-type") ?? "", + ); + const contentDisposition = String( + response.headers.get("content-disposition") ?? "", + ); const data = await response.blob(); if (!response.ok) { @@ -87,7 +93,10 @@ export class StatisticsSewerageAggregateSummaryApiService fileName: parseDownloadFileName(contentDisposition), }; } catch (error) { - if (error instanceof DOMException && error.name === "TimeoutError") { + if ( + error instanceof DOMException && + error.name === "TimeoutError" + ) { throw new Error( "엑셀 생성 시간이 초과되었습니다. 선택 항목을 줄이거나 잠시 후 다시 시도해주세요.", ); diff --git a/apps/st/src/entities/statistics/api/statistics-total-service.ts b/apps/st/src/entities/statistics/api/statistics-total-service.ts index be7f839b9..df92096ec 100644 --- a/apps/st/src/entities/statistics/api/statistics-total-service.ts +++ b/apps/st/src/entities/statistics/api/statistics-total-service.ts @@ -1,111 +1,107 @@ +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; -import { stClient } from "@/shared/api/client"; - -import type { SewerageSupplyRateRequest, SewerageSupplyRateResponse } from "../model/statistics-total/statistics-sewage-supply-rate-total-interface"; -import type { - SewagePipeMaintainDredgingTotalResponse, - SewagePipeMaintainTotalRequest, - SewagePipeMaintainRepairTotalResponse, -} from "../model/statistics-total/statistics-sewage-pipe-maintain-total-interface"; -import type { - SewagePipeFactInstallStatusResponse, - SewagePipePipeDiamStatusResponse, - SewagePipePipeTypeFacilityStatusResponse, - FcltyManholeSummaryResponse, - SewagePipeTotalRequest, - SewagePipeTotalResponse, -} from "../model/statistics-total/statistics-sewage-pipe-total-interface"; -import type { - SewerageServiceLevelComplaintResponse, - SewerageServiceLevelRequest, - SewerageServiceLevelResidentFriendlyFactResponse -} from "../model/statistics-total/statistics-service-level-total-interface"; -import type { - PublicSewageInquirySummaryResponse -} from "../model/statistics-total/statistics-sewage-public-total-interface"; -import type { - SewerReservoirMaintainTotalRequest, - SewerReservoirStatusTotalResponse, - SewerPumpStationStatusTotalResponse -} from "../model/statistics-total/statistics-sewage-reservoir-total-interface"; - -import type { - MediationPumpMaintainTotalRequest, - MediationPumpStatusTotalResponse -} from "../model/statistics-total/statistics-mediation-pump-total-interface"; import type { ExcretaTreatmentMaintainTotalRequest, - ExcretaTreatmentStatusTotalResponse + ExcretaTreatmentStatusTotalResponse, } from "../model/statistics-total/statistics-excreta-treatment-total-interface"; - - +import type { + MediationPumpMaintainTotalRequest, + MediationPumpStatusTotalResponse, +} from "../model/statistics-total/statistics-mediation-pump-total-interface"; import type { PrivateSewageFacilitySummaryRequest, PrivateSewageTab1Response, PrivateSewageTab2Response, - PrivateSewageTab3Response + PrivateSewageTab3Response, } from "../model/statistics-total/statistics-private-sewage-total-interface"; - import type { - SewerageFinanceSummaryRequest, - SewerageFinanceSettlementResponse, + SewerageServiceLevelComplaintResponse, + SewerageServiceLevelRequest, + SewerageServiceLevelResidentFriendlyFactResponse, +} from "../model/statistics-total/statistics-service-level-total-interface"; +import type { + SewagePipeMaintainDredgingTotalResponse, + SewagePipeMaintainRepairTotalResponse, + SewagePipeMaintainTotalRequest, +} from "../model/statistics-total/statistics-sewage-pipe-maintain-total-interface"; +import type { + FcltyManholeSummaryResponse, + SewagePipeFactInstallStatusResponse, + SewagePipePipeDiamStatusResponse, + SewagePipePipeTypeFacilityStatusResponse, + SewagePipeTotalRequest, + SewagePipeTotalResponse, +} from "../model/statistics-total/statistics-sewage-pipe-total-interface"; +import type { PublicSewageInquirySummaryResponse } from "../model/statistics-total/statistics-sewage-public-total-interface"; +import type { + SewerPumpStationStatusTotalResponse, + SewerReservoirMaintainTotalRequest, + SewerReservoirStatusTotalResponse, +} from "../model/statistics-total/statistics-sewage-reservoir-total-interface"; +import type { + SewerageSupplyRateRequest, + SewerageSupplyRateResponse, +} from "../model/statistics-total/statistics-sewage-supply-rate-total-interface"; +import type { SewerageFeeResponse, + SewerageFinanceSettlementResponse, + SewerageFinanceSummaryRequest, + SewerageOrgCauseResponse, SewerageUsageFeeResponse, - SewerageOrgCauseResponse } from "../model/statistics-total/statistics-sewerage-finance-total-interface"; - import type { - WaterReuseSummaryRequest, - SewerageReuseStatusTab1Response, + HumanWasteCollectionTab3Response, + IndividualSewageTab4Response, + PublicHumanWasteStaffTab2Response, + PublicSewageStaffTab1Response, + SewerageIndustry, +} from "../model/statistics-total/statistics-sewerage-industry-interface"; +import type { GrayWaterStatusTab2Response, RainwaterUtilizationStatusTab3Response, SewageWwtRtlztnRegStatusTab4Response, - SewageWwtRtlztnSncnStatusTab5Response + SewageWwtRtlztnSncnStatusTab5Response, + SewerageReuseStatusTab1Response, + WaterReuseSummaryRequest, } from "../model/statistics-total/statistics-sewerage-reuse-total-interface"; - import type { - SludgeSummaryRequest, - SludgeProcessingTab1Response, DigestionTankOperTab2Response, + HumanWasteSludgeTab4Response, SewageSludgeOperTab3Response, - HumanWasteSludgeTab4Response + SludgeProcessingTab1Response, + SludgeSummaryRequest, } from "../model/statistics-total/statistics-sludge-total-interface"; -import type { - SewerageIndustry, - PublicSewageStaffTab1Response, - PublicHumanWasteStaffTab2Response, - HumanWasteCollectionTab3Response, - IndividualSewageTab4Response -} from "../model/statistics-total/statistics-sewerage-industry-interface"; - - export class StatisticsTotalApiService { - public async getSewerageSupplyRateList(params: SewerageSupplyRateRequest): Promise { - const response = await stClient.get ( + public async getSewerageSupplyRateList( + params: SewerageSupplyRateRequest, + ): Promise { + const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-supply-rate/summary`, - { params: params } + { params: params }, ); return response.data; } - public async getSewagePipeRegionalStatusList(params: SewagePipeTotalRequest): Promise { - const response = await stClient.get ( + public async getSewagePipeRegionalStatusList( + params: SewagePipeTotalRequest, + ): Promise { + const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe/regional-status`, - { params: params } + { params: params }, ); return response.data; } - public async getSewagePipeFactInstallStatus( params: SewagePipeTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe/facility-installation-status`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe/facility-installation-status`, + { params }, + ); return response.data; } @@ -113,10 +109,11 @@ export class StatisticsTotalApiService { public async getSewagePipePipeTypeFacilityStatus( params: SewagePipeTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe/pipe-type-facility-status`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe/pipe-type-facility-status`, + { params }, + ); return response.data; } @@ -145,10 +142,11 @@ export class StatisticsTotalApiService { public async getSewagePipeMaintainRepairTotal( params: SewagePipeMaintainTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe-mtc/repair`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe-mtc/repair`, + { params }, + ); return response.data; } @@ -156,10 +154,11 @@ export class StatisticsTotalApiService { public async getSewagePipeMaintainDredgingTotal( params: SewagePipeMaintainTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe-mtc/dredging`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-pipe-mtc/dredging`, + { params }, + ); return response.data; } @@ -178,10 +177,11 @@ export class StatisticsTotalApiService { public async getSewerPumpStationStatusTotalList( params: SewerReservoirMaintainTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-reservoir-pump/pump-station-status`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewer-reservoir-pump/pump-station-status`, + { params }, + ); return response.data; } @@ -195,8 +195,8 @@ export class StatisticsTotalApiService { ); return response.data; } - /** - * ST00060001 —공공하수처리시설 */ + /** + * ST00060001 —공공하수처리시설 */ public async getSewagePublicFacillityTotal( params: SewagePipeMaintainTotalRequest, ): Promise { @@ -207,15 +207,15 @@ export class StatisticsTotalApiService { return response.data; } - /** ST00070001 — 분뇨처리시설 현황(합계) API */ public async getExcretaTreatmentStatusTotalList( params: ExcretaTreatmentMaintainTotalRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/excreta-treatment-status`, - { params }, - ); + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/excreta-treatment-status`, + { params }, + ); return response.data; } @@ -252,31 +252,51 @@ export class StatisticsTotalApiService { return response.data; } - /** ST00090001 — 하수도 재정결산 조회(Tab1) */ - public async getSewerageFinancialList(params: SewerageFinanceSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-financial`, { params }); + /** ST00090001 — 하수도 재정결산 조회(Tab1) */ + public async getSewerageFinancialList( + params: SewerageFinanceSummaryRequest, + ): Promise { + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-financial`, + { params }, + ); return response.data; } /** ST00090002 — 하수도 요금 조회(Tab2) */ - public async getSewerageFeeList(params: SewerageFinanceSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-fee`, { params }); + public async getSewerageFeeList( + params: SewerageFinanceSummaryRequest, + ): Promise { + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-fee`, + { params }, + ); return response.data; } /** ST00090003 — 하수도 사용료 조회(Tab3) */ - public async getSewerageUsageList(params: SewerageFinanceSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-usage`, { params }); + public async getSewerageUsageList( + params: SewerageFinanceSummaryRequest, + ): Promise { + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-usage`, + { params }, + ); return response.data; } /** ST00090004 — 원인자 부담금 조회(Tab4) */ - public async getSewerageOrgCauseList(params: SewerageFinanceSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-org-cause`, { params }); + public async getSewerageOrgCauseList( + params: SewerageFinanceSummaryRequest, + ): Promise { + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewerage-org-cause`, + { params }, + ); return response.data; } - /** ST00100001 — 물재이용 > 공공하수처리수 재이용 현황 조회(Tab1) */ + /** ST00100001 — 물재이용 > 공공하수처리수 재이용 현황 조회(Tab1) */ public async getSewerageReuseTab1List( params: WaterReuseSummaryRequest, ): Promise { @@ -290,30 +310,47 @@ export class StatisticsTotalApiService { * ST00100002 — 물재이용 > TAB2 중수도 현황 조회 */ async getGrayWaterStatusTab2List( - params: WaterReuseSummaryRequest - ): Promise { + params: WaterReuseSummaryRequest, + ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/gray-water-status`, { params }, ); return response.data; - } /** ★ ST00100003 — 물재이용 > TAB3 빗물이용시설현황 조회 */ - async getRainwaterStatusTab3List(params: WaterReuseSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/water-reuse`, { params }); + async getRainwaterStatusTab3List( + params: WaterReuseSummaryRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/water-reuse`, + { params }, + ); return response.data; } /** ★ ST00100004 — 물재이용 > TAB4 하·폐수처리수 재이용시설 시공업 등록현황 조회 */ - async getWwtRtlztnRegStatusTab4List(params: WaterReuseSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/wwt-rtlztn-reg`, { params }); + async getWwtRtlztnRegStatusTab4List( + params: WaterReuseSummaryRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/wwt-rtlztn-reg`, + { params }, + ); return response.data; } /** ★ ST00100005 — 물재이용 > TAB5 하·폐수처리수 재이용시설 시공업 인가현황 조회 */ - async getWwtRtlztnSncnStatusTab5List(params: WaterReuseSummaryRequest): Promise { - const response = await stClient.get(`${ENDPOINT.ST_SERVICE.TOTAL}/wwt-rtlztn-aprv`, { params }); + async getWwtRtlztnSncnStatusTab5List( + params: WaterReuseSummaryRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/wwt-rtlztn-aprv`, + { params }, + ); return response.data; } @@ -321,7 +358,7 @@ export class StatisticsTotalApiService { * ST00110001 — 하수및분뇨찌꺼기 > TAB1 찌꺼기처리시설현황 조회 */ async getSludgeProcessingTab1List( - params: SludgeSummaryRequest + params: SludgeSummaryRequest, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/sludge-processing`, @@ -333,7 +370,7 @@ export class StatisticsTotalApiService { * ST00110002 — 하수및분뇨찌꺼기 > TAB2 소화조 운영현황 조회 */ async getSludgeTab2List( - params: SludgeSummaryRequest + params: SludgeSummaryRequest, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/sludge-digestion-tank`, @@ -346,89 +383,94 @@ export class StatisticsTotalApiService { * ST00110003 — 하수및분뇨찌꺼기 > TAB3 하수찌꺼기 처리시설 운영현황 조회 */ async getSludgeTab3List( - params: SludgeSummaryRequest + params: SludgeSummaryRequest, ): Promise { // 제네릭을 추가하여 unknown 에러를 해결합니다. const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/sludge-facility-oper`, - { params } + { params }, ); return response.data; } - + /** * ST00110004 — 하수및분뇨찌꺼기 > TAB4 분뇨찌꺼기(슬러지)처리현황 */ async getSludgeTab4List( - params: SludgeSummaryRequest + params: SludgeSummaryRequest, ): Promise { - const response = await stClient.get( - `${ENDPOINT.ST_SERVICE.TOTAL}/sludge-human-waste`, - { params }, - ); - return response.data; + const response = await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sludge-human-waste`, + { params }, + ); + return response.data; } /** ST00120001[TAB1] 공공기관 하수분야 조회 */ async getPublicSewageStaffTab1List( - params: SewerageIndustry + params: SewerageIndustry, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/public-sewage-staff`, - { params } + { params }, ); return response.data; } /** ST00120002[TAB2] 공공기관 분뇨분야 조회 */ async getPublicHumanWasteStaffTab2List( - params: SewerageIndustry + params: SewerageIndustry, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/public-human-waste-staff`, - { params } + { params }, ); return response.data; } /** [TAB3] 분뇨수집·운반업 조회 */ async getHumanWasteCollectionTab3List( - params: SewerageIndustry + params: SewerageIndustry, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/human-waste-collection`, - { params } + { params }, ); return response.data; } /** [TAB4] 개인하수처리관련업 조회 */ async getIndividualSewageTab4List( - params: SewerageIndustry + params: SewerageIndustry, ): Promise { const response = await stClient.get( `${ENDPOINT.ST_SERVICE.TOTAL}/indv-swtrmt-rel-bsns`, - { params } + { params }, ); return response.data; } /** [TAB1] 하수도서비스수준 - 민원 조회 */ - public async getSewerageServiceLevelComplaint(params: SewerageServiceLevelRequest): Promise { - const response = await stClient.get ( - `${ENDPOINT.ST_SERVICE.TOTAL}/sewage-complaint`, - { params: params } - ); + public async getSewerageServiceLevelComplaint( + params: SewerageServiceLevelRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/sewage-complaint`, + { params: params }, + ); return response.data; } /** [TAB1] 하수도서비스수준 - 주민친화시설 조회 */ - public async getSewerageServiceLevelResidentFriendlyFact(params: SewerageServiceLevelRequest): Promise { - const response = await stClient.get ( - `${ENDPOINT.ST_SERVICE.TOTAL}/resident-friendly-facility`, - { params: params } - ); + public async getSewerageServiceLevelResidentFriendlyFact( + params: SewerageServiceLevelRequest, + ): Promise { + const response = + await stClient.get( + `${ENDPOINT.ST_SERVICE.TOTAL}/resident-friendly-facility`, + { params: params }, + ); return response.data; } - } +} - -export const statisticsTotalStatusApi = new StatisticsTotalApiService(); \ No newline at end of file +export const statisticsTotalStatusApi = new StatisticsTotalApiService(); diff --git a/apps/st/src/entities/statistics/api/verification-input-report-service.ts b/apps/st/src/entities/statistics/api/verification-input-report-service.ts index b8fba2b79..1a50b7131 100644 --- a/apps/st/src/entities/statistics/api/verification-input-report-service.ts +++ b/apps/st/src/entities/statistics/api/verification-input-report-service.ts @@ -1,8 +1,7 @@ -import { getUserInfo } from "../../../../../../packages/common/components/src/api"; - -import { stClient } from "@/shared/api/client"; +import { stClient } from "@/shared/api"; import { ENDPOINT } from "@/shared/config"; +import { getUserInfo } from "../../../../../../packages/common/components/src/api"; import type { VerificationInputReportRequest, VerificationInputReportResponse, @@ -39,4 +38,5 @@ export class VerificationInputReportApiService implements VerificationInputRepor } } -export const verificationInputReportApi = new VerificationInputReportApiService(); +export const verificationInputReportApi = + new VerificationInputReportApiService(); diff --git a/apps/st/src/entities/statistics/model/statistics-interface.ts b/apps/st/src/entities/statistics/model/statistics-interface.ts index 571835065..2b533d955 100644 --- a/apps/st/src/entities/statistics/model/statistics-interface.ts +++ b/apps/st/src/entities/statistics/model/statistics-interface.ts @@ -310,7 +310,7 @@ export interface StatisticsLogDetailRow { export interface StatisticsLogDetailResponse { status: string; message?: string; - data?: StatisticsLogDetailRow[]; + data?: StatisticsLogDetailRow[] | StatisticsLogDetailRow; } export interface getReviewOpinionDetailRequest { diff --git a/apps/st/src/shared/api/index.ts b/apps/st/src/shared/api/index.ts index 4ccba4f0b..8b84307d4 100644 --- a/apps/st/src/shared/api/index.ts +++ b/apps/st/src/shared/api/index.ts @@ -1,2 +1,2 @@ -export { client } from "./client"; +export { client, stClient } from "./client"; export { withAuthHeader } from "./with-auth-header";