Pārlūkot izejas kodu

老师详情右上角去掉运营指标统计

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

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

@@ -35,14 +35,6 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
 
     int batchUpdate(@Param("studentList") List<Student> studentList);
 
-    /**
-     * 批量获取老师体验学生数
-     *
-     * @param teacherIds
-     * @return
-     */
-    List<Map<Integer, Integer>> getTeacherOperatingStudentsNum(@Param("teacherIds") String teacherIds);
-
     List<String> getStudentNames(@Param("studentIds") List<Integer> studentIds);
 
     List<SimpleUserDto> getStudentsWithOrgan(Map<String, Object> params);
@@ -50,30 +42,6 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
     int countStudentsWithOrgan(Map<String, Object> params);
 
     /**
-     * 根据类型批量获取老师转化
-     *
-     * @param teacherIds
-     * @param groupType
-     * @return
-     */
-    List<Map<Integer, Integer>> getBuyNums(@Param("teacherId") String teacherId, @Param("groupType") GroupType groupType);
-
-    /**
-     * 根据同事存在vip和网管的转化
-     *
-     * @param teacherIds
-     * @return
-     */
-    List<Map<Integer, Integer>> getPracticeAndVipNums(@Param("teacherIds") String teacherIds);
-
-    /**
-     * @return java.util.List<com.ym.mec.biz.dal.entity.Student>
-     * @describe 获取服务学员列表
-     * @author Joburgess
-     * @date 2020.04.29
-     */
-
-    /**
      * @return java.util.List<java.lang.Integer>
      * @describe 获取被服务学员id列表
      * @author Joburgess

+ 5 - 16
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/Teacher.java

@@ -1,18 +1,16 @@
 package com.ym.mec.biz.dal.entity;
 
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.enums.JobNatureEnum;
+import com.ym.mec.biz.dal.enums.JobTypeEnum;
+import com.ym.mec.biz.dal.enums.ProbationPeriodEnum;
 import io.swagger.annotations.ApiModelProperty;
+import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-
-import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.enums.JobNatureEnum;
-import com.ym.mec.biz.dal.enums.JobTypeEnum;
-import com.ym.mec.biz.dal.enums.ProbationPeriodEnum;
-
 /**
  * 对应数据库表(teacher):
  */
@@ -122,7 +120,6 @@ public class Teacher extends SysUser {
 	
 	private String contractUrl;
 
-	private BigDecimal operatingIndex;
 	private BigDecimal serviceIndex;
 
 	@ApiModelProperty(value = "是否结算课酬")
@@ -145,14 +142,6 @@ public class Teacher extends SysUser {
 		this.isSettlementSalary = isSettlementSalary;
 	}
 
-	public BigDecimal getOperatingIndex() {
-		return operatingIndex;
-	}
-
-	public void setOperatingIndex(BigDecimal operatingIndex) {
-		this.operatingIndex = operatingIndex;
-	}
-
 	public BigDecimal getServiceIndex() {
 		return serviceIndex;
 	}

+ 0 - 18
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -7,7 +7,6 @@ import com.ym.mec.auth.api.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.page.*;
 import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.OaUserService;
@@ -623,11 +622,6 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> implem
                 teacherServiceMap = teacherExercisesServiceSituations.stream().collect(Collectors.toMap(TeacherExercisesServiceDto::getTeacherId, t -> t));
             }
 
-            Map<Integer, String> operatingStudentsNum = MapUtil.convertMybatisMap(studentDao.getTeacherOperatingStudentsNum(id.toString()));
-            Map<Integer, String> practiceStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(id.toString(), GroupType.PRACTICE));
-            Map<Integer, String> vipStudentsNum = MapUtil.convertMybatisMap(studentDao.getBuyNums(id.toString(), GroupType.VIP));
-            Map<Integer, String> practiceAndVipStudentsNum = MapUtil.convertMybatisMap(studentDao.getPracticeAndVipNums(id.toString()));
-
             //获取老师教学点列表
             List<School> teacherSchools = schoolDao.findByUserId(id);
             teacher.setTeacherSchools(teacherSchools);
@@ -654,18 +648,6 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> implem
             } else {
                 teacher.setServiceIndex(BigDecimal.ZERO);
             }
-            //运营指标
-            String studentNum = operatingStudentsNum.get(id);
-            if (studentNum != null) {
-                String practiceNum = practiceStudentsNum.get(id) == null ? "0" : practiceStudentsNum.get(id);
-                String vipNum = vipStudentsNum.get(id) == null ? "0" : vipStudentsNum.get(id);
-                String practiceAndVipNum = practiceAndVipStudentsNum.get(id) == null ? "0" : practiceAndVipStudentsNum.get(id);
-                int allNum = Integer.parseInt(practiceNum) + Integer.parseInt(vipNum) - Integer.parseInt(practiceAndVipNum);
-                BigDecimal operatingIndex = new BigDecimal(allNum).multiply(new BigDecimal(100)).divide(new BigDecimal(studentNum), CommonConstants.DECIMAL_FINAL_PLACE, BigDecimal.ROUND_HALF_UP);
-                teacher.setOperatingIndex(operatingIndex);
-            } else {
-                teacher.setOperatingIndex(BigDecimal.ZERO);
-            }
         }
         return teacher;
     }

+ 0 - 48
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -350,54 +350,6 @@
         </foreach>
     </update>
 
-    <select id="getTeacherOperatingStudentsNum" resultType="java.util.Map">
-        select teacher_id_ 'key', count(*) 'value'
-        FROM student
-        WHERE FIND_IN_SET(teacher_id_, #{teacherIds})
-          AND operating_tag_ = 1
-        GROUP BY teacher_id_
-    </select>
-
-    <select id="getBuyNums" resultType="java.util.Map">
-        SELECT s.teacher_id_ 'key', COUNT(DISTINCT cssp.user_id_) 'value'
-        FROM course_schedule_student_payment cssp
-        LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.teach_mode_ = 'ONLINE'
-        LEFT JOIN student s ON s.user_id_ = cssp.user_id_
-        <if test="groupType != null and groupType==@com.ym.mec.biz.dal.enums.GroupType@PRACTICE">
-            LEFT JOIN practice_group pg ON cssp.music_group_id_ = pg.id_ AND cssp.group_type_ = 'PRACTICE'
-        </if>
-        WHERE s.teacher_id_ = #{teacherId}
-        AND cs.status_ IN ('NOT_START', 'UNDERWAY')
-        AND (cs.is_lock_ IS NULL OR cs.is_lock_ = 0)
-        <if test="groupType != null">
-            AND cs.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-        </if>
-        <if test="groupType != null and groupType==@com.ym.mec.biz.dal.enums.GroupType@PRACTICE">
-            AND pg.group_status_ IN ('NORMAL', 'FINISH')
-            AND pg.buy_months_ >= 1
-        </if>
-        GROUP BY s.teacher_id_
-    </select>
-    <select id="getPracticeAndVipNums" resultType="java.util.Map">
-        SELECT s.teacher_id_ 'key', COUNT(DISTINCT pg.student_id_) 'value'
-        FROM practice_group pg
-                 LEFT JOIN student s on s.user_id_ = pg.student_id_
-                 LEFT JOIN course_schedule_student_payment vcssp
-                           ON vcssp.user_id_ = pg.student_id_ AND vcssp.group_type_ = 'VIP'
-                 LEFT JOIN course_schedule_student_payment pcssp
-                           ON pcssp.user_id_ = pg.student_id_ AND pcssp.group_type_ = 'PRACTICE'
-                 LEFT JOIN course_schedule vcs ON vcs.id_ = vcssp.course_schedule_id_ AND vcs.teach_mode_ = 'ONLINE'
-                 LEFT JOIN course_schedule pcs ON pcs.id_ = pcssp.course_schedule_id_
-        WHERE FIND_IN_SET(s.teacher_id_, #{teacherIds})
-          AND pg.group_status_ IN ('NORMAL', 'FINISH')
-          AND vcs.status_ IN ('NOT_START', 'UNDERWAY')
-          AND pcs.status_ IN ('NOT_START', 'UNDERWAY')
-          AND (vcs.is_lock_ IS NULL OR vcs.is_lock_ = 0)
-          AND (pcs.is_lock_ IS NULL OR pcs.is_lock_ = 0)
-          AND pg.buy_months_ >= 1
-        GROUP BY s.teacher_id_
-    </select>
-
     <select id="getServeStudentIds" resultType="int">
         SELECT user_id_
         FROM student stu