Forráskód Böngészése

1、课酬确认相关

Joburgess 5 éve
szülő
commit
7d6988b9d7

+ 10 - 4
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -450,7 +450,8 @@
 	</update>
 	<update id="updateTeacherSalaryConfirmStatus">
 		UPDATE course_schedule_teacher_salary SET confirm_status_=#{confirmStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-		WHERE id_ IN
+		WHERE group_type_!='COMM'
+		AND id_ IN
 		<foreach collection="ids" item="id" open="(" close=")" separator=",">
 			#{id}
 		</foreach>
@@ -458,6 +459,7 @@
 	<update id="updateTeacherSalaryConfirmStatusToComplied">
 		UPDATE course_schedule_teacher_salary SET confirm_status_=3
 		WHERE confirm_status_!=2
+        AND group_type_!='COMM'
 		AND id_ IN
 		<foreach collection="ids" item="id" open="(" close=")" separator=",">
 			#{id}
@@ -754,6 +756,7 @@
 	<sql id="queryCourseSalaryCondition">
 		<where>
 			(cs.del_flag_ IS NULL OR cs.del_flag_=0)
+            AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="teacherId!=null">
 				AND csts.user_id_=#{teacherId}
@@ -882,6 +885,7 @@
 			LEFT JOIN course_schedule cs ON csts.course_schedule_id_ = cs.id_
 		WHERE
 			( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+			AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="teacherId!=null">
 				AND csts.user_id_ = #{teacherId}
@@ -895,9 +899,10 @@
         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 csts.settlement_time_ IS NOT NULL
-        AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
+        	( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
+			AND csts.group_type_!='COMM'
+        	AND csts.settlement_time_ IS NOT NULL
+        	AND DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
     </select>
 
 	<select id="countOpenConfirmSalarysWithMonth" resultType="int">
@@ -908,6 +913,7 @@
 			LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
 		WHERE
 			DATE_FORMAT( cs.class_date_, '%Y-%m' ) = #{month}
+			AND csts.group_type_!='COMM'
 			AND csts.settlement_time_ IS NOT NULL
 			<if test="confirmStatus!=null">
 				AND csts.confirm_status_=#{confirmStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}

+ 2 - 3
mec-web/src/main/java/com/ym/mec/web/controller/CourseScheduleTeacherSalaryController.java

@@ -13,7 +13,6 @@ import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
-import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -77,11 +76,11 @@ public class CourseScheduleTeacherSalaryController extends BaseController {
 
         Map<String, Object> result=new HashMap<>();
         result.put("pageInfo", courseScheduleTeacherSalaryService.findIsSettlementCourseSalarys(queryInfo));
-        int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM"), TeacherSalaryConfirmStatus.UNCONFIRMED);
+        int i = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(queryInfo.getMonth(), TeacherSalaryConfirmStatus.UNCONFIRMED);
         if(i>0){
             result.put("isOpenConfirm", 1);
         }else{
-            int j = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(DateUtil.dateToString(DateUtil.addMonths(new Date(), -1), "yyyy-MM"), null);
+            int j = courseScheduleTeacherSalaryDao.countOpenConfirmSalarysWithMonth(queryInfo.getMonth(), null);
             if(j<=0){
                 result.put("isOpenConfirm", 2);
             }else{