|
@@ -26,6 +26,29 @@
|
|
|
select="com.ym.mec.biz.dal.dao.SubjectDao.findBySubjectByIdList"
|
|
|
column="{subjectIdList = tcs.subject_id_list_}"/>
|
|
|
</resultMap>
|
|
|
+
|
|
|
+ <resultMap id="TeacherCourseStatistics1" type="com.ym.mec.biz.dal.entity.TeacherCourseStatistics">
|
|
|
+ <result column="id_" jdbcType="BIGINT" property="id"/>
|
|
|
+ <result column="user_id_" jdbcType="INTEGER" property="userId"/>
|
|
|
+ <result column="organ_id_" jdbcType="INTEGER" property="organId"/>
|
|
|
+ <result column="month_" jdbcType="DATE" property="month"/>
|
|
|
+ <result column="subject_id_list_" jdbcType="VARCHAR" property="subjectIdList"/>
|
|
|
+ <result column="vip_course_num_" jdbcType="INTEGER" property="vipCourseNum"/>
|
|
|
+ <result column="music_course_num_" jdbcType="INTEGER" property="musicCourseNum"/>
|
|
|
+ <result column="practice_course_num_" jdbcType="INTEGER" property="practiceCourseNum"/>
|
|
|
+ <result column="expect_music_course_salary_" jdbcType="DECIMAL" property="expectMusicCourseSalary"/>
|
|
|
+ <result column="expect_vip_course_salary_" jdbcType="DECIMAL" property="expectVipCourseSalary"/>
|
|
|
+ <result column="expect_practice_course_salary_" jdbcType="DECIMAL" property="expectPracticeCourseSalary"/>
|
|
|
+ <result column="expect_total_salary_" jdbcType="DECIMAL" property="expectTotalSalary"/>
|
|
|
+ <result column="low_salary" jdbcType="DECIMAL" property="lowSalary"/>
|
|
|
+ <result column="average_class_minutes_" jdbcType="INTEGER" property="averageClassMinutes"/>
|
|
|
+ <result column="statistics_date_time_" jdbcType="DATE" property="statisticsDateTime"/>
|
|
|
+ <result column="group_type_" jdbcType="VARCHAR" property="groupType"/>
|
|
|
+ <result column="real_name_" jdbcType="VARCHAR" property="realName"/>
|
|
|
+ <result column="phone_" jdbcType="VARCHAR" property="phone"/>
|
|
|
+ <result column="organ_name_" jdbcType="VARCHAR" property="organName"/>
|
|
|
+ <result column="month_str_" jdbcType="VARCHAR" property="monthStr"/>
|
|
|
+ </resultMap>
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.TeacherCourseStatistics" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
INSERT INTO teacher_course_statistics (id_, user_id_, organ_id_, month_,
|
|
@@ -60,7 +83,7 @@
|
|
|
</delete>
|
|
|
|
|
|
<!-- 查找下月排课小于基准课酬的老师-->
|
|
|
- <select id="findUserByWarringSalary" resultMap="TeacherCourseStatistics"><![CDATA[
|
|
|
+ <select id="findUserByWarringSalary" resultMap="TeacherCourseStatistics1"><![CDATA[
|
|
|
SELECT ctt.expect_total_salary_, t.id_ user_id_,t.organ_id_,t.subject_id_ subject_id_list_,
|
|
|
ctt.average_class_minutes_
|
|
|
FROM teacher t
|
|
@@ -83,7 +106,7 @@
|
|
|
AND t.organ_id_ IS NOT NULL
|
|
|
]]>
|
|
|
</select>
|
|
|
- <select id="findUserCourseSalaryByUserIds" resultMap="TeacherCourseStatistics">
|
|
|
+ <select id="findUserCourseSalaryByUserIds" resultMap="TeacherCourseStatistics1">
|
|
|
SELECT SUM(csts.expect_salary_) expect_total_salary_, COUNT(csts.id_) music_course_num_, csts.user_id_, csts.group_type_
|
|
|
FROM course_schedule_teacher_salary csts LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
|
|
|
WHERE csts.user_id_ IN
|