zouxuan 3 vuotta sitten
vanhempi
commit
3831dcbcb0

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

@@ -44,7 +44,7 @@ public interface StudentStatisticsDao extends BaseDAO<Integer, StudentStatistics
     Integer countAddStudentNum(@Param("groupType") String groupType, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("organIdList") List<Integer> organIdList);
 
     //统计续费人数
-    Integer countRenewStudentNum(@Param("groupType") String groupType, @Param("endDate") String endDate, @Param("organIdList") List<Integer> organIdList);
+    Integer countRenewStudentNum(@Param("groupType") String groupType, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("organIdList") List<Integer> organIdList);
 
     //统计回访人数
     Integer countVisitNum(@Param("groupType") String groupType, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("organIdList") List<Integer> organIdList);

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/InspectionItemPlanConclusionServiceImpl.java

@@ -12,11 +12,13 @@ import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.date.DateUtil;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ym.mec.biz.dal.entity.InspectionItemPlanConclusion;
 import com.ym.mec.biz.service.InspectionItemPlanConclusionService;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import java.util.*;
 import java.util.stream.Collectors;
@@ -43,6 +45,12 @@ public class InspectionItemPlanConclusionServiceImpl extends BaseServiceImpl<Lon
     public InspectionItemPlanConclusionDto add(InspectionItemPlanConclusionDto inspectionItemPlanConclusionDto) {
         Date nowDate = new Date();
         List<InspectionItemPlanConclusion> inspectionItemPlanConclusions = inspectionItemPlanConclusionDto.getInspectionItemPlanConclusions();
+        if(CollectionUtils.isEmpty(inspectionItemPlanConclusions)){
+            throw new BizException("请填写答案");
+        }
+        if(inspectionItemPlanConclusions.stream().anyMatch(e -> StringUtils.isEmpty(e.getCheckConclusion()))){
+            throw new BizException("请填写所有答案");
+        }
         //删除老的
         Long planId = inspectionItemPlanConclusions.get(0).getPlanId();
         Integer checkItem = inspectionItemPlanConclusions.get(0).getCheckItem();

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

@@ -106,7 +106,7 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 		//获取新增人数
 		sumForDateDto.setAddNum(studentStatisticsDao.countAddStudentNum(groupType,startDate,endDate,organIdList));
 		//获取续费人数
-		sumForDateDto.setRenewNum(studentStatisticsDao.countRenewStudentNum(groupType,endDate,organIdList));
+		sumForDateDto.setRenewNum(studentStatisticsDao.countRenewStudentNum(groupType,startDate,endDate,organIdList));
 		//获取回访人数
 		sumForDateDto.setVisitNum(studentStatisticsDao.countVisitNum(groupType,startDate,endDate,organIdList));
         return sumForDateDto;

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

@@ -941,7 +941,8 @@
         LEFT JOIN student_basic_info sbi ON sbi.user_id_ = sees.student_id_
         LEFT JOIN music_group mg ON mg.id_ = sees.music_group_id_
         LEFT JOIN course_schedule_student_payment cssp ON cssp.music_group_id_ = sees.music_group_id_ AND cssp.user_id_ = sees.student_id_ AND cssp.group_type_ = 'MUSIC'
-        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.del_flag_ = 0 AND cs.pre_course_flag_ = 0 AND cs.is_lock_ = 0 AND ( cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_ )
+        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.del_flag_ = 0 AND cs.pre_course_flag_ = 0
+        AND cs.is_lock_ = 0 AND ( cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_ ) AND cs.class_date_ BETWEEN #{monday} AND #{sunday}
         LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_ AND sa.user_id_ = cssp.user_id_ AND sa.status_ = 'NORMAL'
         WHERE sees.monday_ >= #{monday} AND sees.sunday_ &lt;= #{sunday}
         GROUP BY sees.student_id_,sees.music_group_id_) cs ON cs.student_id_ = sees.student_id_ AND cs.music_group_id_ = sees.music_group_id_