From f373bbf83d9d2a7e5f96118d7dcd658c9fea8bc8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 14 八月 2025 17:27:44 +0800
Subject: [PATCH] 2025.8.14 1. 新增文件导入场景信息接口 2. 新增导出接口文档接口

---
 src/main/kotlin/cn/flightfeather/supervision/common/utils/ExcelUtil.kt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/ExcelUtil.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/ExcelUtil.kt
index fc653ac..abfda36 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/common/utils/ExcelUtil.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/ExcelUtil.kt
@@ -36,6 +36,7 @@
     class MyHeader(
         var name: String,
         val type: CellType,
+        val ignore: Boolean = false
     )
 
     private fun cellTypeName(type: CellType): String = when (type) {
@@ -74,8 +75,8 @@
         iterator.forEach {
             // 妫�鏌ュ綋鍓嶈姣忎釜鍗曞厓鏍肩被鍨嬫槸鍚︿笌琛ㄥご瀹氫箟鍖归厤
             headers.forEachIndexed { i, h ->
-                val t = it.getCell(i + 1).cellType
-                if (t != CellType.BLANK || t != h.type) {
+                val t = it.getCell(i)?.cellType ?: CellType.BLANK
+                if (t != CellType.BLANK && !h.ignore && t != h.type) {
                     throw BizException("绗�${it.rowNum + 1}琛岋紝绗�${i + 1}鍒楀崟鍏冩牸鏍煎紡閿欒锛屽簲璇ヤ负${cellTypeName(h.type)}")
                 }
             }

--
Gitblit v1.9.3