From 90e2fa776f8a69055bddd159f9e84e7f70a11c8d Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期一, 02 三月 2026 09:54:39 +0800
Subject: [PATCH] bug处理

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java
index 593fb50..3c0c061 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeResourceController.java
@@ -201,38 +201,47 @@
         for (LargeResourceImport largeResourceImport : largeResourceImports) {
             if (!StringUtils.hasLength(largeResourceImport.getTypeParentName())){
                 result.append("第"+i+"行:[", "一级类型名称"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getTypeChildrenName())){
                 result.append("第"+i+"行:[", "二级类型名称"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getResourceUnit())){
                 result.append("第"+i+"行:[", "资源单位"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getResourceNameDesc())){
                 result.append("第"+i+"行:[", "资源名称描述"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getResourceSource())){
                 result.append("第"+i+"行:[", "资源来源"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getQuantityScale())){
                 result.append("第"+i+"行:[", "数量规模"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getContactPerson())){
                 result.append("第"+i+"行:[", "联系人"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeResourceImport.getContactNumber())){
                 result.append("第"+i+"行:[", "联系电话"+"]不能为空");
+                i++;
                 continue;
             }
-            if (largeResourceImport.getContactNumber().matches("^1[3-9]\\\\d{9}$")){
+            if (!largeResourceImport.getContactNumber().matches("^$|^1[3-9]\\d{9}$")){
                 result.append("第"+i+"行:[", "联系电话"+"]格式不正确");
+                i++;
                 continue;
             }
             TLargeResource largeResource = new TLargeResource();
@@ -243,6 +252,7 @@
                     .last("LIMIT 1"));
             if(Objects.isNull(parent)){
                 result.append("第"+i+"行:[", "一级类型名称"+"]不存在");
+                i++;
                 continue;
             }
             largeResource.setTypeParentId(parent.getId());
@@ -252,6 +262,7 @@
                     .last("LIMIT 1"));
             if(Objects.isNull(children)){
                 result.append("第"+i+"行:[", "二级类型名称"+"]不存在");
+                i++;
                 continue;
             }
             largeResource.setTypeChildrenId(children.getId());

--
Gitblit v1.7.1