[st frontend] 설치인가 검토단계 코드를 추가함

This commit is contained in:
2026-06-01 11:16:02 +09:00
parent d3ca402e4a
commit 98f24d8a96
3 changed files with 11 additions and 5 deletions
@@ -85,6 +85,7 @@ export interface InstlSncnCklstResultSaveDto {
cklstSn: number;
cklstArtclSn: number;
cklstRvwSn: number;
rvwStpComCd: string;
selected: "Y" | "N" | null;
}
@@ -68,6 +68,7 @@ const emptyAmt = (): BzAmtRow => ({ bscPl: "", budgetReflct: "", thtiDsgn: "" })
const num = (v: string) => parseFloat(v.replace(/,/g, "") || "0");
const fmt = (v: number) => (isNaN(v) ? "" : v.toLocaleString());
const DEFAULT_RVW_STP_COM_CD = "LOCAL"; // LOCAL.지자체,ENV.환경청,KECO.환경공단 (검토단계공통코드:RVWSTP 참조)
/* ------------------------------------------------------------------ */
/* 공통 셀 컴포넌트 분리: widgets/cnfm/ui/cells.tsx에서 import */
@@ -95,7 +96,7 @@ import { NumCell, ReadCell, PrivacyConsent, EtcAttachments } from '@/widgets/cnf
* - 주요 배열 (위치: 최상위 내부)
* - bizSclList: [{ cnstpSeCd, bscPl|bscPlanQty, budgetReflct|bgtRfltQty, thtiDsgn|tstmDesignQty }, ...]
* - bizCstList: [{ acntgSeCd, bscPlanAmt|bscPl, bgtRfltAmt|budgetReflct, tstmDesignAmt|thtiDsgn }, ...]
* - cklstResultList: [{ cklstSn, cklstArtclSn, cklstRvwSn, rvwRsltAnmlyYn: 'Y'|'N'|null, ... }, ...]
* - cklstResultList: [{ cklstSn, cklstArtclSn, cklstRvwSn, rvwStpComCd, rvwRsltAnmlyYn: 'Y'|'N'|null, ... }, ...]
* - esntlFileList: [{ esntlAtchFileId, esntlAtchFileNm, esntlAtchYn, atflCd, atflId, orgnlFileNm, ... }, ...]
* - etcFileList: [{ atflId, orgnlFileNm, atflFlieSz, upldUserNm, atflCd, ... }, ...]
*
@@ -565,8 +566,10 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
return ordered;
}, [cklstTree]);
const cklstKey = (row: CklstTreeNode) =>
`${row.cklstSn}_${row.cklstArtclSn}_${row.cklstRvwSn}`;
const cklstKey = (row: CklstTreeNode, rvwStpComCd?: string) => {
const stepCode = rvwStpComCd ?? DEFAULT_RVW_STP_COM_CD;
return `${row.cklstSn}_${row.cklstArtclSn}_${row.cklstRvwSn}_${stepCode}`;
};
useEffect(() => {
setCheckResults((prev) => {
@@ -610,7 +613,8 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
const lookup = new Map<string, string>();
for (const r of results) {
const key = `${r.cklstSn}_${r.cklstArtclSn ?? ""}_${r.cklstRvwSn}`;
const stepCode = r.rvwStpComCd ?? DEFAULT_RVW_STP_COM_CD;
const key = `${r.cklstSn}_${r.cklstArtclSn ?? ""}_${r.cklstRvwSn}_${stepCode}`;
if (r.rvwRsltAnmlyYn === "Y" || r.rvwRsltAnmlyYn === "N") lookup.set(key, r.rvwRsltAnmlyYn);
}
@@ -645,6 +649,7 @@ function CnfmRegistPage({ initialData }: { initialData?: any } = {}) {
cklstSn: row.cklstSn,
cklstArtclSn: row.cklstArtclSn,
cklstRvwSn: row.cklstRvwSn,
rvwStpComCd: DEFAULT_RVW_STP_COM_CD,
selected: checkResults[cklstKey(row)] ?? null,
}));
@@ -298,7 +298,7 @@ function CnfmViewPage({ id }: { id: string }) {
</tr>
) : (
cklstResultList.map((row: any) => {
const key = `${row.cklstSn}_${row.cklstRvwSn}`;
const key = `${row.cklstSn}_${row.cklstRvwSn}_${row.rvwStpComCd ?? "STEP01"}`;
const hasResult = row.rvwRsltAnmlyYn === "Y" || row.rvwRsltAnmlyYn === "N";
const showRadios = row.bchckUseYn === "Y" || hasResult;