+
+ {/* 배너 영역 */}
+
- {/* 세번째 라인 */}
-
-
- {/* 네번째 라인 */}
-
@@ -139,4 +300,4 @@ function DashboardPage() {
);
}
-export { DashboardPage };
\ No newline at end of file
+export { DashboardPage };
diff --git a/apps/cm/src/shared/config/api.ts b/apps/cm/src/shared/config/api.ts
index 36dfc69a3..25c8b88c9 100644
--- a/apps/cm/src/shared/config/api.ts
+++ b/apps/cm/src/shared/config/api.ts
@@ -69,6 +69,17 @@ export const ENDPOINT = {
POSTS_COMMENTS: "/board-service/api/v1/posts-cmnts",
POST_EVALUATION: "/board-service/api/v1/pstEvl",
},
+ SEWERAGE_SERVICE: {
+ PPL_COUNTS: "/sewerage-service/api/v1/ms/pplCounts",
+ OLD_PPL_COUNTS: "/sewerage-service/api/v1/ms/oldPplCounts",
+ },
+ IC_SERVICE: {
+ GROUPING_STATISTICS: "/ic-service/api/v1/nti/grouping-statistics",
+ },
+ DC_SERVICE: {
+ DATA_STATUS: "/dc-service/api/v1/dc/dataStatus",
+ },
+
};
export const JWT_EXPIRATION_TIME = 1800000;
diff --git a/apps/dm/.env.production b/apps/dm/.env.production
index b9d81ccc4..7b8f5c470 100644
--- a/apps/dm/.env.production
+++ b/apps/dm/.env.production
@@ -1,9 +1,9 @@
NEXT_PUBLIC_SITE_ID = DM
NEXT_PUBLIC_PORT = 11035
-NEXT_PUBLIC_PROXY_HOST = http://con.mind-one.co.kr:11035
-NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/api/v1
-NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/operation-service/api/v1
-NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000
+NEXT_PUBLIC_PROXY_HOST = https://reuse.hasuon.or.kr
+NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/api/v1
+NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/operation-service/api/v1
+NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
@@ -11,9 +11,9 @@ NEXT_PUBLIC_CLAIM_NAME = Authorization
NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
-NEXT_PUBLIC_REUSE_API_URL=http://con.mind-one.co.kr:11080/api/v1
+NEXT_PUBLIC_REUSE_API_URL= http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC
-NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/sewerage-service/api
+NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api
diff --git a/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx b/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx
index 5552c2f53..5a7ca6dbd 100644
--- a/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx
+++ b/apps/dm/app/(base-layout)/pages/wrStatus/page.tsx
@@ -22,7 +22,10 @@ interface WrStatusChartProps {
export default function WrStatusPage() {
- const { dmStatus, getDmStatusData} = useDmStore((state) => state);
+
+
+
+ const { Common, dmStatus, getDmStatusData,initializeCommonData} = useDmStore((state) => state);
const { statusData,facilityTotals ,chartData} = dmStatus;
const [selectedRegion, setSelectedRegion] = useState
(null);
const [hoveredRegion, setHoveredRegion] = useState(null);
@@ -33,7 +36,6 @@ export default function WrStatusPage() {
{ label: '하수', color: '#FF6B6B', key: 'sewage' },
{ label: '빗물', color: '#4ECDC4', key: 'rainwater' },
{ label: '중수도', color: '#45B7D1', key: 'reclaimed' },
- { label: '온배수', color: '#FED16A', key: 'thermal' },
];
const facilityTotalsColor = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FED16A'];
const defaultYear= '2023'
@@ -47,6 +49,11 @@ export default function WrStatusPage() {
}
};
+
+ useEffect(() => {
+ initializeCommonData();
+ }, [initializeCommonData]);
+
const createDonutMarker = useCallback((svg: SVGSVGElement, x: number, y: number, name: string, values: number[]) => {
const colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FED16A'];
const radius = 26;
@@ -142,8 +149,9 @@ export default function WrStatusPage() {
useEffect(() => {
- getDmStatusData(defaultYear);
- },[])
+ if(Common.selectSidoData&&Common.selectSidoData.length>0)
+ getDmStatusData(Common.selectSidoData);
+ },[Common.selectSidoData])
@@ -219,8 +227,8 @@ export default function WrStatusPage() {
chartConfig : chartConfig,
chartData : chartData,
chartTitle : '',
- chartClassName : "h-[300px] w-full",
- graphSize : 40,
+ chartClassName : "w-full h-[350px] ",
+ graphSize : 10,
yFieldText : '시설(개소)',
showLegend : true
}
@@ -321,7 +329,6 @@ export default function WrStatusPage() {
하수재이용시설 |
빗물이용시설 |
중수도시설 |
- 온배수시설 |
{/* 하수(이용량,천𝓂³/년) |
빗물(이용량,천𝓂³/년) |
중수도(이용량,천𝓂³/년) |
@@ -338,7 +345,6 @@ export default function WrStatusPage() {
{row.sewage} |
{row.rainwater} |
{row.reclaimed} |
- {row.thermal} |
))}
diff --git a/apps/dm/app/common/comFunction.ts b/apps/dm/app/common/comFunction.ts
index 02db72e8d..ec4894d49 100644
--- a/apps/dm/app/common/comFunction.ts
+++ b/apps/dm/app/common/comFunction.ts
@@ -1,4 +1,4 @@
-import type { DmStatusChartType, DmStatusDataType, RegionData, } from "../store/wrStatus/type";
+import type { RegionData, } from "../store/wrStatus/type";
@@ -43,7 +43,7 @@ export const regionIdMap: Record = {
};
-const makeRegion = (region: string) => {
+export const makeRegion = (region: string) => {
if (region === '서울특별시') return '서울'
if (region === '부산광역시') return '부산'
if (region === '대구광역시') return '대구'
@@ -56,19 +56,10 @@ const makeRegion = (region: string) => {
if (region === '강원특별자치도') return '강원'
if (region === '충청북도') return '충북'
if (region === '충청남도') return '충남'
- if (region === '전라북도') return '전북'
+ if (region === '전북특별자치도') return '전북'
if (region === '전라남도') return '전남'
if (region === '경상북도') return '경북'
if (region === '경상남도') return '경남'
if (region === '제주특별자치도') return '제주'
return region;
}
-export const changeStatusMapData= (data: DmStatusDataType[]) : DmStatusChartType[]=> {
- return data.map((item) => ({
- label: makeRegion(item.region??''),
- 하수: item.sewage.split('(')[0]?.replaceAll(',','') ??'',
- 빗물: item.rainwater.split('(')[0]?.replaceAll(',','')??'',
- 중수도: item.reclaimed.split('(')[0]?.replaceAll(',','') ??'',
- 온배수: item.thermal.split('(')[0]?.replaceAll(',','') ??'',
- }));
-}
\ No newline at end of file
diff --git a/apps/dm/app/layout.tsx b/apps/dm/app/layout.tsx
index 152a069f2..462537e09 100644
--- a/apps/dm/app/layout.tsx
+++ b/apps/dm/app/layout.tsx
@@ -1,4 +1,4 @@
-"use client"
+"use client";
import "./globals.css";
export default function RootLayout({
@@ -6,15 +6,13 @@ export default function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {
+
return (
물재이용 대민
-
- {children}
-
+ {children}
);
}
-
diff --git a/apps/dm/app/store/common/index.tsx b/apps/dm/app/store/common/index.tsx
index cf4ce14d8..6721d2620 100644
--- a/apps/dm/app/store/common/index.tsx
+++ b/apps/dm/app/store/common/index.tsx
@@ -214,7 +214,7 @@ const selectMiddleRegionData: SelectDataType[] = [
// 시도 API 호출 함수 추가
const fetchSidoData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/city');
+ const res = await getFetch(fetchType.FO, '/addr/city');
const data = res.data;
selectSidoData = [
{ text: "전체", val: '0'},
@@ -233,7 +233,7 @@ const fetchSidoData = async (): Promise => {
// 시군구 API 호출 함수 추가
const fetchSigunData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/sgg');
+ const res = await getFetch(fetchType.FO, '/addr/sgg');
const data = res.data;
selectSigunData = [
{ text: "전체", val: '0' },
@@ -253,7 +253,7 @@ const fetchSigunData = async (): Promise => {
// 권역 API 호출 함수 추가
const fetchRegionData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/sarea');
+ const res = await getFetch(fetchType.FO, '/addr/sarea');
const data = res.data;
return [
{ text: "전체", val: '0'},
@@ -271,7 +271,7 @@ const fetchRegionData = async (): Promise => {
// 중권역 API 호출 함수 추가
const fetchMiddleRegionData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/midArea');
+ const res = await getFetch(fetchType.FO, '/addr/midArea');
const data = res.data;
return [
{ text: "전체", val: '0' },
@@ -290,7 +290,7 @@ const fetchMiddleRegionData = async (): Promise => {
// 단위유역 API 호출 함수 추가
const fetchUnitWaterShedData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/largeArea');
+ const res = await getFetch(fetchType.FO, '/addr/largeArea');
const data = res.data;
return [
{ text: "전체", val: '0' },
@@ -309,7 +309,7 @@ const fetchUnitWaterShedData = async (): Promise => {
// 환경청 데이터
const fetchEnvPartData = async (): Promise => {
try {
- const res = await getFetch(fetchType.COMMON, '/addr/govArea');
+ const res = await getFetch(fetchType.FO, '/addr/govArea');
const data = res.data;
selectEnvPartData = [
{ text: "전체", val: '0', adstDliStrCd: '' },
diff --git a/apps/dm/app/store/map/index.tsx b/apps/dm/app/store/map/index.tsx
index 7b5eb0cca..5ed066f73 100644
--- a/apps/dm/app/store/map/index.tsx
+++ b/apps/dm/app/store/map/index.tsx
@@ -1,9 +1,9 @@
-import { getFetch } from "@/components/ui/api";
+import { fetchType, getFetch } from "@/components/ui/api";
import { DEV_URL_FO } from "@/components/ui/config";
import type { FacilityInfo, SubsInfo } from "./type";
const checkWrRegList = async () => {
- const wrRegList = await getFetch("wr", `/reuseFc/pubFc`);
+ const wrRegList = await getFetch(fetchType.WR, `/reuseFc/pubFc`);
return wrRegList;
};
diff --git a/apps/dm/app/store/wrStatus/index.tsx b/apps/dm/app/store/wrStatus/index.tsx
index 417bfab6c..10ef19216 100644
--- a/apps/dm/app/store/wrStatus/index.tsx
+++ b/apps/dm/app/store/wrStatus/index.tsx
@@ -1,12 +1,14 @@
-import { changeStatusMapData } from "@/app/common/comFunction";
import { fetchType, getFetch } from "@/components/ui/api";
import type {
DmStatusDataType,
DmStatusChartType,
+ DmStatusBoardType,
} from "./type";
+import type { SelectDataType } from "../common";
+import { makeRegion } from "@/app/common/comFunction";
export type DmStatusActions = {
- getDmStatusData(year: string): void;
+ getDmStatusData(cityCd: SelectDataType[]): void;
};
export type DmStatusType = {
@@ -28,32 +30,89 @@ export type DmStatusStore = DmStatusType & DmStatusActions;
export const DmStatusReducer = (set: any): DmStatusActions => {
return {
- getDmStatusData: async (year: string) => {
- const data = await getFetch(fetchType.WR, "/daemin/" + year);
- let isData:DmStatusDataType[] =[]
- if(data.data&&data.data.length>0){
- isData=data.data
- }else{
- fetch(`data/wrStatusData.json`).then((res) => res.json()).then((json) => isData=json)//만약 백엔드에서 못가져올경우 방어책
- }
+ getDmStatusData: async (cityCd: SelectDataType[]) => {
+ const data = await getFetch(fetchType.FO, "/dashBoard/daemin");
- const orgin: DmStatusDataType[] = isData;
- const chartData = changeStatusMapData(orgin);
+ const dataSum = data.data.reduce(
+ (acc: DmStatusDataType, item: DmStatusDataType) => {
+ acc.sewage = (
+ parseInt(acc.sewage.replaceAll(",", "")) +
+ parseInt(item.sewage.replaceAll(",", ""))
+ ).toLocaleString();
+ acc.rainwater = (
+ parseInt(acc.rainwater.replaceAll(",", "")) +
+ parseInt(item.rainwater.replaceAll(",", ""))
+ ).toLocaleString();
+ acc.reclaimed = (
+ parseInt(acc.reclaimed.replaceAll(",", "")) +
+ parseInt(item.reclaimed.replaceAll(",", ""))
+ ).toLocaleString();
+ acc.sewageCnt = (
+ parseInt(acc.sewageCnt.replaceAll(",", "")) +
+ parseInt(item.sewageCnt.replaceAll(",", ""))
+ ).toLocaleString();
+ acc.rainwaterCnt = (
+ parseInt(acc.rainwaterCnt.replaceAll(",", "")) +
+ parseInt(item.rainwaterCnt.replaceAll(",", ""))
+ ).toLocaleString();
+ acc.reclaimedCnt = (
+ parseInt(acc.reclaimedCnt.replaceAll(",", "")) +
+ parseInt(item.reclaimedCnt.replaceAll(",", ""))
+ ).toLocaleString();
+ return acc;
+ },
+ {
+ region: "합계",
+ sewage: "0",
+ rainwater: "0",
+ reclaimed: "0",
+ sewageCnt: "0",
+ rainwaterCnt: "0",
+ reclaimedCnt: "0",
+ }
+ );
+ data.data.unshift(dataSum);
+
+ console.log("dataSum ", dataSum);
const facilityTotals = [
- "하수재이용시설" + "(총" + orgin[0]?.sewage.split("(")[0] + "개소)",
- "빗물재이용시설" + "(총" + orgin[0]?.rainwater.split("(")[0] + "개소)",
- "중수도재이용시설" +
- "(총" +
- orgin[0]?.reclaimed.split("(")[0] +
- "개소)",
- "온배수재이용시설" + "(총" + orgin[0]?.thermal.split("(")[0] + "개소)",
+ "하수재이용시설" + "(총" + dataSum?.sewageCnt + "개소)",
+ "빗물재이용시설" + "(총" + dataSum?.rainwaterCnt + "개소)",
+ "중수도재이용시설" + "(총" + dataSum?.reclaimedCnt + "개소)",
];
+ const boardData: DmStatusBoardType[] = data.data.map(
+ (item: DmStatusDataType) => {
+ const regionText = cityCd.find((city) => item.region === city.val);
+ const sewage = item.sewage;
+ const rainwater = item.rainwater;
+ const reclaimed = item.reclaimed;
+ const sewageCnt = item.sewageCnt;
+ const rainwaterCnt = item.rainwaterCnt;
+ const reclaimedCnt = item.reclaimedCnt;
+
+ return {
+ region: regionText ? regionText.text : item.region,
+ sewage: sewageCnt + "(" + sewage + ")",
+ rainwater: rainwaterCnt + "(" + rainwater + ")",
+ reclaimed: reclaimedCnt + "(" + reclaimed + ")",
+ };
+ }
+ );
+
+ const chartData = data.data.map((item) => ({
+ label: makeRegion(
+ cityCd.find((city) => item.region === city.val)?.text ?? ""
+ ),
+ 하수: item.sewage,
+ 빗물: item.rainwater,
+ 중수도: item.reclaimed,
+ }));
+
set((state: DmStatusType) => ({
...state,
dmStatus: {
...state.dmStatus,
- statusData: data.data,
+ statusData: boardData,
chartData: chartData,
facilityTotals: facilityTotals,
},
diff --git a/apps/dm/app/store/wrStatus/type.ts b/apps/dm/app/store/wrStatus/type.ts
index 3e674227b..513a5fb01 100644
--- a/apps/dm/app/store/wrStatus/type.ts
+++ b/apps/dm/app/store/wrStatus/type.ts
@@ -3,9 +3,17 @@ export type DmStatusDataType = {
sewage: string;
rainwater: string;
reclaimed: string;
- thermal: string;
+ sewageCnt:string
+ rainwaterCnt:string
+ reclaimedCnt:string
};
+export type DmStatusBoardType = {
+ region: string;
+ sewage: string;
+ rainwater: string;
+ reclaimed: string;
+};
export type DmStatusFcltType = {
sewageFclt: string;
@@ -21,7 +29,6 @@ export type DmStatusChartType = {
하수: string,
빗물: string,
중수도: string,
- 온배수: string,
}
export type RegionData = {
diff --git a/apps/dm/components/ui/api/index.ts b/apps/dm/components/ui/api/index.ts
index 51d06e700..28644b00e 100644
--- a/apps/dm/components/ui/api/index.ts
+++ b/apps/dm/components/ui/api/index.ts
@@ -3,7 +3,8 @@ import { DEV_URL_FO, DEV_URL_WR } from "../config";
export const fetchType = {
COMMON: "common",
- WR: "wr"
+ WR: "wr",
+ FO:'fo'
};
interface RequestParams {
@@ -11,7 +12,7 @@ interface RequestParams {
}
export const getFetch = async (type: string, url: string) => {
- const baseUrl = type === fetchType.COMMON ? DEV_URL_FO : DEV_URL_WR;
+ const baseUrl = type === fetchType.FO ? DEV_URL_FO : DEV_URL_WR;
const response = await fetch(baseUrl + url, {
method: "GET",
headers: {
diff --git a/apps/fo/.env.production b/apps/fo/.env.production
index a1da344b8..fbc643258 100644
--- a/apps/fo/.env.production
+++ b/apps/fo/.env.production
@@ -15,11 +15,11 @@
NEXT_PUBLIC_SITE_ID = FO
NEXT_PUBLIC_PORT = 3000
-NEXT_PUBLIC_PROXY_HOST = https://fo.hasuon.or.kr
-# NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000
-NEXT_PUBLIC_SERVER_API_URL = https://fo.hasuon.or.kr/operation-service/api/v1
-NEXT_PUBLIC_FO_SERVER_API_URL = https://apigateway.hasuon.or.kr/operation-service/api/v1
-NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000
+NEXT_PUBLIC_PROXY_HOST = https://larva.hasuon.or.kr
+# NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
+NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/operation-service/api/v1
+NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/operation-service/api/v1
+NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
@@ -27,6 +27,6 @@ NEXT_PUBLIC_CLAIM_NAME = Authorization
NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
-NEXT_PUBLIC_WR_SERVER_API_URL = https://fo.hasuon.or.kr/reuse-service/api/v1
+NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
-NEXT_PUBLIC_SEWERAGE_API_URL = https://fo.hasuon.or.kr/sewerage-service/api
\ No newline at end of file
+NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api
\ No newline at end of file
diff --git a/apps/fo/app/components/common/CommaToNumber.tsx b/apps/fo/app/components/common/CommaToNumber.tsx
new file mode 100644
index 000000000..78bffe40d
--- /dev/null
+++ b/apps/fo/app/components/common/CommaToNumber.tsx
@@ -0,0 +1,4 @@
+export default function CommaToNumber (data: any){
+ const rtnValue = data&&data.toString().trim()!=''&&data!=undefined?Number(data.toString().replaceAll(',','')):'';
+ return rtnValue;
+}
\ No newline at end of file
diff --git a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx
index a09431598..77e4168ec 100644
--- a/apps/fo/app/pages/(with-layout)/dashboard/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/dashboard/page.tsx
@@ -159,7 +159,7 @@ export default function DashBoard() {
const excelData1 = planFcltyList.map((item) => {
return [
item.item,
- item.provisionalApproval,
+ Number(item.provisionalApproval.toString().replaceAll(',',''))?Number(item.provisionalApproval.toString().replaceAll(',','')):item.provisionalApproval,
item.now,
item.stepOne,
item.stepTwo,
@@ -171,23 +171,24 @@ export default function DashBoard() {
// operationalStatusList를 2차원 배열로 변환
const excelData2 = operationalStatusList.map((item, index) => {
const baseData = [
- item.yearAvg,
- item.yearMax,
- item.yearMin,
- item.summerAll,
- item.summerThree,
- item.summerRain,
- item.winterAll,
- item.winterSunnyAvg,
- item.winterSunnyMax,
- item.winterSunnyMin,
- item.groundWaterAvg,
- item.groundWaterSummer,
- item.groundWaterWinter
+ Number(item.yearAvg?.replaceAll(',','')),
+ Number(item.yearMax?.replaceAll(',','')),
+ Number(item.yearMin?.replaceAll(',','')),
+ Number(item.summerAll?.replaceAll(',','')),
+ Number(item.summerThree?.replaceAll(',','')),
+ Number(item.summerRain?.replaceAll(',','')),
+ Number(item.winterAll?.replaceAll(',','')),
+ Number(item.winterSunnyAvg?.replaceAll(',','')),
+ Number(item.winterSunnyMax?.replaceAll(',','')),
+ Number(item.winterSunnyMin?.replaceAll(',','')),
+ Number(item.groundWaterAvg?.replaceAll(',','').replaceAll('%','')),
+ Number(item.groundWaterSummer?.replaceAll(',','').replaceAll('%','')),
+ Number(item.groundWaterWinter?.replaceAll(',','').replaceAll('%',''))
];
// index가 0일 때만 rdi와 rdiRain 추가
- return index === 0 ? [...baseData, item.rdi, item.rdiRain] : baseData;
+ console.log(item.rdiRain);
+ return index === 0 ? [...baseData, item.rdi&&item.rdi.toString().trim()!=''?Number(item.rdi.toString().replaceAll(',','')):'', item.rdiRain&&item.rdiRain.toString().trim()!=''?Number(item.rdiRain.toString().replaceAll(',','')):''] : baseData;
});
const sheetParameter = [
diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx
index 948d05b1d..e76778d89 100644
--- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/modal/page.tsx
@@ -5,16 +5,17 @@
*/
"use client"
+import CommaToNumber from "@/app/components/common/CommaToNumber";
+import { roundNumber } from "@/app/components/common/DataForm";
+import UnderComment from "@/app/components/common/UnderComment";
import { useFoStore } from "@/app/store";
import type { FacilityWaterQltyProps, modalExcelType } from "@/app/store/facilityWaterQlty";
-import { downloadExcel, UITab, UiTable } from "@common/business_components/ui";
+import { downloadExcelFormat, UITab, UiTable } from "@common/business_components/ui";
import { Button, TabsContent } from "@common/components/ui";
import { useCallback, useEffect, useRef, useState } from "react";
import type { ReturnType } from "../../../../components/common/FacilityTermModalHeader";
import FacilityTermModalHeader from "../../../../components/common/FacilityTermModalHeader";
import { HeadMakeColSpan } from "../HeadMakeColSpan";
-import { roundNumber } from "@/app/components/common/DataForm";
-import UnderComment from "@/app/components/common/UnderComment";
const commentArrayChungchun = [
"청천시 : 강우량이 3mm미만의 날"
@@ -355,22 +356,29 @@ export default function WaterQualityModal({fcltyName='', facilityCd='', searchYe
copyYearList.forEach((item) => {
excelDownList.push({
날짜: item.msrDt,
- "유입BOD(mg/L)": item.inflAssctBfrWqltBod,
- "유입TOC(COD)(mg/L)": item.inflAssctBfrWqltToc,
- "유입SS(mg/L)": item.inflAssctBfrWqltSs,
- "유입TN(mg/L)": item.inflAssctBfrWqltTn,
- "유입TP(mg/L)": item.inflAssctBfrWqltTp,
- "유출BOD(mg/L)": item.efflWqltBod,
- "유출TOC(COD)(mg/L)": item.efflWqltToc,
- "유출SS(mg/L)": item.efflWqltSs,
- "유출TN(mg/L)": item.efflWqltTn,
- "유출TP(mg/L)": item.efflWqltTp,
-/* "강우량(mm/일)": item.infoRnDay?item.infoRnDay.toString():"0.0", */
+ "유입BOD(mg/L)": CommaToNumber(item.inflAssctBfrWqltBod),
+ "유입TOC(COD)(mg/L)": CommaToNumber(item.inflAssctBfrWqltToc),
+ "유입SS(mg/L)": CommaToNumber(item.inflAssctBfrWqltSs),
+ "유입TN(mg/L)": CommaToNumber(item.inflAssctBfrWqltTn),
+ "유입TP(mg/L)": CommaToNumber(item.inflAssctBfrWqltTp),
+ "유출BOD(mg/L)": CommaToNumber(item.efflWqltBod),
+ "유출TOC(COD)(mg/L)": CommaToNumber(item.efflWqltToc),
+ "유출SS(mg/L)": CommaToNumber(item.efflWqltSs),
+ "유출TN(mg/L)": CommaToNumber(item.efflWqltTn),
+ "유출TP(mg/L)": CommaToNumber(item.efflWqltTp),
+ "강우량(mm/일)": CommaToNumber(item.infoRnDay?item.infoRnDay.toString():"0.0"),
});
});
}
if (excelDownList && excelDownList.length > 0) {
- downloadExcel({ data: JSON.parse(JSON.stringify(excelDownList)), fileName: searchYear+'년 '+fcltyName + ' 수질현황', sheetNameArray: [fcltyName + ' 수질현황'], headerRange: 'A1:K1' });
+ downloadExcelFormat(
+ { data: JSON.parse(JSON.stringify(excelDownList))
+ , fileName: searchYear+'년 '+fcltyName + ' 수질현황'
+ , sheetNameArray: [fcltyName + ' 수질현황']
+ , headerRange: 'A1:L1'
+ , decimalArray1: [1,2,3,6,7,8,11]
+ , decimalArray3: [4,5,9,10]
+ });
} else if (prevExcelListRef.current && prevExcelListRef.current.length > 0) {
alert('다운받을 데이터가 없습니다.');
}
diff --git a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
index a188f60b9..a107dfd2a 100644
--- a/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/facilityWaterQlty/page.tsx
@@ -8,12 +8,12 @@
import { useFoStore } from "@/app/store";
import type { TableUpperProps } from "@/app/store/common";
-import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
+import type { FacilityWaterQltyProps } from "@/app/store/facilityWaterQlty";
+import { ContentsDiv, downloadExcelFormat, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
import ListDiv from "@common/business_components/ui/list_div";
+import LoadingOverlay from "@common/business_components/ui/loadingBar";
import { useCallback, useEffect, useRef, useState } from "react";
import WaterQualityModal from "./modal/page";
-import type { FacilityWaterQltyProps } from "@/app/store/facilityWaterQlty";
-import LoadingOverlay from "@common/business_components/ui/loadingBar";
export default function ProcessFacilitySearch() {
const { Common
@@ -144,12 +144,23 @@ export default function ProcessFacilitySearch() {
useEffect(() => {
if (excelList && excelList.length > 0) {
- downloadExcel({
+ downloadExcelFormat(
+ {
+ data: excelList as unknown as JSON[],
+ fileName: '시설별 수질현황',
+ sheetNameArray: ['시설별 수질현황'],
+ headerRange: 'A1:T1',
+ decimalArray1:[10,11,12,15,16,17],
+ decimalArray3:[13,14,18,19]
+ }
+ );
+
+ /* downloadExcel({
data: excelList as unknown as JSON[],
fileName: '시설별 수질현황',
sheetNameArray: ['시설별 수질현황'],
headerRange: 'A1:T1'
- });
+ }); */
}
}, [excelList]);
diff --git a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx
index 9f026430a..30b97c945 100644
--- a/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/flowRate/modal/page.tsx
@@ -15,6 +15,7 @@ import type { ReturnType } from "../../../../components/common/FacilityTermModal
import { roundUp } from "@/app/store/common";
import { roundNumber } from "@/app/components/common/DataForm";
import UnderComment from "@/app/components/common/UnderComment";
+import CommaToNumber from "@/app/components/common/CommaToNumber";
const tabList = [
{ value: 'tab_term_year', label: '연간' },
@@ -186,11 +187,11 @@ export default function FlowRateModal(props: { fcltyName: string; facilityCd: st
copyYearList.forEach((item) => {
excelDownList.push({
"날짜": item.msrDt,
- "총유입량(m³/일)": item.totInflAmnt,
- "하수유입량(m³/일)": item.inflAmnt,
- "연계처리량(m³/일)": item.sumFlow,
- "총인반류수량(m³/일)": item.returnAmnt,
- "방류량(m³/일)": item.efflAmnt,
+ "총유입량(m³/일)": CommaToNumber(item.totInflAmnt),
+ "하수유입량(m³/일)": CommaToNumber(item.inflAmnt),
+ "연계처리량(m³/일)": CommaToNumber(item.sumFlow),
+ "총인반류수량(m³/일)": CommaToNumber(item.returnAmnt),
+ "방류량(m³/일)": CommaToNumber(item.efflAmnt),
/* "강우량(mm/일)": item.infoRnDay, */
});
});
diff --git a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx
index 750395cbd..5b53f51a2 100644
--- a/apps/fo/app/pages/(with-layout)/flowRate/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/flowRate/page.tsx
@@ -7,12 +7,12 @@
"use client"
import { useFoStore } from "@/app/store";
import type { TableUpperProps } from "@/app/store/common";
-import { ContentsDiv, downloadExcel, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
+import type { ExcelType } from "@/app/store/flowRate";
+import { ContentsDiv, downloadExcelFormat, MainDiv, SearchBaseForm, SearchInput, SelectBox, Title, UiModal, UiTable, type ReturnType } from "@common/business_components";
import ListDiv from "@common/business_components/ui/list_div";
+import LoadingOverlay from "@common/business_components/ui/loadingBar";
import { useCallback, useEffect, useRef, useState } from "react";
import FlowRateModal from "./modal/page";
-import type { ExcelType } from "@/app/store/flowRate";
-import LoadingOverlay from "@common/business_components/ui/loadingBar";
export default function ProcessFacilitySearch() {
const {Common
@@ -140,7 +140,7 @@ export default function ProcessFacilitySearch() {
useEffect(() => {
if (excelList && excelList.length > 0) {
- downloadExcel({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1' });
+ downloadExcelFormat({ data: JSON.parse(JSON.stringify(excelList)), fileName: '시설별 유량현황', sheetNameArray: ['시설별 유량현황'], headerRange: 'A1:O1', decimalArray0: [9,10,11,12,13,14] });
} else if (prevExcelListRef.current && prevExcelListRef.current.length > 0) {
alert('다운받을 데이터가 없습니다.');
}
diff --git a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx
index 8362a46d9..7e3f7c52f 100644
--- a/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/processFacility/modal/page.tsx
@@ -5,10 +5,9 @@
*/
"use client"
-import { roundNumber } from "@/app/components/common/DataForm";
import { useFoStore } from "@/app/store";
import type { TableUpperProps } from "@/app/store/dashboard";
-import { downloadExcel, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui";
+import { downloadExcelFormat, filePickedBlobArray, UITab, UiTable } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import {
TabsContent
@@ -118,7 +117,7 @@ export default function ProcessFacilityInfoModal(props: ModalType) {
{ value: 'common_info', label: '기본정보' },
{ value: 'history_info', label: '이력정보' },
];
- const fctCpc = props.fctCpc ? props.fctCpc.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : '';
+ const fctCpc = props.fctCpc ? Number(props.fctCpc).toLocaleString() : '';
const upHeadListPlanInfoChange = headMakeList(upHeadListPlanInfo, 2);
const upHeadListFcltyHistInfoChange = headMakeList(upHeadListFcltyHistInfo, 3);
const upHeadListFcltyWaterQltyInfoChange = headMakeList(upHeadListFcltyWaterQltyInfo, 4);
@@ -137,12 +136,12 @@ export default function ProcessFacilityInfoModal(props: ModalType) {
"준공일": item.cmplDt,
"시운전완료일": item.trlrnCmplDt,
"가동개시일": item.rnDt,
- "시설용량(m³/일)": roundNumber(item.fctCpc,0),
+ "시설용량(m³/일)": item.fctCpc&&item.fctCpc.toString().trim()!=''?Number(item.fctCpc.toString().replaceAll(',','')):'',
});
});
}
if (excelDownList && excelDownList.length > 0) {
- downloadExcel({ data: JSON.parse(JSON.stringify(excelDownList)), fileName: props.fcltyName + ' 시설이력관리', sheetNameArray: [props.fcltyName + ' 시설이력관리'], headerRange: 'A1:I1' });
+ downloadExcelFormat({ data: JSON.parse(JSON.stringify(excelDownList)), fileName: props.fcltyName + ' 시설이력관리', sheetNameArray: [props.fcltyName + ' 시설이력관리'], headerRange: 'A1:I1' });
} else if (gridListFcltyHistInfo.length == 0) {
alert('다운받을 데이터가 없습니다.');
}
@@ -223,9 +222,9 @@ export default function ProcessFacilityInfoModal(props: ModalType) {
{'시설명'}
- {props.fcltyName}
- {'시설구분'}
- {props.bscFctClsNm}
+ {props.fcltyName}
+ {/* {'시설구분'}
+ {props.bscFctClsNm} */}
{'시설용량(m³/일)'}
{fctCpc}
diff --git a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx
index 0e9085cb4..e44420eaa 100644
--- a/apps/fo/app/pages/(with-layout)/processFacility/page.tsx
+++ b/apps/fo/app/pages/(with-layout)/processFacility/page.tsx
@@ -210,12 +210,13 @@ export default function ProcessFacilitySearch() {
const cellClick = (index: number) => {
const facility = processFacilityList[index];
if (facility) {
+ const fctCpc = String(facility.fctCpc).replace(/,/g, "").trim();
setModalFcltyNm(facility.bscFctNm);
setModalFcltyCd(facility.bscFctCd);
setModalSido(facility.sido);
setModalGugun(facility.gugun);
setModalAddr(facility.daddr);
- setModalFctCpc(Number(facility.fctCpc));
+ setModalFctCpc(Number(fctCpc));
setModalTrtFrfNm(facility.trtFrfNm);
setModalRnDt(facility.rnDt);
setModalCmplDt(facility.cmplDt);
diff --git a/apps/fo/app/store/dashboard/index.tsx b/apps/fo/app/store/dashboard/index.tsx
index 61f805ed5..906ce8e3b 100644
--- a/apps/fo/app/store/dashboard/index.tsx
+++ b/apps/fo/app/store/dashboard/index.tsx
@@ -53,9 +53,9 @@ export type planFcltyListProps = {
export type OperationalStatusListProps = {
flowRate : string,
waterQlty : string,
- yearAvg : number | string | '',
- yearMax : number | string | '',
- yearMin : number | string | '',
+ yearAvg : number | '',
+ yearMax : number | '',
+ yearMin : number | '',
summerAll : number | string | '',
summerThree : number | string | '',
summerRain : number | string | '',
@@ -1246,9 +1246,7 @@ const changeValue=(operationalStatus, data, keyTxt = 'INFL_AMNT')=>{
operationalStatus.winterSunnyAvg = data.winterSunny ? (keyTxt.includes('_TP') || keyTxt.includes("_TN"))? data.winterSunny?Number(Math.round(data.winterSunny["AVG_" + keyTxt] * 1000) / 1000).toFixed(3).toString():'': data.winterSunny["AVG_" + keyTxt] : '';
operationalStatus.winterSunnyMax = data.winterSunny ? (keyTxt.includes('_TP') || keyTxt.includes("_TN"))? data.winterSunny?Number(Math.round(data.winterSunny["MAX_" + keyTxt] * 1000) / 1000).toFixed(3).toString():'': data.winterSunny["MAX_" + keyTxt] : '';
// 지하수
- operationalStatus.groundWaterAvg = 10;
- operationalStatus.groundWaterSummer = 11;
- operationalStatus.groundWaterWinter = 12;
+
// 오염물질
// RDII 추정 = 하절기(6~8월) 중 최저 유입 BOD일때 유입유량 x ((동절기 청천시 유입BOD - 하절기(6~8월) 중 최저 유입BOD) / (동절기 청천시 유입BOD))
const summerLowFlow = data.summerBod && data.summerBod.INFL_AMNT && data.summerBod.INFL_AMNT != 'null' ? Number(data.summerBod.INFL_AMNT) : 0;
diff --git a/apps/fo/app/store/facilityWaterQlty/index.tsx b/apps/fo/app/store/facilityWaterQlty/index.tsx
index c60f72cd2..d0ddc6090 100644
--- a/apps/fo/app/store/facilityWaterQlty/index.tsx
+++ b/apps/fo/app/store/facilityWaterQlty/index.tsx
@@ -3,6 +3,7 @@ import DataForm, { roundNumber } from "@/app/components/common/DataForm";
import type { TableUpperProps } from "../dashboard";
import CalcRainEffect from "@/app/components/common/CalcRainEffect";
import { COD_YEAR } from "../common";
+import CommaToNumber from "@/app/components/common/CommaToNumber";
export type { TableUpperProps };
/**====================================
@@ -70,17 +71,17 @@ export interface ExcelType {
시군구: string,
시설이름: string,
주소: string,
- "시설용량(m³/일)": number,
- "유입BOD(mg/L)": string | '',
- "유입TOC(mg/L)": string | '',
- "유입SS(mg/L)": string | '',
- "유입TN(mg/L)": string | '',
- "유입TP(mg/L)": string | '',
- "유출BOD(mg/L)": string | '',
- "유출TOC(mg/L)": string | '',
- "유출SS(mg/L)": string | '',
- "유출TN(mg/L)": string | '',
- "유출TP(mg/L)": string | '',
+ "시설용량(m³/일)": number | '',
+ "유입BOD(mg/L)": number | '',
+ "유입TOC(mg/L)": number | '',
+ "유입SS(mg/L)": number | '',
+ "유입TN(mg/L)": number | '',
+ "유입TP(mg/L)": number | '',
+ "유출BOD(mg/L)": number | '',
+ "유출TOC(mg/L)": number | '',
+ "유출SS(mg/L)": number | '',
+ "유출TN(mg/L)": number | '',
+ "유출TP(mg/L)": number | '',
}
/**
@@ -104,17 +105,17 @@ export interface WaterQualityHistoryResponse {
export type modalExcelType = {
날짜: string;
- "유입BOD(mg/L)": string;
- "유입TOC(COD)(mg/L)": string;
- "유입SS(mg/L)": string;
- "유입TN(mg/L)": string;
- "유입TP(mg/L)": string;
- "유출BOD(mg/L)": string;
- "유출TOC(COD)(mg/L)": string;
- "유출SS(mg/L)": string;
- "유출TN(mg/L)": string;
- "유출TP(mg/L)": string;
- /* "강우량(mm/일)": string; */
+ "유입BOD(mg/L)": number | '';
+ "유입TOC(COD)(mg/L)": number | '';
+ "유입SS(mg/L)": number | '';
+ "유입TN(mg/L)": number | '';
+ "유입TP(mg/L)": number | '';
+ "유출BOD(mg/L)": number | '';
+ "유출TOC(COD)(mg/L)": number | '';
+ "유출SS(mg/L)": number | '';
+ "유출TN(mg/L)": number | '';
+ "유출TP(mg/L)": number | '';
+ "강우량(mm/일)": number | '';
}
/**====================================
@@ -486,17 +487,17 @@ export const facilityWaterQltyReducer = (set: (fn: (state: FacilityWaterQltyType
시군구: item.sggNm,
시설이름: item.bscFctNm,
주소: item.addr,
- "시설용량(m³/일)": item.fctCpc,
- "유입BOD(mg/L)": item.inflAssctBfrWqltBod,
- "유입TOC(mg/L)": item.inflAssctBfrWqltToc,
- "유입SS(mg/L)": item.inflAssctBfrWqltSs,
- "유입TN(mg/L)": item.inflAssctBfrWqltTn,
- "유입TP(mg/L)": item.inflAssctBfrWqltTp,
- "유출BOD(mg/L)": item.efflWqltBod,
- "유출TOC(mg/L)": item.efflWqltToc,
- "유출SS(mg/L)": item.efflWqltSs,
- "유출TN(mg/L)": item.efflWqltTn,
- "유출TP(mg/L)": item.efflWqltTp,
+ "시설용량(m³/일)": CommaToNumber(item.fctCpc),
+ "유입BOD(mg/L)": CommaToNumber(item.inflAssctBfrWqltBod),
+ "유입TOC(mg/L)": CommaToNumber(item.inflAssctBfrWqltToc),
+ "유입SS(mg/L)": CommaToNumber(item.inflAssctBfrWqltSs),
+ "유입TN(mg/L)": CommaToNumber(item.inflAssctBfrWqltTn),
+ "유입TP(mg/L)": CommaToNumber(item.inflAssctBfrWqltTp),
+ "유출BOD(mg/L)": CommaToNumber(item.efflWqltBod),
+ "유출TOC(mg/L)": CommaToNumber(item.efflWqltToc),
+ "유출SS(mg/L)": CommaToNumber(item.efflWqltSs),
+ "유출TN(mg/L)": CommaToNumber(item.efflWqltTn),
+ "유출TP(mg/L)": CommaToNumber(item.efflWqltTp),
});
});
}else{
diff --git a/apps/fo/app/store/flowRate/index.tsx b/apps/fo/app/store/flowRate/index.tsx
index ab9100d09..05a41e556 100644
--- a/apps/fo/app/store/flowRate/index.tsx
+++ b/apps/fo/app/store/flowRate/index.tsx
@@ -3,6 +3,7 @@ import type { TableUpperProps } from "../dashboard";
import DataForm, { roundNumber } from "@/app/components/common/DataForm";
import CalcRainEffect from "@/app/components/common/CalcRainEffect";
import { fetchFacilityWaterQltyListHist } from "../facilityWaterQlty";
+import CommaToNumber from "@/app/components/common/CommaToNumber";
/**====================================
* Store - 타입
@@ -300,11 +301,11 @@ export const flowRateSearchReducer:(set:(fn: (state: FlowRateSearchType) => Flow
시설이름: item.bscFctNm,
주소: item.daddr,
"시설용량(m³/일)": item.fctCpc,
- "총유입량(m³/일)": item.totInflAmnt,
- "하수유입량(m³/일)": item.inflAmnt,
- "연계처리량(m³/일)": item.sumFlow,
- "총인반류수량(m³/일)": item.returnAmnt,
- "방류량(m³/일)": item.efflAmnt,
+ "총유입량(m³/일)": CommaToNumber(item.totInflAmnt),
+ "하수유입량(m³/일)": CommaToNumber(item.inflAmnt),
+ "연계처리량(m³/일)": CommaToNumber(item.sumFlow),
+ "총인반류수량(m³/일)": CommaToNumber(item.returnAmnt),
+ "방류량(m³/일)": CommaToNumber(item.efflAmnt),
});
});
}
diff --git a/apps/sn/.env.production b/apps/sn/.env.production
index 66bae242d..c978045fd 100644
--- a/apps/sn/.env.production
+++ b/apps/sn/.env.production
@@ -4,7 +4,7 @@ NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
NEXT_PUBLIC_PORT = 3000
-NEXT_PUBLIC_PROXY_HOST = https://sn.hasuon.or.kr
+NEXT_PUBLIC_PROXY_HOST = https://lion.hasuon.or.kr
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC
diff --git a/apps/wr/.env.production b/apps/wr/.env.production
index e5900440f..67ff9784b 100644
--- a/apps/wr/.env.production
+++ b/apps/wr/.env.production
@@ -1,9 +1,9 @@
NEXT_PUBLIC_SITE_ID = WR
NEXT_PUBLIC_PORT = 3000
-NEXT_PUBLIC_PROXY_HOST = http://wr.hasuon.or.kr
-NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000
-NEXT_PUBLIC_FO_SERVER_API_URL = https://wr.hasuon.or.kr/operation-service/api/v1
-NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000
+NEXT_PUBLIC_PROXY_HOST = https://tiger.hasuon.or.kr
+NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
+NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/operation-service/api/v1
+NEXT_PUBLIC_CS_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
NEXT_PUBLIC_GEOSERVER_URL = http://172.29.143.87:8080/geoserver
NEXT_PUBLIC_LX_GEOSERVER_URL = http://172.29.143.87:8080/geoserver_swl
@@ -11,13 +11,9 @@ NEXT_PUBLIC_CLAIM_NAME = Authorization
NEXT_PUBLIC_AUTH_USER_ID = token-id
NEXT_PUBLIC_ACCESS_TOKEN = access-token
NEXT_PUBLIC_REFRESH_TOKEN = refresh-token
-NEXT_PUBLIC_WR_SERVER_API_URL = https://wr.hasuon.or.kr/reuse-service/api/v1
-NEXT_PUBLIC_SEWERAGE_API_URL = https://wr.hasuon.or.kr/sewerage-service/api
+NEXT_PUBLIC_WR_SERVER_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/reuse-service/api/v1
+NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-was.svc.cluster.local:8000/sewerage-service/api
NEXT_PUBLIC_NGII_URL = http://10.98.25.94:18080/openapi/Gettile.do?apiKey=BDE2BEF39DAFEC293AB6730150F222AC
-#NEXT_PUBLIC_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/api/v1
-#NEXT_PUBLIC_FO_SERVER_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/operation-service/api/v1
-#NEXT_PUBLIC_GEOSERVER_URL = https://hasudo.geo.rsonesoft.com/geoserver
-#NEXT_PUBLIC_SEWERAGE_API_URL = http://apigateway.iipbs-dev.svc.cluster.local:8000/sewerage-service/api
NEXT_PUBLIC_FINDADRESS_URL=https://business.juso.go.kr/addrlink/addrLinkApi.do
diff --git a/apps/wr/app/(with-layout)/drgtSttn/page.tsx b/apps/wr/app/(with-layout)/matMng/coMng/drgtSttn/page.tsx
similarity index 100%
rename from apps/wr/app/(with-layout)/drgtSttn/page.tsx
rename to apps/wr/app/(with-layout)/matMng/coMng/drgtSttn/page.tsx
diff --git a/packages/common/business_components/src/ui/excel/index.tsx b/packages/common/business_components/src/ui/excel/index.tsx
index cbe77293b..aedb32256 100644
--- a/packages/common/business_components/src/ui/excel/index.tsx
+++ b/packages/common/business_components/src/ui/excel/index.tsx
@@ -6,6 +6,10 @@ type ExcelDownloadProps = {
fileName: string;
sheetNameArray: string[];
headerRange?: string;
+ decimalArray0? : number[];
+ decimalArray1? : number[];
+ decimalArray2? : number[];
+ decimalArray3? : number[];
}
export const downloadExcel = ({ data, fileName = new Date().getTime().toString() + '.xlsx', sheetNameArray = ["Sheet1"], headerRange='A1:V3'}: ExcelDownloadProps) => {
@@ -15,6 +19,45 @@ export const downloadExcel = ({ data, fileName = new Date().getTime().toString()
excelStyle(XLSX.write(workbook, { bookType: "xlsx", type: "buffer" }), headerRange, fileName);
};
+export const downloadExcelFormat = ({ data, fileName = new Date().getTime().toString() + '.xlsx', sheetNameArray = ["Sheet1"], headerRange='A1:V3', decimalArray0=[], decimalArray1=[], decimalArray2=[], decimalArray3=[]}: ExcelDownloadProps) => {
+ const worksheet = XLSX.utils.json_to_sheet(Array.isArray(data) ? data : [data]);
+ const workbook = XLSX.utils.book_new();
+ XLSX.utils.book_append_sheet(workbook, worksheet, sheetNameArray[0]);
+ console.log('decimalArray0 : ', decimalArray0);
+ const headerEnd = XLSX.utils.decode_range(headerRange).e.r; // 0-based index
+ const startRow = headerEnd + 1;
+
+ // 🔹 전체 범위
+ const range = XLSX.utils.decode_range(worksheet["!ref"] as string);
+
+ const chaneValue = (array: number[], decimal: number) => {
+ for (let row = startRow; row <= range.e.r; row++) {
+ if(array.length>0){
+ for(let idx=0; idx