溪鸭夏 2 лет назад
Родитель
Сommit
db64bed533

+ 20 - 26
.idea/workspace.xml

@@ -31,8 +31,8 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="132">
-              <caret line="976" column="5" selection-start-line="976" selection-start-column="5" selection-end-line="976" selection-end-column="5" />
+            <state relative-caret-position="226">
+              <caret line="318" column="28" selection-start-line="318" selection-start-column="28" selection-end-line="318" selection-end-column="28" />
               <folding>
                 <element signature="imports" expanded="true" />
               </folding>
@@ -71,9 +71,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>false</find>
-      <find>classData</find>
-      <find>currentYear</find>
       <find>getSmartGrades</find>
       <find>加</find>
       <find>LocalDate</find>
@@ -101,6 +98,9 @@
       <find>导入</find>
       <find>希沃新增</find>
       <find>queryDepartmentTree</find>
+      <find>address</find>
+      <find>readXlsx</find>
+      <find>希沃新增编辑学生家长信息</find>
     </findStrings>
     <replaceStrings>
       <replace />
@@ -161,7 +161,7 @@
   <component name="MavenRunner">
     <option name="skipTests" value="true" />
   </component>
-  <component name="ProjectFrameBounds" extendedState="6">
+  <component name="ProjectFrameBounds">
     <option name="x" value="-7" />
     <option name="width" value="974" />
     <option name="height" value="1039" />
@@ -355,15 +355,15 @@
       <option name="number" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1712903307839</updated>
-      <workItem from="1712903309092" duration="34761000" />
+      <workItem from="1712903309092" duration="37536000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="34761000" />
+    <option name="totallyTimeSpent" value="37536000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-8" y="-8" width="1936" height="1048" extended-state="6" />
+    <frame x="-7" y="0" width="974" height="1039" extended-state="0" />
     <editor active="true" />
     <layout>
       <window_info id="JRebel" side_tool="true" />
@@ -373,7 +373,7 @@
       <window_info id="Favorites" side_tool="true" />
       <window_info id="Designer" />
       <window_info id="Web" side_tool="true" />
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.0858209" />
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.1761488" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info anchor="bottom" id="Spring" weight="0.32932165" />
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
@@ -387,12 +387,12 @@
       <window_info anchor="bottom" id="JRebel Console" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" weight="0.32932165" />
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.45076588" />
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.8293217" />
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.45414364" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.20568928" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" />
-      <window_info anchor="right" id="Maven" weight="0.66630197" />
+      <window_info anchor="right" id="Maven" weight="0.85667396" />
       <window_info anchor="right" id="Palette" />
       <window_info anchor="right" id="Capture Analysis" />
       <window_info anchor="right" id="Database" />
@@ -443,33 +443,27 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>1044</line>
+          <line>1042</line>
           <properties />
           <option name="timeStamp" value="14" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>693</line>
-          <properties />
-          <option name="timeStamp" value="28" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" type="java-line">
-          <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>2756</line>
+          <line>2754</line>
           <properties />
           <option name="timeStamp" value="29" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>2848</line>
+          <line>2846</line>
           <properties />
           <option name="timeStamp" value="31" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>669</line>
+          <line>308</line>
           <properties />
-          <option name="timeStamp" value="32" />
+          <option name="timeStamp" value="45" />
         </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
@@ -830,8 +824,8 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="132">
-          <caret line="976" column="5" selection-start-line="976" selection-start-column="5" selection-end-line="976" selection-end-column="5" />
+        <state relative-caret-position="226">
+          <caret line="318" column="28" selection-start-line="318" selection-start-column="28" selection-end-line="318" selection-end-column="28" />
           <folding>
             <element signature="imports" expanded="true" />
           </folding>

+ 7 - 9
src/main/java/com/template/controller/SmartUserController.java

@@ -283,7 +283,7 @@ public class SmartUserController implements SmartUserControllerAPI {
                     ParentServiceBatchSaveOrUpdateParentsParam.StudentParentsItem students = ParentServiceBatchSaveOrUpdateParentsParam.StudentParentsItem.builder()
                             .studentCode(student.getCardNo())
                             .build();
-                    studentParents.add(students);
+
 
                     List<SmartUser> parentDatas = result.stream().filter(e -> e.getIdentityId().intValue() == eIdentityStatu.Parent.getValue() && e.getAffiliate().equals(student.getCardNo())).collect(Collectors.toList());
                     List<ParentServiceBatchSaveOrUpdateParentsParam.ParentsItem> parents = new ArrayList<>();
@@ -297,8 +297,12 @@ public class SmartUserController implements SmartUserControllerAPI {
                         parents.add(data);
                         ++i;
                     }
-                    //家长列表,最多4个
-                    students.setParents(parents);
+
+                    if(parents != null && parents.size() > 0){
+                        studentParents.add(students);
+                        //家长列表,最多4个
+                        students.setParents(parents);
+                    }
                 }
 
                 //初始化客户端
@@ -585,9 +589,6 @@ public class SmartUserController implements SmartUserControllerAPI {
 
                         //家庭住址是否为空判断
                         String address = dataFormatter.formatCellValue(row.getCell(9));
-                        if (ObjectUtils.isEmpty(address)) {
-                            return CommonResult.fail(name + "的家庭住址不能为空");
-                        }
 
                         //民族是否为空判断
                         String nation = dataFormatter.formatCellValue(row.getCell(5));
@@ -847,9 +848,6 @@ public class SmartUserController implements SmartUserControllerAPI {
 
                         //家庭住址是否为空判断
                         String address = dataFormatter.formatCellValue(row.getCell(9));
-                        if (ObjectUtils.isEmpty(address)) {
-                            return CommonResult.fail(name + "的家庭住址不能为空");
-                        }
 
                         //民族是否为空判断
                         String nation = dataFormatter.formatCellValue(row.getCell(5));

BIN
target/mybatis_plus-0.0.1-SNAPSHOT.jar.original