Merge commit 'ff563600d756f0a64dccd5d652a03b29010060d2' into iipbs/wr/dev
iipbs_wr / build (push) Waiting to run

This commit is contained in:
leedj312
2025-07-08 14:43:54 +09:00
11 changed files with 32 additions and 23 deletions
@@ -61,11 +61,11 @@ export default function HtdflSttn() {
const excelClick = useCallback(() => {
// 최신 검색 조건 반영
const con = getConValue();
htdflSttnSearch(1, "10000", String(con), fcltNm, code.cityCd, code.sggCd);
htdflSttnSearch(true, 1, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}, [htdflSttnSearch, objSearch, code.cityCd, code.sggCd]);
useEffect(() => {
htdflSttnSearch(pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
htdflSttnSearch(false, pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
}, [pageNation]);
const getSelCity = (val: string | number) => {
@@ -113,7 +113,7 @@ export default function HtdflSttn() {
htdflSttn.excelList,
"온배수시설 현황",
"sample_htdflSttn.xlsx",
"A1:S3"
"A1:R3"
);
}
}, [htdflSttn.excelList, code]);
@@ -182,7 +182,7 @@ export default function HtdflSttn() {
size={"sm"}
onClick={() => {
const con = getConValue();
htdflSttnSearch(pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
htdflSttnSearch(false, pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}}
>
조회
@@ -48,7 +48,7 @@ export default function PbnstSttn() {
const [pbnRuseNm, setPbnRuseNm] = useState<string>("");
const excelClick = useCallback(() => {
pbnstSttnSearch(true, "1", "20", ref.current, "", searchYear);
pbnstSttnSearch(true, String(pageNation), "20", ref.current, "", searchYear);
}, [pbnstSttnSearch]);
const cellCLick = useCallback(
@@ -137,11 +137,11 @@ export default function RswtSttn() {
const excelClick = useCallback(() => {
// 최신 검색 조건 반영
const con = getConValue();
rswtSttnSearch(1, "10000", String(con), fcltNm, code.cityCd, code.sggCd);
}, [rswtSttnSearch, objSearch, code.cityCd, code.sggCd]);
rswtSttnSearch(true, pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}, [rswtSttnSearch, objSearch, code.cityCd, code.sggCd, pageNation, fcltNm]);
useEffect(() => {
rswtSttnSearch(pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
rswtSttnSearch(false, pageNation, "20", String(getConValue()), fcltNm, code.cityCd, code.sggCd);
}, [pageNation]);
return (
@@ -188,7 +188,7 @@ export default function RswtSttn() {
size={"sm"}
onClick={() => {
const con = getConValue();
rswtSttnSearch(pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
rswtSttnSearch(false, pageNation, "20", String(con), fcltNm, code.cityCd, code.sggCd);
}}
>
조회
@@ -6,6 +6,7 @@ import { controlHeadView } from "../rainSttn";
import type { customHtdflBdst } from "../../fcltReg/htdflReg";
import { fetchType, getFetch } from "@/components/lib/api";
import type { SelectDataType } from "@common/business_components/ui";
import { excelHtdflSttnParsing } from "./excel";
const htdflSttHeadList = htdflSttHeadListExport;
const htdflSttNodeList = htdflSttNodeListExport;
@@ -24,7 +25,7 @@ type htdflSttnActions = {
initHtdfl: (page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
htdflSttnSearch: (page: number, total: string, con: string, txt: string,
htdflSttnSearch: (isExcel:boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
htdflChSttnHead: (
@@ -81,11 +82,10 @@ export const htdflSttnActionsExport: (set: any) => htdflSttnActions = (
console.log(error);
}
},
htdflSttnSearch: async (page: number, total: string, con: string, txt: string,
htdflSttnSearch: async (isExcel:boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => {
try {
console.log("page", page)
const htdflSttnRes = await getFetch(
fetchType.WR,
`/drain/facilityList` +
@@ -95,13 +95,14 @@ export const htdflSttnActionsExport: (set: any) => htdflSttnActions = (
(txt ? `/${txt}` : "")
);
if (Number(total) > 9000) {
if (isExcel) {
const htdflExcel = excelHtdflSttnParsing(htdflSttnRes, sidoCode, sggCode);
set((state: htdflSttnState) => {
return {
...state,
htdflSttn: {
...state.htdflSttn,
excelList: htdflSttnRes,
excelList: htdflExcel,
},
};
});
@@ -15,21 +15,21 @@ export const excelRSwtSttnParsing = (
sggCode.find((sgg) => sgg.val === item.sggCd.toString())?.text ?? "",
item.bdstNm ?? "",
item.daddr ?? "",
String(item.bdstUsgText ?? ""),
String(item.bdstUsgCd === -1 || item.bdstUsgCd === undefined ? "확인불가" : item.bdstUsgCd ?? ""), //건축물용도
String(item.frstArchPrmsnDt ?? ""),
String(item.archArea ?? ""),
String(item.archArea.split('.')[0] === '-1' ? '확인불가' : item.archArea.split('.')[0]),
String(item.reuseBuilding?.[0]?.rswtrObj.wtrUsqty ?? "0"), //물사용량
String(item.chgBuilding.length > 0 ? "Y" : "N"), //중축・개축・재축여부
String(item.reuseBuilding?.[0]?.lawTrgtYn ?? ""), //법적의무대상여부
String(item.reuseBuilding?.[0]?.rswtrObj.oblgTrgtWtrUsqty ?? ""), //의무대상물사용량
String(item.reuseBuilding?.[0]?.instlCmptnDt ?? ""), //설치완료일시
String(item.reuseBuilding?.[0]?.instlCst ?? ""), //설치비용
String(item.reuseBuilding?.[0]?.instlCst === -1 ? "확인불가" : item.reuseBuilding?.[0]?.instlCst ?? ""), //설치비용
item.reuseBuilding?.[0]?.rswtrObj?.orgwtKndCd ?? "", //원수종류
String(item.reuseBuilding?.[0]?.rswtrObj.filtrTrtmfctCpct ?? ""), //처리시설용량
String(item.reuseBuilding?.[0]?.rswtrObj?.filtrTrtmfctProcs ?? ""), //주요처리공정
String(item.reuseBuilding?.[0]?.rswtrObj?.filtrTrtmfctUsgCd ?? ""), //이용용도
String(item.reuseBuilding?.[0]?.instlCstSprtYn ?? ""), //설치지원비용여부
String(item.reuseBuilding?.[0]?.instlCstSprtAmt ?? ""), //설치지원비용
String(item.reuseBuilding?.[0]?.instlCstSprtAmt === -1 ? "확인불가" : item.reuseBuilding?.[0]?.instlCstSprtAmt ?? ""), //설치지원비용
String(item.reuseBuilding?.[0]?.grntchBdstCertYn ?? ""),
String(item.reuseBuilding?.[0]?.grntchBdstCertYr ?? ""),
String(item.reuseBuilding?.[0]?.grntchBdstCertNo ?? ""),
@@ -31,7 +31,7 @@ type rswtSttnActions = {
rswtSttnInit: (page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
rswtSttnSearch: (page: number, total: string, con: string, txt: string,
rswtSttnSearch: (isExcel: boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => void;
rswtChSttnHead: (
@@ -84,11 +84,10 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = (
console.log(e)
}
},
rswtSttnSearch: async (page: number, total: string, con: string, txt: string,
rswtSttnSearch: async (isExcel: boolean, page: number, total: string, con: string, txt: string,
sidoCode: SelectDataType[],
sggCode: SelectDataType[]) => {
try {
console.log("헐", page)
const rswtSttnRes = await getFetch(
fetchType.WR,
`/reuseFc/waterreuseFc` +
@@ -97,7 +96,7 @@ export const rswtSttnActionsExport: (set: any) => rswtSttnActions = (
(con ? `/${con}` : "/0") +
(txt ? `/${txt}` : "")
);
if (Number(total) > 9000) {
if (isExcel) {
const rswtExcel = excelRSwtSttnParsing(rswtSttnRes, sidoCode, sggCode);
set((state: rswtSttnState) => {
return {
@@ -120,7 +120,7 @@ export default function HtdflRegForm({
}
}, [htdflForm, code, form]);
useEffect(() => {
useEffect(() => {
if (!isPowerPlant) {
form.setValue(
"reuseBuilding.0.htdflObj.etgtType",
@@ -136,6 +136,9 @@ export default function HtdflRegForm({
<form onSubmit={form.handleSubmit(onSubmit)}>
{/* <div className="flex justify-between items-center mx-3"> */}
<div>
<h1 className="text-2xl font-bold text-gray-900 mt-3 ml-1">
{readonly && `(${htdflForm.bdstNm})`}
</h1>
<div className="grid grid-cols-12 flex items-center card-header">
<h1 className="text-2xl font-medium text-label col-span-10">
온배수 시설 등록
@@ -143,6 +143,9 @@ export default function RainRegForm({
<Form {...form}>
<form onSubmit={form.handleSubmit(onSubmit)}>
<div>
<h1 className="text-2xl font-bold text-gray-900 mt-3 ml-1">
{readonly && `(${rainForm.bdstNm})`}
</h1>
<div className="grid grid-cols-12 flex items-center card-header">
<h1 className="text-2xl font-medium text-label col-span-10">
{isModal ? "건축물 정보" : "빗물이용시설 정보"}
@@ -133,6 +133,9 @@ export default function RswtrRegForm({
<form onSubmit={form.handleSubmit(onSubmit)}>
{/* <div className="flex justify-between items-center mx-3"> */}
<div>
<h1 className="text-2xl font-bold text-gray-900 mt-3 ml-1">
{readonly && `(${rswtForm.bdstNm})`}
</h1>
<div className="grid grid-cols-12 flex items-center card-header">
<h1 className="text-2xl font-medium text-label col-span-10">
건축물 운영정보
Binary file not shown.
Binary file not shown.