ソースを参照

1、课酬确认相关
2、VIP课导出添加学生姓名和编号
3、学员服务信息统计优化

Joburgess 5 年 前
コミット
6c895be7a0

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentExtracurricularExercisesSituationDao.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
+import com.ym.mec.biz.dal.dto.TeacherExercisesServiceDto;
 import com.ym.mec.biz.dal.entity.StudentExtracurricularExercisesSituation;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
@@ -32,5 +33,16 @@ public interface StudentExtracurricularExercisesSituationDao extends BaseDAO<Lon
     int countExercisesSituations(Map<String, Object> params);
 
     List<StudentExercisesSituationDto> findExercisesSituationsById(@Param("ids") List<Long> ids);
+
+    /**
+     * @describe 统计老师指定星期的服务指标
+     * @author Joburgess
+     * @date 2020/4/17
+     * @param monday:
+     * @param teacherIds:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.TeaherExercisesServiceDto>
+     */
+    List<TeacherExercisesServiceDto> findTeacherExercisesServiceSituations(@Param("monday") String monday,
+                                                                           @Param("teacherIds") List<Integer> teacherIds);
 	
 }

+ 40 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherExercisesServiceDto.java

@@ -0,0 +1,40 @@
+package com.ym.mec.biz.dal.dto;
+
+/**
+ * @Author Joburgess
+ * @Date 2020/4/17
+ */
+public class TeacherExercisesServiceDto {
+
+    private Integer teacherId;
+
+    /** 预期训练次数 */
+    private Integer expectExercisesNum;
+
+    /** 实际训练次数 */
+    private Integer actualExercisesNum;
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Integer getExpectExercisesNum() {
+        return expectExercisesNum;
+    }
+
+    public void setExpectExercisesNum(Integer expectExercisesNum) {
+        this.expectExercisesNum = expectExercisesNum;
+    }
+
+    public Integer getActualExercisesNum() {
+        return actualExercisesNum;
+    }
+
+    public void setActualExercisesNum(Integer actualExercisesNum) {
+        this.actualExercisesNum = actualExercisesNum;
+    }
+}

+ 15 - 0
mec-biz/src/main/resources/config/mybatis/StudentExtracurricularExercisesSituationMapper.xml

@@ -233,4 +233,19 @@
 			#{id}
 		</foreach>
 	</select>
+    <select id="findTeacherExercisesServiceSituations" resultType="com.ym.mec.biz.dal.dto.TeacherExercisesServiceDto">
+		SELECT
+			teacher_id_ teacherId,
+			COUNT( exercises_reply_num_ ) expectExercisesNum,
+			COUNT( CASE WHEN actual_exercises_num_ = 1 THEN 1 ELSE NULL END ) actualExercisesNum
+		FROM
+			student_extracurricular_exercises_situation_
+		WHERE DATE_FORMAT(monday_, '%Y-%m') = #{monday}
+			AND teacher_id_ IN
+			<foreach collection="teacherIds" item="teacherId" open="(" close=")" separator=",">
+				#{teacherId}
+			</foreach>
+		GROUP BY
+			teacher_id_;
+    </select>
 </mapper>