需求任务添加bug列表
This commit is contained in:
@ -3,10 +3,7 @@ package com.sa.zentao.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.BusinessException;
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtProjectDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.ZtProject;
|
||||
import com.sa.zentao.entity.ZtProjectproduct;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
@ -181,6 +178,14 @@ public class ZtStoryController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
//切换指派
|
||||
@RequestMapping(value = "/storyListByUserStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result storyListByUserStory(@RequestBody ZtStoryDTO dto){
|
||||
List<ZtStoryDTO> list = ztStoryService.storyListByUserStory(dto);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//迭代列表根据项目id
|
||||
@RequestMapping(value = "/execListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
|
@ -113,4 +113,5 @@ public class ZtStoryUserController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -257,4 +257,5 @@ public class ZtStoryDTO implements Serializable {
|
||||
|
||||
private Integer releaseFlag=0;
|
||||
|
||||
private List<ZtBugDTO> bugList;
|
||||
}
|
||||
|
@ -200,5 +200,5 @@ public class ZtTaskDTO implements Serializable {
|
||||
|
||||
private BigDecimal useTime;
|
||||
|
||||
|
||||
private List<ZtBugDTO> bugList;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.sa.zentao.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.dao.ZtStoryUserDTO;
|
||||
import com.sa.zentao.entity.ZtProject;
|
||||
import com.sa.zentao.entity.ZtStory;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@ -83,4 +84,6 @@ public interface IZtStoryService extends IService<ZtStory> {
|
||||
Map<Integer,List<ZtProject>> getExecutionMapByStory(List<ZtStoryDTO> list);
|
||||
|
||||
void batchAddStory(ZtStoryDTO dto);
|
||||
|
||||
List<ZtStoryDTO> storyListByUserStory(ZtStoryDTO dto);
|
||||
}
|
||||
|
@ -489,7 +489,7 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
result.put("project",pList);
|
||||
if(!CollectionUtils.isEmpty(pList)){
|
||||
List<ZtProjectproduct> productList = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().in(ZtProjectproduct::getProject
|
||||
, pList.stream().map(o -> o.getProject()).collect(Collectors.toList())));
|
||||
, pList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
if(CollectionUtils.isEmpty(productList)){
|
||||
result.put("product",Arrays.asList());
|
||||
}else{
|
||||
@ -503,7 +503,7 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
Integer taskId = dto.getTaskId();
|
||||
if(taskId!=null){
|
||||
ZtTask task = this.taskService.getById(taskId);
|
||||
result.put("task",task);
|
||||
result.put("task",Arrays.asList(task));
|
||||
Integer execution = task.getExecution();
|
||||
Integer product = task.getProduct();
|
||||
Integer project = task.getProject();
|
||||
@ -512,8 +512,10 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
result.put("project",(project==null||project==0)?Arrays.asList():Arrays.asList(this.projectService.getById(project)));
|
||||
result.put("execution",(execution==null||execution==0)?Arrays.asList():Arrays.asList(this.projectService.getById(execution)));
|
||||
result.put("feedback",(feedback==null||feedback==0)?Arrays.asList():Arrays.asList(this.storyFeedbackService.getById(feedback)));
|
||||
Integer story = task.getStory();
|
||||
result.put("story",(story==null||story==0)?Arrays.asList():Arrays.asList(this.storyService.getById(story)));
|
||||
}else{
|
||||
result.put("task",null);
|
||||
result.put("task",Arrays.asList());
|
||||
}
|
||||
|
||||
|
||||
@ -521,7 +523,7 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
Integer storyId = dto.getStoryId();
|
||||
if(storyId!=null){
|
||||
ZtStory ztStory = this.storyService.getById(storyId);
|
||||
result.put("story",ztStory);
|
||||
result.put("story",Arrays.asList(ztStory));
|
||||
ZtProduct product = this.baseMapper.selectById(ztStory.getProduct());
|
||||
result.put("product",Arrays.asList(product));
|
||||
|
||||
@ -534,8 +536,9 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
List<ZtProject> execList = this.projectService.listByIds(list.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
result.put("execution",execList);
|
||||
}
|
||||
}else{
|
||||
result.put("story",null);
|
||||
List<ZtTask> list = this.taskService.list(new QueryWrapper<ZtTask>().lambda()
|
||||
.eq(ZtTask::getStory, storyId));
|
||||
result.put("task",list);
|
||||
}
|
||||
|
||||
|
||||
|
@ -604,7 +604,32 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
//搜索执行根据产品 和 项目
|
||||
@Override
|
||||
public List<ZtProject> executionListByProduct(ZtProjectQo qo) {
|
||||
return this.baseMapper.executionListByProduct(qo);
|
||||
|
||||
Integer productId = qo.getProductId();
|
||||
Integer project = qo.getProject();
|
||||
|
||||
|
||||
if(project!=null&&project!=0){
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().eq(ZtExecutionproject::getProject, project));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
return this.listByIds(list.stream().map(o->o.getExecution()).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
if(productId!=null&&productId!=0){
|
||||
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>()
|
||||
.lambda().eq(ZtProjectproduct::getProduct, productId));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
List<ZtExecutionproject> eList = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().
|
||||
in(ZtExecutionproject::getProject, list.stream().map(o->o.getProject()).collect(Collectors.toList())));
|
||||
if(!CollectionUtils.isEmpty(eList)){
|
||||
return this.listByIds(eList.stream().map(o->o.getExecution()).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -171,7 +171,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
Map<Integer, List<ZtStory>> storyUserMap = getStoryUserMap(list);
|
||||
|
||||
Map<Integer, List<ZtStoryreviewDTO>> rMap = getReviewMap(list);
|
||||
|
||||
for (ZtStoryUserDTO d : list) {
|
||||
|
||||
if(!StringUtils.isEmpty(d.getReviewedby())){
|
||||
@ -375,6 +374,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(dto.getModule()!=null&&dto.getModule()!=0){
|
||||
ZtModule ztModule = this.moduleService.getById(dto.getModule());
|
||||
if(ztModule!=null){
|
||||
@ -415,7 +415,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
dto.setSList(storyDTOList);
|
||||
}
|
||||
}
|
||||
|
||||
dto.setViews(rMap.get(d.getId()));
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
@ -72,6 +72,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
@Autowired
|
||||
private IZtExecutionprojectService executionprojectService;
|
||||
|
||||
@Autowired
|
||||
private IZtBugService bugService;
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtTaskDTO> taskPageList(ZtProjectQo qo) {
|
||||
@ -233,6 +236,30 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
if (ztUser != null) {
|
||||
dto.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
List<ZtBug> list = this.bugService.list(new QueryWrapper<ZtBug>().lambda().eq(ZtBug::getTotask, id));
|
||||
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
List<ZtBugDTO> ztBugDTOS = BeanCopyUtil.copyListProperties(list, ZtBugDTO::new);
|
||||
for (ZtBugDTO bug:ztBugDTOS) {
|
||||
ztUser = userMap.get(bug.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
bug.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(bug.getAssignedTo());
|
||||
|
||||
if(ztUser!=null){
|
||||
bug.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(bug.getYsUser());
|
||||
|
||||
if(ztUser!=null){
|
||||
bug.setYsUserName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
dto.setBugList(ztBugDTOS);
|
||||
}else{
|
||||
dto.setBugList(Arrays.asList());
|
||||
}
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
@ -175,13 +175,14 @@
|
||||
|
||||
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files,pt.name productName from (zt_story s,zt_projectstory ps ) left join zt_storyspec sp on s.id = sp.story
|
||||
select s.*,sp.spec ,sp.verify,sp.files,pt.name productName from zt_story s left join zt_storyspec sp on s.id = sp.story
|
||||
|
||||
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.execution =0
|
||||
left join zt_project pj on pstory.project = pj.id
|
||||
left join zt_product pt on s.product = pt.id
|
||||
WHERE s.id = ps.story
|
||||
left join zt_projectstory ps on s.id = ps.story
|
||||
WHERE 1=1
|
||||
|
||||
|
||||
<if test="qo.startDate !=null">
|
||||
@ -199,9 +200,11 @@
|
||||
|
||||
<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.module != null ">
|
||||
and s.module =#{qo.module}
|
||||
@ -271,7 +274,7 @@
|
||||
</if>
|
||||
<if test="qo.searchVal != null and qo.searchVal == 'YWGB' ">
|
||||
and s.status ='closed'
|
||||
and closedBy =#{qo.userName}
|
||||
and s.closedBy =#{qo.userName}
|
||||
</if>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user