Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c69c1aa855 |
@@ -289,28 +289,14 @@ type GridViewWithSetColumnProperty = {
|
||||
};
|
||||
|
||||
type GridViewWithEditOptions = {
|
||||
setEditOptions?: (options: {
|
||||
commitWhenLeave?: boolean;
|
||||
appendable?: boolean;
|
||||
insertable?: boolean;
|
||||
}) => void;
|
||||
setPasteOptions?: (options: { enableAppend?: boolean }) => void;
|
||||
setEditOptions?: (options: { commitWhenLeave?: boolean }) => void;
|
||||
};
|
||||
|
||||
/** 포커스가 그리드 밖으로 나갈 때 편집 중인 값을 자동 commit */
|
||||
function applyDefaultGridEditOptions(
|
||||
gridView: GridViewWithEditOptions | null | undefined,
|
||||
options?: { preventRowAppend?: boolean },
|
||||
) {
|
||||
gridView?.setEditOptions?.({
|
||||
commitWhenLeave: true,
|
||||
...(options?.preventRowAppend
|
||||
? { appendable: false, insertable: false }
|
||||
: {}),
|
||||
});
|
||||
if (options?.preventRowAppend) {
|
||||
gridView?.setPasteOptions?.({ enableAppend: false });
|
||||
}
|
||||
gridView?.setEditOptions?.({ commitWhenLeave: true });
|
||||
}
|
||||
|
||||
function isDateEditorColumn(column: {
|
||||
@@ -867,7 +853,6 @@ const DataGrid = ({
|
||||
gridHeight = 55, // vh 단위
|
||||
headerHeight = 60,
|
||||
fitStyle = GridFitStyle.EVEN,
|
||||
preventRowAppend = true,
|
||||
}: DataGridProps) => {
|
||||
const { columns, columnLayout } = columnInfo;
|
||||
const fixedColumnNameSet = useMemo(
|
||||
@@ -1482,9 +1467,7 @@ useEffect(() => {
|
||||
const scheduleFooterTask = (task: () => void, delayMs: number) => {
|
||||
footerTimerIds.push(setTimeout(task, delayMs));
|
||||
};
|
||||
applyDefaultGridEditOptions(gridView as GridViewWithEditOptions, {
|
||||
preventRowAppend,
|
||||
});
|
||||
applyDefaultGridEditOptions(gridView as GridViewWithEditOptions);
|
||||
|
||||
const columnsFieldsSig = columns.map((c) => c.fieldName).join("\u0001");
|
||||
if (columnsFieldsSig !== columnsFieldsSigRef.current) {
|
||||
@@ -2007,7 +1990,6 @@ useEffect(() => {
|
||||
fitStyle,
|
||||
enableSort,
|
||||
footerVerificationResult,
|
||||
preventRowAppend,
|
||||
]);
|
||||
|
||||
// 행·셀 클릭 이벤트 (검증 오류 툴팁은 hover만 — onShowTooltip / 빈 셀 오버레이)
|
||||
@@ -2545,7 +2527,6 @@ useEffect(() => {
|
||||
const gridView = gridRef.current?.gridView ?? grid;
|
||||
applyDefaultGridEditOptions(
|
||||
gridView as GridViewWithEditOptions,
|
||||
{ preventRowAppend },
|
||||
);
|
||||
if (!gridView?.columnByName) return;
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -20,7 +20,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputExcretaTreatmentFacilityApi } from "@/entities/statistics/api/input/statistics-input-excreta-treatment-facility-service";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
EXCRETA_TREATMENT_FACILITY_STATS_CD,
|
||||
type ExcretaTreatmentFacilityItem,
|
||||
@@ -76,11 +75,7 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -212,7 +207,7 @@ function mapExcretaTreatmentFacilityListToGridRows(
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -507,9 +502,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
||||
setStatusInfo(nextStatusInfo);
|
||||
setStatsCd(commonInfo.statsCd);
|
||||
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
||||
setFooterVerificationResult(
|
||||
normalizeVerificationResultMap(commonInfo.verificationResult) ?? null,
|
||||
);
|
||||
setFooterVerificationResult(commonInfo.verificationResult ?? null);
|
||||
if (overrides?.mode !== "PRE") {
|
||||
setIsNotApplicable(gridRows.length === 0);
|
||||
} else if (gridRows.length > 0) {
|
||||
@@ -820,13 +813,7 @@ const ExcretaTreatmentFacilityInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForSubmit,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -965,7 +952,19 @@ const ExcretaTreatmentFacilityInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 -";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||
import { statisticsInputPrivateSewageFacilityApi } from "@/entities/statistics/api/input/statistics-input-private-sewage-facility-service";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
PrivateSewageDesigStatusItem,
|
||||
PrivateSewageDesigStatusSaveItem,
|
||||
@@ -69,11 +68,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
@@ -180,9 +175,7 @@ function mapRegionalListToGridRows<
|
||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||
const { verificationResult, ...rest } = item;
|
||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -895,13 +888,7 @@ const PrivateSewageFacilityInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1157,7 +1144,18 @@ const PrivateSewageFacilityInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import { useStatisticsInputPendingNavigation } from '@/shared/lib/use-statistics
|
||||
import { statisticsInputSewSupplyRateApi } from '@/entities/statistics/api/input/statistics-input-sew-supply-rate-service';
|
||||
import { statisticsInputPublicSewageFacilityApiService } from '@/entities/statistics/api/input/statistics-public-sewage-facility-input-service';
|
||||
import { statisticsApi } from '@/entities/statistics/api/statistics-service';
|
||||
import { callImrServiceWithRollbackOnFailure } from '@/components/util/input/call-imr-with-rollback';
|
||||
import type {
|
||||
PublicSewageFacilityRequestParams,
|
||||
PublicSewageFacilitySaveItem,
|
||||
@@ -53,11 +52,7 @@ import { fetchColumnGuidesRecord } from '@/components/util/grid/columnGuides';
|
||||
import { toGridRows } from '@/components/util/grid/gridFunction';
|
||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||
import { patchFooterVerificationByTab,patchVerificationFailedByTab } from '@/components/util/input/verification-failed-flag';
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
withNormalizedVerificationResult,
|
||||
type VerificationResultLikeMap,
|
||||
} from '@/components/util/input/verification-result-display';
|
||||
import type { VerificationResultLikeMap } from '@/components/util/input/verification-result-display';
|
||||
import { nullableTrimmedString } from '@/components/util/input/nullableString';
|
||||
import { useAdminStore } from '@/store/admin-store';
|
||||
import { useTabStore } from '@/store/tab-store';
|
||||
@@ -443,13 +438,7 @@ const PublicSewageFacilityInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? '',
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? '',
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? '',
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -800,13 +789,11 @@ const PublicSewageFacilityInp = () => {
|
||||
sidoListRef.current,
|
||||
searchContext,
|
||||
);
|
||||
const convertedData = list.map((item) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...item,
|
||||
rmrk: item.rmrk ?? null,
|
||||
}),
|
||||
);
|
||||
const convertedData = list.map((item) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...item,
|
||||
rmrk: item.rmrk ?? null,
|
||||
}));
|
||||
|
||||
if (list.length === 0) {
|
||||
setShowIsNotApplicable(true);
|
||||
@@ -1588,7 +1575,17 @@ const PublicSewageFacilityInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : (e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ");
|
||||
const comp = e.cmprCn ?? "";
|
||||
const now = e.nowCn ?? "";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -20,7 +20,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputPumpingStationApi } from "@/entities/statistics/api/input/statistics-input-pumping-station-service";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
PUMPING_STATION_STATS_CD,
|
||||
type PumpingStationItem,
|
||||
@@ -76,11 +75,7 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import { formatCompactYmdForGrid, toCompactYmdOrNull } from "@/components/util/grid/ymdFormat";
|
||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -211,7 +206,7 @@ function mapPumpingStationListToGridRows(
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -498,9 +493,7 @@ const PumpingStationInp = () => {
|
||||
setStatusInfo(nextStatusInfo);
|
||||
setStatsCd(commonInfo.statsCd);
|
||||
setIsVerificationFailed(isVerificationFailedFromCommonInfo(commonInfo));
|
||||
setFooterVerificationResult(
|
||||
normalizeVerificationResultMap(commonInfo.verificationResult) ?? null,
|
||||
);
|
||||
setFooterVerificationResult(commonInfo.verificationResult ?? null);
|
||||
if (overrides?.mode !== "PRE") {
|
||||
setIsNotApplicable(gridRows.length === 0);
|
||||
} else if (gridRows.length > 0) {
|
||||
@@ -803,13 +796,7 @@ const PumpingStationInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForSubmit,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -948,7 +935,19 @@ const PumpingStationInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 -";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewageExcretaRelatedApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-related-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
ExcretaRelatedIndustrySaveItem,
|
||||
PrivateSewageTreatRelatedIndustrySaveItem,
|
||||
@@ -85,11 +84,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -557,7 +552,19 @@ function verificationCellTooltip({
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -581,7 +588,7 @@ function mapListToGridRows<T extends { verificationResult?: SewageExcretaRelated
|
||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -1496,13 +1503,7 @@ const SewageExcretaRelatedInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
|
||||
@@ -21,7 +21,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewageExcretaSlurgeApi } from "@/entities/statistics/api/input/statistics-input-sewage-excreta-slurge-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
DigestorOperatingStatusSaveItem,
|
||||
ExcretaSlurgeProcessingStatusSaveItem,
|
||||
@@ -91,11 +90,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -153,7 +148,19 @@ function verificationCellTooltip({
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +185,7 @@ function mapListToGridRows<T extends { verificationResult?: SewageExcretaSlurgeV
|
||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||
const row = toGridRows([{ ctpvNm, ...item }])[0] as GridRowWithVerification;
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -1479,13 +1486,7 @@ const SewageExcretaSlurgeInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForSubmit,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewPipeApiService } from "@/entities/statistics/api/input/statistics-sewage-pipe-input-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
SeweragePipeInputFactInstallStatusSaveRequest,
|
||||
SeweragePipeInputFactInstallStatusSubmitRequest,
|
||||
@@ -83,10 +82,7 @@ import {
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
getVerificationErrorsForField,
|
||||
normalizeVerificationResultMap,
|
||||
withNormalizedVerificationResult,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
@@ -293,10 +289,7 @@ function normalizePipeTypeStatusRow(
|
||||
lyngPrlg: Number(lyngPrlgWhol ?? 0),
|
||||
dmltnPrlg: Number(dmltnPrlgWhol ?? 0),
|
||||
...yearFields,
|
||||
verificationResult:
|
||||
normalizeVerificationResultMap(
|
||||
remapPipeTypePrlgWholVerification(verificationResult),
|
||||
) ?? undefined,
|
||||
verificationResult: remapPipeTypePrlgWholVerification(verificationResult) ?? undefined,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -726,12 +719,10 @@ const SewagePipeInp = () => {
|
||||
const response = await statisticsInputSewPipeApiService.getRegionalFactStatus(searchParam);
|
||||
if (response.status === 'success') {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const convertedData = filterFetched(response.data.regionalFactStatusList).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
const convertedData = filterFetched(response.data.regionalFactStatusList).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
applyRowMap((m) => m.set('ST00020001', toGridRows(convertedData)));
|
||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||
@@ -758,12 +749,10 @@ const SewagePipeInp = () => {
|
||||
const response = await statisticsInputSewPipeApiService.getFactInstallStatus(searchParam);
|
||||
if (response.status === 'success') {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const convertedData = filterFetched(response.data.factInstallStatusList).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
const convertedData = filterFetched(response.data.factInstallStatusList).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
if (convertedData.length === 0) {
|
||||
const alreadyHandledForSameSearch =
|
||||
factInstallNoDataHandledKeyRef.current === searchConditionKey;
|
||||
@@ -840,12 +829,10 @@ const SewagePipeInp = () => {
|
||||
const response = await statisticsInputSewPipeApiService.getPipeDiameterStatus(searchParam);
|
||||
if (response.status === 'success') {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const convertedData = filterFetched(response.data.pipeDiameterStatusList).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
const convertedData = filterFetched(response.data.pipeDiameterStatusList).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
applyRowMap((m) => m.set('ST00020004', toGridRows(convertedData)));
|
||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||
@@ -872,12 +859,10 @@ const SewagePipeInp = () => {
|
||||
const response = await statisticsInputSewPipeApiService.getManholeStatus(searchParam);
|
||||
if (response.status === 'success') {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const convertedData = filterFetched(response.data.manholeStatusList).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
const convertedData = filterFetched(response.data.manholeStatusList).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
applyRowMap((m) => m.set('ST00020005', toGridRows(convertedData)));
|
||||
setTabStatusInfoMap((prev) => new Map(prev).set(tabKey, response.data.statusInfo));
|
||||
setTabStatsCdMap((prev) => new Map(prev).set(tabKey, commonInfo.statsCd));
|
||||
@@ -904,15 +889,13 @@ const SewagePipeInp = () => {
|
||||
const response = await statisticsInputSewPipeApiService.getConnectionStatus(searchParam);
|
||||
if (response.status === 'success') {
|
||||
const commonInfo = response.data.commonInfo;
|
||||
const facilityConvertedData = filterFetched(response.data.facilityConnectionList).map((d) =>
|
||||
withNormalizedVerificationResult({ ...d }),
|
||||
);
|
||||
const adminConvertedData = filterFetched(response.data.adminAreaConnectionList).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
...d,
|
||||
ctpvNm: d.ctpvNm || commonInfo.ctpvNm,
|
||||
}),
|
||||
);
|
||||
const facilityConvertedData = filterFetched(response.data.facilityConnectionList).map((d) => ({
|
||||
...d,
|
||||
}));
|
||||
const adminConvertedData = filterFetched(response.data.adminAreaConnectionList).map((d) => ({
|
||||
...d,
|
||||
ctpvNm: d.ctpvNm || commonInfo.ctpvNm,
|
||||
}));
|
||||
applyRowMap((m) => {
|
||||
m.set('treatmentPlantConnectionInp', toGridRows(facilityConvertedData));
|
||||
m.set('adminAreaConnectionInp', toGridRows(adminConvertedData));
|
||||
@@ -1355,6 +1338,7 @@ const SewagePipeInp = () => {
|
||||
rmrk: nullableTrimmedString(d.rmrk),
|
||||
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
||||
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
||||
pipeByPrstWhol: formatNumber(d.pipeByPrstWhol, "pipeByPrstWhol"),
|
||||
};
|
||||
});
|
||||
const requestData: SeweragePipeInputPipeTypeStatusSubmitRequest = {
|
||||
@@ -1471,13 +1455,7 @@ const SewagePipeInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: values.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: values?.bsnmCd ?? "",
|
||||
rollbackStatusCode: statusForTab?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1852,6 +1830,7 @@ const SewagePipeInp = () => {
|
||||
rmrk: nullableTrimmedString(d.rmrk),
|
||||
lyngPrlgWhol: formatNumber(d.lyngPrlg, "lyngPrlg"),
|
||||
dmltnPrlgWhol: formatNumber(d.dmltnPrlg, "dmltnPrlg"),
|
||||
pipeByPrstWhol: formatNumber(d.pipeByPrstWhol, "pipeByPrstWhol"),
|
||||
};
|
||||
});
|
||||
|
||||
@@ -2258,7 +2237,17 @@ const SewagePipeInp = () => {
|
||||
tabKey,
|
||||
);
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : (e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ");
|
||||
const comp = e.cmprCn ?? "";
|
||||
const now = e.nowCn ?? "";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -11,7 +11,6 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { sewagePipeMaintainApiService } from "@/entities/statistics/api/input/statistics-input-sewage-pipe-maintain-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
SewagePipeMaintainDredgingSaveItem,
|
||||
SewagePipeMaintainDredgingSaveRequest,
|
||||
@@ -70,11 +69,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
withNormalizedVerificationResult,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
||||
@@ -449,12 +444,10 @@ const SewagePipeMaintainInp = () => {
|
||||
repairStatusList ?? [],
|
||||
sidoListRef.current,
|
||||
searchContext,
|
||||
).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
const gridRows = toGridRows(convertedData);
|
||||
|
||||
applyRowMap(mergeIntoExistingMap, (m) => {
|
||||
@@ -494,12 +487,10 @@ const SewagePipeMaintainInp = () => {
|
||||
pipeDredgingStatusList ?? [],
|
||||
sidoListRef.current,
|
||||
searchContext,
|
||||
).map((d) =>
|
||||
withNormalizedVerificationResult({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}),
|
||||
);
|
||||
).map((d) => ({
|
||||
ctpvNm: commonInfo.ctpvNm,
|
||||
...d,
|
||||
}));
|
||||
const gridRows = toGridRows(convertedData);
|
||||
|
||||
applyRowMap(mergeIntoExistingMap, (m) => {
|
||||
@@ -687,13 +678,7 @@ const SewagePipeMaintainInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1118,7 +1103,14 @@ const SewagePipeMaintainInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR" ? "시계열 검증 - " : e.vrfcCd === "NV" ? "일반검증 - " : "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewageReservoirPumpApi } from "@/entities/statistics/api/input/statistics-input-sewage-reservoir-pump-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
type RainfallPumpStationItem,
|
||||
type RainfallPumpStationSaveItem,
|
||||
@@ -90,11 +89,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -284,7 +279,7 @@ function mapSewageReservoirListToGridRows(
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -440,7 +435,7 @@ function mapRainfallPumpStationListToGridRows(
|
||||
])[0] as GridRowWithVerification;
|
||||
|
||||
if (item.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(item.verificationResult);
|
||||
row.verificationResult = item.verificationResult;
|
||||
}
|
||||
return row;
|
||||
});
|
||||
@@ -869,13 +864,7 @@ const SewageReservoirPumpInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1527,7 +1516,19 @@ const SewageReservoirPumpInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 -";
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import { useStatisticsInputPendingNavigation } from "@/shared/lib/use-statistics
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewerageFinanceApi } from "@/entities/statistics/api/input/statistics-input-sewerage-finance-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import type {
|
||||
CauserBurdenItem,
|
||||
CauserBurdenSaveItem,
|
||||
@@ -74,11 +73,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
@@ -179,9 +174,7 @@ function mapRegionalListToGridRows<
|
||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||
const { verificationResult, ...rest } = item;
|
||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -947,13 +940,7 @@ const SewerageFinanceInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1228,7 +1215,18 @@ const SewerageFinanceInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
type CheckInputPeriodItem,
|
||||
getVerificationPeriodActionBlockedMessage,
|
||||
@@ -59,11 +58,7 @@ import { toGridRows } from "@/components/util/grid/gridFunction";
|
||||
import { toExcelExportSearchContextFromSearchForm } from "@/components/util/gridExcelExport";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { isVerificationFailedFromCommonInfo } from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useStatisticsInputFocusStore } from "@/store/statistics-input-focus-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
@@ -92,7 +87,7 @@ const remapCommonInfoVerificationToGridFields = (
|
||||
// API 키로도 조회 가능하도록 유지
|
||||
if (gridField !== key) remapped[key] = errors;
|
||||
}
|
||||
return normalizeVerificationResultMap(remapped) ?? remapped;
|
||||
return remapped;
|
||||
};
|
||||
|
||||
/** 컬럼 가이드 API 조회용 통계코드 (하수도 보급률) */
|
||||
@@ -307,11 +302,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
setRowData(
|
||||
convertedData.map((d) => {
|
||||
const row = toGridRows([d])[0] as GridRowWithVerification;
|
||||
if (d.verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(
|
||||
d.verificationResult,
|
||||
);
|
||||
}
|
||||
if (d.verificationResult) row.verificationResult = d.verificationResult;
|
||||
return row;
|
||||
})
|
||||
);
|
||||
@@ -567,13 +558,7 @@ const SeweragePenetrationRateInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: searchValues?.year ?? "",
|
||||
statsCd,
|
||||
sewerBzmnCd: searchValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: statusInfo?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(imrResponse.job_id, (id) =>
|
||||
statisticsApi.getImrStatus(id),
|
||||
@@ -882,7 +867,14 @@ const SeweragePenetrationRateInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix = e.vrfcCd === 'IMR' ? '시계열 검증 - ' : (e.vrfcCd === 'NV' ? '일반검증 - ' : '모집단 검증 -');
|
||||
return `${prefix}${e.rsnExpln}
|
||||
(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -9,7 +9,6 @@ import { ConfirmDialog } from "@/shared/ui/confirm-dialog";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputSewerageServiceLevelApi } from "@/entities/statistics/api/input/statistics-input-sewerage-service-level-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
SEWERAGE_SERVICE_LEVEL_COMPLAINT_STATS_CD,
|
||||
SEWERAGE_SERVICE_LEVEL_RESIDENT_FRIENDLY_FACT_STATS_CD,
|
||||
@@ -64,11 +63,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
@@ -192,9 +187,7 @@ function mapServiceLevelListToGridRows<
|
||||
return filterBySelectedAdmdstCd(list, sidoListRef.current, values).map((item) => {
|
||||
const { verificationResult, ...rest } = item;
|
||||
const row = toGridRows([{ ctpvNm, ...rest }])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -846,13 +839,7 @@ const SewerageServiceLevelInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -1159,7 +1146,18 @@ const SewerageServiceLevelInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ import { nullableTrimmedString } from "@/components/util/input/nullableString";
|
||||
import { statisticsInputSewSupplyRateApi } from "@/entities/statistics/api/input/statistics-input-sew-supply-rate-service";
|
||||
import { statisticsInputWaterReuseApi } from "@/entities/statistics/api/input/statistics-input-water-reuse-service";
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import { callImrServiceWithRollbackOnFailure } from "@/components/util/input/call-imr-with-rollback";
|
||||
import {
|
||||
type PublicSewageTreatWaterReuseItem,
|
||||
type PublicSewageTreatWaterReuseSaveItem,
|
||||
@@ -94,11 +93,7 @@ import {
|
||||
patchFooterVerificationByTab,
|
||||
patchVerificationFailedByTab,
|
||||
} from "@/components/util/input/verification-failed-flag";
|
||||
import {
|
||||
formatVerificationTooltip,
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "@/components/util/input/verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "@/components/util/input/verification-result-display";
|
||||
import { useAdminStore } from "@/store/admin-store";
|
||||
import { useTabStore } from "@/store/tab-store";
|
||||
|
||||
@@ -448,9 +443,7 @@ function mapPublicSewageTreatWaterReuseListToGridRows(
|
||||
instlAprvYmd: formatCompactYmdForGrid(item.instlAprvYmd),
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -469,9 +462,7 @@ function mapRecycledWaterStatusListToGridRows(
|
||||
oprtngStrtYmd: formatCompactYmdForGrid(item.oprtngStrtYmd),
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -489,9 +480,7 @@ function mapRainFallUtilFactStatusListToGridRows(
|
||||
cmptnYmd: formatCompactYmdForGrid(item.cmptnYmd),
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -508,9 +497,7 @@ function mapTreatWaterReuseStatusListToGridRows<
|
||||
coRegYmd: formatCompactYmdForGrid(item.coRegYmd),
|
||||
},
|
||||
])[0] as GridRowWithVerification;
|
||||
if (verificationResult) {
|
||||
row.verificationResult = normalizeVerificationResultMap(verificationResult);
|
||||
}
|
||||
if (verificationResult) row.verificationResult = verificationResult;
|
||||
return row;
|
||||
});
|
||||
}
|
||||
@@ -1368,13 +1355,7 @@ const WaterReuseInp = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const imrResponse = await callImrServiceWithRollbackOnFailure(imrParam, {
|
||||
statsYr: lastSearchedValues.year ?? "",
|
||||
statsCd: statsCdForTab,
|
||||
sewerBzmnCd: lastSearchedValues?.bsnmCd ?? "",
|
||||
rollbackStatusCode: activeTabStatus?.lclgvSbmsnSttsCd ?? "",
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
const imrResponse = await statisticsApi.callImrService(imrParam);
|
||||
if (imrResponse.job_id) {
|
||||
await waitForImrJobCompleted(
|
||||
imrResponse.job_id,
|
||||
@@ -2082,7 +2063,18 @@ const WaterReuseInp = () => {
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
return formatVerificationTooltip(errors);
|
||||
return errors
|
||||
.map((e) => {
|
||||
const prefix =
|
||||
e.vrfcCd === "IMR"
|
||||
? "시계열 검증 - "
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
return `${prefix}${e.rsnExpln}(검증 기준값: ${e.cmprCn} / 현재 입력값: ${e.nowCn})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+4
-7
@@ -554,20 +554,17 @@ const DetailComponent = ({
|
||||
const userInfo = await getUserInfo();
|
||||
let response;
|
||||
|
||||
const vrfcSn = detailInfo?.commonInfo.vrfcSn;
|
||||
if (vrfcSn == null) {
|
||||
alert("검증 일련번호가 없습니다.");
|
||||
return;
|
||||
}
|
||||
if (!hasPersistedDetails) {
|
||||
response =
|
||||
await generalverificationApiService.RegistVrfcDetail(vrfcSn, {
|
||||
await generalverificationApiService.RegistVrfcDetail({
|
||||
vrfcSn: detailInfo?.commonInfo.vrfcSn ?? null,
|
||||
detailList: rows,
|
||||
rgtrUuid: userInfo.userUnqId,
|
||||
});
|
||||
} else {
|
||||
response =
|
||||
await generalverificationApiService.UpdateVrfcDetail(vrfcSn, {
|
||||
await generalverificationApiService.UpdateVrfcDetail({
|
||||
vrfcSn: detailInfo?.commonInfo.vrfcSn ?? null,
|
||||
detailList: rows,
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
|
||||
+7
-14
@@ -146,15 +146,9 @@ const RegistDialog = memo(
|
||||
}
|
||||
};
|
||||
|
||||
const handleUpdateVrfcMaster = async (
|
||||
updateVrfcSn: number,
|
||||
body: UpdateVrfcMasterRequest,
|
||||
) => {
|
||||
const handleUpdateVrfcMaster = async (data: GeneralVerificationMasterSubmitFormData) => {
|
||||
try {
|
||||
const response = await generalverificationApiService.UpdateVrfcMaster(
|
||||
updateVrfcSn,
|
||||
body,
|
||||
);
|
||||
const response = await generalverificationApiService.UpdateVrfcMaster(data as UpdateVrfcMasterRequest);
|
||||
|
||||
if (response.status === 'success') {
|
||||
alert('수정되었습니다.');
|
||||
@@ -264,11 +258,8 @@ const RegistDialog = memo(
|
||||
if (await confirm(confirmMessage)) {
|
||||
const userInfo = await getUserInfo();
|
||||
if (isVrfcSn) {
|
||||
if (data.vrfcSn == null) {
|
||||
alert('수정 대상이 없습니다.');
|
||||
return;
|
||||
}
|
||||
await handleUpdateVrfcMaster(data.vrfcSn, {
|
||||
const updateData = {
|
||||
vrfcSn: data.vrfcSn,
|
||||
vrfcNm: data.vrfcNm,
|
||||
vrfcClsfCd: data.vrfcClsfCd,
|
||||
dcptDgt: data.dcptDgt,
|
||||
@@ -276,8 +267,10 @@ const RegistDialog = memo(
|
||||
...(data.dcptDgt === 0
|
||||
? {}
|
||||
: { dcptPrcsMthCd: data.dcptPrcsMthCd }),
|
||||
trgtStatsCd: data.trgtStatsCd,
|
||||
mdfrUuid: userInfo.userUnqId,
|
||||
});
|
||||
};
|
||||
await handleUpdateVrfcMaster(updateData);
|
||||
} else {
|
||||
const registData = {
|
||||
vrfcNm: data.vrfcNm,
|
||||
|
||||
@@ -481,11 +481,6 @@ export type DataGridProps = {
|
||||
headerHeight?: number;
|
||||
/** RealGrid `displayOptions.fitStyle` (기본 EVEN). 컬럼별 width 유지 시 NONE */
|
||||
fitStyle?: GridFitStyle;
|
||||
/**
|
||||
* true면 붙여넣기·편집으로 행을 추가하지 않음.
|
||||
* 검증 결과처럼 조회 행 수가 고정된 그리드에서 사용.
|
||||
*/
|
||||
preventRowAppend?: boolean;
|
||||
};
|
||||
|
||||
export type TabDataGridProps = {
|
||||
|
||||
@@ -8,7 +8,6 @@ export const doList = [
|
||||
"4600000000",
|
||||
"4700000000",
|
||||
"4800000000",
|
||||
"5000000000",
|
||||
];
|
||||
|
||||
export const needBsnmFrgnrPoplSmSidoList = [
|
||||
|
||||
@@ -49,43 +49,6 @@ export const ManholeStatusInpColumn = {
|
||||
styleName: "rg-cell-readonly",
|
||||
footer: { text: "합계" },
|
||||
},
|
||||
{
|
||||
name: "wholMnhlCntSum",
|
||||
fieldName: "wholMnhlCntSum",
|
||||
header: { text: "맨홀총계" },
|
||||
footer: footerInt,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: "#,##0",
|
||||
styleName: "rg-cell-readonly",
|
||||
},
|
||||
{
|
||||
name: "frlvlMnhlCntSum",
|
||||
fieldName: "frlvlMnhlCntSum",
|
||||
header: { text: "주철계" },
|
||||
footer: footerInt,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: "#,##0",
|
||||
styleName: "rg-cell-readonly",
|
||||
},
|
||||
{
|
||||
name: "thlvlMnhlCntSum",
|
||||
fieldName: "thlvlMnhlCntSum",
|
||||
header: { text: "콘크리트계" },
|
||||
footer: footerInt,
|
||||
editable: false,
|
||||
valueType: ValueType.NUMBER,
|
||||
dataFormat: "#,##0",
|
||||
styleName: "rg-cell-readonly",
|
||||
},
|
||||
{
|
||||
name: "picNm",
|
||||
fieldName: "picNm",
|
||||
header: { text: "담당자명" },
|
||||
editable: false,
|
||||
styleName: "rg-cell-readonly",
|
||||
},
|
||||
{
|
||||
...intCol("wholMnhlCnt", "계", false),
|
||||
computed: {
|
||||
@@ -125,12 +88,6 @@ export const ManholeStatusInpColumn = {
|
||||
},
|
||||
"admdstNm",
|
||||
"emphsMngSeNm",
|
||||
{
|
||||
name: "adminRefGroup",
|
||||
hideChildHeaders: false,
|
||||
header: { text: "행정참고자료" },
|
||||
items: ["wholMnhlCntSum", "frlvlMnhlCntSum", "thlvlMnhlCntSum", "picNm"],
|
||||
},
|
||||
{
|
||||
name: "mtrlGroup",
|
||||
hideChildHeaders: false,
|
||||
|
||||
@@ -491,10 +491,6 @@ const rawList = [
|
||||
{ name: 'sggNm', fieldName: 'sggNm', header: { text: '시군구' }, mergeCells: true, sortdisable: true },
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, mergeCells: true, sortdisable: true },
|
||||
{ name: 'emphsMngSeNm', fieldName: 'emphsMngSeNm', header: { text: '집중강우\n중점관리\n구역구분' }, mergeCells: true },
|
||||
{ name: 'wholMnhlCntSum', fieldName: 'wholMnhlCntSum', header: { text: '맨홀총계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'frlvlMnhlCntSum', fieldName: 'frlvlMnhlCntSum', header: { text: '주철계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'thlvlMnhlCntSum', fieldName: 'thlvlMnhlCntSum', header: { text: '콘크리트계' }, footer: footerIntArrayByDivision, valueType: ValueType.NUMBER, dataFormat: '#,##0' },
|
||||
{ name: 'picNm', fieldName: 'picNm', header: { text: '담당자명' } },
|
||||
{
|
||||
name: 'displayYear',
|
||||
fieldName: 'displayYear',
|
||||
@@ -548,12 +544,6 @@ const rawList = [
|
||||
],
|
||||
},
|
||||
'emphsMngSeNm',
|
||||
{
|
||||
name: 'adminRefGroup',
|
||||
hideChildHeaders: false,
|
||||
header: { text: '행정참고자료' },
|
||||
items: ['wholMnhlCntSum', 'frlvlMnhlCntSum', 'thlvlMnhlCntSum', 'picNm'],
|
||||
},
|
||||
'displayYear',
|
||||
{
|
||||
name: 'mtrlGroup',
|
||||
|
||||
@@ -710,10 +710,6 @@ const rawSewagePipeTotList = [
|
||||
{ name: "sggNm", fieldName: "sggNm", header: { text: "시군구" }, editable: false },
|
||||
{ name: "admdstNm", fieldName: "admdstNm", header: { text: "행정구역명" }, editable: false },
|
||||
{ name: "emphsMngSeNm", fieldName: "emphsMngSeNm", header: { text: "집중강우\n중점관리\n구역구분" }, editable: false },
|
||||
{ name: "wholMnhlCntSum", fieldName: "wholMnhlCntSum", header: { text: "맨홀총계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "frlvlMnhlCntSum", fieldName: "frlvlMnhlCntSum", header: { text: "주철계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "thlvlMnhlCntSum", fieldName: "thlvlMnhlCntSum", header: { text: "콘크리트계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "picNm", fieldName: "picNm", header: { text: "담당자명" }, editable: false },
|
||||
{ name: "wholMnhlCnt", fieldName: "wholMnhlCnt", header: { text: "계" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "frlvlMnhlCnt", fieldName: "frlvlMnhlCnt", header: { text: "주철" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
{ name: "sclvlMnhlCnt", fieldName: "sclvlMnhlCnt", header: { text: "주철(조화)" }, valueType: ValueType.NUMBER, dataFormat: "#,##0", editable: false },
|
||||
@@ -724,11 +720,6 @@ const rawSewagePipeTotList = [
|
||||
columnLayout: [
|
||||
{ name: "addrGroup", header: { text: "행정구역" }, items: ["ctpvNm", "sggNm", "admdstNm"] },
|
||||
"emphsMngSeNm",
|
||||
{
|
||||
name: "adminRefGroup",
|
||||
header: { text: "행정참고자료" },
|
||||
items: ["wholMnhlCntSum", "frlvlMnhlCntSum", "thlvlMnhlCntSum", "picNm"],
|
||||
},
|
||||
{
|
||||
name: "mtrlGroup",
|
||||
header: { text: "맨홀뚜껑 재질(개)" },
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
import { statisticsApi } from "@/entities/statistics/api/statistics-service";
|
||||
import type {
|
||||
ImrRequest,
|
||||
ImrResponse,
|
||||
rollbackStatusRequest,
|
||||
} from "@/entities/statistics/model/statistics-interface";
|
||||
|
||||
/** 제출 직후 IMR 요청이 실패하면 검증 이전 상태로 롤백 */
|
||||
export async function callImrServiceWithRollbackOnFailure(
|
||||
imrParam: ImrRequest,
|
||||
rollbackParam: rollbackStatusRequest,
|
||||
): Promise<ImrResponse> {
|
||||
try {
|
||||
return await statisticsApi.callImrService(imrParam);
|
||||
} catch (error) {
|
||||
try {
|
||||
await statisticsApi.rollbackStatus(rollbackParam);
|
||||
} catch {
|
||||
// 롤백 실패는 IMR 실패를 가리지 않음
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
import type { StatisticsInputCommonInfoBase } from "@/entities/statistics/model/statistics-interface";
|
||||
|
||||
import {
|
||||
normalizeVerificationResultMap,
|
||||
type VerificationResultLikeMap,
|
||||
} from "./verification-result-display";
|
||||
import type { VerificationResultLikeMap } from "./verification-result-display";
|
||||
|
||||
export function isVerificationFailedFromCommonInfo(
|
||||
commonInfo: Pick<StatisticsInputCommonInfoBase, "isVerificationFailed"> | null | undefined,
|
||||
@@ -31,9 +28,6 @@ export function patchFooterVerificationByTab(
|
||||
| undefined,
|
||||
): Map<string, VerificationResultLikeMap | null> {
|
||||
const next = new Map(prev);
|
||||
next.set(
|
||||
tabKey,
|
||||
normalizeVerificationResultMap(commonInfo?.verificationResult) ?? null,
|
||||
);
|
||||
next.set(tabKey, commonInfo?.verificationResult ?? null);
|
||||
return next;
|
||||
}
|
||||
|
||||
@@ -13,49 +13,6 @@ export type VerificationResultLikeMap = Record<
|
||||
VerificationResultLikeItem[]
|
||||
>;
|
||||
|
||||
/** 입력 조회 verificationResult의 기준값/입력값이 null이면 "-" */
|
||||
export function displayVerificationCn(
|
||||
value: string | null | undefined,
|
||||
): string {
|
||||
if (value == null || String(value).trim() === "") return "-";
|
||||
return String(value);
|
||||
}
|
||||
|
||||
export function normalizeVerificationResultItem<T extends VerificationResultLikeItem>(
|
||||
item: T,
|
||||
): T {
|
||||
return {
|
||||
...item,
|
||||
nowCn: displayVerificationCn(item.nowCn ?? item.nowVlCn),
|
||||
cmprCn: displayVerificationCn(item.cmprCn ?? item.compVlCn),
|
||||
};
|
||||
}
|
||||
|
||||
export function normalizeVerificationResultMap<T extends VerificationResultLikeMap>(
|
||||
result: T | null | undefined,
|
||||
): T | undefined {
|
||||
if (!result || typeof result !== "object") return undefined;
|
||||
const next = {} as T;
|
||||
for (const [key, items] of Object.entries(result)) {
|
||||
(next as VerificationResultLikeMap)[key] = Array.isArray(items)
|
||||
? items.map((item) => normalizeVerificationResultItem(item))
|
||||
: [];
|
||||
}
|
||||
return next;
|
||||
}
|
||||
|
||||
/** 조회 행/객체에 붙은 verificationResult의 cmprCn·nowCn null을 "-"로 바꿈 */
|
||||
export function withNormalizedVerificationResult<T extends object>(item: T): T {
|
||||
if (!("verificationResult" in item) || item.verificationResult == null) {
|
||||
return item;
|
||||
}
|
||||
const verificationResult = normalizeVerificationResultMap(
|
||||
item.verificationResult as VerificationResultLikeMap,
|
||||
);
|
||||
if (!verificationResult) return item;
|
||||
return { ...item, verificationResult };
|
||||
}
|
||||
|
||||
/** 검증 오류 배열 → RealGrid styleName */
|
||||
export function getVerificationStyleName(
|
||||
errors: VerificationResultLikeItem[] | null | undefined,
|
||||
@@ -80,8 +37,8 @@ export function formatVerificationTooltip(
|
||||
: e.vrfcCd === "NV"
|
||||
? "일반검증 - "
|
||||
: "모집단 검증 - ";
|
||||
const comp = displayVerificationCn(e.cmprCn ?? e.compVlCn);
|
||||
const now = displayVerificationCn(e.nowCn ?? e.nowVlCn);
|
||||
const comp = e.cmprCn ?? e.compVlCn ?? "";
|
||||
const now = e.nowCn ?? e.nowVlCn ?? "";
|
||||
return `${prefix}${e.rsnExpln}\n(검증 기준값: ${comp} / 현재 입력값: ${now})`;
|
||||
})
|
||||
.filter(Boolean)
|
||||
|
||||
@@ -56,11 +56,10 @@ export class GeneralverificationApiService implements GeneralverificationService
|
||||
}
|
||||
|
||||
public async UpdateVrfcMaster(
|
||||
vrfcSn: number,
|
||||
param: UpdateVrfcMasterRequest,
|
||||
): Promise<UpdateVrfcMasterResponse> {
|
||||
const response = await stClient.put<UpdateVrfcMasterResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/masters/${vrfcSn}`,
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/masters/${param.vrfcSn}`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
@@ -128,22 +127,20 @@ export class GeneralverificationApiService implements GeneralverificationService
|
||||
}
|
||||
|
||||
public async RegistVrfcDetail(
|
||||
vrfcSn: number,
|
||||
param: VerifyDetailRegistRequest,
|
||||
): Promise<RegistVrfcMasterResponse> {
|
||||
const response = await stClient.post<RegistVrfcMasterResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${vrfcSn}/details`,
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${param.vrfcSn}/details`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async UpdateVrfcDetail(
|
||||
vrfcSn: number,
|
||||
param: VerifyDetailUpdateRequest,
|
||||
): Promise<RegistVrfcMasterResponse> {
|
||||
const response = await stClient.put<RegistVrfcMasterResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${vrfcSn}/details`,
|
||||
`${ENDPOINT.ST_SERVICE.INPUTVERIFY}/${param.vrfcSn}/details`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
|
||||
@@ -16,8 +16,6 @@ import {
|
||||
type ImrStatusResponse,
|
||||
type ReviewerInfoRequest,
|
||||
type ReviewerInfoResponse,
|
||||
type rollbackStatusRequest,
|
||||
type rollbackStatusResponse,
|
||||
type ReviewInputSaveRequest,
|
||||
type ReviewOpinionSaveRequest,
|
||||
type ReviewOpinionSaveResponse,
|
||||
@@ -158,17 +156,6 @@ export class StatisticsApiService implements StatisticsService {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// 입력 - 검증 이전 상태로 롤백
|
||||
public async rollbackStatus(
|
||||
param: rollbackStatusRequest,
|
||||
): Promise<rollbackStatusResponse> {
|
||||
const response = await stClient.put<rollbackStatusResponse>(
|
||||
`${ENDPOINT.ST_SERVICE.INPUTCOMMON}/rollback-status`,
|
||||
param,
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
public async callImrService(param: ImrRequest): Promise<ImrResponse> {
|
||||
const response = await client.post<ImrResponse>(
|
||||
`${ENDPOINT.STATVERIFY_SERVICE.IMR}`,
|
||||
|
||||
@@ -46,6 +46,7 @@ export interface CheckVerificationNameResponse {
|
||||
}
|
||||
|
||||
export interface UpdateVrfcMasterRequest {
|
||||
vrfcSn?: number | null;
|
||||
vrfcNm?: string | null;
|
||||
vrfcClsfCd?: string | null;
|
||||
dcptDgt?: number | null;
|
||||
@@ -183,11 +184,13 @@ export interface VerifyDetailRegistData {
|
||||
}
|
||||
|
||||
export interface VerifyDetailRegistRequest {
|
||||
vrfcSn: number | null;
|
||||
detailList: VerifyDetailRegistData[];
|
||||
rgtrUuid: string;
|
||||
}
|
||||
|
||||
export interface VerifyDetailUpdateRequest {
|
||||
vrfcSn: number | null;
|
||||
detailList: VerifyDetailRegistData[];
|
||||
mdfrUuid: string;
|
||||
}
|
||||
@@ -294,7 +297,6 @@ export interface GeneralverificationService {
|
||||
param: CheckVerificationNameRequest,
|
||||
): Promise<CheckVerificationNameResponse>;
|
||||
UpdateVrfcMaster(
|
||||
vrfcSn: number,
|
||||
param: UpdateVrfcMasterRequest,
|
||||
): Promise<UpdateVrfcMasterResponse>;
|
||||
RegistVrfcMaster(
|
||||
@@ -313,11 +315,9 @@ export interface GeneralverificationService {
|
||||
param: string,
|
||||
): Promise<VerifyColumnListResponse>;
|
||||
RegistVrfcDetail(
|
||||
vrfcSn: number,
|
||||
param: VerifyDetailRegistRequest,
|
||||
): Promise<RegistVrfcMasterResponse>;
|
||||
UpdateVrfcDetail(
|
||||
vrfcSn: number,
|
||||
param: VerifyDetailUpdateRequest,
|
||||
): Promise<RegistVrfcMasterResponse>;
|
||||
CopyVrfcData(
|
||||
|
||||
+1
-4
@@ -308,6 +308,7 @@ export interface SeweragePipeInputPipeTypeStatusSaveItem {
|
||||
rmrk: string | null;
|
||||
lyngPrlgWhol: number;
|
||||
dmltnPrlgWhol: number;
|
||||
pipeByPrstWhol: number;
|
||||
}
|
||||
|
||||
/** 관종별 현황 저장 API 요청 */
|
||||
@@ -419,10 +420,6 @@ export interface SeweragePipeInputManholeStatusItem {
|
||||
folvlMnhlCnt: number;
|
||||
filvlMnhlCnt: number;
|
||||
rmrk: string;
|
||||
wholMnhlCntSum: number;
|
||||
frlvlMnhlCntSum: number;
|
||||
thlvlMnhlCntSum: number;
|
||||
picNm: string | null;
|
||||
verificationResult?: SeweragePipeInputVerificationResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,21 +31,6 @@ export interface cancelSubmitResponse {
|
||||
message?: string;
|
||||
}
|
||||
|
||||
/** 검증 이전 상태로 롤백 요청 */
|
||||
export interface rollbackStatusRequest {
|
||||
statsYr: string;
|
||||
statsCd: string;
|
||||
sewerBzmnCd: string;
|
||||
rollbackStatusCode: string;
|
||||
mdfrUuid: string;
|
||||
}
|
||||
|
||||
/** 검증 이전 상태로 롤백 응답 */
|
||||
export interface rollbackStatusResponse {
|
||||
status: string;
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
status: string;
|
||||
data?: T;
|
||||
@@ -572,7 +557,6 @@ export interface StatisticsService {
|
||||
saveStatsInputPeriod(param: StatsInputPeriodSaveRequest): Promise<StatsInputPeriodSaveApiResponse>;
|
||||
deleteStatsInputPeriod(param: StatsInputPeriodDeleteRequest): Promise<StatsInputPeriodDeleteApiResponse>;
|
||||
cancelSubmit(param: cancelSubmitRequest): Promise<cancelSubmitResponse>;
|
||||
rollbackStatus(param: rollbackStatusRequest): Promise<rollbackStatusResponse>;
|
||||
callImrService(param: ImrRequest): Promise<ImrResponse>;
|
||||
submitException(param: SubmitExceptionRequest): Promise<SubmitExceptionResponse>;
|
||||
getLogList(param: StatisticsLogRequest): Promise<StatisticsLogResponse>;
|
||||
|
||||
@@ -247,10 +247,6 @@ export interface SewagePipeReviewManholeItem {
|
||||
folvlMnhlCnt: number;
|
||||
filvlMnhlCnt: number;
|
||||
rmrk: string | null;
|
||||
wholMnhlCntSum: number;
|
||||
frlvlMnhlCntSum: number;
|
||||
thlvlMnhlCntSum: number;
|
||||
picNm: string | null;
|
||||
}
|
||||
|
||||
export interface SewagePipeManholeResponseData {
|
||||
|
||||
-4
@@ -168,10 +168,6 @@ export interface FcltyManholeSummaryItem {
|
||||
thlvlMnhlCnt: number;
|
||||
folvlMnhlCnt: number;
|
||||
filvlMnhlCnt: number;
|
||||
wholMnhlCntSum: number;
|
||||
frlvlMnhlCntSum: number;
|
||||
thlvlMnhlCntSum: number;
|
||||
picNm: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user