2 Commits

Author SHA1 Message Date
0f1c7b02fe 产品角色等 2025-12-25 14:02:41 +08:00
8f0c7a020c 产品角色等 2025-12-25 13:46:26 +08:00
12 changed files with 181 additions and 240 deletions

View File

@@ -78,7 +78,6 @@ public class ZtStoryUser implements Serializable {
// DQR("storyunconfirmed","需求待确认",8), // DQR("storyunconfirmed","需求待确认",8),
// CFM("confirmed","需求已确认",9), // CFM("confirmed","需求已确认",9),
// KFZ("developing","研发中",10), // KFZ("developing","研发中",10),
// KFZ("released","已发布",10),
// YWC("finished","已完成",11), // YWC("finished","已完成",11),
// CLOSED("closed","已关闭",12), // CLOSED("closed","已关闭",12),
private String status; private String status;

View File

@@ -2,9 +2,6 @@ package com.sa.zentao.enums;
import com.baomidou.mybatisplus.annotation.EnumValue; import com.baomidou.mybatisplus.annotation.EnumValue;
import java.util.ArrayList;
import java.util.List;
public enum StoryStageEnums { public enum StoryStageEnums {
//closed 关闭 wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 //closed 关闭 wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中
// tested测试完毕 released已发布 verified已验收 closed 已关闭 // tested测试完毕 released已发布 verified已验收 closed 已关闭
@@ -31,17 +28,6 @@ public enum StoryStageEnums {
this.desc=desc; this.desc=desc;
} }
public static List<String> beforeStatus(int code){
List<String> list=new ArrayList<String>();
StoryStageEnums[] values = values();
for (StoryStageEnums value : values) {
if (value.code<code&&value.code!=1){
list.add(value.value);
}
}
return list;
}
public int getCode() { public int getCode() {
return this.code; return this.code;
} }

View File

@@ -17,7 +17,6 @@ public enum UserStoryEnums {
DQR("storyunconfirmed","需求待确认",8), DQR("storyunconfirmed","需求待确认",8),
CFM("confirmed","需求已确认",9), CFM("confirmed","需求已确认",9),
KFZ("developing","研发中",10), KFZ("developing","研发中",10),
RELEASED("released","已发布",15),
YWC("finished","已完成",11), YWC("finished","已完成",11),
CLOSED("closed","已关闭",12), CLOSED("closed","已关闭",12),
; ;

View File

@@ -13,6 +13,7 @@ public enum UserType {
UI(7, "UI工程师"), UI(7, "UI工程师"),
XMJL(8, "项目经理"), XMJL(8, "项目经理"),
XMZL(9, "项目助理"), XMZL(9, "项目助理"),
CPJL(10, "产品经理"),
; ;
@EnumValue @EnumValue

View File

@@ -64,8 +64,6 @@ 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;
@@ -107,6 +105,14 @@ public class ZtProjectQo extends BaseQo {
private String spec; private String spec;
private String bugType; private String bugType;
/**
* 测试人员
*/
private String testUser;
/**
* 产品人员
*/
private String productUser;
private String account; private String account;
//1 延期 2不延期 //1 延期 2不延期

View File

@@ -198,8 +198,7 @@ public class IZtCountService {
// if (!name.equals("admin")) { // if (!name.equals("admin")) {
if (!CollectionUtils.isEmpty(pIds)) { if (!CollectionUtils.isEmpty(pIds)) {
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getProduct, pIds) list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getProduct, pIds)
.in(ZtStoryUser::getStatus, "active", "reviewing", "active", .in(ZtStoryUser::getStatus, "active", "reviewing", "active", "unconfirmed", "waitcommunicate", "waitdesign", "designdoing", "designdone", "storyunconfirmed", "confirmed"));
"unconfirmed", "waitcommunicate", "waitdesign", "designdoing", "designdone", "storyunconfirmed", "confirmed"));
ztStory = storyService.list(new QueryWrapper<ZtStory>() ztStory = storyService.list(new QueryWrapper<ZtStory>()
.lambda().eq(ZtStory::getDeleted, "0") .lambda().eq(ZtStory::getDeleted, "0")
.in(ZtStory::getProduct, pIds) .in(ZtStory::getProduct, pIds)
@@ -2941,6 +2940,3 @@ public class IZtCountService {
} }

View File

@@ -1321,10 +1321,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
ztStory.setEndDate(new Date()); ztStory.setEndDate(new Date());
} }
this.baseMapper.updateById(ztStory); this.baseMapper.updateById(ztStory);
//用户需求
if(ztStory.getUserStory()!=null&&ztStory.getUserStory().intValue()!=0){
this.storyUserService.changeStatus(ztStory.getUserStory(),UserStoryEnums.RELEASED);
}
String ysUser = ztStory.getYsUser(); String ysUser = ztStory.getYsUser();

View File

@@ -13,7 +13,10 @@ import com.sa.zentao.conf.LoginRiskUser;
import com.sa.zentao.conf.RiskUserThreadLocal; import com.sa.zentao.conf.RiskUserThreadLocal;
import com.sa.zentao.dao.*; import com.sa.zentao.dao.*;
import com.sa.zentao.entity.*; import com.sa.zentao.entity.*;
import com.sa.zentao.enums.*; import com.sa.zentao.enums.ActionStatus;
import com.sa.zentao.enums.ActionType;
import com.sa.zentao.enums.FileTypes;
import com.sa.zentao.enums.UserStoryEnums;
import com.sa.zentao.mapper.ZtStoryUserMapper; import com.sa.zentao.mapper.ZtStoryUserMapper;
import com.sa.zentao.qo.StoryQo; import com.sa.zentao.qo.StoryQo;
import com.sa.zentao.qo.ZtProjectQo; import com.sa.zentao.qo.ZtProjectQo;
@@ -302,11 +305,6 @@ 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)) {
@@ -728,15 +726,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
//交付物确认 //交付物确认
this.sendConfirmMessage(storyUser.getId(),ztProduct.getPo()); this.sendConfirmMessage(storyUser.getId(),ztProduct.getPo());
} }
if(UserStoryEnums.RELEASED == status){
//如果研发需求已经全部发布,那么就发布
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested
List<ZtStory> storyList = this.storyService.list(new QueryWrapper<ZtStory>().lambda()
.ne(ZtStory::getStatus, "closed").in(ZtStory::getStage, StoryStageEnums.beforeStatus(7)).eq(ZtStory::getUserStory, id));
if(!CollectionUtils.isEmpty(storyList)){
return ;
}
}
storyUser.setStatus(status.getCode()); storyUser.setStatus(status.getCode());
storyUser.setLasteditedby(RiskUserThreadLocal.get().getName()); storyUser.setLasteditedby(RiskUserThreadLocal.get().getName());
storyUser.setLastediteddate(new Date()); storyUser.setLastediteddate(new Date());

View File

@@ -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;
@@ -518,7 +518,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
List<String> userIds = list.stream().map(o -> o.getFinishedby()).collect(Collectors.toList()); List<String> userIds = list.stream().map(o -> o.getFinishedby()).collect(Collectors.toList());
userIds.addAll(list.stream().map(o -> o.getAssignedTo()).collect(Collectors.toList())); userIds.addAll(list.stream().map(o -> o.getAssignedTo()).collect(Collectors.toList()));
Map<String, ZtUser> userMap = this.userService.userMapByIds(null); Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
Date d = new Date(); Date d=new Date();
for (ZtTaskDTO task : list) { for (ZtTaskDTO task : list) {
ZtUser ztUser = userMap.get(task.getFinishedby()); ZtUser ztUser = userMap.get(task.getFinishedby());
if (ztUser != null) { if (ztUser != null) {
@@ -531,16 +531,16 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if (task.getDeadline() != null) { if (task.getDeadline() != null) {
task.setDeadline(DateUtils.getDayLast(task.getDeadline())); task.setDeadline(DateUtils.getDayLast(task.getDeadline()));
} }
if (task.getFinishedDate() != null) { if(task.getFinishedDate()!=null){
if (task.getFinishedDate().getTime() > DateUtils.getDayLast(task.getDeadline()).getTime()) { if(task.getFinishedDate().getTime()>DateUtils.getDayLast(task.getDeadline()).getTime()){
task.setDelayFlag(1); task.setDelayFlag(1);
} else { }else{
task.setDelayFlag(2); task.setDelayFlag(2);
} }
} else { }else{
if (d.getTime() > DateUtils.getDayLast(task.getDeadline()).getTime()) { if(d.getTime()>DateUtils.getDayLast(task.getDeadline()).getTime()){
task.setDelayFlag(1); task.setDelayFlag(1);
} else { }else{
task.setDelayFlag(2); task.setDelayFlag(2);
} }
} }
@@ -644,16 +644,16 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
ztTask.setEstimate(ztTask.getUseTime().floatValue()); ztTask.setEstimate(ztTask.getUseTime().floatValue());
ztTask.setLeft(ztTask.getUseTime().floatValue()); ztTask.setLeft(ztTask.getUseTime().floatValue());
} }
if (ztTask.getDeadline() == null) { if(ztTask.getDeadline()==null){
throw new BusinessException("当前环境异常请联系管理员"); throw new BusinessException("当前环境异常请联系管理员");
} }
this.baseMapper.insert(ztTask); this.baseMapper.insert(ztTask);
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getDeadline()!=null&&ztTask.getStory()!=null&&ztTask.getStory()!=0){
ZtStory ztStory = this.storyService.getById(ztTask.getStory()); ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if (ztTask.getType().equals("devel") && (ztStory.getDevelPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getDevelPlanEndTime()))) { if(ztTask.getType().equals("devel")&&(ztStory.getDevelPlanEndTime()==null||ztTask.getDeadline().after(ztStory.getDevelPlanEndTime()))){
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
} }
if (ztTask.getType().equals("test") && (ztStory.getTestPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getTestPlanEndTime()))) { if(ztTask.getType().equals("test")&&(ztStory.getTestPlanEndTime()==null||ztTask.getDeadline().after(ztStory.getTestPlanEndTime()))){
ztStory.setTestPlanEndTime(ztTask.getDeadline()); ztStory.setTestPlanEndTime(ztTask.getDeadline());
} }
this.storyService.updateById(ztStory); this.storyService.updateById(ztStory);
@@ -703,7 +703,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
@Override @Override
@Transactional @Transactional
public void modifyTask(ZtTaskDTO dto) { public void modifyTask(ZtTaskDTO dto) {
if (dto.getDeadline() == null || dto.getEstStarted() == null) { if(dto.getDeadline()==null||dto.getEstStarted()==null){
throw new BusinessException("请录入开始结束日期"); throw new BusinessException("请录入开始结束日期");
} }
ZtTask ztTask = this.baseMapper.selectById(dto.getId()); ZtTask ztTask = this.baseMapper.selectById(dto.getId());
@@ -786,44 +786,6 @@ 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);
@@ -850,11 +812,11 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false); this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false);
} }
if (ObjectUtils.notEqual(oldExecution, newExecution)) { if(ObjectUtils.notEqual(oldExecution,newExecution)){
//迭代切换了 //迭代切换了
this.kanbanlaneService.removeKanbanCell(oldExecution, ztTask.getId(), KanbanCellType.TASK); this.kanbanlaneService.removeKanbanCell(oldExecution,ztTask.getId(),KanbanCellType.TASK);
//添加新的看板迭代 //添加新的看板迭代
this.kanbanlaneService.addKanbanCell(newExecution, ztTask.getId(), KanbanCellType.TASK, ztTask); this.kanbanlaneService.addKanbanCell(newExecution,ztTask.getId(),KanbanCellType.TASK,ztTask);
} }
taskSendZpMessage(ztTask.getId(), oldAssignedTo, ztTask.getAssignedTo()); taskSendZpMessage(ztTask.getId(), oldAssignedTo, ztTask.getAssignedTo());
@@ -910,7 +872,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if ("doing".equals(ztTask.getStatus())) { if ("doing".equals(ztTask.getStatus())) {
this.storyFeedbackService.feedbackStart(ztTask.getFeedback()); this.storyFeedbackService.feedbackStart(ztTask.getFeedback());
} else { } else {
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(), ztTask.getFeedbackRemark()); this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
} }
} }
if (dto.getConsumed() > 0) { if (dto.getConsumed() > 0) {
@@ -927,26 +889,26 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
actionService.addAction(ActionType.RW, ActionStatus.KS, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.KS, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
RiskUserThreadLocal.get().getName(), "", null); RiskUserThreadLocal.get().getName(), "", null);
if ("done".equals(ztTask.getStatus())) { if("done".equals(ztTask.getStatus())){
String finishBy = StringUtils.isEmpty(ztTask.getFinishedby()) ? RiskUserThreadLocal.get().getName() : ztTask.getFinishedby(); String finishBy = StringUtils.isEmpty(ztTask.getFinishedby())?RiskUserThreadLocal.get().getName():ztTask.getFinishedby();
//如果是测试任务 提交交付物 //如果是测试任务 提交交付物
if ("test".equals(ztTask.getType()) && !StringUtils.isEmpty(ztTask.getDeliverContent())) { if("test".equals(ztTask.getType())&&!StringUtils.isEmpty(ztTask.getDeliverContent())){
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, ztTask.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
if (ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, ztTask.getStory(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
} }
if (ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
//更新需求交付物 //更新需求交付物
ZtStory ztStory = this.storyService.getById(ztTask.getStory()); ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if (ztStory != null) { if(ztStory!=null){
ztStory.setDeliverContent(ztTask.getDeliverContent()); ztStory.setDeliverContent(ztTask.getDeliverContent());
this.storyService.updateById(ztStory); this.storyService.updateById(ztStory);
} }
} }
} }
if (!StringUtils.isEmpty(dto.getRemark())) { if(!StringUtils.isEmpty(dto.getRemark())){
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
} }
@@ -1030,15 +992,21 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
//添加action //添加action
ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject())); ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject()));
//如果是测试任务 提交交付物 //如果是测试任务 提交交付物
if ("test".equals(ztTask.getType()) && !StringUtils.isEmpty(ztTask.getDeliverContent())) { if("test".equals(ztTask.getType())&&!StringUtils.isEmpty(ztTask.getDeliverContent())){
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
if (ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, ztTask.getStory(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), //更新需求交付物
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if(ztStory!=null){
ztStory.setDeliverContent(ztTask.getDeliverContent());
this.storyService.updateById(ztStory);
}
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
} }
} }
if (!StringUtils.isEmpty(dto.getRemark())) { if(!StringUtils.isEmpty(dto.getRemark())){
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null); StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
} }
@@ -1071,7 +1039,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
this.storyService.taskFinishChangeStatus(ztTask.getStory(), finishBy, TaskType.transferType(type), false); this.storyService.taskFinishChangeStatus(ztTask.getStory(), finishBy, TaskType.transferType(type), false);
} }
if (ztTask.getFeedback() != null && ztTask.getFeedback() != 0) { if (ztTask.getFeedback() != null && ztTask.getFeedback() != 0) {
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(), ztTask.getFeedbackRemark()); this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
} }
} }
@@ -1090,9 +1058,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
ztTask.setLastediteddate(new Date()); ztTask.setLastediteddate(new Date());
this.baseMapper.updateById(ztTask); this.baseMapper.updateById(ztTask);
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getDeadline()!=null&&ztTask.getStory()!=null&&ztTask.getStory()!=0){
ZtStory ztStory = this.storyService.getById(ztTask.getStory()); ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if (ztTask.getType().equals("devel") && ztStory.getDevelPlanEndTime() != null) { if(ztTask.getType().equals("devel")&&ztStory.getDevelPlanEndTime()!=null){
//查找最大时间那个 //查找最大时间那个
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda() List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
@@ -1103,10 +1071,10 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
.in(ZtTask::getStatus, "pause", "done", "wait", "reviewing", "doing", "draft") .in(ZtTask::getStatus, "pause", "done", "wait", "reviewing", "doing", "draft")
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline)); .eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
this.storyService.update(new UpdateWrapper<ZtStory>().lambda() this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
.eq(ZtStory::getId, ztTask.getStory()) .eq(ZtStory::getId, ztTask.getStory())
.set(ZtStory::getDevelPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline()))); .set(ZtStory::getDevelPlanEndTime,CollectionUtils.isEmpty(ztTasks)?null:DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
} }
if (ztTask.getType().equals("test") && ztStory.getTestPlanEndTime() != null) { if(ztTask.getType().equals("test")&&ztStory.getTestPlanEndTime()!=null){
//查找最大时间那个 //查找最大时间那个
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda() List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
@@ -1118,11 +1086,12 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline)); .eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
this.storyService.update(new UpdateWrapper<ZtStory>().lambda() this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
.eq(ZtStory::getId, ztTask.getStory()) .eq(ZtStory::getId, ztTask.getStory())
.set(ZtStory::getTestPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline()))); .set(ZtStory::getTestPlanEndTime,CollectionUtils.isEmpty(ztTasks)?null:DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
} }
} }
ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject())); ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject()));
//添加action //添加action
@@ -1168,9 +1137,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
//添加action //添加action
actionService.addAction(ActionType.RW, ActionStatus.QX, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), ztTask.getProject(), ztTask.getExecution(), actionService.addAction(ActionType.RW, ActionStatus.QX, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), ztTask.getProject(), ztTask.getExecution(),
RiskUserThreadLocal.get().getName(), dto.getDesc(), null); RiskUserThreadLocal.get().getName(), dto.getDesc(), null);
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getDeadline()!=null&&ztTask.getStory()!=null&&ztTask.getStory()!=0){
ZtStory ztStory = this.storyService.getById(ztTask.getStory()); ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if (ztTask.getType().equals("devel") && ztStory.getDevelPlanEndTime() != null) { if(ztTask.getType().equals("devel")&&ztStory.getDevelPlanEndTime()!=null){
//查找最大时间那个 //查找最大时间那个
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda() List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
@@ -1182,9 +1151,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline)); .eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
this.storyService.update(new UpdateWrapper<ZtStory>().lambda() this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
.eq(ZtStory::getId, ztTask.getStory()) .eq(ZtStory::getId, ztTask.getStory())
.set(ZtStory::getDevelPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline()))); .set(ZtStory::getDevelPlanEndTime,CollectionUtils.isEmpty(ztTasks)?null:DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
} }
if (ztTask.getType().equals("test") && ztStory.getTestPlanEndTime() != null) { if(ztTask.getType().equals("test")&&ztStory.getTestPlanEndTime()!=null){
//查找最大时间那个 //查找最大时间那个
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda() List<ZtTask> ztTasks = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
@@ -1196,7 +1165,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
.eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline)); .eq(ZtTask::getStory, ztTask.getStory()).orderByDesc(ZtTask::getDeadline));
this.storyService.update(new UpdateWrapper<ZtStory>().lambda() this.storyService.update(new UpdateWrapper<ZtStory>().lambda()
.eq(ZtStory::getId, ztTask.getStory()) .eq(ZtStory::getId, ztTask.getStory())
.set(ZtStory::getTestPlanEndTime, CollectionUtils.isEmpty(ztTasks) ? null : DateUtils.getDayLast(ztTasks.get(0).getDeadline()))); .set(ZtStory::getTestPlanEndTime,CollectionUtils.isEmpty(ztTasks)?null:DateUtils.getDayLast(ztTasks.get(0).getDeadline())));
} }
} }
if (ztTask.getExecution() != null && ztTask.getExecution() != 0) { if (ztTask.getExecution() != null && ztTask.getExecution() != 0) {
@@ -1244,7 +1213,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
List<ZtTaskDTO> list = dto.getList(); List<ZtTaskDTO> list = dto.getList();
long nullDeadlineCount = list.stream().filter(o -> o.getDeadline() == null || o.getEstStarted() == null).count(); long nullDeadlineCount = list.stream().filter(o -> o.getDeadline() == null || o.getEstStarted() == null).count();
if (nullDeadlineCount > 0) { if(nullDeadlineCount>0){
throw new BusinessException("请录入开始结束日期"); throw new BusinessException("请录入开始结束日期");
} }
@@ -1291,13 +1260,13 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
} }
saveList.add(ztTask); saveList.add(ztTask);
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) { if(ztTask.getDeadline()!=null&&ztTask.getStory()!=null&&ztTask.getStory()!=0){
ZtStory ztStory = this.storyService.getById(ztTask.getStory()); ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if (ztTask.getType().equals("devel") && (ztStory.getDevelPlanEndTime() == null || ztTask.getDeadline().getTime() >= ztStory.getDevelPlanEndTime().getTime() if(ztTask.getType().equals("devel")&&(ztStory.getDevelPlanEndTime()==null||ztTask.getDeadline().getTime()>=ztStory.getDevelPlanEndTime().getTime()
)) { )){
ztStory.setDevelPlanEndTime(ztTask.getDeadline()); ztStory.setDevelPlanEndTime(ztTask.getDeadline());
} }
if (ztTask.getType().equals("test") && (ztStory.getTestPlanEndTime() == null || ztTask.getDeadline().getTime() >= ztStory.getTestPlanEndTime().getTime())) { if(ztTask.getType().equals("test")&&(ztStory.getTestPlanEndTime()==null||ztTask.getDeadline().getTime()>=ztStory.getTestPlanEndTime().getTime())){
ztStory.setTestPlanEndTime(ztTask.getDeadline()); ztStory.setTestPlanEndTime(ztTask.getDeadline());
} }
this.storyService.updateById(ztStory); this.storyService.updateById(ztStory);
@@ -1312,7 +1281,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false); this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false);
taskSendZpMessage(ztTask.getId(), null, ztTask.getAssignedTo()); taskSendZpMessage(ztTask.getId(), null, ztTask.getAssignedTo());
} else { } else {
taskSendPsMessage(ztTask.getId(), ztProject.getPm(), ztTask.getOpenedby()); taskSendPsMessage(ztTask.getId(), ztProject.getPm(),ztTask.getOpenedby());
} }
} }

View File

@@ -213,6 +213,13 @@
and s.title like concat('%', #{qo.title}, '%') and s.title like concat('%', #{qo.title}, '%')
</if> </if>
<if test="qo.testUser != null and qo.testUser != '' ">
and s.test_user like concat('%', #{qo.testUser}, '%')
</if>
<if test="qo.productUser != null and qo.productUser != '' ">
and s.product_user like concat('%', #{qo.productUser}, '%')
</if>
<if test="qo.id != null "> <if test="qo.id != null ">
and s.id = #{qo.id} and s.id = #{qo.id}
</if> </if>
@@ -257,16 +264,11 @@
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>
@@ -282,10 +284,21 @@
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,
@@ -357,23 +370,29 @@
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">--> <!-- <if test="qo.startDate !=null">-->
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}--> <!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
<!-- </if>--> <!-- </if>-->
<!-- <if test="qo.endDate !=null">--> <!-- <if test="qo.endDate !=null">-->
<!-- and s.openedDate <![CDATA[<=]]> #{qo.endDate}--> <!-- and s.openedDate <![CDATA[<=]]> #{qo.endDate}-->
<!-- </if>--> <!-- </if>-->
<if test="qo.testUser != null and qo.testUser != '' ">
and s.test_user like concat('%', #{qo.testUser}, '%')
</if>
<if test="qo.productUser != null and qo.productUser != '' ">
and s.product_user like concat('%', #{qo.productUser}, '%')
</if>
<if test="qo.pri != null and qo.pri != '' "> <if test="qo.pri != null and qo.pri != '' ">
and s.pri = #{qo.pri} and s.pri = #{qo.pri}
</if> </if>
@@ -385,7 +404,7 @@
</if> </if>
<if test="qo.searchVal != null and qo.searchVal == 'WYS' "> <if test="qo.searchVal != null and qo.searchVal == 'WYS' ">
and s.ys_user = #{qo.userName} and s.ys_user = #{qo.userName}
</if> </if>
<if test="qo.stage != null and qo.stage != '' "> <if test="qo.stage != null and qo.stage != '' ">
@@ -412,49 +431,50 @@
</if> </if>
<if test="qo.productName != null and qo.productName != '' "> <if test="qo.productName != null and qo.productName != '' ">
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> <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 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' ">
@@ -472,7 +492,7 @@
</if> </if>
<if test="qo.searchVal == 'WZP' "> <if test="qo.searchVal == 'WZP' ">
and s.status = '11' and s.status = '11'
</if> </if>
<if test="qo.searchVal == 'WPS' "> <if test="qo.searchVal == 'WPS' ">
@@ -486,7 +506,7 @@
<if test="qo.searchVal == 'DYS' "> <if test="qo.searchVal == 'DYS' ">
and ( s.stage = 'released' and ( s.stage = 'released'
and s.ys_flag =0) and s.ys_flag =0)
or (s.stage = 'verified' and s.ys_flag =2) or (s.stage = 'verified' and s.ys_flag =2)
</if> </if>
@@ -498,53 +518,53 @@
<if test="qo.searchCode != null and qo.searchCode != '' "> <if test="qo.searchCode != null and qo.searchCode != '' ">
-- //项目名称 -- //项目名称
<if test="qo.searchCode=='xmmc' and qo.searchValue != null and qo.searchValue != '' "> <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> </if>
-- 项目id -- 项目id
<if test="qo.searchCode=='xmid' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='xmid' and qo.searchValue != null and qo.searchValue != '' ">
and pj.id =#{qo.searchValue} and pj.id =#{qo.searchValue}
</if> </if>
-- //需求名称 -- //需求名称
<if test="qo.searchCode=='xqmc' and qo.searchValue != null and qo.searchValue != '' "> <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> </if>
-- 需求id -- 需求id
<if test="qo.searchCode=='xqid' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='xqid' and qo.searchValue != null and qo.searchValue != '' ">
and s.id =#{qo.searchValue} and s.id =#{qo.searchValue}
</if> </if>
-- 状态 -- 状态
<if test="qo.searchCode=='zt' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='zt' and qo.searchValue != null and qo.searchValue != '' ">
and s.stage =#{qo.searchValue} and s.stage =#{qo.searchValue}
</if> </if>
-- 项目描述 -- 项目描述
<if test="qo.searchCode=='xmms' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='xmms' and qo.searchValue != null and qo.searchValue != '' ">
and sp.`spec` =#{qo.searchValue} and sp.`spec` =#{qo.searchValue}
</if> </if>
-- 负责人 -- 负责人
<if test="qo.searchCode=='fzr' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='fzr' and qo.searchValue != null and qo.searchValue != '' ">
and s.assignedTo =#{qo.searchValue} and s.assignedTo =#{qo.searchValue}
</if> </if>
<if test="qo.searchCode=='jhwc' and qo.searchValue != null and qo.searchValue != '' "> <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>
<if test="qo.searchCode=='sjks' and qo.searchValue != null and qo.searchValue != '' "> <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>
<if test="qo.searchCode=='sjwc' and qo.searchValue != null and qo.searchValue != '' "> <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>
<if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='yscj' and qo.searchValue != null and qo.searchValue != '' ">
and s.openedBy = #{qo.searchValue} and s.openedBy = #{qo.searchValue}
</if> </if>
<if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' "> <if test="qo.searchCode=='ysgb' and qo.searchValue != null and qo.searchValue != '' ">
and s.closedBy = #{qo.searchValue} and s.closedBy = #{qo.searchValue}
</if> </if>
</if> </if>
@@ -557,22 +577,15 @@
</foreach> </foreach>
</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>
<when test="qo.orderSort != '' and qo.orderSort != null "> <when test="qo.orderSort != '' and qo.orderSort != null ">
order by s.${qo.orderName} ${qo.orderSort} order by s.${qo.orderName} ${qo.orderSort}
</when> </when>
<otherwise> <otherwise>
order by s.id desc order by s.id desc
@@ -879,7 +892,12 @@
WHERE 1=1 WHERE 1=1
<if test="qo.testUser != null and qo.testUser != '' ">
and s.test_user like concat('%', #{qo.testUser}, '%')
</if>
<if test="qo.productUser != null and qo.productUser != '' ">
and s.product_user like concat('%', #{qo.productUser}, '%')
</if>
<if test="qo.pri != null and qo.pri != '' "> <if test="qo.pri != null and qo.pri != '' ">
and s.pri = #{qo.pri} and s.pri = #{qo.pri}
@@ -1028,14 +1046,6 @@
</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>

View File

@@ -162,16 +162,6 @@
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 != '' ">
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中” -- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”