浏览代码

Merge branch 'pre'

dzx 8 月之前
父节点
当前提交
d0f85ad1e6

+ 5 - 4
src/main/java/com/xjrsoft/module/job/EnrollmentStatisticsInfoTask.java

@@ -40,7 +40,7 @@ public class EnrollmentStatisticsInfoTask {
     @Autowired
     private EnrollmentStatisticsInfoMapper enrollmentStatisticsInfoMapper;
 
-    @Scheduled(cron = "0 */20 * * * ?")
+    @Scheduled(cron = "0 */15 * * * ?")
     public void execute() {
         doExecute();
     }
@@ -53,7 +53,7 @@ public class EnrollmentStatisticsInfoTask {
         dto.setYear(now.getYear() + "");
         EnrollmentStatisticsInfoVo info = pbCseFeeobjupdateService.getEnrollmentStatisticsInfo(dto);
         if(info != null){
-            enrollmentStatisticsInfoMapper.deleteDataByDate(dataDate);
+//            enrollmentStatisticsInfoMapper.deleteDataByDate(dataDate);
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
             infoData.setDeleteMark(DeleteMark.NODELETE.getCode());
@@ -70,7 +70,7 @@ public class EnrollmentStatisticsInfoTask {
         EnrollmentStatisticsGraduationInfoVo graduationInfo = pbCseFeeobjupdateService.getEnrollmentStatisticsGraduationInfo(graduationInfoDto);
 
         if(graduationInfo != null){
-            enrollmentStatisticsInfoMapper.deleteGraduationDataByDate(dataDate);
+//            enrollmentStatisticsInfoMapper.deleteGraduationDataByDate(dataDate);
 
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
@@ -96,7 +96,7 @@ public class EnrollmentStatisticsInfoTask {
         EnrollmentStatisticsCalendarInfoVo calendarInfoVo = pbCseFeeobjupdateService.getEnrollmentStatisticsCalendarInfo(calendarInfoDto);
 
         if(calendarInfoVo != null){
-            enrollmentStatisticsInfoMapper.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
+//            enrollmentStatisticsInfoMapper.deleteCalendarDataByDate(lastSundayStr, thisSaturdayStr);
 
             EnrollmentStatisticsInfo infoData = new EnrollmentStatisticsInfo();
             infoData.setEnabledMark(EnabledMark.ENABLED.getCode());
@@ -107,6 +107,7 @@ public class EnrollmentStatisticsInfoTask {
             infoData.setDataType(3);
             infoData.setDataStartDay(lastSunday);
             infoData.setDataEndDay(thisSaturday);
+            infoData.setDataDay(now);
             enrollmentStatisticsInfoMapper.insert(infoData);
         }
     }

+ 37 - 20
src/main/java/com/xjrsoft/module/student/service/impl/PbCseFeeobjupdateServiceImpl.java

@@ -10,16 +10,26 @@ import com.xjrsoft.module.base.entity.BaseMajorSet;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsCalendarInfoDto;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsGraduationInfoDto;
 import com.xjrsoft.module.student.dto.EnrollmentStatisticsInfoDto;
-import com.xjrsoft.module.student.entity.*;
+import com.xjrsoft.module.student.entity.BaseMajorCategor;
+import com.xjrsoft.module.student.entity.EnrollmentStatisticsInfo;
+import com.xjrsoft.module.student.entity.PbCseFeeitem2;
+import com.xjrsoft.module.student.entity.PbCseFeeobjupdate;
+import com.xjrsoft.module.student.entity.PbCseSpecplan;
+import com.xjrsoft.module.student.entity.PbVXssfdetail;
 import com.xjrsoft.module.student.mapper.EnrollmentStatisticsInfoMapper;
 import com.xjrsoft.module.student.mapper.PbCseFeeobjupdateMapper;
 import com.xjrsoft.module.student.mapper.PbVXsxxsfytbMapper;
 import com.xjrsoft.module.student.service.IPbCseFeeobjupdateService;
 import com.xjrsoft.module.student.service.IPbCseSpecplanService;
-import com.xjrsoft.module.student.vo.*;
+import com.xjrsoft.module.student.vo.ChargingSituationVo;
+import com.xjrsoft.module.student.vo.EnrollmentStatisticsCalendarInfoVo;
+import com.xjrsoft.module.student.vo.EnrollmentStatisticsGraduationInfoVo;
+import com.xjrsoft.module.student.vo.EnrollmentStatisticsInfoKeyValue;
+import com.xjrsoft.module.student.vo.EnrollmentStatisticsInfoVo;
+import com.xjrsoft.module.student.vo.PbVXsxxsfytbSpecnameCountVo;
+import com.xjrsoft.module.student.vo.ProfessionalHeadCoun;
 import com.yomahub.liteflow.util.JsonUtil;
 import lombok.AllArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -27,7 +37,11 @@ import java.math.RoundingMode;
 import java.text.DecimalFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -169,8 +183,9 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
 //            EnrollmentStatisticsInfoVo enrollmentStatisticsInfoVo = this.selectJoinOne(EnrollmentStatisticsInfoVo.class, feeobjupdateXssfdetailMPJLambdaWrapper);
 
         //缴费人数,入账金额
+        long count = pbCseFeeobjupdateList.stream().filter(x -> x.getPaymnystate() != null && "已缴费".equals(x.getPaymnystate())).count();
+        result.setPayers((int) count);
         if (enrollmentStatisticsInfoVo != null) {
-            result.setPayers(enrollmentStatisticsInfoVo.getPayers());
             if (enrollmentStatisticsInfoVo.getRecordedAmountOfMoney() != null) {
                 result.setRecordedAmountOfMoney(enrollmentStatisticsInfoVo.getRecordedAmountOfMoney().setScale(2, RoundingMode.DOWN));
             }
@@ -237,23 +252,24 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
         ;
 
         List<PbCseFeeobjupdate> pbCseFeeobjupdateByYearMonthList = this.selectJoinList(PbCseFeeobjupdate.class, pbCseFeeobjupdateByYearMonth);
+        if(pbCseFeeobjupdateByYearMonthList.isEmpty()){
+            return null;
+        }
 
-        if (pbCseFeeobjupdateByYearMonthList != null && !pbCseFeeobjupdateByYearMonthList.isEmpty()) {
-            //每日招生人数
-            Map<String, Long> cratetime = pbCseFeeobjupdateByYearMonthList.stream().collect(Collectors.groupingBy(pbCseFeeobjupdate -> pbCseFeeobjupdate.getCratetime().substring(0, 10), Collectors.counting()));
-            if (!cratetime.isEmpty()) {
-                cratetime = cratetime.entrySet().stream()
-                        .sorted(Map.Entry.comparingByKey())
-                        .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
-                                (e1, e2) -> e1, LinkedHashMap::new));
-            }
-            List<EnrollmentStatisticsInfoKeyValue> cratetimeRes = new ArrayList<>();
-            for (Map.Entry<String, Long> entry : cratetime.entrySet()) {
-                cratetimeRes.add(new EnrollmentStatisticsInfoKeyValue(entry.getKey(), entry.getValue()));
-            }
-
-            result.setCratetimeList(cratetimeRes);
+        //每日招生人数
+        Map<String, Long> cratetime = pbCseFeeobjupdateByYearMonthList.stream().collect(Collectors.groupingBy(pbCseFeeobjupdate -> pbCseFeeobjupdate.getCratetime().substring(0, 10), Collectors.counting()));
+        if (!cratetime.isEmpty()) {
+            cratetime = cratetime.entrySet().stream()
+                    .sorted(Map.Entry.comparingByKey())
+                    .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
+                            (e1, e2) -> e1, LinkedHashMap::new));
         }
+        List<EnrollmentStatisticsInfoKeyValue> cratetimeRes = new ArrayList<>();
+        for (Map.Entry<String, Long> entry : cratetime.entrySet()) {
+            cratetimeRes.add(new EnrollmentStatisticsInfoKeyValue(entry.getKey(), entry.getValue()));
+        }
+
+        result.setCratetimeList(cratetimeRes);
         return result;
     }
 
@@ -337,6 +353,7 @@ public class PbCseFeeobjupdateServiceImpl extends MPJBaseServiceImpl<PbCseFeeobj
                         .eq(EnrollmentStatisticsInfo::getDeleteMark, DeleteMark.NODELETE.getCode())
                         .eq(EnrollmentStatisticsInfo::getEnabledMark, EnabledMark.ENABLED.getCode())
                         .eq(EnrollmentStatisticsInfo::getDataType, 3)
+                        .eq(EnrollmentStatisticsInfo::getDataDay, LocalDate.now())
                         .eq(StrUtil.isNotEmpty(dto.getStartDay()), EnrollmentStatisticsInfo::getDataStartDay, dto.getStartDay())
                         .eq(StrUtil.isNotEmpty(dto.getEndDay()), EnrollmentStatisticsInfo::getDataEndDay, dto.getEndDay())
                         .orderByDesc(EnrollmentStatisticsInfo::getCreateDate)