diff --git a/pom.xml b/pom.xml
index 647e22c..c6338e5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,13 +99,6 @@
1.5.2
-
- com.alibaba
- easyexcel
- 3.0.5
-
-
-
com.tencentcloudapi
@@ -293,11 +286,11 @@
-
- org.apache.commons
- commons-pool2
- 2.8.1
-
+
+
+
+
+
diff --git a/src/main/java/com/sa/zentao/conf/GlobalExceptionHandler.java b/src/main/java/com/sa/zentao/conf/GlobalExceptionHandler.java
index bf85e11..da88dba 100644
--- a/src/main/java/com/sa/zentao/conf/GlobalExceptionHandler.java
+++ b/src/main/java/com/sa/zentao/conf/GlobalExceptionHandler.java
@@ -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);
}
-
-
}
}
diff --git a/src/main/java/com/sa/zentao/conf/WebMvcConfig.java b/src/main/java/com/sa/zentao/conf/WebMvcConfig.java
index ad273dd..4a636e2 100644
--- a/src/main/java/com/sa/zentao/conf/WebMvcConfig.java
+++ b/src/main/java/com/sa/zentao/conf/WebMvcConfig.java
@@ -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");
diff --git a/src/main/java/com/sa/zentao/controller/ZtStoryController.java b/src/main/java/com/sa/zentao/controller/ZtStoryController.java
index 3d7588d..2a3c297 100644
--- a/src/main/java/com/sa/zentao/controller/ZtStoryController.java
+++ b/src/main/java/com/sa/zentao/controller/ZtStoryController.java
@@ -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 p = ztStoryService.pageList(qo);
List list = p.getList();
List 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 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 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 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 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();
diff --git a/src/main/java/com/sa/zentao/controller/ZtStoryUserController.java b/src/main/java/com/sa/zentao/controller/ZtStoryUserController.java
index 686b97a..59d68cd 100644
--- a/src/main/java/com/sa/zentao/controller/ZtStoryUserController.java
+++ b/src/main/java/com/sa/zentao/controller/ZtStoryUserController.java
@@ -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 list = storyUserService.list(eq
);
diff --git a/src/main/java/com/sa/zentao/dao/BusinessException.java b/src/main/java/com/sa/zentao/dao/BusinessException.java
index 310a3ab..3be42e9 100644
--- a/src/main/java/com/sa/zentao/dao/BusinessException.java
+++ b/src/main/java/com/sa/zentao/dao/BusinessException.java
@@ -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;
}
diff --git a/src/main/java/com/sa/zentao/dao/Code.java b/src/main/java/com/sa/zentao/dao/Code.java
index ec3e220..b96760c 100644
--- a/src/main/java/com/sa/zentao/dao/Code.java
+++ b/src/main/java/com/sa/zentao/dao/Code.java
@@ -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;
diff --git a/src/main/java/com/sa/zentao/qo/ZtProjectQo.java b/src/main/java/com/sa/zentao/qo/ZtProjectQo.java
index cc64566..89dc740 100644
--- a/src/main/java/com/sa/zentao/qo/ZtProjectQo.java
+++ b/src/main/java/com/sa/zentao/qo/ZtProjectQo.java
@@ -63,6 +63,8 @@ public class ZtProjectQo extends BaseQo {
private String status;
+ private List statusList;
+
private List stageList;
private String title;
diff --git a/src/main/java/com/sa/zentao/service/impl/ZtKanbanlaneServiceImpl.java b/src/main/java/com/sa/zentao/service/impl/ZtKanbanlaneServiceImpl.java
index e82a4ab..00b8440 100644
--- a/src/main/java/com/sa/zentao/service/impl/ZtKanbanlaneServiceImpl.java
+++ b/src/main/java/com/sa/zentao/service/impl/ZtKanbanlaneServiceImpl.java
@@ -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 ztStories) {
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper().lambda()
- .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "story"));
+ .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.STORY.getValue()));
List ztKanbancolumnDTOS = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
@@ -399,7 +401,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl asList) {
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper().lambda()
- .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "task"));
+ .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.TASK.getValue()));
List kanbancolumnList = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
@@ -425,11 +427,13 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl asList) {
ZtKanbanlane lane = this.baseMapper.selectOne(new QueryWrapper().lambda()
- .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, "bug"));
+ .eq(ZtKanbanlane::getExecution, id).eq(ZtKanbanlane::getType, KanbanCellType.BUG.getValue()));
List ztKanbancolumnDTOS = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
- List backlog = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("unconfirmed")).collect(Collectors.toList());
+ List 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().lambda()
diff --git a/src/main/java/com/sa/zentao/service/impl/ZtProjectServiceImpl.java b/src/main/java/com/sa/zentao/service/impl/ZtProjectServiceImpl.java
index aa4d873..ac32153 100644
--- a/src/main/java/com/sa/zentao/service/impl/ZtProjectServiceImpl.java
+++ b/src/main/java/com/sa/zentao/service/impl/ZtProjectServiceImpl.java
@@ -313,8 +313,11 @@ public class ZtProjectServiceImpl extends ServiceImpl updateWrapper = new UpdateWrapper().lambda().set(ZtProject::getStatus, "doing")
.set(ZtProject::getRealEnd,null)
@@ -457,8 +467,11 @@ public class ZtProjectServiceImpl extends ServiceImpl ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
List 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 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 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 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 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) {
diff --git a/src/main/resources/mapper/ZtStoryMapper.xml b/src/main/resources/mapper/ZtStoryMapper.xml
index c871df0..4c17f7f 100644
--- a/src/main/resources/mapper/ZtStoryMapper.xml
+++ b/src/main/resources/mapper/ZtStoryMapper.xml
@@ -158,7 +158,13 @@
and s.status != 'closed'
+
+
+ and s.product_user = #{qo.userName}
+
+
+ and s.test_user = #{qo.userName}
and s.assignedTo= #{qo.userName}
@@ -280,9 +286,14 @@
open="(" close=")" separator=",">
#{id}
-
-
+
+ and s.status in
+
+ #{id}
+
+
group by s.id
@@ -382,38 +393,12 @@
pt.name productName
from zt_story s
- 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_project pj on pstory.project = pj.id
- left join zt_product pt on s.product = pt.id
+ 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_project pj on pstory.project = pj.id
+ left join zt_product pt on s.product = pt.id
left join zt_projectstory ps on s.id = ps.story
- WHERE 1=1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- and s.test_user like concat('%', #{qo.testUser}, '%')
-
-
- and s.product_user like concat('%', #{qo.productUser}, '%')
-
-
-
-
-
-
-
+ WHERE 1=1
and s.pri = #{qo.pri}
@@ -425,7 +410,7 @@
- and s.ys_user = #{qo.userName}
+ and s.ys_user = #{qo.userName}
@@ -450,47 +435,48 @@
and s.title like concat('%', #{qo.name}, '%')
+
+
+ and s.test_user like concat('%', #{qo.testUser}, '%')
+
and s.product_user like concat('%', #{qo.productUser}, '%')
-
- and s.assignedTo like concat('%', #{qo.testUser}, '%')
-
- and pt.name like concat('%', #{qo.productName}, '%')
+ and pt.name like concat('%', #{qo.productName}, '%')
-
- and ps.project =#{qo.project}
- and ps.type= 'project'
-
-
- and ps.project =#{qo.execution}
- and ps.type= 'execution'
-
-
- and s.module =#{qo.moduleId}
-
-
+
+ and ps.project =#{qo.project}
+ and ps.type= 'project'
+
+
+ and ps.project =#{qo.execution}
+ and ps.type= 'execution'
+
+
+ and s.module =#{qo.moduleId}
+
+
-
-
- and s.status !='closed'
-
-
- and s.assignedTo = #{qo.userName}
+
+
+ and s.status !='closed'
+
+
+ and s.assignedTo = #{qo.userName}
+
+
+
+
+
+ and
+ (s.assignedTo = #{qo.userName}
+ or s.openedBy = #{qo.userName}
+ )
-
-
-
- and
- (s.assignedTo = #{qo.userName}
- or s.openedBy = #{qo.userName}
- )
-
-
-
+
and s.openedBy = #{qo.userName}
@@ -503,6 +489,9 @@
and s.product_user = #{qo.userName}
+
+ and s.test_user = #{qo.userName}
+
and s.assignedTo = #{qo.userName}
@@ -522,7 +511,7 @@
- and s.status = '11'
+ and s.status = '11'
@@ -533,10 +522,12 @@
and s.status = 'reviewing'
-
+
+ and s.ys_user = #{qo.userName}
+
- and ( s.stage = 'released'
+ and ( s.stage = 'released'
and s.ys_flag =0)
or (s.stage = 'verified' and s.ys_flag =2)
@@ -548,53 +539,53 @@
--- //项目名称
+ -- //项目名称
- and pj.name like concat('%', #{qo.searchValue}, '%')
+ and pj.name like concat('%', #{qo.searchValue}, '%')
--- 项目id
+ -- 项目id
- and pj.id =#{qo.searchValue}
+ and pj.id =#{qo.searchValue}
- -- //需求名称
+ -- //需求名称
- and s.title like concat('%', #{qo.searchValue}, '%')
+ and s.title like concat('%', #{qo.searchValue}, '%')
- -- 需求id
+ -- 需求id
- and s.id =#{qo.searchValue}
+ and s.id =#{qo.searchValue}
--- 状态
+ -- 状态
- and s.stage =#{qo.searchValue}
+ and s.stage =#{qo.searchValue}
--- 项目描述
+ -- 项目描述
- and sp.`spec` =#{qo.searchValue}
+ and sp.`spec` =#{qo.searchValue}
--- 负责人
+ -- 负责人
- and s.assignedTo =#{qo.searchValue}
+ and s.assignedTo =#{qo.searchValue}
- and s.plan_end_date ${qo.searchValue}
+ and s.plan_end_date ${qo.searchValue}
- and s.start_date ${qo.searchValue}
+ and s.start_date ${qo.searchValue}
- and s.end_date ${qo.searchValue}
+ and s.end_date ${qo.searchValue}
- and s.openedBy = #{qo.searchValue}
+ and s.openedBy = #{qo.searchValue}
- and s.closedBy = #{qo.searchValue}
+ and s.closedBy = #{qo.searchValue}
@@ -613,7 +604,13 @@
open="(" close=")" separator=",">
#{id}
-
+
+
+ and s.status in
+
+ #{id}
+
@@ -623,7 +620,7 @@
- order by s.${qo.orderName} ${qo.orderSort}
+ order by s.${qo.orderName} ${qo.orderSort}
order by s.id desc
@@ -643,7 +640,6 @@
and s.status !='closed'
-
+
+
+ and s.product_user = #{qo.userName}
+
+
+ and s.test_user = #{qo.userName}
+
+
and s.assignedTo = #{qo.userName}
@@ -1090,8 +1093,15 @@
open="(" close=")" separator=",">
#{id}
-
+
+ and s.status in
+
+ #{id}
+
+
+
group by s.id
@@ -1351,14 +1361,17 @@