|
@@ -1110,43 +1110,6 @@
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="teacherIncomeStatOld" resultType="com.ym.mec.biz.dal.dto.LocalDateBigDecimalMapDto">
|
|
|
|
- SELECT
|
|
|
|
- <if test="month==null">
|
|
|
|
- CONCAT(DATE_FORMAT( cs.class_date_, '%Y-%m' ), '-01') date,
|
|
|
|
- CONCAT(DATE_FORMAT( cs.class_date_, '%Y-%m' )) dateStr,
|
|
|
|
- </if>
|
|
|
|
- <if test="month!=null">
|
|
|
|
- DATE_FORMAT( cs.class_date_, '%Y-%m-%d' ) date,
|
|
|
|
- DATE_FORMAT( cs.class_date_, '%Y-%m-%d' ) dateStr,
|
|
|
|
- </if>
|
|
|
|
- SUM( csts.subsidy_ ) amount
|
|
|
|
- FROM
|
|
|
|
- course_schedule_teacher_salary csts
|
|
|
|
- LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
|
|
|
|
- WHERE
|
|
|
|
- ( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
|
|
|
|
- AND ( cs.is_lock_ = 0 OR cs.is_lock_ IS NULL )
|
|
|
|
- AND ( cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_ )
|
|
|
|
- AND csts.user_id_ = #{teacherId}
|
|
|
|
- <if test="year!=null">
|
|
|
|
- AND YEAR ( cs.class_date_ ) = #{year}
|
|
|
|
- </if>
|
|
|
|
- AND csts.actual_salary_ > 0
|
|
|
|
- <if test="month!=null">
|
|
|
|
- AND MONTH(cs.class_date_) = #{month}
|
|
|
|
- </if>
|
|
|
|
- AND cs.class_date_ >= '2021-03-01'
|
|
|
|
- AND csts.settlement_time_ IS NOT NULL
|
|
|
|
- GROUP BY
|
|
|
|
- <if test="month==null">
|
|
|
|
- MONTH(cs.class_date_)
|
|
|
|
- </if>
|
|
|
|
- <if test="month!=null">
|
|
|
|
- DATE_FORMAT( cs.class_date_, '%Y-%m-%d' )
|
|
|
|
- </if>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
<select id="teacherIncomeStat" resultType="com.ym.mec.biz.dal.dto.LocalDateBigDecimalMapDto">
|
|
<select id="teacherIncomeStat" resultType="com.ym.mec.biz.dal.dto.LocalDateBigDecimalMapDto">
|
|
SELECT
|
|
SELECT
|
|
<if test="month==null">
|
|
<if test="month==null">
|