Pārlūkot izejas kodu

管乐迷需求一大堆

zouxuan 2 gadi atpakaļ
vecāks
revīzija
f272e8e303

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java

@@ -216,7 +216,7 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
     List<IndexCloudStudySumDto> getCloudStudyStudentOverViewList1(@Param("organIds") List<Integer> organIds);
     
     List<Mapper> getOrganActiveCloudStudyStudentNum(@Param("organIds") List<Integer> organIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
-    List<Map<Integer,Integer>> getOrganActiveCloudStudyStudentNum1(@Param("organIds") List<Integer> organIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
+    List<Map<Integer,Long>> getOrganActiveCloudStudyStudentNum1(@Param("organIds") List<Integer> organIds, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
     
     List<Mapper> getOrganCloudTeacherStudentNum(@Param("organIds") List<Integer> organIds);
 

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentServiceImpl.java

@@ -1332,7 +1332,7 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
         cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
         Date startTime = cal.getTime();
 
-        Map<Integer,Integer> activeMap = MapUtil.convertIntegerMap(studentDao.getOrganActiveCloudStudyStudentNum1(organIdsList, startTime, endTime));
+        Map<Integer,Long> activeMap = MapUtil.convertIntegerMap(studentDao.getOrganActiveCloudStudyStudentNum1(organIdsList, startTime, endTime));
         //获取重复购买人数
         Map<Integer,Long> againBuyMap = MapUtil.convertIntegerMap(studentDao.getAgainBuyNum(organIdsList));
         for (IndexCloudStudySumDto dto : list) {
@@ -1341,8 +1341,8 @@ public class StudentServiceImpl extends BaseServiceImpl<Integer, Student> implem
             dto.setWaitActivateVipStudentNum(aLong==null?0:aLong.intValue());
             Long aLong1 = againBuyMap.get(dto.getOrganId());
             dto.setAgainBuyNum(aLong1==null?0:aLong1.intValue());
-            Integer integer = activeMap.get(dto.getOrganId());
-            dto.setActiveStudentNum(integer==null?0:integer);
+            Long integer = activeMap.get(dto.getOrganId());
+            dto.setActiveStudentNum(integer==null?0:integer.intValue());
             dto.setVipStudentNum(dto.getEffectiveVipStudentNum() + dto.getWaitActivateVipStudentNum());
             double studentNum = (double)dto.getVipStudentNum();
             dto.setVipStudentRate(studentNum / dto.getTotalStudentNum() * 100d);

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/StudentStatisticsMapper.xml

@@ -372,7 +372,7 @@
 	</resultMap>
 	<select id="studentSmallClassStatisticsSum" resultMap="StudentStatisticsSumDto">
 		SELECT
-		COUNT(CASE WHEN (ss.no_schedule_num_ > 0 OR suca.course_balance_ > 0) AND (ss.over_course_num_ &lt;= 0 OR ss.lately_year_course_consumer_ &lt;= 0) THEN 1 ELSE NULL END) 'sleepStudentNum',
+		COUNT(CASE WHEN ss.last_visit_status_ = 'NORMAL' OR ((ss.last_visit_status_ IS NULL AND ss.no_schedule_num_ > 0 OR suca.course_balance_ > 0) AND (ss.over_course_num_ &lt;= 0 OR ss.lately_year_course_consumer_ &lt;= 0)) THEN 1 ELSE NULL END) 'sleepStudentNum',
 		COUNT(CASE WHEN ss.over_course_num_ > 0 AND (ss.sub_course_num_ > 0 OR ss.no_schedule_num_ > 0) AND ss.lately_year_course_consumer_ &lt;= 0 AND ss.no_schedule_num_ > 0 THEN 1 ELSE NULL END) 'sleepStudentHasNotSchedule',
 		COUNT(CASE WHEN ss.over_course_num_ > 0 AND (ss.sub_course_num_ > 0 OR ss.no_schedule_num_ > 0) AND ss.lately_year_course_consumer_ &lt;= 0 AND ss.no_schedule_num_ &lt;= 0 THEN 1 ELSE NULL END) 'sleepStudentNoNotSchedule',
 		COUNT(CASE WHEN ss.last_visit_status_ = 'NORMAL' OR (ss.last_visit_status_ IS NULL AND (ss.no_schedule_num_ > 0 OR ss.sub_course_num_ > 0) AND ss.lately_year_course_consumer_ > 0) THEN 1 ELSE NULL END) 'normalStudentNum',