|
@@ -0,0 +1,33 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
+<mapper namespace="cn.cslg.report.mapper.TaskMapper">
|
|
|
+ <select id="queryTasks" resultType="cn.cslg.report.common.model.vo.TaskReportVO" >
|
|
|
+ select a.* ,b.TYPE as reportType from TASK a left join REPORT b on a.REPORT_ID=b.ID
|
|
|
+ <where>
|
|
|
+<if test="param.type !=null">
|
|
|
+ and a.TYPE =#{param.type}
|
|
|
+</if>
|
|
|
+ <if test="param.taskStatus !=null">
|
|
|
+and a.TASK_STATUS=#{param.taskStatus}
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <if test="param.createName !=null">
|
|
|
+and a.CREATE_NAME like concat('%', #{param.createName}, '%')
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <if test="param.taskName !=null">
|
|
|
+and a.TASK_NAME like concat('%', #{param.taskName}, '%')
|
|
|
+
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="param.roleInTask !=null and param.roleInTask == 0">
|
|
|
+and a.CREATE_ID=#{param.loginId}
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <if test="param.roleInTask !=null and param.roleInTask == 1">
|
|
|
+ and a.HANDLE_PERSON_ID=#{param.loginId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by a.id desc
|
|
|
+ </select>
|
|
|
+</mapper>
|