mingfu 1 месяц назад
Родитель
Сommit
780189ad8a

+ 1 - 0
ie-system/src/main/java/com/ruoyi/learn/mapper/LearnPlanStudyMapper.java

@@ -23,6 +23,7 @@ public interface LearnPlanStudyMapper
      */
     public LearnPlanStudy selectLearnPlanStudyById(String id);
 
+    public List<LearnPlanStudy> selectLearnPlanStudyListByMonth(LearnPlanStudy learnPlanStudy);
     /**
      * 查询学生计划执行情况列表
      * 

+ 1 - 1
ie-system/src/main/java/com/ruoyi/learn/service/impl/LearnPlanStudyServiceImpl.java

@@ -28,7 +28,7 @@ public class LearnPlanStudyServiceImpl implements ILearnPlanStudyService
         Map<Date, LearnPlanStudy> questionMap = learnPlanStudyMapper.selectQuestionStats(learnPlanStudy).stream().collect(Collectors.toMap(LearnPlanStudy::getReportDate, t -> t));
         Map<Date, LearnPlanStudy> videoMap = learnPlanStudyMapper.selectVideoStats(learnPlanStudy).stream().collect(Collectors.toMap(LearnPlanStudy::getReportDate, t -> t));
 
-        List<LearnPlanStudy> studyList = learnPlanStudyMapper.selectLearnPlanStudyList(learnPlanStudy);
+        List<LearnPlanStudy> studyList = learnPlanStudyMapper.selectLearnPlanStudyListByMonth(learnPlanStudy);
         for(LearnPlanStudy study : studyList) {
             LearnPlanStudy question = questionMap.get(study.getReportDate());
             LearnPlanStudy video = videoMap.get(study.getReportDate());

+ 17 - 0
ie-system/src/main/resources/mapper/learn/LearnPlanStudyMapper.xml

@@ -53,6 +53,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by report_date
     </select>
+
+    <select id="selectLearnPlanStudyListByMonth" parameterType="LearnPlanStudy" resultMap="LearnPlanStudyResult">
+        <include refid="selectLearnPlanStudyVo"/>
+        <where>
+            <if test="studentId != null "> and student_id = #{studentId}</if>
+            <if test="planId != null "> and plan_id = #{planId}</if>
+            <if test="monthSeq != null "> and month_seq = #{monthSeq}</if>
+            <if test="weekSeq != null "> and week_seq = #{weekSeq}</if>
+            <if test="reportDate != null "> and DATE_FORMAT(report_date, '%Y%m') = DATE_FORMAT(#{reportDate}, '%Y%m')</if>
+            <if test="questionCount != null "> and question_count = #{questionCount}</if>
+            <if test="videoCount != null "> and video_count = #{videoCount}</if>
+            <if test="videoTime != null "> and video_time = #{videoTime}</if>
+            <if test="questionPlan != null "> and question_plan = #{questionPlan}</if>
+            <if test="videoPlan != null "> and video_plan = #{videoPlan}</if>
+        </where>
+        order by report_date
+    </select>
     
     <select id="selectLearnPlanStudyById" parameterType="String" resultMap="LearnPlanStudyResult">
         <include refid="selectLearnPlanStudyVo"/>