Merge branch 'iipbs/sn/dev' of https://www.onasys.co.kr:3000/ONAANDALL/frontend into iipbs/sn/dev

This commit is contained in:
dongsilove
2025-12-31 18:06:20 +09:00
17 changed files with 99 additions and 74 deletions
+2
View File
@@ -5,6 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
NEXT_PUBLIC_PROXY_HOST = http://localhost:3000
NEXT_PUBLIC_SUB_DOMAIN = http://localhost:13000
#NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://localhost:3001/auth/login
NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/
@@ -17,6 +18,7 @@ NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
NEXT_PUBLIC_NGII_PARAM = 04trYP9_xwLAfALjwZ-B8g&service=WMTS&request=GetTile&version=1.0.0&format=image/png&layer=korean_map&style=korean&tilematrixset=korean&tilematrix={z}&tilecol={x}&tilerow={y}
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
#NEXT_PUBLIC_SERVER_API_URL = http://localhost:8883/operation-service
REACT_EDITOR=atom
+1 -1
View File
@@ -5,7 +5,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11300
NEXT_PUBLIC_SUB_DOMAIN = http://con.mind-one.co.kr:11300
NEXT_PUBLIC_SUB_DOMAIN = http://con.mind-one.co.kr:13000
NEXT_PUBLIC_CM_LOGIN_PAGE_URL = http://dev.onasys.co.kr:3000/auth/login
#NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11082
NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11083/operation-service
+5 -7
View File
@@ -1495,9 +1495,10 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
const bscFctCd = fcltyCd;
const res2 = await fetchFlowRateModalList(bscFctCd, searchYear); // /fclt/flow/
const calData = CalcRainEffect(clone(res2.data), 'SUNNY');
const calRainData = CalcRainEffect(clone(res2.data), 'RAIN');
//const calData = CalcRainEffect(clone(res2.data), 'SUNNY');
//const calRainData = CalcRainEffect(clone(res2.data), 'RAIN');
let cntSunnyDay = 0; // 청천일 수
// 지하수유입량 - 청천시 기준
let chungcunSumFlow = 0;
let sumSummerChungcunFlow = 0;
@@ -1540,6 +1541,7 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
summerRainDayEfflFlow += efflAmnt;
}
} else if (rainEffectDay < 0) {
cntSunnyDay += 1; // 청천일수
// 청천시
chungcunSumFlow += inflAmnt;
@@ -1651,7 +1653,7 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
operationalStatusList[0].winterSunnyAvg = roundUp(Number(operationalStatusList[0].winterSunnyAvg), 0) + roundUp(winterSunnyAvg, 0);
// 지하수유입량
const usage = chungcunSumFlow / calData.length;
const usage = chungcunSumFlow / cntSunnyDay; //calData.length;
const summerUsage = sumSummerChungcunFlow / summerChungchunDay;
const winterUsage = sumWinterChungcunFlow / winterChungchuDay;
@@ -1664,10 +1666,6 @@ export const dashBoardReducer: (set: (fn: (state: DashBoardType) => DashBoardTyp
operationalStatusList[0].groundWaterSummer = Math.round((summerUsage - (summerUsage * 0.65 * OSU_PERCENT)) * 100) / 100;
operationalStatusList[0].groundWaterWinter = Math.round((winterUsage - (winterUsage * 0.65 * OSU_PERCENT)) * 100) / 100;
//operationalStatusList[0].groundWaterAvg = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
//operationalStatusList[0].groundWaterSummer = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
//operationalStatusList[0].groundWaterWinter = calData.length === 0 ? '' : Number(calData[0].inflAmnt) - (Number(calData[0].inflAmnt)*0.65*0.8);
// 오염물질
// RDII 추정 = 하절기(6~8월) 중 최저 유입 BOD일때 유입유량 x ((동절기 청천시 유입BOD - 하절기(6~8월) 중 최저 유입BOD) / (동절기 청천시 유입BOD))
const resp = await fetchMainGraph(searchYear, fcltyCd);
+11 -7
View File
@@ -1,7 +1,7 @@
import type { NextConfig } from "next";
const subDomain =
process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000";
const domain = process.env.NEXT_PUBLIC_PROXY_HOST || "http://localhost:3000";
const subDomain = process.env.NEXT_PUBLIC_SUB_DOMAIN || "http://localhost:13000";
const nextConfig: NextConfig = {
output: "standalone",
@@ -18,7 +18,7 @@ const nextConfig: NextConfig = {
{
type: "header",
key: "referer",
value: "(.*)/pst(.*)",
value: "(.*)/cms(.*)",
},
],
},
@@ -26,19 +26,23 @@ const nextConfig: NextConfig = {
afterFiles: [
{
source: "/sewerage-service/:path*",
destination: `${subDomain}/sewerage-service/:path*`,
destination: `${domain}/sewerage-service/:path*`,
},
{
source: "/reuse-service/:path*",
destination: `${subDomain}/reuse-service/:path*`,
destination: `${domain}/reuse-service/:path*`,
},
{
source: "/operation-service/:path*",
destination: `${subDomain}/operation-service/:path*`,
destination: `${domain}/operation-service/:path*`,
},
{
source: "/ngii-server/:path*",
destination: `${subDomain}/ngii-server/:path*`,
destination: `${domain}/ngii-server/:path*`,
},
{
source: "/cms/:path*",
destination: `${subDomain}/cms/:path*`,
},
],
fallback: [],
@@ -1,7 +1,7 @@
"use client";
import { useEffect } from "react";
import { useRouter, usePathname } from "next/navigation";
import { useRouter } from "next/navigation";
import { client } from "@/src/shared/api";
import type { IUserInfo } from "@/src/shared/store";
import { useUserStore, getCookie } from "@/src/shared/lib";
@@ -12,7 +12,7 @@ const LOGIN_PAGE_URL = process.env.NEXT_PUBLIC_CM_LOGIN_PAGE_URL || "http://loca
const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
const router = useRouter();
const pathname = usePathname();
// const pathname = usePathname();
const { userInfo, setUserInfo } = useUserStore((state) => state);
async function authCheck() {
@@ -53,7 +53,7 @@ const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
}
}
})();
}, [pathname]);
}, []);
return <>{children}</>;
};