Browse Source

Merge branch 'teacher_client_salary'

Joburgess 4 năm trước cách đây
mục cha
commit
74bab6a094

+ 0 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleTeacherSalaryDao.java

@@ -547,11 +547,6 @@ public interface CourseScheduleTeacherSalaryDao extends BaseDAO<Long, CourseSche
 													@Param("courseStatus") CourseStatusEnum courseStatus,
 													@Param("teachIncomeType") String teachIncomeType);
 
-
-	List<LocalDateBigDecimalMapDto> teacherIncomeStatOld(@Param("teacherId") Integer teacherId,
-													  @Param("year") Integer year,
-													  @Param("month") Integer month);
-
 	/**
 	 * @describe 教师年度收入统计
 	 * @author Joburgess

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -2321,7 +2321,7 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
             return result;
         }
 
-        List<LocalDateBigDecimalMapDto> monthIncomeMapList = courseScheduleTeacherSalaryDao.teacherIncomeStatOld(teacherId, year, month);
+        List<LocalDateBigDecimalMapDto> monthIncomeMapList = courseScheduleTeacherSalaryDao.teacherIncomeStat(teacherId, year, month);
 
         if(CollectionUtils.isEmpty(monthIncomeMapList)){
             return result;

+ 0 - 37
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -1110,43 +1110,6 @@
 			</if>
 	</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_ &gt; 0
-		<if test="month!=null">
-			AND MONTH(cs.class_date_) = #{month}
-		</if>
-		AND cs.class_date_ &gt;= '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
 			<if test="month==null">