需求增加筛选
This commit is contained in:
@@ -257,11 +257,16 @@
|
||||
and closedBy =#{qo.userName}
|
||||
</if>
|
||||
|
||||
<if test="qo.stageList != null and qo.stageList.size() > 0">
|
||||
and s.stage in
|
||||
<foreach collection="qo.stageList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
|
||||
group by s.id
|
||||
|
||||
|
||||
<choose>
|
||||
<when test="qo.orderName != '' and qo.orderName != null ">
|
||||
<choose>
|
||||
@@ -277,21 +282,10 @@
|
||||
order by s.id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
|
||||
|
||||
|
||||
-- order by id desc
|
||||
|
||||
|
||||
</select>
|
||||
<select id="projectStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
select s.id,
|
||||
select s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
@@ -363,23 +357,23 @@
|
||||
s.ys_date,
|
||||
s.devel_plan_end_time,
|
||||
s.test_plan_end_time,
|
||||
pt.name productName
|
||||
from zt_story s
|
||||
pt.name productName
|
||||
from zt_story s
|
||||
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
|
||||
left join zt_project pj on pstory.project = pj.id
|
||||
left join zt_product pt on s.product = pt.id
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
|
||||
left join zt_project pj on pstory.project = pj.id
|
||||
left join zt_product pt on s.product = pt.id
|
||||
left join zt_projectstory ps on s.id = ps.story
|
||||
WHERE 1=1
|
||||
WHERE 1=1
|
||||
|
||||
|
||||
<!-- <if test="qo.startDate !=null">-->
|
||||
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="qo.endDate !=null">-->
|
||||
<!-- and s.openedDate <![CDATA[<=]]> #{qo.endDate}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="qo.startDate !=null">-->
|
||||
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="qo.endDate !=null">-->
|
||||
<!-- and s.openedDate <![CDATA[<=]]> #{qo.endDate}-->
|
||||
<!-- </if>-->
|
||||
<if test="qo.pri != null and qo.pri != '' ">
|
||||
and s.pri = #{qo.pri}
|
||||
</if>
|
||||
@@ -391,7 +385,7 @@
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'WYS' ">
|
||||
and s.ys_user = #{qo.userName}
|
||||
and s.ys_user = #{qo.userName}
|
||||
</if>
|
||||
|
||||
<if test="qo.stage != null and qo.stage != '' ">
|
||||
@@ -418,50 +412,49 @@
|
||||
</if>
|
||||
|
||||
<if test="qo.productName != null and qo.productName != '' ">
|
||||
and pt.name like concat('%', #{qo.productName}, '%')
|
||||
and pt.name like concat('%', #{qo.productName}, '%')
|
||||
</if>
|
||||
|
||||
<if test="qo.project != null ">
|
||||
and ps.project =#{qo.project}
|
||||
and ps.type= 'project'
|
||||
</if>
|
||||
<if test="qo.execution != null ">
|
||||
and ps.project =#{qo.execution}
|
||||
and ps.type= 'execution'
|
||||
</if>
|
||||
<if test="qo.moduleId != null ">
|
||||
and s.module =#{qo.moduleId}
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
|
||||
<if test="qo.project != null ">
|
||||
and ps.project =#{qo.project}
|
||||
and ps.type= 'project'
|
||||
</if>
|
||||
<if test="qo.execution != null ">
|
||||
and ps.project =#{qo.execution}
|
||||
and ps.type= 'execution'
|
||||
</if>
|
||||
<if test="qo.moduleId != null ">
|
||||
and s.module =#{qo.moduleId}
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
|
||||
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
|
||||
and s.status !='closed'
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
|
||||
and s.assignedTo = #{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
|
||||
and s.status !='closed'
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
|
||||
and s.assignedTo = #{qo.userName}
|
||||
</if>
|
||||
|
||||
<if test="qo.kfz == 1 ">
|
||||
<if test="qo.userName != null and qo.userName != '' ">
|
||||
|
||||
and
|
||||
(s.assignedTo = #{qo.userName}
|
||||
or s.openedBy = #{qo.userName}
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="qo.kfz == 1 ">
|
||||
<if test="qo.userName != null and qo.userName != '' ">
|
||||
|
||||
and
|
||||
(s.assignedTo = #{qo.userName}
|
||||
or s.openedBy = #{qo.userName}
|
||||
)
|
||||
</if>
|
||||
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
|
||||
and s.openedBy = #{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'YWPS' ">
|
||||
and v.reviewer = #{qo.userName}
|
||||
and s.status ='reviewing'
|
||||
and v.result = ''
|
||||
</if>
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
|
||||
and s.openedBy = #{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'YWPS' ">
|
||||
and v.reviewer = #{qo.userName}
|
||||
and s.status ='reviewing'
|
||||
and v.result = ''
|
||||
</if>
|
||||
|
||||
|
||||
<if test="qo.searchVal == 'JH' ">
|
||||
@@ -479,7 +472,7 @@
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal == 'WZP' ">
|
||||
and s.status = '11'
|
||||
and s.status = '11'
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal == 'WPS' ">
|
||||
@@ -493,7 +486,7 @@
|
||||
|
||||
<if test="qo.searchVal == 'DYS' ">
|
||||
|
||||
and ( s.stage = 'released'
|
||||
and ( s.stage = 'released'
|
||||
and s.ys_flag =0)
|
||||
or (s.stage = 'verified' and s.ys_flag =2)
|
||||
</if>
|
||||
@@ -505,53 +498,53 @@
|
||||
|
||||
<if test="qo.searchCode != null and qo.searchCode != '' ">
|
||||
|
||||
-- //项目名称
|
||||
-- //项目名称
|
||||
<if test="qo.searchCode=='xmmc' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and pj.name like concat('%', #{qo.searchValue}, '%')
|
||||
and pj.name like concat('%', #{qo.searchValue}, '%')
|
||||
</if>
|
||||
-- 项目id
|
||||
-- 项目id
|
||||
<if test="qo.searchCode=='xmid' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and pj.id =#{qo.searchValue}
|
||||
and pj.id =#{qo.searchValue}
|
||||
</if>
|
||||
|
||||
-- //需求名称
|
||||
-- //需求名称
|
||||
<if test="qo.searchCode=='xqmc' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.title like concat('%', #{qo.searchValue}, '%')
|
||||
and s.title like concat('%', #{qo.searchValue}, '%')
|
||||
</if>
|
||||
-- 需求id
|
||||
-- 需求id
|
||||
<if test="qo.searchCode=='xqid' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.id =#{qo.searchValue}
|
||||
and s.id =#{qo.searchValue}
|
||||
</if>
|
||||
|
||||
-- 状态
|
||||
-- 状态
|
||||
<if test="qo.searchCode=='zt' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.stage =#{qo.searchValue}
|
||||
and s.stage =#{qo.searchValue}
|
||||
</if>
|
||||
-- 项目描述
|
||||
-- 项目描述
|
||||
<if test="qo.searchCode=='xmms' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and sp.`spec` =#{qo.searchValue}
|
||||
and sp.`spec` =#{qo.searchValue}
|
||||
</if>
|
||||
-- 负责人
|
||||
-- 负责人
|
||||
|
||||
<if test="qo.searchCode=='fzr' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.assignedTo =#{qo.searchValue}
|
||||
and s.assignedTo =#{qo.searchValue}
|
||||
</if>
|
||||
|
||||
<if test="qo.searchCode=='jhwc' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.plan_end_date ${qo.searchValue}
|
||||
and s.plan_end_date ${qo.searchValue}
|
||||
</if>
|
||||
|
||||
<if test="qo.searchCode=='sjks' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.start_date ${qo.searchValue}
|
||||
and s.start_date ${qo.searchValue}
|
||||
</if>
|
||||
<if test="qo.searchCode=='sjwc' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.end_date ${qo.searchValue}
|
||||
and s.end_date ${qo.searchValue}
|
||||
</if>
|
||||
<if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.openedBy = #{qo.searchValue}
|
||||
and s.openedBy = #{qo.searchValue}
|
||||
</if>
|
||||
<if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' ">
|
||||
and s.closedBy = #{qo.searchValue}
|
||||
and s.closedBy = #{qo.searchValue}
|
||||
</if>
|
||||
</if>
|
||||
|
||||
@@ -564,15 +557,22 @@
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
<if test="qo.stageList != null and qo.stageList.size() > 0">
|
||||
and s.stage in
|
||||
<foreach collection="qo.stageList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
|
||||
group by s.id
|
||||
group by s.id
|
||||
|
||||
<choose>
|
||||
<when test="qo.orderName != '' and qo.orderName != null ">
|
||||
<choose>
|
||||
<when test="qo.orderSort != '' and qo.orderSort != null ">
|
||||
order by s.${qo.orderName} ${qo.orderSort}
|
||||
order by s.${qo.orderName} ${qo.orderSort}
|
||||
</when>
|
||||
<otherwise>
|
||||
order by s.id desc
|
||||
@@ -1028,6 +1028,14 @@
|
||||
|
||||
</if>
|
||||
|
||||
<if test="qo.stageList != null and qo.stageList.size() > 0">
|
||||
and s.stage in
|
||||
<foreach collection="qo.stageList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
group by s.id
|
||||
|
||||
<choose>
|
||||
|
||||
@@ -162,6 +162,16 @@
|
||||
and s.openedBy = #{qo.openedby}
|
||||
</if>
|
||||
|
||||
<if test="qo.statusList != null and qo.statusList.size() > 0">
|
||||
and s.status in
|
||||
<foreach collection="qo.statusList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
|
||||
|
||||
|
||||
<if test="qo.status != null and qo.status != '' ">
|
||||
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
|
||||
|
||||
Reference in New Issue
Block a user