Merge commit 'bf534b9e96becc26ff057dc837aa96ad1e224e64' into iipbs/wr/form_fuction

This commit is contained in:
jyha00
2025-06-10 09:19:03 +09:00
58 changed files with 1214 additions and 855 deletions
@@ -20,7 +20,6 @@ import HtdflRegForm from "@/components/ui/form/fcltReg/htdflReg/htdflRegForm";
import type { chgBuilding } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import BdstChgModal from "@/components/ui/modal/fcltReg/bdstChgModal/bdstChgModal";
import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg";
import { headMakeColSpan } from "../rainReg/TableHead";
import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
export default function Home() {
@@ -9,7 +9,7 @@ import {
UiModal,
UiTable,
} from "@common/business_components";
import { Button, Input } from "@common/components";
import { Button } from "@common/components";
import { useWrStore } from "../../../store";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@common/components";
import { useEffect, useState } from "react";
@@ -17,14 +17,11 @@ import ListDiv from "@common/business_components/ui/list_div";
import { tableData } from "@/components/lib/func/commom";
import type {
customPbnst,
fcBizSchema,
fcBizType,
pubHasuType,
ruseFcltType,
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { PbnstMngForm } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm";
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm";
import { z } from "zod";
import { PbnstRegModal } from "@/components/ui/modal/fcltReg/pbnstRegModal/pbnstRegModal";
import { Toaster } from "react-hot-toast";
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
@@ -53,7 +50,6 @@ export default function PublicReuseFaciltyInsert() {
const [searchTxt, setSearchTxt] = useState<string>();
const [bdstTable, setbdstTable] = useState<pubHasuType[]>();
const [selectBdst, setSelectBdst] = useState<customPbnst | null>(null);
useEffect(() => {
@@ -1,7 +1,7 @@
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import { TableRow, TableHead } from "@common/components/ui";
export const headMakeColSpan = (upHeadList: TableUpperProps[]) => {
export const makeFcltRegHead = (upHeadList: TableUpperProps[]) => {
return (
<>
<TableRow>
@@ -19,7 +19,7 @@ import { tableData } from "@/components/lib/func/commom";
import RswtrRegForm from "@/components/ui/form/fcltReg/rswtrReg/rswtrRegForm";
import BdstChgModal from "@/components/ui/modal/fcltReg/bdstChgModal/bdstChgModal";
import type { chgBuilding } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { headMakeColSpan } from "../rainReg/TableHead";
import { makeFcltRegHead } from "../rainReg/TableHead";
import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
export default function Home() {
@@ -21,7 +21,7 @@ import {
type ReturnType,
} from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
import { makeFcltRegHead } from "@common/business_components/ui/table/makeFcltRegHead";
import SttnDetailModal from "@/components/ui/modal/sttn/sttnDetailModal/sttnDetailModal";
import BdstChgModal from "@/components/ui/modal/fcltReg/bdstChgModal/bdstChgModal";
import { Button } from "@common/components/ui";
@@ -155,7 +155,7 @@ export default function HtdflSttn() {
headName={[]}
tableData={bdstTable || []}
children={
<HeadMakeColSpan upHeadList={htdflSttn.htdflSttNodeList} />
<makeFcltRegHead upHeadList={htdflSttn.htdflSttNodeList} />
}
headlist={htdflSttn.htdflSttHeadList}
pageSize={20}
@@ -4,38 +4,98 @@ import { btnClass } from "@/app/store/common/code";
import {
ContentsDiv,
SearchBaseForm,
SearchInput,
SelectBox,
Title,
UiModal,
UiTable,
type ReturnType,
} from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button } from "@common/components/ui";
import { Button, Label } from "@common/components/ui";
import HeadChModal from "@/components/ui/modal/sttn/headChModal/headChModal";
import { useCallback, useEffect, useRef, useState } from "react";
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
import type { customPbnst } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { excelDownload, getCityOrSgg } from "@/components/lib/func/commom";
import type {
customPbnst,
pubHasuType,
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { excelDownload, getCityOrSgg, yearOptions } from "@/components/lib/func/commom";
import { PbnstRegModal } from "@/components/ui/modal/fcltReg/pbnstRegModal/pbnstRegModal";
import SearchInputText from "@/components/ui/searchInput/searchInput";
import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type";
export default function PbnstSttn() {
const { code, pbnstSttn, pbnstSttnSearch } = useWrStore((state) => state);
const {
code,
pbnstSttn,
pbnstSttnSearch,
pbnSttnInit,
getPbnStnDetail,
pbnNmSearch,
} = useWrStore((state) => state);
const ref = useRef<ReturnType>({} as ReturnType);
const codeData = getCityOrSgg(ref);
const [isRuseReg, setIsRuseReg] = useState<{
isModal: boolean;
data: pubHasuType;
}>({ isModal: false, data: {} as pubHasuType });
const [searchYear, setSearchYear] = useState<string>(
String(new Date().getFullYear())
);
const [pageNation, setPageNation] = useState(1);
const [isChHead, setIsChHead] = useState(false);
const [bdstTable, setBdstTable] = useState<customPbnst[]>();
const [bdstTable, setBdstTable] = useState<WaterReuseFacility[]>();
const [pbnDetaileData, setPbnDetaileData] = useState<{
isModal: boolean;
data: customPbnst;
}>({ isModal: false, data: {} as customPbnst });
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
const excelClick = useCallback(() => {
// if (codeData) pbnstSttnSearch(1, "10000", codeData);
excelDownload(
[[]],
"하수재이용시설 현황",
"sample_pbnstSttn.xlsx",
"A1:U2"
);
}, [pbnstSttnSearch, codeData]);
pbnstSttnSearch("1", '10000', ref.current , '', searchYear);
}, [pbnstSttnSearch, searchYear,ref.current]);
const cellCLick = useCallback(
(index: number | undefined) => {
if (
index !== undefined &&
pbnstSttn.pbnstSttnRes &&
pbnstSttn.pbnstSttnRes[index]
) {
const pbnstRuseFcltPk = pbnstSttn.pbnstSttnRes[index].pbnstRuseFcltPk;
getPbnStnDetail(pbnstRuseFcltPk.slice(0, 11));
}
},
[getPbnStnDetail, pbnstSttn.pbnstSttnRes]
);
useEffect(() => {
if (pbnstSttn.excelList.length >= 0) {
excelDownload(
pbnstSttn.excelList,
"하수재이용시설 현황",
"sample_pbnstSttn.xlsx",
"A1:U2"
);
}
}, [pbnstSttn.excelList]);
useEffect(() => {
if (!pbnstSttn.isInit) {
pbnSttnInit("1", "13", ref.current, searchYear);
}
}, [pbnstSttn.isInit, pbnSttnInit,ref.current]);
useEffect(() => {
setBdstTable(pbnstSttn.pbnstSttnRes);
}, [pbnstSttn.pbnstSttnRes]);
useEffect(() => {
if (pbnRuseNm.length > 1)
pbnNmSearch("1", "23", ref.current, pbnRuseNm, searchYear);
}, [pbnRuseNm]);
return (
<>
@@ -60,7 +120,34 @@ export default function PbnstSttn() {
조회항목설정
</Button>
}
leftChildren={undefined}
leftChildren={
<>
<div className="flex flex-row space-x-2">
<SelectBox
className="w-48 h-full text-2xl"
label="연도"
selectClass={""}
selectArray={yearOptions}
value={searchYear}
onSelectValue={(val: string | number) =>
setSearchYear(String(val))
}
/>
</div>
<SearchInputText
label={"하수처리시설"}
initValue={pbnRuseNm ?? ""}
setValue={(searchNm?: string) => {
setPbnRuseNm(searchNm || "");
}}
setRtnData={function (rtnData: any[]): void {
setBdstTable(rtnData);
}}
searchList={pbnstSttn.pbnstSearchData||[]}
></SearchInputText>
</>
}
queryClick={function (returnType: ReturnType): void {
// '{partValue: 'A', sidoValue: '0', sigunValue: '0', regionValue: '0', unitWaterShedValue: '0', …}'
let con;
@@ -72,7 +159,7 @@ export default function PbnstSttn() {
// pbnstSttnSearch(1, "20", con);
}}
excelClick={excelClick}
initClick={function (): void { }}
initClick={function (): void {}}
btnClass={btnClass}
ref={ref}
/>
@@ -90,7 +177,9 @@ export default function PbnstSttn() {
headlist={pbnstSttn.pbnstSttHeadList}
pageSize={20}
total={100000}
cellClick={(index: number | undefined, headId: string) => { }}
cellClick={(index: number | undefined, headId: string) => {
cellCLick(index);
}}
onPageChange={setPageNation}
></UiTable>
</ListDiv>
@@ -112,6 +201,18 @@ export default function PbnstSttn() {
/>
}
/>
<UiModal
body={
<PbnstRegModal
data={isRuseReg.data || ({} as customPbnst)}
></PbnstRegModal>
}
bodyClass="w-[68vw] max-w-none h-[90vh]"
open={isRuseReg.isModal}
onOpenChange={(open) => {
setIsRuseReg({ data: {} as pubHasuType, isModal: open });
}}
/>
</ContentsDiv>
</>
);
@@ -1,5 +1,5 @@
import type { TableUpperProps } from "@/app/store/common/type/header";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { TableHead, TableRow } from "@common/components/ui";
export const headMakeprfmnc = (
@@ -1,6 +1,5 @@
"use client";
import { useWrStore } from "@/app/store";
import type { FcPrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
import type { pubHasuType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
import PbnPrfExcelModal from "@/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal";
@@ -17,17 +16,41 @@ import {
UiModal,
} from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Button, Label } from "@common/components/ui";
import {
Button,
Label,
Table,
TableBody,
TableHeader,
} from "@common/components/ui";
import { useState, useEffect, useCallback } from "react";
import { set } from "react-hook-form";
import { Toaster } from "react-hot-toast";
import { headMakeprfmnc } from "../chkgdnReg/TableHead";
import { InputTableBody } from "@/components/lib/func/TableData";
import {
initValInUsage,
initValOutUsage,
subTotalObj,
totalObj,
type FcPrfType,
type PrfType,
} from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
import { excelToPbnPrfData } from "@/app/store/prfmncReg/pbnstPrfmncReg/excel";
export default function prfmncPrfmncReg() {
const { code, prfmnc, prfmncHasuInit } = useWrStore((state) => state);
const { code, prfmnc, prfmncHasuInit, prfmnRegData } = useWrStore(
(state) => state
);
const { pbnstPrfmncHeadList, monthHeadList, prfmncRes } = prfmnc;
const [bdstTable, setbdstTable] = useState<FcPrfType[]>();
const [searchTxt, setSearchTxt] = useState<string>();
const [isExcelOpen, setIsExcelOPen] = useState<{isModal:boolean, data:FcPrfType}>({isModal:false, data:{} as FcPrfType });
const [isExcelOpen, setIsExcelOPen] = useState<{
isModal: boolean;
data: FcPrfType;
}>({ isModal: false, data: {} as FcPrfType });
const [inputData, setInputData] = useState<any[]>();
const [pbnstRuseFcltPk, setPbnstRuseFcltPk] = useState<string>();
const [searchYear, setSearchYear] = useState<string>(
String(new Date().getFullYear())
@@ -41,15 +64,86 @@ export default function prfmncPrfmncReg() {
);
}, [prfmnc.excelList]);
const onSave = useCallback(() => {
if (pbnstRuseFcltPk) {
prfmnRegData(
excelToPbnPrfData(
inputData as unknown as JSON[],
searchYear,
pbnstRuseFcltPk
) as unknown as PrfType
);
prfmncHasuInit("1", "11");
}
}, [inputData, searchYear, pbnstRuseFcltPk,prfmncHasuInit]);
const cellClick = useCallback(
(index: number | undefined, headId: string) => {
if (index !== undefined) {
setIsExcelOPen({
isModal: false,
data: prfmncRes[index] || ({} as FcPrfType),
});
const inUsageData = initValInUsage;
const outUsageData = initValOutUsage;
const inSubtotal = subTotalObj;
const outSubtotal = subTotalObj;
const cellClick = useCallback((index:number|undefined, headId:string) => {
if (prfmncRes[index]?.prfList) {
prfmncRes[index].prfList?.forEach((prfItem) => {
const month = Number(prfItem?.ym?.slice(4)); // "MM"
const monthKey = `${month}월`;
if(index !== undefined)
setIsExcelOPen({isModal:false, data:prfmncRes[index] || {} as FcPrfType})
inUsageData.forEach((inData: any) => {
const usageKey = inData.usage;
const value = (prfItem as any)[usageKey] ?? 0;
}, [prfmncRes]);
inData[monthKey] = value;
inData.total += value;
if (inSubtotal && usageKey !== "subtotal") {
(inSubtotal as any)[monthKey] =
((inSubtotal as any)[monthKey] ?? 0) + value;
inSubtotal.total += value;
}
});
outUsageData.forEach((outData: any) => {
const usageKey = outData.usage;
const value = (prfItem as any)[usageKey] ?? 0;
outData[monthKey] = value;
outData.total += value;
if (usageKey !== "subtotal") {
(outSubtotal as any)[monthKey] =
((outSubtotal as any)[monthKey] ?? 0) + value;
outSubtotal.total += value;
}
});
});
inUsageData.push(inSubtotal);
outUsageData.push(outSubtotal);
const usageTotalObj: { [key: string]: any } = totalObj;
for (const key in usageTotalObj) {
if (["usage", "gubun", "edit"].includes(key)) continue;
const val =
(Number((inSubtotal as any)[key]) || 0) +
(Number((outSubtotal as any)[key]) || 0);
(usageTotalObj as any)[key] = val;
}
const tableData = [...inUsageData, ...outUsageData, usageTotalObj];
setPbnstRuseFcltPk(prfmncRes[index].pbnstRuseFcltPk);
setInputData(tableData);
} else {
setInputData([]);
}
}
},
[prfmncRes]
);
useEffect(() => {
if (!prfmnc.isInit) {
@@ -103,13 +197,18 @@ export default function prfmncPrfmncReg() {
<Button size={"sm"} onClick={(e) => {}}>
조회
</Button>
<Button size={"sm"} onClick={() => {}}>
<Button
size={"sm"}
onClick={() => {
onSave();
}}
>
저장
</Button>
<Button
size={"sm"}
onClick={() => {
setIsExcelOPen( { ...isExcelOpen, isModal:true } );
setIsExcelOPen({ ...isExcelOpen, isModal: true });
}}
>
파일등록
@@ -134,7 +233,9 @@ export default function prfmncPrfmncReg() {
pageSize={100}
total={10}
headName={"하수재이용시설 목록"}
cellClick={(index:number|undefined, headId:string) => {cellClick(index,headId)}}
cellClick={(index: number | undefined, headId: string) => {
cellClick(index, headId);
}}
onPageChange={(page: number) => {}}
children={undefined}
/>
@@ -143,26 +244,30 @@ export default function prfmncPrfmncReg() {
</div>
<ListDiv className="col-span-8 pr-6 ">
<ScrollArea className="h-[60vh]">
<UiTable
tableData={[]}
headlist={monthHeadList}
pageSize={100}
total={10}
headName={"하수처리수재이용 실적(m3) 등록결과"}
cellClick={() => {}}
onPageChange={() => {}}
children={undefined}
/>
<div className="card-header">
<h3 className="text-2xl font-medium text-label">
{"하수처리수재이용 실적(m3) 등록결과"}
</h3>
</div>
<Table variant="secondary">
<TableHeader className="font-bold">
{headMakeprfmnc(monthHeadList, [])}
</TableHeader>
<TableBody>
{InputTableBody(inputData ?? [], monthHeadList, setInputData)}
</TableBody>
</Table>
</ScrollArea>
</ListDiv>
</div>
</ContentsDiv>
<UiModal
bodyClass={""}
body={<PbnPrfExcelModal data={isExcelOpen.data}></PbnPrfExcelModal>}
body={<PbnPrfExcelModal data={isExcelOpen.data}></PbnPrfExcelModal>}
open={isExcelOpen.isModal}
onOpenChange={() => {
setIsExcelOPen({isModal:false, data:{} as pubHasuType});
setIsExcelOPen({ isModal: false, data: {} as FcPrfType });
}}
></UiModal>
<Toaster position="top-center" />
+6 -4
View File
@@ -2,6 +2,8 @@ import { fetchType, getFetch, postFectch } from "@/components/lib/api";
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
import type { DemandCompType } from "@common/business_components/ui";
export type comFcltState = {
searchFclts: pubHasuType;
demandCompList: DemandCompType[];
};
@@ -36,10 +38,10 @@ export const searchActions: (set: any) => comFcltActions = (set: any) => {
fetchType.WR,
`/reuseFc/request/${searchNm}/${cnt}`
);
return set((state: comFcltState) => ({
...state,
demandCompList: coList,
}));
return set((state: comFcltState) => {
state.demandCompList= coList
return state
});
},regDemandCompany: async (data:DemandCompType)=>{
try{
@@ -15,10 +15,12 @@ export type TableUpperProps = {
upName?: string;
upSequnce?: number;
edit?:boolean;
visible?:boolean;
visible?:boolean;
rowSpan?: number;
colSpan?: number;
type?: string;
selectData ?:string; // type 이 seelct 일경우 selectarray 정하기 위해
row?:number;
mergeCell?:boolean // 셀을 합칠경우
};
@@ -1,5 +1,5 @@
import { z } from "zod";
import type { CommonTableProps } from "../../common/type/headder";
import type { CommonTableProps } from "../../common/type/header";
export const sttnHeadListType = z.array(
z.object({
+1 -1
View File
@@ -1,7 +1,7 @@
import type { z } from "zod";
import type { sttnHeadListType } from "../coSttn/headList";
import { coRvwHeadListExport, coRvwNodeListExport } from "./headList";
import type { CommonTableProps } from "../../common/type/headder";
import type { CommonTableProps } from "../../common/type/header";
const coRvwHeadList = coRvwHeadListExport;
const coRvwNodeList = coRvwNodeListExport;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { z } from "zod";
export const sttnHeadListType = z.array(
+1 -1
View File
@@ -1,4 +1,4 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { fetchType, getFetch } from "@/components/lib/api";
import { z } from "zod";
import { coSttHeadListExport, coSttNodeListExport } from "./headList";
@@ -1,4 +1,4 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { coSttHeadListExport, coSttNodeListExport } from "../coSttn/headList";
import type { customCoSttnBdst } from "../coSttn";
@@ -1,5 +1,5 @@
import { z } from "zod";
import type { CommonTableProps } from "../../common/type/headder";
import type { CommonTableProps } from "../../common/type/header";
export const sttnHeadListType = z.array(
z.object({
@@ -1,6 +1,6 @@
import type { z } from "zod";
import type { sttnHeadListType } from "../coSttn/headList";
import type { CommonTableProps } from "../../common/type/headder";
import type { CommonTableProps } from "../../common/type/header";
import { ruseHstryHeadListExport, ruseHstryNodeListExport } from "./headList";
const ruseHstryHeadList = ruseHstryHeadListExport;
@@ -1,4 +1,4 @@
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import { z } from "zod";
export const chkgdRegExcel = z.object({
@@ -123,16 +123,16 @@ export const rainHeadNmExport: chHeadType[] = [
];
export const rainChkgdnHeadListExport: TableUpperProps[] = [
{ id: "order", title: "순번", rowSpan: true },
{ id: "checkBox", title: "선택", rowSpan: true },
{ id: "cityText", title: "시도", rowSpan: true },
{ id: "sggText", title: "시군구", rowSpan: true },
{ id: "bdstNm", title: "시설명", rowSpan: true },
{ id: "operMngCd", title: "운영관리형태", rowSpan: true },
{ id: "oilqMeasMthd", title: "유량측정방법", rowSpan: true },
{ id: "anlOperCst", title: "연간운영비(원/년)", rowSpan: true },
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", rowSpan: true },
{ id: "chckYmd", title: "점검일", rowSpan: true },
{ id: "order", title: "순번", mergeCell: true },
{ id: "checkBox", title: "선택", mergeCell: true },
{ id: "cityText", title: "시도", mergeCell: true },
{ id: "sggText", title: "시군구", mergeCell: true },
{ id: "bdstNm", title: "시설명", mergeCell: true },
{ id: "operMngCd", title: "운영관리형태", mergeCell: true },
{ id: "oilqMeasMthd", title: "유량측정방법", mergeCell: true },
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true },
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true },
{ id: "chckYmd", title: "점검일", mergeCell: true },
{ id: "utztnUsgCd", title: "이용용도" },
{ id: "totalSplyUswtrUtztnQnt", title: "연간보급수이용량(m³)" },
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" },
@@ -1,7 +1,6 @@
import { buildingType } from "@/app/store/common/code";
import {
TEST_UUID,
type TableUpperProps,
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import {
deleteFectch,
@@ -22,6 +21,7 @@ import {
splHeadListExport,
type chHeadType,
} from "./headList";
import type { TableUpperProps } from "@/app/store/common/type/header";
export type rainChkZodType = z.infer<typeof rainChkZod>;
const fcltDiv = [
@@ -217,7 +217,7 @@ export const rainChkgdnActionsExport: (set: any) => rainChkgdnActions = (
try {
const res = await deleteFectch(`/reuseChk/rainy`, chkgdnPks);
if (res.ok) {
if (res) {
ToastFormUi({
body: "삭제가 완료되었습니다. ",
title: "지도점검 삭제",
@@ -1,6 +1,6 @@
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { z } from "zod";
import { guideDetail, type chHeadType } from "../rainChkgdn/headList";
import type { TableUpperProps } from "@/app/store/common/type/header";
export type polutionType = {
chkgdnDtlFk: number;
@@ -115,16 +115,16 @@ export const rswtHeadNmExport: chHeadType[] = [
];
export const rswtChkHeadListExport: TableUpperProps[] = [
{ id: "order", title: "순번", rowSpan: true },
{ id: "checkBox", title: "선택", rowSpan: true },
{ id: "cityText", title: "시도" ,rowSpan: true },
{ id: "sggText", title: "시군구",rowSpan: true },
{ id: "bdstNm", title: "시설명" ,rowSpan: true},
{ id: "operMngCd", title: "운영관리형태" ,rowSpan: true},
{ id: "anlOperCst", title: "연간운영비(원/년)" ,rowSpan: true},
{ id: "prcsCpct", title: "처리용량(m³)" ,rowSpan: true},
{ id: "spwtPositn", title: "채수지점" ,rowSpan: true},
{ id: "chckYmd", title: "점검일" ,rowSpan: true},
{ id: "order", title: "순번", mergeCell: true },
{ id: "checkBox", title: "선택", mergeCell: true },
{ id: "cityText", title: "시도" ,mergeCell: true },
{ id: "sggText", title: "시군구",mergeCell: true },
{ id: "bdstNm", title: "시설명" ,mergeCell: true},
{ id: "operMngCd", title: "운영관리형태" ,mergeCell: true},
{ id: "anlOperCst", title: "연간운영비(원/년)" ,mergeCell: true},
{ id: "prcsCpct", title: "처리용량(m³)" ,mergeCell: true},
{ id: "spwtPositn", title: "채수지점" ,mergeCell: true},
{ id: "chckYmd", title: "점검일" ,mergeCell: true},
{ id: "utztnUsgCd", title: "이용용도" },
{ id: "splyUswtrUtztnQnt", title: "연간보급수이용량(m³)" ,type: "number"},
{ id: "ruseFcltUtztnQnt", title: "연간중수도이용량(m³)",type: "number"},
@@ -1,9 +1,10 @@
import type { z } from "zod";
import { TEST_UUID } from "../../ruseFcltMng/fcltReg/rainReg";
import type { PrfSchema } from "./type";
type NameMap = {
[key: string]: string;
};
const nameMap = {
const nameMap:NameMap = {
"세척수": "wshwtr",
"냉각수": "coolUswtr",
"청소수": "cleanUswtr",
@@ -22,11 +23,12 @@ import type { PrfSchema } from "./type";
};
export const excelToPbnPrfData = (excelData: any[], year: string,pbnstRuseFcltFk:string) => {
export const excelToPbnPrfData = (excelData: JSON[], year: string,pbnstRuseFcltFk:string) => {
// 월별 데이터 하나로 병합
const merged = {} as any;
excelData.forEach((item: any) => {
const key = nameMap[item["용수명"]];
const usageNm = item["용수명"]
const key = nameMap[usageNm as any];
if (!key) return;
for (let i = 1; i <= 12; i++) {
@@ -34,7 +36,6 @@ export const excelToPbnPrfData = (excelData: any[], year: string,pbnstRuseFcltFk
const ym = year + month;
console.log('pbnstRuseFcltFk ', pbnstRuseFcltFk)
if (!merged[ym]) merged[ym] = { ym };
merged[ym][key] = Number(item[`${i}월`] ?? 0);
}
@@ -1,5 +1,5 @@
import { z } from "zod";
import type { TableUpperProps } from "../../ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "../../common/type/header";
export const pbnPrfRegExcelZod = z.object({
ym: z.string().default(""),
@@ -18,18 +18,21 @@ export const pbnstPrfmncHeadListExport: TableUpperProps[] = [
];
export const monthHeadListExport: TableUpperProps[] = [
{ id: "gubun", title: "구분" },
{ id: "용수명", title: "용수명" },
{ id: "total", title: "계" },
{ id: "ym01", title: "1월" },
{ id: "ym02", title: "2월" },
{ id: "ym03", title: "3월" },
{ id: "ym04", title: "4월" },
{ id: "ym05", title: "5월" },
{ id: "ym06", title: "6월" },
{ id: "ym07", title: "7월" },
{ id: "ym08", title: "8월" },
{ id: "ym09", title: "9월" },
{ id: "ym10", title: "10월" },
{ id: "ym11", title: "11월" },
{ id: "ym12", title: "12월" },
{ id: "1월", title: "1월" ,edit: true },
{ id: "2월", title: "2월" ,edit: true },
{ id: "3월", title: "3월" ,edit: true },
{ id: "4월", title: "4월" ,edit: true },
{ id: "5월", title: "5월" ,edit: true },
{ id: "6월", title: "6월" ,edit: true },
{ id: "7월", title: "7월" ,edit: true },
{ id: "8월", title: "8월" ,edit: true },
{ id: "9월", title: "9월" ,edit: true },
{ id: "10월", title: "10월" ,edit: true },
{ id: "11월", title: "11월" ,edit: true },
{ id: "12월", title: "12월" ,edit: true },
];
@@ -1,8 +1,9 @@
import { fetchType, getFetch, postFectch } from "@/components/lib/api";
import type { TableUpperProps } from "../../ruseFcltMng/fcltReg/rainReg";
import { pbnstPrfmncHeadListExport, monthHeadListExport } from "./headList";
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
import type { FcPrfType, PrfType } from "./type";
import type { TableUpperProps } from "../../common/type/header";
import { ToastFormUi } from "@/components/ui/toast/toastFromUi";
const pbnstPrfmncHeadList = pbnstPrfmncHeadListExport;
const monthHeadList = monthHeadListExport;
@@ -56,6 +57,7 @@ const hasuListFetch = async (page: string, sggOrCity: string) => {
bscFctNm: findData?.bscFctNm,
ruseUtztnFcltNm: item.ruseUtztnFcltNm,
pbnstRuseFcltPk: item.pbnstRuseFcltPk,
prfList : item.prfList
};
});
return data;
@@ -80,7 +82,7 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
console.log(errorHasu);
}
},
prfmnRegData: async (data:PrfType) => {
prfmnRegData: async (data:PrfType,) => {
try{
const ressponse = await postFectch(
@@ -88,8 +90,23 @@ export const pbnstPrfmncActionsExport: (set: any) => pbnstPrfmncActions = (
data,
fetchType.WR
);
console.log('ressponse ', ressponse)
if(ressponse.status === 200){
ToastFormUi({
body: "하수재이용 시설 실적 등록이 완료되었습니다. ",
title: "하수재이용 시설 실적 등록",
});
}
}catch(e){
console.log(e)
ToastFormUi({
body: "하수재이용 시설 실적 등록이 실패하였습니다. ",
title: "하수재이용 시설 실적 등록",
});
}
},
};
@@ -1,47 +1,346 @@
import { z } from "zod";
import type { TableUpperProps } from "../../common/type/headder";
import type { TableUpperProps } from "../../common/type/header";
import { fcOperSchema } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
export const PrfSchema = z.object({
pbnstRuseFcltFk: z.string(),
ym: z.string(), // 예: "202310"
wshwtr: z.number(),
coolUswtr: z.number(),
cleanUswtr: z.number(),
drwtUswtr: z.number(),
dltnUswtr: z.number(),
ithlRswtr: z.number(),
ithlEtcUswtr: z.number(),
cleanToilUswtr: z.number(),
resn: z.number(),
lndwtr: z.number(),
hydUswtr: z.number(),
rvrKeepUswtr: z.number(),
farmUswtr: z.number(),
ugwtChr: z.number(),
indstUswtr: z.number(),
regDt: z.date().default(new Date()),
rgtr: z.string(),
mdfcnDt: z.date().default(new Date()),
mdfr: z.string()
});
export const FcPrfSchema = z.object({
pbnstRuseFcltPk: z.string(),
ruseUtztnFcltNm: z.string(),
fcltCpct: z.number(),
ruseCpct: z.number(),
splyExtraCpct: z.number(),
regDt:z.date().default(new Date()),
rgtr: z.string(),
mdfcnDt: z.date().default(new Date()),
mdfr: z.string(),
prfList: z.array(PrfSchema),
bscFctNm:z.string().nullish()
});
pbnstRuseFcltFk: z.string(),
ym: z.string(), // 예: "202310"
wshwtr: z.number(),
coolUswtr: z.number(),
cleanUswtr: z.number(),
drwtUswtr: z.number(),
dltnUswtr: z.number(),
ithlRswtr: z.number(),
ithlEtcUswtr: z.number(),
cleanToilUswtr: z.number(),
resn: z.number(),
lndwtr: z.number(),
hydUswtr: z.number(),
rvrKeepUswtr: z.number(),
farmUswtr: z.number(),
ugwtChr: z.number(),
indstUswtr: z.number(),
regDt: z.date().default(new Date()).nullish(),
rgtr: z.string().nullish(),
mdfcnDt: z.date().default(new Date()).nullish(),
mdfr: z.string().nullish(),
});
export const FcPrfSchema = z.object({
pbnstRuseFcltPk: z.string(),
ruseUtztnFcltNm: z.string(),
fcltCpct: z.number(),
ruseCpct: z.number(),
splyExtraCpct: z.number(),
regDt: z.date().default(new Date()),
rgtr: z.string(),
mdfcnDt: z.date().default(new Date()),
mdfr: z.string(),
prfList: z.array(PrfSchema),
operList:z.array(fcOperSchema),
bscFctNm: z.string().nullish(),
});
export type FcPrfType = z.infer<typeof FcPrfSchema>
export type PrfType = z.infer<typeof PrfSchema>
export type FcPrfType = z.infer<typeof FcPrfSchema>;
export type PrfType = z.infer<typeof PrfSchema>;
export const initValInUsage = [
{
usage: "wshwtr",
용수명: "세척수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "coolUswtr",
용수명: "냉각수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "cleanUswtr",
용수명: "청소수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "drwtUswtr",
용수명: "식수대",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "dltnUswtr",
용수명: "희석용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "ithlRswtr",
용수명: "중수도",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "ithlEtcUswtr",
용수명: "기타",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "resn",
용수명: "세척살수용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "cleanToilUswtr",
용수명: "청소화장실용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
];
export const initValOutUsage = [
{
usage: "lndwtr",
용수명: "조경용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "hydUswtr",
용수명: "친수용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "ugwtChr",
용수명: "지하수충전",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "farmUswtr",
용수명: "농업용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "rvrKeepUswtr",
용수명: "하천등유지용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
{
usage: "indstUswtr",
용수명: "공업용수",
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
},
];
export const subTotalObj = {
usage: "subtotal",
용수명: "소계",
edit: false,
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
};
export const totalObj = {
usage: "total",
용수명: "총합계",
edit: false,
total: 0,
"1월": 0,
"2월": 0,
"3월": 0,
"4월": 0,
"5월": 0,
"6월": 0,
"7월": 0,
"8월": 0,
"9월": 0,
"10월": 0,
"11월": 0,
"12월": 0,
};
@@ -1,15 +1,15 @@
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
export const rainChkgdnHeadSttnExport: TableUpperProps[] = [
{ id: 'order', title: "순번", rowSpan: true },
{ id: "cityText", title: "시도", rowSpan: true },
{ id: "sggText", title: "시군구", rowSpan: true },
{ id: "bdstNm", title: "시설명", rowSpan: true },
{ id: "operMngCd", title: "운영관리형태", rowSpan: true },
{ id: "oilqMeasMthd", title: "유량측정방법", rowSpan: true },
{ id: "anlOperCst", title: "연간운영비(원/년)", rowSpan: true },
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", rowSpan: true },
{ id: "chckYmd", title: "점검일", rowSpan: true },
{ id: 'order', title: "순번", mergeCell: true },
{ id: "cityText", title: "시도", mergeCell: true },
{ id: "sggText", title: "시군구", mergeCell: true },
{ id: "bdstNm", title: "시설명", mergeCell: true },
{ id: "operMngCd", title: "운영관리형태", mergeCell: true },
{ id: "oilqMeasMthd", title: "유량측정방법", mergeCell: true },
{ id: "anlOperCst", title: "연간운영비(원/년)", mergeCell: true },
{ id: "dtfcltCpct", title: "빗물저류조용량(m³)", mergeCell: true },
{ id: "chckYmd", title: "점검일", mergeCell: true },
{ id: "utztnUsgCd", title: "이용용도" },
{ id: "totalSplyUswtrUtztnQnt", title: "연간보급수이용량(m³)" },
{ id: "totalRuseFcltUtztnQnt", title: "연간빗물이용량(m³)" },
@@ -1,4 +1,4 @@
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
export const rswtChkSttnHeadListExport: TableUpperProps[] = [
{ id: "order", title: "순번", rowSpan: true },
@@ -1,6 +1,6 @@
import { rswtHeadNmExport } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList";
import { rswtChkSttnHeadListExport, rswtDetailSttnHeadListExport } from "./headList";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import type { sheetParameter } from "@common/business_components/ui";
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
@@ -1,5 +1,5 @@
import { fetchType, getFetch, postFectch } from "@/components/lib/api";
import type { TableUpperProps } from "../../common/type/headder";
import { fetchType, getFetch } from "@/components/lib/api";
import type { TableUpperProps } from "../../common/type/header";
import { pbnstPrfmncSttnHeadListExport, pbnstYearHeadListExport } from "./headList";
import type { FcPrfType, PrfType } from "../../prfmncReg/pbnstPrfmncReg/type";
import type { pubHasuType } from "../../ruseFcltMng/fcltReg/pbnstReg/type";
@@ -2,13 +2,9 @@ import { getFetch } from "@/components/lib/api";
import { TEST_UUID, type customRainBdst } from "../rainReg";
import type { customHtdflBdst } from "../htdflReg";
import type { customRswtBdst } from "../rswtReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
type TableUpperProps = {
id: string;
title: string;
upName?: string;
upSequnce?: number;
};
const moUpHeadList: TableUpperProps[] = [
{ id: "cityText", title: "시도" },
{ id: "sggText", title: "시군구" },
@@ -16,9 +12,6 @@ type TableUpperProps = {
{ id: "daddr", title: "위치" },
{ id: "frstArchPrmsnDt", title: "최초건축허가일" },
{ id: "archArea", title: "건축면적", },
// { id: "archChgYn", title: "여부", upName: "upChangeRe", upSequnce: 1 },
// { id: "archChgPrmsnDt", title: "허가일", upName: "upChangeRe", upSequnce: 2 },
// { id: "archChgArea", title: "면적", upName: "upChangeRe", upSequnce: 3 },
];
@@ -1,8 +1,9 @@
import { getFetch, postFectch, putFectch } from "@/components/lib/api";
import { upHeadList, type chgBuilding, type TableUpperProps } from "../rainReg";
import { upHeadList, type chgBuilding} from "../rainReg";
import { z } from "zod";
import { makeMdfr, makeRstr } from "../bdstReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
export const hdtflZod = z.object({
bdstInfoPk: z.number().nullish(),
@@ -1,5 +1,5 @@
import type { TableUpperProps } from "@/app/store/common/type/header";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import type { TableUpperProps } from "../rainReg";
export const pubFacHeadListExport: TableUpperProps[] = [
{ id: "sido", title: "시도" },
@@ -1,5 +1,4 @@
import { z } from "zod";
import { TEST_UUID, type TableUpperProps } from "../rainReg";
import { TEST_UUID } from "../rainReg";
import {
deleteFectch,
fetchType,
@@ -9,8 +8,6 @@ import {
} from "@/components/lib/api";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import {
exampleData,
fcBizSchema,
type customPbnst,
type fcBizType,
type pbnstInsertIndex,
@@ -26,6 +23,7 @@ import {
pbnstDemandHeadListExport,
fcOrgwtsHeadListExport,
} from "./headList";
import type { TableUpperProps } from "@/app/store/common/type/header";
const selectLabel: SelectDataType[] = [{ text: "test", val: "1" }];
const pubFacHeadList = pubFacHeadListExport;
@@ -275,7 +273,6 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
};
});
console.log(" pbnstBizCycle ", pbnstBizCycle);
return set((state: pubFacState) => ({
...state,
pbnst: {
@@ -324,7 +321,7 @@ export const pubFacActionsExport: (set: any) => pubFacActions = (set: any) => {
pbnstMngData: (data: customPbnst[]) => {
if (data.length > 0) {
}
console.log('data', data)
return set((state: pubFacState) => {
state.pbnst.pbnstMngRegData = data;
state.pbnst.pbnstBizCycle =
@@ -72,7 +72,7 @@ export type fcFileType = z.infer<typeof fcFileSchema>;
const pplInstlSchema = z.object({
ruseFcltBizFk: z.number(),
ruseFcltBizFk: z.number().nullish(),
choose:z.boolean().default(false),
pdmt: z.string().default(''),
ppMqlt: z.string().default(""),
@@ -89,7 +89,7 @@ const fcFileSchema = z.object({
mdfr: z.string().nullish(),
});
const fcOperSchema = z.object({
export const fcOperSchema = z.object({
pbnstRuseFcltOperInfoPk: z.number().nullish(),
pbnstRuseFcltFk: z.string().nullish(),
operMthd: z.string(),
@@ -151,7 +151,7 @@ const dmdColist = z.object({
rgtr: z.string().nullish(),
mdfr: z.string().nullish(),
pbnstRuseFcltBizPk: z.number(),
pbnstRuseFcltFk: z.string(),
pbnstRuseFcltFk: z.string().nullish(),
//telno:z.string().default('')
});
@@ -160,7 +160,7 @@ const dmdColist = z.object({
export const fcBizSchema = z.object({
pbnstRuseFcltBizPk: z.number().default(1),
pbnstRuseFcltBizPk: z.number().nullish(),
pbnstRuseFcltFk: z.string().nullish(),
superkey: z.string().default("").nullish(),
cycl: z.number().default(1),
@@ -247,436 +247,3 @@ export const pbnstRegZod = z.object({
fcOpers: z.array(fcOperSchema).default([]),
hasuhasu: z.number().default(0),
});
//관경 제외
export const exampleData = [
{
"swtrmtFcltFk": "11000SW001R",
"pbnstRuseFcltPk": "11000SW001R1",
"ruseUtztnFcltNm":'난지',
"fcltCpct": 123,
"ruseCpct": 123,
"splyExtraCpct": 123,
"hasuhasu": 123,
"fcFiles": [],
"fcBizs": [
{
"pbnstRuseFcltFk": "11000SW001R1",
"cycl": 1,
"seCd": "123",
"bizMthdCd": "123",
"gvsbs": 123,
"lcep": 123,
"cusrAlotm": 123,
"etc": "123",
"rprcsFcltCpct": 123,
"majorPrcsMsrcCd": "123",
"addr": "123",
"rprcsMthdCd": "123",
"inoutYn": "123",
"mainSplyPumpCpct": 123,
"erctWtrOcrnCpct": 123,
"erctUswtrLinkSpt": "123",
"erctUswtrFcltCpct": 123,
"erctUswtrPrcsMeth": "123",
"erctUswtrPrcsMsrcCd": "123",
"bod": 123,
"grssClfg": 123,
"combResdch": 123,
"trbt": 123,
"smll": 1230,
"crmty": 123,
"tn": 123,
"tph": 1230,
"ph": 123,
"clIonQnt": 123,
"cdtnv": 123,
"pplInstls": [
{
"ruseFcltBizFk": "",
"choose": false,
"ppMqlt": "PE관",
"pdmt": "D250",
"cpct": "123",
"id": "e1472f7c-7033-44ae-a953-f69e6b90fbc1"
}
]
},
{
"pbnstRuseFcltFk": "11000SW001R1",
"cycl": 2,
"seCd": "하하",
"bizMthdCd": "호호",
"gvsbs": 12,
"lcep": 12,
"cusrAlotm": 12,
"etc": "1",
"rprcsFcltCpct": 12,
"majorPrcsMsrcCd": "12",
"addr": "12",
"rprcsMthdCd": "12",
"inoutYn": "12",
"mainSplyPumpCpct": 12,
"erctWtrOcrnCpct": 13,
"erctUswtrLinkSpt": "12",
"erctUswtrFcltCpct": 13,
"erctUswtrPrcsMeth": "12",
"erctUswtrPrcsMsrcCd": "12",
"bod": 1,
"grssClfg": 1,
"combResdch": 1,
"trbt": 1,
"smll": 1,
"crmty": 1,
"tn": 1,
"tph": 1,
"ph": 1,
"clIonQnt": 1,
"cdtnv": 1,
"pplInstls": [
{
"ruseFcltBizFk": "",
"choose": false,
"ppMqlt": "PE관",
"pdmt": "D300",
"cpct": "1",
"id": "e1472f7c-7033-44ae-a953-f69e6b90fbc1"
}
]
}
],
"fcOpers": [
{
"choose": false,
"rgtr": "",
"mdfr": "",
"operMthd": "1",
"rprtvBzenty": "1",
"bgngDt": "20250513",
"endDt": "20250529",
"id": "cbef8f84-33df-406b-a85f-edd2a5d3618e"
}
]
},
{
"swtrmtFcltFk": "11000SW001R",
"ruseUtztnFcltNm":'난지',
"pbnstRuseFcltPk": "11000SW001R2",
"fcltCpct": 123,
"ruseCpct": 123,
"splyExtraCpct": 123,
"hasuhasu": 123,
"fcFiles": [],
"fcBizs": [
{
"pbnstRuseFcltFk": "11000SW001R2",
"cycl": 1,
"seCd": "123",
"bizMthdCd": "123",
"gvsbs": 123,
"lcep": 123,
"cusrAlotm": 123,
"etc": "123",
"rprcsFcltCpct": 123,
"majorPrcsMsrcCd": "123",
"addr": "123",
"rprcsMthdCd": "123",
"inoutYn": "123",
"mainSplyPumpCpct": 123,
"erctWtrOcrnCpct": 123,
"erctUswtrLinkSpt": "123",
"erctUswtrFcltCpct": 123,
"erctUswtrPrcsMeth": "123",
"erctUswtrPrcsMsrcCd": "123",
"bod": 123,
"grssClfg": 123,
"combResdch": 123,
"trbt": 123,
"smll": 1230,
"crmty": 123,
"tn": 123,
"tph": 1230,
"ph": 123,
"clIonQnt": 123,
"cdtnv": 123,
"pplInstls": [
{
"ruseFcltBizFk": "",
"choose": false,
"ppMqlt": "PE관",
"pdmt": "D250",
"cpct": "123",
"id": "e1472f7c-7033-44ae-a953-f69e6b90fbc1"
}
]
}
],
"fcOpers": [
{
"choose": false,
"rgtr": "",
"mdfr": "",
"operMthd": "123",
"rprtvBzenty": "123",
"bgngDt": "20250513",
"endDt": "20250529",
"id": "cbef8f84-33df-406b-a85f-edd2a5d3618e"
}
]
}
]
// [{
// pbnstRuseFcltPk: 1,
// swtrmtFcltFk: "11000SW001R",
// ruseUtztnFcltNm: "재이용시설 A",
// hasuhasu: 0,
// fcltCpct: "100",
// ruseCpct: "90",
// splyExtraCpct: "10",
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// fcFiles: [],
// fcBizs: [
// {
// pbnstRuseFcltBizPk: 1,
// pbnstRuseFcltFk: 1,
// cycl: "1",
// seCd: "A010",
// bizMthdCd: "M02",
// instlAprvSncnDt: "2022-01-01",
// bizCmcnDay: "2022-02-01",
// gvsbs: "정부지원",
// lcep: "지자체",
// cusrAlotm: "고객",
// etc: "비고 없음",
// totalMoney: "100000000",
// rprcsFcltCpct: "50",
// majorPrcsMsrcCd: "MP01",
// addr: "서울시 종로구",
// rprcsMthdCd: "RP01",
// inoutYn: "Y",
// mainSplyPumpCpct: "30",
// erctWtrOcrnCpct: "5",
// erctUswtrLinkSpt: "있음",
// erctUswtrFcltCpct: "20",
// erctUswtrPrcsMeth: "생물학적",
// erctUswtrPrcsMsrcCd: "EM01",
// wwtEmsnFcltPrmsnYn: "Y",
// tmsInstlYn: "N",
// pbnstDrngInflwExclYn: "Y",
// bod: "30",
// grssClfg: "양호",
// combResdch: "적정",
// trbt: "10",
// clIonQnt: "5",
// smll: "없음",
// crmty: "정상",
// tph: "0.2",
// tn: "2",
// ph: "7.2",
// cdtnv: "100",
// designCst: "1000",
// cstrnSpvsCst: "500",
// fcltSbsdCst: "200",
// wstCst: "300",
// cnstCmcnCst: "1000",
// mntrgEqpmntInstlCst: "150",
// gisDbCst: "200",
// elpwrMtrngCst: "180",
// mchnCst: "700",
// archCst: "400",
// pplCst: "300",
// ruseFcltCst: "5000",
// designCstClcln: "990",
// cstrnSpvsCstClcln: "480",
// fcltSbsdCstClcln: "190",
// wstCstClcln: "280",
// cnstCmcnCstClcln: "980",
// mntrgEqpmntInstlCstClcln: "140",
// gisDbCstClcln: "190",
// elpwrMtrngCstClcln: "170",
// mchnCstClcln: "680",
// archCstClcln: "380",
// pplCstClcln: "290",
// ruseFcltCstClcln: "4800",
// pplInstls: [
// {
// ruseFcltBizFk: "10",
// pdmt: "D200",
// ppMqlt: "도복장강관",
// cpct: "1",
// },
// {
// ruseFcltBizFk: "10",
// pdmt: "D100",
// ppMqlt: "PE관",
// cpct: "2",
// },
// ],
// fcOrgwts: [
// {
// pbnstRuseFcltBizFk: 1,
// swtrmtFcltFk: "11000SW001R",
// orgwtWtritQnt: "100",
// tmsYn: "Y",
// dschgFmYn: "N",
// dtlPstnExpln: "배출 위치",
// regDt: "20250221",
// rgtr: "admin",
// mdfcnDt: "20250321",
// mdfr: "admin",
// },
// {
// pbnstRuseFcltBizFk: 1,
// swtrmtFcltFk: "11200PB001R",
// orgwtWtritQnt: "153",
// tmsYn: "Y",
// dschgFmYn: "N",
// dtlPstnExpln: "배출 위치22",
// regDt: "20250221",
// rgtr: "admin",
// mdfcnDt: "20250421",
// mdfr: "admin",
// },
// ],
// flg: "N",
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// },
// {
// pbnstRuseFcltBizPk: 11,
// pbnstRuseFcltFk: 1,
// cycl: "2",
// seCd: "A011",
// bizMthdCd: "M02",
// instlAprvSncnDt: "2022-01-01",
// bizCmcnDay: "2022-02-01",
// gvsbs: "민간",
// lcep: "지자체",
// cusrAlotm: "고객",
// etc: "비고 없음",
// totalMoney: "100000000",
// rprcsFcltCpct: "50",
// majorPrcsMsrcCd: "MP01",
// addr: "부산시 해운대구",
// rprcsMthdCd: "RP01",
// inoutYn: "Y",
// mainSplyPumpCpct: "30",
// erctWtrOcrnCpct: "5",
// erctUswtrLinkSpt: "있음",
// erctUswtrFcltCpct: "20",
// erctUswtrPrcsMeth: "생물학적",
// erctUswtrPrcsMsrcCd: "EM01",
// wwtEmsnFcltPrmsnYn: "Y",
// tmsInstlYn: "N",
// pbnstDrngInflwExclYn: "Y",
// bod: "30",
// grssClfg: "양호",
// combResdch: "적정",
// trbt: "10",
// clIonQnt: "5",
// smll: "없음",
// crmty: "정상",
// tph: "0.2",
// tn: "2",
// ph: "7.2",
// cdtnv: "100",
// designCst: "1000",
// cstrnSpvsCst: "500",
// fcltSbsdCst: "200",
// wstCst: "300",
// cnstCmcnCst: "1000",
// mntrgEqpmntInstlCst: "150",
// gisDbCst: "200",
// elpwrMtrngCst: "180",
// mchnCst: "700",
// archCst: "400",
// pplCst: "300",
// ruseFcltCst: "5000",
// designCstClcln: "990",
// cstrnSpvsCstClcln: "480",
// fcltSbsdCstClcln: "190",
// wstCstClcln: "280",
// cnstCmcnCstClcln: "980",
// mntrgEqpmntInstlCstClcln: "140",
// gisDbCstClcln: "190",
// elpwrMtrngCstClcln: "170",
// mchnCstClcln: "680",
// archCstClcln: "380",
// pplCstClcln: "290",
// ruseFcltCstClcln: "4800",
// pplInstls: [
// {
// ruseFcltBizFk: "11",
// pdmt: "관경",
// ppMqlt: "1",
// cpct: "100",
// },
// {
// ruseFcltBizFk: "11",
// pdmt: "관경",
// ppMqlt: "2",
// cpct: "200",
// },
// ],
// fcOrgwts: [
// {
// pbnstRuseFcltBizFk: 11,
// swtrmtFcltFk: "11000SW001R",
// orgwtWtritQnt: "152",
// tmsYn: "Y",
// dschgFmYn: "N",
// dtlPstnExpln: "배출 위치1",
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// },
// {
// pbnstRuseFcltBizFk: 11,
// swtrmtFcltFk: "11200PB001R",
// orgwtWtritQnt: "150",
// tmsYn: "Y",
// dschgFmYn: "N",
// dtlPstnExpln: "배출 위치",
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// },
// ],
// flg: "N",
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// },
// ],
// fcOpers: [
// {
// pbnstRuseFcltOperInfoPk: 100,
// pbnstRuseFcltFk: 1,
// operMthd: "위탁",
// rprtvBzenty: "기관명",
// bgngDt: new Date("2023-09-30"),
// endDt: new Date("2023-12-31"),
// rgtr: TEST_UUID,
// mdfr: TEST_UUID,
// },
// {
// pbnstRuseFcltOperInfoPk: 101,
// pbnstRuseFcltFk: 1,
// operMthd: "직영",
// rprtvBzenty: "기관명",
// bgngDt: new Date("2024-11-30"),
// endDt: new Date("2024-12-31"),
// rgtr:TEST_UUID ,
// mdfr: TEST_UUID,
// },
// ],
// }
// ]
@@ -1,7 +1,7 @@
import { getFetch, postFectch, putFectch } from "@/components/lib/api";
import { z } from "zod";
import { makeMdfr, makeRstr } from "../bdstReg";
import type { SelectDataType } from "@common/business_components/ui";
import type { TableUpperProps } from "@/app/store/common/type/header";
export const TEST_UUID= '2d4b151d-1828-41e0-91d9-4cd28ea1cc7e'
export const rainZod = z.object({
@@ -82,19 +82,6 @@ export type chgBuilding={
mdfr?:string|null;
}
export type customRainBdst = z.infer<typeof rainZod>
export type TableUpperProps = {
id?: string;
title: string;
upName?: string;
upSequnce?: number;
edit?:boolean;
visible?:boolean;
rowSpan?: number;
type?: string;
selectData ?:string;
colSpan?:number;
row?:number;
};
export const upHeadList: TableUpperProps[] = [
{ id: "cityText", title: "시도" },
@@ -1,8 +1,9 @@
import { getFetch, postFectch, putFectch } from "@/components/lib/api";
import { upHeadList, type chgBuilding, type TableUpperProps } from "../rainReg";
import { upHeadList, type chgBuilding } from "../rainReg";
import { z } from "zod";
import { makeMdfr, makeRstr } from "../bdstReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
export const rswtZod = z.object({
bdstInfoPk: z.number().nullish(),
@@ -1,6 +1,6 @@
import type { z } from "zod";
import type { sttnHeadListType } from "../rainSttn/headList";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
export const htdflSttHeadListExport: z.infer<typeof sttnHeadListType> = [
{
@@ -1,12 +1,10 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { htdflSttHeadListExport, htdflSttNodeListExport } from "./headList";
import type { sttnHeadListType } from "../rainSttn/headList";
import type { z } from "zod";
import { controlHeadView } from "../rainSttn";
import type { customHtdflBdst } from "../../fcltReg/htdflReg";
import { fetchType, getFetch } from "@/components/lib/api";
import { excelHtdflSttnParsing } from "./excel";
import { tableData } from "@/components/lib/func/commom";
const htdflSttHeadList = htdflSttHeadListExport;
const htdflSttNodeList = htdflSttNodeListExport;
@@ -5,23 +5,23 @@ export const excelPbnstSttnParsing = (data: any[]): string[][] => {
data.forEach((item) => {
excelExportData.push([
item.a,
String(item.aaa),
item.aaaa ?? "",
item.operMngCd ?? "",
String(item.cityText ?? ""),
String(item.sggText ?? ""),
String(item.bdnstNm ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
String(item.archArea ?? ""),
item.rvbsn,
String(item.lgbsn),
item.mdmbsn ?? "",
item.rgnNm ?? "",
String(item.sido ?? ""),
String(item.gugun ?? ""),
String(item.bscFctNm ?? ""),
String(item.efflWqltStndrdNm ?? ""),
String(item.fctCpc ?? ""),
String(item.tel ?? ""),
String(item.ruseUtztnFcltNm ?? ""),
String(item.fcltCpct ?? ""),
String(item.splyExtraCpct ?? ""),
String(item.ruseCpct ?? ""),
String(item.usageTotal ?? ""),
String(item.inUsage ?? ""),
String(item.outUsage ?? ""),
])
})
return excelExportData;
@@ -1,36 +1,36 @@
import type { sttnHeadListType } from "../rainSttn/headList";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { z } from "zod";
export const pbnSttHeadListExport: z.infer<typeof sttnHeadListType> = [
{ id: "a", title: "권역", visible: true },
{ id: "rvbsn", title: "권역", visible: true },
{
id: "aaa",
id: "lgbsn",
title: "단위유역",
visible: true,
},
{
id: "aaaa",
id: "mdmbsn",
title: "중권역",
visible: true,
},
{ id: "operMngCd", title: "환경청", visible: true },
{ id: "rgnNm", title: "환경청", visible: true },
{
id: "cityText",
id: "sido",
title: "시도",
visible: true,
},
{
id: "sggText",
id: "gugun",
title: "시군구",
visible: true,
},
{ id: "bdnstNm", title: "시설명", visible: true },
{ id: "locDiv", title: "지역구분", visible: true },
{ id: "phone", title: "전화번호", visible: true },
{ id: "fcltQuantity", title: "시설용량(톤/일)", visible: true },
{ id: "rusNm", title: "재이용시설명", visible: true },
{ id: "bscFctNm", title: "시설명", visible: true },
{ id: "efflWqltStndrdNm", title: "지역구분", visible: true },
{ id: "fctCpc", title: "시설용량(톤/일)", visible: true },
{ id: "tel", title: "전화번호", visible: true },
{ id: "ruseUtztnFcltNm", title: "재이용시설명", visible: true },
{
id: "fcltCpct",
@@ -38,7 +38,7 @@ export const pbnSttHeadListExport: z.infer<typeof sttnHeadListType> = [
visible: true,
},
{
id: "trbt",
id: "splyExtraCpct",
title: "하수처리량(m³/일)",
visible: true,
},
@@ -49,23 +49,23 @@ export const pbnSttHeadListExport: z.infer<typeof sttnHeadListType> = [
},
{
id: "total",
id: "usageTotal",
title: "합계",
visible: true,
},
{
id: "ithlWtr",
id: "inUsage",
title: "장내용수",
visible: true,
},
{
id: "othlWtr",
id: "outUsage",
title: "장외용수",
visible: true,
},
{
id: "mngMeth",
id: "operMthd",
title: "운영방식",
visible: true,
},
@@ -75,12 +75,12 @@ export const pbnSttHeadListExport: z.infer<typeof sttnHeadListType> = [
visible: true,
},
{
id: "firstDay",
id: "bgngDt",
title: "시작일",
visible: true,
},
{
id: "LastDay",
id: "endDt",
title: "종료일",
visible: true,
},
@@ -1,33 +1,53 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import type { z } from "zod";
import {
pbnSttHeadListExport,
pbnstSttNodeListExport
} from "./headList";
import { fetchType, getFetch } from "@/components/lib/api";
import { pbnSttHeadListExport, pbnstSttNodeListExport } from "./headList";
import { fetchType, getFetch, postFectch } from "@/components/lib/api";
import { controlHeadView } from "../rainSttn";
import type { sttnHeadListType } from "../rainSttn/headList";
import type { customPbnst } from "../../fcltReg/pbnstReg/type";
import type { customPbnst, pubHasuType } from "../../fcltReg/pbnstReg/type";
import { excelPbnstSttnParsing } from "./excel";
import type { FcPrfType } from "@/app/store/prfmncReg/pbnstPrfmncReg/type";
import type { ReturnType } from "@common/business_components/ui";
import type { WaterReuseFacility } from "./type";
const pbnstSttHeadList = pbnSttHeadListExport;
const pbnstSttNodeList = pbnstSttNodeListExport;
export type pbnstSttnState = {
pbnstSttn: {
pbnstSttnRes: customPbnst[];
pbnstSttnRes: WaterReuseFacility[];
pbnstSearchData: WaterReuseFacility[];
pbnstSttHeadList: CommonTableProps[];
pbnstSttNodeList: CommonTableProps[];
pbnstDetail: customPbnst;
excelList: [];
isInit: boolean;
};
};
type pbnstSttnActions = {
pbnstChSttnHead: (
headList: z.infer<typeof sttnHeadListType>,
pbnstChSttnHead: (headList: z.infer<typeof sttnHeadListType>) => void;
pbnstSttnSearch: (
page: string,
total: string,
reurnValue: ReturnType,
searchNm: string | undefined,
year: string
) => void;
pbnSttnInit: (
page: string,
total: string,
reurnValue: ReturnType,
year: string
) => void;
getPbnStnDetail: (bscFctCd: string) => void;
pbnNmSearch: (
page: string,
total: string,
reurnValue: ReturnType,
searchNm: string | undefined,
year: string
) => void;
pbnstSttnSearch: (page: number, total: string, con: string) => void;
};
export type pbnstSttnType = pbnstSttnState & pbnstSttnActions;
@@ -37,11 +57,113 @@ export const pbnstSttnStateExport: pbnstSttnState = {
pbnstSttHeadList: pbnstSttHeadList,
pbnstSttNodeList: pbnstSttNodeList,
pbnstSttnRes: [],
pbnstDetail: {} as customPbnst,
pbnstSearchData: [],
excelList: [],
isInit: false,
},
};
const hasuListFetch = async (
page: string,
total: string,
reurnValue: ReturnType,
searchNm: string | undefined,
year: string
) => {
let url = "";
if (reurnValue.partValue === "A") {
url = `/prcsFclt/info/${page}/${total}/${reurnValue.partValue}/${
reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue
}/0/1/SW`
} else if (reurnValue.partValue === "R") {
url = `/prcsFclt/info/${page}/${total}/${reurnValue.partValue}/${
reurnValue.regionValue
? reurnValue.regionValue
: reurnValue.unitWaterShedValue
? reurnValue.unitWaterShedValue
: reurnValue.middleRegionValue
}/0/1/SW`
} else {
url = `/prcsFclt/info/${page}/${total}/${reurnValue.envPartValue}/${reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue}/0/1/SW`
}
if( searchNm&& searchNm?.length>0){
url+="/"+searchNm
}
const pbnList = await getFetch(fetchType.COMMON, url);
const arrayList = pbnList.map((item: pubHasuType) => item.bscFctCd);
const getRuseList = await postFectch(
`/reuseFc/pubDetailList/${year}`,
arrayList,
fetchType.WR
);
const checkWrRegListRes = getRuseList.data;
const data: WaterReuseFacility[] = checkWrRegListRes.map(
(item: FcPrfType) => {
const findData = pbnList.find(
(fclt: pubHasuType) =>
fclt.bscFctCd === item.pbnstRuseFcltPk.substring(0, 11)
);
const usage = item.prfList.reduce(
(acc, cur) => {
acc.inUsage +=
cur.wshwtr +
cur.coolUswtr +
cur.cleanUswtr +
cur.drwtUswtr +
cur.dltnUswtr +
cur.ithlRswtr +
cur.ithlEtcUswtr +
cur.cleanToilUswtr +
cur.resn;
acc.outUsage +=
cur.lndwtr +
cur.hydUswtr +
cur.ugwtChr +
cur.farmUswtr +
cur.rvrKeepUswtr +
cur.indstUswtr;
acc.total = acc.inUsage + acc.outUsage;
return acc;
},
{ total: 0, inUsage: 0, outUsage: 0 }
);
return {
rvbsn: findData?.rvbsn,
lgbsn: findData?.lgbsn,
mdmbsn: findData?.mdmbsn,
rgnNm: findData?.rgnNm,
sido: findData?.sido,
gugun: findData?.gugun,
bscFctNm: findData?.bscFctNm,
efflWqltStndrdNm: findData?.efflWqltStndrdNm,
fctCpc: findData.fctCpc,
tel: findData?.tel ?? "-",
ruseUtztnFcltNm: item.ruseUtztnFcltNm,
fcltCpct: item.fcltCpct,
splyExtraCpct: item.splyExtraCpct,
ruseCpct: item.ruseCpct,
pbnstRuseFcltPk: item.pbnstRuseFcltPk,
usageTotal: usage.total,
inUsage: usage.inUsage,
outUsage: usage.outUsage,
operMthd: item.operList[0]?.operMthd,
rprtvBzenty: item.operList[0]?.rprtvBzenty,
bgngDt: item.operList[0]?.bgngDt.toLocaleDateString ?? "",
endDt: item.operList[0]?.endDt.toLocaleDateString?? "",
searchNm: findData.bscFctNm,
searchPk: findData.bscFctCd,
};
}
);
return data;
};
export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
set: any
) => {
@@ -49,9 +171,7 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
pbnstChSttnHead: async (
headList: z.infer<typeof sttnHeadListType>
): Promise<void> => {
console.log('head ', headList)
const changeNodeList = controlHeadView(headList, pbnstSttNodeList)
const changeNodeList = controlHeadView(headList, pbnstSttNodeList);
return set((state: pbnstSttnState) => ({
pbnstSttn: {
@@ -61,12 +181,22 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
},
}));
},
pbnstSttnSearch: async (page: number, total: string, con: string) => {
pbnstSttnSearch: async (
page: string,
total: string,
reurnValue: ReturnType,
searchNm: string | undefined,
year: string
) => {
try {
const pbnstSttnRes = await getFetch(
fetchType.WR,
`/reuseFc/waterreuseFc/${page}/${total}/${con}`
const pbnstSttnRes = await hasuListFetch(
page,
total,
reurnValue,
searchNm,
year
);
console.log("pbnstSttnRes", pbnstSttnRes);
if (Number(total) > 9000) {
const pbnstExcel = excelPbnstSttnParsing(pbnstSttnRes);
set((state: pbnstSttnState) => {
@@ -80,7 +210,6 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
});
} else
set((state: pbnstSttnState) => {
return {
...state,
pbnstSttn: {
@@ -94,5 +223,83 @@ export const pbnstSttnActionsExport: (set: any) => pbnstSttnActions = (
console.log("error", erTxt);
}
},
}
}
pbnSttnInit: async (
page: string,
total: string,
reurnValue: ReturnType,
year: string
) => {
try {
const pbnstSttnRes = await hasuListFetch(
page,
total,
reurnValue,
undefined,
year
);
console.log('pbnstSttnRes ', pbnstSttnRes)
set((state: pbnstSttnState) => {
return {
...state,
pbnstSttn: {
...state.pbnstSttn,
pbnstSttnRes: pbnstSttnRes,
isInit: false,
},
};
});
} catch (erTxt) {
console.log("error", erTxt);
}
},
getPbnStnDetail: async (bscFctCd: string) => {
try {
const pbnstDetail = await getFetch("wr", `/reuseFc/pubFc/${bscFctCd}`);
console.log("pbnstDetail ", pbnstDetail);
set((state: pbnstSttnState) => {
return {
...state,
pbnstSttn: {
...state.pbnstSttn,
pbnstDetail: pbnstDetail,
},
};
});
} catch (errorHasu) {
console.log(errorHasu);
}
},
pbnNmSearch: async (
page: string,
total: string,
reurnValue: ReturnType,
searchNm: string | undefined,
year: string
) => {
try {
const pbnstSttnRes = await hasuListFetch(
page,
total,
reurnValue,
searchNm,
year
);
set((state: pbnstSttnState) => {
return {
...state,
pbnstSttn: {
...state.pbnstSttn,
pbnstSearchData: pbnstSttnRes,
},
};
});
} catch (e) {
console.log(e);
}
},
};
};
@@ -0,0 +1,24 @@
export type WaterReuseFacility = {
bscFctNm: string; // 기본시설명 (예: "난지")
efflWqltStndrdNm: string; // 방류수 수질 기준명 (예: "500톤 이상(Ⅲ지역)")
fcltCpct: number; // 시설 용량 (숫자형, 예: 1)
fctCpc: string; // 시설 처리 능력 (예: "2360000")
gugun: string; // 구군 정보 (예: " ")
inUsage: number; // 유입량 (예: 1387)
lgbsn: string; // 대수계 (예: "한강본류")
mdmbsn: string; // 중권역 (예: "한강서울")
outUsage: number; // 유출량 (예: 900)
pbnstRuseFcltPk: string; // 공공하수 재이용 시설 PK (예: "11000SW001R1")
rgnNm: string; // 관할 기관명 (예: "한강유역환경청")
ruseCpct: number; // 재이용 가능 용량 (예: 123)
ruseUtztnFcltNm: string; // 재사용 활용 시설명 (예: "난지 재사용")
rvbsn: string; // 소수계 (예: "한강")
sido: string; // 시도 정보 (예: "서울특별시")
splyExtraCpct: number; // 추가 공급 용량 (예: 123)
tel: string; // 전화번호 (예: "-")
usageTotal: number; // 총 사용량 (예: 2287)
operMthd: string;
rprtvBzenty: string;
bgngDt: string;
endDt: string;
};
@@ -1,4 +1,4 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { z } from "zod";
export const sttnHeadListType = z.array(
@@ -12,7 +12,7 @@ import {
rainSttnDetailNodeListExport,
} from "./headList";
import type { z } from "zod";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
// 테이블 헤드 리스트
const rainSttHeadList = rainSttHeadListExport;
@@ -1,6 +1,6 @@
import type { z } from "zod";
import type { sttnHeadListType } from "../rainSttn/headList";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
export const rswtSttHeadListExport: z.infer<typeof sttnHeadListType> = [
{
@@ -1,4 +1,4 @@
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import type { customRswtBdst } from "../../fcltReg/rswtReg";
import type { sttnHeadListType } from "../rainSttn/headList";
import type { z } from "zod";
+63 -2
View File
@@ -1,6 +1,6 @@
import type { TableUpperProps } from "@/app/store/common/type/header";
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { Checkbox, Input, TableCell, TableRow } from "@common/components/ui";
export const rainChkTableData = (chkData: rainChkZodType[]) => {
@@ -101,7 +101,7 @@ export const chRowspanTable = (
.map((head) => {
const key = head.id;
const isMerged = head.rowSpan;
const isMerged = head.mergeCell;
const value = row[key];
// 병합 대상이면 중복 렌더링 여부 판단
if (isMerged) {
@@ -184,4 +184,65 @@ export const headVisibleChange = (headList: TableUpperProps[], isEdit: boolean)
}
});
}
const handleChange = (
rowIndex: number,
field: any,
value: string | number,
setInputData: (data:any) => void
) => {
if(Number(value) < 0 ||! Number(value)){
value = 0;
}else{
value = Number(value);
}
setInputData((prevData:any) =>
prevData?.map((row:any, index: number) => {
if (index === rowIndex) {
return {
...row,
[field ]: value,
};
}
return row;
})
);
};
;
export const InputTableBody = (chgRes: any[] | [] ,headList:TableUpperProps[], setInputData: (data: any[]) => void) => {
return (
<>
{chgRes.map((data, dataIndex) => (
<TableRow key={dataIndex + "row"}>
{headList.map((head, headIndex) => (
<TableCell key={head.id + headIndex} className="w-36" >
{head.edit ===true && data.edit !==false?
<Input
className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
onChange={(e) =>
handleChange(dataIndex, head.id, e.target.value,setInputData)
}
value={data[head.id as keyof any] ?? ""}
/> : (
<div
className={`
${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
!text-xl w-full h-10
`}
>
{data[head.id as keyof any] ?? ""}
</div>
)
}
</TableCell>
))}
</TableRow>
))}
</>
);
}
@@ -158,6 +158,8 @@ export function PbnstBuseForm({
const formData = form.watch();
formData.pplInstls = ref.current ? [...ref.current] : []; // ← form 내부 상태 기준으로 복사
formData.fcDemands = fcDemands;
formData.fcOrgwts = fcOrgwtFiled;
if (formType === "reg") {
if (
firstBizData &&
@@ -174,7 +176,6 @@ export function PbnstBuseForm({
pbnstBizData(formData as fcBizType);
}else if(formType === "update"){
console.log('formdata ', formData)
pbnstBizData(formData as fcBizType);
@@ -458,15 +459,13 @@ export function PbnstBuseForm({
render={({ field: f }) => (
<FormUi label="수요처명">
<SearchInputText
label={undefined}
label={'수요처'}
initValue={f.value}
setValue={(val) => {
f.onChange(val);
if (val) getDemandCompList(val, 3);
}}
setRtnData={(valList: PbnstDemandComType[]) => {
console.log('valList[0] ', index)
setRtnData={(valList: any[]) => {
if (
valList.length > 0 &&
valList['0']
@@ -507,6 +506,15 @@ export function PbnstBuseForm({
}
}}
searchList={demandCompList?.map((item=>{
return({
...item,
searchNm:item.dmdCoNm,
searchPk:item.dmdInfoPk
})
}))
}
></SearchInputText>
</FormUi>
)}
@@ -89,7 +89,6 @@ export function PbnstMngForm({
getBizCycle(pbnst.pbnstRes[val]);
form.reset(pbnst.pbnstRes[val]);
console.log('pbnst.efflAmnt ', pbnst.efflAmnt)
form.setValue('hasuhasu' , Number(pbnst.efflAmnt)??0)
getpbnstInsertIndex({ ...pbnst.pbnsUpdateIndex, mng: val });
}
@@ -203,7 +202,7 @@ export function PbnstMngForm({
form.setValue("swtrmtFcltFk", firstFcltData.swtrmtFcltFk);
form.setValue(
"pbnstRuseFcltPk",
String(firstFcltData.swtrmtFcltFk + "1")
String(firstFcltData.pbnstRuseFcltPk)
);
form.setValue("fcBizs", firstFcltData.fcBizs);
}
@@ -259,6 +258,7 @@ export function PbnstMngForm({
formData.fcOpers = ref.current ? [...ref.current] : [];
formData.fcFiles = regFileList ? [...regFileList] : [];
if (formType === "reg") {
console.log('formData ', formData)
pbnstMngData([formData] as customPbnst[]);
} else if (formType === "update"){
const updateRes = pbnst.pbnstRes?.map((item)=>{
@@ -272,7 +272,7 @@ export function PbnstMngForm({
}, [form.formState, regFileList, formType, pbnst.pbnstRes]);
useEffect(() => {
pbnstMngData(pbnst.pbnstMngRegData);
// pbnstMngData(pbnst.pbnstMngRegData);
}, [pbnst.pbnstMngRegData]);
useEffect(() => {
@@ -8,7 +8,7 @@ import type { splRuseWaterType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgd
import type { rswtrPolutionsZode } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList";
import type { z } from "zod";
import React from "react";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
export default function ChkgdModal({ type, obj }: { type: string; obj: any }) {
const {
@@ -32,9 +32,10 @@ export default function PbnPrfExcelModal({ data }: { data: FcPrfType }) {
},
});
const onSubmit = (values: z.infer<typeof pbnPrfRegExcelZod>) => {
console.log(values);
prfmnRegData(excelData )
if (excelData) {
prfmnRegData(excelData as unknown as PrfType);
}
};
@@ -64,7 +65,7 @@ export default function PbnPrfExcelModal({ data }: { data: FcPrfType }) {
if (file)
filePicked(file, 0).then((res) => {
if (res !== undefined)
setExcelData(excelToPbnPrfData(res as any, form.getValues("ym"),form.getValues('pbnstRuseFcltFk') ))
setExcelData(excelToPbnPrfData(res as unknown as JSON[], form.getValues("ym"),form.getValues('pbnstRuseFcltFk') ) as PrfType[])
});
}
}, [files]);
@@ -1,7 +1,7 @@
"use client";
import { useWrStore } from "@/app/store";
import type { pubHasuType, fcBizType, fcOrgwtType,} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import { tableData } from "@/components/lib/func/commom";
import RuseMngTable from "@/components/ui/table/pbnstReg/ruseMngTable/ruseMngTable";
import { Title, UiTable } from "@common/business_components/ui";
@@ -1,9 +1,10 @@
"use client";
import { useWrStore } from "@/app/store";
import type {
customPbnst,
fcBizType,
pubHasuType,
import {
pbnstRegZod,
type customPbnst,
type fcBizType,
type pubHasuType,
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { PbnstMngForm } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm";
import { ScrollArea } from "@common/business_components";
@@ -18,9 +19,11 @@ import { useEffect, useState } from "react";
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm";
export function PbnstRegModal({ data }: { data: pubHasuType }) {
const { pbnst, pbnstInsert } = useWrStore((state) => {
const { pbnst, pbnstInsert, pbnstMngData } = useWrStore((state) => {
return state;
});
const { pbnstRes } = pbnst;
const [pbnstBdstForm, setPbnstBdstForm] = useState<customPbnst>(
{} as customPbnst
);
@@ -36,23 +39,43 @@ export function PbnstRegModal({ data }: { data: pubHasuType }) {
useEffect(() => {
if (data) {
let regData = {
swtrmtFcltFk: String(data.bscFctCd),
pbnstRuseFcltPk: String(data.bscFctCd + "1"),
fcBizs: [
{
pbnstRuseFcltFk: String(data.bscFctCd + "1"),
cycl: 1,
} as unknown as fcBizType,
],
};
let regData;
if (pbnstRes && pbnstRes?.length > 0) {
regData = {
swtrmtFcltFk: String(data.bscFctCd),
pbnstRuseFcltPk: String(data.bscFctCd) + String(pbnstRes.length + 1),
fcBizs: [
{
pbnstRuseFcltFk:
String(data.bscFctCd) + String(pbnstRes.length + 1),
cycl: 1,
} as unknown as fcBizType,
],
};
//regData= pbnstRegZod.parse(regData)
//setPbnstBdstForm(regData as unknown as customPbnst);
// pbnstMngData([regData] as unknown as customPbnst[])
} else {
regData = {
swtrmtFcltFk: String(data.bscFctCd),
pbnstRuseFcltPk: String(data.bscFctCd + "1"),
fcBizs: [
{
pbnstRuseFcltFk: String(data.bscFctCd + "1"),
cycl: 1,
} as unknown as fcBizType,
],
};
//regData= pbnstRegZod.parse(regData)
// setPbnstBdstForm(regData as unknown as customPbnst);
// pbnstMngData([regData] as unknown as customPbnst[])
}
regData = pbnstRegZod.parse(regData);
setPbnstBdstForm(regData as unknown as customPbnst);
}
}, [data]);
}, [data, pbnstRes]);
useEffect(() => {}, [pbnstBdstForm]);
useEffect(() => {}, [pbnst.pbnstMngRegData]);
return (
<>
<h1 className="text-2xl font-medium text-label pl-8">
@@ -81,7 +104,10 @@ export function PbnstRegModal({ data }: { data: pubHasuType }) {
<PbnstMngForm formType={"reg"} firstFcltData={pbnstBdstForm} />
</TabsContent>
<TabsContent className="max-h-full" value="buse">
<PbnstBuseForm formType={"reg"} firstBizData={pbnstBdstForm.fcBizs} />
<PbnstBuseForm
formType={"reg"}
firstBizData={pbnstBdstForm.fcBizs}
/>
</TabsContent>
</Tabs>
</ScrollArea>
@@ -1,6 +1,6 @@
"use client";
import { useWrStore } from "@/app/store";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { Title } from "@common/business_components/ui";
import { useEffect, useState } from "react";
@@ -8,7 +8,7 @@ import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg";
import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg";
import { useWrStore } from "@/app/store";
import { useEffect, useState } from "react";
import type { CommonTableProps } from "@/app/store/common/type/headder";
import type { CommonTableProps } from "@/app/store/common/type/header";
import { rainChkTableData, rswtChkTableData } from "@/components/lib/func/TableData";
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
@@ -1,56 +1,69 @@
import React, { useCallback, useEffect, useRef, useState } from "react";
import { useWrStore } from '@/app/store';
import type { PbnstDemandComType } from '@/app/store/ruseFcltMng/fcltReg/pbnstReg/type';
import type { DemandCompType } from '@common/business_components/ui';
import React, { useCallback, useEffect, useRef, useState } from 'react';
type SearchType = {
searchNm: string;
searchPk: string;
};
type thisProps = {
label: string | undefined;
initValue: string | undefined;
setValue : (dmdCoNm?: string) => void;
setRtnData : (rtnData: PbnstDemandComType[]) => void;
}
export default function SearchInputText({label=undefined, initValue=undefined, setValue=()=>{}, setRtnData=()=>{}} :thisProps) {
const { demandCompList } = useWrStore((state) => state);
setValue: (searchNm?: string) => void;
setRtnData: (rtnData: any[]) => void;
searchList?: any[];
};
export default function SearchInputText({
label = undefined,
initValue = undefined,
setValue = () => {},
setRtnData = () => {},
searchList = undefined,
}: thisProps) {
const [isOpen, setIsOpen] = useState(false);
const [textValue, setTextValue] = useState(initValue || '');
const wrapperRef = useRef<HTMLDivElement>(null);
const handleInputChange = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
setTextValue(value);
setValue(value);
if (value) {
setIsOpen(true);
} else {
setIsOpen(false);
}
}, [ setValue]);
const [textValue, setTextValue] = useState(initValue || "");
const handleSuggestionClick = useCallback((dmdCoNm: string) => {
setTextValue(dmdCoNm);
setValue(dmdCoNm);
setIsOpen(false);
setRtnData(demandCompList);
}, [demandCompList, setRtnData, setValue]);
const wrapperRef = useRef<HTMLDivElement>(null);
const handleInputChange = useCallback(
(e: React.ChangeEvent<HTMLInputElement>) => {
const value = e.target.value;
setTextValue(value);
setValue(value);
if (value) {
setIsOpen(true);
} else {
setIsOpen(false);
}
},
[setValue]
);
const handleSuggestionClick = useCallback(
(dmdCoNm: string) => {
setTextValue(dmdCoNm);
setValue(dmdCoNm);
setIsOpen(false);
setRtnData(searchList || []);
},
[searchList, setRtnData, setValue]
);
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {
if (
wrapperRef.current &&
!wrapperRef.current.contains(event.target as Node)
) {
setIsOpen(false);
}
};
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener("mousedown", handleClickOutside);
return () => {
document.removeEventListener('mousedown', handleClickOutside);
document.removeEventListener("mousedown", handleClickOutside);
};
}, []);
return (
<div ref={wrapperRef}>
<input
@@ -64,22 +77,25 @@ export default function SearchInputText({label=undefined, initValue=undefined, s
{isOpen && (
<div className=" z-1 w-full mt-2 bg-white border border-gray-300 rounded-md shadow-lg h-90 overflow-auto">
<div className="max-h-72">
{demandCompList && demandCompList.length > 0 ? demandCompList.map((item : DemandCompType, index : number) => (
<div
key={index}
className="!text-xl w-full text-left px-5 py-3 hover:bg-gray-100 cursor-pointer overflow-auto"
onClick={() => handleSuggestionClick(item.dmdCoNm)}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
handleSuggestionClick(item.dmdCoNm);
}
}}
>
{item.dmdInfoPk.substring(0,10)}&nbsp;<span className="float-right">{item.dmdCoNm}</span>
</div>
)) : (
{searchList && searchList.length > 0 ? (
searchList.map((item: SearchType, index: number) => (
<div
key={index}
className="!text-xl w-full text-left px-5 py-3 hover:bg-gray-100 cursor-pointer overflow-auto"
onClick={() => handleSuggestionClick(item.searchNm)}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
handleSuggestionClick(item.searchNm);
}
}}
>
{item.searchPk?.substring(0, 10)}&nbsp;
<span className="float-right">{item.searchNm}</span>
</div>
))
) : (
<div className="!text-xl w-full px-5 py-3 hover:bg-gray-100 cursor-pointer overflow-auto">
검색 결과가 없습니다.
</div>
@@ -88,5 +104,5 @@ export default function SearchInputText({label=undefined, initValue=undefined, s
</div>
)}
</div>
)
}
);
}
@@ -1,9 +1,10 @@
"use client";
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
import { useWrStore } from "@/app/store";
import type { TableUpperProps } from "@/app/store/common/type/header";
import type {
} from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import { InputTableBody } from "@/components/lib/func/TableData";
import {
Input,
Table,
@@ -12,7 +13,7 @@ import {
TableHeader,
TableRow,
} from "@common/components/ui";
import { useEffect, useState } from "react";
import { useEffect, useState, type Dispatch, type SetStateAction } from "react";
export function GuideDetailsTable({
chgRes,
@@ -26,80 +27,26 @@ export function GuideDetailsTable({
setChGuidData: (chgRes: any[]) => void;
}) {
const { code, rainChkgdn } = useWrStore((state) => state);
const [guidData, setGuidData] = useState<any[]>();
const [inputData, setInputData] = useState<any[]>();
const handleChange = (
rowIndex: number,
field: any,
value: string | number
) => {
if(Number(value) < 0 ||! Number(value)){
value = 0;
}else{
value = Number(value);
}
setGuidData((prevData) =>
prevData?.map((row, index) => {
if (index === rowIndex) {
return {
...row,
[field as any]: value,
};
}
return row;
})
);
};
const tableBody = (chgRes: any[] | []) => {
return (
<>
{chgRes.map((data, dataIndex) => (
<TableRow key={dataIndex + "row"}>
{headList.map((head, headIndex) => (
<TableCell key={head.id + headIndex} className="w-36" >
{head.edit ===true && data.edit !==false?
<Input
className={`${head.id !== "utztnUsgCd" ? "text-right" : "text-center"} !text-xl h-10 w-full`}
onChange={(e) =>
handleChange(dataIndex, head.id, e.target.value)
}
value={data[head.id as keyof any] ?? ""}
/> : (
<div
className={`
${head.id !== "utztnUsgCd" ? "text-right" : "text-center"}
!text-xl w-full h-10
`}
>
{data[head.id as keyof any] ?? ""}
</div>
)
}
</TableCell>
))}
</TableRow>
))}
</>
);
};
useEffect(() => {
setGuidData(chgRes);
setInputData(chgRes);
}, [chgRes]);
useEffect(() => {
setChGuidData(guidData??[] );
setChGuidData(inputData??[] );
}, [guidData]);
}, [inputData]);
return (
<>
<div className={`card !m-[1.2rem] !p-0r `}>
<Table variant="secondary">
<TableHeader className="font-bold">{headMakeprfmnc(headList, rainChkgdn?.rainHeadNm)}</TableHeader>
<TableBody >
{tableBody(guidData ?? [])}
{InputTableBody(inputData ?? [],headList, setInputData) }
</TableBody>
</Table>
</div>
@@ -3,7 +3,7 @@ import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead"
import { useWrStore } from "@/app/store";
import type { rainChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import { tableData } from "@/components/lib/func/commom";
import {
chRowspanTable,
@@ -6,7 +6,7 @@ import type {
rswtChkZodType,
rswtrChkDetailsZodType,
} from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn";
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { TableUpperProps } from "@/app/store/common/type/header";
import { tableData } from "@/components/lib/func/commom";
import {
chRowspanTable,