Commit f7d7122a by 宋珺琪

查询任务列表 添加筛选条件

parent a642344f
......@@ -39,4 +39,14 @@ public class SkRegionalsTaskParam {
* 列数
*/
private Integer pageSize;
/**
* 任务状态
*/
private String state;
/**
*任务编号(RW开头)
*/
private String taskId;
}
......@@ -77,46 +77,52 @@
</insert>
<!--任务查询-->
<select id="queryTaskInfoList" parameterType="com.founder.commonutils.model.vo.param.SkRegionalsTaskParam" resultType="com.founder.commonutils.model.newPublicEntity.SkRegionalsTask">
SELECT
a.taskid,
a.taskcaseid,
a.taskname,
a.tasktype,
a.typename,
a.objectvalue,
a.sfread,
a.state,
a.statename,
a.fsrjh,
a.fsridentity,
a.fsrxm,
a.fssj,
a.isdeleted,
CASE WHEN (tasktype like CONCAT('skph_','%')or tasktype like CONCAT('skbs','%')) then
(SELECT count(distinct(t.objectValue)) FROM sk_regionals_result t WHERE t.taskId = a.taskId)
ELSE
( SELECT count(*) FROM sk_regionals_result t WHERE t.taskId = a.taskId)end AS resultCount
FROM
sk_regionals_task a
WHERE isDeleted = '0' and (taskCaseId != 'test'or taskCaseId IS NULL)
<if test="taskname != null and taskname != ''">
and a.taskName like concat('%', #{taskname , jdbcType=VARCHAR }, '%')
</if>
<if test="tasktypeList!=null">
and a.taskType in
<foreach item="item" index="index" collection="tasktypeList" open="(" separator="," close=" )">
#{item}
</foreach>
</if>
<if test="kssj!= null and kssj!=''">
AND a.fssj <![CDATA[>=]]> DATE_FORMAT(#{kssj},'%Y-%m-%d %H:%i:%S')
</if>
<if test="jssj!= null and jssj!=''">
AND a.fssj <![CDATA[<=]]> DATE_FORMAT(#{jssj},'%Y-%m-%d %H:%i:%S')
</if>
ORDER BY
fssj DESC
LIMIT #{page},#{pageSize}
SELECT
a.taskid,
a.taskcaseid,
a.taskname,
a.tasktype,
a.typename,
a.objectvalue,
a.sfread,
a.state,
a.statename,
a.fsrjh,
a.fsridentity,
a.fsrxm,
a.fssj,
a.isdeleted,
CASE WHEN (tasktype like CONCAT('skph_','%')or tasktype like CONCAT('skbs','%')) then
(SELECT count(distinct(t.objectValue)) FROM sk_regionals_result t WHERE t.taskId = a.taskId)
ELSE
( SELECT count(*) FROM sk_regionals_result t WHERE t.taskId = a.taskId)end AS resultCount
FROM
sk_regionals_task a
WHERE isDeleted = '0' and (taskCaseId != 'test'or taskCaseId IS NULL)
<if test="taskname != null and taskname != ''">
and a.taskName like concat('%', #{taskname , jdbcType=VARCHAR }, '%')
</if>
<if test="tasktypeList!=null">
and a.taskType in
<foreach item="item" index="index" collection="tasktypeList" open="(" separator="," close=" )">
#{item}
</foreach>
</if>
<if test="kssj!= null and kssj!=''">
AND a.fssj <![CDATA[>=]]> DATE_FORMAT(#{kssj},'%Y-%m-%d %H:%i:%S')
</if>
<if test="jssj!= null and jssj!=''">
AND a.fssj <![CDATA[<=]]> DATE_FORMAT(#{jssj},'%Y-%m-%d %H:%i:%S')
</if>
<if test="state != null and state != ''">
AND a.state = #{state , jdbcType=VARCHAR }
</if>
<if test="taskId != null and taskId != ''">
AND a.taskId = #{taskId , jdbcType=VARCHAR }
</if>
ORDER BY
fssj DESC
LIMIT #{page},#{pageSize}
</select>
<!--任务总数查询-->
<select id="queryTaskInfoListCount" parameterType="com.founder.commonutils.model.vo.param.SkRegionalsTaskParam" resultType="java.lang.Integer">
......@@ -140,6 +146,12 @@ ORDER BY
<if test="jssj!= null and jssj!=''">
AND a.fssj <![CDATA[<=]]> DATE_FORMAT(#{jssj},'%Y-%m-%d %H:%i:%S')
</if>
<if test="state != null and state != ''">
AND a.state = #{state , jdbcType=VARCHAR }
</if>
<if test="taskId != null and taskId != ''">
AND a.taskId = #{taskId , jdbcType=VARCHAR }
</if>
</select>
<!--根据任务id查询区域信息-->
<select id="queryRegionalsList" parameterType="String" resultType="com.founder.commonutils.model.vo.param.RegionalsParam">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment