瀏覽代碼

开学报到领导统计调整

dzx 10 月之前
父節點
當前提交
0d6ea4d4d5

+ 12 - 0
src/main/java/com/xjrsoft/module/student/controller/StudentReportRecordController.java

@@ -334,6 +334,18 @@ public class StudentReportRecordController {
         }
         statisticsVo.setMajorList(majorList);
 
+        Map<String, List<StudentReportRecordStatisticsListVo>> deptMap = dataList.stream().filter(x -> x.getReportTime() != null && x.getDeptName() != null).collect(Collectors.groupingBy(StudentReportRecordStatisticsListVo::getDeptName));
+        List<ItemCountVo> deptList = new ArrayList<>();
+        for (String majorName : deptMap.keySet()) {
+            majorList.add(
+                    new ItemCountVo(){{
+                        setItem(majorName);
+                        setCount(majorMap.get(majorName).size());
+                    }}
+            );
+        }
+        statisticsVo.setDeptList(deptList);
+
         BigDecimal divide = BigDecimal.ZERO;
         if( statisticsVo.getAllCount() != 0){
             divide = BigDecimal.valueOf(statisticsVo.getArrivedCount()).divide(BigDecimal.valueOf(statisticsVo.getAllCount()), 4, RoundingMode.HALF_UP);

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordStatisticsListVo.java

@@ -43,4 +43,7 @@ public class StudentReportRecordStatisticsListVo {
     @ApiModelProperty("专业方向")
     private String majorName;
 
+    @ApiModelProperty("专业部名称")
+    private String deptName;
+
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/StudentReportRecordStatisticsVo.java

@@ -73,4 +73,7 @@ public class StudentReportRecordStatisticsVo {
     @ApiModelProperty("专业报到情况")
     private List<ItemCountVo> majorList;
 
+    @ApiModelProperty("专业部报到情况")
+    private List<ItemCountVo> deptList;
+
 }

+ 2 - 1
src/main/resources/mapper/student/StudentReportRecordMapper.xml

@@ -182,7 +182,7 @@
     <select id="getStatisticsDataList" parameterType="com.xjrsoft.module.student.dto.StudentReportRecordStatisticsDto"
             resultType="com.xjrsoft.module.student.vo.StudentReportRecordStatisticsListVo">
         SELECT t1.name,t1.credential_number,t2.gender,t4.graduated_university,t4.stduy_status,t5.report_time ,
-        t6.name AS class_name,t8.name as class_type,t7.name AS major_name FROM base_new_student t1
+        t6.name AS class_name,t8.name as class_type,t7.name AS major_name,t9.name as dept_name FROM base_new_student t1
         INNER JOIN xjr_user t2 ON t1.credential_number = t2.credential_number
         INNER JOIN enrollment_plan t3 ON t3.id = t1.enrollment_plan_id
         INNER JOIN base_student_school_roll t4 ON t4.user_id = t2.id
@@ -190,6 +190,7 @@
         INNER JOIN base_class t6 ON t6.id = t4.class_id
         INNER JOIN base_major_set t7 ON t7.id = t6.major_set_id
         left join xjr_dictionary_detail t8 on t6.class_type = t8.code and t8.item_id = 2023000000000000039
+        INNER JOIN xjr_department t9 ON t9.id = t6.org_id
         WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
         AND t3.grade_id = #{dto.gradeId} AND t3.enroll_type = #{dto.enrollType}
         AND (t1.delete_reason IS NULL OR t1.delete_reason = '')