|
|
@@ -64,23 +64,24 @@
|
|
|
limit 1
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectPageData" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskPageVo" parameterType="com.xunmei.common.core.domain.edu.dto.CoreEduTrainingTaskPageDto">
|
|
|
-<!-- <include refid="selectCoreEduTrainingTaskVo"/>-->
|
|
|
-<!-- <where>-->
|
|
|
-<!-- <if test="request.title != null and request.title != ''">-->
|
|
|
-<!-- and title like concat('%', #{request.title}, '%')-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="request.type != null ">-->
|
|
|
-<!-- and type = #{request.type}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="request.status != null ">-->
|
|
|
-<!-- and status = #{request.status}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="request.range != null ">-->
|
|
|
-<!-- and start_date >= #{request.range[0]}-->
|
|
|
-<!-- and end_date <![CDATA[ <= ]]> #{request.range[1]}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- </where>-->
|
|
|
+ <select id="selectPageData" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskPageVo"
|
|
|
+ parameterType="com.xunmei.common.core.domain.edu.dto.CoreEduTrainingTaskPageDto">
|
|
|
+ <!-- <include refid="selectCoreEduTrainingTaskVo"/>-->
|
|
|
+ <!-- <where>-->
|
|
|
+ <!-- <if test="request.title != null and request.title != ''">-->
|
|
|
+ <!-- and title like concat('%', #{request.title}, '%')-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- <if test="request.type != null ">-->
|
|
|
+ <!-- and type = #{request.type}-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- <if test="request.status != null ">-->
|
|
|
+ <!-- and status = #{request.status}-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- <if test="request.range != null ">-->
|
|
|
+ <!-- and start_date >= #{request.range[0]}-->
|
|
|
+ <!-- and end_date <![CDATA[ <= ]]> #{request.range[1]}-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <!-- </where>-->
|
|
|
select t.id, plan_id, t.org_id, t.org_name, title, type, status, host_id,u.name as hostName,
|
|
|
start_date, end_date, training_start_date_time,training_end_date_time
|
|
|
from core_edu_training_task t left join sys_user u on t.host_id=u.id
|
|
|
@@ -133,4 +134,26 @@
|
|
|
|
|
|
where t.id = #{id}
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectReport" resultType="com.xunmei.common.core.domain.edu.vo.CoreEduTrainingTaskReportVo">
|
|
|
+ SELECT t.org_id AS orgId,
|
|
|
+ t.org_name AS orgName,
|
|
|
+ ifnull(count(0),0) AS shouldFinish,
|
|
|
+ ifnull(SUM(t.status != 3),0) AS finish
|
|
|
+ from core_edu_training_task t inner join sys_org o on t.org_id = o.id
|
|
|
+ <where>
|
|
|
+ <if test="request.orgId != null">
|
|
|
+ and o.parent_id=#{request.orgId}
|
|
|
+ </if>
|
|
|
+ <if test="request.planId != null">
|
|
|
+ and t.plan_id=#{request.planId}
|
|
|
+ </if>
|
|
|
+ <if test="request.startDate != null">
|
|
|
+ and t.start_date>=#{request.startDate}
|
|
|
+ </if>
|
|
|
+ <if test="request.endDate != null">
|
|
|
+ and t.start_date <![CDATA[<=]]> #{request.endDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|