('');
@@ -88,6 +93,7 @@ const SeweragePenetrationRateInp = () => {
});
// 최상위 관리자일땐 모든 상황에서 edit 가능하게 수정 필요.
+
const columnInfo = useMemo(() => {
const { columns, columnLayout } = SeweragePenetrationRateInpColumn;
const base = (isEnterable || isAdminInfo) ? columns : columns.map((col) => ({ ...col, editable: false as const }));
@@ -348,25 +354,31 @@ const SeweragePenetrationRateInp = () => {
const response = await statisticsInputSewSupplyRateApi.submitSewerageSupplyRate(requestData);
if (response.status === 'success') {
- const imrParam = {
- user_id: userInfo.userUnqId,
- sewer_bzmn_cd: searchValues?.bsnmCd ?? '',
- stats_cd: statsCd,
- stats_yr: searchValues?.year ?? '',
- lae_sbmsn_stts_cd: (statusInfo?.laeSbmsnSttsCd === '4' ? '4' : '2'),
- };
+
+ if (response.data.finalStatus === '5') {
+ const imrParam = {
+ user_id: userInfo.userUnqId,
+ sewer_bzmn_cd: searchValues?.bsnmCd ?? '',
+ stats_cd: statsCd,
+ stats_yr: searchValues?.year ?? '',
+ lae_sbmsn_stts_cd: (statusInfo?.laeSbmsnSttsCd === '4' ? '4' : '2'),
+ gen_verify_stts_cd: response.data.nvpassed ? '1' : '2',
+ };
- try {
- await statisticsAPi.callImrService(imrParam);
- } catch {
- await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
- setIsLoading(false);
- alert('IMR 검증 중 오류가 발생했습니다.\n관리자에게 문의하세요.');
- return;
+ try {
+ await statisticsAPi.callImrService(imrParam);
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
+ alert('제출되었습니다.');
+ } catch {
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
+ setIsLoading(false);
+ alert('IMR 검증 중 오류가 발생했습니다.\n관리자에게 문의하세요.');
+ return;
+ }
+ } else {
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), false);
+ alert('제출되었습니다.');
}
-
- await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), false);
- alert('제출되었습니다.');
} else {
alert(response.message || '데이터 제출 중 오류가 발생했습니다.');
}
@@ -465,25 +477,31 @@ const SeweragePenetrationRateInp = () => {
const response = await statisticsInputSewSupplyRateApi.saveSewerageSupplyRate(requestData);
if (response.status === 'success') {
- // const imrParam = {
- // user_id: userInfo.userUnqId,
- // sewer_bzmn_cd: searchValues?.bsnmCd ?? '',
- // stats_cd: statsCd,
- // stats_yr: searchValues?.year ?? '',
- // lae_sbmsn_stts_cd: (statusInfo?.laeSbmsnSttsCd === '4' ? '3' : '1'),
- // };
-
- // try {
- // await statisticsAPi.callImrService(imrParam);
- // } catch {
- // await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
- // setIsLoading(false);
- // alert('IMR 검증 중 오류가 발생했습니다.\n관리자에게 문의하세요.');
- // return;
- // }
-
- await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
- alert('저장되었습니다.');
+
+ if (response.data === '5') {
+ const imrParam = {
+ user_id: userInfo.userUnqId,
+ sewer_bzmn_cd: searchValues?.bsnmCd ?? '',
+ stats_cd: statsCd,
+ stats_yr: searchValues?.year ?? '',
+ lae_sbmsn_stts_cd: (statusInfo?.laeSbmsnSttsCd === '4' ? '3' : '1'),
+ gen_verify_stts_cd: '1',
+ };
+
+ try {
+ await statisticsAPi.callImrService(imrParam);
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
+ alert('저장되었습니다.');
+ } catch {
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
+ setIsLoading(false);
+ alert('IMR 검증 중 오류가 발생했습니다.\n관리자에게 문의하세요.');
+ return;
+ }
+ } else {
+ await fetchSewerageSupplyRate(getSewerageSupplyRateParams(searchValues ?? {}), true);
+ alert('저장되었습니다.');
+ }
} else {
alert(response.message || '데이터 저장 중 오류가 발생했습니다.');
}
@@ -526,6 +544,14 @@ const SeweragePenetrationRateInp = () => {
}
};
+ const openVerificationHistoryDialog = () => {
+ if (!searchValues?.year || !searchValues?.sido || !searchValues?.bsnmCd || !statsCd) {
+ alert("먼저 조회를 진행해주세요.");
+ return;
+ }
+ setVerificationHistoryOpen(true);
+ };
+
const gugunOkOrNotDoList = doList.includes(lastSearchedValues?.bsnmCd || '')
? Boolean(lastSearchedValues?.gugun && lastSearchedValues.gugun !== 'ALL')
: true;
@@ -547,12 +573,11 @@ const SeweragePenetrationRateInp = () => {
{showEnterableToolbarButtons && (
<>
- {isAdminInfo && statusInfo && statusInfo.laeSbmsnSttsCd !== '0' && (
- submitFunc(true)} />
- )}
+
getLastYearDataFunc(searchValues ?? {})} />
submitFunc(false)} />
-
>
)}
{statusInfo?.laeSbmsnSttsCd === '2' && }
@@ -593,7 +618,7 @@ const SeweragePenetrationRateInp = () => {
return errors
.map((e) => {
const prefix = e.vrfcCd === 'IMR' ? 'IMR검증 - ' : '일반검증 - ';
- return `${prefix}${e.rsnExpln}`;
+ return `${prefix}${e.rsnExpln}(검증 기준값: ${e.compVlCn} / 현재 입력값: ${e.nowVlCn})`;
})
.filter(Boolean)
.join('\n');
@@ -614,6 +639,21 @@ const SeweragePenetrationRateInp = () => {
submitMode={isExceptionSubmitFlow ? 'exception' : 'normal'}
isLoading={isLoading}
/>
+
>
);
};
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 32dfb9211..6adccc917 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
@@ -7,7 +7,8 @@ import {
type SewerageSupplyRateApiResponse,
type CheckInputPeriodResponse,
type SewerageSupplyRateSaveRequest,
- type SewerageSupplyRateSaveApiResponse,
+ type SewerageSupplyRateSubmitResponse,
+ type SewerageSupplyRateSaveResponse,
} from "../../model/input/statistics-sewage-supply-rate-input-interface";
export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSewSupplyRateService {
@@ -26,16 +27,16 @@ export class StatisticsInputSewSupplyRateApiService implements StatisticsInputSe
return response.data;
}
- public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise {
- const response = await stClient.post(
+ public async saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise {
+ const response = await stClient.post(
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/save`,
params,
);
return response.data;
}
- public async submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise {
- const response = await stClient.post(
+ public async submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise {
+ const response = await stClient.post(
`${ENDPOINT.ST_SERVICE.INPUT}/sewerage-supply-rate/submit`,
params,
);
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 af6aad7fb..02d0144c4 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
@@ -11,7 +11,7 @@ import type {
SeweragePipeInputPipeDiameterResponse,
SeweragePipeInputPipeTypeResponse,
SeweragePipeInputRegionalFactStatusSaveRequest,
- SeweragePipeInputRegionalFactStatusSaveApiResponse,
+ SeweragePipeInputRegionalFactStatusSaveResponse,
SeweragePipeInputRegionalResponse,
SeweragePipeRequestParams,
StatisticsInputSewPipeService,
@@ -82,8 +82,8 @@ export class StatisticsInputSewPipeApiService implements StatisticsInputSewPipeS
return response.data;
}
- public async saveRegionalFactStatus(param: SeweragePipeInputRegionalFactStatusSaveRequest): Promise {
- const response = await stClient.post(
+ public async saveRegionalFactStatus(param: SeweragePipeInputRegionalFactStatusSaveRequest): Promise {
+ const response = await stClient.post(
`${ENDPOINT.ST_SERVICE.INPUT}/sewage-pipe/regional-facility-status/save`,
param,
);
diff --git a/apps/st/src/entities/statistics/api/statistics-service.ts b/apps/st/src/entities/statistics/api/statistics-service.ts
index c709e1c9e..3bc051782 100644
--- a/apps/st/src/entities/statistics/api/statistics-service.ts
+++ b/apps/st/src/entities/statistics/api/statistics-service.ts
@@ -22,6 +22,8 @@ import {
type ReviewReturnSaveResponse,
type ReviewSubmitRequest,
type ReviewSubmitResponse,
+ type VerificationResultListRequest,
+ type VerificationResultListResponse,
} from "../model/statistics-interface";
export class StatisticsAPiService implements StatisticsService {
@@ -121,6 +123,14 @@ export class StatisticsAPiService implements StatisticsService {
);
return response.data;
}
+
+ public async getVerificationResultList(param: VerificationResultListRequest): Promise {
+ const response = await stClient.get(
+ `${ENDPOINT.ST_SERVICE.INPUTVERIFY}/results`,
+ { params: param },
+ );
+ return response.data;
+ }
}
export const statisticsAPi = new StatisticsAPiService();
\ No newline at end of file
diff --git a/apps/st/src/entities/statistics/model/input/statistics-sewage-pipe-input-interface.ts b/apps/st/src/entities/statistics/model/input/statistics-sewage-pipe-input-interface.ts
index 79f9fd1db..299078872 100644
--- a/apps/st/src/entities/statistics/model/input/statistics-sewage-pipe-input-interface.ts
+++ b/apps/st/src/entities/statistics/model/input/statistics-sewage-pipe-input-interface.ts
@@ -1,5 +1,3 @@
-import type { SewerageSupplyRateSaveApiResponse } from "./statistics-sewage-supply-rate-input-interface";
-
export interface SeweragePipeRequestParams {
ctpvNm?: string;
sggNm?: string;
@@ -119,8 +117,11 @@ export interface SeweragePipeInputRegionalFactStatusSaveRequest {
saveList: SeweragePipeInputRegionalFactStatusSaveItem[];
}
-/** 지역별 시설현황 저장 API 응답 — 보급률 저장과 동일 래핑 */
-export type SeweragePipeInputRegionalFactStatusSaveApiResponse = SewerageSupplyRateSaveApiResponse;
+export interface SeweragePipeInputRegionalFactStatusSaveResponse {
+ data: string;
+ message?: string;
+ status: string;
+}
/** 시설별 설치 현황 — 목록 항목 */
export interface SeweragePipeInputFactInstallStatusItem {
@@ -519,5 +520,5 @@ export interface StatisticsInputSewPipeService {
getFacilityAdminAreaList(param: SeweragePipeFacilityAdminAreaListRequest): Promise;
saveRegionalFactStatus(
param: SeweragePipeInputRegionalFactStatusSaveRequest,
- ): Promise;
+ ): Promise;
}
\ No newline at end of file
diff --git a/apps/st/src/entities/statistics/model/input/statistics-sewage-supply-rate-input-interface.ts b/apps/st/src/entities/statistics/model/input/statistics-sewage-supply-rate-input-interface.ts
index 59481dc5b..1c14dfab8 100644
--- a/apps/st/src/entities/statistics/model/input/statistics-sewage-supply-rate-input-interface.ts
+++ b/apps/st/src/entities/statistics/model/input/statistics-sewage-supply-rate-input-interface.ts
@@ -36,6 +36,8 @@ export interface SewerageSupplyRateCommonInfo {
export interface VerificationResultItem {
vrfcCd: string;
rsnExpln: string;
+ nowVlCn: string;
+ compVlCn: string;
}
/** 필드명 → 검증 결과 배열. 예: { popltnSm: [{ type, rsn }], wstrPrmTrt: [...] } */
@@ -150,12 +152,20 @@ export interface SewerageSupplyRateSaveRequest {
superAdmin?: string;
}
-export interface SewerageSupplyRateSaveData {
- httpStatus?: number;
- code?: string;
+export interface SewerageSupplyRateSaveResponse {
+ data: string;
+ message?: string;
+ status: string;
}
-export type SewerageSupplyRateSaveApiResponse = ApiResponse;
+export interface SewerageSupplyRateSubmitResponse {
+ data: {
+ finalStatus: string;
+ nvpassed: boolean;
+ }
+ message?: string;
+ status: string;
+}
// 하수도 통계 입력 기간 조회
export interface CheckInputPeriodResponse {
@@ -167,6 +177,6 @@ export interface CheckInputPeriodResponse {
export interface StatisticsInputSewSupplyRateService {
getSewerageSupplyRateList(params: SewerageSupplyRateRequestParams): Promise;
checkInputPeriod(params: string): Promise;
- saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise;
- submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise;
+ saveSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise;
+ submitSewerageSupplyRate(params: SewerageSupplyRateSaveRequest): Promise;
}
\ No newline at end of file
diff --git a/apps/st/src/entities/statistics/model/statistics-interface.ts b/apps/st/src/entities/statistics/model/statistics-interface.ts
index c20b175e0..800849c5e 100644
--- a/apps/st/src/entities/statistics/model/statistics-interface.ts
+++ b/apps/st/src/entities/statistics/model/statistics-interface.ts
@@ -41,6 +41,67 @@ export interface ImrRequest {
stats_cd: string;
stats_yr: string;
lae_sbmsn_stts_cd: string;
+ gen_verify_stts_cd?: string;
+}
+
+export interface VerificationResultListRequest {
+ statsYr: string;
+ sewerBzmnCd?: string;
+ ctpvNm?: string;
+ sggNm?: string;
+ statsCd?: string;
+ /** 검증 방법 코드 (예: IMR) */
+ vrfcMthdCd?: string;
+ /** 처리여부 코드 목록, 콤마 구분 */
+ prcsYnList?: string;
+ pbcpAprvYn?: string;
+ page?: number;
+ size?: number;
+}
+
+/** 검증 결과 리포트 목록 한 행 (`verifyResultList` 원소) */
+export interface VerificationResultReportItem {
+ statsYr: string;
+ statsCd: string;
+ statsNm: string;
+ sewerBzmnCd: string;
+ ctpvNm: string;
+ sggNm: string;
+ admdstNm: string;
+ vrfcSn: number;
+ vrfcMthdCd: string;
+ vrfcMthdNm: string;
+ vrfcTrgtNm: string;
+ regDt: string;
+ rsnExpln: string;
+ nowVlCn: string;
+ compVlCn: string | null;
+ prcsYn: string;
+ prcsOpnnExpln: string | null;
+ prcrId: string | null;
+ rjctOpnnCn: string | null;
+ pbcpAprvYn: string;
+ mdfrId: string | null;
+ mdfcnDt: string;
+}
+
+export interface VerificationResultListPageInfo {
+ totalElements: number;
+ totalPages: number;
+ currentPage: number;
+ size: number;
+}
+
+export interface VerificationResultListData {
+ verifyResultList: VerificationResultReportItem[];
+ pageInfo: VerificationResultListPageInfo;
+}
+
+/** 검증 결과 리포트 조회 API 응답 */
+export interface VerificationResultListResponse {
+ status: string;
+ message?: string;
+ data?: VerificationResultListData;
}
export interface SubmitExceptionRequest {
@@ -196,4 +257,5 @@ export interface StatisticsService {
getReviewOpinionDetail(param: getReviewOpinionDetailRequest): Promise;
saveReviewReturn(param: ReviewReturnSaveRequest): Promise;
submitReview(param :ReviewSubmitRequest): Promise;
+ getVerificationResultList(param: VerificationResultListRequest): Promise;
}
\ No newline at end of file