需求增加筛选
This commit is contained in:
@@ -64,6 +64,8 @@ public class ZtProjectQo extends BaseQo {
|
|||||||
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
private List<String> stageList;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
private Integer module;
|
private Integer module;
|
||||||
|
|||||||
@@ -305,6 +305,11 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
qo.setProductIds(pIds);
|
qo.setProductIds(pIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!CollectionUtils.isEmpty(qo.getStatusList())&&qo.getStatusList().contains("unconfirmed")) {
|
||||||
|
qo.getStatusList().addAll(Arrays.asList("unconfirmed",
|
||||||
|
"waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed"));
|
||||||
|
}
|
||||||
|
|
||||||
Page<ZtStoryUserDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
Page<ZtStoryUserDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||||
List<ZtStoryUserDTO> list = this.baseMapper.pageList(qo);
|
List<ZtStoryUserDTO> list = this.baseMapper.pageList(qo);
|
||||||
if (!CollectionUtils.isEmpty(list)) {
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
|||||||
@@ -179,8 +179,8 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
if (CollectionUtils.isEmpty(taskList)) {
|
if (CollectionUtils.isEmpty(taskList)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
taskList=taskList.stream().peek(e->{
|
taskList = taskList.stream().peek(e -> {
|
||||||
if(e.getDeadline()!=null){
|
if (e.getDeadline() != null) {
|
||||||
e.setDeadline(DateUtils.getDayLast(e.getDeadline()));
|
e.setDeadline(DateUtils.getDayLast(e.getDeadline()));
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
@@ -341,7 +341,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
// .and(e->e.or().)
|
// .and(e->e.or().)
|
||||||
// );
|
// );
|
||||||
|
|
||||||
return this.baseMapper.taskListByPIdsAndDate(pids,firstDayOfMonth,lastDayOfMonth);
|
return this.baseMapper.taskListByPIdsAndDate(pids, firstDayOfMonth, lastDayOfMonth);
|
||||||
// return taskList;
|
// return taskList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,8 +386,8 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
}
|
}
|
||||||
List<ZtTask> taskList = this.list(new QueryWrapper<ZtTask>().lambda()
|
List<ZtTask> taskList = this.list(new QueryWrapper<ZtTask>().lambda()
|
||||||
.select(SFunctionColums.taskColumes())
|
.select(SFunctionColums.taskColumes())
|
||||||
.in(ZtTask::getProduct,pids)
|
.in(ZtTask::getProduct, pids)
|
||||||
.in(ZtTask::getAssignedTo,uids)
|
.in(ZtTask::getAssignedTo, uids)
|
||||||
.ge(ZtTask::getFinishedDate, firstDayOfMonth).le(ZtTask::getFinishedDate, lastDayOfMonth));
|
.ge(ZtTask::getFinishedDate, firstDayOfMonth).le(ZtTask::getFinishedDate, lastDayOfMonth));
|
||||||
|
|
||||||
return taskList;
|
return taskList;
|
||||||
@@ -786,6 +786,44 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) {
|
||||||
|
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
||||||
|
ztStory.setDevelPlanEndTime(null);
|
||||||
|
if (ztTask.getType().equals("devel") && (ztStory.getDevelPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getDevelPlanEndTime()))) {
|
||||||
|
ztStory.setDevelPlanEndTime(ztTask.getDeadline());
|
||||||
|
} else {
|
||||||
|
//查找最大时间那个
|
||||||
|
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
|
||||||
|
.select(ZtTask::getDeadline)
|
||||||
|
.isNotNull(ZtTask::getDeadline)
|
||||||
|
.eq(ZtTask::getType, "devel")
|
||||||
|
.ne(ZtTask::getId, ztTask.getId())
|
||||||
|
.in(ZtTask::getStatus, "pause", "done", "wait", "reviewing", "doing", "draft")
|
||||||
|
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
|
||||||
|
this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
|
||||||
|
.eq(ZtStory::getId, ztTask.getStory())
|
||||||
|
.set(ZtStory::getDevelPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
|
||||||
|
}
|
||||||
|
if (ztTask.getType().equals("test") && (ztStory.getTestPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getTestPlanEndTime()))) {
|
||||||
|
ztStory.setTestPlanEndTime(ztTask.getDeadline());
|
||||||
|
} else {
|
||||||
|
if (ztTask.getType().equals("test") && ztStory.getTestPlanEndTime() != null) {
|
||||||
|
//查找最大时间那个
|
||||||
|
ztStory.setDevelPlanEndTime(ztTask.getDeadline());
|
||||||
|
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
|
||||||
|
.select(ZtTask::getDeadline)
|
||||||
|
.isNotNull(ZtTask::getDeadline)
|
||||||
|
.eq(ZtTask::getType, "test")
|
||||||
|
.ne(ZtTask::getId, ztTask.getId())
|
||||||
|
.in(ZtTask::getStatus, "pause", "done", "wait", "reviewing", "doing", "draft")
|
||||||
|
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
|
||||||
|
this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
|
||||||
|
.eq(ZtStory::getId, ztTask.getStory())
|
||||||
|
.set(ZtStory::getTestPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.storyService.updateById(ztStory);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fileService.updateFile(dto.getFiles(), ztTask.getId(), FileTypes.task);
|
fileService.updateFile(dto.getFiles(), ztTask.getId(), FileTypes.task);
|
||||||
|
|||||||
@@ -264,11 +264,16 @@
|
|||||||
and closedBy =#{qo.userName}
|
and closedBy =#{qo.userName}
|
||||||
</if>
|
</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>
|
<choose>
|
||||||
<when test="qo.orderName != '' and qo.orderName != null ">
|
<when test="qo.orderName != '' and qo.orderName != null ">
|
||||||
<choose>
|
<choose>
|
||||||
@@ -284,21 +289,10 @@
|
|||||||
order by s.id desc
|
order by s.id desc
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- order by id desc
|
-- order by id desc
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="projectStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
<select id="projectStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||||
|
select s.id,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
select s.id,
|
|
||||||
s.vision,
|
s.vision,
|
||||||
s.parent,
|
s.parent,
|
||||||
s.product,
|
s.product,
|
||||||
@@ -370,17 +364,23 @@
|
|||||||
s.ys_date,
|
s.ys_date,
|
||||||
s.devel_plan_end_time,
|
s.devel_plan_end_time,
|
||||||
s.test_plan_end_time,
|
s.test_plan_end_time,
|
||||||
pt.name productName
|
pt.name productName
|
||||||
from zt_story s
|
from zt_story s
|
||||||
|
|
||||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
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_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
|
||||||
left join zt_project pj on pstory.project = pj.id
|
left join zt_project pj on pstory.project = pj.id
|
||||||
left join zt_product pt on s.product = pt.id
|
left join zt_product pt on s.product = pt.id
|
||||||
left join zt_projectstory ps on s.id = ps.story
|
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">-->
|
<!-- <if test="qo.startDate !=null">-->
|
||||||
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
|
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
|
||||||
<!-- </if>-->
|
<!-- </if>-->
|
||||||
@@ -434,47 +434,46 @@
|
|||||||
and pt.name like concat('%', #{qo.productName}, '%')
|
and pt.name like concat('%', #{qo.productName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="qo.project != null ">
|
<if test="qo.project != null ">
|
||||||
and ps.project =#{qo.project}
|
and ps.project =#{qo.project}
|
||||||
and ps.type= 'project'
|
and ps.type= 'project'
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.execution != null ">
|
<if test="qo.execution != null ">
|
||||||
and ps.project =#{qo.execution}
|
and ps.project =#{qo.execution}
|
||||||
and ps.type= 'execution'
|
and ps.type= 'execution'
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.moduleId != null ">
|
<if test="qo.moduleId != null ">
|
||||||
and s.module =#{qo.moduleId}
|
and s.module =#{qo.moduleId}
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
|
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
|
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
|
||||||
and s.status !='closed'
|
and s.status !='closed'
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
|
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
|
||||||
and s.assignedTo = #{qo.userName}
|
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>
|
||||||
|
|
||||||
<if test="qo.kfz == 1 ">
|
</if>
|
||||||
<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 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' ">
|
<if test="qo.searchVal == 'JH' ">
|
||||||
@@ -576,6 +575,14 @@
|
|||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</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>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
@@ -1046,6 +1053,14 @@
|
|||||||
|
|
||||||
</if>
|
</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>
|
<choose>
|
||||||
|
|||||||
@@ -162,6 +162,16 @@
|
|||||||
and s.openedBy = #{qo.openedby}
|
and s.openedBy = #{qo.openedby}
|
||||||
</if>
|
</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 != '' ">
|
<if test="qo.status != null and qo.status != '' ">
|
||||||
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
|
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
|
||||||
|
|||||||
Reference in New Issue
Block a user