新版绩效考核方案
This commit is contained in:
@ -22,7 +22,7 @@ public class CodeGenerator {
|
||||
//自己的名字
|
||||
static String Author = "gqb";
|
||||
|
||||
public static String tableName = "base_user_role";
|
||||
public static String tableName = "zt_month_scope";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -155,17 +155,14 @@ public class ZtCountController {
|
||||
}
|
||||
|
||||
|
||||
//系统需求
|
||||
|
||||
// @RequestMapping(value = "/projectInfoById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
// public Result storyFeedbackCount(@RequestBody ZtCaseDTO dto){
|
||||
//
|
||||
// ZtStoryCountDTO result=countService.storyFeedbackCount(dto);
|
||||
//
|
||||
// return Result.success(result) ;
|
||||
// }
|
||||
|
||||
|
||||
@RequestMapping(value = "/myWorkScore", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtStoryDTO> myWorkScore(@RequestBody ZtProjectQo qo){
|
||||
if(qo.getDate()==null){
|
||||
throw new BusinessException("请选择日期");
|
||||
}
|
||||
return Result.success(countService.myWorkScore(qo));
|
||||
}
|
||||
//我的需求列表
|
||||
@RequestMapping(value = "/myStoryList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtStoryDTO> myStoryList(@RequestBody ZtProjectQo qo){
|
||||
@ -197,4 +194,23 @@ public class ZtCountController {
|
||||
public Result<ZtCronDevopsDTO> myDevops(@RequestBody ZtProjectQo qo){
|
||||
return Result.success(countService.myDevops(qo));
|
||||
}
|
||||
|
||||
//柱状图需求
|
||||
@RequestMapping(value = "/storyBarChart", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<Map<String,String>> storyBarChart(@RequestBody ZtProjectQo qo){
|
||||
return Result.success(countService.storyBarChart(qo));
|
||||
}
|
||||
//柱状图BUG
|
||||
@RequestMapping(value = "/bugBarChart", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<Map<String,String>> bugBarChart(@RequestBody ZtProjectQo qo){
|
||||
return Result.success(countService.bugBarChart(qo));
|
||||
}
|
||||
|
||||
|
||||
//绩效统计根据产品集
|
||||
@RequestMapping(value = "/monthScopeByProgram", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<Map<String,String>> monthScopeByProgram(@RequestBody ZtProjectQo qo){
|
||||
return Result.success(countService.monthScopeByProgram(qo));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.sa.zentao.controller;
|
||||
|
||||
|
||||
import com.sa.zentao.dao.PerformanceDTO;
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtMeetingDTO;
|
||||
import com.sa.zentao.dao.ZtMonthScopeDTO;
|
||||
import com.sa.zentao.service.IZtMonthScoreService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/zt-month-scope")
|
||||
public class ZtMonthScoreController {
|
||||
@Autowired
|
||||
private IZtMonthScoreService monthScoreService;
|
||||
|
||||
@RequestMapping(value = "/save", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result save(@RequestBody PerformanceDTO dto){
|
||||
monthScoreService.saveScope(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -139,6 +139,12 @@ public class ZtReleaseController {
|
||||
releaseService.release(dto);
|
||||
return Result.success();
|
||||
}
|
||||
//催促验收
|
||||
@RequestMapping(value = "/urgeYs", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result urgeYs(@RequestBody ZtReleaseQo qo){
|
||||
releaseService.urgeYs(qo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/closeRelease", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result closeRelease(@RequestBody ZtReleaseQo dto){
|
||||
|
@ -84,7 +84,9 @@ public class ZtStoryFeedbackController {
|
||||
@RequestMapping(value = "/list", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result list(@RequestBody ZtStoryFeedbackDTO dto){
|
||||
List<ZtStoryFeedback> waitList = storyFeedbackService.list(new QueryWrapper<ZtStoryFeedback>()
|
||||
.lambda().eq(ZtStoryFeedback::getStatus, "wait"));
|
||||
.lambda()
|
||||
.select()
|
||||
.eq(ZtStoryFeedback::getStatus, "wait"));
|
||||
|
||||
|
||||
return Result.success(waitList);
|
||||
|
@ -90,6 +90,9 @@ public class ZtStoryUserController {
|
||||
}else {
|
||||
eq.in(ZtStoryUser::getStatus, UserStoryEnums.CFM.getCode(),UserStoryEnums.KFZ.getCode());
|
||||
}
|
||||
eq.select(ZtStoryUser::getId,ZtStoryUser::getTitle,ZtStoryUser::getProduct,
|
||||
ZtStoryUser::getOpenedby,ZtStoryUser::getAssignedto
|
||||
);
|
||||
List<ZtStoryUser> list = storyUserService.list(eq
|
||||
);
|
||||
return Result.success(list);
|
||||
|
@ -7,11 +7,16 @@ import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class PerformanceDTO implements Serializable {
|
||||
|
||||
@ExcelIgnore
|
||||
private Date date;
|
||||
|
||||
private Integer id ;
|
||||
@ExcelProperty(value = "姓名",index =0)
|
||||
private String userName;
|
||||
//任务总量
|
||||
@ -23,12 +28,7 @@ public class PerformanceDTO implements Serializable {
|
||||
// 小时
|
||||
@ExcelIgnore
|
||||
private BigDecimal approvalDays;
|
||||
//发布验收绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseScore=BigDecimal.ZERO;
|
||||
//会议绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal meetScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
//拆分任务工时
|
||||
@ExcelIgnore
|
||||
@ -39,12 +39,11 @@ public class PerformanceDTO implements Serializable {
|
||||
//可用工时 6*工作天数
|
||||
@ExcelProperty(value = "达标工时 ",index =4)
|
||||
//达标 考核工时
|
||||
private BigDecimal examineTime;
|
||||
//工作饱和度
|
||||
private BigDecimal examineTime=BigDecimal.ZERO;
|
||||
@ExcelProperty(value = "产出工时 ",index =5)
|
||||
private BigDecimal workTime;
|
||||
private BigDecimal workTime=BigDecimal.ZERO;;
|
||||
@ExcelProperty(value = "分配工时 ",index =6)
|
||||
private BigDecimal allocationTime;
|
||||
private BigDecimal allocationTime=BigDecimal.ZERO;
|
||||
@ExcelProperty(value = "工作饱和率 ",index =7)
|
||||
private BigDecimal saturation;
|
||||
@ExcelProperty(value = "饱和率得分 ",index =8)
|
||||
@ -52,10 +51,13 @@ public class PerformanceDTO implements Serializable {
|
||||
|
||||
@ExcelProperty(value = "延期任务 ",index =9)
|
||||
private BigDecimal delayTask;
|
||||
//总任务
|
||||
@ExcelIgnore
|
||||
private BigDecimal totalTask=BigDecimal.ZERO;;
|
||||
@ExcelProperty(value = "完成任务 ",index =10)
|
||||
private BigDecimal finishTask;
|
||||
@ExcelProperty(value = "完成准时率 ",index =11)
|
||||
private BigDecimal finishPunctuality;
|
||||
private BigDecimal finishPunctuality=BigDecimal.ZERO;;
|
||||
@ExcelProperty(value = "准时率得分 ",index =12)
|
||||
private BigDecimal punctualityScore=BigDecimal.ZERO;
|
||||
@ExcelProperty(value = "线上严重bug ",index =13)
|
||||
@ -63,15 +65,98 @@ public class PerformanceDTO implements Serializable {
|
||||
//缺陷检出率
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugFindScore;
|
||||
//缺陷检出率得分
|
||||
private BigDecimal bugFindRate;
|
||||
//产出线上Bug
|
||||
@ExcelProperty(value = "线上普通bug ",index =14)
|
||||
private BigDecimal slightBug;
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugCount=BigDecimal.ZERO;
|
||||
//bug密度
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugDensity=BigDecimal.ZERO;
|
||||
//线上Bug得分
|
||||
@ExcelProperty(value = "线上Bug得分 ",index =15)
|
||||
private BigDecimal bugScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
//普通bug
|
||||
private BigDecimal devSlightBug;
|
||||
//严重bug
|
||||
private BigDecimal devSeriousBug;
|
||||
private BigDecimal devBugScore;
|
||||
//产出线上Bug
|
||||
@ExcelProperty(value = "总分 ",index =16)
|
||||
private BigDecimal score;
|
||||
//工作态度
|
||||
@ExcelIgnore
|
||||
private BigDecimal workAttitude=BigDecimal.ZERO;
|
||||
//优秀分享 创新贡献
|
||||
@ExcelIgnore
|
||||
private BigDecimal excellentShare=BigDecimal.ZERO;
|
||||
|
||||
//质量贡献
|
||||
@ExcelIgnore
|
||||
private BigDecimal quality=BigDecimal.ZERO;
|
||||
//代码质量问题个数
|
||||
private BigDecimal codeQualityProblem=BigDecimal.ZERO;
|
||||
//代码得分
|
||||
private BigDecimal codeQualityScore=BigDecimal.ZERO;
|
||||
|
||||
//需求发布总量
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseCount;
|
||||
//即时验收数量
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseOnTimeCount;
|
||||
//即时验收率
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseOnTimeRate;
|
||||
//发布验收绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseScore=BigDecimal.ZERO;
|
||||
|
||||
//会议绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal meetScore=BigDecimal.ZERO;
|
||||
//周会议
|
||||
private BigDecimal meetWeek;
|
||||
//需求会议
|
||||
private BigDecimal meetStory;
|
||||
//文档质量问题个数
|
||||
private BigDecimal documentQualityProblem=BigDecimal.ZERO;
|
||||
//文档得分
|
||||
private BigDecimal documentQualityScore=BigDecimal.ZERO;
|
||||
|
||||
//设计得分
|
||||
private BigDecimal designScore=BigDecimal.ZERO;
|
||||
//设计问题
|
||||
private BigDecimal designQualityProblem=BigDecimal.ZERO;
|
||||
// //项目绩效
|
||||
// private BigDecimal projectScore=BigDecimal.ZERO;
|
||||
|
||||
//项目文档
|
||||
// private BigDecimal projectDocumentScore=BigDecimal.ZERO;
|
||||
|
||||
// //会议管理
|
||||
// private BigDecimal meetDocumentScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
//ui 工作量 加分项
|
||||
private BigDecimal uiWorkScore=BigDecimal.ZERO;
|
||||
//总分
|
||||
private BigDecimal totalScore=BigDecimal.ZERO;
|
||||
|
||||
//版本计划完成率
|
||||
private BigDecimal versionPlanFinishedRate=BigDecimal.ZERO;;
|
||||
//任务管理和分解能力
|
||||
private BigDecimal taskManageScore=BigDecimal.ZERO;;
|
||||
//分配工时占比
|
||||
private BigDecimal allocationTimeManageRate=BigDecimal.ZERO;
|
||||
//系统稳定得分
|
||||
private BigDecimal systemStabilityScore=BigDecimal.ZERO;
|
||||
//专业技能提升
|
||||
private BigDecimal professionalSkillEnhancementScore=BigDecimal.ZERO;
|
||||
//问题管理得分
|
||||
private BigDecimal developFeedbackStory=BigDecimal.ZERO;
|
||||
}
|
||||
|
157
src/main/java/com/sa/zentao/dao/ProgramCountDTO.java
Normal file
157
src/main/java/com/sa/zentao/dao/ProgramCountDTO.java
Normal file
@ -0,0 +1,157 @@
|
||||
package com.sa.zentao.dao;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ProgramCountDTO implements Serializable {
|
||||
//完成需求总量
|
||||
private BigDecimal finishedStoryCount;
|
||||
//上线需求总量
|
||||
private BigDecimal releaseStoryCount;
|
||||
//完成验收数量
|
||||
private BigDecimal ysStoryCount;
|
||||
//完成需求验收率
|
||||
private BigDecimal ysStoryRate;
|
||||
//线上bug比例
|
||||
private BigDecimal prodBugRate;
|
||||
//完成任务总量
|
||||
private BigDecimal taskCount;
|
||||
//处理问题数量
|
||||
private BigDecimal handFeedbackCount;
|
||||
//问题通过率
|
||||
private BigDecimal passFeedbackCountRate;
|
||||
//需求总工时
|
||||
@ExcelProperty(value = "天数",index =2)
|
||||
private BigDecimal days;
|
||||
// 小时
|
||||
@ExcelIgnore
|
||||
private BigDecimal approvalDays;
|
||||
|
||||
|
||||
//拆分任务工时
|
||||
@ExcelIgnore
|
||||
private BigDecimal splitTimeScore=BigDecimal.ZERO;
|
||||
//实际产出工时
|
||||
@ExcelProperty(value = "可用工时",index =3)
|
||||
private BigDecimal totalTime;
|
||||
//可用工时 6*工作天数
|
||||
@ExcelProperty(value = "达标工时 ",index =4)
|
||||
//达标 考核工时
|
||||
private BigDecimal examineTime;
|
||||
//工作饱和度
|
||||
@ExcelProperty(value = "产出工时 ",index =5)
|
||||
private BigDecimal workTime;
|
||||
@ExcelProperty(value = "分配工时 ",index =6)
|
||||
private BigDecimal allocationTime;
|
||||
@ExcelProperty(value = "工作饱和率 ",index =7)
|
||||
private BigDecimal saturation;
|
||||
@ExcelProperty(value = "饱和率得分 ",index =8)
|
||||
private BigDecimal saturationScore;
|
||||
|
||||
@ExcelProperty(value = "延期任务 ",index =9)
|
||||
private BigDecimal delayTask;
|
||||
//总任务
|
||||
@ExcelIgnore
|
||||
private BigDecimal totalTask;
|
||||
@ExcelProperty(value = "完成任务 ",index =10)
|
||||
private BigDecimal finishTask;
|
||||
@ExcelProperty(value = "完成准时率 ",index =11)
|
||||
private BigDecimal finishPunctuality;
|
||||
@ExcelProperty(value = "准时率得分 ",index =12)
|
||||
private BigDecimal punctualityScore=BigDecimal.ZERO;
|
||||
@ExcelProperty(value = "线上严重bug ",index =13)
|
||||
private BigDecimal seriousBug;
|
||||
//缺陷检出率
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugFindScore;
|
||||
//缺陷检出率得分
|
||||
private BigDecimal bugFindRate;
|
||||
//产出线上Bug
|
||||
@ExcelProperty(value = "线上普通bug ",index =14)
|
||||
private BigDecimal slightBug;
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugCount=BigDecimal.ZERO;
|
||||
//bug密度
|
||||
@ExcelIgnore
|
||||
private BigDecimal bugDensity=BigDecimal.ZERO;
|
||||
//线上Bug得分
|
||||
@ExcelProperty(value = "线上Bug得分 ",index =15)
|
||||
private BigDecimal bugScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
//普通bug
|
||||
private BigDecimal devSlightBug;
|
||||
//严重bug
|
||||
private BigDecimal devSeriousBug;
|
||||
private BigDecimal devBugScore;
|
||||
//产出线上Bug
|
||||
@ExcelProperty(value = "总分 ",index =16)
|
||||
private BigDecimal score;
|
||||
//工作态度
|
||||
@ExcelIgnore
|
||||
private BigDecimal workAttitude=BigDecimal.ZERO;
|
||||
//优秀分享 创新贡献
|
||||
@ExcelIgnore
|
||||
private BigDecimal excellentShare=BigDecimal.ZERO;
|
||||
|
||||
//质量贡献
|
||||
@ExcelIgnore
|
||||
private BigDecimal quality=BigDecimal.ZERO;
|
||||
//代码质量问题个数
|
||||
private BigDecimal codeQualityProblem=BigDecimal.ZERO;
|
||||
//代码得分
|
||||
private BigDecimal codeQualityScore=BigDecimal.ZERO;
|
||||
|
||||
//需求发布总量
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseCount;
|
||||
//即时验收数量
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseOnTimeCount;
|
||||
//即时验收率
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseOnTimeRate;
|
||||
//发布验收绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal releaseScore=BigDecimal.ZERO;
|
||||
|
||||
//会议绩效
|
||||
@ExcelIgnore
|
||||
private BigDecimal meetScore=BigDecimal.ZERO;
|
||||
//周会议
|
||||
private BigDecimal meetWeek;
|
||||
//需求会议
|
||||
private BigDecimal meetStory;
|
||||
//文档质量问题个数
|
||||
private BigDecimal documentQualityProblem=BigDecimal.ZERO;
|
||||
//文档得分
|
||||
private BigDecimal documentQualityScore=BigDecimal.ZERO;
|
||||
|
||||
//设计得分
|
||||
private BigDecimal designScore=BigDecimal.ZERO;
|
||||
//设计问题
|
||||
private BigDecimal designQualityProblem=BigDecimal.ZERO;
|
||||
// //项目绩效
|
||||
// private BigDecimal projectScore=BigDecimal.ZERO;
|
||||
|
||||
//项目文档
|
||||
private BigDecimal projectDocumentScore=BigDecimal.ZERO;
|
||||
|
||||
// //会议管理
|
||||
// private BigDecimal meetDocumentScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
//ui 工作量 加分项
|
||||
private BigDecimal uiWorkScore=BigDecimal.ZERO;
|
||||
//总分
|
||||
private BigDecimal totalScore=BigDecimal.ZERO;
|
||||
|
||||
|
||||
}
|
@ -29,12 +29,12 @@ public class ProjectWorkDetailsDTO implements Serializable {
|
||||
|
||||
//已验收需求总量
|
||||
@ExcelProperty(value = "已验收需求总量",index =5)
|
||||
private Integer ysTaskCount;
|
||||
private BigDecimal ysStoryCount;
|
||||
//验收通过率
|
||||
@ExcelProperty(value = "验收通过率",index =6)
|
||||
private BigDecimal ysYesRate;
|
||||
//验收不通过数量
|
||||
@ExcelProperty(value = "验收不通过数量",index =7)
|
||||
private BigDecimal ysNoRate;
|
||||
private BigDecimal ysNoCount;
|
||||
//验收情况备注
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.sa.zentao.dao;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.sa.zentao.enums.UserType;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -12,6 +13,8 @@ import java.math.BigDecimal;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WorkDetailsDTO implements Serializable {
|
||||
|
||||
|
||||
|
||||
@ExcelProperty(value = "员工",index =0)
|
||||
private String userName;
|
||||
//任务总量
|
||||
@ -40,4 +43,9 @@ public class WorkDetailsDTO implements Serializable {
|
||||
//产出线上Bug
|
||||
@ExcelProperty(value = "产出线上Bug ",index =6)
|
||||
private BigDecimal bugCount;
|
||||
|
||||
@ExcelIgnore
|
||||
private UserType userType;
|
||||
@ExcelIgnore
|
||||
private String account;
|
||||
}
|
||||
|
@ -199,6 +199,7 @@ public class ZtBugDTO implements Serializable {
|
||||
private String files;
|
||||
|
||||
private List<ZtBugDTO> list;
|
||||
//releaseBug prod dev
|
||||
private String bugType;
|
||||
|
||||
private String ysUser;
|
||||
@ -212,4 +213,6 @@ public class ZtBugDTO implements Serializable {
|
||||
|
||||
private Integer releaseId;
|
||||
private String releaseName;
|
||||
|
||||
private String feedbackSpec;
|
||||
}
|
||||
|
@ -102,4 +102,5 @@ public class ZtComputerSourceDTO implements Serializable {
|
||||
|
||||
private String code;
|
||||
|
||||
private String ip;
|
||||
}
|
||||
|
@ -75,4 +75,8 @@ public class ZtMeetingDTO implements Serializable {
|
||||
private String userStoryName;
|
||||
|
||||
private String storyIds;
|
||||
|
||||
private String result;
|
||||
|
||||
private String meetingAfter;
|
||||
}
|
||||
|
44
src/main/java/com/sa/zentao/dao/ZtMonthScopeDTO.java
Normal file
44
src/main/java/com/sa/zentao/dao/ZtMonthScopeDTO.java
Normal file
@ -0,0 +1,44 @@
|
||||
package com.sa.zentao.dao;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ZtMonthScopeDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 2022-07
|
||||
*/
|
||||
private String dateStr;
|
||||
|
||||
private String scopeJson;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date updateDate;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
|
||||
}
|
@ -61,6 +61,8 @@ public class ZtStoryDTO implements Serializable {
|
||||
|
||||
private Integer feedback;
|
||||
|
||||
private String feedbackSpec;
|
||||
|
||||
private String title;
|
||||
|
||||
private String keywords;
|
||||
@ -261,6 +263,11 @@ public class ZtStoryDTO implements Serializable {
|
||||
private String releaseName;
|
||||
private List<ZtBugDTO> bugList;
|
||||
|
||||
|
||||
//验收日期
|
||||
private Date ysDate;
|
||||
|
||||
//开发完成时间
|
||||
private Date develDate;
|
||||
//测试完成时间
|
||||
private Date testedDate;
|
||||
}
|
||||
|
@ -120,4 +120,6 @@ public class ZtStoryFeedbackDTO implements Serializable {
|
||||
// 1通过 2不通过
|
||||
private Integer revieweResult;
|
||||
|
||||
private String oaName;
|
||||
|
||||
}
|
||||
|
@ -201,4 +201,6 @@ public class ZtTaskDTO implements Serializable {
|
||||
private BigDecimal useTime;
|
||||
|
||||
private List<ZtBugDTO> bugList;
|
||||
|
||||
private String feedbackSpec;
|
||||
}
|
||||
|
@ -147,6 +147,11 @@ public class ZtBug implements Serializable {
|
||||
@TableField("closedDate")
|
||||
private Date closeddate;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String cancelBy;
|
||||
@TableField(exist = false)
|
||||
private Date cancelDate;
|
||||
|
||||
@TableField("duplicateBug")
|
||||
private Integer duplicatebug;
|
||||
|
||||
|
@ -102,4 +102,6 @@ public class ZtComputerSource implements Serializable {
|
||||
private Date updateDate;
|
||||
|
||||
private String code;
|
||||
|
||||
private String ip;
|
||||
}
|
||||
|
@ -70,4 +70,8 @@ public class ZtMeeting implements Serializable {
|
||||
|
||||
private String storyIds;
|
||||
|
||||
private String result;
|
||||
|
||||
private String meetingAfter;
|
||||
|
||||
}
|
||||
|
47
src/main/java/com/sa/zentao/entity/ZtMonthScore.java
Normal file
47
src/main/java/com/sa/zentao/entity/ZtMonthScore.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.sa.zentao.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ZtMonthScore implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 2022-07
|
||||
*/
|
||||
private String dateStr;
|
||||
|
||||
private String scopeJson;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date updateDate;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
|
||||
}
|
@ -184,9 +184,9 @@ public class ZtStory implements Serializable {
|
||||
private Date planStartDate;
|
||||
//计划结束时间
|
||||
private Date planEndDate;
|
||||
//开始日期
|
||||
//开始日期 开发开始
|
||||
private Date startDate;
|
||||
//结束日期
|
||||
//结束日期 测试结束
|
||||
private Date endDate;
|
||||
|
||||
private Integer project;
|
||||
@ -194,7 +194,8 @@ public class ZtStory implements Serializable {
|
||||
private Integer ysFlag;
|
||||
|
||||
private String ysRemark;
|
||||
|
||||
//开发完毕日期
|
||||
private Date developedDate;
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer userStory;
|
||||
@ -202,6 +203,12 @@ public class ZtStory implements Serializable {
|
||||
private String ysUser;
|
||||
|
||||
private Integer taskCount;
|
||||
//验收时间
|
||||
|
||||
private Date ysDate;
|
||||
// //开发完成时间
|
||||
// private Date develDate;
|
||||
// //测试完成时间
|
||||
// private Date testedDate;
|
||||
|
||||
}
|
||||
|
@ -85,8 +85,10 @@ public class ZtStoryFeedback implements Serializable {
|
||||
|
||||
//预计完成时间
|
||||
private Date planFinishDate;
|
||||
|
||||
//处理完成时间
|
||||
private Date finishDate;
|
||||
//验收时间
|
||||
private Date ysDate;
|
||||
//响应时间 处理时间
|
||||
private Date handDate;
|
||||
//关闭日期
|
||||
|
@ -24,6 +24,7 @@ public enum ActionStatus {
|
||||
YSTG(16, "ystg","验收通过"),
|
||||
YSBTG(17, "ysbtg","验收不通过"),
|
||||
FBCG(18, "fb","发布通过"),
|
||||
|
||||
FBSB(30, "fb","发布不通过"),
|
||||
QR(19, "qr","确认"),
|
||||
KSCE(21, "testing","开始测试"),
|
||||
@ -34,7 +35,7 @@ public enum ActionStatus {
|
||||
|
||||
ZTBG(42, "changeStatus","状态变更"),
|
||||
MQXU(43, "mqxu","明确需求"),
|
||||
|
||||
STORYCCYS(44, "storyccys","发布催促验收"),
|
||||
TJYS(51, "verified","提交验收"),
|
||||
|
||||
KSCL(61, "startHand","开始处理"),
|
||||
|
@ -16,6 +16,8 @@ public enum ActionType {
|
||||
|
||||
FB(34, "release","发布"),
|
||||
|
||||
SCORECOUNT(35, "releasecount","绩效计算"),
|
||||
|
||||
USERXQ(14, "user-story","用户需求"),
|
||||
|
||||
WTFK(15, "story-feedback","问题反馈"),
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -22,4 +23,7 @@ public interface ZtBugMapper extends BaseMapper<ZtBug> {
|
||||
|
||||
List<ZtBugDTO> myBugPageList(@Param("qo") ZtProjectQo qo);
|
||||
|
||||
List<ZtBug> bugListByIds(@Param("ids")List<String> ids);
|
||||
|
||||
List<ZtBug> bugListByProductAndDate(@Param("pIds")List<Integer> pIds, @Param("start")Date start,@Param("end") Date lastDayOfMonth);
|
||||
}
|
||||
|
16
src/main/java/com/sa/zentao/mapper/ZtMonthScoreMapper.java
Normal file
16
src/main/java/com/sa/zentao/mapper/ZtMonthScoreMapper.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.sa.zentao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.sa.zentao.entity.ZtMonthScore;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
public interface ZtMonthScoreMapper extends BaseMapper<ZtMonthScore> {
|
||||
|
||||
}
|
@ -26,5 +26,15 @@ public interface ZtTaskMapper extends BaseMapper<ZtTask> {
|
||||
@DS("slave")
|
||||
List<ZtTaskDTO> taskListPrd(@Param("id") Integer id);
|
||||
|
||||
List<ItApproval> itApprovalByUserName(@Param("name") String name,@Param("startDate") Date firstDayOfMonth, @Param("endDate") Date lastDayOfMonth);
|
||||
List<ItApproval> itApprovalByUserName(@Param("name") String name, @Param("startDate") Date firstDayOfMonth, @Param("endDate") Date lastDayOfMonth);
|
||||
|
||||
List<ZtTask> taskListByIds(@Param("ids") List<String> ids);
|
||||
|
||||
List<ZtTask> taskListByStoryIds(@Param("ids") List<Integer> sIds);
|
||||
|
||||
List<ZtTask> multipleDepartProjectTeam(@Param("start") Date start, @Param("end") Date end);
|
||||
|
||||
List<ZtTask> taskListByPIdsAndDate(@Param("pids") List<Integer> pids, @Param("start")Date firstDayOfMonth, @Param("end")Date lastDayOfMonth);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ public class ZtBugQo extends BaseQo {
|
||||
// testing
|
||||
// tested
|
||||
// closed
|
||||
// cancel
|
||||
private String status;
|
||||
|
||||
private String remark;
|
||||
|
@ -102,4 +102,6 @@ public class ZtComputerSourceQo extends BaseQo {
|
||||
//1年内、3年内、3~5年、5~7年,7年以上 1 2 3 4 5
|
||||
private String yearSearch;
|
||||
|
||||
private String ip;
|
||||
|
||||
}
|
||||
|
@ -105,4 +105,6 @@ public class ZtProjectQo extends BaseQo {
|
||||
private String spec;
|
||||
|
||||
private String bugType;
|
||||
|
||||
private String account;
|
||||
}
|
||||
|
@ -58,5 +58,9 @@ public class ZtReleaseQo extends BaseQo {
|
||||
|
||||
private List<Integer> storyList;
|
||||
private List<Integer> bugList;
|
||||
|
||||
//验收状态 released已发布 verified
|
||||
private String ysStatus;
|
||||
//验收结果 1.通过 2不通过
|
||||
private Integer ysFlag;
|
||||
//
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sa.zentao.qo.ZtBugQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -46,4 +47,10 @@ public interface IZtBugService extends IService<ZtBug> {
|
||||
List<ZtBugDTO> bugListByTaskStory(ZtBugDTO dto);
|
||||
|
||||
ZtBugDTO getBugById(Integer id);
|
||||
|
||||
List<ZtBug> bugListByIds(List<String> ids);
|
||||
|
||||
List<ZtBug> getNormalBugList(List<ZtBug> bugList);
|
||||
|
||||
List<ZtBug> bugListByProductAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth);
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package com.sa.zentao.service;
|
||||
|
||||
import com.sa.zentao.dao.PerformanceDTO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sa.zentao.entity.ZtMonthScore;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
public interface IZtMonthScoreService extends IService<ZtMonthScore> {
|
||||
|
||||
void saveScope(PerformanceDTO dto);
|
||||
}
|
@ -139,4 +139,7 @@ public interface IZtProjectService extends IService<ZtProject> {
|
||||
|
||||
ZtProjectDTO getProjectById(ZtProjectDTO dto);
|
||||
|
||||
List<ZtProject> projectListByProductIds(List<Integer> pIds);
|
||||
|
||||
List<ZtProject> getExecutionsListByProjectAndDate(List<Integer> projects, Date firstDayOfMonth, Date lastDayOfMonth);
|
||||
}
|
||||
|
@ -70,5 +70,8 @@ public interface IZtReleaseService extends IService<ZtRelease> {
|
||||
void submitAgainReviewing(ZtReleaseDTO dto);
|
||||
|
||||
ZtRelease getReleaseByStory(Integer id);
|
||||
|
||||
ZtRelease getReleaseByBug(Integer id);
|
||||
|
||||
void urgeYs(ZtReleaseQo qo);
|
||||
}
|
||||
|
@ -91,4 +91,7 @@ public interface IZtStoryService extends IService<ZtStory> {
|
||||
void batchAddStory(ZtStoryDTO dto);
|
||||
|
||||
List<ZtStoryDTO> storyListByUserStory(ZtStoryDTO dto);
|
||||
|
||||
List<ZtStory> getNormalStory(List<ZtStory> sList);
|
||||
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ import com.sa.zentao.dao.ZtYwTaskDTO;
|
||||
import com.sa.zentao.entity.ZtTask;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -62,8 +64,32 @@ public interface IZtTaskService extends IService<ZtTask> {
|
||||
*
|
||||
* @param firstDayOfMonth 开始
|
||||
* @param lastDayOfMonth 结束
|
||||
* @param eIds 迭代
|
||||
* @param pids 产品
|
||||
* @return
|
||||
*/
|
||||
List<ZtTask> taskListByEIdsAndDate(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> eIds);
|
||||
List<ZtTask> taskListByEIdsAndDate(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> pids);
|
||||
|
||||
|
||||
List<ZtTask> getDelayTask(List<ZtTask> t);
|
||||
|
||||
List<ZtTask> getOnTimeTask(List<ZtTask> t);
|
||||
|
||||
List<ZtTask> taskListByIds(List<String> ids);
|
||||
|
||||
List<ZtTask> taskListByStoryIds(List<Integer> sIds);
|
||||
|
||||
List<ZtTask> getNormalTaskList(List<ZtTask> tList);
|
||||
|
||||
List<ZtTask> getDevelAllocation(List<ZtTask> tList);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param firstDayOfMonth 开始日期
|
||||
* @param lastDayOfMonth 结束日期
|
||||
* @param eIds 迭代ids
|
||||
* @return
|
||||
*/
|
||||
List<ZtTask> develTaskListByExecutions(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> eIds);
|
||||
|
||||
List<ZtTask> multipleDepartProjectTeam(Date firstDayOfMonth, Date lastDayOfMonth);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -93,20 +93,24 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
@Override
|
||||
public PageInfo<ZtBugDTO> bugPageList(ZtProjectQo qo) {
|
||||
|
||||
List<Integer> pIds = this.projectService.authProductList();
|
||||
|
||||
List<Integer> pIds = this.projectService.authProductList();
|
||||
Page<ZtBugDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
qo.setUserName(RiskUserThreadLocal.get().getName());
|
||||
|
||||
List<ZtBugDTO> result =null;
|
||||
if(StringUtils.isEmpty(qo.getSource())){
|
||||
|
||||
|
||||
if(CollectionUtils.isEmpty(pIds)){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
if (!StringUtils.isEmpty(qo.getIds())) {
|
||||
String[] split = qo.getIds().split(",");
|
||||
qo.setObjIds(new ArrayList<>(Arrays.asList(split)));
|
||||
}
|
||||
if(qo.getProductId()!=null&&qo.getProductId()!=0){
|
||||
qo.setProductIds(Arrays.asList(qo.getProductId()));
|
||||
}else{
|
||||
qo.setProductIds(pIds);
|
||||
}
|
||||
@ -278,7 +282,13 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
String lasteditedby = d.getLasteditedby();
|
||||
|
||||
String closedby = d.getClosedby();
|
||||
|
||||
Integer feedback = ztBug.getFeedback();
|
||||
if(feedback!=null&&feedback!=0){
|
||||
ZtStoryFeedback ztStoryFeedback = this.storyFeedbackService.getById(feedback);
|
||||
if(ztStoryFeedback!=null){
|
||||
d.setFeedbackSpec(ztStoryFeedback.getSpec());
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
@ -526,6 +536,31 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
return this.bugInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtBug> bugListByIds(List<String> ids) {
|
||||
return this.baseMapper.bugListByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtBug> getNormalBugList(List<ZtBug> bugList) {
|
||||
List<ZtBug> result=new ArrayList();
|
||||
for (ZtBug b:bugList) {
|
||||
if(!b.getStatus().equals("closed")){
|
||||
result.add(b);
|
||||
}
|
||||
if(b.getStatus().equals("closed")&&!StringUtils.isEmpty(b.getResolvedby())){
|
||||
result.add(b);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtBug> bugListByProductAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth) {
|
||||
|
||||
return this.baseMapper.bugListByProductAndDate(pIds,firstDayOfMonth,lastDayOfMonth);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@ -630,6 +665,9 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
//
|
||||
}
|
||||
if("closed".equalsIgnoreCase(qo.getStatus())){
|
||||
if(!"resolved".equals(ztBug.getStatus())){
|
||||
throw new BusinessException("未完成的bug无法关闭");
|
||||
}
|
||||
//
|
||||
ztBug.setStatus("closed");
|
||||
ztBug.setClosedby(RiskUserThreadLocal.get().getName());
|
||||
@ -638,6 +676,20 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
,RiskUserThreadLocal.get().getName(),qo.getDesc(),""
|
||||
);
|
||||
}
|
||||
|
||||
if("cancel".equalsIgnoreCase(qo.getStatus())){
|
||||
if("resolved".equals(ztBug.getStatus())||"closed".equals(ztBug.getStatus())||"cancel".equals(ztBug.getStatus())){
|
||||
throw new BusinessException("当前无法取消");
|
||||
}
|
||||
//
|
||||
ztBug.setStatus("cancel");
|
||||
ztBug.setCancelBy(RiskUserThreadLocal.get().getName());
|
||||
ztBug.setCancelDate(new Date());
|
||||
this.actionService.addAction(ActionType.BUG, ActionStatus.QX,ztBug.getId(),ztBug.getProject()+"",ztBug.getProject(),ztBug.getExecution()
|
||||
,RiskUserThreadLocal.get().getName(),qo.getDesc(),""
|
||||
);
|
||||
}
|
||||
|
||||
//1.active 2.confire=1 3.解决进行中 不变 4 resolved 完成 5.测试中不变 6.测试完毕不变
|
||||
ztBug.setLastediteddate(new Date());
|
||||
ztBug.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
@ -646,7 +698,7 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
return;
|
||||
}
|
||||
if(ztBug.getExecution()!=null&&ztBug.getExecution()!=0){
|
||||
kanbanlaneService.changeStatus(ztBug.getExecution(),ztBug.getId(),"bug",qo.getStatus());
|
||||
kanbanlaneService.changeStatus(ztBug.getExecution(),ztBug.getId(),"bug","cancel".equals(qo.getStatus())?"closed":qo.getStatus());
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,7 +98,6 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
|
||||
List<ZtStory> ztStories = this.storyService.listByIds(ids);
|
||||
List<ZtStoryDTO> ztStoryDTOS = BeanCopyUtil.copyListProperties(ztStories, ZtStoryDTO::new);
|
||||
List<ZtStoryspec> storySpecList = storyspecService.list(new QueryWrapper<ZtStoryspec>().lambda().in(ZtStoryspec::getStory, ids));
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
ZtProduct product = this.productService.getById(ztStoryDTOS.get(0).getProduct());
|
||||
for (ZtStoryDTO st:ztStoryDTOS) {
|
||||
@ -113,12 +112,6 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
st.setAssignedToName(ztUser.getNickname());
|
||||
st.setColor(ztUser.getColor());
|
||||
}
|
||||
List<ZtStoryspec> storyspecs = storySpecList.stream().filter(o -> o.getStory().intValue() == st.getId().intValue()).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isEmpty(storyspecs)){
|
||||
ZtStoryspec ztStoryspec = storyspecs.get(0);
|
||||
st.setSpec(ztStoryspec.getSpec());
|
||||
st.setVerify(ztStoryspec.getVerify());
|
||||
}
|
||||
if(product!=null){
|
||||
st.setProductName(product.getName());
|
||||
}
|
||||
@ -127,7 +120,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
}
|
||||
d.setList(ztStoryDTOS);
|
||||
}else if("bug".equalsIgnoreCase(d.getCardType())){
|
||||
List<ZtBug> ztBugs = bugService.listByIds(ids);
|
||||
List<ZtBug> ztBugs = bugService.bugListByIds(ids);
|
||||
List<ZtBugDTO> ztBugDTOS =new ArrayList<>();
|
||||
|
||||
if(!CollectionUtils.isEmpty(ztBugs)){
|
||||
@ -143,7 +136,7 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
}
|
||||
d.setList(ztBugDTOS);
|
||||
}else if("task".equalsIgnoreCase(d.getCardType())){
|
||||
List<ZtTask> ztTasks = taskService.listByIds(ids);
|
||||
List<ZtTask> ztTasks = taskService.taskListByIds(ids);
|
||||
List<ZtTaskDTO> ztTaskDTOS =new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(ztTasks)){
|
||||
ztTaskDTOS=BeanCopyUtil.copyListProperties(ztTasks,ZtTaskDTO::new);
|
||||
|
@ -247,7 +247,13 @@ public class ZtMeetingServiceImpl extends ServiceImpl<ZtMeetingMapper, ZtMeeting
|
||||
"<div style=\"line-height: 50px;font-family: 宋体\">参会人员: {usersName} </div>\n" +
|
||||
"<h1 style=\"line-height: 70px;font-size: 41px\">会议内容 </h1>\n" +
|
||||
"<div style=\"line-height: 20px;;font-family: 宋体\"></div>\n"+
|
||||
"<div style=\"line-height: 30px;;font-family: 宋体\">{remark}</div>";
|
||||
"<div style=\"line-height: 30px;;font-family: 宋体\">{remark}</div>"+
|
||||
"<h1 style=\"line-height: 70px;font-size: 41px\">讨论的结果 </h1>\n" +
|
||||
"<div style=\"line-height: 20px;;font-family: 宋体\"></div>\n"+
|
||||
"<div style=\"line-height: 30px;;font-family: 宋体\">{result}</div>"+
|
||||
"<h1 style=\"line-height: 70px;font-size: 41px\">后续行动安排 </h1>\n" +
|
||||
"<div style=\"line-height: 20px;;font-family: 宋体\"></div>\n"+
|
||||
"<div style=\"line-height: 30px;;font-family: 宋体\">{meetingAfter}</div>";
|
||||
|
||||
// 替换内容集合
|
||||
Map<String, String> textMap = new LinkedHashMap<>();
|
||||
@ -261,6 +267,10 @@ public class ZtMeetingServiceImpl extends ServiceImpl<ZtMeetingMapper, ZtMeeting
|
||||
pfdStr= pfdStr.replace("{meetingDate}",DateUtils.formatDate(ztMeeting.getMeetingDate(),"yyyy/MM/dd HH:mm"));
|
||||
textMap.put("address",ztMeeting.getAddress());
|
||||
pfdStr= pfdStr.replace("{address}",ztMeeting.getAddress());
|
||||
pfdStr= pfdStr.replace("{result}",ztMeeting.getResult());
|
||||
pfdStr= pfdStr.replace("{meetingAfter}",ztMeeting.getMeetingAfter());
|
||||
textMap.put("result", ztMeeting.getResult());
|
||||
textMap.put("meetingAfter", ztMeeting.getMeetingAfter());
|
||||
StringBuilder b=new StringBuilder();
|
||||
if(!StringUtils.isEmpty(ztMeeting.getUsers())){
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
@ -289,7 +299,7 @@ public class ZtMeetingServiceImpl extends ServiceImpl<ZtMeetingMapper, ZtMeeting
|
||||
// textMap.put("remark", ztMeeting.getRemark());
|
||||
}
|
||||
pfdStr= pfdStr.replace("{remark}",ztMeeting.getRemark());
|
||||
pfdStr= pfdStr.replace("{name}",ztMeeting.getName());
|
||||
pfdStr= pfdStr.replace("{name}",StringUtils.isEmpty(ztMeeting.getName())?ztMeeting.getTitle():ztMeeting.getName());
|
||||
// 调用工具类,registerTemplatePath 模板路径,textMap 文字内容
|
||||
// 调用工具类,registerTemplatePath 模板路径,textMap 文字内容
|
||||
try {
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.sa.zentao.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
||||
import com.sa.zentao.dao.BusinessException;
|
||||
import com.sa.zentao.dao.PerformanceDTO;
|
||||
import com.sa.zentao.entity.ZtMonthScore;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
import com.sa.zentao.enums.ActionType;
|
||||
import com.sa.zentao.mapper.ZtMonthScoreMapper;
|
||||
import com.sa.zentao.service.IZtActionService;
|
||||
import com.sa.zentao.service.IZtMonthScoreService;
|
||||
import com.sa.zentao.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-24
|
||||
*/
|
||||
@Service
|
||||
public class ZtMonthScoreServiceImpl extends ServiceImpl<ZtMonthScoreMapper, ZtMonthScore> implements IZtMonthScoreService {
|
||||
|
||||
@Autowired
|
||||
private IZtActionService actionService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveScope(PerformanceDTO dto) {
|
||||
boolean addFlag = dto.getId()==null?true:false;
|
||||
|
||||
ZtMonthScore ztMonthScore = null;
|
||||
if(!addFlag){
|
||||
ztMonthScore=this.baseMapper.selectById(dto.getId());
|
||||
}else if(ztMonthScore==null){
|
||||
List<ZtMonthScore> ztMonthScores = this.baseMapper.selectList(new QueryWrapper<ZtMonthScore>().lambda().eq(ZtMonthScore::getAccount, dto.getAccount()).eq(ZtMonthScore::getDateStr, DateUtils.formatDate(dto.getDate(), "yyyy-MM")));
|
||||
if(!CollectionUtils.isEmpty(ztMonthScores)){
|
||||
throw new BusinessException("已经存在相同数据");
|
||||
}
|
||||
ztMonthScore=new ZtMonthScore();
|
||||
ztMonthScore.setCreateDate(new Date());
|
||||
ztMonthScore.setCreateUser(RiskUserThreadLocal.get().getName());
|
||||
ztMonthScore.setAccount(dto.getAccount());
|
||||
}
|
||||
ztMonthScore.setDateStr(DateUtils.formatDate(dto.getDate(),"yyyy-MM"));
|
||||
ztMonthScore.setScopeJson(JSON.toJSONString(dto));
|
||||
ztMonthScore.setUpdateDate(new Date());
|
||||
ztMonthScore.setUpdateUser(RiskUserThreadLocal.get().getName());
|
||||
this.saveOrUpdate(ztMonthScore);
|
||||
if(addFlag){
|
||||
actionService.addAction(ActionType.SCORECOUNT, ActionStatus.XJ,null,null,null,null,RiskUserThreadLocal.get().getName(),"",null);
|
||||
}else{
|
||||
actionService.addAction(ActionType.SCORECOUNT, ActionStatus.BJ,null,null,null,null,RiskUserThreadLocal.get().getName(),"",null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -20,6 +20,7 @@ import com.sa.zentao.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.utils.BeanCopyUtil;
|
||||
import com.sa.zentao.utils.BeanCopyUtilCallBack;
|
||||
import com.sa.zentao.utils.SFunctionColums;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -424,7 +425,12 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
List<ZtProject> ztProjects = this.projectService.listByIds(projectproductlist.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
result.put("project",ztProjects);
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().in(ZtExecutionproject::getProject, ztProjects.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
List<ZtProject> execList = this.projectService.listByIds(list.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
List<ZtProject> execList = this.projectService
|
||||
.list(new QueryWrapper<ZtProject>().lambda()
|
||||
.ne(ZtProject::getStatus,"closed")
|
||||
.in(ZtProject::getId,list.stream().map(o -> o.getExecution()).collect(Collectors.toList()))
|
||||
.orderByDesc(ZtProject::getId)
|
||||
);
|
||||
result.put("execution",execList);
|
||||
}else{
|
||||
result.put("project",Arrays.asList());
|
||||
@ -446,7 +452,12 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().in(ZtExecutionproject::getProject,
|
||||
Arrays.asList(projectId)));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
List<ZtProject> execList = this.projectService.listByIds(list.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
List<ZtProject> execList = this.projectService
|
||||
.list(new QueryWrapper<ZtProject>().lambda()
|
||||
.ne(ZtProject::getStatus,"closed")
|
||||
.in(ZtProject::getId,list.stream().map(o -> o.getExecution()).collect(Collectors.toList()))
|
||||
.orderByDesc(ZtProject::getId)
|
||||
);
|
||||
result.put("execution",execList);
|
||||
}else{
|
||||
result.put("execution",Arrays.asList());
|
||||
@ -470,7 +481,12 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
List<ZtProject> ztProjects = this.projectService.listByIds(projectproductlist.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
result.put("project",ztProjects);
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().in(ZtExecutionproject::getProject, ztProjects.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
List<ZtProject> execList = this.projectService.listByIds(list.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
List<ZtProject> execList = this.projectService
|
||||
.list(new QueryWrapper<ZtProject>().lambda()
|
||||
.ne(ZtProject::getStatus,"closed")
|
||||
.in(ZtProject::getId,list.stream().map(o -> o.getExecution()).collect(Collectors.toList()))
|
||||
.orderByDesc(ZtProject::getId)
|
||||
);
|
||||
result.put("execution",execList);
|
||||
}else{
|
||||
result.put("project",Arrays.asList());
|
||||
@ -532,19 +548,28 @@ public class ZtProductServiceImpl extends ServiceImpl<ZtProductMapper, ZtProduct
|
||||
if(!CollectionUtils.isEmpty(projectproductlist)){
|
||||
List<ZtProject> ztProjects = this.projectService.listByIds(projectproductlist.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
result.put("project",ztProjects);
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().in(ZtExecutionproject::getProject, ztProjects.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
List<ZtProject> execList = this.projectService.listByIds(list.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
List<ZtExecutionproject> list = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda()
|
||||
.in(ZtExecutionproject::getProject, ztProjects.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
List<ZtProject> execList=new ArrayList<>();
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
execList = this.projectService
|
||||
.list(new QueryWrapper<ZtProject>().lambda()
|
||||
.ne(ZtProject::getStatus,"closed")
|
||||
.in(ZtProject::getId,(executionId!=null&&executionId!=0)?Arrays.asList(executionId):list.stream().map(o -> o.getExecution()).collect(Collectors.toList()))
|
||||
.orderByDesc(ZtProject::getId)
|
||||
);
|
||||
}
|
||||
|
||||
result.put("execution",execList);
|
||||
}
|
||||
List<ZtTask> list = this.taskService.list(new QueryWrapper<ZtTask>().lambda()
|
||||
.select(SFunctionColums.taskColumes())
|
||||
.eq(ZtTask::getStory, storyId));
|
||||
result.put("task",list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Integer bugId = dto.getBugId();
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
|
@ -1061,6 +1061,46 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
return d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtProject> projectListByProductIds(List<Integer> pIds) {
|
||||
if(CollectionUtils.isEmpty(pIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().in(ZtProjectproduct::getProduct, pIds));
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return listByIds(list.stream().map(o->o.getProject()).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtProject> getExecutionsListByProjectAndDate(List<Integer> projects, Date firstDayOfMonth, Date lastDayOfMonth) {
|
||||
|
||||
List<ZtExecutionproject> list = executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda()
|
||||
.in(ZtExecutionproject::getProject, projects));
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
List<ZtProject> ztProjects = this.list(
|
||||
new QueryWrapper<ZtProject>().lambda().in(ZtProject::getId,list.stream().map(o -> o.getExecution()).collect(Collectors.toList())));
|
||||
|
||||
// .and(o->o.ge(ZtProject::getBegin,firstDayOfMonth).le(ZtProject::getBegin,lastDayOfMonth))
|
||||
// .or(e->e.ge(ZtProject::getEnd,firstDayOfMonth).le(ZtProject::getEnd,lastDayOfMonth)));
|
||||
|
||||
if (CollectionUtils.isEmpty(ztProjects)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
ztProjects = ztProjects.stream().filter(o -> (o.getBegin().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getBegin().getTime() <= lastDayOfMonth.getTime()) || (
|
||||
o.getEnd().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getEnd().getTime() <= lastDayOfMonth.getTime()
|
||||
)).collect(Collectors.toList());
|
||||
|
||||
return ztProjects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void projectTeamUpdate(ZtProjectQo qo) {
|
||||
List<String> teamList = qo.getTeamList();
|
||||
@ -1806,24 +1846,12 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
List<ZtExecutionproject> execList = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda()
|
||||
.in(ZtExecutionproject::getProject, projectList.stream().map(o -> o.getProject()).collect(Collectors.toList())));
|
||||
if (CollectionUtils.isEmpty(execList)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<ZtProject> ztProjects = this.listByIds(execList.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
|
||||
|
||||
ztProjects = ztProjects.stream().filter(o -> (o.getBegin().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getBegin().getTime() <= lastDayOfMonth.getTime()) || (
|
||||
o.getEnd().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getEnd().getTime() <= lastDayOfMonth.getTime()
|
||||
)).collect(Collectors.toList());
|
||||
List<ZtProject> ztProjects = this.getExecutionsListByProjectAndDate(projectList.stream().map(o -> o.getProject()).collect(Collectors.toList()), firstDayOfMonth, lastDayOfMonth);
|
||||
if (CollectionUtils.isEmpty(ztProjects)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
List<ZtTask> list =this.taskService.taskListByEIdsAndDate(firstDayOfMonth,lastDayOfMonth,execList.stream().map(o -> o.getExecution())
|
||||
.collect(Collectors.toList()));
|
||||
List<ZtTask> list =this.taskService.taskListByEIdsAndDate(firstDayOfMonth,lastDayOfMonth,products.stream().map(o->o.getId()).collect(Collectors.toList()));
|
||||
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new PageInfo<>();
|
||||
@ -1832,13 +1860,10 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
List<ZtEffort> efforts = this.effortService.list(new QueryWrapper<ZtEffort>().lambda()
|
||||
.eq(ZtEffort::getObjecttype, "task")
|
||||
.in(ZtEffort::getObjectid, list.stream().map(o -> o.getId()).collect(Collectors.toList()))
|
||||
.gt(ZtEffort::getDate, new Date(firstDayOfMonth.getTime() - 2000)).lt(ZtEffort::getDate, lastDayOfMonth)
|
||||
.gt(ZtEffort::getDate, new Date(firstDayOfMonth.getTime())).le(ZtEffort::getDate, lastDayOfMonth)
|
||||
);
|
||||
|
||||
|
||||
if (CollectionUtils.isEmpty(execList)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
List<ZtTeam> teams = this.teamService.list(new QueryWrapper<ZtTeam>().lambda().eq(ZtTeam::getType, "execution")
|
||||
.in(ZtTeam::getRoot, ztProjects.stream().map(o -> o.getId())
|
||||
@ -1856,43 +1881,47 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
}
|
||||
|
||||
List result =new ArrayList();
|
||||
List<String> closeStatus = Arrays.asList("closed", "cancel");
|
||||
|
||||
|
||||
for (String account :accountIds) {
|
||||
|
||||
List<ZtTask> taskList = list.stream().filter(o->account.equals(o.getAssignedTo())).filter(o-> !closeStatus.contains(o.getStatus())).collect(Collectors.toList());
|
||||
ZtUser ztUser = uMap.get(account);
|
||||
List<ZtTask> taskList =null;
|
||||
if(ztUser.getUserType()==UserType.KFZ){
|
||||
taskList = this.taskService.getDevelAllocation(list.stream().filter(o->account.equals(o.getAssignedTo())).collect(Collectors.toList()));
|
||||
}else{
|
||||
taskList = this.taskService.getNormalTaskList(list.stream().filter(o->account.equals(o.getAssignedTo())).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
var d=new WorkDetailsDTO();
|
||||
ZtUser ztUser = uMap.get(account);
|
||||
|
||||
d.setUserType(ztUser.getUserType());
|
||||
d.setUserName(ztUser.getNickname());
|
||||
d.setAccount(account);
|
||||
//需求总工时
|
||||
d.setStoryTotalTime(floatToBigDecimal(floatBatchAdd(taskList.stream().map(o -> o.getEstimate()).collect(Collectors.toList()))));
|
||||
d.setStoryTotalTime(floatToBigDecimal(floatBatchAdd(taskList.stream().filter(o->o.getStatus().equals("done")).map(o -> o.getEstimate()).collect(Collectors.toList()))));
|
||||
//实际产出工时
|
||||
d.setWorkTime(floatToBigDecimal(floatBatchAdd(taskList.stream().map(o -> o.getConsumed()).collect(Collectors.toList()))));
|
||||
|
||||
|
||||
|
||||
List<ItApproval> approvalList = this.taskService.itApprovalByUserName(ztUser.getNickname(),firstDayOfMonth, lastDayOfMonth);
|
||||
Integer applyTime=0;
|
||||
if(!CollectionUtils.isEmpty(approvalList)){
|
||||
applyTime=countService.getApprovalTime(approvalList,firstDayOfMonth);;
|
||||
}
|
||||
d.setQjTime(BigDecimal.valueOf(applyTime));
|
||||
PerformanceDTO dto=new PerformanceDTO();
|
||||
dto=countService.setUserWorkTime(dto,date,approvalList,firstDayOfMonth);
|
||||
|
||||
d.setQjTime(dto.getApprovalDays());
|
||||
//可用工时
|
||||
BigDecimal haveTime = BigDecimal.valueOf(DateUtils.getWorkDaysInCurrentMonth(date) * 6).subtract(applyTime < 1 ? BigDecimal.ZERO : d.getQjTime());
|
||||
d.setHaveTime(haveTime.intValue()<0?BigDecimal.ZERO:haveTime);
|
||||
d.setHaveTime(dto.getExamineTime());
|
||||
|
||||
//工作饱和度
|
||||
d.setSaturation(BigDecimalUtils.isZero(d.getHaveTime())?BigDecimal.valueOf(1):d.getWorkTime().compareTo(BigDecimal.ZERO)==0?BigDecimal.ZERO:d.getStoryTotalTime().divide(d.getHaveTime(),2,BigDecimal.ROUND_HALF_UP));
|
||||
// 任务总量
|
||||
d.setTaskCount(BigDecimal.valueOf(taskList.size()));
|
||||
d.setTaskCount(BigDecimal.valueOf(taskList.stream().filter(o->o.getStatus().equals("done")).collect(Collectors.toList()).size()));
|
||||
|
||||
List<ZtTask> delayList = taskList.stream().filter(o->
|
||||
((o.getFinishedDate()!=null &&DateUtils.getDayLast(o.getFinishedDate()).getTime()>DateUtils.getDayLast(o.getDeadline()).getTime()) ) //实际完成大于预计完成 延期
|
||||
||o.getFinishedDate()==null &&lastDayOfMonth.getTime()>DateUtils.getDayLast(o.getDeadline()).getTime()
|
||||
).collect(Collectors.toList());
|
||||
List<ZtTask> delayList =this.taskService.getDelayTask(taskList);
|
||||
//任务延期量
|
||||
d.setTaskDelayCount(BigDecimal.valueOf(delayList.size()));
|
||||
if(ztUser.getUserType()==UserType.CS||ztUser.getUserType()==UserType.KFZ){
|
||||
BigDecimal finishAllTime = BigDecimal.valueOf(floatBatchAdd(taskList.stream().map(o->o.getEstimate()).collect(Collectors.toList())));
|
||||
BigDecimal finishAllTime = BigDecimal.valueOf(floatBatchAdd(taskList.stream().filter(o->o.getStatus().equals("done")).map(o->o.getEstimate()).collect(Collectors.toList())));
|
||||
List<ZtTask> onTimeTask = taskList.stream().filter(o -> o.getFinishedDate() != null
|
||||
&& o.getFinishedDate().getTime() <= DateUtils.getDayLast(o.getDeadline()).getTime()).collect(Collectors.toList());
|
||||
BigDecimal onTime=BigDecimal.valueOf(floatBatchAdd(onTimeTask.stream().map(o->o.getEstimate())
|
||||
@ -1901,13 +1930,15 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
BigDecimal onTimeFinishRate = BigDecimalUtils.isZero(finishAllTime) ? finishAllTime : onTime.divide(finishAllTime, 2, BigDecimal.ROUND_HALF_UP);
|
||||
d.setTaskFinishOnTimeRate(onTimeFinishRate.multiply(BigDecimal.valueOf(100)) );
|
||||
}else{
|
||||
d.setTaskFinishOnTimeRate(delayList.size()==0?BigDecimal.valueOf(100):BigDecimal.valueOf(100).subtract(BigDecimal.valueOf(delayList.size()).divide(d.getTaskCount(),2,BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100))));
|
||||
d.setTaskFinishOnTimeRate(BigDecimalUtils.isZero(d.getTaskCount())?BigDecimal.ZERO:delayList.size()==0?BigDecimal.valueOf(100):BigDecimal.valueOf(100).subtract(BigDecimal.valueOf(delayList.size()).divide(d.getTaskCount(),2,BigDecimal.ROUND_HALF_UP).multiply(BigDecimal.valueOf(100))));
|
||||
}
|
||||
//任务及时完成率
|
||||
|
||||
List<ZtBug> bugList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().in(ZtBug::getProduct, products.stream().map(o -> o.getId()).collect(Collectors.toList()))
|
||||
.eq(ZtBug::getBugType,"prod")
|
||||
.between(ZtBug::getOpeneddate, firstDayOfMonth, lastDayOfMonth).eq(ZtBug::getResolvedby, account));
|
||||
.ge(ZtBug::getOpeneddate, firstDayOfMonth)
|
||||
.le(ZtBug::getOpeneddate, lastDayOfMonth)
|
||||
.eq(ZtBug::getAssignedTo, account));
|
||||
|
||||
d.setBugCount(BigDecimal.valueOf(bugList.size()));
|
||||
result.add(d);
|
||||
|
@ -322,11 +322,16 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
}
|
||||
ztRelease.setRealReleaseDate(new Date());
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
|
||||
if (1 == dto.getPushFlag()) {
|
||||
//推送
|
||||
ZtProduct ztProduct = this.productService.getById(ztRelease.getProduct());
|
||||
//产品集
|
||||
ZtProject ztProject = this.projectService.getById(ztProduct.getProgram());
|
||||
|
||||
ZtNotice notice = new ZtNotice();
|
||||
notice.setName(dto.getTitle());
|
||||
notice.setTitle(dto.getTitle());
|
||||
notice.setTitle(ztProject.getName()+"-"+dto.getTitle());
|
||||
notice.setRemark(dto.getRemark());
|
||||
notice.setCreateDate(new Date());
|
||||
notice.setCreateUser(RiskUserThreadLocal.get().getName());
|
||||
@ -339,26 +344,27 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
List<ZtReleaseDetails> details = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getReleaseId, ztRelease.getId())
|
||||
.ne(ZtReleaseDetails::getStatus, "closed"));
|
||||
|
||||
List<Integer> storyList = new ArrayList<Integer>();
|
||||
List<Integer> bugList = new ArrayList<Integer>();
|
||||
for (ZtReleaseDetails d : details) {
|
||||
if(d.getObjectType().equals("bug")){
|
||||
bugList.add(d.getObjectId());
|
||||
}else if(d.getObjectType().equals("story")){
|
||||
storyList.add(d.getObjectId());
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(storyList) &&CollectionUtils.isEmpty(bugList) ) {
|
||||
throw new BusinessException("当前迭代无需求无法发布");
|
||||
}
|
||||
|
||||
List<ZtStory> ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
|
||||
|
||||
List<ZtBug> bugs =CollectionUtils.isEmpty(bugList)?new ArrayList<>(): bugService.listByIds(bugList);
|
||||
|
||||
|
||||
|
||||
if (dto.getRevieweResult() == 1) {
|
||||
List<Integer> storyList = new ArrayList<Integer>();
|
||||
List<Integer> bugList = new ArrayList<Integer>();
|
||||
for (ZtReleaseDetails d : details) {
|
||||
if(d.getObjectType().equals("bug")){
|
||||
bugList.add(d.getObjectId());
|
||||
}else if(d.getObjectType().equals("story")){
|
||||
storyList.add(d.getObjectId());
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isEmpty(storyList) &&CollectionUtils.isEmpty(bugList) ) {
|
||||
throw new BusinessException("当前迭代无需求无法发布");
|
||||
}
|
||||
|
||||
List<ZtStory> ztStories = CollectionUtils.isEmpty(storyList)?new ArrayList<>():storyService.listByIds(storyList);
|
||||
|
||||
List<ZtBug> bugs =CollectionUtils.isEmpty(bugList)?new ArrayList<>(): bugService.listByIds(bugList);
|
||||
long notTested = ztStories.stream().filter(o -> !o.getStage().equals("tested")).count();
|
||||
if(notTested>0){
|
||||
throw new BusinessException("当前需求存在未测试完成的请检查");
|
||||
@ -381,7 +387,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
this.bugService.updateById(b);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
sendMail(ztStories);
|
||||
sendReleaseMail(ztStories);
|
||||
|
||||
|
||||
}
|
||||
@ -392,8 +398,8 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void sendMail(List<ZtStory> ztStories) {
|
||||
//验收提醒
|
||||
private void sendReleaseMail(List<ZtStory> ztStories) {
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
Set<String> mailTo =new HashSet<>();
|
||||
StringBuilder b=new StringBuilder();
|
||||
@ -433,7 +439,60 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
b.toString());
|
||||
}
|
||||
}
|
||||
//催促验收
|
||||
private void urgeYsMail(List<ZtStory> ztStories,ZtRelease release) {
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
Set<String> mailTo =new HashSet<>();
|
||||
StringBuilder b=new StringBuilder();
|
||||
b.append("<div style=\"text-align: left; text-indent: 0px; font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">Dear all:</span></div>");
|
||||
String title="以下需求距离上线时间{day}天,请尽快前往IT服务台进行验收。具体待验收的需求如下:";
|
||||
title=title.replace("{day}",DateUtils.daysBetween(release.getRealReleaseDate()==null?release.getReleaseDate():release.getRealReleaseDate(),new Date())+"");
|
||||
ZtProduct ztProduct = this.productService.getById(ztStories.get(0).getProduct());
|
||||
|
||||
title=title.replace("{productName}",ztProduct==null?"":ztProduct.getName());
|
||||
b.append("<div style=\"text-align: left; text-indent: 0px; font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\"><br></span></div>");
|
||||
|
||||
b.append(title);
|
||||
|
||||
b.append("<div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\"><br></span></div>");
|
||||
b.append("<table id=\"table_0\" data-editing-info=\"{"topBorderColor":"#ABABAB","bottomBorderColor":"#ABABAB","verticalBorderColor":"#ABABAB","hasHeaderRow":false,"hasFirstColumn":false,"hasBandedRows":false,"hasBandedColumns":false,"bgColorEven":null,"bgColorOdd":"#ABABAB20","headerRowColor":"#ABABAB","tableBorderFormat":0,"verticalAlign":"middle"}\" style=\"box-sizing: border-box; border-collapse: collapse; border-spacing: 0px;\">");
|
||||
b.append("<tbody>" +
|
||||
"<tr><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 67.5938px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">需求编号</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 690.922px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\">研发需求名称</div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 103.859px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">需求状态</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 121.359px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">上线时间</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 117.875px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px;\"><span style=\"line-height: 1.6;\">截止验收时间</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 105.391px; height: 54.2766px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">验收人</span></div></td></tr>"
|
||||
// "<tr><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 74.8281px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">需求编号</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 926.453px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\">研发需求名称</div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 102.672px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">需求状态</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 105.672px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">上线时间</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 108.672px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px;\"><span style=\"line-height: 1.6;\">截止验收时间</span></div></td><td style=\"border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; width: 93.7031px; height: 31.8118px; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">验收人</span></div></td></tr>"
|
||||
);
|
||||
for (ZtStory s:ztStories) {
|
||||
ZtUser ztUser = userMap.get(s.getYsUser());
|
||||
if(ztUser!=null&&!StringUtils.isEmpty(ztUser.getEmail())){
|
||||
// String str= "<tr><td style=\"width: 78.25px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{id}</span></div></td><td style=\"width: 996.266px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{title}</span></div></td><td style=\"width: 108.266px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{nickName}</span></div></td>" +
|
||||
// "</tr>";
|
||||
String str="<tr><td style=\"width: 74.8281px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{id}</span></div></td><td style=\"width: 926.453px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{title}</span></div></td><td style=\"width: 102.672px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{status}</span></div></td><td style=\"width: 105.672px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{releaseDate}</span></div></td><td style=\"width: 108.672px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{endDate}</span></div></td><td style=\"width: 93.7031px; height: 31.8118px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); padding: 4px 8px; vertical-align: middle; box-sizing: border-box;\"><div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\"><span style=\"line-height: 1.6;\">{nikename}</span></div></td></tr>";
|
||||
|
||||
str=str.replace("{nikename}",ztUser.getNickname());
|
||||
str=str.replace("{title}",s.getTitle());
|
||||
str=str.replace("{id}",s.getId().toString());
|
||||
str=str.replace("{status}","已发布");
|
||||
str=str.replace("{releaseDate}",DateUtils.formatDate(release.getRealReleaseDate()==null?release.getReleaseDate():release.getRealReleaseDate(),"yyyy-MM-dd"));
|
||||
str=str.replace("{endDate}",DateUtils.formatDate(DateUtils.dateAddDay(release.getRealReleaseDate()==null?release.getReleaseDate():release.getRealReleaseDate(),14)));
|
||||
|
||||
|
||||
b.append(str);
|
||||
mailTo.add(ztUser.getEmail());
|
||||
}
|
||||
|
||||
}
|
||||
b.append( "</tbody>");
|
||||
b.append( "</table>");
|
||||
if(!CollectionUtils.isEmpty(mailTo)){
|
||||
SendEmail.sendMessage("需求验收提醒:",mailTo.stream().collect(Collectors.toList()),
|
||||
null,
|
||||
b.toString());
|
||||
}
|
||||
for (ZtStory s:ztStories) {
|
||||
actionService.addAction(ActionType.XQ, ActionStatus.STORYCCYS, release.getId(), s.getProduct() + "", s.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(),null, s.getYsUser());
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<Map<String, Object>> execMenu(ZtReleaseQo qo) {
|
||||
|
||||
@ -626,6 +685,35 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
return this.baseMapper.selectById(list.get(0).getReleaseId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void urgeYs(ZtReleaseQo qo) {
|
||||
ZtRelease release = this.baseMapper.selectById(qo.getId());
|
||||
if(release==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
if(!release.getStatus().equals("released")){
|
||||
throw new BusinessException("当前未发布");
|
||||
}
|
||||
List<Integer> sIds = qo.getStoryList();
|
||||
List<ZtStory> storyList = null;
|
||||
if(!CollectionUtils.isEmpty(sIds)){
|
||||
storyList=this.storyService.list(new QueryWrapper<ZtStory>().lambda()
|
||||
.in(ZtStory::getId,sIds).eq(ZtStory::getStage,"released"));
|
||||
}else{
|
||||
List<ZtReleaseDetails> details = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getReleaseId, qo.getId()).eq(ZtReleaseDetails::getObjectType, "story"));
|
||||
if(CollectionUtils.isEmpty(details)){
|
||||
throw new BusinessException("当前无待验收的需求");
|
||||
}
|
||||
storyList=this.storyService.list(new QueryWrapper<ZtStory>().lambda()
|
||||
.in(ZtStory::getId,details.stream().map(o->o.getObjectId()).collect(Collectors.toList())).eq(ZtStory::getStage,"released"));
|
||||
}
|
||||
if(CollectionUtils.isEmpty(storyList)){
|
||||
throw new BusinessException("当前无待验收的需求");
|
||||
}
|
||||
urgeYsMail(storyList,release);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtStoryDTO> projectStoryPageList(ZtReleaseQo qo) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(qo.getId());
|
||||
|
@ -4,6 +4,8 @@ import ch.qos.logback.core.util.StringUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@ -152,6 +154,9 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
|
||||
ztStoryFeedback.setFileUrl(dto.getUrls());
|
||||
if(org.apache.commons.lang3.StringUtils.isEmpty(name)&& !org.apache.commons.lang3.StringUtils.isEmpty(dto.getOaName())){
|
||||
ztStoryFeedback.setSpec(ztStoryFeedback.getSpec()+" 提出人:"+dto.getOaName());
|
||||
}
|
||||
this.baseMapper.insert(ztStoryFeedback);
|
||||
|
||||
|
||||
@ -312,20 +317,17 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
public PageInfo<ZtStoryFeedbackDTO> myFeedbackPageList(ZtProjectQo qo) {
|
||||
|
||||
|
||||
List<Integer> authList = this.projectService.authList();
|
||||
if (RiskUserThreadLocal.get().getUserType()==UserType.GSGC) {
|
||||
authList = this.projectService.allAuthList();
|
||||
}
|
||||
if (CollectionUtils.isEmpty(authList)) {
|
||||
List<Integer> pids = this.projectService.authProductList();
|
||||
if (CollectionUtils.isEmpty(pids)) {
|
||||
return new PageInfo<ZtStoryFeedbackDTO>();
|
||||
}
|
||||
List<ZtProduct> list = productService.list(new QueryWrapper<ZtProduct>().lambda().in(ZtProduct::getProgram, authList));
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new PageInfo<ZtStoryFeedbackDTO>();
|
||||
if(qo.getProductId()!=null&&qo.getProductId()!=0){
|
||||
qo.setProductIds(Arrays.asList(qo.getProductId()));
|
||||
}else{
|
||||
qo.setProductIds(pids);
|
||||
}
|
||||
|
||||
Page<ZtStoryDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
List<ZtStoryFeedback> listFeedback = this.myPageList(qo,list);
|
||||
List<ZtStoryFeedback> listFeedback = this.myPageList(qo);
|
||||
long total = page.getTotal();
|
||||
|
||||
|
||||
@ -357,13 +359,32 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
private List<ZtStoryFeedback> myPageList(ZtProjectQo qo,List<ZtProduct> list) {
|
||||
private List<ZtStoryFeedback> myPageList(ZtProjectQo qo) {
|
||||
LambdaQueryWrapper<ZtStoryFeedback> query = new QueryWrapper<ZtStoryFeedback>().lambda();
|
||||
// .and(w->{
|
||||
// w.eq(ZtStoryFeedback::getAssignedTo, RiskUserThreadLocal.get().getName())
|
||||
// .or()
|
||||
// .eq(ZtStoryFeedback::getOpenedBy, RiskUserThreadLocal.get().getName()) ;}) ;
|
||||
|
||||
query.select(ZtStoryFeedback::getId,
|
||||
ZtStoryFeedback::getName,
|
||||
ZtStoryFeedback::getOpenedBy,
|
||||
ZtStoryFeedback::getFiles,
|
||||
ZtStoryFeedback::getOpenedDate,
|
||||
ZtStoryFeedback::getSource,
|
||||
ZtStoryFeedback::getStatus,
|
||||
ZtStoryFeedback::getOpenSource,
|
||||
ZtStoryFeedback::getPlanEndDate,
|
||||
ZtStoryFeedback::getAssignedTo,
|
||||
ZtStoryFeedback::getSpec,
|
||||
ZtStoryFeedback::getFinishDate,
|
||||
ZtStoryFeedback::getType,
|
||||
ZtStoryFeedback::getCloseRemark,
|
||||
ZtStoryFeedback::getProduct,
|
||||
ZtStoryFeedback::getPlanFinishDate,
|
||||
ZtStoryFeedback::getHandDate,
|
||||
ZtStoryFeedback::getCloseDate,
|
||||
ZtStoryFeedback::getClosedBy,
|
||||
ZtStoryFeedback::getApprovalRemark,
|
||||
ZtStoryFeedback::getYsFlag,
|
||||
ZtStoryFeedback::getDontHandSelect,
|
||||
ZtStoryFeedback::getDontHandRemark
|
||||
);
|
||||
if (!org.apache.commons.lang3.StringUtils.isEmpty(qo.getSearchVal())) {
|
||||
if ("ALL".equals(qo.getSearchVal())) {
|
||||
}
|
||||
@ -387,10 +408,9 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
|
||||
// UserType.GSGC==RiskUserThreadLocal.get().getUserType()||
|
||||
if ("admin".equals(RiskUserThreadLocal.get().getName())) {
|
||||
if (!CollectionUtils.isEmpty(qo.getProductIds())) {
|
||||
query.in(ZtStoryFeedback::getProduct, qo.getProductIds());
|
||||
|
||||
} else {
|
||||
query.in(ZtStoryFeedback::getProduct, list.stream().map(o -> o.getId()).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
|
||||
@ -498,6 +518,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
String status = ztStoryFeedback.getStatus();
|
||||
if ("wait".equals(status)) {
|
||||
ztStoryFeedback.setHandDate(new Date());
|
||||
ztStoryFeedback.setStatus("doing");
|
||||
this.baseMapper.updateById(ztStoryFeedback);
|
||||
//添加action
|
||||
@ -547,6 +568,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
}
|
||||
}
|
||||
ztStoryFeedback.setFinishDate(new Date());
|
||||
ztStoryFeedback.setStatus("finished");
|
||||
this.baseMapper.updateById(ztStoryFeedback);
|
||||
//添加action
|
||||
@ -566,8 +588,16 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
ztStoryFeedback.setDontHandRemark(dto.getDontHandRemark());
|
||||
ztStoryFeedback.setDontHandSelect(dto.getDontHandSelect());
|
||||
ztStoryFeedback.setStatus("submitVerified");
|
||||
this.baseMapper.updateById(ztStoryFeedback);
|
||||
LambdaUpdateWrapper<ZtStoryFeedback> updateWrapper = new UpdateWrapper<ZtStoryFeedback>().lambda()
|
||||
.set(ZtStoryFeedback::getDontHandRemark, dto.getDontHandRemark())
|
||||
.set(ZtStoryFeedback::getStatus, "submitVerified")
|
||||
.set(ZtStoryFeedback::getDontHandSelect, dto.getDontHandSelect())
|
||||
.set(ZtStoryFeedback::getYsFlag, 0);
|
||||
if(ztStoryFeedback.getFinishDate()==null){
|
||||
updateWrapper.set(ZtStoryFeedback::getFinishDate,new Date());
|
||||
}
|
||||
updateWrapper.eq(ZtStoryFeedback::getId,ztStoryFeedback.getId());
|
||||
this.baseMapper.update(updateWrapper);
|
||||
|
||||
if (!org.apache.commons.lang3.StringUtils.isEmpty(ztStoryFeedback.getOpenSource()) && ztStoryFeedback.getOpenSource().equals("weixin")) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
@ -617,6 +647,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
}
|
||||
}
|
||||
ztStoryFeedback.setYsDate(new Date());
|
||||
ztStoryFeedback.setStatus("verified");
|
||||
this.baseMapper.updateById(ztStoryFeedback);
|
||||
//添加action
|
||||
@ -643,15 +674,28 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
}
|
||||
Integer revieweResult = dto.getRevieweResult();
|
||||
|
||||
LambdaUpdateWrapper<ZtStoryFeedback> updateWrapper = new UpdateWrapper<ZtStoryFeedback>().lambda();
|
||||
|
||||
|
||||
if(revieweResult==1){
|
||||
ztStory.setStatus("verified");
|
||||
ztStory.setYsFlag(1);
|
||||
updateWrapper.set(ZtStoryFeedback::getDontHandRemark, "");
|
||||
updateWrapper.set(ZtStoryFeedback::getDontHandSelect, "");
|
||||
updateWrapper.set(ZtStoryFeedback::getApprovalRemark, "");
|
||||
updateWrapper.set(ZtStoryFeedback::getYsDate,new Date());
|
||||
}else{
|
||||
updateWrapper.set(ZtStoryFeedback::getApprovalRemark, dto.getApprovalRemark());
|
||||
ztStory.setApprovalRemark(dto.getApprovalRemark());
|
||||
updateWrapper.set(ZtStoryFeedback::getFinishDate,null);
|
||||
ztStory.setStatus("wait");
|
||||
ztStory.setYsFlag(2);
|
||||
}
|
||||
this.baseMapper.updateById(ztStory);
|
||||
updateWrapper.set(ZtStoryFeedback::getStatus, ztStory.getStatus());
|
||||
updateWrapper.set(ZtStoryFeedback::getYsFlag, ztStory.getYsFlag());
|
||||
updateWrapper.eq(ZtStoryFeedback::getId,ztStory.getId());
|
||||
|
||||
this.baseMapper.update(updateWrapper);
|
||||
|
||||
|
||||
//添加action
|
||||
@ -667,6 +711,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
|
||||
throw new BusinessException("当前状态无法处理");
|
||||
}
|
||||
ztStoryFeedback.setStatus("finished");
|
||||
ztStoryFeedback.setFinishDate(new Date());
|
||||
ztStoryFeedback.setDontHandRemark(dto.getDontHandRemark());
|
||||
ztStoryFeedback.setDontHandSelect(dto.getDontHandSelect());
|
||||
ztStoryFeedback.setUpdateDate(new Date());
|
||||
|
@ -118,6 +118,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
Map<Integer, List<ZtStoryreviewDTO>> rMap = getReviewMap(list);
|
||||
|
||||
Map<Integer, List<ZtProject>> executionMapByStory = getExecutionMapByStory(list);
|
||||
Map<Integer, ZtProduct> pMap = this.productService.selectMapProduct();
|
||||
|
||||
for (ZtStoryDTO d : list) {
|
||||
d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
||||
@ -126,7 +127,11 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
ZtProduct ztProduct = pMap.get(d.getProduct());
|
||||
|
||||
if(ztProduct!=null){
|
||||
d.setProductName(ztProduct.getName());
|
||||
}
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
@ -282,9 +287,12 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if(ztStoryUser==null){
|
||||
throw new BusinessException("未查询到用户需求");
|
||||
}
|
||||
if(!Arrays.asList(UserStoryEnums.CFM.getCode(),UserStoryEnums.KFZ.getCode()).contains(ztStoryUser.getStatus())){
|
||||
if(!Arrays.asList(UserStoryEnums.CFM.getCode(),UserStoryEnums.KFZ.getCode(),UserStoryEnums.JH.getCode()).contains(ztStoryUser.getStatus())){
|
||||
throw new BusinessException("用户需求无法关联请检查");
|
||||
}
|
||||
if(UserStoryEnums.JH.getCode().equals(ztStoryUser.getStatus())){
|
||||
this.storyUserService.changeStatus(ztStoryUser.getId(),UserStoryEnums.CFM);
|
||||
}
|
||||
}
|
||||
ZtStory s = new ZtStory();
|
||||
BeanUtils.copyProperties(dto, s);
|
||||
@ -425,6 +433,21 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtStory> getNormalStory(List<ZtStory> sList) {
|
||||
List result=new ArrayList();
|
||||
for (ZtStory st:sList) {
|
||||
if(!st.getStatus().equals("closed")){
|
||||
result.add(st);
|
||||
}
|
||||
if(st.getStatus().equals("closed")&&st.getYsFlag()!=null&&st.getYsFlag()!=0){
|
||||
result.add(st);
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@ -623,83 +646,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
}
|
||||
|
||||
private void executionUnBindStory(Integer storyId, List<Integer> execList) {
|
||||
// if(CollectionUtils.isEmpty(execList)){
|
||||
// return;
|
||||
// }else{
|
||||
// List<ZtTask> list = this.taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, storyId)
|
||||
// .in(ZtTask::getExecution, execList)
|
||||
// );
|
||||
//
|
||||
// if(!CollectionUtils.isEmpty(list)){
|
||||
// throw new BusinessException("当前迭代已开始任务,无法取消关联 迭代Id:"+list.get(0).getId());
|
||||
// }
|
||||
// }
|
||||
|
||||
projectService.removeExecutionStory(storyId, execList);
|
||||
|
||||
// if(dto.getExecution()!=null&&dto.getExecution()!=0){
|
||||
// //1.没有绑定 解绑
|
||||
// ZtProjectstory execStory = this.projectstoryService.getOne(new QueryWrapper<ZtProjectstory>().lambda().eq(ZtProjectstory::getStory, ztStory.getId())
|
||||
// .ne(ZtProjectstory::getExecution, 0));
|
||||
// //如果没有关联过迭代 去关联 第一次
|
||||
// if(execStory==null){
|
||||
// //如果是产品型需求 加项目 加迭代 如果是项目型产品 加迭代
|
||||
//
|
||||
// if (ztStory.getProduct() != null&&ztStory.getProduct()!=0) {
|
||||
// List<ZtExecutionproject> execlist = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda()
|
||||
// .eq(ZtExecutionproject::getExecution, dto.getExecution()));
|
||||
// if(CollectionUtils.isEmpty(execlist)){
|
||||
// List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>()
|
||||
// .lambda().eq(ZtProjectproduct::getProduct, ztStory.getProduct()));
|
||||
// ZtProjectproduct ztProjectproduct = list.get(0);
|
||||
//
|
||||
//
|
||||
// ZtProjectstory ztProjectstory = new ZtProjectstory();
|
||||
// ztProjectstory.setOrder(1);
|
||||
// ztProjectstory.setStory(ztStory.getId());
|
||||
// ztProjectstory.setProject(ztProjectproduct.getProject());
|
||||
// this.projectstoryService.save(ztProjectstory);
|
||||
// //添加执行
|
||||
// }else{
|
||||
//
|
||||
// ZtProjectstory ztProjectstory = new ZtProjectstory();
|
||||
// ztProjectstory.setOrder(1);
|
||||
// ztProjectstory.setStory(ztStory.getId());
|
||||
// ztProjectstory.setProject(execlist.get(0).getProject());
|
||||
// this.projectstoryService.save(ztProjectstory);
|
||||
// }
|
||||
// }
|
||||
// ZtProjectDTO d=new ZtProjectDTO();
|
||||
// d.setExcludeId(dto.getExecution());
|
||||
// d.setStoryIds(new ArrayList<>(){{add(ztStory.getId());}});
|
||||
// projectService.executionSyncStory(d);
|
||||
// }
|
||||
// else if(dto.getExecution().intValue()==pList.get(0).getExecution().intValue()){
|
||||
// //编辑没动 不用管
|
||||
// }else{
|
||||
//
|
||||
//
|
||||
//
|
||||
// //2.绑定了 切换
|
||||
// //1. 删除projectStory 迭代的 删除看板
|
||||
// projectService.removeExecutionStory(ztStory.getId(),dto.getExecution());
|
||||
// //2. 新增
|
||||
// ZtProjectDTO d=new ZtProjectDTO();
|
||||
// d.setExcludeId(dto.getExecution());
|
||||
// d.setStoryIds(new ArrayList<>(){{add(ztStory.getId());}});
|
||||
// projectService.executionSyncStory(d);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// else{
|
||||
// List<ZtTask> list = this.taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, ztStory.getId()));
|
||||
// if(!CollectionUtils.isEmpty(list)){
|
||||
// throw new BusinessException("当前任务已开始无法更换迭代");
|
||||
// }
|
||||
// //3可能解绑 查询是否以前关联过
|
||||
// projectService.removeExecutionStory(ztStory.getId());
|
||||
// }
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
@ -739,7 +688,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
.in(ZtStory::getProduct,pAuth)
|
||||
.and(o-> o.eq(ZtStory::getAssignedTo, RiskUserThreadLocal.get().getName())
|
||||
.or().eq(ZtStory::getOpenedby, RiskUserThreadLocal.get().getName()))
|
||||
|
||||
.orderByDesc(ZtStory::getId)
|
||||
);
|
||||
List<ZtStoryDTO> storyDTOList = BeanCopyUtil.copyListProperties(sList, ZtStoryDTO::new,new BeanCopyUtilCallBack<ZtStory,ZtStoryDTO>() {
|
||||
@Override
|
||||
@ -762,7 +711,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (userType == UserType.CP) {
|
||||
List<ZtStoryUser> uStory = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().ne(ZtStoryUser::getStatus, "closed")
|
||||
.in(ZtStoryUser::getProduct,pAuth)
|
||||
.eq(ZtStoryUser::getOpenedby, RiskUserThreadLocal.get().getName())
|
||||
.eq(ZtStoryUser::getOpenedby, RiskUserThreadLocal.get().getName()).orderByDesc(ZtStoryUser::getId)
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(uStory)) {
|
||||
List<ZtStoryDTO> storyDTOList1 = BeanCopyUtil.copyListProperties(uStory, ZtStoryDTO::new);
|
||||
@ -973,9 +922,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
kanbanlaneService.changeStatus(execution, id, "story", "ready");
|
||||
}
|
||||
|
||||
//
|
||||
// actionService.addAction(ActionType.XQ, ActionStatus.KS, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
||||
// RiskUserThreadLocal.get().getName(), null, "");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -992,15 +938,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if("developing".equals(ztStory.getStage())){
|
||||
return;
|
||||
}
|
||||
// List<String> stateList = Arrays.asList("wait", "projected");
|
||||
//
|
||||
//
|
||||
// if ("active".equalsIgnoreCase(ztStory.getStatus())) {
|
||||
// if (!stateList.contains(ztStory.getStage())) {
|
||||
// //已经开始
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
ztStory.setStage("developing");
|
||||
ztStory.setStartDate(new Date());
|
||||
@ -1034,50 +971,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
||||
this.storyFeedbackService.feedbackStart(ztStory.getFeedback());
|
||||
}
|
||||
|
||||
|
||||
// List<ZtTask> taskList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, id)
|
||||
// .in(ZtTask::getStatus, Arrays.asList("reviewing", "wait", "doing", "pause"))
|
||||
// .eq(ZtTask::getType, "devel")
|
||||
// );
|
||||
// //任务没有做完 如果任务还没开始
|
||||
// if (!CollectionUtils.isEmpty(taskList)) {
|
||||
// if (Arrays.asList("wait", "projected").contains(ztStory.getStage())) {
|
||||
//
|
||||
// this.taskFinishChangeStatus(id,null);
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
// //developed 研发完毕 testing 测试中 tested测试完毕 released已发布 verified已验收 closed
|
||||
// if (Arrays.asList("developed", "tested", "released", "verified", "closed").contains(ztStory.getStage())) {
|
||||
// return;
|
||||
// }
|
||||
// if ("testing".equals(ztStory.getStage())) {
|
||||
// List<ZtTask> list = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, id)
|
||||
// .in(ZtTask::getStatus, Arrays.asList("wait", "doing", "pause"))
|
||||
// .in(ZtTask::getType, "devel", "test")
|
||||
// );
|
||||
// if (!CollectionUtils.isEmpty(list)) {
|
||||
// return;
|
||||
// } else {
|
||||
// ztStory.setStage("tested");
|
||||
// this.baseMapper.updateById(ztStory);
|
||||
// List<Integer> executionId = this.getExecutionId(ztStory);
|
||||
// for (Integer execution : executionId) {
|
||||
// kanbanlaneService.changeStatus(execution, id, "story", "tested");
|
||||
// }
|
||||
//
|
||||
// actionService.addAction(ActionType.XQ, ActionStatus.CSWC, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
||||
// RiskUserThreadLocal.get().getName(), null, "");
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (Arrays.asList("wait").contains(ztStory.getStage()) && !CollectionUtils.isEmpty(taskList)) {
|
||||
// this.taskFinishChangeStatus(id,null);
|
||||
// return;
|
||||
// }
|
||||
|
||||
ztStory.setDevelopedDate(new Date());
|
||||
ztStory.setStage("developed");
|
||||
if (ztStory.getStartDate() == null) {
|
||||
ztStory.setStartDate(new Date());
|
||||
@ -1146,6 +1040,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztStory.getStartDate() == null) {
|
||||
ztStory.setStartDate(new Date());
|
||||
}
|
||||
if (ztStory.getDevelopedDate() == null) {
|
||||
ztStory.setDevelopedDate(new Date());
|
||||
}
|
||||
ztStory.setEndDate(new Date());
|
||||
this.baseMapper.updateById(ztStory);
|
||||
|
||||
@ -1335,32 +1232,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
return;
|
||||
|
||||
}
|
||||
// if(cancelFlag&&type==TaskType.test){
|
||||
// List<ZtTask> develList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "wait", "doing", "pause"))
|
||||
// .eq(ZtTask::getType, type.getCode()));
|
||||
// if(!CollectionUtils.isEmpty(develList)){
|
||||
// this.startStory(story);
|
||||
// }else{
|
||||
// List<ZtTask> testList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "wait", "doing", "pause"))
|
||||
// .eq(ZtTask::getType, TaskType.test.getCode()));
|
||||
// if(!CollectionUtils.isEmpty(testList)){
|
||||
// testingStory(story);
|
||||
// }else{
|
||||
// List<ZtTask> testedList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "done"))
|
||||
// .eq(ZtTask::getType, TaskType.test.getCode()));
|
||||
// if(!CollectionUtils.isEmpty(testedList)){
|
||||
// testedStory(story,finishBy);
|
||||
// }else{
|
||||
// this.finishStory(story,finishBy);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// return;
|
||||
// }
|
||||
|
||||
if(type==TaskType.test){
|
||||
// 测试
|
||||
@ -1410,52 +1281,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
}
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void taskFinishChangeStatus(Integer story, String finishBy,TaskType type) {
|
||||
// if(story==null||story==0){
|
||||
// return;
|
||||
// }
|
||||
// ZtStory ztStory = this.baseMapper.selectById(story);
|
||||
//
|
||||
// List<ZtTask> taskList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "wait", "doing", "pause"))
|
||||
// .eq(ZtTask::getType, "devel"));
|
||||
// //如果开发有任务 并且状态需要变为开发中
|
||||
// if(!CollectionUtils.isEmpty(taskList)&&Arrays.asList( "wait", "projected", "developing").contains(ztStory.getStage())){
|
||||
// //如果测试已经开始 那么测试进行中
|
||||
// List<ZtTask> testList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "doing", "done"))
|
||||
// .eq(ZtTask::getType, "test"));
|
||||
// if(!CollectionUtils.isEmpty(testList)){
|
||||
// //测试任务已经开始
|
||||
// this.testingStory(story);
|
||||
// }else{
|
||||
// this.startStory(story);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// //如果开发中任务没有了
|
||||
// if(CollectionUtils.isEmpty(taskList)){
|
||||
//
|
||||
// List<ZtTask> testList = taskService.list(new QueryWrapper<ZtTask>().lambda().eq(ZtTask::getStory, story)
|
||||
// .in(ZtTask::getStatus, Arrays.asList( "wait", "doing", "pause","done"))
|
||||
// .eq(ZtTask::getType, "test"));
|
||||
// //如果测试中有任务
|
||||
// Long waitCount = testList.stream().filter(o -> Arrays.asList("wait").contains(o.getStatus())).count();
|
||||
//
|
||||
// if(!CollectionUtils.isEmpty(testList)&&waitCount.intValue()!=testList.size()){
|
||||
// Long doneCount = testList.stream().filter(o -> Arrays.asList("done").contains(o.getStatus())).count();
|
||||
// if(doneCount.intValue()==testList.size()){
|
||||
// testedStory(story,finishBy);
|
||||
// }else{
|
||||
// this.testingStory(story);
|
||||
// }
|
||||
// }else{
|
||||
// //如果开发任务没有了 并且测试还没开始
|
||||
// this.finishStory(story,finishBy);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
@ -1719,14 +1544,17 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
List<String> ids = new ArrayList<>(Arrays.asList(split));
|
||||
qo.setObjIds(ids);
|
||||
// list=this.baseMapper.storyPageListByIds(ids);
|
||||
}
|
||||
if(productId!=null&&productId!=0){
|
||||
qo.setProductIds(Arrays.asList(productId));
|
||||
}else{
|
||||
//自己有权限的 产品集
|
||||
List<Integer> integers = this.projectService.authProductList();
|
||||
List<Integer> pids = this.projectService.authProductList();
|
||||
|
||||
if (!CollectionUtils.isEmpty(integers)) {
|
||||
qo.setProductIds(integers);
|
||||
if (!CollectionUtils.isEmpty(pids)) {
|
||||
qo.setProductIds(pids);
|
||||
}
|
||||
}
|
||||
|
||||
// else{
|
||||
if (UserType.KFZ == loginRiskUser.getUserType() || UserType.CS == loginRiskUser.getUserType()) {
|
||||
|
||||
@ -1959,19 +1787,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
ActionStatus status;
|
||||
if (revieweResult == 1) {
|
||||
status = ActionStatus.YSTG;
|
||||
//如果研发需求验收完毕 那么用户需求也需要变更
|
||||
// if (ztStory.getUserStory() != null && ztStory.getUserStory() != 0) {
|
||||
// List<ZtStory> storyList = this.baseMapper.selectList(new QueryWrapper<ZtStory>().lambda()
|
||||
// .ne(ZtStory::getId, ztStory.getId())
|
||||
// .in(ZtStory::getStage, "wait", "projected", "developing", "developed", "testing", "tested", "released")
|
||||
// .eq(ZtStory::getUserStory, ztStory.getUserStory()));
|
||||
// if (CollectionUtils.isEmpty(storyList)) {
|
||||
// ZtStoryUser ztStoryUser = this.storyUserService.getById(ztStory.getUserStory());
|
||||
//
|
||||
// ztStoryUser.setStatus(UserStoryEnums.YWC.getCode());
|
||||
// this.storyUserService.updateById(ztStoryUser);
|
||||
// }
|
||||
// }
|
||||
ztStory.setStatus("finished");
|
||||
} else {
|
||||
status = ActionStatus.YSBTG;
|
||||
@ -2028,7 +1843,13 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
d.setImplementName(ztProject.getName());
|
||||
}
|
||||
}
|
||||
|
||||
Integer feedback = ztStory.getFeedback();
|
||||
if(feedback!=null&&feedback!=0){
|
||||
ZtStoryFeedback ztStoryFeedback = this.storyFeedbackService.getById(feedback);
|
||||
if(ztStoryFeedback!=null){
|
||||
d.setFeedbackSpec(ztStoryFeedback.getSpec());
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
@ -257,8 +257,12 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
if(CollectionUtils.isEmpty(pIds)&&CollectionUtils.isEmpty(qo.getStoryIds())){
|
||||
return new PageInfo<ZtStoryUserDTO>();
|
||||
}
|
||||
if(qo.getProductId()!=null&&qo.getProductId()!=0){
|
||||
qo.setProductIds(Arrays.asList(qo.getProductId()));
|
||||
}else{
|
||||
qo.setProductIds(pIds);
|
||||
}
|
||||
|
||||
qo.setProductIds(pIds);
|
||||
l = System.currentTimeMillis();
|
||||
Page<ZtStoryUserDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
List<ZtStoryUserDTO> list = this.baseMapper.pageList(qo);
|
||||
@ -348,7 +352,9 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
.eq(ZtStoryUser::getDeleted, "0")
|
||||
|
||||
.orderByDesc(ZtStoryUser::getId);
|
||||
|
||||
eq.select(ZtStoryUser::getId,ZtStoryUser::getTitle,ZtStoryUser::getProduct,
|
||||
ZtStoryUser::getOpenedby,ZtStoryUser::getAssignedto
|
||||
);
|
||||
List<ZtStoryUser> ztStories = this.baseMapper.selectList(eq);
|
||||
if (CollectionUtils.isEmpty(ztStories)) {
|
||||
return new ArrayList<>();
|
||||
@ -387,18 +393,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
actionStatus = ActionStatus.PSBTG;
|
||||
}
|
||||
|
||||
// for (ZtStory s:ztStories) {
|
||||
// ZtUser ztUser = userMap.get(s.getYsUser());
|
||||
// if(ztUser!=null&&!StringUtils.isEmpty(ztUser.getEmail())){
|
||||
// String str="<div style=\"font-family: -apple-system, system-ui; font-size: 14px; color: rgb(0, 0, 0);\">需求编号: {id} 需求名称 : {name} 验收人 : {userName}<br><br></div>";
|
||||
// str=str.replace("{id}",s.getId().toString());
|
||||
// str= str.replace("{name}",s.getTitle());
|
||||
// str= str.replace("{userName}",ztUser.getNickname());
|
||||
// mailTo.add(ztUser.getEmail());
|
||||
// content.append(str);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
if (dto.getRevieweResult() != 1){
|
||||
ZtUser u = this.userService.getByAccount(ztStory.getOpenedby());
|
||||
if (u != null && !StringUtils.isEmpty(u.getEmail())) {
|
||||
@ -411,16 +405,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
b.append("<p style=\"text-indent: 0pt; line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt; font-family: "Microsoft YaHei UI", Tahoma;\"><span style=\"font-family: 等线; font-size: 11pt; line-height: 1.6;\"> 需求编号: </span><span style=\"font-family: 等线; font-size: 14.6667px; line-height: 1.6;\">{storyId}</span></p>");
|
||||
b.append("<p style=\"text-indent: 0pt; line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt; font-family: "Microsoft YaHei UI", Tahoma;\"><span style=\"font-family: 等线; font-size: 11pt; line-height: 1.6;\"> 需求名称: </span><span style=\"font-family: 等线; font-size: 14.6667px; line-height: 1.6;\">{storyName}</span></p>");
|
||||
|
||||
// b.append("<p style=\"line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"><b>你好: {userName}</b></span></p>");
|
||||
// b.append("<p style=\"line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"><b>您的需求评审没有通过,请及时处理:</b></span></p>");
|
||||
// b.append("<p style=\"text-indent: 0pt; line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"><b>需求编号: </b></span><span style=\"font-family: 等线; font-size: 14.6667px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); line-height: 1.6;\"><b>{storyId}</b></span></p>");
|
||||
// b.append("<p style=\"text-indent: 0pt; line-height: 1.38; margin: 0cm 0cm 0.0001pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"><b>需求名称: </b></span><span style=\"font-family: 等线; font-size: 14.6667px; color: rgb(0, 0, 0); line-height: 1.6;\"><b>{storyName}</b></span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"> </span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"> </span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"> </span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"> </span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 1.6;\"> </span></p>");
|
||||
// b.append("<p style=\"text-indent: 11pt; line-height: 1.38; margin: 0cm 0cm 8pt 18pt;\"><span style=\"font-family: 等线; font-size: 11pt; color: rgb(0, 0, 0); line-height: 115%;\">谢谢。</span></p>");
|
||||
String str = b.toString();
|
||||
|
||||
|
||||
@ -467,7 +451,8 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
} else if (dto.getRevieweResult() == 2) {
|
||||
ztStory.setStatus("draft");
|
||||
}
|
||||
ztStory.setYsRemark(dto.getDesc());
|
||||
ztStory.setPri(dto.getPri());
|
||||
// ztStory.setYsRemark(dto.getDesc());
|
||||
ztStory.setPsDate(new Date());
|
||||
this.baseMapper.updateById(ztStory);
|
||||
|
||||
@ -476,20 +461,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
RiskUserThreadLocal.get().getName(), dto.getDesc(), ztStory.getAssignedto());
|
||||
|
||||
|
||||
// if("active".equalsIgnoreCase(ztStory.getStatus())||"closed".equalsIgnoreCase(ztStory.getStatus())){
|
||||
// Integer product = ztStory.getProduct();
|
||||
// if(product!=null&&product!=0){
|
||||
// ZtProduct ztProduct = this.productService.getById(product);
|
||||
// ztProduct.setReviewingStories(ztProduct.getReviewingStories()-1);
|
||||
// if("active".equalsIgnoreCase(ztStory.getStatus())){
|
||||
// ztProduct.setActiveStories(ztProduct.getActiveStories()+1);
|
||||
// }else{
|
||||
// ztProduct.setClosedStories(ztProduct.getClosedStories()+1);
|
||||
// }
|
||||
// this.productService.updateById(ztProduct);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
return null;
|
||||
|
@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.utils.BeanCopyUtil;
|
||||
import com.sa.zentao.utils.DateUtils;
|
||||
import com.sa.zentao.utils.KanBanConstant;
|
||||
import com.sa.zentao.utils.SFunctionColums;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@ -76,6 +77,9 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
@Autowired
|
||||
private IZtBugService bugService;
|
||||
|
||||
@Autowired
|
||||
private IZtTeamService teamService;
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtTaskDTO> taskPageList(ZtProjectQo qo) {
|
||||
@ -162,7 +166,8 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
}
|
||||
|
||||
|
||||
List<ZtTask> closed = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
|
||||
List<ZtTask> taskList = this.baseMapper.selectList(new QueryWrapper<ZtTask>().lambda()
|
||||
.select(SFunctionColums.taskColumes())
|
||||
.in(ZtTask::getProduct, pList)
|
||||
.notIn(ZtTask::getStatus, Arrays.asList("closed","cancel","done") )
|
||||
.and(o->o.eq(ZtTask::getOpenedby, RiskUserThreadLocal.get().getName())
|
||||
@ -171,11 +176,11 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
.orderByDesc(ZtTask::getDeadline)
|
||||
.orderByDesc(ZtTask::getId)
|
||||
);
|
||||
if (CollectionUtils.isEmpty(closed)) {
|
||||
if (CollectionUtils.isEmpty(taskList)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
return BeanCopyUtil.copyListProperties(closed, ZtTaskDTO::new);
|
||||
return BeanCopyUtil.copyListProperties(taskList, ZtTaskDTO::new);
|
||||
}
|
||||
|
||||
|
||||
@ -246,7 +251,13 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
if (ztUser != null) {
|
||||
dto.setClosedbyName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
Integer feedback = ztTask.getFeedback();
|
||||
if(feedback!=null&&feedback!=0){
|
||||
ZtStoryFeedback ztStoryFeedback = this.storyFeedbackService.getById(feedback);
|
||||
if(ztStoryFeedback!=null){
|
||||
dto.setFeedbackSpec(ztStoryFeedback.getSpec());
|
||||
}
|
||||
}
|
||||
ztUser = userMap.get(ztTask.getCanceledby());
|
||||
if (ztUser != null) {
|
||||
dto.setCanceledbyName(ztUser.getNickname());
|
||||
@ -312,22 +323,124 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> taskListByEIdsAndDate(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> eIds) {
|
||||
if(CollectionUtils.isEmpty(eIds)){
|
||||
public List<ZtTask> taskListByEIdsAndDate(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> pids) {
|
||||
if(CollectionUtils.isEmpty(pids)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
if(firstDayOfMonth==null||lastDayOfMonth==null){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<ZtTask> taskList = this.list(new QueryWrapper<ZtTask>().lambda()
|
||||
.and(o->o.between(ZtTask::getDeadline, firstDayOfMonth,lastDayOfMonth)
|
||||
.or()
|
||||
.between(ZtTask::getFinishedDate, firstDayOfMonth,lastDayOfMonth)
|
||||
)
|
||||
.in(ZtTask::getExecution, eIds));
|
||||
.select(SFunctionColums.taskColumes())
|
||||
.in(ZtTask::getProduct, pids).and(f->f
|
||||
.and(o->o.ge(ZtTask::getDeadline,firstDayOfMonth).le(ZtTask::getDeadline,lastDayOfMonth))
|
||||
.or(e->e.ge(ZtTask::getFinishedDate,firstDayOfMonth).le(ZtTask::getFinishedDate,lastDayOfMonth))));
|
||||
|
||||
// return this.baseMapper.taskListByPIdsAndDate(pids,firstDayOfMonth,lastDayOfMonth);
|
||||
return taskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> getDelayTask(List<ZtTask> t) {
|
||||
if(CollectionUtils.isEmpty(t)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List delayList =new ArrayList();
|
||||
for (ZtTask task:t) {
|
||||
//完成延期
|
||||
if(task.getFinishedDate()!=null&&task.getFinishedDate().getTime()> DateUtils.getDayLast(task.getDeadline()).getTime()){
|
||||
delayList.add(task);
|
||||
}else{
|
||||
if(task.getFinishedDate()==null){
|
||||
//直接完成任务等待审核不需要管
|
||||
if(task.getFinishedFlag()==1){
|
||||
//直接完成任务的不管
|
||||
}else{
|
||||
//当前时间大于预计完成时间
|
||||
if ( new Date().getTime()>DateUtils.getDayLast(task.getDeadline()).getTime()){
|
||||
delayList.add(task);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return delayList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> getOnTimeTask(List<ZtTask> t) {
|
||||
if(CollectionUtils.isEmpty(t)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return t.stream().filter(o -> o.getFinishedDate() != null
|
||||
&& o.getFinishedDate().getTime() <= DateUtils.getDayLast(o.getDeadline()).getTime()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> taskListByIds(List<String> ids) {
|
||||
return this.baseMapper.taskListByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> taskListByStoryIds(List<Integer> sIds) {
|
||||
if(CollectionUtils.isEmpty(sIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return this.baseMapper.taskListByStoryIds(sIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> getNormalTaskList(List<ZtTask> tList) {
|
||||
List<ZtTask> result=new ArrayList();
|
||||
|
||||
for (ZtTask t:tList) {
|
||||
if(!"closed".equals(t.getStatus())&&!"cancel".equals(t.getStatus())){
|
||||
result.add(t);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> getDevelAllocation(List<ZtTask> tList) {
|
||||
return getNormalTaskList(tList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> develTaskListByExecutions(Date firstDayOfMonth, Date lastDayOfMonth, List<Integer> eIds) {
|
||||
if(CollectionUtils.isEmpty(eIds)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<ZtTeam> teamList = this.teamService.list(new QueryWrapper<ZtTeam>().lambda().in(ZtTeam::getRoot, eIds).eq(ZtTeam::getType, "execution"));
|
||||
if(CollectionUtils.isEmpty(teamList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(teamList.stream().map(o -> o.getAccount()).collect(Collectors.toList()));
|
||||
List<String> kfzList=new ArrayList<>();
|
||||
for (ZtTeam t:teamList) {
|
||||
ZtUser ztUser = userMap.get(t.getAccount());
|
||||
if(ztUser!=null&&ztUser.getUserType()==UserType.KFZ){
|
||||
kfzList.add(ztUser.getAccount());
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isEmpty(kfzList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<ZtTask> taskList = this.list(new QueryWrapper<ZtTask>().lambda()
|
||||
.in(ZtTask::getExecution, eIds)
|
||||
.in(ZtTask::getAssignedTo,kfzList)
|
||||
);
|
||||
return taskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtTask> multipleDepartProjectTeam(Date firstDayOfMonth, Date lastDayOfMonth) {
|
||||
return this.baseMapper.multipleDepartProjectTeam(firstDayOfMonth,lastDayOfMonth);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtTaskDTO> myTaskPageList(ZtProjectQo qo) {
|
||||
@ -339,45 +452,43 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
|
||||
|
||||
//自己有权限的 产品集
|
||||
List<Integer> authList = this.ztProjectService.authList();
|
||||
List<Integer> pids = this.ztProjectService.authProductList();
|
||||
|
||||
if (!CollectionUtils.isEmpty(authList)) {
|
||||
List<ZtProduct> pList = this.productService.list(new QueryWrapper<ZtProduct>().lambda().in(ZtProduct::getProgram, authList));
|
||||
//所有的产品
|
||||
if (!CollectionUtils.isEmpty(pList)) {
|
||||
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().in(ZtProjectproduct::getProduct, pList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
List<ZtExecutionproject> projectList = executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().in(ZtExecutionproject::getProject, list.stream().map(o -> o.getProject()).collect(Collectors.toList())));
|
||||
projectAuthList = projectList.stream().map(o -> o.getExecution()).collect(Collectors.toList());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isEmpty(projectAuthList)) {
|
||||
if (CollectionUtils.isEmpty(pids)) {
|
||||
return new PageInfo<ZtTaskDTO>();
|
||||
}
|
||||
Page<ZtTaskDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
|
||||
|
||||
// if (!StringUtils.isEmpty(qo.getIds())) {
|
||||
// String[] split = qo.getIds().split(",");
|
||||
// qo.setObjIds(new ArrayList<>(Arrays.asList(split)));
|
||||
// }else{
|
||||
// qo.setProjectIds(projectAuthList);
|
||||
// }
|
||||
// if (!StringUtils.isEmpty(qo.getProductName())) {
|
||||
// List<ZtProduct> pList = this.productService.selectProductByName(qo.getProductName());
|
||||
// if (!CollectionUtils.isEmpty(pList)) {
|
||||
// List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>()
|
||||
// .lambda().in(ZtProjectproduct::getProduct, pList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
// if (CollectionUtils.isEmpty(list)) {
|
||||
// return new PageInfo<>();
|
||||
// } else {
|
||||
// qo.setProjectList(list.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!StringUtils.isEmpty(qo.getIds())) {
|
||||
String[] split = qo.getIds().split(",");
|
||||
qo.setObjIds(new ArrayList<>(Arrays.asList(split)));
|
||||
}else{
|
||||
qo.setProjectIds(projectAuthList);
|
||||
}
|
||||
if (!StringUtils.isEmpty(qo.getProductName())) {
|
||||
List<ZtProduct> pList = this.productService.selectProductByName(qo.getProductName());
|
||||
if (!CollectionUtils.isEmpty(pList)) {
|
||||
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>()
|
||||
.lambda().in(ZtProjectproduct::getProduct, pList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return new PageInfo<>();
|
||||
} else {
|
||||
qo.setProjectList(list.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
if(qo.getProductId()!=null&&qo.getProductId()!=0){
|
||||
qo.setProductIds(Arrays.asList(qo.getProductId()));
|
||||
}else{
|
||||
|
||||
qo.setProductIds(pids);
|
||||
}
|
||||
|
||||
|
||||
@ -427,6 +538,10 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
Integer story = ztTask.getStory();
|
||||
if (story != null && story != 0) {
|
||||
ZtStory ztStory = this.storyService.getById(story);
|
||||
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested
|
||||
if(!Arrays.asList("wait","projected","developing","developed","testing","tested").contains(ztStory.getStage())){
|
||||
throw new BusinessException("当前状态无法添加任务");
|
||||
}
|
||||
if(ztStory.getStatus().equals("closed")){
|
||||
throw new BusinessException("已关闭的需求无法拆分任务");
|
||||
}
|
||||
@ -481,6 +596,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
}
|
||||
if(dto.getFinishedFlag()==null||dto.getFinishedFlag()==0){
|
||||
//不完成任务
|
||||
dto.setApplyDate(null);
|
||||
}else{
|
||||
//完成修补数据
|
||||
ztTask.setRealstarted(new Date(ztTask.getApplyDate().getTime()-ztTask.getUseTime()
|
||||
@ -515,6 +631,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
dto.setId(ztTask.getId());
|
||||
dto.setConsumed(ztTask.getUseTime().floatValue());
|
||||
dto.setLeft(ztTask.getUseTime().floatValue());
|
||||
dto.setFinishedDate(dto.getApplyDate());
|
||||
this.startTask(dto);
|
||||
}
|
||||
}
|
||||
@ -650,9 +767,14 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
if (dto.getFinishedFlag() == 0) {
|
||||
ztTask.setStatus("doing");
|
||||
} else {
|
||||
if(ztTask.getFinishedFlag()!=null&&ztTask.getFinishedFlag()==1){
|
||||
ztTask.setFinishedDate(ztTask.getApplyDate());
|
||||
}else{
|
||||
ztTask.setFinishedDate(new Date());
|
||||
}
|
||||
ztTask.setStatus("done");
|
||||
ztTask.setFinishedby(RiskUserThreadLocal.get().getName());
|
||||
ztTask.setFinishedDate(new Date());
|
||||
|
||||
}
|
||||
|
||||
ztTask.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
@ -770,12 +892,14 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
ztTask.setLeft(0f);
|
||||
ztTask.setStatus("done");
|
||||
if(ztTask.getFinishedFlag()!=null&&ztTask.getFinishedFlag()==1){
|
||||
ztTask.setFinishedDate(ztTask.getApplyDate());
|
||||
ztTask.setFinishedby(ztTask.getAssignedTo());
|
||||
}else{
|
||||
ztTask.setFinishedby(RiskUserThreadLocal.get().getName());
|
||||
ztTask.setFinishedDate(new Date());
|
||||
}
|
||||
|
||||
ztTask.setFinishedDate(new Date());
|
||||
|
||||
ztTask.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
ztTask.setLastediteddate(new Date());
|
||||
this.baseMapper.updateById(ztTask);
|
||||
@ -1068,7 +1192,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
||||
if(t.getFinishedFlag()!=null&&t.getFinishedFlag()==1){
|
||||
dto.setConsumed(t.getEstimate());
|
||||
dto.setRealstarted(t.getRealstarted());
|
||||
dto.setFinishedDate(t.getFinishedDate());
|
||||
dto.setFinishedDate(t.getApplyDate());
|
||||
this.finishTask(dto,t.getAssignedTo());
|
||||
}
|
||||
}
|
||||
|
@ -178,16 +178,20 @@ public class DateUtils {
|
||||
}
|
||||
|
||||
public static Date getFirstDayOfMonth(Date d) {
|
||||
if(d==null){
|
||||
return null;
|
||||
synchronized (Object.class){
|
||||
if(d==null){
|
||||
return null;
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(d);
|
||||
calendar.set(5, calendar.getActualMinimum(5));
|
||||
calendar.set(11, 0);
|
||||
calendar.set(12, 0);
|
||||
calendar.set(13, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
calendar.set(Calendar.MILLISECOND,0);
|
||||
return calendar.getTime() ;
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(d);
|
||||
calendar.set(5, calendar.getActualMinimum(5));
|
||||
calendar.set(11, 0);
|
||||
calendar.set(12, 0);
|
||||
calendar.set(13, 0);
|
||||
return calendar.getTime();
|
||||
}
|
||||
|
||||
|
||||
@ -218,7 +222,7 @@ public class DateUtils {
|
||||
calendar2.set(12, 59);
|
||||
calendar2.set(13, 59);
|
||||
calendar2.set(14, 999);
|
||||
return calendar2.getTime();
|
||||
return getDayLast(calendar2.getTime());
|
||||
}
|
||||
|
||||
public static Date getYearStartDate(Date date) {
|
||||
|
47
src/main/java/com/sa/zentao/utils/SFunctionColums.java
Normal file
47
src/main/java/com/sa/zentao/utils/SFunctionColums.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.sa.zentao.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.sa.zentao.entity.ZtStoryFeedback;
|
||||
import com.sa.zentao.entity.ZtTask;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class SFunctionColums {
|
||||
|
||||
public static List<SFunction<ZtTask, ?>> taskColumes(){
|
||||
List<SFunction<ZtTask, ?>> result=new ArrayList<>();
|
||||
result.add(ZtTask::getId);
|
||||
result.add(ZtTask::getAssignedTo);
|
||||
result.add(ZtTask::getProduct);
|
||||
result.add(ZtTask::getName);
|
||||
result.add(ZtTask::getStatus);
|
||||
result.add(ZtTask::getOpenedby);
|
||||
result.add(ZtTask::getOpeneddate);
|
||||
result.add(ZtTask::getFinishedFlag);
|
||||
result.add(ZtTask::getFinishedDate);
|
||||
result.add(ZtTask::getFinishedby);
|
||||
result.add(ZtTask::getApplyDate);
|
||||
result.add(ZtTask::getLeft);
|
||||
result.add(ZtTask::getConsumed);
|
||||
result.add(ZtTask::getEstimate);
|
||||
result.add(ZtTask::getDeadline);
|
||||
result.add(ZtTask::getCloseddate);
|
||||
result.add(ZtTask::getClosedby);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static List<SFunction<ZtStoryFeedback, ?>> feedbackColumes(){
|
||||
List<SFunction<ZtStoryFeedback, ?>> result=new ArrayList<>();
|
||||
result.add(ZtStoryFeedback::getId);
|
||||
result.add(ZtStoryFeedback::getAssignedTo);
|
||||
result.add(ZtStoryFeedback::getProduct);
|
||||
result.add(ZtStoryFeedback::getName);
|
||||
result.add(ZtStoryFeedback::getStatus);
|
||||
result.add(ZtStoryFeedback::getSource);
|
||||
result.add(ZtStoryFeedback::getType);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.sa.zentao.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.sa.zentao.dao.BusinessException;
|
||||
import com.tencentcloudapi.ses.v20201002.models.EmailSender;
|
||||
import lombok.SneakyThrows;
|
||||
@ -27,6 +28,19 @@ public class SendEmail {
|
||||
if(StringUtils.isEmpty(title)){
|
||||
title="运维提醒";
|
||||
}
|
||||
// String host = "smtp.qiye.163.com";
|
||||
// String port = "587";
|
||||
// String username = "sino-employee@sino-assistance.com";
|
||||
// String password = "A112233a";
|
||||
|
||||
// String host = "smtp.qiye.163.com";
|
||||
// String port = "587";
|
||||
// String port = "465";
|
||||
// String username = "itsm@sino-assistance.com";
|
||||
|
||||
// String password = "RMz66q579UfmBmP1";
|
||||
// String password = "GKXL@650";
|
||||
|
||||
String host = "smtp.qiye.163.com";
|
||||
String port = "587";
|
||||
String username = "sino-employee@sino-assistance.com";
|
||||
@ -35,8 +49,9 @@ public class SendEmail {
|
||||
Properties props = new Properties();
|
||||
props.put("mail.smtp.host", host);
|
||||
props.put("mail.smtp.port", port);
|
||||
// props.put("mail.smtp.ssl.enable", "true"); // 启用SSL
|
||||
props.put("mail.smtp.auth", "true");
|
||||
|
||||
props.setProperty("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
|
||||
Session session = Session.getInstance(props, new Authenticator() {
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
@ -63,8 +78,10 @@ public class SendEmail {
|
||||
|
||||
Transport.send(message);
|
||||
} catch (MessagingException e) {
|
||||
log.error("",e);
|
||||
throw new BusinessException("邮件发送失败");
|
||||
} catch (IOException e) {
|
||||
log.error("",e);
|
||||
throw new BusinessException("附件处理失败");
|
||||
}
|
||||
}
|
||||
@ -135,105 +152,21 @@ public class SendEmail {
|
||||
|
||||
System.out.println("邮件发送成功!");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error("",e);
|
||||
throw new BusinessException("邮件发送失败");
|
||||
log.error("{} {}",e, JSON.toJSONString(mails));
|
||||
throw new BusinessException("邮件发送失败 ");
|
||||
}catch (MessagingException e) {
|
||||
log.error("",e);
|
||||
log.error("{} {}",e, JSON.toJSONString(mails));
|
||||
throw new BusinessException("邮件发送失败");
|
||||
}
|
||||
}
|
||||
|
||||
public static void careStaff(String mail, String mail2, String content, String title, List<String> files){
|
||||
|
||||
// 邮件相关信息
|
||||
String host = "smtp.qiye.163.com";
|
||||
String port = "587";
|
||||
// String username = "sino-employee@sino-assistance.com";
|
||||
// String password = "A112233a";
|
||||
String toAddress = mail;
|
||||
|
||||
String username = "qinglin.yin@do-tec.com.cn";
|
||||
String password = "A112233a";
|
||||
|
||||
// 创建Properties对象,设置SMTP服务器相关信息
|
||||
Properties props = new Properties();
|
||||
props.put("mail.smtp.host", host);
|
||||
props.put("mail.smtp.port", port);
|
||||
props.put("mail.smtp.auth", "true");
|
||||
|
||||
// 创建Session对象,并通过用户名和密码进行验证
|
||||
Session session = Session.getInstance(props, new Authenticator() {
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
// 创建MimeMessage对象
|
||||
MimeMessage message = new MimeMessage(session);
|
||||
|
||||
// 设置发件人和收件人地址
|
||||
message.setFrom(new InternetAddress(username));
|
||||
message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
|
||||
message.setRecipients(Message.RecipientType.CC, new InternetAddress[] {new InternetAddress(mail2) }); // 抄送
|
||||
|
||||
// 设置邮件主题
|
||||
message.setSubject(title,"GBK");
|
||||
|
||||
// 构建HTML格式的邮件内容(包含加粗文本)
|
||||
String htmlContent = "<html><body>" + content + "</body></html>";
|
||||
|
||||
|
||||
//正文
|
||||
BodyPart textpart = new MimeBodyPart();
|
||||
StringBuilder contain = new StringBuilder();
|
||||
contain.append(htmlContent);
|
||||
textpart.setContent(contain.toString(),"text/html;charset=utf-8");
|
||||
|
||||
|
||||
// 将正文+附件组装成multipart对象
|
||||
Multipart multipart = new MimeMultipart();
|
||||
//设置文字
|
||||
multipart.addBodyPart(textpart);
|
||||
|
||||
|
||||
if(!CollectionUtils.isEmpty(files)){
|
||||
for (String str:files) {
|
||||
BodyPart bp = new MimeBodyPart();
|
||||
FileDataSource fileds = new FileDataSource(str);
|
||||
bp.setDataHandler(new DataHandler(fileds));
|
||||
bp.setFileName(MimeUtility.encodeWord(fileds.getName(), "GB2312",
|
||||
null));
|
||||
// bp.setFileName(fileds.getName());
|
||||
//设置文件
|
||||
multipart.addBodyPart(bp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//将multipart对象放入邮箱
|
||||
message.setContent(multipart);
|
||||
// 设置邮件内容和格式
|
||||
// message.setContent(new String(htmlContent.getBytes(),"ISO8859-1"), "text/html");
|
||||
|
||||
// 发送邮件
|
||||
Transport.send(message);
|
||||
|
||||
System.out.println("邮件发送成功!");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error("",e);
|
||||
throw new BusinessException("邮件发送失败");
|
||||
}catch (MessagingException e) {
|
||||
log.error("",e);
|
||||
throw new BusinessException("邮件发送失败");
|
||||
}
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public static void main(String[] args) {
|
||||
// String str="4468058@qq.com;294438420@qq.com;";
|
||||
// sendMessage(Arrays.asList(str.split(";")),Arrays.asList(""),"22");
|
||||
|
||||
// sendMail("4468058@qq.com","123");
|
||||
sendMail("4468058@qq.com","123","123");
|
||||
}
|
||||
}
|
@ -22,7 +22,7 @@ spring:
|
||||
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://192.168.1.161:3306/zentao?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://192.168.1.161:3306/zentao_dev?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
||||
username: devgps
|
||||
password: dev@2021GPS
|
||||
# url: jdbc:mysql://192.168.3.200:3306/zentao_dev?useUnicode=true&characterEncoding=UTF8&useSSL=false&serverTimezone=Asia/Shanghai&allowMultiQueries=true&allowPublicKeyRetrieval=true
|
||||
|
@ -23,7 +23,12 @@ spring:
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.example.classroomrealtimefeedback.mapper: debug
|
||||
org.springframework.cloud.gateway: debug
|
||||
org.springframework.http.server.reactive: debug
|
||||
org.springframework.web.reactive: debug
|
||||
reactor.ipc.netty: debug
|
||||
reactor.netty: debug
|
||||
com.sa: debug
|
||||
|
||||
|
||||
mybatis:
|
||||
|
@ -68,63 +68,132 @@
|
||||
</resultMap>
|
||||
<select id="bugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
|
||||
|
||||
SELECT * from zt_bug
|
||||
SELECT b.id,
|
||||
b.project,
|
||||
b.product,
|
||||
b.injection,
|
||||
b.identify,
|
||||
b.branch,
|
||||
b.module,
|
||||
b.execution,
|
||||
b.plan,
|
||||
b.story,
|
||||
b.storyVersion,
|
||||
b.task,
|
||||
b.toTask,
|
||||
b.toStory,
|
||||
b.title,
|
||||
b.keywords,
|
||||
b.severity,
|
||||
b.pri,
|
||||
b.type,
|
||||
b.os,
|
||||
b.browser,
|
||||
b.hardware,
|
||||
b.found,
|
||||
b.`status`,
|
||||
b.subStatus,
|
||||
b.color,
|
||||
b.confirmed,
|
||||
b.activatedCount,
|
||||
b.activatedDate,
|
||||
b.feedbackBy,
|
||||
b.notifyEmail,
|
||||
b.mailto,
|
||||
b.openedBy,
|
||||
b.openedDate,
|
||||
b.assignedTo,
|
||||
b.openedBuild,
|
||||
b.assignedDate,
|
||||
b.deadline,
|
||||
b.resolvedBy,
|
||||
b.resolution,
|
||||
b.resolvedBuild,
|
||||
b.resolvedDate,
|
||||
b.closedBy,
|
||||
b.closedDate,
|
||||
b.duplicateBug,
|
||||
b.linkBug,
|
||||
b.caseId,
|
||||
b.caseVersion,
|
||||
b.feedback,
|
||||
b.result,
|
||||
b.repo,
|
||||
b.mr,
|
||||
b.entry,
|
||||
b.`lines`,
|
||||
b.v1,
|
||||
b.v2,
|
||||
b.repoType,
|
||||
b.testtask,
|
||||
b.issueKey,
|
||||
b.lastEditedBy,
|
||||
b.lastEditedDate,
|
||||
b.deleted,
|
||||
b.file_url,
|
||||
b.bug_type,
|
||||
b.ys_user,
|
||||
b.ys_flag,
|
||||
b.ys_remark,
|
||||
b.release_flag,
|
||||
p.name productName
|
||||
from zt_bug b left join zt_product p on b.product = p.id
|
||||
WHERE 1=1
|
||||
<if test="qo.project != null and qo.project != 0">
|
||||
and project =#{qo.project}
|
||||
and b.project =#{qo.project}
|
||||
</if>
|
||||
<if test="qo.bugType != null and qo.bugType != ''">
|
||||
and bug_type =#{qo.bugType}
|
||||
and b.bug_type =#{qo.bugType}
|
||||
</if>
|
||||
|
||||
<if test="qo.id != null and qo.id != 0">
|
||||
and id = #{qo.id}
|
||||
and b.id = #{qo.id}
|
||||
</if>
|
||||
|
||||
<if test="qo.name != null and qo.name != ''">
|
||||
and title like concat('%', #{qo.name}, '%')
|
||||
and b.title like concat('%', #{qo.name}, '%')
|
||||
</if>
|
||||
<if test="qo.severity != null and qo.severity != ''">
|
||||
and severity = #{qo.severity}
|
||||
and b.severity = #{qo.severity}
|
||||
</if>
|
||||
|
||||
<if test="qo.status != null and qo.status != ''">
|
||||
and status = #{qo.status}
|
||||
and b.status = #{qo.status}
|
||||
</if>
|
||||
|
||||
<if test="qo.pri != null and qo.pri != ''">
|
||||
and pri = #{qo.pri}
|
||||
and b.pri = #{qo.pri}
|
||||
</if>
|
||||
|
||||
<if test="qo.type != null and qo.type != ''">
|
||||
and `type` = #{qo.type}
|
||||
and b.`type` = #{qo.type}
|
||||
</if>
|
||||
<if test="qo.assignedTo != null and qo.assignedTo != ''">
|
||||
and assignedTo = #{qo.assignedTo}
|
||||
and b.assignedTo = #{qo.assignedTo}
|
||||
</if>
|
||||
<if test="qo.startDate !=null">
|
||||
and openedDate <![CDATA[>=]]> #{qo.startDate}
|
||||
and b.openedDate <![CDATA[>=]]> #{qo.startDate}
|
||||
</if>
|
||||
<if test="qo.endDate !=null">
|
||||
and openedDate <![CDATA[<=]]> #{qo.endDate}
|
||||
and b.openedDate <![CDATA[<=]]> #{qo.endDate}
|
||||
</if>
|
||||
<if test="qo.openedby != null and qo.openedby != ''">
|
||||
and openedby = #{qo.openedby}
|
||||
and b.openedby = #{qo.openedby}
|
||||
</if>
|
||||
|
||||
<if test="qo.openStartDate !=null">
|
||||
and openedDate <![CDATA[>=]]> #{qo.openStartDate}
|
||||
and b.openedDate <![CDATA[>=]]> #{qo.openStartDate}
|
||||
</if>
|
||||
<if test="qo.openEndDate !=null">
|
||||
and openedDate <![CDATA[<=]]> #{qo.openEndDate}
|
||||
and b.openedDate <![CDATA[<=]]> #{qo.openEndDate}
|
||||
</if>
|
||||
<if test="qo.execution != null and qo.execution != '' ">
|
||||
and execution =#{qo.execution}
|
||||
and b.execution =#{qo.execution}
|
||||
</if>
|
||||
|
||||
|
||||
<if test="qo.productIds != null and qo.productIds.size() > 0">
|
||||
and product in
|
||||
and b.product in
|
||||
<foreach collection="qo.productIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
@ -133,7 +202,7 @@
|
||||
</if>
|
||||
|
||||
<if test="qo.objIds != null and qo.objIds.size() > 0">
|
||||
and id in
|
||||
and b.id in
|
||||
<foreach collection="qo.objIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
@ -147,38 +216,38 @@
|
||||
</if>
|
||||
<if test="qo.searchVal == 'WGB' ">
|
||||
-- 未关闭
|
||||
and status !='closed'
|
||||
and b.status !='closed'
|
||||
</if>
|
||||
<if test="qo.searchVal == 'YWCJ' ">
|
||||
-- 由我创建
|
||||
and openedBy =#{qo.userName}
|
||||
and b.openedBy =#{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal == 'ZPGW' ">
|
||||
-- 指派给我
|
||||
and assignedTo =#{qo.userName}
|
||||
and b.assignedTo =#{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal == 'YWJJ' ">
|
||||
-- 由我解决
|
||||
and resolvedBy =#{qo.userName}
|
||||
and status= 'resolved'
|
||||
and b.resolvedBy =#{qo.userName}
|
||||
and b.status= 'resolved'
|
||||
</if>
|
||||
<if test="qo.searchVal == 'YWZP' ">
|
||||
-- 由我指派
|
||||
and openedBy =#{qo.userName}
|
||||
and b.openedBy =#{qo.userName}
|
||||
</if>
|
||||
<if test="qo.searchVal == 'WJJ' ">
|
||||
-- //未解决
|
||||
and status= 'active'
|
||||
and b.status= 'active'
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal == 'WQR' ">
|
||||
-- //未确认
|
||||
and confirmed= 0
|
||||
and b.confirmed= 0
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal == 'WZP' ">
|
||||
-- //未指派
|
||||
and assignedTo is null
|
||||
and b.assignedTo is null
|
||||
</if>
|
||||
|
||||
|
||||
@ -226,7 +295,76 @@
|
||||
|
||||
<select id="myBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
|
||||
|
||||
SELECT s.*,pt.name productName from zt_bug s left join zt_product pt on s.product = pt.id
|
||||
SELECT s.id,
|
||||
s.project,
|
||||
s.product,
|
||||
s.injection,
|
||||
s.identify,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.plan,
|
||||
s.story,
|
||||
s.storyVersion,
|
||||
s.task,
|
||||
s.toTask,
|
||||
s.toStory,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.severity,
|
||||
s.pri,
|
||||
s.type,
|
||||
s.os,
|
||||
s.browser,
|
||||
s.hardware,
|
||||
s.found,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.confirmed,
|
||||
s.activatedCount,
|
||||
s.activatedDate,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.mailto,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.openedBuild,
|
||||
s.assignedDate,
|
||||
s.deadline,
|
||||
s.resolvedBy,
|
||||
s.resolution,
|
||||
s.resolvedBuild,
|
||||
s.resolvedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.duplicateBug,
|
||||
s.linkBug,
|
||||
s.caseId,
|
||||
s.caseVersion,
|
||||
s.feedback,
|
||||
s.result,
|
||||
s.repo,
|
||||
s.mr,
|
||||
s.entry,
|
||||
s.`lines`,
|
||||
s.v1,
|
||||
s.v2,
|
||||
s.repoType,
|
||||
s.testtask,
|
||||
s.issueKey,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.deleted,
|
||||
s.file_url,
|
||||
s.bug_type,
|
||||
s.ys_user,
|
||||
s.ys_flag,
|
||||
s.ys_remark,
|
||||
s.release_flag,
|
||||
|
||||
pt.name productName from zt_bug s left join zt_product pt on s.product = pt.id
|
||||
WHERE 1=1
|
||||
|
||||
<if test="qo.id != null and qo.id != 0">
|
||||
@ -359,6 +497,170 @@
|
||||
order by id desc
|
||||
|
||||
</select>
|
||||
<select id="bugListByIds" resultType="com.sa.zentao.entity.ZtBug">
|
||||
SELECT s.id,
|
||||
s.project,
|
||||
s.product,
|
||||
s.injection,
|
||||
s.identify,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.plan,
|
||||
s.story,
|
||||
s.storyVersion,
|
||||
s.task,
|
||||
s.toTask,
|
||||
s.toStory,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.severity,
|
||||
s.pri,
|
||||
s.type,
|
||||
s.os,
|
||||
s.browser,
|
||||
s.hardware,
|
||||
s.found,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.confirmed,
|
||||
s.activatedCount,
|
||||
s.activatedDate,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.mailto,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.openedBuild,
|
||||
s.assignedDate,
|
||||
s.deadline,
|
||||
s.resolvedBy,
|
||||
s.resolution,
|
||||
s.resolvedBuild,
|
||||
s.resolvedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.duplicateBug,
|
||||
s.linkBug,
|
||||
s.caseId,
|
||||
s.caseVersion,
|
||||
s.feedback,
|
||||
s.result,
|
||||
s.repo,
|
||||
s.mr,
|
||||
s.entry,
|
||||
s.`lines`,
|
||||
s.v1,
|
||||
s.v2,
|
||||
s.repoType,
|
||||
s.testtask,
|
||||
s.issueKey,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.deleted,
|
||||
s.file_url,
|
||||
s.bug_type,
|
||||
s.ys_user,
|
||||
s.ys_flag,
|
||||
s.ys_remark,
|
||||
s.release_flag
|
||||
from zt_bug s
|
||||
WHERE 1=1
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and s.id in
|
||||
<foreach collection="ids" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</select>
|
||||
<select id="bugListByProductAndDate" resultType="com.sa.zentao.entity.ZtBug">
|
||||
SELECT s.id,
|
||||
s.project,
|
||||
s.product,
|
||||
s.injection,
|
||||
s.identify,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.plan,
|
||||
s.story,
|
||||
s.storyVersion,
|
||||
s.task,
|
||||
s.toTask,
|
||||
s.toStory,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.severity,
|
||||
s.pri,
|
||||
s.type,
|
||||
s.os,
|
||||
s.browser,
|
||||
s.hardware,
|
||||
s.found,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.confirmed,
|
||||
s.activatedCount,
|
||||
s.activatedDate,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.mailto,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.openedBuild,
|
||||
s.assignedDate,
|
||||
s.deadline,
|
||||
s.resolvedBy,
|
||||
s.resolution,
|
||||
s.resolvedBuild,
|
||||
s.resolvedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.duplicateBug,
|
||||
s.linkBug,
|
||||
s.caseId,
|
||||
s.caseVersion,
|
||||
s.feedback,
|
||||
s.result,
|
||||
s.repo,
|
||||
s.mr,
|
||||
s.entry,
|
||||
s.`lines`,
|
||||
s.v1,
|
||||
s.v2,
|
||||
s.repoType,
|
||||
s.testtask,
|
||||
s.issueKey,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.deleted,
|
||||
s.file_url,
|
||||
s.bug_type,
|
||||
s.ys_user,
|
||||
s.ys_flag,
|
||||
s.ys_remark,
|
||||
s.release_flag
|
||||
from zt_bug s
|
||||
WHERE 1=1
|
||||
<if test="pIds != null and pIds.size() > 0">
|
||||
and s.product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
and openedDate <![CDATA[>=]]> #{start}
|
||||
and openedDate <![CDATA[<=]]> #{end}
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -17,7 +17,21 @@
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtMeetingDTO">
|
||||
|
||||
|
||||
SELECT m.* from zt_meeting m left join zt_product p on p.id = m.product_id
|
||||
SELECT
|
||||
m.id,
|
||||
m.product_id,
|
||||
m.`name`,
|
||||
m.type,
|
||||
m.meeting_date,
|
||||
m.users,
|
||||
m.create_user,
|
||||
m.create_date,
|
||||
m.update_user,
|
||||
m.update_date,
|
||||
m.address,
|
||||
m.title,
|
||||
m.story_ids
|
||||
from zt_meeting m left join zt_product p on p.id = m.product_id
|
||||
|
||||
WHERE 1=1
|
||||
|
||||
|
15
src/main/resources/mapper/ZtMonthScopeMapper.xml
Normal file
15
src/main/resources/mapper/ZtMonthScopeMapper.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sa.zentao.mapper.ZtMonthScoreMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtMonthScore">
|
||||
<result column="id" property="id" />
|
||||
<result column="account" property="account" />
|
||||
<result column="date_str" property="dateStr" />
|
||||
<result column="scope_json" property="scopeJson" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
<result column="update_user" property="updateUser" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
@ -2,38 +2,118 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sa.zentao.mapper.ZtReleaseDetailsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtReleaseDetails">
|
||||
<result column="id" property="id" />
|
||||
<result column="release_id" property="releaseId" />
|
||||
<result column="object_id" property="objectId" />
|
||||
<result column="status" property="status" />
|
||||
<result column="id" property="id"/>
|
||||
<result column="release_id" property="releaseId"/>
|
||||
<result column="object_id" property="objectId"/>
|
||||
<result column="status" property="status"/>
|
||||
</resultMap>
|
||||
<select id="releaseStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files from (zt_story s,zt_projectstory ps,zt_release_details details ) left join zt_storyspec sp on s.id = sp.story
|
||||
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.execution =0
|
||||
left join zt_project pj on pstory.project = pj.id
|
||||
select s.* from (zt_story s,zt_projectstory ps,zt_release_details details ) left
|
||||
join zt_storyspec sp on s.id = sp.story
|
||||
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.execution =0
|
||||
left join zt_project pj on pstory.project = pj.id
|
||||
|
||||
WHERE s.id = ps.story
|
||||
and s.id = details.object_id
|
||||
and details.object_type ='story'
|
||||
and details.release_id = #{qo.id}
|
||||
and details.status != 'closed'
|
||||
WHERE s.id = ps.story
|
||||
and s.id = details.object_id
|
||||
and details.object_type ='story'
|
||||
and details.release_id = #{qo.id}
|
||||
and details.status != 'closed'
|
||||
|
||||
<if test="qo.name != null and qo.name != '' ">
|
||||
and s.title like concat('%', #{qo.name}, '%')
|
||||
</if>
|
||||
|
||||
<if test="qo.ysStatus != null and qo.ysStatus != '' ">
|
||||
and s.stage = #{qo.ysStatus}
|
||||
</if>
|
||||
<if test="qo.ysFlag != null ">
|
||||
and s.ys_flag = #{qo.ysFlag}
|
||||
</if>
|
||||
|
||||
<if test="qo.storyId != null ">
|
||||
and s.id = #{qo.storyId}
|
||||
</if>
|
||||
group by s.id
|
||||
group by s.id
|
||||
|
||||
</select>
|
||||
|
||||
<select id="releaseBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
|
||||
select b.* from (zt_bug b,zt_release_details details )
|
||||
WHERE b.id = details.object_id
|
||||
select
|
||||
b.id,
|
||||
b.project,
|
||||
b.product,
|
||||
b.injection,
|
||||
b.identify,
|
||||
b.branch,
|
||||
b.module,
|
||||
b.execution,
|
||||
b.plan,
|
||||
b.story,
|
||||
b.storyVersion,
|
||||
b.task,
|
||||
b.toTask,
|
||||
b.toStory,
|
||||
b.title,
|
||||
b.keywords,
|
||||
b.severity,
|
||||
b.pri,
|
||||
b.type,
|
||||
b.os,
|
||||
b.browser,
|
||||
b.hardware,
|
||||
b.found,
|
||||
b.`status`,
|
||||
b.subStatus,
|
||||
b.color,
|
||||
b.confirmed,
|
||||
b.activatedCount,
|
||||
b.activatedDate,
|
||||
b.feedbackBy,
|
||||
b.notifyEmail,
|
||||
b.mailto,
|
||||
b.openedBy,
|
||||
b.openedDate,
|
||||
b.assignedTo,
|
||||
b.openedBuild,
|
||||
b.assignedDate,
|
||||
b.deadline,
|
||||
b.resolvedBy,
|
||||
b.resolution,
|
||||
b.resolvedBuild,
|
||||
b.resolvedDate,
|
||||
b.closedBy,
|
||||
b.closedDate,
|
||||
b.duplicateBug,
|
||||
b.linkBug,
|
||||
b.caseId,
|
||||
b.caseVersion,
|
||||
b.feedback,
|
||||
b.result,
|
||||
b.repo,
|
||||
b.mr,
|
||||
b.entry,
|
||||
b.`lines`,
|
||||
b.v1,
|
||||
b.v2,
|
||||
b.repoType,
|
||||
b.testtask,
|
||||
b.issueKey,
|
||||
b.lastEditedBy,
|
||||
b.lastEditedDate,
|
||||
b.deleted,
|
||||
b.file_url,
|
||||
b.bug_type,
|
||||
b.ys_user,
|
||||
b.ys_flag,
|
||||
b.ys_remark,
|
||||
b.release_flag
|
||||
|
||||
|
||||
from (zt_bug b,zt_release_details details )
|
||||
WHERE b.id = details.object_id
|
||||
and details.object_type='bug'
|
||||
and details.release_id = #{qo.id}
|
||||
and details.status != 'closed'
|
||||
@ -49,13 +129,13 @@
|
||||
|
||||
<select id="storyPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_storyspec sp on s.id = sp.story
|
||||
where 1=1
|
||||
and s.status='active'
|
||||
and stage in ('wait','projected','developing','developed','testing','tested')
|
||||
and s.id in
|
||||
select s.* from zt_story s
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_storyspec sp on s.id = sp.story
|
||||
where 1=1
|
||||
and s.status='active'
|
||||
and stage in ('wait','projected','developing','developed','testing','tested')
|
||||
and s.id in
|
||||
<foreach collection="qo.storyList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
@ -72,11 +152,11 @@
|
||||
group by s.id
|
||||
</select>
|
||||
<select id="releaseNotSyncBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
|
||||
SELECT b.* from zt_bug b WHERE 1= 1
|
||||
and b.id not in
|
||||
(select d.object_id from zt_release_details d,zt_release re
|
||||
WHERE d.release_id = re.id and re.project = #{qo.project}
|
||||
and d.object_type = 'bug' and d.`status` != 'closed')
|
||||
SELECT b.* from zt_bug b WHERE 1= 1
|
||||
and b.id not in
|
||||
(select d.object_id from zt_release_details d,zt_release re
|
||||
WHERE d.release_id = re.id and re.project = #{qo.project}
|
||||
and d.object_type = 'bug' and d.`status` != 'closed')
|
||||
and b.project = #{qo.project}
|
||||
<if test="qo.name != null and qo.name != '' ">
|
||||
and b.title like concat('%', #{qo.name}, '%')
|
||||
|
@ -14,7 +14,37 @@
|
||||
<result column="scouce" property="scouce" />
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtStoryFeedbackDTO">
|
||||
SELECT * from zt_story_feedback s WHERE 1 = 1
|
||||
SELECT
|
||||
id,
|
||||
`name`,
|
||||
files,
|
||||
opened_by,
|
||||
opened_date,
|
||||
update_date,
|
||||
update_user,
|
||||
story_id,
|
||||
source,
|
||||
plan_end_date,
|
||||
assigned_to,
|
||||
spec,
|
||||
`status`,
|
||||
finish_date,
|
||||
file_url,
|
||||
`type`,
|
||||
close_remark,
|
||||
product,
|
||||
plan_finish_date,
|
||||
hand_date,
|
||||
close_date,
|
||||
closed_by,
|
||||
open_source,
|
||||
weixin,
|
||||
business_id,
|
||||
ys_flag,
|
||||
dont_hand_select,
|
||||
dont_hand_remark
|
||||
|
||||
from zt_story_feedback s WHERE 1 = 1
|
||||
|
||||
|
||||
<if test="qo.type != null and qo.type != '' ">
|
||||
|
@ -64,9 +64,80 @@
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
|
||||
select
|
||||
|
||||
s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.user_story,
|
||||
s.ys_remark,
|
||||
s.ys_user,
|
||||
s.task_count,
|
||||
s.ys_date
|
||||
from zt_story s
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_storyspec sp on s.id = sp.story
|
||||
where 1=1
|
||||
and product = #{qo.productId}
|
||||
|
||||
@ -212,7 +283,79 @@
|
||||
|
||||
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files,pt.name productName from zt_story s left join zt_storyspec sp on s.id = sp.story
|
||||
select s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.user_story,
|
||||
s.ys_remark,
|
||||
s.ys_user,
|
||||
s.task_count,
|
||||
s.ys_date,
|
||||
|
||||
pt.name productName
|
||||
from zt_story s
|
||||
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
left join zt_projectstory pstory on s.id = pstory.story and pstory.execution =0
|
||||
@ -441,7 +584,78 @@
|
||||
<select id="allStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files from zt_story s left join zt_storyspec sp on s.id = sp.story
|
||||
select s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.user_story,
|
||||
s.ys_remark,
|
||||
s.ys_user,
|
||||
s.task_count,
|
||||
s.ys_date,
|
||||
|
||||
from zt_story s
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
WHERE 1=1
|
||||
|
||||
@ -576,7 +790,79 @@
|
||||
|
||||
</select>
|
||||
<select id="myStoryPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
select s.*,sp.spec ,sp.verify,sp.files ,pt.name productName from zt_story s left join zt_storyspec sp on s.id = sp.story
|
||||
select s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.user_story,
|
||||
s.ys_user,
|
||||
s.task_count,
|
||||
s.ys_date
|
||||
|
||||
,pt.name productName
|
||||
|
||||
from zt_story s
|
||||
left join zt_product pt on s.product = pt.id
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
WHERE 1=1
|
||||
@ -751,7 +1037,77 @@
|
||||
|
||||
</select>
|
||||
<select id="storyPageListByIds" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
select s.*,sp.spec ,sp.verify,sp.files from zt_story s left join zt_storyspec sp on s.id = sp.story
|
||||
select s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.user_story,
|
||||
s.ys_user,
|
||||
s.task_count,
|
||||
s.ys_date,
|
||||
|
||||
from zt_story s
|
||||
left join zt_storyreview v on s.id = v.story and s.version = v.version
|
||||
WHERE 1=1
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
|
@ -70,7 +70,78 @@
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtStoryUserDTO">
|
||||
|
||||
SELECT s.*,pt.name productName from zt_story_user s LEFT JOIN zt_product pt on s.product = pt.id WHERE 1=1
|
||||
SELECT s.id,
|
||||
s.vision,
|
||||
s.parent,
|
||||
s.product,
|
||||
s.project,
|
||||
s.branch,
|
||||
s.module,
|
||||
s.plan,
|
||||
s.source,
|
||||
s.sourceNote,
|
||||
s.fromBug,
|
||||
s.feedback,
|
||||
s.title,
|
||||
s.keywords,
|
||||
s.type,
|
||||
s.category,
|
||||
s.pri,
|
||||
s.estimate,
|
||||
s.`status`,
|
||||
s.subStatus,
|
||||
s.color,
|
||||
s.stage,
|
||||
s.stagedBy,
|
||||
s.mailto,
|
||||
s.lib,
|
||||
s.fromStory,
|
||||
s.fromVersion,
|
||||
s.openedBy,
|
||||
s.openedDate,
|
||||
s.assignedTo,
|
||||
s.assignedDate,
|
||||
s.approvedDate,
|
||||
s.lastEditedBy,
|
||||
s.lastEditedDate,
|
||||
s.changedBy,
|
||||
s.changedDate,
|
||||
s.reviewedBy,
|
||||
s.reviewedDate,
|
||||
s.releasedDate,
|
||||
s.closedBy,
|
||||
s.closedDate,
|
||||
s.closedReason,
|
||||
s.activatedDate,
|
||||
s.toBug,
|
||||
s.childStories,
|
||||
s.linkStories,
|
||||
s.linkRequirements,
|
||||
s.twins,
|
||||
s.duplicateStory,
|
||||
s.version,
|
||||
s.storyChanged,
|
||||
s.feedbackBy,
|
||||
s.notifyEmail,
|
||||
s.BSA,
|
||||
s.duration,
|
||||
s.demand,
|
||||
s.submitedBy,
|
||||
s.roadmap,
|
||||
s.URChanged,
|
||||
s.deleted,
|
||||
s.plan_start_date,
|
||||
s.plan_end_date,
|
||||
s.start_date,
|
||||
s.end_date,
|
||||
s.ys_flag,
|
||||
s.file_url,
|
||||
s.ps_date,
|
||||
s.deliver_remark,
|
||||
s.old_status,
|
||||
|
||||
|
||||
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">
|
||||
and s.product in
|
||||
@ -116,7 +187,7 @@
|
||||
and s.id = #{qo.id}
|
||||
</if>
|
||||
<if test="qo.title != null and qo.title != '' ">
|
||||
and s.title = #{qo.title}
|
||||
and s.title like concat('%', #{qo.title}, '%')
|
||||
</if>
|
||||
|
||||
<if test="qo.searchVal == 'YGB' ">
|
||||
|
@ -29,7 +29,32 @@
|
||||
<result column="pri" property="pri" />
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtStoryUserTaskDTO">
|
||||
SELECT s.* from zt_story_user_task s,zt_product p WHERE s.product = p.id
|
||||
SELECT s.id,
|
||||
s.user_story_id,
|
||||
s.type,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.`left`,
|
||||
s.assigned_to,
|
||||
s.need_meeting,
|
||||
s.need_design,
|
||||
s.product,
|
||||
s.`name`,
|
||||
s.estStarted,
|
||||
s.deadline,
|
||||
s.realStarted,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.canceledBy,
|
||||
s.canceledDate,
|
||||
s.closedBy,
|
||||
s.closed_date,
|
||||
s.opened_by,
|
||||
s.opened_date,
|
||||
s.pri,
|
||||
s.last_edited_by,
|
||||
s.last_edited_date,
|
||||
s.`status` from zt_story_user_task s,zt_product p WHERE s.product = p.id
|
||||
<if test="qo.id != null and qo.id != 0">
|
||||
and s.id = #{qo.id}
|
||||
</if>
|
||||
|
@ -59,7 +59,70 @@
|
||||
</resultMap>
|
||||
<select id="taskPageList" resultType="com.sa.zentao.dao.ZtTaskDTO">
|
||||
|
||||
select s.*,pt.name productName from zt_task s left join zt_project project on s.project = project.id
|
||||
select
|
||||
s.reviewing_user,
|
||||
s.deadline_time,
|
||||
s.product,
|
||||
s.finished_flag,
|
||||
s.approval_result,
|
||||
s.use_time,
|
||||
s.apply_date,
|
||||
s.approval_remark,
|
||||
s.files,
|
||||
s.vision,
|
||||
s.deleted,
|
||||
s.v2,
|
||||
s.v1,
|
||||
s.`lines`,
|
||||
s.entry,
|
||||
s.mr,
|
||||
s.`order`,
|
||||
s.repo,
|
||||
s.activatedDate,
|
||||
s.lastEditedDate,
|
||||
s.lastEditedBy,
|
||||
s.closedReason,
|
||||
s.realDuration,
|
||||
s.planDuration,
|
||||
s.closedDate,
|
||||
s.closedBy,
|
||||
s.canceledDate,
|
||||
s.canceledBy,
|
||||
s.finishedList,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.realStarted,
|
||||
s.estStarted,
|
||||
s.assignedDate,
|
||||
s.assignedTo,
|
||||
s.openedDate,
|
||||
s.openedBy,
|
||||
s.version,
|
||||
s.mailto,
|
||||
s.color,
|
||||
s.subStatus,
|
||||
s.`status`,
|
||||
s.deadline,
|
||||
s.`left`,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.pri,
|
||||
s.`mode`,
|
||||
s.type,
|
||||
s.`name`,
|
||||
s.fromIssue,
|
||||
s.feedback,
|
||||
s.fromBug,
|
||||
s.designVersion,
|
||||
s.storyVersion,
|
||||
s.story,
|
||||
s.design,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.parent,
|
||||
s.project,
|
||||
s.id,
|
||||
pt.name productName from zt_task s left join zt_project project on s.project = project.id
|
||||
left join zt_product pt on s.product = pt.id
|
||||
where 1= 1
|
||||
|
||||
@ -104,6 +167,14 @@
|
||||
|
||||
</if>
|
||||
|
||||
<if test="qo.productIds != null and qo.productIds.size() > 0">
|
||||
and pt.id in
|
||||
<foreach collection="qo.productIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
|
||||
<if test="qo.objIds != null and qo.objIds.size() > 0">
|
||||
and s.id in
|
||||
@ -264,6 +335,308 @@
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
<select id="taskListByIds" resultType="com.sa.zentao.entity.ZtTask">
|
||||
select
|
||||
s.reviewing_user,
|
||||
s.deadline_time,
|
||||
s.product,
|
||||
s.finished_flag,
|
||||
s.approval_result,
|
||||
s.use_time,
|
||||
s.apply_date,
|
||||
s.approval_remark,
|
||||
s.files,
|
||||
s.vision,
|
||||
s.deleted,
|
||||
s.v2,
|
||||
s.v1,
|
||||
s.`lines`,
|
||||
s.entry,
|
||||
s.mr,
|
||||
s.`order`,
|
||||
s.repo,
|
||||
s.activatedDate,
|
||||
s.lastEditedDate,
|
||||
s.lastEditedBy,
|
||||
s.closedReason,
|
||||
s.realDuration,
|
||||
s.planDuration,
|
||||
s.closedDate,
|
||||
s.closedBy,
|
||||
s.canceledDate,
|
||||
s.canceledBy,
|
||||
s.finishedList,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.realStarted,
|
||||
s.estStarted,
|
||||
s.assignedDate,
|
||||
s.assignedTo,
|
||||
s.openedDate,
|
||||
s.openedBy,
|
||||
s.version,
|
||||
s.mailto,
|
||||
s.color,
|
||||
s.subStatus,
|
||||
s.`status`,
|
||||
s.deadline,
|
||||
s.`left`,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.pri,
|
||||
s.`mode`,
|
||||
s.type,
|
||||
s.`name`,
|
||||
s.fromIssue,
|
||||
s.feedback,
|
||||
s.fromBug,
|
||||
s.designVersion,
|
||||
s.storyVersion,
|
||||
s.story,
|
||||
s.design,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.parent,
|
||||
s.project,
|
||||
s.id
|
||||
from zt_task s
|
||||
where 1= 1
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and s.id in
|
||||
<foreach collection="ids" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</if>
|
||||
</select>
|
||||
<select id="taskListByStoryIds" resultType="com.sa.zentao.entity.ZtTask">
|
||||
select
|
||||
s.reviewing_user,
|
||||
s.deadline_time,
|
||||
s.product,
|
||||
s.finished_flag,
|
||||
s.approval_result,
|
||||
s.use_time,
|
||||
s.apply_date,
|
||||
s.approval_remark,
|
||||
s.files,
|
||||
s.vision,
|
||||
s.deleted,
|
||||
s.v2,
|
||||
s.v1,
|
||||
s.`lines`,
|
||||
s.entry,
|
||||
s.mr,
|
||||
s.`order`,
|
||||
s.repo,
|
||||
s.activatedDate,
|
||||
s.lastEditedDate,
|
||||
s.lastEditedBy,
|
||||
s.closedReason,
|
||||
s.realDuration,
|
||||
s.planDuration,
|
||||
s.closedDate,
|
||||
s.closedBy,
|
||||
s.canceledDate,
|
||||
s.canceledBy,
|
||||
s.finishedList,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.realStarted,
|
||||
s.estStarted,
|
||||
s.assignedDate,
|
||||
s.assignedTo,
|
||||
s.openedDate,
|
||||
s.openedBy,
|
||||
s.version,
|
||||
s.mailto,
|
||||
s.color,
|
||||
s.subStatus,
|
||||
s.`status`,
|
||||
s.deadline,
|
||||
s.`left`,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.pri,
|
||||
s.`mode`,
|
||||
s.type,
|
||||
s.`name`,
|
||||
s.fromIssue,
|
||||
s.feedback,
|
||||
s.fromBug,
|
||||
s.designVersion,
|
||||
s.storyVersion,
|
||||
s.story,
|
||||
s.design,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.parent,
|
||||
s.project,
|
||||
s.id
|
||||
from zt_task s
|
||||
where 1= 1
|
||||
and s.story in
|
||||
<foreach collection="ids" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="multipleDepartProjectTeam" resultType="com.sa.zentao.entity.ZtTask">
|
||||
SELECT s.reviewing_user,
|
||||
s.deadline_time,
|
||||
s.product,
|
||||
s.finished_flag,
|
||||
s.approval_result,
|
||||
s.use_time,
|
||||
s.apply_date,
|
||||
s.approval_remark,
|
||||
s.files,
|
||||
s.vision,
|
||||
s.deleted,
|
||||
s.v2,
|
||||
s.v1,
|
||||
s.`lines`,
|
||||
s.entry,
|
||||
s.mr,
|
||||
s.`order`,
|
||||
s.repo,
|
||||
s.activatedDate,
|
||||
s.lastEditedDate,
|
||||
s.lastEditedBy,
|
||||
s.closedReason,
|
||||
s.realDuration,
|
||||
s.planDuration,
|
||||
s.closedDate,
|
||||
s.closedBy,
|
||||
s.canceledDate,
|
||||
s.canceledBy,
|
||||
s.finishedList,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.realStarted,
|
||||
s.estStarted,
|
||||
s.assignedDate,
|
||||
s.assignedTo,
|
||||
s.openedDate,
|
||||
s.openedBy,
|
||||
s.version,
|
||||
s.mailto,
|
||||
s.color,
|
||||
s.subStatus,
|
||||
s.`status`,
|
||||
s.deadline,
|
||||
s.`left`,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.pri,
|
||||
s.`mode`,
|
||||
s.type,
|
||||
s.`name`,
|
||||
s.fromIssue,
|
||||
s.feedback,
|
||||
s.fromBug,
|
||||
s.designVersion,
|
||||
s.storyVersion,
|
||||
s.story,
|
||||
s.design,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.parent,
|
||||
s.project,
|
||||
s.id
|
||||
from (
|
||||
SELECT p.program,t.* from zt_task t,zt_product p WHERE t.product = p.id
|
||||
and ((t.openedDate >= #{start} and t.openedDate <![CDATA[<=]]> #{end}) or (t.finishedDate <![CDATA[>=]]> #{start} and t.finishedDate <![CDATA[<=]]> #{end} ) )
|
||||
and t.`status` = 'done'
|
||||
|
||||
GROUP BY p.program ,t.assignedTo
|
||||
ORDER BY assignedTo desc
|
||||
) s GROUP BY s.assignedTo
|
||||
|
||||
HAVING count(1) >1
|
||||
|
||||
</select>
|
||||
<select id="taskListByPIdsAndDate" resultType="com.sa.zentao.entity.ZtTask">
|
||||
SELECT s.reviewing_user,
|
||||
s.deadline_time,
|
||||
s.product,
|
||||
s.finished_flag,
|
||||
s.approval_result,
|
||||
s.use_time,
|
||||
s.apply_date,
|
||||
s.approval_remark,
|
||||
s.files,
|
||||
s.vision,
|
||||
s.deleted,
|
||||
s.v2,
|
||||
s.v1,
|
||||
s.`lines`,
|
||||
s.entry,
|
||||
s.mr,
|
||||
s.`order`,
|
||||
s.repo,
|
||||
s.activatedDate,
|
||||
s.lastEditedDate,
|
||||
s.lastEditedBy,
|
||||
s.closedReason,
|
||||
s.realDuration,
|
||||
s.planDuration,
|
||||
s.closedDate,
|
||||
s.closedBy,
|
||||
s.canceledDate,
|
||||
s.canceledBy,
|
||||
s.finishedList,
|
||||
s.finishedDate,
|
||||
s.finishedBy,
|
||||
s.realStarted,
|
||||
s.estStarted,
|
||||
s.assignedDate,
|
||||
s.assignedTo,
|
||||
s.openedDate,
|
||||
s.openedBy,
|
||||
s.version,
|
||||
s.mailto,
|
||||
s.color,
|
||||
s.subStatus,
|
||||
s.`status`,
|
||||
s.deadline,
|
||||
s.`left`,
|
||||
s.consumed,
|
||||
s.estimate,
|
||||
s.pri,
|
||||
s.`mode`,
|
||||
s.type,
|
||||
s.`name`,
|
||||
s.fromIssue,
|
||||
s.feedback,
|
||||
s.fromBug,
|
||||
s.designVersion,
|
||||
s.storyVersion,
|
||||
s.story,
|
||||
s.design,
|
||||
s.module,
|
||||
s.execution,
|
||||
s.parent,
|
||||
s.project,
|
||||
s.id
|
||||
from zt_task s where 1=1
|
||||
and s.product in
|
||||
<foreach collection="pids" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
and (
|
||||
(openedDate >= #{start} and s.openedDate <![CDATA[<=]]> #{end})
|
||||
or
|
||||
( finishedDate >= #{start} and s.finishedDate <![CDATA[<=]]> #{end})
|
||||
)
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user