瀏覽代碼

小课学员管理,bug修改

zouxuan 2 年之前
父節點
當前提交
4aefff2ad9

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentStatisticsService.java

@@ -17,6 +17,8 @@ public interface StudentStatisticsService extends BaseService<Integer, StudentSt
     //定时任务
     void updateStudentStatistics();
 
+    int countStatistics(StudentStatisticsQueryInfo queryInfo);
+
     //分页查询学员小课数据
     PageInfo<StudentStatisticsDto> queryStatisticsPage(StudentStatisticsQueryInfo queryInfo);
 

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ExportServiceImpl.java

@@ -2863,7 +2863,7 @@ public class ExportServiceImpl implements ExportService {
                     new String[]{"studentBasicInfo.organName", "studentBasicInfo.userName", "studentBasicInfo.userId",
                             "studentBasicInfo.phone", "studentBasicInfo.subjectName", "studentBasicInfo.cooperationOrganName", "studentBasicInfo.grade",
                             "studentBasicInfo.studentStatus == null?'':studentBasicInfo.studentStatus == 'LOST' ? '流失':studentBasicInfo.studentStatus == 'NORMAL' ? " +
-                                    "'在读':studentBasicInfo.studentStatus == 'SLEEPY' ? '沉睡':studentBasicInfo.studentStatus == 'PAUSE' ? '暂停':'其他'",
+                                    "'在读':studentBasicInfo.studentStatus == 'SLEEPY' ? '沉睡':studentBasicInfo.studentStatus == 'PAUSE' ? '暂停':studentBasicInfo.studentStatus == 'HOLIDAY_COURSE' ? '假期上课':'其他'",
                             "noScheduleNum", "totalCourseNum", "overCourseNum", "subCourseNum",  "subTotalCourse", "preCourseFee", "firstCourseTime", "lastCourseTime","musicDirectorId", "musicDirectorName",
                             "studentBasicInfo.subjectTeacherId", "studentBasicInfo.subjectTeacherName", "latelyCourseConsumer", "visitNum",
                             "visitReason", "lastVisitTime"}, rows);

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

@@ -86,6 +86,16 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 		redisTemplate.opsForValue().set("updateStudentStatisticsNum:",num);
 	}
 
+	public int countStatistics(StudentStatisticsQueryInfo queryInfo){
+		Map<String, Object> params = new HashMap<String, Object>();
+		MapUtil.populateMap(params, queryInfo);
+		if(StringUtils.isNotEmpty(queryInfo.getOrganId())){
+			List<Integer> organIdList = Arrays.stream(queryInfo.getOrganId().split(",")).map(id -> Integer.valueOf(id)).collect(Collectors.toList());
+			params.put("organIdList",organIdList);
+		}
+		return studentStatisticsDao.countStatistics(params);
+	}
+
 	@Override
 	public PageInfo<StudentStatisticsDto> queryStatisticsPage(StudentStatisticsQueryInfo queryInfo) {
 		PageInfo<StudentStatisticsDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());

+ 1 - 0
mec-web/src/main/java/com/ym/mec/web/controller/IndexController.java

@@ -110,6 +110,7 @@ public class IndexController extends BaseController {
 		queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
 		return succeed(indexService.getIndexBaseData(queryInfo));
 	}
+
 	@GetMapping("/indexCoop")
 	public HttpResponseResult<List<DecimalMapDto>> indexCoop(String organId, String startTime, String endTime){
 		return succeed(indexService.indexCoop(organId,startTime,endTime));

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/controller/StudentStatisticsController.java

@@ -107,8 +107,8 @@ public class StudentStatisticsController extends BaseController {
     public HttpResponseResult exportStudentSmallClassStatisticsSum(StudentStatisticsQueryInfo queryInfo) throws IOException {
         SysUser sysUser = sysUserFeignService.queryUserInfo();
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
-        PageInfo<StudentStatisticsDto> pageList = studentStatisticsService.queryStatisticsPage(queryInfo);
-        if (pageList.getTotal() <= 0) {
+        int countStatistics = studentStatisticsService.countStatistics(queryInfo);
+        if (countStatistics <= 0) {
             throw new BizException("没有可导出的记录");
         }
         ManagerDownload managerDownload = exportService.saveManagerDownload(ExportTypeEnum.STUDENT_SMALL_CLASS_STATISTICS,sysUser.getId());