summaryrefslogtreecommitdiff
path: root/lib/items-tech/table/top/import-item-handler.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-05-26 04:25:47 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-05-26 04:25:47 +0000
commit1c1c1019b6af72771358d387a2ae70ca965cd9f9 (patch)
tree6b1204684e7b52cf7d40de37b9c58decc4fac38b /lib/items-tech/table/top/import-item-handler.tsx
parent0547ab2fe1701d84753d0e078bba718a79b07a0c (diff)
(김준회) 아이템 리스트를 자재그룹으로 변경하고 PLM 인터페이스 처리
Diffstat (limited to 'lib/items-tech/table/top/import-item-handler.tsx')
-rw-r--r--lib/items-tech/table/top/import-item-handler.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/items-tech/table/top/import-item-handler.tsx b/lib/items-tech/table/top/import-item-handler.tsx
index d6b81964..e2564a91 100644
--- a/lib/items-tech/table/top/import-item-handler.tsx
+++ b/lib/items-tech/table/top/import-item-handler.tsx
@@ -61,6 +61,7 @@ export async function processTopFileImport(
try {
// 필드 매핑 (한글/영문 필드명 모두 지원)
const itemCode = row["아이템 코드"] || row["itemCode"] || "";
+ const itemName = row["아이템 명"] || row["itemName"] || "기술영업"; // 기본값 설정
const workType = row["기능(공종)"] || row["workType"] || "";
const itemList = row["아이템 리스트"] || row["itemList"] || null;
const subItemList = row["서브 아이템 리스트"] || row["subItemList"] || null;
@@ -68,6 +69,7 @@ export async function processTopFileImport(
// 데이터 정제
const cleanedRow = {
itemCode: typeof itemCode === 'string' ? itemCode.trim() : String(itemCode).trim(),
+ itemName: typeof itemName === 'string' ? itemName.trim() : String(itemName).trim(),
workType: typeof workType === 'string' ? workType.trim() : String(workType).trim(),
itemList: itemList ? (typeof itemList === 'string' ? itemList : String(itemList)) : null,
subItemList: subItemList ? (typeof subItemList === 'string' ? subItemList : String(subItemList)) : null,
@@ -89,7 +91,7 @@ export async function processTopFileImport(
// 해양 TOP 아이템 생성
const result = await createOffshoreTopItem({
itemCode: cleanedRow.itemCode,
- itemName: "기술영업", // 기본값 사용
+ itemName: cleanedRow.itemName, // Excel에서 가져온 값 또는 기본값 사용
workType: cleanedRow.workType as "TM" | "TS" | "TE" | "TP",
description: null,
itemList: cleanedRow.itemList,