验收产品,测试人开发
This commit is contained in:
@@ -15,26 +15,24 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
@Value("spring.application.name")
|
||||
@Value("${spring.application.name}")
|
||||
private String application;
|
||||
|
||||
@ExceptionHandler(Exception.class)
|
||||
public Result bizExceptionHandler(Exception e, HttpServletRequest request) {
|
||||
log.error("发生业务异常!原因是: {}", e.getMessage());
|
||||
log.error(application +"发生了异常 ,异常信息 ,{}",e);
|
||||
log.error("系统发生异常!应用: {}, 请求路径: {}, 异常类型: {}, 异常原因: {}",
|
||||
application, request.getRequestURI(), e.getClass().getSimpleName(), e.getMessage(), e);
|
||||
return Result.fail(Code.FAIL);
|
||||
}
|
||||
|
||||
@ExceptionHandler(BusinessException.class)
|
||||
public Result bizExceptionHandler(BusinessException e, HttpServletRequest request) {
|
||||
log.error("发生业务异常!原因是: {}", e.getMessage());
|
||||
log.error(application +"发生了异常 ,异常信息 ,{}",e);
|
||||
log.error("业务异常!应用: {}, 请求路径: {}, 异常原因: {}",
|
||||
application, request.getRequestURI(), e.getMessage());
|
||||
if(e.code==null){
|
||||
return Result.fail(e.value);
|
||||
}else{
|
||||
return Result.fail(e.code);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
for (int i =0;i<200;i++){
|
||||
log.info("win");
|
||||
}
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.toLowerCase().startsWith("win")) { //如果是Windows系统
|
||||
log.info("win");
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.constants.ExportConstants;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.ZtProject;
|
||||
import com.sa.zentao.entity.ZtProjectproduct;
|
||||
@@ -71,7 +72,7 @@ public class ZtStoryController {
|
||||
|
||||
@RequestMapping(value = "/storyExport", method = RequestMethod.POST)
|
||||
public void storyExport(@RequestBody ZtProjectQo qo, jakarta.servlet.ServletResponse response){
|
||||
qo.setPageSize(1000000);
|
||||
qo.setPageSize(ExportConstants.MAX_EXPORT_SIZE);
|
||||
PageInfo<ZtStoryDTO> p = ztStoryService.pageList(qo);
|
||||
List<ZtStoryDTO> list = p.getList();
|
||||
List<Integer> feedbackIds = list.stream().filter(o -> o.getFeedback() != null && o.getFeedback() != 0).map(o -> o.getFeedback()).collect(Collectors.toList());
|
||||
@@ -82,12 +83,12 @@ public class ZtStoryController {
|
||||
|
||||
ZtStoryFeedback ztStoryFeedback = feedbackMap.get(ztStoryUserDTO.getFeedback());
|
||||
if (ztStoryFeedback != null) {
|
||||
String reName=ztStoryFeedback.getId()+":"+ztStoryFeedback.getSpec();
|
||||
String reName=ztStoryFeedback.getId()+ExportConstants.STRING_SEPARATOR+ztStoryFeedback.getSpec();
|
||||
String reUrl = url+"/#/product-feedback-info/"+ztStoryFeedback.getId();
|
||||
WriteCellData<String> hyperlink = new WriteCellData<>(reName);
|
||||
HyperlinkData hyperlinkData = new HyperlinkData();
|
||||
try {
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", "%20"));
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", ExportConstants.URL_SPACE_ENCODE));
|
||||
hyperlinkData.setHyperlinkType(HyperlinkData.HyperlinkType.URL);
|
||||
hyperlink.setHyperlinkData(hyperlinkData);
|
||||
ztStoryUserDTO.setFeedbackSpecUrl(hyperlink );
|
||||
@@ -96,12 +97,12 @@ public class ZtStoryController {
|
||||
}
|
||||
}
|
||||
if(ztStoryUserDTO.getParent()!=null&&ztStoryUserDTO.getParent()!=0){
|
||||
String reName = ztStoryUserDTO.getParent()+":"+ztStoryUserDTO.getParentName();
|
||||
String reName = ztStoryUserDTO.getParent()+ExportConstants.STRING_SEPARATOR+ztStoryUserDTO.getParentName();
|
||||
String reUrl = url+"/#/product-story-info/"+ztStoryUserDTO.getParent();
|
||||
WriteCellData<String> hyperlink = new WriteCellData<>(reName);
|
||||
HyperlinkData hyperlinkData = new HyperlinkData();
|
||||
try {
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", "%20"));
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", ExportConstants.URL_SPACE_ENCODE));
|
||||
hyperlinkData.setHyperlinkType(HyperlinkData.HyperlinkType.URL);
|
||||
hyperlink.setHyperlinkData(hyperlinkData);
|
||||
ztStoryUserDTO.setParentNameUrl(hyperlink);
|
||||
@@ -110,12 +111,12 @@ public class ZtStoryController {
|
||||
}
|
||||
}
|
||||
if(ztStoryUserDTO.getUserStory()!=null&&ztStoryUserDTO.getUserStory()!=0){
|
||||
String reName=ztStoryUserDTO.getUserStory()+":"+ztStoryUserDTO.getUserStoryName();
|
||||
String reName=ztStoryUserDTO.getUserStory()+ExportConstants.STRING_SEPARATOR+ztStoryUserDTO.getUserStoryName();
|
||||
String reUrl = url+"/#/product-user-story-info/"+ztStoryUserDTO.getUserStory();
|
||||
WriteCellData<String> hyperlink = new WriteCellData<>(reName);
|
||||
HyperlinkData hyperlinkData = new HyperlinkData();
|
||||
try {
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", "%20"));
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", ExportConstants.URL_SPACE_ENCODE));
|
||||
hyperlinkData.setHyperlinkType(HyperlinkData.HyperlinkType.URL);
|
||||
hyperlink.setHyperlinkData(hyperlinkData);
|
||||
ztStoryUserDTO.setUserStoryNameUrl(hyperlink);
|
||||
@@ -123,12 +124,12 @@ public class ZtStoryController {
|
||||
ztStoryUserDTO.setUserStoryNameUrl(null);
|
||||
}
|
||||
}
|
||||
String reName=ztStoryUserDTO.getId()+":"+ztStoryUserDTO.getTitle();
|
||||
String reName=ztStoryUserDTO.getId()+ExportConstants.STRING_SEPARATOR+ztStoryUserDTO.getTitle();
|
||||
String reUrl = url+"/#/product-story-info/"+ztStoryUserDTO.getId();
|
||||
WriteCellData<String> hyperlink = new WriteCellData<>(reName);
|
||||
HyperlinkData hyperlinkData = new HyperlinkData();
|
||||
try {
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", "%20"));
|
||||
hyperlinkData.setAddress(reUrl.replace(" ", ExportConstants.URL_SPACE_ENCODE));
|
||||
hyperlinkData.setHyperlinkType(HyperlinkData.HyperlinkType.URL);
|
||||
hyperlink.setHyperlinkData(hyperlinkData);
|
||||
ztStoryUserDTO.setStoryUrl(hyperlink);
|
||||
@@ -137,7 +138,7 @@ public class ZtStoryController {
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(ztStoryUserDTO.getReviewedbyName())){
|
||||
ztStoryUserDTO.setReviewedbyName(ztStoryUserDTO.getReviewedbyName().replaceAll(",",""));
|
||||
ztStoryUserDTO.setReviewedbyName(ztStoryUserDTO.getReviewedbyName().replaceAll(ExportConstants.ID_SEPARATOR, ExportConstants.COMMA_REPLACE));
|
||||
}
|
||||
ztStoryUserDTO.setStatus(StoryStatusEnums.transfer(ztStoryUserDTO.getStatus())==null?null:StoryStatusEnums.transfer(ztStoryUserDTO.getStatus()).getDesc());
|
||||
ztStoryUserDTO.setStage(StoryStageEnums.transfer(ztStoryUserDTO.getStage())==null?null:StoryStageEnums.transfer(ztStoryUserDTO.getStage()).getDesc());
|
||||
@@ -145,10 +146,10 @@ public class ZtStoryController {
|
||||
ztStoryUserDTO.setYsFlagName(ztStoryUserDTO.getYsFlag()==1?"通过":"不通过");
|
||||
}
|
||||
if(!StringUtils.isEmpty(ztStoryUserDTO.getUserStoryName())){
|
||||
ztStoryUserDTO.setUserStoryName(ztStoryUserDTO.getUserStoryId()+":"+ztStoryUserDTO.getUserStoryName());
|
||||
ztStoryUserDTO.setUserStoryName(ztStoryUserDTO.getUserStoryId()+ExportConstants.STRING_SEPARATOR+ztStoryUserDTO.getUserStoryName());
|
||||
}
|
||||
if(ztStoryUserDTO.getParent()!=null&&ztStoryUserDTO.getParent()!=0){
|
||||
ztStoryUserDTO.setParentName(ztStoryUserDTO.getParent()+":"+ztStoryUserDTO.getParentName());
|
||||
ztStoryUserDTO.setParentName(ztStoryUserDTO.getParent()+ExportConstants.STRING_SEPARATOR+ztStoryUserDTO.getParentName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -159,7 +160,7 @@ public class ZtStoryController {
|
||||
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
|
||||
.needHead(Boolean.TRUE).build();
|
||||
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet(0, "sheet1")
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet(0, ExportConstants.SHEET_NAME)
|
||||
.head(ZtStoryDTO.class)
|
||||
.needHead(Boolean.TRUE).build();
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public class ZtStoryUserController {
|
||||
eq.in(ZtStoryUser::getStatus, UserStoryEnums.JH.getCode(),UserStoryEnums.CFM.getCode(),UserStoryEnums.KFZ.getCode());
|
||||
}
|
||||
eq.select(ZtStoryUser::getId,ZtStoryUser::getTitle,ZtStoryUser::getProduct,
|
||||
ZtStoryUser::getOpenedby,ZtStoryUser::getAssignedto,ZtStoryUser::getYsUser
|
||||
ZtStoryUser::getOpenedby,ZtStoryUser::getAssignedto,ZtStoryUser::getYsUser,ZtStoryUser::getProductUser
|
||||
);
|
||||
List<ZtStoryUser> list = storyUserService.list(eq
|
||||
);
|
||||
|
||||
@@ -3,15 +3,33 @@ package com.sa.zentao.dao;
|
||||
|
||||
public class BusinessException extends RuntimeException {
|
||||
|
||||
|
||||
public BusinessException(Code code){
|
||||
super(code.getValue());
|
||||
this.code=code;
|
||||
}
|
||||
|
||||
public BusinessException(String value){
|
||||
super(value);
|
||||
this.value=value;
|
||||
}
|
||||
|
||||
public BusinessException(Code code, String message){
|
||||
super(message);
|
||||
this.code=code;
|
||||
this.value=message;
|
||||
}
|
||||
|
||||
public BusinessException(String value, Throwable cause){
|
||||
super(value, cause);
|
||||
this.value=value;
|
||||
}
|
||||
|
||||
public BusinessException(Code code, String message, Throwable cause){
|
||||
super(message, cause);
|
||||
this.code=code;
|
||||
this.value=message;
|
||||
}
|
||||
|
||||
public String value;
|
||||
public Code code;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@ public enum Code {
|
||||
SUCCESS(0, "成功"),
|
||||
FAIL(-1, "失败"),
|
||||
CFTJ(-2, "重复添加"),
|
||||
PLEASELOGIN(401, "请登录");
|
||||
PLEASELOGIN(401, "请登录"),
|
||||
PARAM_ERROR(400, "参数错误"),
|
||||
NOT_FOUND(404, "资源不存在"),
|
||||
FORBIDDEN(403, "无权限访问"),
|
||||
INTERNAL_ERROR(500, "系统内部错误");
|
||||
|
||||
private Integer code;
|
||||
private String value;
|
||||
|
||||
@@ -63,6 +63,8 @@ public class ZtProjectQo extends BaseQo {
|
||||
|
||||
private String status;
|
||||
|
||||
private List<String> statusList;
|
||||
|
||||
private List<String> stageList;
|
||||
|
||||
private String title;
|
||||
|
||||
@@ -7,7 +7,9 @@ import com.sa.zentao.entity.*;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
import com.sa.zentao.enums.ActionType;
|
||||
import com.sa.zentao.enums.KanbanCellType;
|
||||
import com.sa.zentao.enums.KanbanColumnType;
|
||||
import com.sa.zentao.enums.ProjectTypeEnums;
|
||||
import com.sa.zentao.utils.KanbanStageMapping;
|
||||
import com.sa.zentao.mapper.ZtKanbancolumnMapper;
|
||||
import com.sa.zentao.mapper.ZtKanbanlaneMapper;
|
||||
import com.sa.zentao.qo.KanbanQo;
|
||||
@@ -255,14 +257,14 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
this.kanbancellService.updateById(tokanbancell);
|
||||
|
||||
ActionType type= null;
|
||||
if("story".equalsIgnoreCase(tabType)){
|
||||
if(KanbanCellType.STORY.getValue().equalsIgnoreCase(tabType)){
|
||||
type=ActionType.XQ;
|
||||
//需求
|
||||
// storyChange(qo);
|
||||
|
||||
//testing 测试中
|
||||
}
|
||||
if("bug".equalsIgnoreCase(tabType)){
|
||||
if(KanbanCellType.BUG.getValue().equalsIgnoreCase(tabType)){
|
||||
type=ActionType.BUG;
|
||||
//bug
|
||||
// bugChange(qo);
|
||||
@@ -273,7 +275,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
//closed 关闭
|
||||
|
||||
}
|
||||
if("task".equalsIgnoreCase(tabType)){
|
||||
if(KanbanCellType.TASK.getValue().equalsIgnoreCase(tabType)){
|
||||
type=ActionType.RW;
|
||||
//task
|
||||
// taskChange(qo);
|
||||
@@ -285,7 +287,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
//完成有新任务回退到进行中
|
||||
|
||||
//
|
||||
// if("canceled".equalsIgnoreCase(statusType)){
|
||||
// if(KanbanColumnType.TASK_CANCEL.getValue().equalsIgnoreCase(statusType)){
|
||||
// //取消
|
||||
// }
|
||||
|
||||
@@ -346,7 +348,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
@Override
|
||||
public void addStory(Integer id, List<ZtStory> ztStories) {
|
||||
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper<ZtKanbanlane>().lambda()
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "story"));
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.STORY.getValue()));
|
||||
|
||||
List<ZtKanbancolumnDTO> ztKanbancolumnDTOS = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
|
||||
|
||||
@@ -399,7 +401,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
public void addTask(Integer id, List<ZtTask> asList) {
|
||||
|
||||
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper<ZtKanbanlane>().lambda()
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "task"));
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.TASK.getValue()));
|
||||
|
||||
List<ZtKanbancolumnDTO> kanbancolumnList = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
|
||||
|
||||
@@ -425,11 +427,13 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
@Override
|
||||
public void addBug(Integer id, List<ZtBug> asList) {
|
||||
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper<ZtKanbanlane>().lambda()
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "bug"));
|
||||
.eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.BUG.getValue()));
|
||||
|
||||
List<ZtKanbancolumnDTO> ztKanbancolumnDTOS = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
|
||||
|
||||
List<ZtKanbancolumnDTO> backlog = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("unconfirmed")).collect(Collectors.toList());
|
||||
List<ZtKanbancolumnDTO> backlog = ztKanbancolumnDTOS.stream()
|
||||
.filter(o -> o.getType().equals(KanbanColumnType.BUG_UNCONFIRMED.getValue()))
|
||||
.collect(Collectors.toList());
|
||||
ZtKanbancolumnDTO ztKanbancolumnDTO = backlog.get(0);
|
||||
|
||||
ZtKanbancell kanbancell = this.kanbancellService.getOne(new QueryWrapper<ZtKanbancell>().lambda()
|
||||
|
||||
@@ -313,8 +313,11 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
public void projectClose(ZtProjectDTO dto) {
|
||||
|
||||
ZtProject ztProject = this.baseMapper.selectById(dto.getId());
|
||||
if (ztProject == null || "closed".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("未查询到");
|
||||
if (ztProject == null) {
|
||||
throw new BusinessException("未查询到项目,项目ID: " + dto.getId());
|
||||
}
|
||||
if ("closed".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("项目已关闭,无法重复关闭,项目ID: " + dto.getId());
|
||||
}
|
||||
ztProject.setRealEnd(dto.getClosedDate());
|
||||
ztProject.setLastEditedDate(new Date());
|
||||
@@ -350,6 +353,7 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void projectStart(ZtProjectDTO dto) {
|
||||
ZtProject ztProject = this.baseMapper.selectById(dto.getId());
|
||||
if (ztProject == null || !"wait".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
@@ -385,8 +389,11 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
@Override
|
||||
public void projectDeleted(ZtProjectDTO dto) {
|
||||
ZtProject ztProject = this.baseMapper.selectById(dto.getId());
|
||||
if (ztProject == null || "1".equalsIgnoreCase(ztProject.getDeleted())) {
|
||||
throw new BusinessException("未查询到");
|
||||
if (ztProject == null) {
|
||||
throw new BusinessException("未查询到项目,项目ID: " + dto.getId());
|
||||
}
|
||||
if ("1".equalsIgnoreCase(ztProject.getDeleted())) {
|
||||
throw new BusinessException("项目已删除,无法重复删除,项目ID: " + dto.getId());
|
||||
}
|
||||
ztProject.setDeleted("1");
|
||||
ztProject.setCanceledBy(RiskUserThreadLocal.get().getName());
|
||||
@@ -421,8 +428,11 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
@Override
|
||||
public void projectActivated(ZtProjectDTO dto) {
|
||||
ZtProject ztProject = this.baseMapper.selectById(dto.getId());
|
||||
if (ztProject == null || !"closed".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("未查询到");
|
||||
if (ztProject == null) {
|
||||
throw new BusinessException("未查询到项目,项目ID: " + dto.getId());
|
||||
}
|
||||
if (!"closed".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("项目未关闭,无法激活,当前状态: " + ztProject.getStatus() + ",项目ID: " + dto.getId());
|
||||
}
|
||||
LambdaUpdateWrapper<ZtProject> updateWrapper = new UpdateWrapper<ZtProject>().lambda().set(ZtProject::getStatus, "doing")
|
||||
.set(ZtProject::getRealEnd,null)
|
||||
@@ -457,8 +467,11 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
@Override
|
||||
public void projectSuspended(ZtProjectDTO dto) {
|
||||
ZtProject ztProject = this.baseMapper.selectById(dto.getId());
|
||||
if (ztProject == null || !"wait".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("未查询到");
|
||||
if (ztProject == null) {
|
||||
throw new BusinessException("未查询到项目,项目ID: " + dto.getId());
|
||||
}
|
||||
if (!"wait".equalsIgnoreCase(ztProject.getStatus())) {
|
||||
throw new BusinessException("项目状态不是等待状态,无法挂起,当前状态: " + ztProject.getStatus() + ",项目ID: " + dto.getId());
|
||||
}
|
||||
ztProject.setStatus("suspended");
|
||||
ztProject.setLastEditedBy(RiskUserThreadLocal.get().getName());
|
||||
|
||||
@@ -368,9 +368,9 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
List<ZtStory> ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
|
||||
|
||||
List<ZtBug> bugs =CollectionUtils.isEmpty(bugList)?new ArrayList<>(): bugService.listByIds(bugList);
|
||||
long notTested = ztStories.stream().filter(o -> !o.getStage().equals(StoryStageEnums.productVerified.getValue())).count();
|
||||
if(notTested>0){
|
||||
throw new BusinessException("当前需求存在未测试完成的请检查");
|
||||
List<ZtStory> notProductYsList = ztStories.stream().filter(o -> !o.getStage().equals(StoryStageEnums.productVerified.getValue())).toList();
|
||||
if(!CollectionUtils.isEmpty(notProductYsList)){
|
||||
throw new BusinessException("当前需求存在未产品验收的需求请检查 id="+notProductYsList.get(0).getId()+" name="+notProductYsList.get(0).getTitle());
|
||||
}
|
||||
//'active','resolved','closed'?
|
||||
long count = bugs.stream().filter(o -> !Arrays.asList("resolved","closed").contains(o.getStatus())).count();
|
||||
@@ -391,8 +391,6 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
sendReleaseMail(ztStories);
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
actionService.addAction(ActionType.FB, ActionStatus.FBSB, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
|
||||
@@ -980,16 +980,16 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
public void testSubmitVerified(ZtStoryDTO qo) {
|
||||
ZtStory ztStory = this.baseMapper.selectById(qo.getId());
|
||||
if(ztStory==null){
|
||||
throw new BusinessException("未查询到需求");
|
||||
throw new BusinessException("未查询到需求,需求ID: " + qo.getId());
|
||||
}
|
||||
if(!StoryStatusEnums.active.getValue().equals(ztStory.getStatus())){
|
||||
throw new BusinessException("需求状态不对");
|
||||
throw new BusinessException("需求状态不是激活状态,无法提交验收,当前状态: " + ztStory.getStatus() + ",需求ID: " + qo.getId());
|
||||
}
|
||||
if(!StoryStageEnums.tested.getValue().equals(ztStory.getStage())){
|
||||
throw new BusinessException("需求状态不对");
|
||||
throw new BusinessException("需求阶段不是测试完毕,无法提交验收,当前阶段: " + ztStory.getStage() + ",需求ID: " + qo.getId());
|
||||
}
|
||||
if(!ObjectUtil.equal(ztStory.getInnerYsFlag(),1)){
|
||||
throw new BusinessException("无需内部验收,不需要提交");
|
||||
throw new BusinessException("无需内部验收,不需要提交,需求ID: " + qo.getId());
|
||||
}
|
||||
//产品验收中
|
||||
ztStory.setStage(StoryStageEnums.productWaitVerified.getValue());
|
||||
@@ -1014,16 +1014,16 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
public void storyProductUserYs(ZtStoryDTO qo) {
|
||||
ZtStory ztStory = this.baseMapper.selectById(qo.getId());
|
||||
if(ztStory==null){
|
||||
throw new BusinessException("未查询到需求");
|
||||
throw new BusinessException("未查询到需求,需求ID: " + qo.getId());
|
||||
}
|
||||
if(!StoryStatusEnums.active.getValue().equals(ztStory.getStatus())){
|
||||
throw new BusinessException("需求状态不对");
|
||||
throw new BusinessException("需求状态不是激活状态,无法验收,当前状态: " + ztStory.getStatus() + ",需求ID: " + qo.getId());
|
||||
}
|
||||
if(!StoryStageEnums.productWaitVerified.getValue().equals(ztStory.getStage())){
|
||||
throw new BusinessException("需求状态不对");
|
||||
throw new BusinessException("需求阶段不是待验收状态,无法验收,当前阶段: " + ztStory.getStage() + ",需求ID: " + qo.getId());
|
||||
}
|
||||
//产品验收中
|
||||
ztStory.setStage(StoryStageEnums.productWaitVerified.getValue());
|
||||
ztStory.setStage(StoryStageEnums.productVerified.getValue());
|
||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
ztStory.setLastediteddate(new Date());
|
||||
ztStory.setInnerYsTime(new Date());
|
||||
@@ -1490,16 +1490,10 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
@Override
|
||||
public void taskFinishChangeStatus(Integer story, String finishBy, TaskType type, Boolean cancelFlag) {
|
||||
ZtStory ztStory = this.getById(story);
|
||||
if(ztStory == null) {
|
||||
if(ztStory == null|| story == 0) {
|
||||
return;
|
||||
}
|
||||
if (ztStory != null && ztStory.getStatus().equals("closed")) {
|
||||
return;
|
||||
}
|
||||
if (type != TaskType.test && type != TaskType.devel) {
|
||||
// return;
|
||||
}
|
||||
if (story == null || story == 0) {
|
||||
if (ztStory.getStatus().equals("closed")) {
|
||||
return;
|
||||
}
|
||||
if (cancelFlag && type == TaskType.devel) {
|
||||
|
||||
Reference in New Issue
Block a user