From 48a2255bfc45ffcfb0b39ffefdd57cbacf8b36df Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 18 Jul 2025 07:52:02 +0000 Subject: (대표님) 파일관리변경, 클라IP추적, 실시간알림, 미들웨어변경, 알림API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/sedp/get-form-tags.ts | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'lib/sedp') diff --git a/lib/sedp/get-form-tags.ts b/lib/sedp/get-form-tags.ts index f307d54a..d37b1890 100644 --- a/lib/sedp/get-form-tags.ts +++ b/lib/sedp/get-form-tags.ts @@ -13,7 +13,7 @@ import { } from "@/db/schema"; import { eq, and, like, inArray } from "drizzle-orm"; import { getSEDPToken } from "./sedp-token"; -import { getFormMappingsByTagType } from "../tags/form-mapping-service"; +import { getFormMappingsByTagTypebyProeject } from "../tags/form-mapping-service"; interface Attribute { @@ -153,17 +153,15 @@ export async function importTagsFromSEDP( } // 태그 타입에 따른 폼 정보 가져오기 - const allFormMappings = await getFormMappingsByTagType( - tagTypeDescription, + const allFormMappings = await getFormMappingsByTagTypebyProeject( projectId, - tagClassLabel ); // ep가 "IMEP"인 것만 필터링 - const formMappings = allFormMappings?.filter(mapping => mapping.ep === "IMEP") || []; + // const formMappings = allFormMappings?.filter(mapping => mapping.ep === "IMEP") || []; // 현재 formCode와 일치하는 매핑 찾기 - const targetFormMapping = formMappings.find(mapping => mapping.formCode === formCode); + const targetFormMapping = allFormMappings.find(mapping => mapping.formCode === formCode); if (targetFormMapping) { console.log(`[IMPORT TAGS] Found IMEP form mapping for ${formCode}, creating form...`); @@ -246,17 +244,15 @@ export async function importTagsFromSEDP( } // form mapping 정보 가져오기 - const allFormMappings = await getFormMappingsByTagType( - tagTypeDescription, + const allFormMappings = await getFormMappingsByTagTypebyProeject( projectId, - tagClassLabel ); // ep가 "IMEP"인 것만 필터링 - const formMappings = allFormMappings?.filter(mapping => mapping.ep === "IMEP") || []; + // const formMappings = allFormMappings?.filter(mapping => mapping.ep === "IMEP") || []; // 현재 formCode와 일치하는 매핑 찾기 - const targetFormMapping = formMappings.find(mapping => mapping.formCode === formCode); + const targetFormMapping = allFormMappings.find(mapping => mapping.formCode === formCode); if (targetFormMapping) { targetImValue = targetFormMapping.ep === "IMEP"; -- cgit v1.2.3