123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?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="com.wtkj.mapper.TaskMapper">
- <select id="selectByExecute" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0
- <if test="param1 != null">
- and org_dept_id = #{param1}
- </if>
- <if test="param2 != null">
- and execute_user like concat(concat('%',#{param2}),'%')
- </if>
- </select>
- <select id="todayTo" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and execute_user like concat(concat('%',#{param1}),'%')
- and
- DATE_FORMAT(end_time,'%Y-%m-%d') = DATE_FORMAT(#{param2},'%Y-%m-%d') and task_status != 4 and task_status != 5
- order by create_time
- </select>
- <select id="todayExpire" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and execute_user like concat(concat('%',#{param1}),'%')
- and
- DATE_FORMAT(#{param2},'%Y-%m-%d') > DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and task_status != 5
- order by create_time
- </select>
- <select id="getTodoAndExpireByUserId" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and execute_user like concat(concat('%',#{param1}),'%')
- and
- DATE_FORMAT(#{param2},'%Y-%m-%d') >= DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and task_status != 5
- order by create_time
- </select>
- <select id="getByDeptAndDate" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0
- <if test="param1 != null">
- and org_dept_id = #{param1}
- </if>
- <if test="param2 != null">
- and execute_dept = #{param2}
- </if>
- <if test="param3 != null">
- and execute_user like concat(concat('%',#{param3}),'%')
- </if>
- <if test="param4 != null">
- and DATE_FORMAT(#{param4},'%Y-%m-%d') >= DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and
- task_status != 5
- </if>
- order by create_time
- </select>
- <select id="getByExecuteDept" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and execute_dept = #{param}
- order by create_time
- </select>
- <select id="selectByCompetentUnit" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and competent_unit = #{param}
- order by create_time
- </select>
- <select id="getTodayTodoByOrgDeptId" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and org_dept_id = #{param1} and
- DATE_FORMAT(#{param2},'%Y-%m-%d') = DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and task_status != 5
- order by create_time
- </select>
- <select id="getTodoByYear" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and year = #{param2} and task_status != 4 and task_status != 5 and
- task_status != 6 and
- project_id in
- <foreach collection="param1" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </select>
- <select id="selectLeftByDateAndStage" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and stage_id = #{param1} and
- DATE_FORMAT(#{param2},'%Y-%m-%d') = DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and task_status != 5
- </select>
- <select id="selectByDateAndStageAndStatus" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and stage_id = #{param1} and
- DATE_FORMAT(#{param2},'%Y-%m-%d') = DATE_FORMAT(end_time,'%Y-%m-%d') and task_status = #{param3}
- </select>
- <select id="selectCurrentDateCompleteByStageAndDate" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and stage_id = #{param1} and
- DATE_FORMAT(#{param2},'%Y-%m-%d') = DATE_FORMAT(confirm_time,'%Y-%m-%d')
- <if test="param3 != null">
- and task_status = #{param3}
- </if>
- </select>
- <select id="getTodayToExpire" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and
- DATE_FORMAT(#{param},'%Y-%m-%d') > DATE_FORMAT(end_time,'%Y-%m-%d') and task_status != 4 and task_status != 5
- and task_status != 6
- </select>
- <select id="selectByTaskStatus" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and task_status = #{param}
- </select>
- <select id="getByProjectId" resultType="com.wtkj.entity.Task">
- select * from blade_task where is_deleted = 0 and project_id = #{param}
- </select>
- </mapper>
|