From 66db81071e0b5bd158952941a8ffd34200935e3e Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 8 Jun 2026 09:06:58 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20=EB=B9=8C=EB=93=9C=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/api/common-codes/route.ts | 3 ++- apps/wr/app/store/map/pbnstMap/index.tsx | 10 ++++++---- apps/wr/app/store/store.tsx | 9 +-------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/apps/wr/app/api/common-codes/route.ts b/apps/wr/app/api/common-codes/route.ts index ded38eadf..aa62b261b 100644 --- a/apps/wr/app/api/common-codes/route.ts +++ b/apps/wr/app/api/common-codes/route.ts @@ -1,7 +1,8 @@ +export const dynamic = "force-dynamic"; import { SITE_ID } from "@/src/shared/config"; import { NextResponse } from "next/server"; -export const revalidate = 60 * 60 * 24; +export const revalidate = 86400; //60 * 60 * 24; type SelectDataType = { text: string; diff --git a/apps/wr/app/store/map/pbnstMap/index.tsx b/apps/wr/app/store/map/pbnstMap/index.tsx index 18f9abfe2..80eb2697a 100644 --- a/apps/wr/app/store/map/pbnstMap/index.tsx +++ b/apps/wr/app/store/map/pbnstMap/index.tsx @@ -9,13 +9,15 @@ import { excelHasuMapParsing } from "./excel"; export const pbnMapTableSize = 20; const hasuListFetch = async ( + get: any, + set: any, page: number, pageTotal: number, reurnValue: ReturnType, searchNm?: string ) => { let url = `/prcsFclt/ruseInfo/${page}/${pageTotal}/`; - const checkWrRegListRes = await checkWrRegList(); + const checkWrRegListRes = await checkWrRegList(get, set); if (reurnValue.partValue === "A") { url += `${reurnValue.partValue}/${ @@ -92,7 +94,7 @@ export const pbnMapStateExport: pbnMapState = { }, }; -export const pbnMapActionsExport: (set: any) => pbnMapActions = (set: any) => { +export const pbnMapActionsExport: (set: any, get: any) => pbnMapActions = (set: any, get: any) => { return { pbnMapInit: async ( page: number, @@ -100,7 +102,7 @@ export const pbnMapActionsExport: (set: any) => pbnMapActions = (set: any) => { reurnValue: ReturnType ) => { try { - const pubMapRes = await hasuListFetch(page, pageTotal, reurnValue); + const pubMapRes = await hasuListFetch(get, set, page, pageTotal, reurnValue); set((state: pbnMapState) => { return { ...state, @@ -144,7 +146,7 @@ export const pbnMapActionsExport: (set: any) => pbnMapActions = (set: any) => { txt: string, ) => { try { - const hasuMapRes = await hasuListFetch(page, pageTotal, reurnValue, txt); + const hasuMapRes = await hasuListFetch(get, set, page, pageTotal, reurnValue, txt); if (isExcel) { const hasuMapExcelList = excelHasuMapParsing( hasuMapRes diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index c90fc18bf..268be198b 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -2,13 +2,6 @@ import { createStore } from "zustand/vanilla"; import { codeActionExport, comCodeStateExport, - getCityCd, - getCommonUpCd, - getEnvPartCd, - getMiddleRegionCd, - getRegionCd, - getSggCd, - getUnitWaterShedCd, type comCodeState, type comCodeType, } from "./common/code"; @@ -373,7 +366,7 @@ export const StoreZus = ( ...rswtStatActionsExport(set), ...authActionsExport(set,get), ...commonMapActionsExport(set), - ...pbnMapActionsExport(set), + ...pbnMapActionsExport(set, get), ...rainMapActionsExport(set), ...rswtMapActionsExport(set), ...htdfMapActionsExport(set),