Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
f7d7122a
Commit
f7d7122a
authored
Oct 31, 2022
by
宋珺琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询任务列表 添加筛选条件
parent
a642344f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
40 deletions
+62
-40
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkRegionalsTaskParam.java
+10
-0
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/SkRegionalsTaskMapper.xml
+52
-40
No files found.
common/common_utils/src/main/java/com/founder/commonutils/model/vo/param/SkRegionalsTaskParam.java
View file @
f7d7122a
...
...
@@ -39,4 +39,14 @@ public class SkRegionalsTaskParam {
* 列数
*/
private
Integer
pageSize
;
/**
* 任务状态
*/
private
String
state
;
/**
*任务编号(RW开头)
*/
private
String
taskId
;
}
service/publicapi/src/main/java/com/founder/publicapi/mapper/mysqlMapper/xml/SkRegionalsTaskMapper.xml
View file @
f7d7122a
...
...
@@ -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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment