需求增加筛选
This commit is contained in:
@@ -78,6 +78,7 @@ public class ZtStoryUser implements Serializable {
|
||||
// DQR("storyunconfirmed","需求待确认",8),
|
||||
// CFM("confirmed","需求已确认",9),
|
||||
// KFZ("developing","研发中",10),
|
||||
// KFZ("released","已发布",10),
|
||||
// YWC("finished","已完成",11),
|
||||
// CLOSED("closed","已关闭",12),
|
||||
private String status;
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.sa.zentao.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public enum StoryStageEnums {
|
||||
//closed 关闭 wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中
|
||||
// tested测试完毕 released已发布 verified已验收 closed 已关闭
|
||||
@@ -28,6 +31,17 @@ public enum StoryStageEnums {
|
||||
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() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public enum UserStoryEnums {
|
||||
DQR("storyunconfirmed","需求待确认",8),
|
||||
CFM("confirmed","需求已确认",9),
|
||||
KFZ("developing","研发中",10),
|
||||
RELEASED("released","已发布",15),
|
||||
YWC("finished","已完成",11),
|
||||
CLOSED("closed","已关闭",12),
|
||||
;
|
||||
|
||||
@@ -198,7 +198,8 @@ public class IZtCountService {
|
||||
// if (!name.equals("admin")) {
|
||||
if (!CollectionUtils.isEmpty(pIds)) {
|
||||
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getProduct, pIds)
|
||||
.in(ZtStoryUser::getStatus, "active", "reviewing", "active", "unconfirmed", "waitcommunicate", "waitdesign", "designdoing", "designdone", "storyunconfirmed", "confirmed"));
|
||||
.in(ZtStoryUser::getStatus, "active", "reviewing", "active",
|
||||
"unconfirmed", "waitcommunicate", "waitdesign", "designdoing", "designdone", "storyunconfirmed", "confirmed"));
|
||||
ztStory = storyService.list(new QueryWrapper<ZtStory>()
|
||||
.lambda().eq(ZtStory::getDeleted, "0")
|
||||
.in(ZtStory::getProduct, pIds)
|
||||
@@ -2940,3 +2941,6 @@ public class IZtCountService {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1321,6 +1321,10 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
ztStory.setEndDate(new Date());
|
||||
}
|
||||
this.baseMapper.updateById(ztStory);
|
||||
//用户需求
|
||||
if(ztStory.getUserStory()!=null&&ztStory.getUserStory().intValue()!=0){
|
||||
this.storyUserService.changeStatus(ztStory.getUserStory(),UserStoryEnums.RELEASED);
|
||||
}
|
||||
String ysUser = ztStory.getYsUser();
|
||||
|
||||
|
||||
|
||||
@@ -13,10 +13,7 @@ import com.sa.zentao.conf.LoginRiskUser;
|
||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.*;
|
||||
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.enums.*;
|
||||
import com.sa.zentao.mapper.ZtStoryUserMapper;
|
||||
import com.sa.zentao.qo.StoryQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
@@ -731,6 +728,15 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
//交付物确认
|
||||
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.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
storyUser.setLastediteddate(new Date());
|
||||
|
||||
Reference in New Issue
Block a user