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/TLargeVolunteerController.java |   51 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeVolunteerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeVolunteerController.java
index 7dda67b..53d93c0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeVolunteerController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TLargeVolunteerController.java
@@ -200,32 +200,39 @@
         for (LargeVolunteerImport largeVolunteerImport : largeVolunteerImports) {
             if (!StringUtils.hasLength(largeVolunteerImport.getUserName())){
                 result.append("第"+i+"行:[", "姓名"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeVolunteerImport.getUserSexStr())){
                 result.append("第"+i+"行:[", "性别"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeVolunteerImport.getBirthDateStr())){
                 result.append("第"+i+"行:[", "出生日期"+"]不能为空");
+                i++;
                 continue;
             }
             if (!StringUtils.hasLength(largeVolunteerImport.getServiceArea())){
                 result.append("第"+i+"行:[", "服务区域"+"]不能为空");
+                i++;
                 continue;
             }
-            if (!StringUtils.hasLength(largeVolunteerImport.getRegisterDateStr())){
-                result.append("第"+i+"行:[", "注册日期"+"]不能为空");
-                continue;
-            }
+//            if (!StringUtils.hasLength(largeVolunteerImport.getRegisterDateStr())){
+//                result.append("第"+i+"行:[", "注册日期"+"]不能为空");
+//                i++;
+//                continue;
+//            }
             if (Objects.isNull(largeVolunteerImport.getTotalServiceDuration())){
                 result.append("第"+i+"行:[", "总服务时长"+"]不能为空");
+                i++;
                 continue;
             }
-            if (!StringUtils.hasLength(largeVolunteerImport.getJoinTeamDateStr())){
-                result.append("第"+i+"行:[", "加入队伍时间"+"]不能为空");
-                continue;
-            }
+//            if (!StringUtils.hasLength(largeVolunteerImport.getJoinTeamDateStr())){
+//                result.append("第"+i+"行:[", "加入队伍时间"+"]不能为空");
+//                i++;
+//                continue;
+//            }
             TLargeVolunteer largeVolunteer = new TLargeVolunteer();
             BeanUtils.copyProperties(largeVolunteerImport, largeVolunteer);
 
@@ -238,26 +245,30 @@
                     break;
                 default:
                     result.append("第"+i+"行:[", "性别"+"]格式错误");
+                    i++;
                     continue;
             }
             try{
                 largeVolunteer.setBirthDate(DateUtils.stringToLocalDate(largeVolunteerImport.getBirthDateStr()));
             }catch (Exception e){
                 result.append("第"+i+"行:[", "出生日期"+"]格式错误");
+                i++;
                 continue;
             }
-            try{
-                largeVolunteer.setRegisterDate(DateUtils.stringToLocalDateTime(largeVolunteerImport.getRegisterDateStr()));
-            }catch (Exception e){
-                result.append("第"+i+"行:[", "注册日期"+"]格式错误");
-                continue;
-            }
-            try{
-                largeVolunteer.setJoinTeamDate(DateUtils.stringToLocalDateTime(largeVolunteerImport.getJoinTeamDateStr()));
-            }catch (Exception e){
-                result.append("第"+i+"行:[", "加入队伍时间"+"]格式错误");
-                continue;
-            }
+//            try{
+//                largeVolunteer.setRegisterDate(DateUtils.stringToLocalDateTime(largeVolunteerImport.getRegisterDateStr()));
+//            }catch (Exception e){
+//                result.append("第"+i+"行:[", "注册日期"+"]格式错误");
+//                i++;
+//                continue;
+//            }
+//            try{
+//                largeVolunteer.setJoinTeamDate(DateUtils.stringToLocalDateTime(largeVolunteerImport.getJoinTeamDateStr()));
+//            }catch (Exception e){
+//                result.append("第"+i+"行:[", "加入队伍时间"+"]格式错误");
+//                i++;
+//                continue;
+//            }
             largeVolunteers.add(largeVolunteer);
             i++;
         }

--
Gitblit v1.7.1