@@ -139,12 +139,12 @@ const RdiiChart = ({ pplMngNo }: ModalOpenProp) => {
● 강우유입수량 분석결과
- 평균RDII :
+ 평균RDII :
{rdiiQty}
m³/d
- 강우량대비RDII :
+ 강우량대비RDII :
{totalVolume}
m³/mm
diff --git a/apps/sn/app/(map-layout)/map/components/searchModalReportApi.ts b/apps/sn/app/(map-layout)/map/components/searchModalReportApi.ts
index 9d1ae43e0..8cb349056 100644
--- a/apps/sn/app/(map-layout)/map/components/searchModalReportApi.ts
+++ b/apps/sn/app/(map-layout)/map/components/searchModalReportApi.ts
@@ -110,7 +110,8 @@ export const addFileName = async (data:FlattenedFolder[]) => {
data.map(async (item) => {
const filenameArr:ReportDataFile[] = await getDcFile(String(item.clsfSystmSn));
const f = filenameArr[0];
- const result = {...item, fileName:f?.fileTitle, regDate:f?.regDt, fileSn:f?.fileSn, filePath:""};
+ //console.log("clsfSystmSn:", item.clsfSystmSn, "f:", f);
+ const result = {...item, fileName:f?.fileTitle, regDate:f?.regDt, fileSn:f?.fileSn, filePath:f?.filePath};
// if (f !== undefined && f.fileSn !== "") {
// const fprcs = await getDcFileprcs(f?.fileSn);
// if (fprcs.length>0)
@@ -149,11 +150,12 @@ export const fileDownload = (data:Blob, fileName:string) => { // Blob데이터
link.remove();
window.URL.revokeObjectURL(url);
}
-export const getFileDownload = async (fileSn:string, fileName:string) => {
- const fileprcsData = await getDcFileprcs(fileSn); // filePath 조회
- if (fileprcsData?.length === 0 ) { alert("filePath 조회 오류"); }
- if (fileprcsData[0].filePath === "") alert("filePath 정보 없으므로 다운로드 불가");
- const blobData = await getDcFileDownload(fileprcsData[0].filePath); // 실제 다운로드 API
+export const getFileDownload = async (fileSn:string, fileName:string, filePath:string) => {
+ //const fileprcsData = await getDcFileprcs(fileSn); // filePath 조회
+ //if (fileprcsData?.length === 0 ) { alert("filePath 조회 오류"); }
+ //if (fileprcsData[0].filePath === "") alert("filePath 정보 없으므로 다운로드 불가");
+ if (filePath === "") alert("filePath 정보 없으므로 다운로드 불가:filesn"+ fileSn);
+ const blobData = await getDcFileDownload(filePath); // 실제 다운로드 API
fileDownload(blobData, fileName);
}
// 시도 데이터
diff --git a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
index 1163def9c..9e23cf3cf 100644
--- a/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
+++ b/apps/sn/app/(map-layout)/map/searchModal/searchModal.tsx
@@ -257,8 +257,9 @@ const SearchModal: React.FC
= ({
if (typeof index === "number" && tableData[index]) {
const reportData = tableData[index];
const fileName = reportData.fileName;
+ const filePath = reportData.filePath;
if (reportData.fileSn !== "") {
- getFileDownload(reportData.fileSn, fileName);
+ getFileDownload(reportData.fileSn, fileName, filePath);
}
}
};