From 1da190e7f267bcd3501884f3aeaac7476850fec7 Mon Sep 17 00:00:00 2001
From: EricsHu <hrr145632>
Date: 星期日, 26 十一月 2023 17:53:03 +0800
Subject: [PATCH] 优化菜单查询

---
 src/main/java/com/qxueyou/scc/controller/ClassController.java |  306 +++++++++++++++++++++++++++-----------------------
 1 files changed, 167 insertions(+), 139 deletions(-)

diff --git a/src/main/java/com/qxueyou/scc/controller/ClassController.java b/src/main/java/com/qxueyou/scc/controller/ClassController.java
index 8964ccf..e755e93 100644
--- a/src/main/java/com/qxueyou/scc/controller/ClassController.java
+++ b/src/main/java/com/qxueyou/scc/controller/ClassController.java
@@ -8,6 +8,7 @@
 import java.util.List;
 import java.util.Map;
 
+import com.qxueyou.scc.teach.student.model.StuStudent;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -40,7 +41,7 @@
  *
  * @author chenjunliang
  */
-@Api(tags="鐝骇绠$悊鎺ュ彛")
+@Api(tags = "鐝骇绠$悊鎺ュ彛")
 @RestController
 @CrossOrigin
 @RequestMapping("/admin/class")
@@ -60,10 +61,26 @@
     @Autowired
     ITeacherService teacherService;
 
-	@Autowired
-	IClassLectureService clsLectureService;
+    @Autowired
+    IClassLectureService clsLectureService;
 
+    /**
+     * 鑾峰彇姝e父鐝骇鍒楄〃
+     *
+     * @param keyword
+     * @param limit
+     * @param pageNum
+     * @return
+     */
+    @ApiOperation(value = "鑾峰彇瀛︾敓璇︽儏鎺ュ彛", notes = "")
+    @GetMapping(value = "/student/getStudentDetails")
+    public Result getStudentDetails() {
+
+        StuStudent stu = this.studentService.getStudentDetails(ClientUtils.getUserId());
+        return new Result(true, "success", stu);
+    }
     //---------------------------------------------------------------------------------app鎺ュ彛--------------------------------------------------------------------------------------------------------------------/
+
     /**
      * 鑾峰彇姝e父鐝骇鍒楄〃
      *
@@ -73,7 +90,7 @@
      * @return
      */
     @ApiOperation(value = "鑾峰彇姝e父鐝骇鍒楄〃", notes = "")
-	@GetMapping(value = "/app/classList")
+    @GetMapping(value = "/app/classList")
     public Result classList(@RequestParam(defaultValue = "") String keyword, Pager pager) {
         return this.classService.classList(keyword, pager, 1);
     }
@@ -87,7 +104,7 @@
      * @return
      */
     @ApiOperation(value = "鑾峰彇鍘嗗彶鐝骇鍒楄〃", notes = "")
-	@GetMapping(value = "/app/historyClassList")
+    @GetMapping(value = "/app/historyClassList")
     public Result historyClassList(@RequestParam(defaultValue = "") String keyword, Pager pager) {
         return this.classService.classList(keyword, pager, 2);
     }
@@ -101,13 +118,13 @@
      */
     @ApiOperation(value = "瀛﹀憳璇︽儏", notes = "")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType="query", dataType = "String"),
-        @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
+            @ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
     })
-   	@GetMapping(value = "/app/studentInfo")
-   	public Result studentInfo(String classId, String studentId) {
-   		return this.studentService.queryStudent(classId, studentId);
-   	}
+    @GetMapping(value = "/app/studentInfo")
+    public Result studentInfo(String classId, String studentId) {
+        return this.studentService.queryStudent(classId, studentId);
+    }
 
     /**
      * 瀛﹀憳璇︽儏
@@ -118,93 +135,89 @@
      */
     @ApiOperation(value = "瀛﹀憳瀛︿範杩涘害", notes = "")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType="query", dataType = "String"),
-        @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
+            @ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
     })
-   	@GetMapping(value = "/app/studentProgress")
-   	public Result studentProgress(String classId, String studentId) {
-   		return this.studentService.studentProgress(classId, studentId);
-   	}
+    @GetMapping(value = "/app/studentProgress")
+    public Result studentProgress(String classId, String studentId) {
+        return this.studentService.studentProgress(classId, studentId);
+    }
 
-   	/**
-   	 * 鑾峰彇棣栭〉鏁版嵁鎺掕
-   	 *
-   	 *
-   	 * @param subjectId
-   	 */
-       @ApiOperation(value = "鐝骇鎺掕姒�", notes = "")
-       @ApiImplicitParams({
-           @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
-       })
-   	@GetMapping(value = "/app/getDataDesc")
-   	public Result getDataDesc(String classId, String subjectId) {
-   		return subjectService.getDataDesc(classId, subjectId);
-   	}
+    /**
+     * 鑾峰彇棣栭〉鏁版嵁鎺掕
+     *
+     * @param subjectId
+     */
+    @ApiOperation(value = "鐝骇鎺掕姒�", notes = "")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
+    })
+    @GetMapping(value = "/app/getDataDesc")
+    public Result getDataDesc(String classId, String subjectId) {
+        return subjectService.getDataDesc(classId, subjectId);
+    }
 
     /**
      * 瀛﹀憳璇剧▼杩涘害
      *
-     *
      * @param subjectId
-    */
+     */
     @ApiOperation(value = "瀛﹀憳璇剧▼杩涘害", notes = "")
-   	@ApiImplicitParams({
-	   	@ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "subjectId", value = "璇剧▼id", required = true, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType="query", dataType = "String"),
-   	})
-   	@GetMapping(value = "/app/studentSubjectProgress")
-   	public Result studentSubjectProgress(String classId, String subjectId, String studentId) {
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "subjectId", value = "璇剧▼id", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "studentId", value = "瀛﹀憳id", required = true, paramType = "query", dataType = "String"),
+    })
+    @GetMapping(value = "/app/studentSubjectProgress")
+    public Result studentSubjectProgress(String classId, String subjectId, String studentId) {
 
-	   	return new Result(true, "success", CollectionUtils.newObjectMap("homework", this.subjectService.studentSubjectHomeworkProgress(classId, subjectId, studentId),
-	   			"exam", this.subjectService.studentSubjectExamProgress(classId, subjectId, studentId)));
-   	}
+        return new Result(true, "success", CollectionUtils.newObjectMap("homework", this.subjectService.studentSubjectHomeworkProgress(classId, subjectId, studentId),
+                "exam", this.subjectService.studentSubjectExamProgress(classId, subjectId, studentId)));
+    }
 
     /**
      * 鐝骇瀛﹀憳璇剧▼鎬讳綋杩涘害
      *
-     *
      * @param classId
-    */
+     */
     @ApiOperation(value = "鐝骇瀛﹀憳璇剧▼鎬讳綋杩涘害", notes = "")
-   	@ApiImplicitParams({
-	   	@ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
-   	})
-   	@GetMapping(value = "/app/studentAllSubjectProgress")
-   	public Result studentSubjectProgress(String classId) {
-    	if(StringUtils.isEmpty(classId)) {
-    		return new Result(false, "鐝骇id鍙傛暟涓嶈兘涓虹┖");
-    	}
-	   	return new Result(true, "success", CollectionUtils.newObjectMap("subjectList", this.subjectService.studentSubjectProgress(classId, new Pager())));
-   	}
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
+    })
+    @GetMapping(value = "/app/studentAllSubjectProgress")
+    public Result studentSubjectProgress(String classId) {
+        if (StringUtils.isEmpty(classId)) {
+            return new Result(false, "鐝骇id鍙傛暟涓嶈兘涓虹┖");
+        }
+        return new Result(true, "success", CollectionUtils.newObjectMap("subjectList", this.subjectService.studentSubjectProgress(classId, new Pager())));
+    }
 
     /**
      * 鐝骇瀛﹀憳璇句欢鎬讳綋杩涘害
-     *
      *
      * @param classId
      */
     @ApiOperation(value = "鐝骇瀛﹀憳璇句欢鎬讳綋杩涘害", notes = "")
     @ApiImplicitParams({
-    	@ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
-    	@ApiImplicitParam(name = "subjectId", value = "璇剧▼id", required = true, paramType="query", dataType = "String"),
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "subjectId", value = "璇剧▼id", required = true, paramType = "query", dataType = "String"),
     })
     @GetMapping(value = "/app/studentSubjectLectureProgress")
     public Result studentSubjectLectureProgress(String classId, String subjectId) {
-    	if(StringUtils.isEmpty(classId)) {
-    		return new Result(false, "鐝骇id鍙傛暟涓嶈兘涓虹┖");
-    	}
-    	if(StringUtils.isEmpty(subjectId)) {
-    		return new Result(false, "璇剧▼id鍙傛暟涓嶈兘涓虹┖");
-    	}
+        if (StringUtils.isEmpty(classId)) {
+            return new Result(false, "鐝骇id鍙傛暟涓嶈兘涓虹┖");
+        }
+        if (StringUtils.isEmpty(subjectId)) {
+            return new Result(false, "璇剧▼id鍙傛暟涓嶈兘涓虹┖");
+        }
 
-    	//鑾峰彇鎵�鏈夎浠�
-		List<Map<String, Object>> lectures = this.subjectService.studentSubjectLectureProgress(subjectId, classId);
-		//鑾峰彇鎵�浠ョ珷鑺�
-		List<ClsSubjectChapter> chapterLst = clsLectureService.getChapterLectures(clsLectureService.getListChapter(classId, subjectId, null), lectures);
+        //鑾峰彇鎵�鏈夎浠�
+        List<Map<String, Object>> lectures = this.subjectService.studentSubjectLectureProgress(subjectId, classId);
+        //鑾峰彇鎵�浠ョ珷鑺�
+        List<ClsSubjectChapter> chapterLst = clsLectureService.getChapterLectures(clsLectureService.getListChapter(classId, subjectId, null), lectures);
 
-		return new Result(true, "success", CollectionUtils.newObjectMap("count",clsLectureService.stuLectureCountBySubject(subjectId, classId), "listData", QBeanUtils.listBean2ListMap(chapterLst,
-				CollectionUtils.newStringMap("name", "name", "chapterId", "chapterId", "lectures", "lectures"))));
+        return new Result(true, "success", CollectionUtils.newObjectMap("count", clsLectureService.stuLectureCountBySubject(subjectId, classId), "listData", QBeanUtils.listBean2ListMap(chapterLst,
+                CollectionUtils.newStringMap("name", "name", "chapterId", "chapterId", "lectures", "lectures"))));
     }
 
     /**
@@ -216,13 +229,13 @@
      * @param mobilePhone   鎵嬫満鍙�
      */
     @ApiOperation(value = "app绔鍛樻敞鍐屾帴鍙�", notes = "")
-   	@ApiImplicitParams({
-	   	@ApiImplicitParam(name = "name", value = "鍚嶇О", required = true, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "studentNumber", value = "瀛﹀彿", required = true, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "sex", value = "鎬у埆(0濂筹紝1鐢�)", required = true, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "mobilePhone", value = "鎵嬫満鍙�", required = false, paramType="query", dataType = "String"),
-	   	@ApiImplicitParam(name = "orgId", value = "鏈烘瀯", required = true, paramType="query", dataType = "String"),
-   	})
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "name", value = "鍚嶇О", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "studentNumber", value = "瀛﹀彿", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "sex", value = "鎬у埆(0濂筹紝1鐢�)", required = true, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "mobilePhone", value = "鎵嬫満鍙�", required = false, paramType = "query", dataType = "String"),
+            @ApiImplicitParam(name = "orgId", value = "鏈烘瀯", required = true, paramType = "query", dataType = "String"),
+    })
     @PostMapping(value = "/app/studentRegister")
     public Result studentRegister(String name, String studentNumber, Boolean sex, String mobilePhone, String orgId) {
         return studentService.insertStudent(null, name, studentNumber, sex, mobilePhone, orgId);
@@ -242,18 +255,20 @@
      */
     @PostMapping(value = "add")
     public Result add(String className, String classNumber, String startTime, String endTime, String subjectId,
-                      String teacherId,String chargeClassName ) {
+                      String teacherId, String chargeClassName) {
         try {
-        	return classService.insertClass(className, classNumber, DateUtils.convertStringToDate(startTime),
-                    DateUtils.convertStringToDate(endTime), subjectId, teacherId,chargeClassName);
+            return classService.insertClass(className, classNumber, DateUtils.convertStringToDate(startTime),
+                    DateUtils.convertStringToDate(endTime), subjectId, teacherId, chargeClassName);
 
         } catch (ParseException e) {
             log.error(e, e);
             return new Result(false, "鏃ユ湡鍙傛暟閿欒");
         }
     }
+
     /**
      * 鏂板琛ヨ�冨垎缁�
+     *
      * @param className   鐝骇鍚嶇О
      * @param classNumber 鐝骇缂栫爜
      * @param startTime   寮�鐝椂闂�
@@ -262,17 +277,17 @@
      */
     @PostMapping(value = "addRe")
     public Result addRe(String className, String classNumber, String startTime, String endTime, String subjectId,
-                      String teacherId,String classTypes) {
+                        String teacherId, String classTypes) {
         try {
-			ClsClass reClass = classService.getReClass("1");
-        	//濡傛灉琛ヨ�冪被鍨嬪垎缁勪笉瀛樺湪锛屾柊澧�
-			if (reClass==null){
-				return classService.insertReClass(className, classNumber, DateUtils.convertStringToDate(startTime),
-						DateUtils.convertStringToDate(endTime), subjectId, teacherId,classTypes);
-			}else {
-				//瀛樺湪杩斿洖false
-				return new Result(false, "琛ヨ�冨垎缁勫凡瀛樺湪");
-			}
+            ClsClass reClass = classService.getReClass("1");
+            //濡傛灉琛ヨ�冪被鍨嬪垎缁勪笉瀛樺湪锛屾柊澧�
+            if (reClass == null) {
+                return classService.insertReClass(className, classNumber, DateUtils.convertStringToDate(startTime),
+                        DateUtils.convertStringToDate(endTime), subjectId, teacherId, classTypes);
+            } else {
+                //瀛樺湪杩斿洖false
+                return new Result(false, "琛ヨ�冨垎缁勫凡瀛樺湪");
+            }
         } catch (ParseException e) {
             log.error(e, e);
             return new Result(false, "鏃ユ湡鍙傛暟閿欒");
@@ -285,7 +300,7 @@
     @GetMapping(value = "getSubjectLst")
     public Result getSubjectlst() {
 
-        List<Subject> subjectLst = subjectService.list("", null, "",Subject.TYPE_ORG_SUBJECT, 1000, 1);
+        List<Subject> subjectLst = subjectService.list("", null, "", Subject.TYPE_ORG_SUBJECT, 1000, 1);
 
         return new Result(true, "success", QBeanUtils.listBean2ListMap(subjectLst,
                 CollectionUtils.newStringMap("name", "subjectName", "subjectId", "subjectId")));
@@ -300,10 +315,10 @@
      * @return
      */
     @ApiOperation(value = "鑾峰彇鐝骇鍒楄〃", notes = "")
-    @SuppressWarnings({ "unchecked", "rawtypes" })
-	@GetMapping(value = "list")
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    @GetMapping(value = "list")
     public Result list(@RequestParam(defaultValue = "") String keyword,
-                       @RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "1")Integer pageType) {
+                       @RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "1") Integer pageType) {
 
         String teacherId = ClientUtils.isAdmin() ? null : teacherService.getTeacherIdByUserId(ClientUtils.getUserId());
         // 鑾峰彇鏁版嵁
@@ -311,24 +326,24 @@
         // 鑾峰彇鐝骇鎬绘暟
         int count = classService.getClassLstCount(keyword, teacherId, pageType);
         // 杞垚鍓嶇鎵�闇�瀛楁鍜岀粨鏋�
-       List<Map<String, Object>> lstResult = QBeanUtils.listBean2ListMap(clsLst,
-                CollectionUtils.newStringMap("name", "className", "classId", "classId", "classNumber", "classNumber","classTypes","classTypes",
+        List<Map<String, Object>> lstResult = QBeanUtils.listBean2ListMap(clsLst,
+                CollectionUtils.newStringMap("name", "className", "classId", "classId", "classNumber", "classNumber", "classTypes", "classTypes",
                         "studentCount", "studentCount", "createTime", "createTime", "startTime", "startTime", "endTime",
-                        "endTime", "subjects", "sbjLst","chargeClassName","chargeClassName","chargeClassId","chargeClassId"));
+                        "endTime", "subjects", "sbjLst", "chargeClassName", "chargeClassName", "chargeClassId", "chargeClassId"));
 
         // 鍗曠嫭澶勭悊璇剧▼鐨勫瓧娈靛拰缁撴瀯
         for (Map<String, Object> item : lstResult) {
 
-        	if(item.get("sbjLst")==null){
-        		continue;
+            if (item.get("sbjLst") == null) {
+                continue;
 
-        	}
+            }
 
-        	 item.put("subjectLst",
-                   QBeanUtils.listBean2ListMap(
-                		   this.filtCurrTeacherSubjects((List<Subject>) item.get("sbjLst"),teacherId),
-                           CollectionUtils.newStringMap("subjectId", "subjectId", "name", "subjectName",
-                           		"teacherId","teacherId","teacherName","teacherName","schoolYear","schoolYear","term","term")));
+            item.put("subjectLst",
+                    QBeanUtils.listBean2ListMap(
+                            this.filtCurrTeacherSubjects((List<Subject>) item.get("sbjLst"), teacherId),
+                            CollectionUtils.newStringMap("subjectId", "subjectId", "name", "subjectName",
+                                    "teacherId", "teacherId", "teacherName", "teacherName", "schoolYear", "schoolYear", "term", "term")));
 
             item.remove("sbjLst");
         }
@@ -337,20 +352,20 @@
     }
 
 
-    private List<Subject> filtCurrTeacherSubjects(List<Subject> subjects,String teacherId){
-    	if(StringUtils.isEmpty(teacherId) || subjects==null || subjects.size()==0){
-    		return subjects;
-    	}
+    private List<Subject> filtCurrTeacherSubjects(List<Subject> subjects, String teacherId) {
+        if (StringUtils.isEmpty(teacherId) || subjects == null || subjects.size() == 0) {
+            return subjects;
+        }
 
-    	List<Subject> newSubjects = new ArrayList<Subject>(subjects.size());
+        List<Subject> newSubjects = new ArrayList<Subject>(subjects.size());
 
-    	for(Subject subject:subjects){
-    		if(teacherId.equals(subject.getTeacherId())){
-    			newSubjects.add(subject);
-    		}
-    	}
+        for (Subject subject : subjects) {
+            if (teacherId.equals(subject.getTeacherId())) {
+                newSubjects.add(subject);
+            }
+        }
 
-    	return newSubjects;
+        return newSubjects;
     }
 
 
@@ -362,7 +377,7 @@
      */
     @ApiOperation(value = "鏌ヨ鐝骇鍩烘湰淇℃伅", notes = "")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
     })
     @GetMapping(value = "queryClass")
     public Result findClass(String classId) {
@@ -371,10 +386,10 @@
 
         return new Result(true, "success", QBeanUtils.bean2Map(cls,
                 CollectionUtils.newStringMap("name", "className", "classId", "classId", "classNumber", "classNumber",
-                        "studentCount", "studentCount", "createTime", "createTime", "startTime", "startTime", "endTime","endTime","classTypes",
+                        "studentCount", "studentCount", "createTime", "createTime", "startTime", "startTime", "endTime", "endTime", "classTypes",
                         "classTypes", "subjects", "subjectLst", "needJoinAudit", "needJoinAudit", "needQuitAudit",
                         "needQuitAudit", "showAnalysisAfterExer", "showAnalysisAfterExer", "canMultiExer",
-                        "canMultiExer", "needForum", "needForum", "teacherId", "teacherId","chargeClassName","chargeClassName")));
+                        "canMultiExer", "needForum", "needForum", "teacherId", "teacherId", "chargeClassName", "chargeClassName")));
     }
 
     /**
@@ -437,11 +452,11 @@
                          @RequestParam(defaultValue = "false") Boolean showAnalysisAfterExer,
                          @RequestParam(defaultValue = "false") Boolean canMultiExer,
                          @RequestParam(defaultValue = "false") Boolean needForum,
-    String chargeClassName) {
+                         String chargeClassName) {
         try {
             return classService.updateClass(classId, className, classNumber, DateUtils.convertStringToDate(startTime),
                     DateUtils.convertStringToDate(endTime), subjectId, needJoinAudit, needQuitAudit,
-                    showAnalysisAfterExer, canMultiExer, needForum, teacherId,chargeClassName);
+                    showAnalysisAfterExer, canMultiExer, needForum, teacherId, chargeClassName);
         } catch (ParseException e) {
             log.error(e, e);
             return new Result(false, "鏃ユ湡鍙傛暟閿欒");
@@ -459,7 +474,7 @@
      */
     @ApiOperation(value = "鑾峰彇瀛﹀憳鍒楄〃", notes = "瀛︿範鐘舵�佽鏄�(0, 鏈紑濮� 銆� 1, 瀛︿範涓� 銆� 2, 宸茬粨鏉�, 3, 寰呮縺娲� 銆� 4, 宸插喕缁�)")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType="query", dataType = "String"),
+            @ApiImplicitParam(name = "classId", value = "鐝骇id", required = true, paramType = "query", dataType = "String"),
     })
     @GetMapping(value = "lstStudent4Class")
     public Result lstStudent4Class(String classId, @RequestParam(defaultValue = "10") Integer limit,
@@ -492,9 +507,15 @@
      * @param mobilePhone   鎵嬫満鍙�
      */
     @PostMapping(value = "addStudent")
-    public Result addStudent(String classId, String name, String studentNumber, Boolean sex, String mobilePhone,String comName) {
+    public Result addStudent(String classId, String name, String studentNumber, Boolean sex, String mobilePhone, String comName,
+                             String photo, String passporName, String nationality, String ancestralHome, String birthday, String birthplace,
+                             String chinaStatus, String registeredAddress, String homeAddress, String religiousBelief, String email,
+                             String workUnit) {
 
-        return studentService.insertStudent(classId, name, studentNumber, sex, mobilePhone, ClientUtils.getOrgId(),comName);
+        return studentService.insertStudent(classId, name, studentNumber, sex, mobilePhone, ClientUtils.getOrgId(), comName,
+                photo,  passporName,  nationality,  ancestralHome,  birthday,  birthplace,
+                chinaStatus,  registeredAddress,  homeAddress,  religiousBelief,  email,
+                workUnit);
 
     }
 
@@ -508,12 +529,17 @@
      * @param mobilePhone   鎵嬫満鍙�
      */
     @PostMapping(value = "updateStudent")
-    public Result updateStudent(String studentId, String name,String password, String studentNumber, Boolean sex, String mobilePhone) {
+    public Result updateStudent(String studentId, String name, String password, String studentNumber, Boolean sex, String mobilePhone,
+                                String photo, String passporName, String nationality, String ancestralHome, String birthday, String birthplace,
+                                String chinaStatus, String registeredAddress, String homeAddress, String religiousBelief, String email,
+                                String workUnit, String graduationDestination) {
 
-        return studentService.updateStudent(studentId, name,password, studentNumber, sex, mobilePhone);
+        return studentService.updateStudent(studentId, name, password, studentNumber, sex, mobilePhone,
+                 photo,  passporName,  nationality,  ancestralHome,  birthday,  birthplace,
+                 chinaStatus,  registeredAddress,  homeAddress,  religiousBelief,  email,
+                 workUnit,  graduationDestination);
 
     }
-
 
 
     /**
@@ -548,41 +574,43 @@
 
     /**
      * 娣诲姞鐝骇璇剧▼
+     *
      * @throws InvocationTargetException
      * @throws IllegalAccessException
-     *
      */
     @PostMapping(value = "addClsSubject")
-    public Result addClsSubject(String classId, String origSubjectId,String teacherId,Integer schoolYear ,Integer term) throws IllegalAccessException, InvocationTargetException {
-    	return  this.subjectService.addClsSubject(classId,origSubjectId,teacherId,schoolYear,term);
+    public Result addClsSubject(String classId, String origSubjectId, String teacherId, Integer schoolYear, Integer term) throws IllegalAccessException, InvocationTargetException {
+        return this.subjectService.addClsSubject(classId, origSubjectId, teacherId, schoolYear, term);
     }
 
     /**
      * 鏇存柊鐝骇璇剧▼
      */
     @PostMapping(value = "updateClsSubject")
-    public Result updateClsSubject(String classId,String subjectId, String origSubjectId,String teacherId,Integer schoolYear ,Integer term) {
-    	return this.subjectService.updateClsSubject(classId,subjectId,origSubjectId,teacherId,schoolYear,term);
+    public Result updateClsSubject(String classId, String subjectId, String origSubjectId, String teacherId, Integer schoolYear, Integer term) {
+        return this.subjectService.updateClsSubject(classId, subjectId, origSubjectId, teacherId, schoolYear, term);
     }
 
     /**
      * 鍒犻櫎鐝骇璇剧▼
      */
     @GetMapping(value = "deleteClsSubject")
-    public Result deleteClsSubject(String classId,String subjectIds){
-    	//鍒犻櫎璇剧▼鍙婅绋嬬彮绾у叧鑱斿叧绯�
-    	return subjectService.deleteClsSubject(classId,subjectIds.split(","));
+    public Result deleteClsSubject(String classId, String subjectIds) {
+        //鍒犻櫎璇剧▼鍙婅绋嬬彮绾у叧鑱斿叧绯�
+        return subjectService.deleteClsSubject(classId, subjectIds.split(","));
     }
 
     /**
      * 鎵�鏈夌彮绾у垪琛�
+     *
      * @param subjectId 鏍规嵁subjectId杩囨护
      * @return
      */
-	@RequestMapping(value = "/selectlist", method = RequestMethod.GET)
-	public @ResponseBody List<Map<String,Object>> classList() {
-		return classService.queryAllClassIdAndName();
-	}
+    @RequestMapping(value = "/selectlist", method = RequestMethod.GET)
+    public @ResponseBody
+    List<Map<String, Object>> classList() {
+        return classService.queryAllClassIdAndName();
+    }
 
     /**
      * 鑾峰彇瀛﹀憳璇︾粏淇℃伅

--
Gitblit v1.8.0