From 943d858c5aa36b5d51c71277ead4ce3f128279da Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 16 Jan 2026 17:37:49 +0900 Subject: [PATCH 1/5] =?UTF-8?q?cm:=20=EC=9A=B0=ED=8E=B8=EB=B2=88=ED=98=B8?= =?UTF-8?q?=20=EB=96=BC=EC=96=B4=EB=82=B4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business_components/src/lib/utils.ts | 2 +- .../business_components/src/ui/index.ts | 3 +- .../src/ui/sdmInsertForm/form.tsx | 185 +-------------- .../ui/search_address/SearchAddressModal.tsx | 221 ++++++++++++++++++ .../src/ui/search_address/findAddress.ts | 118 ++++++++++ .../src/ui/search_address/index.ts | 3 + .../src/ui/search_address/zipService.ts | 66 ++++++ 7 files changed, 419 insertions(+), 179 deletions(-) create mode 100644 packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx create mode 100644 packages/common/business_components/src/ui/search_address/findAddress.ts create mode 100644 packages/common/business_components/src/ui/search_address/index.ts create mode 100644 packages/common/business_components/src/ui/search_address/zipService.ts diff --git a/packages/common/business_components/src/lib/utils.ts b/packages/common/business_components/src/lib/utils.ts index a5ef19350..1a87df14d 100644 --- a/packages/common/business_components/src/lib/utils.ts +++ b/packages/common/business_components/src/lib/utils.ts @@ -2,5 +2,5 @@ import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { - return twMerge(clsx(inputs)); + return twMerge(clsx(inputs)); //clsx 결과 (단순 합치기):twMerge 결과 (Tailwind 충돌 제거) } diff --git a/packages/common/business_components/src/ui/index.ts b/packages/common/business_components/src/ui/index.ts index db1132b58..ae419bd83 100644 --- a/packages/common/business_components/src/ui/index.ts +++ b/packages/common/business_components/src/ui/index.ts @@ -15,6 +15,7 @@ export * from "./search_form_right"; export * from "./search_input"; export * from "./search_input_select"; // export * from "./search_input_address"; +export * from "./search_address"; export * from "./select"; export * from "./tab"; export * from "./table"; @@ -24,4 +25,4 @@ export * from "./sdmInsertForm"; export * from "./popover_ui"; export * from "./date_month_picker"; export * from "./date_picker_range" -export * from "./map/GisOverlay"; \ No newline at end of file +export * from "./map/GisOverlay"; diff --git a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx index 6f0cbff2b..b2499ab43 100644 --- a/packages/common/business_components/src/ui/sdmInsertForm/form.tsx +++ b/packages/common/business_components/src/ui/sdmInsertForm/form.tsx @@ -1,4 +1,4 @@ -import { Button, Input, Label } from "@common/components"; +import { Button, Input } from "@common/components"; import { AsYouType } from "libphonenumber-js"; import React, { useCallback, useEffect, useState } from "react"; import type { ControllerRenderProps, UseFormReturn } from "react-hook-form"; @@ -6,10 +6,7 @@ import { FormField } from "../form"; import { FormUi } from "../form_ui"; import { SelectBox } from "../select"; import { SdmSearchForm } from "./sdmNameBox"; -import { UiModal, UiTable } from '../../ui'; -import type { Zip, ZipSearchParams } from "../search_input_address/zipService"; -import { findAddress } from "../search_input_address/findAddress"; -import { cn } from "@common/components"; +import { SearchAddressModal } from "../search_address/SearchAddressModal"; // 수요처 정보 export type DemandCompType = { @@ -91,7 +88,6 @@ export function SdmRegForm({ readOnly, openNetwork, }: SdmRegFormProps) { - const PAGE_SIZE = 10; const [sidoValue, setSidoValue] = useState(""); const [sigunValue, setSigunValue] = useState(""); const [filteredSigunData, setFilteredSigunData] = useState([ @@ -104,30 +100,6 @@ export function SdmRegForm({ const [zipId, setZipId] = useState(undefined); const [address, setAddress] = useState(""); const [detailedAddress, setDetailedAddress] = useState(""); - const [curPage, setCurPage] = useState(1); - // 우편번호 검색 관련 상태 - const [zipSearchResults, setZipSearchResults] = useState([]); - const [zipTotalElements, setZipTotalElements] = useState(-1); - const [searchQuery, setSearchQuery] = useState({ - roadNm: "", - bldgNoMno: null, - bldgNoSno: null, - page: curPage, - size: PAGE_SIZE - }); - const [isResetPage, setIsResetPage] = useState(false); - const [isResetSelection, setIsResetSelection] = useState(false); - const [selectedRowIndex, setSelectedRowIndex] = useState(undefined); - const [selectedZip, setSelectedZip] = useState(); - const [isSelectedZip, setIsSelectedZip] = useState(false); - - const handleCellClick = (index: any, headId: any) => { - console.log('index', index); - console.log('headId', headId); - setSelectedZip(zipSearchResults[index]); - setIsSelectedZip(true); - console.log('selectedZip', zipSearchResults[index]); - }; const formatPhoneNumber = (value: string) => { const input = value; @@ -293,17 +265,6 @@ export function SdmRegForm({ [orgBznmNo, setIsDuplicate], ); - // 우편번호 선택 함수 - const handleSelectAddress = () => { - setZipId(selectedZip?.zipId); - setAddress(selectedZip?.zipAddr || ""); - setDetailedAddress(""); - setIsZipModalOpen(false); - setSelectedZip(undefined); - setIsSelectedZip(false); - setSelectedRowIndex(undefined); - }; - useEffect(() => { if (updateList?.dmdInfoId) { form.reset(updateList); @@ -325,16 +286,6 @@ export function SdmRegForm({ console.log("form.formState.errors ", form.formState.errors); }, [form.formState.errors]); - useEffect(() => { - console.log("curPage ", curPage); - searchQuery.page = curPage - 1; - const fetchAddress = async () => { - const result = await findAddress(searchQuery); - setZipSearchResults(result?.content); - }; - fetchAddress(); - }, [curPage]); - // 폼 제출 전에 주소 합치기 useEffect(() => { // address와 detailedAddress를 합쳐서 daddr에 설정 @@ -344,105 +295,6 @@ export function SdmRegForm({ } }, [address, detailedAddress, form]); - const renderBody = () => ( - <> -
{ - e.preventDefault(); - e.stopPropagation(); - const result = await findAddress(searchQuery); - setZipSearchResults(result?.content); - setZipTotalElements(result?.totalElements); - }} - className="mb-4 space-y-2" - > - {/* 검색 조건 부분 */} -
-
-
- - - setSearchQuery({ - ...searchQuery, - roadNm: e.target.value, - }) - } - placeholder="예: 테헤란로" - className="!text-[1.3rem]" - /> -
- -
- - { - const value = e.target.value - ? parseInt(e.target.value) - : null; - setSearchQuery({ - ...searchQuery, - bldgNoMno: value, - }); - }} - placeholder="예: 123" - className="!text-[1.3rem]" - /> -
- -
- - { - const value = e.target.value - ? parseInt(e.target.value) - : null; - setSearchQuery({ - ...searchQuery, - bldgNoSno: value, - }); - }} - placeholder="예: 45" - className="!text-[1.3rem]" - /> -
-
- -
- -
-
-
- - {/* 검색 결과 부분 */} - {zipTotalElements > 0 && ( - - )} - {zipTotalElements === 0 && ( -
- - 조회된 데이터가 없습니다. -
- )} - - ); - const formFields: Array<{ name: keyof FormSchema; @@ -725,35 +577,14 @@ export function SdmRegForm({ /> ); })} - -1 ? 'h-[80vh]' : 'h-[30vh]'} - w-[30vw] - min-w-[500px] - max-w-[90vw] - max-h-[85vh] - overflow-y-auto - !fixed - !top-[50%] - !left-[50%] - !-translate-x-1/2 - !-translate-y-1/2 - z-[101] - flex - flex-col - `} - body={renderBody()} - footerContent={ -
- - -
- } - useDirectRender={true} + onSelect={(zip) => { + setZipId(zip.zipId); + setAddress(zip.zipAddr || ""); + setDetailedAddress(""); + }} /> ); diff --git a/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx b/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx new file mode 100644 index 000000000..55529f89a --- /dev/null +++ b/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx @@ -0,0 +1,221 @@ +import { Button, Input, Label, cn } from "@common/components"; +import React, { useState, useEffect } from "react"; +import { UiModal } from "../dialog_ui"; +import { UiTable } from "../table"; +import type { Zip, ZipSearchParams } from "./zipService"; +import { findAddress } from "./findAddress"; + +interface SearchAddressModalProps { + open: boolean; + onOpenChange: (open: boolean) => void; + onSelect: (zip: Zip) => void; +} + +export function SearchAddressModal({ open, onOpenChange, onSelect }: SearchAddressModalProps) { + const PAGE_SIZE = 10; + const [curPage, setCurPage] = useState(1); + const [zipSearchResults, setZipSearchResults] = useState([]); + const [zipTotalElements, setZipTotalElements] = useState(-1); + const [searchQuery, setSearchQuery] = useState({ + roadNm: "", + bldgNoMno: null, + bldgNoSno: null, + page: 1, + size: PAGE_SIZE + }); + const [isResetPage, setIsResetPage] = useState(false); + const [isResetSelection, setIsResetSelection] = useState(false); + const [selectedRowIndex, setSelectedRowIndex] = useState(undefined); + const [selectedZip, setSelectedZip] = useState(); + const [isSelectedZip, setIsSelectedZip] = useState(false); + + // Initialize/Reset state when modal opens + useEffect(() => { + if (open) { + setCurPage(1); + setZipSearchResults([]); + setZipTotalElements(-1); + setSearchQuery({ + roadNm: "", + bldgNoMno: null, + bldgNoSno: null, + page: 0, + size: PAGE_SIZE + }); + setSelectedZip(undefined); + setIsSelectedZip(false); + setSelectedRowIndex(undefined); + setIsResetPage(true); + setTimeout(() => setIsResetPage(false), 100); + } + }, [open]); + + // Pagination Effect + useEffect(() => { + if (!open || zipTotalElements === -1) return; + + // Correctly update query for pagination without mutation + const nextPage = curPage - 1; + if (searchQuery.page !== nextPage) { + const newQuery = { ...searchQuery, page: nextPage }; + setSearchQuery(newQuery); + + const fetchAddress = async () => { + const result = await findAddress(newQuery); + setZipSearchResults(result?.content || []); + }; + fetchAddress(); + } + }, [curPage, open, zipTotalElements]); + + const handleCellClick = (index: any) => { + setSelectedZip(zipSearchResults[index]); + setIsSelectedZip(true); + setSelectedRowIndex(index); + }; + + const handleSearch = async (e: React.FormEvent) => { + e.preventDefault(); + e.stopPropagation(); + + const query = { ...searchQuery, page: 0 }; + setSearchQuery(query); + setCurPage(1); + setIsResetPage(true); + + const result = await findAddress(query); + setZipSearchResults(result?.content || []); + setZipTotalElements(result?.totalElements || 0); + + setTimeout(() => setIsResetPage(false), 100); + }; + + const handleConfirm = () => { + if (selectedZip) { + onSelect(selectedZip); + onOpenChange(false); + } + }; + + return ( + -1 ? 'h-[80vh]' : 'h-[30vh]'} + w-[30vw] + min-w-[500px] + max-w-[90vw] + min-h-[235px] + overflow-y-auto + !fixed + !top-[50%] + !left-[50%] + !-translate-x-1/2 + !-translate-y-1/2 + z-[101] + flex + flex-col + `} + body={ + <> +
+
+
+
+ + + setSearchQuery({ + ...searchQuery, + roadNm: e.target.value, + }) + } + placeholder="예: 테헤란로" + className="!text-[1.3rem]" + /> +
+ +
+ + { + const value = e.target.value + ? parseInt(e.target.value) + : null; + setSearchQuery({ + ...searchQuery, + bldgNoMno: value, + }); + }} + placeholder="예: 123" + className="!text-[1.3rem]" + /> +
+ +
+ + { + const value = e.target.value + ? parseInt(e.target.value) + : null; + setSearchQuery({ + ...searchQuery, + bldgNoSno: value, + }); + }} + placeholder="예: 45" + className="!text-[1.3rem]" + /> +
+
+ +
+ +
+
+
+ + {zipTotalElements > 0 && ( + + )} + {zipTotalElements === 0 && ( +
+ + 조회된 데이터가 없습니다. +
+ )} + + } + footerContent={ +
+ + +
+ } + useDirectRender={true} + /> + ); +} diff --git a/packages/common/business_components/src/ui/search_address/findAddress.ts b/packages/common/business_components/src/ui/search_address/findAddress.ts new file mode 100644 index 000000000..5e5ba4360 --- /dev/null +++ b/packages/common/business_components/src/ui/search_address/findAddress.ts @@ -0,0 +1,118 @@ + +// const Key = 'U01TX0FVVEgyMDI1MDgyODE0MTAxNzExNjEyMjA' +// const addresssKey = 'devU01TX0FVVEgyMDI1MDgyNTEwMzkwNDExNjEwNTM='; //인증키 만료일은 2025-11-23 + +import type { Zip, ZipSearchParams } from "./zipService"; + +/** + * 주소 API 응답 타입 + * https://business.juso.go.kr/addrlink/main.do 해당 사이트 참조 + */ +export type AddressApiResponse = { + results: { + common: { + errorMessage: string; + countPerPage: string; + totalCount: string; + errorCode: string; + currentPage: string; + }; + juso: addressType[]; + }; +} + +export type addressType = { + detBdNmList: string; + engAddr: string; + rn: string; + emdNm: string; + zipNo: string; + roadAddrPart2: string; + emdNo: string; + sggNm: string; + jibunAddr: string; + siNm: string; + roadAddrPart1: string; + bdNm: string; + admCd: string; + udrtYn: string; + lnbrMnnm: string; + roadAddr: string; + lnbrSlno: string; + buldMnnm: string; + bdKdcd: string; + liNm: string; + rnMgtSn: string; + mtYn: string; + bdMgtSn: string; + buldSlno: string; +} + +/** + * 주소에 따른 검색 + * @param search : 검색어 + * @returns addressType[] 주소 배열 + */ +export const findAddress = async (searchQuery: ZipSearchParams): Promise => { + if (!searchQuery) return []; + + // 쿼리 파라미터 생성 + const params = new URLSearchParams(); + if (searchQuery.roadNm) params.append('roadNm', searchQuery.roadNm); + if (searchQuery.bldgNoMno != null) params.append('bldgNoMno', searchQuery.bldgNoMno.toString()); + if (searchQuery.bldgNoSno != null) params.append('bldgNoSno', searchQuery.bldgNoSno.toString()); + if (searchQuery.page != null) params.append('page', searchQuery.page.toString()); + if (searchQuery.size != null) params.append('size', searchQuery.size.toString()); + + const url = `/cms-service/api/v1/zips?${params.toString()}`; + try { + const response = await fetch(url); + if (!response.ok) throw new Error('Network response was not ok'); + + const data = await response.json(); + if (data) return data + else return []; + } catch (error) { + console.error('Error fetching address data:', error); + return []; + } + +} + + + +export const searchFilter = (search: string) => { + + + if (search.length > 0) { + //특수문자 제거 + const expText = /[%=><]/; + if (expText.test(search) == true) { + alert("특수문자를 입력 할수 없습니다."); + search = search.split(expText).join(""); + return false; + } + + //특정문자열(sql예약어의 앞뒤공백포함) 제거 + const sqlArray = [ + //sql 예약어 + "OR", "SELECT", "INSERT", "DELETE", "UPDATE", "CREATE", "DROP", "EXEC", + "UNION", "FETCH", "DECLARE", "TRUNCATE" + ] + + let regex; + for (let i = 0; i < sqlArray.length; i++) { + regex = new RegExp(sqlArray[i] as string, "gi"); + + if (regex.test(search)) { + alert("\"" + sqlArray[i] + "\"와(과) 같은 특정문자로 검색할 수 없습니다."); + search = search.replace(regex, ""); + return false; + } + } + } + return true; + + + +} diff --git a/packages/common/business_components/src/ui/search_address/index.ts b/packages/common/business_components/src/ui/search_address/index.ts new file mode 100644 index 000000000..b790bb492 --- /dev/null +++ b/packages/common/business_components/src/ui/search_address/index.ts @@ -0,0 +1,3 @@ +export * from "./SearchAddressModal"; +export * from "./findAddress"; +export * from "./zipService"; diff --git a/packages/common/business_components/src/ui/search_address/zipService.ts b/packages/common/business_components/src/ui/search_address/zipService.ts new file mode 100644 index 000000000..03e4a8ccc --- /dev/null +++ b/packages/common/business_components/src/ui/search_address/zipService.ts @@ -0,0 +1,66 @@ +interface SortConfig { + empty: boolean; + sorted: boolean; + unsorted: boolean; +} + +interface PageableConfig { + sort: SortConfig; + offset: number; + pageNumber: number; + pageSize: number; + paged: boolean; + unpaged: boolean; +} + +export interface PageableList { + content: T[]; + pageable: PageableConfig; + sort: SortConfig; + totalPages: number; + totalElements: number; + number: number; + numberOfElements: number; + size: number; + first: boolean; + last: boolean; + empty: boolean; +} + +export interface PageableParams { + page?: number; + size?: number; + sort?: string; +} + + +export interface ZipSearchParams extends PageableParams { + zoneNo?: string; // 구역번호 + ctpvNm?: string; // 시도명 + sggNm?: string; // 시군구명 + emdNm?: string; // 읍면동명 + roadNm?: string; // 도로명 + stdgNm?: string; // 법정동명 + dongNm?: string; // 행정동명 + bldgNoMno?: number | null; // 빌딩본번 + bldgNoSno?: number | null; // 빌딩딩부번 + lotnoMno?: number | null; // 지번본번 + lotnoSno?: number | null; // 지번부번 +} + +export interface Zip { + zipId: number; + zoneNo: string; + ctpvNm: string; + sggNm: string; + emdNm: string; + roadNm: string; + bldgNoMno: number; + bldgNoSno: number; + lotnoMno: number; + lotnoSno: number; + lotno: string; + zipAddr: string; +} + +export type ZipList = PageableList; From 44580f515668811272493e3ac030a485a286e7e7 Mon Sep 17 00:00:00 2001 From: dongsilove Date: Sun, 18 Jan 2026 21:21:19 +0900 Subject: [PATCH 2/5] =?UTF-8?q?fo:=EC=88=98=EC=A7=88=ED=98=84=ED=99=A9=20?= =?UTF-8?q?=EC=B4=9D=EC=9D=B8=EC=84=A4=EB=B9=84tab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../facilityWaterQlty/modal/page.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx index 7de556932..470a44e4c 100644 --- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx @@ -77,7 +77,7 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea useEffect(() => { const filteredYearData = setFilterAfterData(facilityWaterQltyYearList); setCopyYearList(filteredYearData as FacilityWaterQltyProps[]); - setChongInWaterQltyYearList(filteredYearData as FacilityWaterQltyProps[]); + setChongInWaterQltyYearList(facilityWaterQltyYearList); }, [facilityWaterQltyYearList]); // 필터링 된 후 최대, 최소, 평균 값 계산 @@ -344,8 +344,7 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea const filterData = useCallback((returnType: ReturnType) => { const filteredData = setFilterAfterData(returnType.filteredList); - setCopyYearList(filteredData as FacilityWaterQltyProps[]); // 처리시설 수질현황 - setChongInWaterQltyYearList(filteredData as FacilityWaterQltyProps[]); // 총인설비 수질현황 + setCopyYearList(filteredData as FacilityWaterQltyProps[]); // 처리시설/총인설비 수질현황 }, []); const excelDownload = () => { @@ -386,10 +385,10 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea prevExcelListRef.current = excelDownList; } else { // 총인설비 수질현황 const excelDownList: modalChoinginExcelType[] = []; - if (chongInWaterQltyYearList.length > 0) { - chongInWaterQltyYearList.forEach((item) => { - // if (copyYearList.length > 0) { - // copyYearList.forEach((item) => { + // if (chongInWaterQltyYearList.length > 0) { + // chongInWaterQltyYearList.forEach((item) => { + if (copyYearList.length > 0) { + copyYearList.forEach((item) => { excelDownList.push({ 날짜: item.msrDt, "유입BOD(mg/L)": CommaToNumber(item.tpInflWqltBod), @@ -610,4 +609,4 @@ export default function WaterQualityModal({ fcltyName = '', facilityCd = '', sea ); -} \ No newline at end of file +} From e464d298ad4b89a47fe53636968de360150a1059 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 19 Jan 2026 13:24:29 +0900 Subject: [PATCH 3/5] =?UTF-8?q?wr:=2036=20=EA=B3=84=ED=86=B5=EB=8F=84=20?= =?UTF-8?q?=ED=8F=89=EB=A9=B4=EB=8F=84=20=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/fo/app/pages/(with-layout)/rdi/page.tsx | 3 +- .../matMng/coMat/ruseCaseMng/page.tsx | 156 ++++++++++-------- .../ruseFcltMng/fcltReg/pbnstReg/page.tsx | 4 + .../app/store/matDmd/ruseCaseMng/headList.tsx | 4 +- .../fcltReg/pbnstReg/mngReg/mngRegForm.tsx | 7 +- .../src/ui/file-upload/lib/file_upload.tsx | 1 + .../ui/search_address/SearchAddressModal.tsx | 2 +- .../src/ui/table/index.tsx | 7 +- 8 files changed, 108 insertions(+), 76 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/rdi/page.tsx b/apps/fo/app/pages/(with-layout)/rdi/page.tsx index 47142e0a1..98120523a 100644 --- a/apps/fo/app/pages/(with-layout)/rdi/page.tsx +++ b/apps/fo/app/pages/(with-layout)/rdi/page.tsx @@ -215,7 +215,8 @@ export default function Rdi() {
- +
diff --git a/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx b/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx index afea9d894..6001d8827 100644 --- a/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx @@ -24,6 +24,7 @@ import { Button, Label } from "@common/components/ui"; import { useEffect, useState } from "react"; import toast, { Toaster } from "react-hot-toast"; import { useTranslation } from "react-i18next"; +import * as XLSX from "xlsx"; export default function RuseCaseMng() { const { code, ruseCaseMng, selectRuseCaseMng, ruseCaseMngInit } = useWrStore( @@ -76,7 +77,9 @@ export default function RuseCaseMng() { }; useEffect(() => { - if (excelList !== undefined && excelList.length === 0) { + if (!excelList) return; + + if (excelList.length === 0) { toast.error(t("excelDownErrMsg")); return; } @@ -86,74 +89,93 @@ export default function RuseCaseMng() { } // 받은 파일 바인너리 처리 const blobRet = await response.arrayBuffer(); - if (excelList) { - const excelData1 = excelList.map((item) => { - return [ - item.ruseBizNm, - item.bizBgngDate, - item.bizEndDate, - item.splyFcltKnd, - item.splyFcltNm, - item.splyFcltCpct, - item.dmdFcltNm, - item.dmdFcltAddr, - item.ruseFcltCpct, - item.ruseFcltPplLen, - item.ruseFcltUsg, - item.ruseFcltSplyCpct, - item.ruseFcltPrcsMsrc, - item.grnteWqUsg, - item.grnteWqGrssClfg, - item.grnteWqCombResdch, - item.grnteWqTrbt, - item.grnteWqBod, - item.grnteWqSmll, - item.grnteWqCrmty, - item.grnteWqTn, - item.grnteWqTp, - item.grnteWqPh, - item.grnteWqClIonQnt, - item.grnteWqCndctStat, - item.grnteWqRmrk, - item.reqBizGrssCst, - item.reqBizReuseFcltCst, - item.reqBizPplCst, - item.reqBizArchCst, - item.reqBizMchnCst, - item.reqBizMtrngCst, - item.reqBizGisCst, - item.reqBizCctvCst, - item.reqBizCmcnCst, - item.reqBizWstCst, - item.reqBizDesignCst, - item.reqBizSpvsCst, - item.reqBizSbsdCst, - item.reqBizEtc, - item.prcmPlanGrssCst, - item.prcmPlanNlep, - item.prcmPlanLcep, - item.prcmPlanBrdnCst, - item.prcmPlanEcqrRt, - item.clclnGrssCst, - item.clclnNlep, - item.clclnLcep, - item.clclnBrdnCst, - item.clclnEcqrRt, - ]; - }); - const sheetParameter: SheetParameter[] = [ - { - data: excelData1, - headerNum: 2, - headerRange: "A1:AX1", - sheetName: "물재이용사례", - startCol: "A", - }, + const replaceHeaderText = (text: string) => + text + .replaceAll("사업시작일", "사업시작년") + .replaceAll("사업종료일", "사업종료년"); + + const wb = XLSX.read(blobRet, { type: "array" }); + wb.SheetNames.forEach((sheetName) => { + const sheet = wb.Sheets[sheetName]; + if (!sheet) return; + + Object.keys(sheet).forEach((addr) => { + if (addr.startsWith("!")) return; + const cell = sheet[addr] as XLSX.CellObject | undefined; + if (!cell || typeof cell.v !== "string") return; + const next = replaceHeaderText(cell.v); + if (next !== cell.v) cell.v = next; + }); + }); + const updatedBlob = XLSX.write(wb, { bookType: "xlsx", type: "array" }); + + const excelData1 = excelList.map((item) => { + return [ + item.ruseBizNm, + item.bizBgngDate, + item.bizEndDate, + item.splyFcltKnd, + item.splyFcltNm, + item.splyFcltCpct, + item.dmdFcltNm, + item.dmdFcltAddr, + item.ruseFcltCpct, + item.ruseFcltPplLen, + item.ruseFcltUsg, + item.ruseFcltSplyCpct, + item.ruseFcltPrcsMsrc, + item.grnteWqUsg, + item.grnteWqGrssClfg, + item.grnteWqCombResdch, + item.grnteWqTrbt, + item.grnteWqBod, + item.grnteWqSmll, + item.grnteWqCrmty, + item.grnteWqTn, + item.grnteWqTp, + item.grnteWqPh, + item.grnteWqClIonQnt, + item.grnteWqCndctStat, + item.grnteWqRmrk, + item.reqBizGrssCst, + item.reqBizReuseFcltCst, + item.reqBizPplCst, + item.reqBizArchCst, + item.reqBizMchnCst, + item.reqBizMtrngCst, + item.reqBizGisCst, + item.reqBizCctvCst, + item.reqBizCmcnCst, + item.reqBizWstCst, + item.reqBizDesignCst, + item.reqBizSpvsCst, + item.reqBizSbsdCst, + item.reqBizEtc, + item.prcmPlanGrssCst, + item.prcmPlanNlep, + item.prcmPlanLcep, + item.prcmPlanBrdnCst, + item.prcmPlanEcqrRt, + item.clclnGrssCst, + item.clclnNlep, + item.clclnLcep, + item.clclnBrdnCst, + item.clclnEcqrRt, ]; - // 버퍼에 있는 엑셀데이터 전달 후 json으로 변환 - await filePickedBlobArray(blobRet, "물재이용사례현황", sheetParameter); - } + }); + + const sheetParameter: SheetParameter[] = [ + { + data: excelData1, + headerNum: 2, + headerRange: "A1:AX1", + sheetName: "물재이용사례", + startCol: "A", + }, + ]; + // 버퍼에 있는 엑셀데이터 전달 후 json으로 변환 + await filePickedBlobArray(updatedBlob, "물재이용사례현황", sheetParameter); }); }, [excelList]); diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx index d5d0e9b33..e460aa31e 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx @@ -45,6 +45,10 @@ import { useTranslation } from "react-i18next"; * indexMng: 시설정보 * indexBiz: 차수별 정보 * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * 🔗 사용 API + * 하수재이용시설을 등록 /reuseFc/pubFc + * 첨부파일 삭제 /attach-service/api/v1/atfl/attachments/atflCd// + * 첨부파일 다운로드 /attach-service/api/v1/atflcd/download/ * */ export default function PublicReuseFaciltyInsert() { diff --git a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx index 8ed65ee7d..c201f5d28 100644 --- a/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx +++ b/apps/wr/app/store/matDmd/ruseCaseMng/headList.tsx @@ -11,14 +11,14 @@ export const ruseCaseHeadListExport: TableUpperProps[] = [ }, { id: "bizBgngDate", - title: "사업시작일", + title: "사업시작년", visible: true, row: 0, rowSpan: 2, }, { id: "bizEndDate", - title: "사업종료일", + title: "사업종료년", visible: true, row: 0, rowSpan: 2, diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx index 6fd110297..d4e7fe940 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm.tsx @@ -35,10 +35,11 @@ export type FilesType = { file: File; }; +const diagramFileTypes = ".pdf,.jpg,.jpeg,.png,.bmp"; /** * 재이용시설 등록 - 하수재이용 시설등록 - * 재이용시설 등록 - 하수재이용 시설현황 + * 재이용시설 등록 - 하수재이용 시설현황 * - layout.tsx에 의해 공통 레이아웃이 적용됨 * - with-layout 적용 * - 하수처리시설에 하수재이용 시설 시설 정보를 등록한다. @@ -459,7 +460,7 @@ export function PbnstMngForm({ setFiles={(files: File[] | null) => { if (files) fileHandler(files, "relation"); }} - fileTypes=".pdf" + fileTypes={diagramFileTypes} onFileClick={(index) => { fileDownLoad( relationfiles?.find( @@ -497,7 +498,7 @@ export function PbnstMngForm({ setFiles={(files: File[] | null) => { if (files) fileHandler(files, "plan"); }} - fileTypes=".pdf" + fileTypes={diagramFileTypes} onFileClick={(index) => { fileDownLoad( planFiles?.find( diff --git a/packages/common/business_components/src/ui/file-upload/lib/file_upload.tsx b/packages/common/business_components/src/ui/file-upload/lib/file_upload.tsx index 42662ab1d..030ddda95 100644 --- a/packages/common/business_components/src/ui/file-upload/lib/file_upload.tsx +++ b/packages/common/business_components/src/ui/file-upload/lib/file_upload.tsx @@ -93,6 +93,7 @@ export const FileUploader = forwardRef< ".jpeg": "image/jpeg", ".png": "image/png", ".gif": "image/gif", + ".bmp": "image/bmp", ".doc": "application/msword", ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".xls": "application/vnd.ms-excel", diff --git a/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx b/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx index 55529f89a..699d3cc50 100644 --- a/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx +++ b/packages/common/business_components/src/ui/search_address/SearchAddressModal.tsx @@ -24,7 +24,7 @@ export function SearchAddressModal({ open, onOpenChange, onSelect }: SearchAddre size: PAGE_SIZE }); const [isResetPage, setIsResetPage] = useState(false); - const [isResetSelection, setIsResetSelection] = useState(false); + const [isResetSelection] = useState(false); const [selectedRowIndex, setSelectedRowIndex] = useState(undefined); const [selectedZip, setSelectedZip] = useState(); const [isSelectedZip, setIsSelectedZip] = useState(false); diff --git a/packages/common/business_components/src/ui/table/index.tsx b/packages/common/business_components/src/ui/table/index.tsx index a0b421db8..1a0fc57c0 100644 --- a/packages/common/business_components/src/ui/table/index.tsx +++ b/packages/common/business_components/src/ui/table/index.tsx @@ -119,7 +119,6 @@ export function UiTable({ }; const leafCols = getLeafCols(headlist); - return ( <> {headName ? ( @@ -263,7 +262,11 @@ export function UiTable({ item.visible != false).length - - headlist.filter((item) => item.visible != false && item.colSpan).length + headlist.filter( + (item) => + item.visible != false && + (item.colSpan || ["A", "B", "C"].includes(item.id)), + ).length } className="h-24 text-center text-gray-500" > From 122e10f85175af6239a6ca05c395325c01e9c8f6 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 19 Jan 2026 16:38:26 +0900 Subject: [PATCH 4/5] =?UTF-8?q?wr:=20=EC=9E=AC=EC=9B=90=ED=98=91=EC=9D=98?= =?UTF-8?q?=20=EB=AC=B8=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../matMng/coMat/ruseCaseMng/page.tsx | 4 +++ .../ruseFcltMng/fcltReg/pbnstReg/page.tsx | 34 +++++++++---------- .../ruseFcltMng/fcltSttn/htdflSttn/page.tsx | 11 +++--- .../ruseFcltMng/fcltSttn/pbnstSttn/page.tsx | 19 ++++++----- .../ruseFcltMng/fcltSttn/rainSttn/page.tsx | 3 ++ .../ruseFcltMng/fcltSttn/rswtSttn/page.tsx | 3 ++ apps/wr/app/store/common/auth/index.tsx | 3 +- .../ruseFcltMng/fcltReg/pbnstReg/index.tsx | 4 +-- 8 files changed, 47 insertions(+), 34 deletions(-) diff --git a/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx b/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx index 6001d8827..a64c57364 100644 --- a/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx +++ b/apps/wr/app/(with-layout)/matMng/coMat/ruseCaseMng/page.tsx @@ -321,8 +321,12 @@ export default function RuseCaseMng() { }} resetPageNo={resetPage} /> + + ☞ 본 사례의 사업비는 재원협의 단계의 정보이므로, 최종확정된 비용이 아닙니다. + + diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx index e460aa31e..f6d83e29c 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltReg/pbnstReg/page.tsx @@ -1,3 +1,19 @@ +/** + * 재이용시설 등록 - 하수재이용 시설등록 + * + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * - 하수처리시설에 하수재이용 시설을 등록 한다. + * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 + * indexMng: 시설정보 + * indexBiz: 차수별 정보 + * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. + * 🔗 사용 API + * 하수재이용시설을 등록 /reuseFc/pubFc + * 첨부파일 삭제 /attach-service/api/v1/atfl/attachments/atflCd// + * 첨부파일 다운로드 /attach-service/api/v1/atflcd/download/ + * */ + "use client"; import { ContentsDiv, @@ -35,22 +51,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { z } from "zod"; import { createDefaultPbnstItem } from "./utilsZod"; import { useTranslation } from "react-i18next"; -/** - * 재이용시설 등록 - 하수재이용 시설등록 - * - * - layout.tsx에 의해 공통 레이아웃이 적용됨 - * - with-layout 적용 - * - 하수처리시설에 하수재이용 시설을 등록 한다. - * - form으로 시설정보 및 차수별 정보의 컴포넌트 데이터를 관리한다 - * indexMng: 시설정보 - * indexBiz: 차수별 정보 - * 로 하수재이용 시설에 등록된 시설 및 차수별 정보를 관리한다. - * 🔗 사용 API - * 하수재이용시설을 등록 /reuseFc/pubFc - * 첨부파일 삭제 /attach-service/api/v1/atfl/attachments/atflCd// - * 첨부파일 다운로드 /attach-service/api/v1/atflcd/download/ - * */ - export default function PublicReuseFaciltyInsert() { const { auth, @@ -108,7 +108,7 @@ export default function PublicReuseFaciltyInsert() { useEffect(() => { if (useInitRef.current == true && laeSeCd !== undefined) { - pubHasuInit("1", laeSeCd); + pubHasuInit("1", laeSeCd); //page: string, sggOrCity: string } }, [useInitRef.current, laeSeCd]); diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/htdflSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/htdflSttn/page.tsx index beaa71569..ea4b49924 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/htdflSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/htdflSttn/page.tsx @@ -1,5 +1,7 @@ +/** + * 온배수시설 현황 + */ "use client"; - import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; import type { @@ -34,11 +36,9 @@ import toast, { Toaster } from "react-hot-toast"; import { useTranslation } from "react-i18next"; export default function HtdflSttn() { - const { code, htdflSttn, htdflSttnSearch, initHtdfl } = useWrStore( - (state) => state - ); + const { auth, code, htdflSttn, htdflSttnSearch, initHtdfl } = useWrStore((state) => state); + const { laeSeCd } = auth; // 지자체구분코드 const { htdflSttnRes, htdflSttnResCount } = htdflSttn; - const isDownloadTriggered = useRef(false); const { t } = useTranslation('base'); const [pageNation, setPageNation] = useState(1); @@ -57,6 +57,7 @@ export default function HtdflSttn() { // }>({ isOpen: false, chBuilding: [] }); const [fcltNm, setFcltNm] = useState(""); + console.log("laeSeCd : ", laeSeCd); useEffect(() => { htdflSttnSearch(false, pageNation, htdflSttnSize, String(getConValue()), fcltNm, code.cityCd, code.sggCd); isResetPage(false) diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx index ca0b04f31..2a2340253 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/pbnstSttn/page.tsx @@ -1,3 +1,12 @@ +/** + * 하수재이용 시설 현황 + * 재이용시설 현황 - 하수재이용시설 현황 + * - layout.tsx에 의해 공통 레이아웃이 적용됨 + * - with-layout 적용 + * 하수처리시설. 하수재이용시설 , 하수재이용시설 실적에 대한 정보를 확인한다. + * 모달 : 테이블의 헤더를 원하는대로 조절해서 볼수 있다. + * 클릭시 해당 재이용ㅇ + * */ "use client"; import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; @@ -24,15 +33,7 @@ import { useCallback, useEffect, useRef, useState } from "react"; import toast, { Toaster } from "react-hot-toast"; import { useTranslation } from "react-i18next"; -/** - * 하수재이용 시설 현황 - * 재이용시설 현황 - 하수재이용시설 현황 - * - layout.tsx에 의해 공통 레이아웃이 적용됨 - * - with-layout 적용 - * 하수처리시설. 하수재이용시설 , 하수재이용시설 실적에 대한 정보를 확인한다. - * 모달 : 테이블의 헤더를 원하는대로 조절해서 볼수 있다. - * 클릭시 해당 재이용ㅇ - * */ + export default function PbnstSttn() { const { code, diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx index f5ec6e8c8..46f1fa0c4 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rainSttn/page.tsx @@ -1,3 +1,6 @@ +/** + * 빗물재이용시설 현황 + */ "use client"; import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; diff --git a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx index 7cb81d209..268ef8a35 100644 --- a/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx +++ b/apps/wr/app/(with-layout)/ruseFcltMng/fcltSttn/rswtSttn/page.tsx @@ -1,3 +1,6 @@ +/** + * 중수도시설 현황 + */ "use client"; import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; diff --git a/apps/wr/app/store/common/auth/index.tsx b/apps/wr/app/store/common/auth/index.tsx index 7b647d5e7..209b1fb8a 100644 --- a/apps/wr/app/store/common/auth/index.tsx +++ b/apps/wr/app/store/common/auth/index.tsx @@ -10,7 +10,7 @@ export type authState = { regAuthrtYn: string; mdfcnAuthrtYn: string; delAuthrtYn: string; - laeSeCd: string; + laeSeCd: string; // 지자체구분코드 myUUID?: string; }; }; @@ -72,6 +72,7 @@ export const authActionsExport: (set: any, get: any) => authActions = ( return; } const infoMe = await getUserInfo(); + console.log(infoMe); const isLaeSeCd = infoMe.laeSeCd.slice(0, 2) === "G3" ? infoMe.laeSeCd.slice(2) : "0"; diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx index b1e0daf82..d595a0624 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/index.tsx @@ -118,7 +118,7 @@ const hasuListFetch = async ( if (searchTxt) { url = url + `/${searchTxt}`; } - const rainRes = await postFectch(url, data, fetchType.COMMON); + const rainRes = await postFectch(url, data, fetchType.COMMON); // fo const hasuList = rainRes.data.map((item: any) => { return { @@ -176,7 +176,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => { // 하수처리시설을 조회한다(운영실태) pubHasuInit: async (page: string, sggOrCity: string) => { try { - const pbnstHasuRes = await hasuListFetch(page, sggOrCity); + const pbnstHasuRes = await hasuListFetch(page, sggOrCity); // /prcsFclt/ruseInfo return set((state: pubFacState) => ({ ...state, pbnst: { From 3eb8861d0619231f307f0d29af3f6b88445d70ce Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 19 Jan 2026 18:11:56 +0900 Subject: [PATCH 5/5] =?UTF-8?q?dm:=20=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=ED=98=84=ED=99=A9=20=EC=8B=9C=EB=8F=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dm/app/store/wrStatus/index.tsx | 14 ++++----- apps/dm/app/store/wrStatus/type.ts | 10 ++++--- .../facilityPrecipitation/page.tsx | 30 +++++++++++-------- .../app/store/facilityPrecipitation/index.tsx | 4 ++- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/apps/dm/app/store/wrStatus/index.tsx b/apps/dm/app/store/wrStatus/index.tsx index b3c08e9e2..d3cc61cc4 100644 --- a/apps/dm/app/store/wrStatus/index.tsx +++ b/apps/dm/app/store/wrStatus/index.tsx @@ -85,22 +85,20 @@ export const DmStatusReducer = (set: any): DmStatusActions => { const boardData: DmStatusBoardType[] = data.data.map( (item: DmStatusDataType) => { - const regionText = cityCd.find((city) => item.region === city.val); + const regionText = item.sidoNm; //cityCd.find((city) => item.region === city.val); const sewage = item.sewage; const rainwater = item.rainwater; const reclaimed = item.reclaimed; const sewageCnt = item.sewageCnt; const rainwaterCnt = item.rainwaterCnt; const reclaimedCnt = item.reclaimedCnt; - if (!regionText) console.log("item.region ", item.region); - if (regionText && regionText.text) { + return { - region: regionText ? regionText.text : item.region, - sewage: sewageCnt + "(" + sewage + ")", - rainwater: rainwaterCnt + "(" + rainwater + ")", - reclaimed: reclaimedCnt + "(" + reclaimed + ")", + region: regionText ? regionText : item.region, + sewage: sewageCnt + "(" + sewage.toLocaleString() + ")", + rainwater: rainwaterCnt + "(" + rainwater.toLocaleString() + ")", + reclaimed: reclaimedCnt + "(" + reclaimed.toLocaleString() + ")", }; - } } ).filter((item): item is DmStatusBoardType => item !== undefined); diff --git a/apps/dm/app/store/wrStatus/type.ts b/apps/dm/app/store/wrStatus/type.ts index 513a5fb01..2cf1b36f0 100644 --- a/apps/dm/app/store/wrStatus/type.ts +++ b/apps/dm/app/store/wrStatus/type.ts @@ -1,14 +1,16 @@ export type DmStatusDataType = { - region: string; + sidoNm: string; // 시도명 + region: string; // 시도코드 sewage: string; rainwater: string; reclaimed: string; - sewageCnt:string - rainwaterCnt:string - reclaimedCnt:string + sewageCnt:string; + rainwaterCnt:string; + reclaimedCnt:string; }; export type DmStatusBoardType = { + sidoNm: string; // 시도명 region: string; sewage: string; rainwater: string; diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx index 0e46505e0..18a769871 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/page.tsx @@ -209,10 +209,13 @@ export default function FacilityPrecipitation() { - setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} /> + setFcltCpct(val.toString())} value={fcltCpct} selectClass={undefined} /> - setSearchYear(val.toString())} value={searchYear} selectClass={undefined} /> - setOperationValue(val.toString())} value={operationValue} selectClass={undefined} /> + setSearchYear(val.toString())} value={searchYear} selectClass={undefined} /> + setOperationValue(val.toString())} value={operationValue} selectClass={undefined} /> } rightChildren={undefined} selectSidoData={selectSidoData} @@ -226,16 +229,19 @@ export default function FacilityPrecipitation() { excelClick={excelDownload} initClick={resetVal} ref={ref} isAdmin={false}/> - - -
-
- index !== undefined && cellClick(index)} headName={"시설별 강수현황"} tableData={mainList} headlist={upheadList} pageSize={10} total={total} resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} /> + + +
+
+ index !== undefined && cellClick(index)} + headName={"시설별 강수현황"} + tableData={mainList} headlist={upheadList} pageSize={10} total={total} + resetPageNo={resetPage} onPageChange={handlePageChange} widthFixed={true} /> +
+
- -
- - + + {selectedRow !== null && ( } diff --git a/apps/fo/app/store/facilityPrecipitation/index.tsx b/apps/fo/app/store/facilityPrecipitation/index.tsx index 6272ef55b..b18471eca 100644 --- a/apps/fo/app/store/facilityPrecipitation/index.tsx +++ b/apps/fo/app/store/facilityPrecipitation/index.tsx @@ -153,7 +153,9 @@ export const fetchFacilityRainDetailList = async (searchYear: string|undefined, } }; -const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number, searchYear: string, part?: string, nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => { +const fetchFacilityPrecipitationList = async (pageNo: number, pageSize: number, searchYear: string, part?: string + , nameCd?: string, fcltCpct?: string, operationValue?: string, fcltyNm?: string) => { + const tailStr = '/'+pageNo + '/' + pageSize + '/' + searchYear + (part?'/' + part:'' ) + (nameCd?'/' + nameCd:'' ) + (fcltCpct?'/' + fcltCpct:'' ) + (operationValue?'/' + operationValue:'' ) + (fcltyNm && fcltyNm !== '' ? '/' + fcltyNm : '') ; const url = '/fclt/rain' + tailStr; const res = await getFetch('fo', url);