Compare commits
2 Commits
e948b53e89
...
dev-2025-t
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f1c7b02fe | |||
| 8f0c7a020c |
11
pom.xml
11
pom.xml
@@ -18,17 +18,6 @@
|
|||||||
<boot.version>3.3.0</boot.version>
|
<boot.version>3.3.0</boot.version>
|
||||||
</properties>
|
</properties>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.hutool</groupId>
|
|
||||||
<artifactId>hutool-all</artifactId>
|
|
||||||
<version>4.6.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.itextpdf</groupId>
|
<groupId>com.itextpdf</groupId>
|
||||||
|
|||||||
@@ -8,13 +8,11 @@ import com.alibaba.excel.metadata.data.WriteCellData;
|
|||||||
import com.alibaba.excel.write.metadata.WriteSheet;
|
import com.alibaba.excel.write.metadata.WriteSheet;
|
||||||
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.sa.zentao.dao.*;
|
import com.sa.zentao.dao.*;
|
||||||
import com.sa.zentao.entity.ZtProject;
|
import com.sa.zentao.entity.ZtProject;
|
||||||
import com.sa.zentao.entity.ZtProjectproduct;
|
import com.sa.zentao.entity.ZtProjectproduct;
|
||||||
import com.sa.zentao.entity.ZtStoryFeedback;
|
import com.sa.zentao.entity.ZtStoryFeedback;
|
||||||
import com.sa.zentao.entity.ZtStoryUser;
|
|
||||||
import com.sa.zentao.enums.StoryStageEnums;
|
import com.sa.zentao.enums.StoryStageEnums;
|
||||||
import com.sa.zentao.enums.StoryStatusEnums;
|
import com.sa.zentao.enums.StoryStatusEnums;
|
||||||
import com.sa.zentao.enums.UserStoryEnums;
|
import com.sa.zentao.enums.UserStoryEnums;
|
||||||
@@ -28,7 +26,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
@@ -185,27 +182,6 @@ public class ZtStoryController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 测试提交验收
|
|
||||||
* @param qo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/testSubmitVerified", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
|
||||||
public Result<ZtStoryDTO> testSubmitVerified(@RequestBody ZtStoryDTO qo){
|
|
||||||
ztStoryService.testSubmitVerified(qo);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 产品验收通过
|
|
||||||
* @param qo
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/storyProductUserYs", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
|
||||||
public Result<ZtStoryDTO> storyProductUserYs(@RequestBody ZtStoryDTO qo){
|
|
||||||
ztStoryService.storyProductUserYs(qo);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/storyListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
@RequestMapping(value = "/storyListByProject", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||||
public Result<ZtStoryDTO> storyListByProject(@RequestBody ZtProjectQo qo){
|
public Result<ZtStoryDTO> storyListByProject(@RequestBody ZtProjectQo qo){
|
||||||
@@ -360,26 +336,6 @@ public class ZtStoryController {
|
|||||||
List<ZtProject> list = ztStoryService.execListByProject(dto);
|
List<ZtProject> list = ztStoryService.execListByProject(dto);
|
||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* 指派产品人
|
|
||||||
* @param dto
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/assignedToProductUser", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
|
||||||
public Result assignedToProductUser(@RequestBody @Validated ZtStoryDTO dto){
|
|
||||||
this.ztStoryService.assignedToProductUser(dto);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 指派测试人
|
|
||||||
* @param dto
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/assignedToTestUser", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
|
||||||
public Result assignedToTestUser(@RequestBody @Validated ZtStoryDTO dto){
|
|
||||||
this.ztStoryService.assignedToTestUser(dto);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,14 +7,10 @@ import com.alibaba.excel.write.metadata.WriteSheet;
|
|||||||
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
|
||||||
import com.sa.zentao.dao.*;
|
import com.sa.zentao.dao.*;
|
||||||
import com.sa.zentao.entity.ZtStory;
|
import com.sa.zentao.entity.ZtStory;
|
||||||
import com.sa.zentao.entity.ZtStoryUser;
|
import com.sa.zentao.entity.ZtStoryUser;
|
||||||
import com.sa.zentao.enums.ActionStatus;
|
|
||||||
import com.sa.zentao.enums.ActionType;
|
|
||||||
import com.sa.zentao.enums.UserStoryEnums;
|
import com.sa.zentao.enums.UserStoryEnums;
|
||||||
import com.sa.zentao.qo.StoryQo;
|
import com.sa.zentao.qo.StoryQo;
|
||||||
import com.sa.zentao.qo.ZtProjectQo;
|
import com.sa.zentao.qo.ZtProjectQo;
|
||||||
@@ -23,7 +19,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -61,17 +56,6 @@ public class ZtStoryUserController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 指派产品人
|
|
||||||
* @param dto
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping(value = "/assignedToProductUser", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
|
||||||
public Result assignedToProductUser(@RequestBody @Validated ZtStoryUserDTO dto){
|
|
||||||
this.storyUserService.assignedToProductUser(dto);
|
|
||||||
return Result.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/addStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
@RequestMapping(value = "/addStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||||
public Result addStory(@RequestBody ZtStoryUserDTO dto){
|
public Result addStory(@RequestBody ZtStoryUserDTO dto){
|
||||||
|
|||||||
@@ -135,11 +135,11 @@ public class ZtUserController {
|
|||||||
}
|
}
|
||||||
eq.in(ZtUser::getAccount,execution.stream().map(o->o.getAccount()).collect(Collectors.toList()));
|
eq.in(ZtUser::getAccount,execution.stream().map(o->o.getAccount()).collect(Collectors.toList()));
|
||||||
}else{
|
}else{
|
||||||
this.userMapper.selectOne(new QueryWrapper<ZtUser>().lambda()
|
this.userMapper.selectOne(new QueryWrapper<ZtUser>().lambda().eq(ZtUser::getAccount,RiskUserThreadLocal.get().getName()));
|
||||||
.eq(ZtUser::getAccount,RiskUserThreadLocal.get().getName()));
|
|
||||||
}
|
}
|
||||||
eq.eq(dto.getUserType()!=null,ZtUser::getUserType,dto.getUserType());
|
|
||||||
return Result.success(userService.list(eq));
|
return Result.success(userService.list(eq
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/storyReviewList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
@RequestMapping(value = "/storyReviewList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||||
|
|||||||
@@ -160,26 +160,4 @@ public class PerformanceDTO implements Serializable {
|
|||||||
private BigDecimal professionalSkillEnhancementScore=BigDecimal.ZERO;
|
private BigDecimal professionalSkillEnhancementScore=BigDecimal.ZERO;
|
||||||
//问题管理得分
|
//问题管理得分
|
||||||
private BigDecimal developFeedbackStory=BigDecimal.valueOf(10);
|
private BigDecimal developFeedbackStory=BigDecimal.valueOf(10);
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品经理
|
|
||||||
*/
|
|
||||||
// 产品缺陷率
|
|
||||||
private BigDecimal productBugRate=BigDecimal.ZERO;
|
|
||||||
//项目准时率 需求发布准时率 研发需求/用户需求
|
|
||||||
private BigDecimal productProjectOnTimeRateScore=BigDecimal.ZERO;
|
|
||||||
//主动性责任感
|
|
||||||
private BigDecimal productResponsibilityScore=BigDecimal.valueOf(5);
|
|
||||||
//需求会议
|
|
||||||
private BigDecimal productMeetScore=BigDecimal.valueOf(10);
|
|
||||||
//问题响应
|
|
||||||
private BigDecimal productProblemResponse=BigDecimal.valueOf(15);
|
|
||||||
//需求准确性
|
|
||||||
private BigDecimal accurateDemand=BigDecimal.valueOf(20);;
|
|
||||||
//产品规划
|
|
||||||
private BigDecimal productPlanning=BigDecimal.valueOf(10);;
|
|
||||||
//本阶段计划发布数量
|
|
||||||
private BigDecimal productPlanStoryNum;
|
|
||||||
//本阶段准时发布研发数量
|
|
||||||
private BigDecimal productPlanStoryOnTimeNum;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.sa.zentao.dao;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.sa.zentao.enums.UserType;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -206,8 +205,6 @@ public class ZtProjectDTO<T> implements Serializable {
|
|||||||
|
|
||||||
private String deleted;
|
private String deleted;
|
||||||
|
|
||||||
private UserType userType;
|
|
||||||
|
|
||||||
private List<T> children;
|
private List<T> children;
|
||||||
|
|
||||||
private List<Integer> storyIds;
|
private List<Integer> storyIds;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.sa.zentao.entity.ZtStoryCase;
|
import com.sa.zentao.entity.ZtStoryCase;
|
||||||
import com.sa.zentao.entity.ZtStoryreview;
|
import com.sa.zentao.entity.ZtStoryreview;
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
@@ -32,7 +31,6 @@ public class ZtStoryDTO implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@NotNull(message = "请录入ID")
|
|
||||||
@ExcelProperty(value = "ID",index =0)
|
@ExcelProperty(value = "ID",index =0)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
@ExcelProperty(value = "研发需求名称",index =1)
|
@ExcelProperty(value = "研发需求名称",index =1)
|
||||||
@@ -50,8 +48,6 @@ public class ZtStoryDTO implements Serializable {
|
|||||||
private Date planEndDate;
|
private Date planEndDate;
|
||||||
@ExcelProperty(value = "阶段",index =6)
|
@ExcelProperty(value = "阶段",index =6)
|
||||||
private String stage;
|
private String stage;
|
||||||
@ExcelIgnore
|
|
||||||
private String stageName;
|
|
||||||
@ExcelProperty(value = "指派给",index =7)
|
@ExcelProperty(value = "指派给",index =7)
|
||||||
private String assignedToName;
|
private String assignedToName;
|
||||||
|
|
||||||
@@ -156,32 +152,8 @@ public class ZtStoryDTO implements Serializable {
|
|||||||
private Integer frombug;
|
private Integer frombug;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Integer feedback;
|
private Integer feedback;
|
||||||
/**
|
|
||||||
* 产品人
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String productUser;
|
|
||||||
/**
|
|
||||||
* 产品人
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String productUserName;
|
|
||||||
/**
|
|
||||||
* 产品人
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String testUser;
|
|
||||||
/**
|
|
||||||
* 产品人
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String testUserName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1是否内部验收 0不需要
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private Integer innerYsFlag;
|
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String keywords;
|
private String keywords;
|
||||||
@@ -245,6 +217,7 @@ public class ZtStoryDTO implements Serializable {
|
|||||||
private Date planYsDate;
|
private Date planYsDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Date activateddate;
|
private Date activateddate;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
|
|||||||
@@ -6,11 +6,8 @@ import com.alibaba.excel.metadata.data.WriteCellData;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NonNull;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -34,7 +31,6 @@ public class ZtStoryUserDTO implements Serializable {
|
|||||||
|
|
||||||
// @TableId(value = "id", type = IdType.AUTO)
|
// @TableId(value = "id", type = IdType.AUTO)
|
||||||
// @ExcelProperty
|
// @ExcelProperty
|
||||||
@NotNull(message = "ID不能为空")
|
|
||||||
@ExcelProperty(value = "ID",index =0)
|
@ExcelProperty(value = "ID",index =0)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@@ -134,10 +130,6 @@ public class ZtStoryUserDTO implements Serializable {
|
|||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String color;
|
private String color;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String productUserName;
|
|
||||||
@ExcelIgnore
|
|
||||||
private String productUserColor;
|
|
||||||
@ExcelIgnore
|
|
||||||
private String stage;
|
private String stage;
|
||||||
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
@@ -155,7 +147,7 @@ public class ZtStoryUserDTO implements Serializable {
|
|||||||
private String openedby;
|
private String openedby;
|
||||||
|
|
||||||
|
|
||||||
@NotBlank(message = "指派??")
|
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private String assignedto;
|
private String assignedto;
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
@@ -281,10 +273,4 @@ public class ZtStoryUserDTO implements Serializable {
|
|||||||
//1.需要 2.不需要
|
//1.需要 2.不需要
|
||||||
@ExcelIgnore
|
@ExcelIgnore
|
||||||
private Integer needImprove;
|
private Integer needImprove;
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品用户
|
|
||||||
*/
|
|
||||||
@ExcelIgnore
|
|
||||||
private String productUser;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,8 +212,4 @@ public class ZtTaskDTO implements Serializable {
|
|||||||
* 交付物
|
* 交付物
|
||||||
*/
|
*/
|
||||||
private String deliverContent;
|
private String deliverContent;
|
||||||
/**
|
|
||||||
* 1提交 0不提交
|
|
||||||
*/
|
|
||||||
private Integer innerYsFlag;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,12 +190,7 @@ public class ZtStory implements Serializable {
|
|||||||
private Date developedDate;
|
private Date developedDate;
|
||||||
//结束日期 测试结束
|
//结束日期 测试结束
|
||||||
private Date endDate;
|
private Date endDate;
|
||||||
//内部验收时间
|
|
||||||
@TableField(exist = false)
|
|
||||||
private Date innerYsTime;
|
|
||||||
//测试提交验收时间
|
|
||||||
@TableField(exist = false)
|
|
||||||
private Date testSubmitYsTime;
|
|
||||||
private Integer project;
|
private Integer project;
|
||||||
//1通过 2不通过
|
//1通过 2不通过
|
||||||
private Integer ysFlag;
|
private Integer ysFlag;
|
||||||
@@ -228,16 +223,5 @@ public class ZtStory implements Serializable {
|
|||||||
// private Date develDate;
|
// private Date develDate;
|
||||||
// //测试完成时间
|
// //测试完成时间
|
||||||
// private Date testedDate;
|
// private Date testedDate;
|
||||||
/**
|
|
||||||
* 内部验收标识 1需要内部验收 0不需要
|
|
||||||
*/
|
|
||||||
private Integer innerYsFlag;
|
|
||||||
/**
|
|
||||||
* 产品人员
|
|
||||||
*/
|
|
||||||
private String productUser;
|
|
||||||
/**
|
|
||||||
* 测试人员
|
|
||||||
*/
|
|
||||||
private String testUser;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -225,8 +224,4 @@ public class ZtStoryUser implements Serializable {
|
|||||||
private String deliverRemark;
|
private String deliverRemark;
|
||||||
|
|
||||||
private String oldStatus;
|
private String oldStatus;
|
||||||
/**
|
|
||||||
* 产品用户
|
|
||||||
*/
|
|
||||||
private String productUser;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,12 +62,6 @@ public enum ActionStatus {
|
|||||||
XGMM(101, "xgmm","修改密码"),
|
XGMM(101, "xgmm","修改密码"),
|
||||||
CZMM(102, "czmm","重置密码"),
|
CZMM(102, "czmm","重置密码"),
|
||||||
CZINFO(103, "czmm","重置"),
|
CZINFO(103, "czmm","重置"),
|
||||||
|
|
||||||
//测试提交验收
|
|
||||||
TESTSUBMITYS(200, "testSubmitYs","测试提交验收"),
|
|
||||||
PRODUCTYS(201, "productYs","产品验收"),
|
|
||||||
ASSIGNTOPRODUCTUSER(202, "assignProductUser","指派产品人"),
|
|
||||||
ASSIGNTOTESTUSER(203, "assignTestUser","指派测试人"),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
@EnumValue
|
@EnumValue
|
||||||
|
|||||||
@@ -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 已关闭
|
||||||
@@ -16,8 +13,6 @@ public enum StoryStageEnums {
|
|||||||
developed(10, "developed","研发完毕"),
|
developed(10, "developed","研发完毕"),
|
||||||
testing(5, "testing","测试中"),
|
testing(5, "testing","测试中"),
|
||||||
tested(6, "tested","测试完毕"),
|
tested(6, "tested","测试完毕"),
|
||||||
productWaitVerified(9, "productWaitVerified","产品验收中"),
|
|
||||||
productVerified(10, "productVerified","产品已验收"),
|
|
||||||
released(7, "released","已发布"),
|
released(7, "released","已发布"),
|
||||||
verified(8, "verified","已验收"),
|
verified(8, "verified","已验收"),
|
||||||
;
|
;
|
||||||
@@ -33,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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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),
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -60,7 +59,4 @@ public interface ZtStoryMapper extends BaseMapper<ZtStory> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SearchDTO> searchAll(@Param("keyword") String keyword,@Param("pIds")List<Integer> pIds);
|
List<SearchDTO> searchAll(@Param("keyword") String keyword,@Param("pIds")List<Integer> pIds);
|
||||||
|
|
||||||
Map<String, Object> storyReleaseOnTimeByProducts(@Param("pIds") List<Integer> pids,
|
|
||||||
@Param("startTime") Date firstDayOfMonth,@Param("endTime") Date lastDayOfMonth);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ public class StoryQo extends BaseQo {
|
|||||||
private Integer productId;
|
private Integer productId;
|
||||||
private String openedby;
|
private String openedby;
|
||||||
private String status;
|
private String status;
|
||||||
/**
|
|
||||||
* 用户产品
|
|
||||||
*/
|
|
||||||
private String productUser;
|
|
||||||
private List<Integer> productIds;
|
private List<Integer> productIds;
|
||||||
|
|
||||||
private List<String> statusList;
|
private List<String> statusList;
|
||||||
|
|||||||
@@ -37,11 +37,7 @@ public class ZtProjectQo extends BaseQo {
|
|||||||
private String severity;
|
private String severity;
|
||||||
|
|
||||||
private String productName;
|
private String productName;
|
||||||
/**
|
|
||||||
* 产品人
|
|
||||||
*/
|
|
||||||
private String productUser;
|
|
||||||
private String testUser;
|
|
||||||
private Integer productId;
|
private Integer productId;
|
||||||
|
|
||||||
private List<Integer> productIds;
|
private List<Integer> productIds;
|
||||||
@@ -68,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;
|
||||||
@@ -111,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不延期
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public interface IZtStoryService extends IService<ZtStory> {
|
|||||||
void waitStory(Integer story);
|
void waitStory(Integer story);
|
||||||
void startStory(Integer story);
|
void startStory(Integer story);
|
||||||
//开发完成
|
//开发完成
|
||||||
void develFinishStory(Integer story,String finishBy);
|
void finishStory(Integer story,String finishBy);
|
||||||
//测试完毕
|
//测试完毕
|
||||||
void testedStory(Integer story,String finishBy);
|
void testedStory(Integer story,String finishBy);
|
||||||
//测试中
|
//测试中
|
||||||
@@ -105,15 +105,4 @@ public interface IZtStoryService extends IService<ZtStory> {
|
|||||||
List<ZtStory> getStoryListByDatePidsProject(List<Integer> pids, Integer id, Date firstDayOfMonth, Date lastDayOfMonth);
|
List<ZtStory> getStoryListByDatePidsProject(List<Integer> pids, Integer id, Date firstDayOfMonth, Date lastDayOfMonth);
|
||||||
|
|
||||||
PageInfo<SearchDTO> searchByName(SearchQo qo);
|
PageInfo<SearchDTO> searchByName(SearchQo qo);
|
||||||
|
|
||||||
void testSubmitVerified(ZtStoryDTO qo);
|
|
||||||
|
|
||||||
void storyProductUserYs(ZtStoryDTO qo);
|
|
||||||
|
|
||||||
Map<String, Object> storyReleaseOnTimeByProducts(@Param("pids") List<Integer> pids, @Param("startTime")Date firstDayOfMonth,
|
|
||||||
@Param("endTime")Date lastDayOfMonth);
|
|
||||||
|
|
||||||
void assignedToProductUser(ZtStoryDTO dto);
|
|
||||||
|
|
||||||
void assignedToTestUser(ZtStoryDTO dto);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,4 @@ public interface IZtStoryUserService extends IService<ZtStoryUser> {
|
|||||||
void confirmStory(ZtStoryUserDTO dto);
|
void confirmStory(ZtStoryUserDTO dto);
|
||||||
|
|
||||||
void needMeetOrDesign(ZtStoryUserDTO dto);
|
void needMeetOrDesign(ZtStoryUserDTO dto);
|
||||||
|
|
||||||
void assignedToProductUser(ZtStoryUserDTO dto);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.sa.zentao.service.impl;
|
package com.sa.zentao.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.ExcelWriter;
|
import com.alibaba.excel.ExcelWriter;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||||
@@ -199,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)
|
||||||
@@ -243,10 +241,7 @@ public class IZtCountService {
|
|||||||
.map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
.map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
|
|
||||||
result.setTestingCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setTestingCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
.filter(o -> Arrays.asList("testing", "tested"
|
.filter(o -> Arrays.asList("testing", "tested").contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
,StoryStageEnums.productWaitVerified.getValue()
|
|
||||||
,StoryStageEnums.productVerified.getValue()
|
|
||||||
).contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
|
||||||
// developing 研发中 developed 研发完毕 testing 测试中 tested测试完毕
|
// developing 研发中 developed 研发完毕 testing 测试中 tested测试完毕
|
||||||
|
|
||||||
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
@@ -354,10 +349,7 @@ public class IZtCountService {
|
|||||||
|
|
||||||
//0825 计划中和研发中合并
|
//0825 计划中和研发中合并
|
||||||
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
.filter(o -> Arrays.asList("wait","tested", "testing", "developed", "developing"
|
.filter(o -> Arrays.asList("wait","tested", "testing", "developed", "developing").contains(o.getStage())
|
||||||
,StoryStageEnums.productWaitVerified.getValue()
|
|
||||||
,StoryStageEnums.productVerified.getValue()).contains(o.getStage()
|
|
||||||
)
|
|
||||||
).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
|
|
||||||
result.setCswbCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setCswbCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
@@ -387,7 +379,7 @@ public class IZtCountService {
|
|||||||
|
|
||||||
result = setFeedback(result, feedbacks);
|
result = setFeedback(result, feedbacks);
|
||||||
|
|
||||||
} else if (userType == UserType.XMGLY || userType == UserType.XMZL||userType == UserType.CPJL) {
|
} else if (userType == UserType.XMGLY || userType == UserType.XMZL) {
|
||||||
|
|
||||||
|
|
||||||
List<ZtProduct> pList = this.productService.listByIds(pIds);
|
List<ZtProduct> pList = this.productService.listByIds(pIds);
|
||||||
@@ -419,9 +411,7 @@ public class IZtCountService {
|
|||||||
.map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
.map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
|
|
||||||
result.setTestingCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setTestingCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
.filter(o -> Arrays.asList("testing", "tested",StoryStageEnums.productVerified.getValue()
|
.filter(o -> Arrays.asList("testing", "tested").contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
,StoryStageEnums.productWaitVerified.getValue()
|
|
||||||
).contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
|
||||||
|
|
||||||
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||||
.filter(o -> Arrays.asList("developing", "developed").contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
.filter(o -> Arrays.asList("developing", "developed").contains(o.getStage())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
|
||||||
@@ -552,10 +542,6 @@ public class IZtCountService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
performanceDTO=JSON.parseObject(ztMonthScore.getScopeJson(),PerformanceDTO.class);
|
performanceDTO=JSON.parseObject(ztMonthScore.getScopeJson(),PerformanceDTO.class);
|
||||||
if (ztUser.getAccount().equals("weidongxia")) {
|
|
||||||
generatorCPJLExcel(qo, performanceDTO.getUserName(), performanceDTO, qo.getDate(), perList);
|
|
||||||
list.add(performanceDTO.getUserName() + "产品经理考核.xlsx");
|
|
||||||
} else
|
|
||||||
if (ztUser.getAccount().equals("liyuyan")) {
|
if (ztUser.getAccount().equals("liyuyan")) {
|
||||||
generatorXMZLExcel(performanceDTO.getUserName(), performanceDTO, qo.getDate());
|
generatorXMZLExcel(performanceDTO.getUserName(), performanceDTO, qo.getDate());
|
||||||
list.add(performanceDTO.getUserName() + "项目助理考核.xlsx");
|
list.add(performanceDTO.getUserName() + "项目助理考核.xlsx");
|
||||||
@@ -577,9 +563,6 @@ public class IZtCountService {
|
|||||||
} else if (ztUser.getUserType() == UserType.XMJL || ztUser.getUserType() == UserType.XMGLY || ztUser.getUserType() == UserType.GSGC) {
|
} else if (ztUser.getUserType() == UserType.XMJL || ztUser.getUserType() == UserType.XMGLY || ztUser.getUserType() == UserType.GSGC) {
|
||||||
generatorXMJLExcel(qo, performanceDTO.getUserName(), performanceDTO, qo.getDate(), perList);
|
generatorXMJLExcel(qo, performanceDTO.getUserName(), performanceDTO, qo.getDate(), perList);
|
||||||
list.add(performanceDTO.getUserName() + "项目经理考核.xlsx");
|
list.add(performanceDTO.getUserName() + "项目经理考核.xlsx");
|
||||||
}else if (ztUser.getUserType() == UserType.CPJL ) {
|
|
||||||
generatorCPJLExcel(qo, performanceDTO.getUserName(), performanceDTO, qo.getDate(), perList);
|
|
||||||
list.add(performanceDTO.getUserName() + "产品经理考核.xlsx");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String dir = System.getProperty("user.dir") + "/";
|
String dir = System.getProperty("user.dir") + "/";
|
||||||
@@ -1183,69 +1166,6 @@ public class IZtCountService {
|
|||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
PerformanceDTO buildCPJLScore(ZtUser u,Map<String, ZtUser> userMap,ZtProjectQo qo, List<ItApproval> approvalList, Date firstDayOfMonth, Date lastDayOfMonth, List<ZtTask> taskList, Date d,List<Integer> pids) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品经理
|
|
||||||
*/
|
|
||||||
PerformanceDTO dto = new PerformanceDTO();
|
|
||||||
dto.setUserName(u.getNickname());
|
|
||||||
dto.setAccount(u.getAccount());
|
|
||||||
//项目准时率 Σ (当月上线准时上线的需求量) / Σ (当月规划上线的需求总量) * 100≥95%
|
|
||||||
|
|
||||||
// dto.setProjectOnTimeRate();
|
|
||||||
//产品缺陷率
|
|
||||||
// dto.setProductBugRate();
|
|
||||||
Map<String,Object> map=this.storyService.storyReleaseOnTimeByProducts(pids,firstDayOfMonth,lastDayOfMonth);
|
|
||||||
Integer planReleaseStoryNum = Integer.valueOf(map.getOrDefault("planReleaseStoryNum", 0).toString());
|
|
||||||
Integer storyOnTimeNum = Integer.valueOf(map.getOrDefault("onTimeNum", 0).toString());
|
|
||||||
dto.setProductPlanStoryNum(BigDecimal.valueOf(planReleaseStoryNum));
|
|
||||||
dto.setProductPlanStoryOnTimeNum(BigDecimal.valueOf(storyOnTimeNum));
|
|
||||||
int storyOnTimeRate = ObjectUtil.equal(planReleaseStoryNum, 0) ? 0 :
|
|
||||||
(BigDecimal.valueOf(storyOnTimeNum*100).divide(BigDecimal.valueOf(planReleaseStoryNum), 0, BigDecimal.ROUND_UP)).intValue();
|
|
||||||
int productProjectOnTimeRateScore=storyOnTimeRate==0?0: (storyOnTimeRate>=95)? 20:
|
|
||||||
(storyOnTimeRate>=90&&storyOnTimeRate<95)?(20-(95-storyOnTimeRate)):
|
|
||||||
((90-storyOnTimeRate)*2+5>20)? 0:(20-((90-storyOnTimeRate)*2+5));
|
|
||||||
dto.setProductProjectOnTimeRateScore(BigDecimal.valueOf(productProjectOnTimeRateScore));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<ZtBug> allBugList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().select(SFunctionColums.bugColumes())
|
|
||||||
.eq(ZtBug::getOpenedby, u.getAccount())
|
|
||||||
.in(ZtBug::getBugType,"releaseBug","prod")
|
|
||||||
.ge(ZtBug::getOpeneddate,firstDayOfMonth)
|
|
||||||
.le(ZtBug::getOpeneddate,lastDayOfMonth)
|
|
||||||
.in(ZtBug::getProduct,pids));
|
|
||||||
allBugList = this.bugService.getNormalBugList(allBugList);
|
|
||||||
//开发分配工时
|
|
||||||
ZtCountQo ztCountQo = new ZtCountQo();
|
|
||||||
BeanUtils.copyProperties(qo, ztCountQo);
|
|
||||||
List<ZtProduct> ztProducts = this.productService.listByIds(pids);
|
|
||||||
List<PerformanceDTO> perList = this.programCount(ztCountQo,ztProducts.stream().map(o->o.getProgram()).collect(Collectors.toList()));
|
|
||||||
dto = buildTaskManage(dto, perList, userMap,firstDayOfMonth,lastDayOfMonth,pids);
|
|
||||||
//开发任务分配工时
|
|
||||||
BigDecimal allocationTime = dto.getAllocationTime();
|
|
||||||
double bugRate=(allocationTime.doubleValue()==0||allBugList.size()==0)?0:BigDecimal.valueOf(allBugList.size()*1000).divide(allocationTime,2,BigDecimal.ROUND_HALF_UP).doubleValue();
|
|
||||||
dto.setBugDensity(BigDecimal.valueOf(bugRate));
|
|
||||||
if(bugRate<=5){
|
|
||||||
dto.setBugScore(BigDecimal.valueOf(20));
|
|
||||||
}else{
|
|
||||||
// long deductBugScore = Math.min(seriousBug * 10L + slightBug * 3L, 20L);
|
|
||||||
// dto.setBugScore(BigDecimal.valueOf(20L-deductBugScore));
|
|
||||||
//严重10 分 轻微3分一个
|
|
||||||
int bugScore = 0;
|
|
||||||
for (ZtBug b : allBugList) {
|
|
||||||
bugScore += b.getSeverity() != 1 ? 3 : 10;
|
|
||||||
}
|
|
||||||
dto.setBugScore(bugScore>20?BigDecimal.ZERO:BigDecimal.valueOf((20 - bugScore)));
|
|
||||||
}
|
|
||||||
//线上重大
|
|
||||||
dto.setSeriousBug(BigDecimal.valueOf(allBugList.stream().filter(o -> Arrays.asList(1).contains(o.getSeverity())).count()));
|
|
||||||
//线上轻微
|
|
||||||
dto.setSlightBug( BigDecimal.valueOf(allBugList.stream().filter(o -> Arrays.asList(4, 2, 3).contains(o.getSeverity())).count()));
|
|
||||||
return dto;
|
|
||||||
}
|
|
||||||
|
|
||||||
//满分30
|
//满分30
|
||||||
private PerformanceDTO getMeetScore(ZtUser u, Date start, Date end, PerformanceDTO dto) {
|
private PerformanceDTO getMeetScore(ZtUser u, Date start, Date end, PerformanceDTO dto) {
|
||||||
List<Integer> pIds = this.projectService.authProductList();
|
List<Integer> pIds = this.projectService.authProductList();
|
||||||
@@ -2276,52 +2196,7 @@ public class IZtCountService {
|
|||||||
writeXlsx(name, "templates/scope/项目经理考核.xlsx", name + "项目经理考核.xlsx", dataMap);
|
writeXlsx(name, "templates/scope/项目经理考核.xlsx", name + "项目经理考核.xlsx", dataMap);
|
||||||
|
|
||||||
}
|
}
|
||||||
void generatorCPJLExcel(ZtCountQo qo, String name, PerformanceDTO performanceDTO, Date d, List<PerformanceDTO> perList) {
|
|
||||||
Map<String, ZtUser> userMap = userService.userMapByIds(null);
|
|
||||||
Map<String, String> dataMap = new HashMap<>();
|
|
||||||
|
|
||||||
dataMap.put("name", name);
|
|
||||||
dataMap.put("date", DateUtils.formatDate(d, "yyyy-MM"));
|
|
||||||
//产品规划
|
|
||||||
dataMap.put("productPlanning",performanceDTO.getProductPlanning()==null?"0":performanceDTO.getProductPlanning().toString());
|
|
||||||
//需求准确性
|
|
||||||
dataMap.put("accurateDemand", performanceDTO.getAccurateDemand()==null?"0": performanceDTO.getAccurateDemand().toString());
|
|
||||||
//项目准时率
|
|
||||||
dataMap.put("productProjectOnTimeRateScore",performanceDTO.getProductProjectOnTimeRateScore()==null?"0": performanceDTO.getProductProjectOnTimeRateScore().multiply(BigDecimal.valueOf(100)).toString());
|
|
||||||
//线上Bug得分 缺陷
|
|
||||||
dataMap.put("bugScope", performanceDTO.getBugScore()==null?"0": performanceDTO.getBugScore().toString());
|
|
||||||
//开发分配工时
|
|
||||||
dataMap.put("allocationTime", performanceDTO.getBugScore()==null?"0": performanceDTO.getAllocationTime().toString());
|
|
||||||
//轻微
|
|
||||||
dataMap.put("slightBug", performanceDTO.getSlightBug()==null?"0": performanceDTO.getSlightBug().toString());
|
|
||||||
dataMap.put("seriousBug", performanceDTO.getSeriousBug()==null?"0": performanceDTO.getSeriousBug().toString());
|
|
||||||
//问题响应
|
|
||||||
dataMap.put("productProblemResponse", performanceDTO.getProductProblemResponse()==null?"0": performanceDTO.getProductProblemResponse().toString());
|
|
||||||
//会议管理
|
|
||||||
dataMap.put("productMeetScore", performanceDTO.getProductMeetScore()==null?"0": performanceDTO.getProductMeetScore().toString());
|
|
||||||
//主动性责任感
|
|
||||||
dataMap.put("productResponsibilityScore", performanceDTO.getProductResponsibilityScore()==null?"0": performanceDTO.getProductResponsibilityScore().toString());
|
|
||||||
dataMap.put("productPlanStoryNum", performanceDTO.getProductPlanStoryNum()==null?"0": performanceDTO.getProductPlanStoryNum().toString());
|
|
||||||
dataMap.put("productPlanStoryOnTimeNum", performanceDTO.getProductPlanStoryOnTimeNum()==null?"0": performanceDTO.getProductPlanStoryOnTimeNum().toString());
|
|
||||||
dataMap.put("allocationTime", performanceDTO.getAllocationTime()==null?"0": performanceDTO.getAllocationTime().toString());
|
|
||||||
dataMap.put("slightBug", performanceDTO.getSlightBug()==null?"0": performanceDTO.getSlightBug().toString());
|
|
||||||
dataMap.put("seriousBug", performanceDTO.getSeriousBug()==null?"0": performanceDTO.getSeriousBug().toString());
|
|
||||||
dataMap.put("bugDensity", performanceDTO.getBugDensity()==null?"0": performanceDTO.getBugDensity().toString());
|
|
||||||
|
|
||||||
|
|
||||||
dataMap.put("总分", devlopTotal(
|
|
||||||
dataMap.get("productPlanning"),
|
|
||||||
dataMap.get("accurateDemand"),
|
|
||||||
dataMap.get("productProjectOnTimeRateScore"),
|
|
||||||
dataMap.get("bugScope"),
|
|
||||||
dataMap.get("productProblemResponse"),
|
|
||||||
dataMap.get("productMeetScore"),
|
|
||||||
dataMap.get("productResponsibilityScore")
|
|
||||||
));
|
|
||||||
|
|
||||||
writeXlsx(name, "templates/scope/产品经理考核.xlsx", name + "产品经理考核.xlsx", dataMap);
|
|
||||||
|
|
||||||
}
|
|
||||||
private String versionPlanScore(ZtCountQo qo, List<PerformanceDTO> perList, Map<String, ZtUser> userMap) {
|
private String versionPlanScore(ZtCountQo qo, List<PerformanceDTO> perList, Map<String, ZtUser> userMap) {
|
||||||
return "20";
|
return "20";
|
||||||
// BigDecimal allocationTime =BigDecimal.ZERO;
|
// BigDecimal allocationTime =BigDecimal.ZERO;
|
||||||
@@ -2404,7 +2279,7 @@ public class IZtCountService {
|
|||||||
//线上bug
|
//线上bug
|
||||||
List<ZtBug> bList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().in(ZtBug::getProject, projectIds)
|
List<ZtBug> bList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().in(ZtBug::getProject, projectIds)
|
||||||
.ge(ZtBug::getOpeneddate, firstDayOfMonth).le(ZtBug::getOpeneddate, lastDayOfMonth)
|
.ge(ZtBug::getOpeneddate, firstDayOfMonth).le(ZtBug::getOpeneddate, lastDayOfMonth)
|
||||||
.in(ZtBug::getBugType, "prod","releaseBug")
|
.eq(ZtBug::getBugType, "prod")
|
||||||
);
|
);
|
||||||
if (CollectionUtils.isEmpty(bList)) {
|
if (CollectionUtils.isEmpty(bList)) {
|
||||||
result.setBugScore(BigDecimal.valueOf(20));
|
result.setBugScore(BigDecimal.valueOf(20));
|
||||||
@@ -2427,9 +2302,9 @@ public class IZtCountService {
|
|||||||
List<ZtBug> slightBugList = bList.stream().filter(o -> slights.contains(o.getSeverity())).collect(Collectors.toList());
|
List<ZtBug> slightBugList = bList.stream().filter(o -> slights.contains(o.getSeverity())).collect(Collectors.toList());
|
||||||
result.setSlightBug(BigDecimal.valueOf(slightBugList.size()));
|
result.setSlightBug(BigDecimal.valueOf(slightBugList.size()));
|
||||||
|
|
||||||
BigDecimal bugRate = BigDecimal.valueOf(bList.size()).divide(BigDecimalUtils.isZero(allocationTime) ? BigDecimal.valueOf(1) : allocationTime, 3, BigDecimal.ROUND_HALF_UP);
|
BigDecimal bugRate = BigDecimal.valueOf(bList.size()).divide(BigDecimalUtils.isZero(allocationTime) ? BigDecimal.valueOf(1) : allocationTime, 2, BigDecimal.ROUND_HALF_UP);
|
||||||
result.setBugDensity(bugRate);
|
result.setBugDensity(bugRate);
|
||||||
int i = bugRate.multiply(BigDecimal.valueOf(1000)).intValue();
|
int i = bugRate.multiply(BigDecimal.valueOf(100)).intValue();
|
||||||
if (i <= 5) {
|
if (i <= 5) {
|
||||||
result.setBugScore(BigDecimal.valueOf(20));
|
result.setBugScore(BigDecimal.valueOf(20));
|
||||||
return result;
|
return result;
|
||||||
@@ -2491,6 +2366,10 @@ public class IZtCountService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private PerformanceDTO buildTaskManage(PerformanceDTO result, List<PerformanceDTO> perList, Map<String, ZtUser> userMap,Date startDate,Date endDate,List<Integer> pids) {
|
private PerformanceDTO buildTaskManage(PerformanceDTO result, List<PerformanceDTO> perList, Map<String, ZtUser> userMap,Date startDate,Date endDate,List<Integer> pids) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//多个项目组人员
|
//多个项目组人员
|
||||||
List multipUser = this.getmultipleDepartProjectTeam(startDate, endDate);
|
List multipUser = this.getmultipleDepartProjectTeam(startDate, endDate);
|
||||||
//分配总工时
|
//分配总工时
|
||||||
@@ -2708,9 +2587,7 @@ public class IZtCountService {
|
|||||||
//获取测试需求
|
//获取测试需求
|
||||||
List<ZtStory> cswcStoryList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getProduct, pids)
|
List<ZtStory> cswcStoryList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getProduct, pids)
|
||||||
.in(ZtStory::getAssignedTo, Arrays.asList(u.getAccount())).ge(ZtStory::getReleaseddate, firstDayOfMonth).le(ZtStory::getReleaseddate, lastDayOfMonth));
|
.in(ZtStory::getAssignedTo, Arrays.asList(u.getAccount())).ge(ZtStory::getReleaseddate, firstDayOfMonth).le(ZtStory::getReleaseddate, lastDayOfMonth));
|
||||||
if (name.equals("weidongxia")) {
|
|
||||||
result = buildCPJLScore(u, userMap , qo,approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d,pids);
|
|
||||||
} else
|
|
||||||
if (name.equals("liyuyan")) {
|
if (name.equals("liyuyan")) {
|
||||||
result = buildXMZLScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
|
result = buildXMZLScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
|
||||||
} else if ("liushengqing".equals(name)) {
|
} else if ("liushengqing".equals(name)) {
|
||||||
@@ -2738,9 +2615,6 @@ public class IZtCountService {
|
|||||||
result.setProfessionalSkillEnhancementScore(BigDecimal.valueOf(0));
|
result.setProfessionalSkillEnhancementScore(BigDecimal.valueOf(0));
|
||||||
} else if (u.getUserType() == UserType.XMZL) {
|
} else if (u.getUserType() == UserType.XMZL) {
|
||||||
result = buildXMZLScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
|
result = buildXMZLScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
|
||||||
} else if (u.getUserType() == UserType.CPJL) {
|
|
||||||
//产品经理
|
|
||||||
result = buildCPJLScore(u, userMap , qo,approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d,pids);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -3066,6 +2940,3 @@ public class IZtCountService {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
|||||||
cell.setColumn(ztKanbancolumn.getId());
|
cell.setColumn(ztKanbancolumn.getId());
|
||||||
cell.setType(ztKanbanlane.getType());
|
cell.setType(ztKanbanlane.getType());
|
||||||
kanbancellService.save(cell);
|
kanbancellService.save(cell);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1940,9 +1941,9 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
|||||||
|
|
||||||
List<ZtTask> allTaskList =this.taskService.taskListByEIdsAndDate(firstDayOfMonth,lastDayOfMonth,products.stream().map(o->o.getId()).collect(Collectors.toList()));
|
List<ZtTask> allTaskList =this.taskService.taskListByEIdsAndDate(firstDayOfMonth,lastDayOfMonth,products.stream().map(o->o.getId()).collect(Collectors.toList()));
|
||||||
|
|
||||||
// if (CollectionUtils.isEmpty(allTaskList)) {
|
if (CollectionUtils.isEmpty(allTaskList)) {
|
||||||
// return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
List<ZtTeam> teams = this.teamService.list(new QueryWrapper<ZtTeam>().lambda().eq(ZtTeam::getType, "execution")
|
List<ZtTeam> teams = this.teamService.list(new QueryWrapper<ZtTeam>().lambda().eq(ZtTeam::getType, "execution")
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
|||||||
List<ZtStory> sList = this.storyService.list(new QueryWrapper<ZtStory>()
|
List<ZtStory> sList = this.storyService.list(new QueryWrapper<ZtStory>()
|
||||||
.lambda().eq(ZtStory::getStatus, "active")
|
.lambda().eq(ZtStory::getStatus, "active")
|
||||||
.in(ZtStory::getId, list.stream().map(o -> o.getStory()).distinct().collect(Collectors.toList()))
|
.in(ZtStory::getId, list.stream().map(o -> o.getStory()).distinct().collect(Collectors.toList()))
|
||||||
.eq(ZtStory::getStage, StoryStageEnums.productVerified.getValue()));
|
.eq(ZtStory::getStage, StoryStageEnums.tested.getValue()));
|
||||||
if (!CollectionUtils.isEmpty(sList)) {
|
if (!CollectionUtils.isEmpty(sList)) {
|
||||||
//没有被关联的需求 测试完成的
|
//没有被关联的需求 测试完成的
|
||||||
List<ZtReleaseDetails> releaseStoryList = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
List<ZtReleaseDetails> releaseStoryList = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||||
@@ -368,7 +368,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
|||||||
List<ZtStory> ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
|
List<ZtStory> ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
|
||||||
|
|
||||||
List<ZtBug> bugs =CollectionUtils.isEmpty(bugList)?new ArrayList<>(): bugService.listByIds(bugList);
|
List<ZtBug> bugs =CollectionUtils.isEmpty(bugList)?new ArrayList<>(): bugService.listByIds(bugList);
|
||||||
long notTested = ztStories.stream().filter(o -> !o.getStage().equals(StoryStageEnums.productVerified.getValue())).count();
|
long notTested = ztStories.stream().filter(o -> !o.getStage().equals("tested")).count();
|
||||||
if(notTested>0){
|
if(notTested>0){
|
||||||
throw new BusinessException("当前需求存在未测试完成的请检查");
|
throw new BusinessException("当前需求存在未测试完成的请检查");
|
||||||
}
|
}
|
||||||
@@ -378,7 +378,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
|||||||
throw new BusinessException("当前bug存在未完成请检查");
|
throw new BusinessException("当前bug存在未完成请检查");
|
||||||
}
|
}
|
||||||
for (ZtStory st : ztStories) {
|
for (ZtStory st : ztStories) {
|
||||||
if (! StoryStageEnums.productVerified.getValue().equals(st.getStage())) {
|
if (!"tested".equals(st.getStage())) {
|
||||||
throw new BusinessException(st.getTitle() + " 当前需求无法发布,请检查");
|
throw new BusinessException(st.getTitle() + " 当前需求无法发布,请检查");
|
||||||
}
|
}
|
||||||
this.storyService.releaseStory(st.getId());
|
this.storyService.releaseStory(st.getId());
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.sa.zentao.service.impl;
|
package com.sa.zentao.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -157,10 +156,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
if (ztUser != null) {
|
if (ztUser != null) {
|
||||||
d.setUserStoryCreateUser(ztUser.getNickname());
|
d.setUserStoryCreateUser(ztUser.getNickname());
|
||||||
}
|
}
|
||||||
ztUser = userMap.get(d.getProductUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setProductUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
List<ZtProject> ztProjectList = executionMapByStory.get(d.getId());
|
List<ZtProject> ztProjectList = executionMapByStory.get(d.getId());
|
||||||
if (!CollectionUtils.isEmpty(ztProjectList)) {
|
if (!CollectionUtils.isEmpty(ztProjectList)) {
|
||||||
// d.setExecution(ztProject.getId());
|
// d.setExecution(ztProject.getId());
|
||||||
@@ -813,8 +808,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
for (ZtStoryDTO d : list) {
|
for (ZtStoryDTO d : list) {
|
||||||
d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
||||||
d.setViews(rMap.get(d.getId()));
|
d.setViews(rMap.get(d.getId()));
|
||||||
StoryStageEnums stageEnums = StoryStageEnums.transfer(d.getStage());
|
|
||||||
d.setStageName(stageEnums==null?null:stageEnums.getDesc());
|
|
||||||
List<ZtTask> ztTasks = taskCountMap.get(d.getId());
|
List<ZtTask> ztTasks = taskCountMap.get(d.getId());
|
||||||
ZtStoryCaseDTO ztStoryCaseDTO = caseMap.get(d.getId());
|
ZtStoryCaseDTO ztStoryCaseDTO = caseMap.get(d.getId());
|
||||||
if (ztStoryCaseDTO != null) {
|
if (ztStoryCaseDTO != null) {
|
||||||
@@ -856,14 +849,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
if (ztUser != null) {
|
if (ztUser != null) {
|
||||||
d.setYsUserName(ztUser.getNickname());
|
d.setYsUserName(ztUser.getNickname());
|
||||||
}
|
}
|
||||||
ztUser = userMap.get(d.getProductUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setProductUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
ztUser = userMap.get(d.getTestUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setTestUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -971,105 +956,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
return searchDTOPageInfo;
|
return searchDTOPageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Transactional
|
|
||||||
public void testSubmitVerified(ZtStoryDTO qo) {
|
|
||||||
ZtStory ztStory = this.baseMapper.selectById(qo.getId());
|
|
||||||
if(ztStory==null){
|
|
||||||
throw new BusinessException("未查询到需求");
|
|
||||||
}
|
|
||||||
if(!StoryStatusEnums.active.getValue().equals(ztStory.getStatus())){
|
|
||||||
throw new BusinessException("需求状态不对");
|
|
||||||
}
|
|
||||||
if(!StoryStageEnums.tested.getValue().equals(ztStory.getStage())){
|
|
||||||
throw new BusinessException("需求状态不对");
|
|
||||||
}
|
|
||||||
if(ObjectUtil.equal(ztStory.getInnerYsFlag(),1)){
|
|
||||||
throw new BusinessException("无需内部验收,不需要提交");
|
|
||||||
}
|
|
||||||
//产品验收中
|
|
||||||
ztStory.setStage(StoryStageEnums.productWaitVerified.getValue());
|
|
||||||
ztStory.setTestSubmitYsTime(new Date());
|
|
||||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
||||||
ztStory.setLastediteddate(new Date());
|
|
||||||
this.baseMapper.updateById(ztStory);
|
|
||||||
|
|
||||||
List<ZtProjectstory> ztProjectstories = this.projectstoryService.projectListByStory(Arrays.asList(ztStory.getId()), ProjectTypeEnums.execution);
|
|
||||||
//更改看板
|
|
||||||
|
|
||||||
if(!CollectionUtils.isEmpty(ztProjectstories)){
|
|
||||||
for(ZtProjectstory ztProjectstory:ztProjectstories){
|
|
||||||
kanbanlaneService.changeStatus(ztProjectstory.getProject(),ztStory.getId(),"story",StoryStageEnums.productWaitVerified.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
actionService.addAction(ActionType.XQ, ActionStatus.TESTSUBMITYS, ztStory.getId(), ztStory.getProduct() + "", null, null,
|
|
||||||
RiskUserThreadLocal.get().getName(), "", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void storyProductUserYs(ZtStoryDTO qo) {
|
|
||||||
ZtStory ztStory = this.baseMapper.selectById(qo.getId());
|
|
||||||
if(ztStory==null){
|
|
||||||
throw new BusinessException("未查询到需求");
|
|
||||||
}
|
|
||||||
if(!StoryStatusEnums.active.getValue().equals(ztStory.getStatus())){
|
|
||||||
throw new BusinessException("需求状态不对");
|
|
||||||
}
|
|
||||||
if(!StoryStageEnums.productWaitVerified.getValue().equals(ztStory.getStage())){
|
|
||||||
throw new BusinessException("需求状态不对");
|
|
||||||
}
|
|
||||||
//产品验收中
|
|
||||||
ztStory.setStage(StoryStageEnums.productWaitVerified.getValue());
|
|
||||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
||||||
ztStory.setLastediteddate(new Date());
|
|
||||||
ztStory.setInnerYsTime(new Date());
|
|
||||||
this.baseMapper.updateById(ztStory);
|
|
||||||
|
|
||||||
List<ZtProjectstory> ztProjectstories = this.projectstoryService.projectListByStory(Arrays.asList(ztStory.getId()), ProjectTypeEnums.execution);
|
|
||||||
//更改看板
|
|
||||||
|
|
||||||
if(!CollectionUtils.isEmpty(ztProjectstories)){
|
|
||||||
for(ZtProjectstory ztProjectstory:ztProjectstories){
|
|
||||||
kanbanlaneService.changeStatus(ztProjectstory.getProject(),ztStory.getId(),"story",StoryStageEnums.productVerified.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
actionService.addAction(ActionType.XQ, ActionStatus.PRODUCTYS, ztStory.getId(), ztStory.getProduct() + "", null, null,
|
|
||||||
RiskUserThreadLocal.get().getName(), "", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> storyReleaseOnTimeByProducts(List<Integer> pids, Date firstDayOfMonth, Date lastDayOfMonth) {
|
|
||||||
return this.baseMapper.storyReleaseOnTimeByProducts(pids,firstDayOfMonth,lastDayOfMonth);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void assignedToProductUser(ZtStoryDTO dto) {
|
|
||||||
ZtStory ztStory = this.baseMapper.selectById(dto.getId());
|
|
||||||
if(ztStory==null){
|
|
||||||
throw new BusinessException("未查询到数据");
|
|
||||||
}
|
|
||||||
ztStory.setProductUser(dto.getAssignedTo());
|
|
||||||
ztStory.setLastediteddate(new Date());
|
|
||||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
||||||
this.baseMapper.updateById(ztStory);
|
|
||||||
actionService.addAction(ActionType.XQ, ActionStatus.ASSIGNTOPRODUCTUSER, ztStory.getId(), ztStory.getProduct() + "", null, null,
|
|
||||||
RiskUserThreadLocal.get().getName(), "", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void assignedToTestUser(ZtStoryDTO dto) {
|
|
||||||
ZtStory ztStory = this.baseMapper.selectById(dto.getId());
|
|
||||||
if(ztStory==null){
|
|
||||||
throw new BusinessException("未查询到数据");
|
|
||||||
}
|
|
||||||
ztStory.setTestUser(dto.getAssignedTo());
|
|
||||||
ztStory.setLastediteddate(new Date());
|
|
||||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
||||||
this.baseMapper.updateById(ztStory);
|
|
||||||
actionService.addAction(ActionType.XQ, ActionStatus.ASSIGNTOTESTUSER, ztStory.getId(), ztStory.getProduct() + "", null, null,
|
|
||||||
RiskUserThreadLocal.get().getName(), "", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
private List<SearchDTO> searchBug(SearchQo qo) {
|
private List<SearchDTO> searchBug(SearchQo qo) {
|
||||||
return this.baseMapper.searchBug(qo.getKeyword());
|
return this.baseMapper.searchBug(qo.getKeyword());
|
||||||
}
|
}
|
||||||
@@ -1267,14 +1153,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 开发完成
|
|
||||||
* @param id
|
|
||||||
* @param finishBy
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void develFinishStory(Integer id, String finishBy) {
|
public void finishStory(Integer id, String finishBy) {
|
||||||
|
|
||||||
if (id == null || id == 0) {
|
if (id == null || id == 0) {
|
||||||
return;
|
return;
|
||||||
@@ -1326,7 +1207,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
throw new BusinessException("未查询到数据-需求");
|
throw new BusinessException("未查询到数据-需求");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing",StoryStageEnums.productWaitVerified.getValue(),StoryStageEnums.productVerified.getValue()).contains(ztStory.getStage())) {
|
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing").contains(ztStory.getStage())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1361,13 +1242,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
actionService.addAction(ActionType.XQ, ActionStatus.CSWC, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
actionService.addAction(ActionType.XQ, ActionStatus.CSWC, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
||||||
RiskUserThreadLocal.get().getName(), null, "");
|
RiskUserThreadLocal.get().getName(), null, "");
|
||||||
}
|
}
|
||||||
//不需要内部验收 产品已验收
|
|
||||||
if(!ObjectUtil.equal(ztStory.getInnerYsFlag(),1)){
|
|
||||||
newStatus = StoryStageEnums.productVerified.getValue();
|
|
||||||
ztStory.setStage(newStatus);
|
|
||||||
ztStory.setInnerYsTime(new Date());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ztStory.getStartDate() == null) {
|
if (ztStory.getStartDate() == null) {
|
||||||
ztStory.setStartDate(new Date());
|
ztStory.setStartDate(new Date());
|
||||||
}
|
}
|
||||||
@@ -1379,7 +1253,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
|
|
||||||
for (Integer execId : execIds) {
|
for (Integer execId : execIds) {
|
||||||
if (execId != null) {
|
if (execId != null) {
|
||||||
this.kanbanlaneService.changeStatus(execId, ztStory.getId(), "story", newStatus);
|
this.kanbanlaneService.changeStatus(execId, ztStory.getId(), "story", "tested");
|
||||||
if (!oldStatus.equalsIgnoreCase(newStatus) && ztStory.getProduct() != 0) {
|
if (!oldStatus.equalsIgnoreCase(newStatus) && ztStory.getProduct() != 0) {
|
||||||
|
|
||||||
ProductStoryStatus oldPStatus = null;
|
ProductStoryStatus oldPStatus = null;
|
||||||
@@ -1396,6 +1270,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//发布
|
//发布
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -1405,25 +1280,22 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
ZtStory ztStory = this.baseMapper.selectById(story);
|
ZtStory ztStory = this.baseMapper.selectById(story);
|
||||||
if (ztStory == null) {
|
|
||||||
throw new BusinessException("未查询到数据-需求");
|
|
||||||
}
|
|
||||||
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
||||||
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback(), null);
|
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ztStory == null) {
|
||||||
|
throw new BusinessException("未查询到数据-需求");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing", "tested").contains(ztStory.getStage())) {
|
||||||
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing", "tested",
|
|
||||||
StoryStageEnums.productWaitVerified.getValue()
|
|
||||||
,StoryStageEnums.productVerified.getValue()).contains(ztStory.getStage())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("closed".equals(ztStory.getStatus())) {
|
if ("closed".equals(ztStory.getStatus())) {
|
||||||
throw new BusinessException("当前已关闭");
|
throw new BusinessException("当前已关闭");
|
||||||
}
|
}
|
||||||
if (!StoryStageEnums.productVerified.getValue().equals(ztStory.getStage())) {
|
if (!"tested".equals(ztStory.getStage())) {
|
||||||
throw new BusinessException("当前无法更改发布状态");
|
throw new BusinessException("当前无法更改发布状态");
|
||||||
}
|
}
|
||||||
//这个需求被多少执行关联
|
//这个需求被多少执行关联
|
||||||
@@ -1449,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();
|
||||||
|
|
||||||
|
|
||||||
@@ -1525,7 +1393,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
if (!CollectionUtils.isEmpty(testedList)) {
|
if (!CollectionUtils.isEmpty(testedList)) {
|
||||||
testedStory(story, finishBy);
|
testedStory(story, finishBy);
|
||||||
} else {
|
} else {
|
||||||
this.develFinishStory(story, finishBy);
|
this.finishStory(story, finishBy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1566,7 +1434,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
.eq(ZtTask::getType, TaskType.devel.getCode())
|
.eq(ZtTask::getType, TaskType.devel.getCode())
|
||||||
.in(ZtTask::getStatus, Arrays.asList("done")));
|
.in(ZtTask::getStatus, Arrays.asList("done")));
|
||||||
if (!CollectionUtils.isEmpty(develedList)) {
|
if (!CollectionUtils.isEmpty(develedList)) {
|
||||||
this.develFinishStory(story, finishBy);
|
this.finishStory(story, finishBy);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -1614,7 +1482,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
if (done < 1) {
|
if (done < 1) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.develFinishStory(story, finishBy);
|
this.finishStory(story, finishBy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2278,14 +2146,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
if (ztUser != null) {
|
if (ztUser != null) {
|
||||||
d.setYsUserName(ztUser.getNickname());
|
d.setYsUserName(ztUser.getNickname());
|
||||||
}
|
}
|
||||||
ztUser = userMap.get(d.getProductUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setProductUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
ztUser = userMap.get(d.getTestUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setTestUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
ZtStoryspec storyspec = this.storyspecService.getOne(new QueryWrapper<ZtStoryspec>().lambda().eq(ZtStoryspec::getStory, d.getId()));
|
ZtStoryspec storyspec = this.storyspecService.getOne(new QueryWrapper<ZtStoryspec>().lambda().eq(ZtStoryspec::getStory, d.getId()));
|
||||||
|
|
||||||
if (storyspec != null) {
|
if (storyspec != null) {
|
||||||
@@ -2585,7 +2445,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
|||||||
ProductStoryStatus oldPStatus = null;
|
ProductStoryStatus oldPStatus = null;
|
||||||
if (status.equalsIgnoreCase("developing") || status.equalsIgnoreCase("testing")
|
if (status.equalsIgnoreCase("developing") || status.equalsIgnoreCase("testing")
|
||||||
|| status.equalsIgnoreCase("tested") || status.equalsIgnoreCase("developed")
|
|| status.equalsIgnoreCase("tested") || status.equalsIgnoreCase("developed")
|
||||||
|| status.equalsIgnoreCase(StoryStageEnums.productWaitVerified.getValue())|| status.equalsIgnoreCase(StoryStageEnums.productVerified.getValue())
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
oldPStatus = ProductStoryStatus.JH;
|
oldPStatus = ProductStoryStatus.JH;
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -252,10 +255,10 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
@Override
|
@Override
|
||||||
public Map<String, List<ZtStoryUserDTO>> getKanban(Integer productId) {
|
public Map<String, List<ZtStoryUserDTO>> getKanban(Integer productId) {
|
||||||
List<ZtStoryUser> ztStoryUsers = this.baseMapper.selectList(new QueryWrapper<ZtStoryUser>()
|
List<ZtStoryUser> ztStoryUsers = this.baseMapper.selectList(new QueryWrapper<ZtStoryUser>()
|
||||||
.lambda().select(ZtStoryUser::getId,ZtStoryUser::getPri,ZtStoryUser::getTitle,ZtStoryUser::getStage,ZtStoryUser::getStatus,ZtStoryUser::getOpenedby,ZtStoryUser::getOpeneddate,ZtStoryUser::getLastediteddate,ZtStoryUser::getProductUser)
|
.lambda().select(ZtStoryUser::getId,ZtStoryUser::getPri,ZtStoryUser::getTitle,ZtStoryUser::getStage,ZtStoryUser::getStatus,ZtStoryUser::getOpenedby,ZtStoryUser::getOpeneddate,ZtStoryUser::getLastediteddate)
|
||||||
.eq(ZtStoryUser::getProduct, productId).orderByDesc(ZtStoryUser::getId));
|
.eq(ZtStoryUser::getProduct, productId).orderByDesc(ZtStoryUser::getId));
|
||||||
Map<String, List<ZtStoryUserDTO>> map = new HashMap<>();
|
Map<String, List<ZtStoryUserDTO>> map = new HashMap<>();
|
||||||
Map<String, ZtUser> stringZtUserMap = this.userService.userMapByIds(null);
|
Map<String, ZtUser> stringZtUserMap = this.userService.userMapByIds(ztStoryUsers.stream().map(o -> o.getOpenedby()).collect(Collectors.toList()));
|
||||||
|
|
||||||
List<ZtStoryUserDTO> ztStoryUserDTOS = BeanCopyUtil.copyListProperties(ztStoryUsers, ZtStoryUserDTO::new, new BeanCopyUtilCallBack<ZtStoryUser, ZtStoryUserDTO>() {
|
List<ZtStoryUserDTO> ztStoryUserDTOS = BeanCopyUtil.copyListProperties(ztStoryUsers, ZtStoryUserDTO::new, new BeanCopyUtilCallBack<ZtStoryUser, ZtStoryUserDTO>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -265,11 +268,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
s.setOpenedbyName(ztUser.getNickname());
|
s.setOpenedbyName(ztUser.getNickname());
|
||||||
s.setColor(ztUser.getColor());
|
s.setColor(ztUser.getColor());
|
||||||
}
|
}
|
||||||
ztUser = stringZtUserMap.get(t.getProductUser());
|
|
||||||
if(ztUser!=null){
|
|
||||||
s.setProductUserName(ztUser.getNickname());
|
|
||||||
s.setProductUserColor(ztUser.getColor());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -307,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)) {
|
||||||
@@ -364,11 +357,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
if (ztUser != null) {
|
if (ztUser != null) {
|
||||||
d.setYsUserName(ztUser.getNickname());
|
d.setYsUserName(ztUser.getNickname());
|
||||||
}
|
}
|
||||||
ztUser = userMap.get(d.getProductUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
d.setProductUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
|
|
||||||
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
||||||
if (!CollectionUtils.isEmpty(ztStories)) {
|
if (!CollectionUtils.isEmpty(ztStories)) {
|
||||||
d.setStoryList(ztStories.stream().map(o ->o.getId()+":"+o.getTitle()).collect(Collectors.joining(",")));
|
d.setStoryList(ztStories.stream().map(o ->o.getId()+":"+o.getTitle()).collect(Collectors.joining(",")));
|
||||||
@@ -387,6 +375,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
d.setUrl(hyperlink );
|
d.setUrl(hyperlink );
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
|
||||||
d.setUrl(null );
|
d.setUrl(null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -558,10 +547,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
if (ztUser != null) {
|
if (ztUser != null) {
|
||||||
dto.setYsUserName(ztUser.getNickname());
|
dto.setYsUserName(ztUser.getNickname());
|
||||||
}
|
}
|
||||||
ztUser = userMap.get(dto.getProductUser());
|
|
||||||
if (ztUser != null) {
|
|
||||||
dto.setProductUserName(ztUser.getNickname());
|
|
||||||
}
|
|
||||||
Map<Integer, List<ZtStory>> storyUserMap = getStoryUserMap(Arrays.asList(dto));
|
Map<Integer, List<ZtStory>> storyUserMap = getStoryUserMap(Arrays.asList(dto));
|
||||||
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
||||||
if (!CollectionUtils.isEmpty(ztStories)) {
|
if (!CollectionUtils.isEmpty(ztStories)) {
|
||||||
@@ -741,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());
|
||||||
@@ -880,18 +856,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void assignedToProductUser(ZtStoryUserDTO dto) {
|
|
||||||
ZtStoryUser ztStoryUser = this.baseMapper.selectById(dto.getId());
|
|
||||||
if(ztStoryUser==null){
|
|
||||||
throw new BusinessException("未查询到数据");
|
|
||||||
}
|
|
||||||
ztStoryUser.setProductUser(dto.getAssignedto());
|
|
||||||
this.baseMapper.updateById(ztStoryUser);
|
|
||||||
actionService.addAction(ActionType.USERXQ, ActionStatus.ASSIGNTOPRODUCTUSER, ztStoryUser.getId(), ztStoryUser.getProduct() + "", null, null,
|
|
||||||
RiskUserThreadLocal.get().getName(), "", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
private Map<Integer, List<ZtStory>> getStoryUserMap(List<ZtStoryUserDTO> list) {
|
private Map<Integer, List<ZtStory>> getStoryUserMap(List<ZtStoryUserDTO> list) {
|
||||||
List<Integer> ids = list.stream().map(o -> o.getId()).collect(Collectors.toList());
|
List<Integer> ids = list.stream().map(o -> o.getId()).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.sa.zentao.service.impl;
|
package com.sa.zentao.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
@@ -180,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());
|
||||||
@@ -342,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,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;
|
||||||
@@ -519,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) {
|
||||||
@@ -532,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -578,8 +577,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
if (story != null && story != 0) {
|
if (story != null && story != 0) {
|
||||||
ZtStory ztStory = this.storyService.getById(story);
|
ZtStory ztStory = this.storyService.getById(story);
|
||||||
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested
|
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested
|
||||||
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing", "tested",StoryStageEnums.productWaitVerified.getValue()
|
if (!Arrays.asList("wait", "projected", "developing", "developed", "testing", "tested").contains(ztStory.getStage())) {
|
||||||
,StoryStageEnums.productVerified.getValue()).contains(ztStory.getStage())) {
|
|
||||||
throw new BusinessException("当前状态无法添加任务");
|
throw new BusinessException("当前状态无法添加任务");
|
||||||
}
|
}
|
||||||
if (ztStory.getStatus().equals("closed")) {
|
if (ztStory.getStatus().equals("closed")) {
|
||||||
@@ -646,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);
|
||||||
@@ -705,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());
|
||||||
@@ -788,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);
|
||||||
@@ -852,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());
|
||||||
|
|
||||||
@@ -912,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) {
|
||||||
@@ -929,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);
|
||||||
}
|
}
|
||||||
@@ -1032,22 +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){
|
||||||
|
//更新需求交付物
|
||||||
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
||||||
if(ztStory!=null){
|
if(ztStory!=null){
|
||||||
ztStory.setDeliverContent(dto.getDeliverContent());
|
ztStory.setDeliverContent(ztTask.getDeliverContent());
|
||||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
||||||
ztStory.setLastediteddate(new Date());
|
|
||||||
this.storyService.updateById(ztStory);
|
this.storyService.updateById(ztStory);
|
||||||
}
|
}
|
||||||
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 (!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);
|
||||||
}
|
}
|
||||||
@@ -1080,13 +1039,9 @@ 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());
|
||||||
}
|
|
||||||
if(ztTask.getStory()!=null&&ztTask.getStory()!=0&& ObjectUtil.equal(dto.getInnerYsFlag(),1)){
|
|
||||||
ZtStoryDTO qo=new ZtStoryDTO();
|
|
||||||
qo.setId(ztTask.getStory());
|
|
||||||
this.storyService.testSubmitVerified(qo);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1103,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()
|
||||||
@@ -1116,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()
|
||||||
@@ -1131,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
|
||||||
@@ -1181,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()
|
||||||
@@ -1195,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()
|
||||||
@@ -1209,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) {
|
||||||
@@ -1257,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("请录入开始结束日期");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1304,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);
|
||||||
@@ -1325,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());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ public class KanBanConstant {
|
|||||||
put("test","测试");
|
put("test","测试");
|
||||||
put("testing","进行中");
|
put("testing","进行中");
|
||||||
put("tested","完成");
|
put("tested","完成");
|
||||||
put("productWaitVerified","产品验收中");
|
|
||||||
put("productVerified","产品已验收");
|
|
||||||
put("released","已发布");
|
put("released","已发布");
|
||||||
put("verified","已验收");
|
put("verified","已验收");
|
||||||
put("closed","已关闭");
|
put("closed","已关闭");
|
||||||
@@ -72,8 +70,6 @@ public class KanBanConstant {
|
|||||||
put("story-test","test");
|
put("story-test","test");
|
||||||
put("story-testing","test");
|
put("story-testing","test");
|
||||||
put("story-tested","test");
|
put("story-tested","test");
|
||||||
put("story-productWaitVerified","productWaitVerified");
|
|
||||||
put("story-productVerified","productVerified");
|
|
||||||
put("story-verified","verified");
|
put("story-verified","verified");
|
||||||
put("story-released","released");
|
put("story-released","released");
|
||||||
put("story-closed","closed");
|
put("story-closed","closed");
|
||||||
|
|||||||
@@ -136,8 +136,6 @@
|
|||||||
s.ys_user,
|
s.ys_user,
|
||||||
s.task_count,
|
s.task_count,
|
||||||
s.ys_date,
|
s.ys_date,
|
||||||
s.inner_ys_flag,
|
|
||||||
s.product_user,
|
|
||||||
su.title userStoryName,
|
su.title userStoryName,
|
||||||
su.id userStoryId,
|
su.id userStoryId,
|
||||||
ps.title parentName,
|
ps.title parentName,
|
||||||
@@ -162,10 +160,6 @@
|
|||||||
<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>
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'WDCP' ">
|
|
||||||
and s.product_user= #{qo.userName}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
|
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
|
||||||
and s.openedBy= #{qo.userName}
|
and s.openedBy= #{qo.userName}
|
||||||
</if>
|
</if>
|
||||||
@@ -219,15 +213,19 @@
|
|||||||
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>
|
||||||
<if test="qo.title != null and qo.title != '' ">
|
<if test="qo.title != null and qo.title != '' ">
|
||||||
and s.title like concat('%', #{qo.title}, '%')
|
and s.title like concat('%', #{qo.title}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.productUser != null and qo.productUser != '' ">
|
|
||||||
and s.product_user like concat('%', #{qo.productUser}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="qo.module != null and qo.module != '' ">
|
<if test="qo.module != null and qo.module != '' ">
|
||||||
and s.module = #{qo.module}
|
and s.module = #{qo.module}
|
||||||
</if>
|
</if>
|
||||||
@@ -266,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>
|
||||||
@@ -291,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,
|
||||||
@@ -366,26 +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,
|
||||||
s.inner_ys_flag,
|
pt.name productName
|
||||||
s.product_user,
|
from zt_story s
|
||||||
s.test_user,
|
|
||||||
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_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>
|
||||||
@@ -397,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 != '' ">
|
||||||
@@ -422,62 +429,53 @@
|
|||||||
<if test="qo.name != null and qo.name != '' ">
|
<if test="qo.name != null and qo.name != '' ">
|
||||||
and s.title like concat('%', #{qo.name}, '%')
|
and s.title like concat('%', #{qo.name}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="qo.productUser != null and qo.productUser != '' ">
|
|
||||||
and s.product_user like concat('%', #{qo.productUser}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="qo.testUser != null and qo.testUser != '' ">
|
|
||||||
and s.assignedTo like concat('%', #{qo.testUser}, '%')
|
|
||||||
</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>
|
||||||
|
|
||||||
<if test="qo.kfz == 1 ">
|
<if test="qo.kfz == 1 ">
|
||||||
<if test="qo.userName != null and qo.userName != '' ">
|
<if test="qo.userName != null and qo.userName != '' ">
|
||||||
|
|
||||||
and
|
and
|
||||||
(s.assignedTo = #{qo.userName}
|
(s.assignedTo = #{qo.userName}
|
||||||
or s.openedBy = #{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>
|
||||||
|
|
||||||
</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 == 'WDCP' ">
|
|
||||||
and s.product_user = #{qo.userName}
|
|
||||||
</if>
|
|
||||||
<if test="qo.searchVal != null and qo.searchVal == 'WCC' ">
|
|
||||||
and s.assignedTo = #{qo.userName}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="qo.searchVal == 'JH' ">
|
<if test="qo.searchVal == 'JH' ">
|
||||||
and s.status = 'active'
|
and s.status = 'active'
|
||||||
@@ -494,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' ">
|
||||||
@@ -508,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>
|
||||||
@@ -520,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>
|
||||||
|
|
||||||
@@ -579,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
|
||||||
@@ -901,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}
|
||||||
@@ -1050,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>
|
||||||
@@ -1314,25 +1302,4 @@
|
|||||||
and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') or st.title like concat('%', #{keyword}, '%') ) order by id desc )
|
and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') or st.title like concat('%', #{keyword}, '%') ) order by id desc )
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="storyReleaseOnTimeByProducts" resultType="java.util.Map">
|
|
||||||
select (SELECT count(1) waitRelease from zt_story
|
|
||||||
WHERE plan_end_date >=#{startTime} and plan_end_date <= #{endTime} AND product in
|
|
||||||
<foreach collection="pIds" item="id" index="index"
|
|
||||||
open="(" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>) planReleaseStoryNum,
|
|
||||||
(SELECT count(1) waitRelease from zt_story
|
|
||||||
WHERE plan_end_date >=#{startTime} and plan_end_date <=#{endTime} and releasedDate >=#{startTime}
|
|
||||||
and releasedDate <=#{endTime}
|
|
||||||
AND product in
|
|
||||||
<foreach collection="pIds" item="id" index="index"
|
|
||||||
open="(" close=")" separator=",">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
) onTimeNum
|
|
||||||
from dual;
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
s.deliver_remark,
|
s.deliver_remark,
|
||||||
s.old_status,
|
s.old_status,
|
||||||
s.ys_user,
|
s.ys_user,
|
||||||
s.product_user,
|
|
||||||
pt.name productName from zt_story_user s LEFT JOIN zt_product pt on s.product = pt.id WHERE 1=1
|
pt.name productName from zt_story_user s LEFT JOIN zt_product pt on s.product = pt.id WHERE 1=1
|
||||||
|
|
||||||
<if test="qo.productIds != null and qo.productIds.size() > 0">
|
<if test="qo.productIds != null and qo.productIds.size() > 0">
|
||||||
@@ -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 != '' ">
|
||||||
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
|
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
|
||||||
@@ -188,9 +178,9 @@
|
|||||||
<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.productUser != null and qo.productUser != '' ">
|
|
||||||
and s.product_user like concat('%', #{qo.productUser}, '%')
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="qo.searchVal == 'ALL' ">
|
<if test="qo.searchVal == 'ALL' ">
|
||||||
|
|
||||||
@@ -199,12 +189,10 @@
|
|||||||
and s.status != 'closed'
|
and s.status != 'closed'
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="qo.searchVal == 'WDCP' ">
|
|
||||||
and s.product_user = #{qo.userName}
|
|
||||||
</if>
|
|
||||||
<if test="qo.searchVal == 'WCJ' ">
|
<if test="qo.searchVal == 'WCJ' ">
|
||||||
and s.openedby= #{qo.userName}
|
and s.openedby= #{qo.userName}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="qo.id != null ">
|
<if test="qo.id != null ">
|
||||||
and s.id = #{qo.id}
|
and s.id = #{qo.id}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user