wr: 하수재이용시설 현황 수정
This commit is contained in:
+4
-3
@@ -7,13 +7,14 @@ NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
|
||||
NEXT_PUBLIC_PROXY_HOST = http://localhost:3001
|
||||
NEXT_PUBLIC_SUB_DOMAIN = http://localhost:13000
|
||||
NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||
NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
||||
# NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service/api/v1
|
||||
NEXT_PUBLIC_FO_SERVER_API_URL = http://localhost:8883/operation-service/api/v1
|
||||
NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
|
||||
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
|
||||
NEXT_PUBLIC_GEOSERVER_URL = https://hasudo.geo.rsonesoft.com/geoserver
|
||||
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
|
||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||
# NEXT_PUBLIC_WR_SERVER_API_URL = http://localhost:8883/reuse-service/api/v1
|
||||
# NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
|
||||
NEXT_PUBLIC_WR_SERVER_API_URL = http://localhost:8883/reuse-service/api/v1
|
||||
NEXT_PUBLIC_SEWERAGE_API_URL = http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
|
||||
# NEXT_PUBLIC_SEWERAGE_API_URL=http://localhost:8883/sewerage-service
|
||||
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
|
||||
|
||||
@@ -42,7 +42,7 @@ export default function PbnstSttn() {
|
||||
pbnstSttnSearch,
|
||||
pbnSttnInit,
|
||||
getPbnStnDetail,
|
||||
getFlcts, // 하수재이용시설 조회
|
||||
getFlcts, // 하수재이용시설(tb_wr_pbnst_ruse_fclt) 조회
|
||||
resetPbnstDetail,
|
||||
getLaeSeCdCheck,
|
||||
} = useWrStore((state) => state);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import type { Metadata } from "next";
|
||||
import { App } from "../src/app";
|
||||
import { setCookie } from "../src/shared/lib/cookie";
|
||||
|
||||
setCookie("site-id-key", process.env.NEXT_PUBLIC_SITE_ID || "WR");
|
||||
export const metadata: Metadata = {
|
||||
title: "물재이용매칭시스템",
|
||||
description: "물재이용매칭 시스템입니다",
|
||||
|
||||
@@ -120,51 +120,35 @@ export const hasuListFetch = async (
|
||||
|
||||
let url = ``;
|
||||
let filteredFclt = flcts;
|
||||
const filterData =
|
||||
reurnValue.sigunValue !== "0"
|
||||
? reurnValue.sigunValue
|
||||
: reurnValue.sidoValue;
|
||||
|
||||
if (filterData !== "0")
|
||||
filteredFclt = flcts.filter((fclt: string) => {
|
||||
return filterData.length == 2
|
||||
? fclt.slice(0, 2) === filterData
|
||||
: fclt.slice(0, 5) === filterData;
|
||||
});
|
||||
if (reurnValue.partValue === "A") {
|
||||
url += `${reurnValue.partValue}/${
|
||||
// reurnValue.sidoValue ? reurnValue.sidoValue : reurnValue.sigunValue
|
||||
reurnValue.sigunValue !== "0"
|
||||
? reurnValue.sigunValue
|
||||
: reurnValue.sidoValue
|
||||
}/0/1/SW`;
|
||||
|
||||
if (filterData !== "0")
|
||||
filteredFclt = flcts.filter((fclt: string) => {
|
||||
return filterData.length == 2
|
||||
? fclt.slice(0, 2) === filterData
|
||||
: fclt.slice(0, 5) === filterData;
|
||||
});
|
||||
} else if (reurnValue.partValue === "R") {
|
||||
url += `${reurnValue.partValue}/${
|
||||
reurnValue.regionValue
|
||||
? reurnValue.regionValue
|
||||
: reurnValue.unitWaterShedValue
|
||||
? reurnValue.unitWaterShedValue
|
||||
: reurnValue.middleRegionValue
|
||||
}/0/1/SW`;
|
||||
} else if (reurnValue.partValue === "G") {
|
||||
url += `${reurnValue.envPartValue}/${reurnValue.sigunValue !== "0" ? reurnValue.sigunValue : reurnValue.sidoValue}/0/1/SW`;
|
||||
if (filterData !== "0")
|
||||
filteredFclt = flcts.filter((fclt: string) => {
|
||||
return filterData.length == 2
|
||||
? fclt.slice(0, 2) === filterData
|
||||
: fclt.slice(0, 5) === filterData;
|
||||
});
|
||||
} else {
|
||||
url += `A/0/0/1/SW`;
|
||||
let nameCd="0", partStr="A", sidogunValue="0";
|
||||
switch (reurnValue.partValue) {
|
||||
case 'R': // 유역별
|
||||
if (reurnValue.regionValue !== '0') {
|
||||
if(reurnValue.unitWaterShedValue==='0') nameCd = reurnValue.regionValue;
|
||||
else if (reurnValue.middleRegionValue==='0') nameCd = reurnValue.unitWaterShedValue;
|
||||
else nameCd = reurnValue.middleRegionValue;
|
||||
}
|
||||
partStr = reurnValue.partValue;
|
||||
break;
|
||||
default:
|
||||
if(reurnValue.sidoValue && reurnValue.sidoValue !== '0') nameCd = reurnValue.sidoValue;
|
||||
if(reurnValue.sigunValue &&reurnValue.sigunValue !== '0') nameCd = reurnValue.sigunValue;
|
||||
sidogunValue = nameCd;
|
||||
partStr = reurnValue.envPartValue !== '0' ? reurnValue.envPartValue:reurnValue.partValue;
|
||||
break;
|
||||
}
|
||||
|
||||
if (sidogunValue && sidogunValue !== "0") { // 시도, 시군구 조회 조건이 있다면
|
||||
console.log("sidogunValue : --", sidogunValue, "--");
|
||||
filteredFclt = flcts.filter((fclt: string) => {
|
||||
return sidogunValue.length == 2
|
||||
? fclt.slice(0, 2) === sidogunValue
|
||||
: fclt.slice(0, 5) === sidogunValue;
|
||||
});
|
||||
}
|
||||
|
||||
url = `${partStr}/${nameCd}/0/1/SW`;
|
||||
|
||||
if (searchNm && searchNm?.length > 0) {
|
||||
url += "/" + searchNm;
|
||||
}
|
||||
@@ -184,13 +168,16 @@ export const hasuListFetch = async (
|
||||
searchNm && searchNm?.length > 0
|
||||
? pbnList.data.map((item) => item.bscFctCd)
|
||||
: filteredFclt;
|
||||
|
||||
console.log("checkRuseFcltList");
|
||||
console.log(checkRuseFcltList);
|
||||
|
||||
const getRuseList = await postFectch(
|
||||
`/reuseFc/pubDetailList/${year}/${filterData}/${page}/${total}`,
|
||||
`/reuseFc/pubDetailList/${year}/${sidogunValue}/${page}/${total}`,
|
||||
checkRuseFcltList,
|
||||
fetchType.WR
|
||||
);
|
||||
const checkWrRegListRes = getRuseList.data;
|
||||
console.log(checkWrRegListRes);
|
||||
|
||||
const data: WaterReuseFacility[] = checkWrRegListRes
|
||||
.map((item: FcPrfType) => {
|
||||
|
||||
@@ -19,7 +19,9 @@ import koBase from "@/public/locales/ko/message.json";
|
||||
import { StoreProvider as WrStoreProvider } from "@/app/store";
|
||||
//import { LoginApi } from "@/src/entities/auth";
|
||||
//import { useEffect } from "react";
|
||||
import { setCookie } from "@/src/shared/lib/cookie";
|
||||
|
||||
setCookie("site-id-key", process.env.NEXT_PUBLIC_SITE_ID || "WR");
|
||||
|
||||
const i18n = i18next.createInstance();
|
||||
i18n.init({
|
||||
|
||||
@@ -33,7 +33,7 @@ export type ReturnType = {
|
||||
partValue: string; // 조회 구분값(A: 행정, R: 유역, G: 환경청)
|
||||
sidoValue: string; // 선택된 시도 코드
|
||||
sigunValue: string; // 선택된 시군구 코드
|
||||
regionValue: string; // 선택된 권역 코드
|
||||
regionValue: string; // 선택된 권역(유역) 코드
|
||||
unitWaterShedValue: string; // 선택된 단위유역 코드
|
||||
middleRegionValue: string; // 선택된 중권역 코드
|
||||
envPartValue: string; // 선택된 환경청 코드
|
||||
|
||||
Reference in New Issue
Block a user