Browse Source

招生统计调整

dzx 7 months ago
parent
commit
a037ca1f99

+ 15 - 0
src/main/java/com/xjrsoft/module/student/service/impl/PbCseFeeobjupdateServiceImpl.java

@@ -149,6 +149,12 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
             graduationsRes.add(new EnrollmentStatisticsInfoKeyValue(entry.getKey(), entry.getValue()));
         }
 
+        Map<String, Long> graduationPays = pbCseFeeobjupdateList.stream().filter(x -> x.getGraduations() != null).filter(x -> "已缴费".equals(x.getPaymnystate())).collect(Collectors.groupingBy(PbCseFeeobjupdate::getGraduations, Collectors.counting()));
+        List<EnrollmentStatisticsInfoKeyValue> graduationsPayRes = new ArrayList<>();
+        for (Map.Entry<String, Long> entry : graduationPays.entrySet()) {
+            graduationsPayRes.add(new EnrollmentStatisticsInfoKeyValue(entry.getKey(), entry.getValue()));
+        }
+
         //住宿类型
         Map<String, Long> accommodationType = pbCseFeeobjupdateList.stream().filter(x -> x.getQuartername() != null).collect(Collectors.groupingBy(PbCseFeeobjupdate::getQuartername, Collectors.counting()));
         List<EnrollmentStatisticsInfoKeyValue> accommodationTypeRes = new ArrayList<>();
@@ -156,6 +162,14 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
             accommodationTypeRes.add(new EnrollmentStatisticsInfoKeyValue(entry.getKey(), entry.getValue()));
         }
 
+        Map<String, List<PbCseFeeobjupdate>> quarternameList = pbCseFeeobjupdateList.stream().filter(x -> x.getQuartername() != null).collect(Collectors.groupingBy(PbCseFeeobjupdate::getQuartername));
+        for (String quartername : quarternameList.keySet()) {
+            Map<String, Long> collect = quarternameList.get(quartername).stream().filter(x -> x.getQuartername() != null).collect(Collectors.groupingBy(PbCseFeeobjupdate::getSex, Collectors.counting()));
+            for (Map.Entry<String, Long> entry : collect.entrySet()) {
+                accommodationTypeRes.add(new EnrollmentStatisticsInfoKeyValue(quartername + entry.getKey(), entry.getValue()));
+            }
+        }
+
         //性别
         Map<String, Long> gender = pbCseFeeobjupdateList.stream().collect(Collectors.groupingBy(PbCseFeeobjupdate::getSex, Collectors.counting()));
         List<EnrollmentStatisticsInfoKeyValue> genderRes = new ArrayList<>();
@@ -168,6 +182,7 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
         result.setStudentSource(graduationsRes);
         result.setAccommodationType(accommodationTypeRes);
         result.setGender(genderRes);
+        result.setStudentSourcePay(graduationsPayRes);
 
         //获取所有学生的收费明细
         MPJLambdaWrapper<PbCseFeeobjupdate> feeobjupdateXssfdetailMPJLambdaWrapper = new MPJLambdaWrapper<>();

+ 4 - 1
src/main/java/com/xjrsoft/module/student/vo/EnrollmentStatisticsInfoVo.java

@@ -32,9 +32,12 @@ public class EnrollmentStatisticsInfoVo {
     /**
      * 学生来源
      */
-    @ApiModelProperty("学生来源")
+    @ApiModelProperty("学生来源(报名人数)")
     private List<EnrollmentStatisticsInfoKeyValue> studentSource;
 
+    @ApiModelProperty("学生来源(缴费人数)")
+    private List<EnrollmentStatisticsInfoKeyValue> studentSourcePay;
+
     /**
      * 住宿类型
      */