하수/중수도시설 현황 엑셀 다운로드 수정

This commit is contained in:
jyha00
2025-07-08 14:16:37 +09:00
parent ff13d7b509
commit 221a9331f7
5 changed files with 12 additions and 13 deletions
@@ -48,7 +48,7 @@ export default function PbnstSttn() {
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
const excelClick = useCallback(() => {
pbnstSttnSearch(true, "1", "20", ref.current, "", searchYear);
pbnstSttnSearch(true, String(pageNation), "20", ref.current, "", searchYear);
}, [pbnstSttnSearch]);
const cellCLick = useCallback(
@@ -137,11 +137,11 @@ export default function RswtSttn() {
const excelClick = useCallback(() => {
// 최신 검색 조건 반영
const con = getConValue();
rswtSttnSearch(1, "10000", String(con), fcltNm, code.cityCd, code.sggCd);
}, [rswtSttnSearch, objSearch, code.cityCd, code.sggCd]);
rswtSttnSearch(true, pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}, [rswtSttnSearch, objSearch, code.cityCd, code.sggCd, pageNation, fcltNm]);
useEffect(() => {
rswtSttnSearch(pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
rswtSttnSearch(false, pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
}, [pageNation]);
return (
@@ -188,7 +188,7 @@ export default function RswtSttn() {
size={"sm"}
onClick={() => {
const con = getConValue();
rswtSttnSearch(pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
rswtSttnSearch(false, pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}}
>
조회
@@ -15,21 +15,21 @@ export const excelRSwtSttnParsing = (
sggCode.find((sgg) => sgg.val === item.sggCd.toString())?.text ?? "",
item.bdstNm ?? "",
item.daddr ?? "",
String(item.bdstUsgText ?? ""),
String(item.bdstUsgCd === -1 || item.bdstUsgCd === undefined ? "확인불가" : item.bdstUsgCd ?? ""), //건축물용도
String(item.frstArchPrmsnDt ?? ""),
String(item.archArea ?? ""),
String(item.archArea.split('.')[0] === '-1' ? '확인불가' : item.archArea.split('.')[0]),
String(item.reuseBuilding?.[0]?.rswtrObj.wtrUsqty ?? "0"), //물사용량
String(item.chgBuilding.length > 0 ? "Y" : "N"), //중축・개축・재축여부
String(item.reuseBuilding?.[0]?.lawTrgtYn ?? ""), //법적의무대상여부
String(item.reuseBuilding?.[0]?.rswtrObj.oblgTrgtWtrUsqty ?? ""), //의무대상물사용량
String(item.reuseBuilding?.[0]?.instlCmptnDt ?? ""), //설치완료일시
String(item.reuseBuilding?.[0]?.instlCst ?? ""), //설치비용
String(item.reuseBuilding?.[0]?.instlCst === -1 ? "확인불가" : item.reuseBuilding?.[0]?.instlCst ?? ""), //설치비용
item.reuseBuilding?.[0]?.rswtrObj?.orgwtKndCd ?? "", //원수종류
String(item.reuseBuilding?.[0]?.rswtrObj.filtrTrtmfctCpct ?? ""), //처리시설용량
String(item.reuseBuilding?.[0]?.rswtrObj?.filtrTrtmfctProcs ?? ""), //주요처리공정
String(item.reuseBuilding?.[0]?.rswtrObj?.filtrTrtmfctUsgCd ?? ""), //이용용도
String(item.reuseBuilding?.[0]?.instlCstSprtYn ?? ""), //설치지원비용여부
String(item.reuseBuilding?.[0]?.instlCstSprtAmt ?? ""), //설치지원비용
String(item.reuseBuilding?.[0]?.instlCstSprtAmt === -1 ? "확인불가" : item.reuseBuilding?.[0]?.instlCstSprtAmt ?? ""), //설치지원비용
String(item.reuseBuilding?.[0]?.grntchBdstCertYn ?? ""),
String(item.reuseBuilding?.[0]?.grntchBdstCertYr ?? ""),
String(item.reuseBuilding?.[0]?.grntchBdstCertNo ?? ""),
@@ -31,7 +31,7 @@ type rswtSttnActions = {
rswtSttnInit: (page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
rswtSttnSearch: (page: number, total: string, con: string, txt: string,
rswtSttnSearch: (isExcel: boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
rswtChSttnHead: (
@@ -84,11 +84,10 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = (
console.log(e)
}
},
rswtSttnSearch: async (page: number, total: string, con: string, txt: string,
rswtSttnSearch: async (isExcel: boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => {
try {
console.log("헐", page)
const rswtSttnRes = await getFetch(
fetchType.WR,
`/reuseFc/waterreuseFc` +
@@ -97,7 +96,7 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = (
(con ? `/${con}` : "/0") +
(txt ? `/${txt}` : "")
);
if (Number(total) > 9000) {
if (isExcel) {
const rswtExcel = excelRSwtSttnParsing(rswtSttnRes, sidoCode, sggCode);
set((state: rswtSttnState) => {
return {
Binary file not shown.