From 96286178ee1c257c130cb2ad964a781f36c4eee5 Mon Sep 17 00:00:00 2001
From: yn147 <2270338776@qq.com>
Date: 星期三, 10 五月 2023 16:23:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/main/java/com/qxueyou/scc/admin/schoolRoll/impl/SchoolRollServiceImpl.java |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/qxueyou/scc/admin/schoolRoll/impl/SchoolRollServiceImpl.java b/src/main/java/com/qxueyou/scc/admin/schoolRoll/impl/SchoolRollServiceImpl.java
index 2b978e2..2d0694f 100644
--- a/src/main/java/com/qxueyou/scc/admin/schoolRoll/impl/SchoolRollServiceImpl.java
+++ b/src/main/java/com/qxueyou/scc/admin/schoolRoll/impl/SchoolRollServiceImpl.java
@@ -65,14 +65,23 @@
             StuStudent stuStudent = findUnique(hql.toString(), args, StuStudent.class);
 
             if(stuStudent!=null && classId!=null){
+                StringBuffer ClaHql=new StringBuffer("from ClsClass where classId=? and deleteFlag is false");
+
+                List<Object> claArgs = CollectionUtils.newList(classId);
+
+                ClsClass cLaClass = findUnique(ClaHql.toString(), claArgs, ClsClass.class);
+
+                cLaClass.setStudentCount(cLaClass.getStudentCount()+1);
+
                 stuStudent.setClassId(classId);
+
                 save(stuStudent);
             }else {
-                return new Result(false,"班级不存在或学生不存在");
+                return new Result(false,"鐝骇涓嶅瓨鍦ㄦ垨瀛︾敓涓嶅瓨鍦�");
             }
         }
 
-        return new Result(true);
+        return new Result(true,"鍒嗙彮鎴愬姛");
 
     }
 
@@ -85,10 +94,10 @@
         List<StuStudent> stuStudents = find(hql.toString(), args, StuStudent.class);
 
         ExcelExportUtils<StuStudent> ex = new ExcelExportUtils<StuStudent>();
-        String[] headers = { "姓名", "性别" ,"手机号" ,"身份证"};
+        String[] headers = { "濮撳悕", "鎬у埆" ,"鎵嬫満鍙�" ,"韬唤璇�"};
         List<StuStudent> dataset = new ArrayList<StuStudent>();
         for (StuStudent stuStudent:
-        stuStudents) {
+                stuStudents) {
             StuStudent u = new StuStudent();
             u.setName(stuStudent.getName());
             u.setSex(stuStudent.getSex());
@@ -106,7 +115,7 @@
             obj.setOut(out);
             ex.exportExcel(obj);
             out.close();
-            System.out.println("excel导出成功!");
+            System.out.println("excel瀵煎嚭鎴愬姛锛�");
         } catch (FileNotFoundException e) {
             e.printStackTrace();
         } catch (IOException e) {
@@ -122,7 +131,7 @@
             obj.setOut(out);
             ex.exportExcelByColomn(obj);
             out.close();
-            System.out.println("excel指定列导出成功!");
+            System.out.println("excel鎸囧畾鍒楀鍑烘垚鍔燂紒");
         } catch (FileNotFoundException e) {
             e.printStackTrace();
         } catch (IOException e) {
@@ -133,7 +142,7 @@
     @Override
     public Result loopStudentIds(String[] studentIds) {
         for (String studentId:
-             studentIds) {
+                studentIds) {
             auditStudent(studentId);
         }
         return new Result(true);

--
Gitblit v1.8.0