搜索条件添加

This commit is contained in:
2025-05-13 14:09:46 +08:00
parent 4d0bb07b0b
commit 81cf5bd74e
51 changed files with 1196 additions and 478 deletions

View File

@ -22,7 +22,7 @@ public class CodeGenerator {
//自己的名字
static String Author = "gqb";
public static String tableName = "zt_story_case";
public static String tableName = "zt_bug_bound_user";
/**
* <p>
@ -53,7 +53,7 @@ public class CodeGenerator {
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://192.168.1.161:3306/zentao?useUnicode=true&useSSL=false&characterEncoding=utf8");
dsc.setUrl("jdbc:mysql://192.168.1.161:3306/zentao_dev?useUnicode=true&useSSL=false&characterEncoding=utf8");
// dsc.setSchemaName("public");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
// dsc.setUsername("root");

View File

@ -136,7 +136,7 @@ public class PerformanceDTO implements Serializable {
// private BigDecimal projectScore=BigDecimal.ZERO;
//项目文档
// private BigDecimal projectDocumentScore=BigDecimal.ZERO;
private BigDecimal projectDocumentScore=BigDecimal.ZERO;
// //会议管理
// private BigDecimal meetDocumentScore=BigDecimal.ZERO;

View File

@ -30,11 +30,20 @@ public class ProjectWorkDetailsDTO implements Serializable {
//已验收需求总量
@ExcelProperty(value = "已验收需求总量",index =5)
private BigDecimal ysStoryCount;
//验收通过率
@ExcelProperty(value = "验收通过率",index =6)
@ExcelProperty(value = "检出bug量",index =6)
private BigDecimal findBugCount;
//验收不通过数量
@ExcelProperty(value = "检出bug率",index =7)
private BigDecimal findBugRate;
//验收通过率
@ExcelProperty(value = "验收通过率",index =8)
private BigDecimal ysYesRate;
//验收不通过数量
@ExcelProperty(value = "验收不通过数量",index =7)
@ExcelProperty(value = "验收不通过数量",index =9)
private BigDecimal ysNoCount;
//验收情况备注
}

View File

@ -44,6 +44,9 @@ public class WorkDetailsDTO implements Serializable {
@ExcelProperty(value = "产出线上Bug ",index =6)
private BigDecimal bugCount;
@ExcelProperty(value = "任务及时完成率 ",index =7)
private BigDecimal finishPunctuality=BigDecimal.ZERO;;
@ExcelIgnore
private UserType userType;
@ExcelIgnore

View File

@ -0,0 +1,35 @@
package com.sa.zentao.dao;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* <p>
*
* </p>
*
* @author gqb
* @since 2025-05-13
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class ZtBugBoundUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private Integer bugId;
/**
* 责任人
*/
private String assignedTo;
}

View File

@ -215,4 +215,6 @@ public class ZtBugDTO implements Serializable {
private String releaseName;
private String feedbackSpec;
//关联责任人list
private List<ZtBugBoundUserDTO> boundList;
}

View File

@ -122,4 +122,5 @@ public class ZtStoryFeedbackDTO implements Serializable {
private String oaName;
private String finishedRemark;
}

View File

@ -203,4 +203,9 @@ public class ZtTaskDTO implements Serializable {
private List<ZtBugDTO> bugList;
private String feedbackSpec;
//问题反馈处理结果
private String feedbackRemark;
private Integer delayFlag=0;
}

View File

@ -70,9 +70,7 @@ public class ZtMeeting implements Serializable {
// private Integer userStory;
private String storyIds;
@TableField(exist = false)
private String result;
@TableField(exist = false)
private String meetingAfter;
}

View File

@ -72,7 +72,8 @@ public class ZtStoryFeedback implements Serializable {
// wait doing finished submitVerified 提交验收 closed reviewing verified 验收 dontHand 无需处理 查询用noVerified 验收不通过)
private String status;
//处理完成描述
private String finishedRemark;
private String fileUrl;

View File

@ -194,5 +194,6 @@ public class ZtTask implements Serializable {
private String approvalRemark;
//问题反馈处理结果
private String feedbackRemark;
}

View File

@ -45,8 +45,8 @@ public enum ActionStatus {
CASESUBREVIEW(52, "caseSubmitreview","需求用例提交至评审"),
CASEPSTG(53, "reviewpassed","评审通过"),
CASEPSYDMQ(54, "reviewclarified","评审有待明确"),
CASEPSBTG(55, "reviewrejected","评审不通过"),
CASEPSYDMQ(54, "reviewclarified","测试用例评审有待明确"),
CASEPSBTG(55, "reviewrejected","测试用例评审不通过"),
CASEBJ(4, "caseEdited","编辑需求用例"),
CASEXJ(1, "casePpened","新建用例"),

View File

@ -26,4 +26,8 @@ public interface ZtBugMapper extends BaseMapper<ZtBug> {
List<ZtBug> bugListByIds(@Param("ids")List<String> ids);
List<ZtBug> bugListByProductAndDate(@Param("pIds")List<Integer> pIds, @Param("start")Date start,@Param("end") Date lastDayOfMonth);
List<ZtBug> bugListByProjectAndDate(@Param("pIds")List<Integer> pIds, @Param("start")Date start,@Param("end") Date lastDayOfMonth);
List<ZtBug> bugBoundsListByProjectAndDate(@Param("pIds")List<Integer> pIds,@Param("start") Date firstDayOfMonth, @Param("end")Date lastDayOfMonth,@Param("account") String account);
}

View File

@ -7,6 +7,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;
/**
@ -32,4 +33,8 @@ public interface ZtStoryMapper extends BaseMapper<ZtStory> {
List<ZtStoryDTO> storyPageListByIds(@Param("ids") List<String> ids);
//pids 产品id
List<ZtStory> getStoryListByDatePidsProject(@Param("ids")List<Integer> pids, @Param("project")Integer project
, @Param("start")Date firstDayOfMonth, @Param("end")Date lastDayOfMonth);
}

View File

@ -107,4 +107,6 @@ public class ZtProjectQo extends BaseQo {
private String bugType;
private String account;
//1 延期 2不延期
private Integer delayFlag=0 ;
}

View File

@ -63,4 +63,5 @@ public class ZtReleaseQo extends BaseQo {
//验收结果 1.通过 2不通过
private Integer ysFlag;
//
private String ysUser;
}

View File

@ -53,4 +53,13 @@ public interface IZtBugService extends IService<ZtBug> {
List<ZtBug> getNormalBugList(List<ZtBug> bugList);
List<ZtBug> bugListByProductAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth);
List<ZtBug> bugListByProjectAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth);
List<ZtBug> bugBoundsListByProjectAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth,String account);
List<ZtBug> getDevBugList(List<ZtBug> bugList);
}

View File

@ -43,7 +43,7 @@ public interface IZtStoryFeedbackService extends IService<ZtStoryFeedback> {
void feedbackStart(Integer feedbackId);
void feedbackFinished(Integer feedbackId);
void feedbackFinished(Integer feedbackId,String finishedRemark);
void submitVerified(ZtStoryFeedbackDTO dto);

View File

@ -12,6 +12,7 @@ import com.sa.zentao.enums.TaskType;
import com.sa.zentao.qo.ZtProjectQo;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -97,4 +98,6 @@ public interface IZtStoryService extends IService<ZtStory> {
List<ZtStory> getNormalStory(List<ZtStory> sList);
public Map<Integer, ZtStoryCaseDTO> getStoryCaseMap(List<ZtStoryDTO> list);
List<ZtStory> getStoryListByDatePidsProject(List<Integer> pids, Integer id, Date firstDayOfMonth, Date lastDayOfMonth);
}

View File

@ -27,18 +27,22 @@ import java.util.Map;
public class VxService {
@Value("${vx.corpid}")
private static String corpid;
private String corpid;
@Value("${vx.dkcorpsecret}")
private static String dkcorpsecret;
@Value("${vx.salaryCorpsecretApp}")
private static String salaryCorpsecretApp;
private String salaryCorpsecretApp;
@Value("${vx.agentld}")
private String agentid;
@Autowired
private IZtUserService userService;
// public void sendMessageToVx(String vxId, String text, Date date) {
// Environment bean = SpringUtil.getBean(Environment.class);
//
@ -83,7 +87,6 @@ public class VxService {
if (corpid == null) {
corpid = bean.getProperty("vx.corpid");
dkcorpsecret = bean.getProperty("vx.dkcorpsecret");
salaryCorpsecretApp = bean.getProperty("vx.salaryCorpsecretApp");
}
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpid + "&corpsecret=" + salaryCorpsecretApp;
@ -96,7 +99,7 @@ public class VxService {
Map<String, Object> map = new HashMap<String, Object>();
map.put("touser", vxId);
map.put("agentid", 3010185);
map.put("agentid", agentid);
map.put("safe", 0);
map.put("enable_id_trans", 0);
map.put("enable_duplicate_check", 0);
@ -115,18 +118,17 @@ public class VxService {
public void sendMessageToVx(String account, String text, Date date) {
//
// ZtUser ztUser = this.userService.selectByName(account);
// if(ztUser==null||StringUtils.isEmpty(ztUser.getVx())){
// return;
// }
String vxId = "lisi";//CryptoUtils.aesDecryptForFront(ztUser.getVx(), CryptoUtils.KEY_DES);
ZtUser ztUser = this.userService.selectByName(account);
if(ztUser==null||StringUtils.isEmpty(ztUser.getVx())){
return;
}
String vxId = CryptoUtils.aesDecryptForFront(ztUser.getVx(), CryptoUtils.KEY_DES);
Environment bean = SpringUtil.getBean(Environment.class);
if (corpid == null) {
corpid = bean.getProperty("vx.corpid");
dkcorpsecret = bean.getProperty("vx.dkcorpsecret");
salaryCorpsecretApp = bean.getProperty("vx.salaryCorpsecretApp");
}
String url = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=" + corpid + "&corpsecret=" + salaryCorpsecretApp;
@ -140,7 +142,7 @@ public class VxService {
Map<String, Object> map = new HashMap<String, Object>();
map.put("touser", vxId);
//
map.put("agentid", 1000002);
map.put("agentid", agentid);
// map.put("agentid", 3010185);
map.put("safe", 0);
map.put("enable_id_trans", 0);
@ -149,9 +151,9 @@ public class VxService {
Map<String, Object> texts = new HashMap<String, Object>();
texts.put("content", text);
map.put("text", texts);
log.info("调用微信start==",JSON.toJSONString(map));
log.info("调用微信start=={}",JSON.toJSONString(map));
String s = JSONPost(url, map);
log.info("调用微信end==",s);
log.info("调用微信end=={}",s);
} catch (IOException e) {
e.printStackTrace();
log.error("",e);

View File

@ -497,12 +497,15 @@ public class IZtCountService {
//问题反馈 未受理
result.setFeedbackWslCount(feedbacks.stream().filter(o -> "wait".equals(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
//处理中的 wait doing finished submitVerified 提交验收 closed reviewing verified 验收 dontHand 无需处理
result.setFeedbackClzCount(feedbacks.stream().filter(o -> Arrays.asList("doing", "finished", "submitVerified").contains(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
//处理完的
result.setFeedbackClwCount(feedbacks.stream().filter(o -> Arrays.asList("verified").contains(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
result.setFeedbackClzCount(feedbacks.stream()
.filter(o -> Arrays.asList("doing", "finished")
.contains(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
//处理完的 改完待验收 250512
result.setFeedbackClwCount(feedbacks.stream().filter(o -> Arrays.asList("submitVerified").contains(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
//延期的
result.setFeedbackYqCount(feedbacks.stream().filter(o -> Arrays.asList("doing", "wait").contains(o.getStatus())).filter(o -> o.getPlanFinishDate() != null && o.getPlanFinishDate().getTime() < new Date().getTime()).map(o -> o.getId() + "").collect(Collectors.joining(",")));
result.setFeedbackGbCount(feedbacks.stream().filter(o -> "closed".equals(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
result.setFeedbackGbCount(feedbacks.stream().filter(o -> "closed".equals(o.getStatus())||"verified".equals(o.getStatus())).map(o -> o.getId() + "").collect(Collectors.joining(",")));
return result;
}
@ -547,12 +550,16 @@ public class IZtCountService {
Map<String, ZtUser> userMap = userService.userMapByIds(null);
List<String> list = new ArrayList<>();
String sDate = DateUtils.formatDate(qo.getDate(), "yyyy-MM");
//生成模板
for (int i = 0; i < perList.size(); i++) {
PerformanceDTO performanceDTO = perList.get(i);
ZtUser ztUser = userMap.get(performanceDTO.getAccount());
ZtMonthScore ztMonthScore = this.monthScoreService.getOne(new QueryWrapper<ZtMonthScore>().lambda().eq(ZtMonthScore::getDateStr, sDate).eq(ZtMonthScore::getAccount, performanceDTO.getAccount()));
if(ztMonthScore==null){
continue;
}
performanceDTO=JSON.parseObject(ztMonthScore.getScopeJson(),PerformanceDTO.class);
if (ztUser.getAccount().equals("liyuyan")) {
generatorXMZLExcel(performanceDTO.getUserName(), performanceDTO, qo.getDate());
list.add(performanceDTO.getUserName() + "项目助理考核.xlsx");
@ -591,27 +598,11 @@ public class IZtCountService {
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
// list.add(fileName);
// for (int i = 0; i < perList.size(); i++) {
// PerformanceDTO performanceDTO = perList.get(i);
// ZtUser ztUser = userMap.get(performanceDTO.getAccount());
//
//
// if(ztUser.getUserType()==UserType.CS){
// list.add(performanceDTO.getUserName()+"测试.xlsx");
//
// generatorTestExcel(performanceDTO.getUserName(),performanceDTO,qo.getDate());
// }else if(ztUser.getUserType()==UserType.KFZ){
// list.add(performanceDTO.getUserName()+"开发.xlsx");
// generatorDevlopExcel(performanceDTO.getUserName(),performanceDTO,qo.getDate());
// }
// }
String excelName = DateUtils.formatDate(qo.getDate(), "yyyy-MM-dd") + "绩效" + ".xlsx";
ExcelUtil.mergexcel(list, excelName, dir);
File f = new File(dir + excelName);
InputStream fis = new BufferedInputStream(new FileInputStream(f));
// InputStream fis = new BufferedInputStream(new FileInputStream("D:\\1.bmp"));
@ -775,7 +766,9 @@ public class IZtCountService {
if (CollectionUtils.isEmpty(projectproducts)) {
return new ArrayList<>();
}
List<ZtTask> taskList = this.taskService.taskListByEIdsAndDate(firstDayOfMonth, lastDayOfMonth, productList.stream().map(o->o.getId()).collect(Collectors.toList()));
List<Integer> pids = productList.stream().map(o -> o.getId()).collect(Collectors.toList());
List<ZtTask> taskList = this.taskService.taskListByEIdsAndDate(firstDayOfMonth, lastDayOfMonth,pids);
List<ZtProject> ztProjects = this.projectService.getExecutionsListByProjectAndDate(projectproducts.stream().map(o->o.getProject()).collect(Collectors.toList()), firstDayOfMonth, lastDayOfMonth);
@ -790,6 +783,7 @@ public class IZtCountService {
if (CollectionUtils.isEmpty(accountIds)) {
return new ArrayList<>();
}
Map<String, ZtUser> userMap = this.userService.userMapByIds(accountIds);
//accountIds 成员
List<ZtUser> ztUsers = this.userService.list(new QueryWrapper<ZtUser>().lambda()
@ -808,7 +802,7 @@ public class IZtCountService {
} else if (u.getUserType() == UserType.KFZ) {
result.add(buildKFZScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d));
} else if (u.getUserType() == UserType.CS) {
result.add(buildCScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d));
result.add(buildCScore(userMap,pids,u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d));
} else if (u.getUserType() == UserType.UI) {
result.add(buildUiScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d));
} else if (u.getUserType() == UserType.XMJL || u.getUserType() == UserType.XMGLY || u.getUserType() == UserType.GSGC) {
@ -863,17 +857,16 @@ public class IZtCountService {
* 2. <100%每减少1%扣3分扣完截止。
*
*/
dto.setPunctualityScore(onTimeFinishRate.intValue() == 1 ? BigDecimal.valueOf(25)
: BigDecimal.valueOf(25).subtract((BigDecimal.valueOf(1).subtract(onTimeFinishRate).multiply(BigDecimal.valueOf(100))).multiply(BigDecimal.valueOf(3))).floatValue() <= 0 ? BigDecimal.ZERO :
BigDecimal.valueOf(BigDecimal.valueOf(25).subtract((BigDecimal.valueOf(1).subtract(onTimeFinishRate).multiply(BigDecimal.valueOf(100))).multiply(BigDecimal.valueOf(3))).floatValue())
);
dto.setPunctualityScore(
getKFZPunctualityScore(onTimeFinishRate) );
//bug得分
List<ZtBug> bugList = this.bugService.bugBoundsListByProjectAndDate(null, firstDayOfMonth, lastDayOfMonth, u.getAccount());
List<ZtBug> bugList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().
ge(ZtBug::getOpeneddate, firstDayOfMonth).le(ZtBug::getOpeneddate, lastDayOfMonth)
.eq(ZtBug::getAssignedTo, u.getAccount()));
// List<ZtBug> bugList = this.bugService.list(new QueryWrapper<ZtBug>().lambda().
// ge(ZtBug::getOpeneddate, firstDayOfMonth).le(ZtBug::getOpeneddate, lastDayOfMonth)
// .eq(ZtBug::getAssignedTo, u.getAccount()));
bugList=this.bugService.getNormalBugList(bugList);
//bug密度
int bugSize = bugList.size();
@ -913,6 +906,22 @@ public class IZtCountService {
return dto;
}
private BigDecimal getKFZPunctualityScore(BigDecimal onTimeFinishRate) {
if(BigDecimalUtils.isZero(onTimeFinishRate)){
return BigDecimal.ZERO;
}
int onTimeRate = onTimeFinishRate.multiply(BigDecimal.valueOf(100)).intValue();
if(onTimeRate>=100){
return BigDecimal.valueOf(25);
}else if(onTimeRate>=95){
return BigDecimal.valueOf(20+(100-onTimeRate));
}else{
int scope = (20-(94-onTimeRate)*2);
return scope<0?BigDecimal.ZERO:BigDecimal.valueOf(scope);
}
}
public PerformanceDTO setUserWorkTime(PerformanceDTO dto, Date d, List<ItApproval> approvalList, Date firstDayOfMonth) {
//本月天数
int workDaysInCurrentMonth = DateUtils.getWorkDaysInCurrentMonth(d);
@ -931,10 +940,12 @@ public class IZtCountService {
dto.setTotalTime(totalTime.multiply(BigDecimal.valueOf(0.75)));
//达标工时
dto.setExamineTime(totalTime.subtract(applyTime).multiply(BigDecimal.valueOf(0.75)));
return dto;
}
PerformanceDTO buildCScore(ZtUser u, List<ItApproval> approvalList, Date firstDayOfMonth, Date lastDayOfMonth, List<ZtTask> taskList, Date d) {
PerformanceDTO buildCScore( Map<String, ZtUser> userMap,List<Integer> pids,ZtUser u, List<ItApproval> approvalList, Date firstDayOfMonth, Date lastDayOfMonth, List<ZtTask> taskList, Date d) {
PerformanceDTO dto = new PerformanceDTO();
dto.setUserName(u.getNickname());
@ -976,14 +987,17 @@ public class IZtCountService {
//轻微
long slightBug = allBugList.stream().filter(o -> Arrays.asList(4, 2, 3).contains(o.getSeverity())).count();
long totalBug = seriousBug * 5 + slightBug * 1;
dto.setBugFindRate(BigDecimalUtils.isZero(dto.getExamineTime()) ? BigDecimal.ZERO : BigDecimal.valueOf(totalBug).divide(dto.getExamineTime(), 2, BigDecimal.ROUND_UP));
//缺陷检出率 TODO bug 数量 / 可用工时 250418尹工说的
int bugFindScore = dto.getBugFindRate().multiply(BigDecimal.valueOf(100)).intValue() > 20 ? 30 :
(30 - (20 - BigDecimal.valueOf(totalBug).divide(dto.getExamineTime(), 2, BigDecimal.ROUND_UP).multiply(BigDecimal.valueOf(100)).intValue()) * 2);
// 2025-05-12 尹工说的 测试在指定时间完成 并且指派给他 的开发任务工时
dto.setDevSeriousBug(BigDecimal.valueOf(seriousBug));
dto.setDevSlightBug(BigDecimal.valueOf(slightBug));
//bug检出率
dto.setBugFindScore(BigDecimal.valueOf(bugFindScore < 0 ? 0 : bugFindScore));
dto =getBugFindScore(dto,u,userMap,pids,firstDayOfMonth,lastDayOfMonth,totalBug);
//暂未定义
dto.setSlightBug(BigDecimal.ZERO);
dto.setSeriousBug(BigDecimal.ZERO);
@ -1023,6 +1037,43 @@ public class IZtCountService {
return dto;
}
private PerformanceDTO getBugFindScore(PerformanceDTO dto,ZtUser u, Map<String, ZtUser> userMap,List<Integer> pids, Date firstDayOfMonth, Date lastDayOfMonth,long totalBug) {
List<ZtStory> list = this.storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getProduct, pids)
.eq(ZtStory::getAssignedTo, u.getAccount()).ge(ZtStory::getEndDate, firstDayOfMonth).le(ZtStory::getEndDate, lastDayOfMonth));
if(CollectionUtils.isEmpty(list)){
return dto;
}
List<String> accountIds = userMap.values().stream().filter(o -> o.getUserType() == UserType.KFZ).map(o -> o.getAccount()).collect(Collectors.toList());
if(CollectionUtils.isEmpty(accountIds)){
return dto;
}
List<ZtTask> taskList = this.taskService.list(new QueryWrapper<ZtTask>().lambda()
.eq(ZtTask::getType,"devel")
.in(ZtTask::getAssignedTo,accountIds)
.in(ZtTask::getStory, list.stream().map(o -> o.getId()).collect(Collectors.toList())));
if(CollectionUtils.isEmpty(taskList)){
return dto;
}
//开发总工时
BigDecimal totalTimeWorkHours = floatBatchAdd(taskList.stream().map(o -> o.getEstimate()).collect(Collectors.toList()));
BigDecimal bugRate= BigDecimalUtils.isZero(totalTimeWorkHours)?BigDecimal.ZERO:
BigDecimal.valueOf(totalBug).divide(totalTimeWorkHours,2,BigDecimal.ROUND_UP);
int i = bugRate.multiply(BigDecimal.valueOf(100)).intValue();
dto.setBugFindRate(bugRate);
if(i<=0){
}else if(i>20){
dto.setBugFindScore(BigDecimal.valueOf(30));
}else{
dto.setBugFindScore((30-(20-i)*2)<=0?BigDecimal.ZERO:BigDecimal.valueOf((30-(20-i)*2)));
}
return dto;
}
PerformanceDTO buildUiScore(ZtUser u, List<ItApproval> approvalList, Date firstDayOfMonth, Date lastDayOfMonth, List<ZtTask> taskList, Date d) {
PerformanceDTO dto = new PerformanceDTO();
@ -1133,7 +1184,7 @@ public class IZtCountService {
dto = getMeetScore(u, firstDayOfMonth, lastDayOfMonth, dto);
dto.setDocumentQualityScore(BigDecimal.valueOf(50));
dto.setProjectDocumentScore(BigDecimal.valueOf(50));
return dto;
}
@ -1150,8 +1201,7 @@ public class IZtCountService {
if (CollectionUtils.isEmpty(list)) {
return dto;
}
long weekCount = 1;
list.stream().filter(o -> o.getType() == MeetingTypeEnums.week).count();
long weekCount =list.stream().filter(o -> o.getType() == MeetingTypeEnums.week).count();
dto.setMeetWeek(BigDecimal.valueOf(weekCount));
int weekMeetScore = (int) (weekCount == 0 ? 0 : (weekCount >= 4) ? 4 * 6 : (24 - (4 - weekCount) * 6));
@ -1159,6 +1209,8 @@ public class IZtCountService {
dto.setMeetStory(BigDecimal.valueOf(storyCount));
int storyScore = storyCount > 0 ? 6 : 0;
dto.setMeetScore(BigDecimal.valueOf(storyScore + weekMeetScore));
dto.setDocumentQualityScore(BigDecimal.valueOf(50));
dto.setDocumentQualityProblem(BigDecimal.ZERO);
return dto;
}
@ -1562,13 +1614,64 @@ public class IZtCountService {
return result;
}
List<ZtProject> pList = this.projectService.listByIds(projectproducts.stream().map(o -> o.getProject()).collect(Collectors.toList()));
List<Integer> projectIds = projectproducts.stream().map(o -> o.getProject()).collect(Collectors.toList());
List<ZtProject> pList = this.projectService.listByIds(projectIds);
pList=pList.stream().filter(o->!"1".equals(o.getDeleted())).filter(o->o.getRealEnd()==null||
(o.getRealEnd()!=null&&DateUtils.getDayLast(o.getRealEnd()).getTime()>firstDayOfMonth.getTime())).collect(Collectors.toList());
//完成任务总量 开发
List<ZtTask> taskList =this.taskService.taskListByEIdsAndDate(firstDayOfMonth,lastDayOfMonth,pids);
Map<String, ZtUser> userMap = userService.userMapByIds(null);
List<ZtBug> bugList = this.bugService.bugListByProductAndDate(pids,firstDayOfMonth,lastDayOfMonth);
bugList = bugService.getNormalBugList(bugList);
bugList = bugService.getDevBugList(bugList);
List<ZtProject> ztProjects = this.projectService.getExecutionsListByProjectAndDate(projectproducts.stream().map(o->o.getProject()).collect(Collectors.toList()), firstDayOfMonth, lastDayOfMonth);
if (CollectionUtils.isEmpty(ztProjects)) {
return new ArrayList<>();
}
List<ZtTeam> teams = this.teamService.list(new QueryWrapper<ZtTeam>().lambda().eq(ZtTeam::getType, "execution")
.in(ZtTeam::getRoot, ztProjects.stream().map(o -> o.getId()).collect(Collectors.toList())));
List<String> accountIds = teams.stream().map(o -> o.getAccount()).distinct().collect(Collectors.toList());
if (CollectionUtils.isEmpty(accountIds)) {
return new ArrayList<>();
}
//accountIds 成员
List<ZtUser> ztUsers = this.userService.list(new QueryWrapper<ZtUser>().lambda()
.in(ZtUser::getAccount, accountIds));
List multipleUserList= getmultipleDepartProjectTeam(firstDayOfMonth,lastDayOfMonth);
for (ZtProject p : pList) {
BigDecimal examineTime =BigDecimal.valueOf(0);
for (ZtUser u:ztUsers ) {
List<ItApproval> approvalList = this.taskService.itApprovalByUserName(u.getNickname(), firstDayOfMonth, lastDayOfMonth);
PerformanceDTO performanceDTO = buildKFZScore(u, approvalList, firstDayOfMonth, lastDayOfMonth,
taskList.stream().filter(o->o.getProject().equals(p.getId())).collect(Collectors.toList()), d);
if (u != null && u.getUserType() == UserType.KFZ) {
//如果多项目组 那么 分配任务工时占 总工时的% TODO
if(multipleUserList.contains(u.getAccount())){
examineTime = examineTime.add(performanceDTO.getAllocationTime());
}else{
examineTime = examineTime.add(performanceDTO.getExamineTime());
}
}
}
ProjectWorkDetailsDTO dto = new ProjectWorkDetailsDTO();
result.add(dto);
@ -1582,14 +1685,14 @@ public class IZtCountService {
continue;
}
//项目的需求
List<Integer> storyIds = getStoryIds(project);
// List<Integer> storyIds = getStoryIds(project);
List<ZtStory> storyList = this.storyService.getStoryListByDatePidsProject(pids,p.getId(),firstDayOfMonth,lastDayOfMonth);
// //完成需求总量
List<ZtStory> storyList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getProduct, pids)
.ge(ZtStory::getEndDate, firstDayOfMonth).le(ZtStory::getEndDate, lastDayOfMonth));
// List<ZtStory> storyList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getProduct, pids)
//
// .ge(ZtStory::getEndDate, firstDayOfMonth).le(ZtStory::getEndDate, lastDayOfMonth));
dto.setFinishCount(storyList.size());
// //上线的需求数量
@ -1601,9 +1704,10 @@ public class IZtCountService {
// .filter(o->o.getProject().equals(p.getId()))
// 完成后可能会被关闭
List<ZtTask> done = taskList.stream()
.filter(o->userMap.get(o.getAssignedTo())!=null&&userMap.get(o.getAssignedTo()).getUserType()==UserType.KFZ)
.filter(o->o.getStatus().equals("done")).collect(Collectors.toList());
@ -1636,6 +1740,14 @@ public class IZtCountService {
}
List<ZtStory> noTg = releaseStoryList.stream().filter(o -> o.getStage().equals("verified") && o.getYsFlag().intValue() == 2).collect(Collectors.toList());
dto.setYsNoCount(BigDecimal.valueOf(noTg.size()));
int bugSize = (int)bugList.stream().filter(o->o.getProject().equals(p.getId())).count();
dto.setFindBugCount(BigDecimal.valueOf(bugSize));
if(BigDecimalUtils.isZero(examineTime)){
examineTime=BigDecimal.valueOf(1);
}
dto.setFindBugRate(dto.getFindBugCount().divide(examineTime,3,BigDecimal.ROUND_DOWN));
}
@ -1736,6 +1848,15 @@ public class IZtCountService {
dto.setSaturation(dto.getWorkTime().compareTo(BigDecimal.ZERO) == 0 ? BigDecimal.ZERO : dto.getStoryTotalTime().divide(dto.getHaveTime(), 2, BigDecimal.ROUND_HALF_UP));
dto.setBugCount(BigDecimal.valueOf(prodBugList.stream().filter(o -> u.getAccount().equals(o.getAssignedTo())).count()));
BigDecimal onTime = floatBatchAdd(fTask.stream().filter(o -> o.getFinishedDate() != null && o.getFinishedDate().getTime() <= DateUtils.getDayLast(o.getDeadline()).getTime()).map(o -> o.getEstimate()).collect(Collectors.toList()));
BigDecimal onTimeFinishRate = BigDecimalUtils.isZero(dto.getStoryTotalTime()) ? onTime : onTime.divide(dto.getStoryTotalTime(), 2, BigDecimal.ROUND_UP);
dto.setFinishPunctuality(onTimeFinishRate);
result.add(dto);
}
}
@ -1993,6 +2114,19 @@ public class IZtCountService {
dataMap.put("工作态度和责任感", "5");
dataMap.put("创新贡献", "0");
dataMap.put("质量贡献", "0");
dataMap.put("totalTask", performanceDTO.getTotalTask().toString());
dataMap.put("delayTask", performanceDTO.getDelayTask().toString());
dataMap.put("finishPunctuality", performanceDTO.getFinishPunctuality().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("workTime", performanceDTO.getWorkTime().toString());
dataMap.put("saturation", performanceDTO.getSaturation().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("examineTime", performanceDTO.getExamineTime().toString());
dataMap.put("bugCount", performanceDTO.getBugCount().toString());
dataMap.put("bugDensity", performanceDTO.getBugDensity().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("总分", devlopTotal(
dataMap.get("准时率得分"),
dataMap.get("Bug密度"),
@ -2010,6 +2144,11 @@ public class IZtCountService {
dataMap.put("name", name);
dataMap.put("date", DateUtils.formatDate(d, "yyyy-MM"));
dataMap.put("总分", "100");
dataMap.put("任务总量", performanceDTO.getTotalTask().toString());
dataMap.put("超期数量", performanceDTO.getDelayTask().toString());
dataMap.put("及时完成率", performanceDTO.getFinishPunctuality().toString());
writeXlsx(name, "templates/scope/UI工程师.xlsx", name + "UI工程师.xlsx", dataMap);
InputStream templateFile = null;
// try {
@ -2072,6 +2211,17 @@ public class IZtCountService {
dataMap.put("专业技能提升", "5");
dataMap.put("普通bug",performanceDTO.getSlightBug().toString());
dataMap.put("重大bug", performanceDTO.getSeriousBug().toString());
dataMap.put("线上bug率", performanceDTO.getBugDensity().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("分配工时", performanceDTO.getAllocationTime().toString());
dataMap.put("可用工时", performanceDTO.getExamineTime().toString());
dataMap.put("分配工时占比", performanceDTO.getAllocationTimeManageRate().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("召开周会数量", performanceDTO.getMeetWeek().toString());
dataMap.put("召开需求会议数量", performanceDTO.getMeetStory().toString());
dataMap.put("总分", devlopTotal(
dataMap.get("版本计划完成率"),
dataMap.get("任务管理"),
@ -2315,8 +2465,18 @@ public class IZtCountService {
dataMap.put("name", name);
dataMap.put("date", DateUtils.formatDate(d, "yyyy-MM"));
dataMap.put("项目绩效", performanceDTO.getReleaseScore().toString());
dataMap.put("项目文档", "50");
dataMap.put("项目文档", performanceDTO.getProjectDocumentScore().toString());
dataMap.put("会议管理", performanceDTO.getMeetScore().toString());
dataMap.put("上线需求数量", performanceDTO.getReleaseCount().toString());
dataMap.put("及时验收数量", performanceDTO.getReleaseOnTimeCount().toString());
dataMap.put("及时验收率", performanceDTO.getReleaseOnTimeRate().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("召开周会数量", performanceDTO.getMeetWeek().toString());
dataMap.put("召开需求数量", performanceDTO.getMeetStory().toString());
dataMap.put("总分", devlopTotal(dataMap.get("项目绩效"), dataMap.get("项目文档"), dataMap.get("会议管理")));
writeXlsx(name, "templates/scope/项目助理考核.xlsx", name + "项目助理考核.xlsx", dataMap);
@ -2346,6 +2506,21 @@ public class IZtCountService {
dataMap.put("工作态度", "5");
dataMap.put("质量贡献", "5");
dataMap.put("线上Bug", "20");
dataMap.put("任务总量", performanceDTO.getTotalTask().toString());
dataMap.put("延期数量", performanceDTO.getDelayTask().toString());
dataMap.put("及时完成率", performanceDTO.getFinishPunctuality().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("测试普通bug", performanceDTO.getDevSlightBug().toString());
dataMap.put("测试重大bug", performanceDTO.getDevSeriousBug().toString());
dataMap.put("缺陷检出率", performanceDTO.getBugFindRate().multiply(BigDecimal.valueOf(100)).toString());
dataMap.put("线上普通bug", performanceDTO.getSlightBug().toString());
dataMap.put("线上重大bug", performanceDTO.getSeriousBug().toString());
dataMap.put("总分", devlopTotal(dataMap.get("准时率得分")
, dataMap.get("缺陷检出率"), dataMap.get("测试文档"), dataMap.get("工作态度"), dataMap.get("质量贡献"), dataMap.get("线上Bug"))
);
@ -2382,17 +2557,13 @@ public class IZtCountService {
Date firstDayOfMonth = DateUtils.getFirstDayOfMonth(d);
Date lastDayOfMonth = DateUtils.getLastDayOfMonth(d);
List<Integer> pIds = this.projectService.authProductList();
if (CollectionUtils.isEmpty(pIds)) {
List<Integer> pids = this.projectService.authProductList();
if (CollectionUtils.isEmpty(pids)) {
return result;
}
List<ZtProduct> productList = this.productService.listByIds(pIds);
if (CollectionUtils.isEmpty(productList)) {
return result;
}
List<ZtProjectproduct> projectproducts = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda()
.in(ZtProjectproduct::getProduct, productList.stream().map(o -> o.getId()).collect(Collectors.toList())));
.in(ZtProjectproduct::getProduct, pids));
if (CollectionUtils.isEmpty(projectproducts)) {
return result;
}
@ -2401,12 +2572,14 @@ public class IZtCountService {
if (CollectionUtils.isEmpty(execList)) {
return result;
}
List<ZtTask> taskList = this.taskService.taskListByEIdsAndDate(firstDayOfMonth, lastDayOfMonth, pIds);
List<ZtTask> taskList = this.taskService.taskListByEIdsAndDate(firstDayOfMonth, lastDayOfMonth, pids);
taskList=taskService.getNormalTaskList(taskList);
if (CollectionUtils.isEmpty(taskList)) {
return result;
}
List<ZtProject> ztProjects = this.projectService.listByIds(execList.stream().map(o -> o.getExecution()).collect(Collectors.toList()));
@ -2429,8 +2602,9 @@ public class IZtCountService {
//accountIds 成员
UserType userType = RiskUserThreadLocal.get().getUserType();
List<ItApproval> approvalList = this.taskService.itApprovalByUserName(u.getNickname(), firstDayOfMonth, lastDayOfMonth);
Map<String, ZtUser> userMap = this.userService.userMapByIds(accountIds);
if (name.equals("liyuyan")) {
result = buildXMZLScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
@ -2439,7 +2613,7 @@ public class IZtCountService {
} else if (u.getUserType() == UserType.KFZ) {
result = buildKFZScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
} else if (u.getUserType() == UserType.CS) {
result = buildCScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
result = buildCScore(userMap,pids,u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
} else if (u.getUserType() == UserType.UI) {
result = buildUiScore(u, approvalList, firstDayOfMonth, lastDayOfMonth, taskList, d);
} else if (u.getUserType() == UserType.XMJL || u.getUserType() == UserType.XMGLY || u.getUserType() == UserType.GSGC) {
@ -2447,7 +2621,6 @@ public class IZtCountService {
ZtCountQo ztCountQo = new ZtCountQo();
BeanUtils.copyProperties(qo, ztCountQo);
List<PerformanceDTO> perList = this.newPerformanceCount(ztCountQo);
Map<String, ZtUser> userMap = this.userService.userMapByIds(accountIds);
result = buildTaskManage(result, perList, userMap);
result = buildBugManage(result, ztCountQo, perList, userMap);
@ -2678,8 +2851,7 @@ public class IZtCountService {
}
}
dto.setAllocationTime(allocationTime);
List<ZtBug> devBugList = bugList.stream().filter(o -> o.getBugType().equals("dev")).collect(Collectors.toList());
List<ZtBug> devBugList = this.bugService.getDevBugList(bugList);
int devBugCount = devBugList.size();
dto.setBugCount(BigDecimal.valueOf(devBugCount));
dto.setBugDensity((dto.getAllocationTime() == null || BigDecimalUtils.isZero(dto.getAllocationTime())) ? BigDecimal.ZERO : BigDecimal.valueOf(devBugCount).divide(dto.getAllocationTime(), 3, BigDecimal.ROUND_DOWN));

View File

@ -8,10 +8,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sa.zentao.conf.LoginRiskUser;
import com.sa.zentao.conf.RiskUserThreadLocal;
import com.sa.zentao.dao.BusinessException;
import com.sa.zentao.dao.ZtBugDTO;
import com.sa.zentao.dao.ZtCaseDTO;
import com.sa.zentao.dao.ZtTaskDTO;
import com.sa.zentao.dao.*;
import com.sa.zentao.entity.*;
import com.sa.zentao.enums.ActionStatus;
import com.sa.zentao.enums.ActionType;
@ -90,6 +87,8 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
@Autowired
private IZtReleaseService releaseService;
@Autowired
private IZtBugBoundUserService bugBoundUserService;
@Override
@ -328,6 +327,8 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
if (d.getDeadline() != null) {
d.setDeadline(DateUtils.getDayLast(d.getDeadline()));
}
List<ZtBugBoundUser> boundList = this.bugBoundUserService.listByBugId(d.getId());
d.setBoundList(BeanCopyUtil.copyListProperties(boundList,ZtBugBoundUserDTO::new));
return d;
}
@ -383,6 +384,7 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
ZtProjectproduct projectproduct = this.projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, dto.getProject()));
Integer product = projectproduct.getProduct();
//项目bug
List<ZtBugBoundUser> bountSaveList=new ArrayList<>();
for (ZtBugDTO d:list) {
ZtBug b=new ZtBug();
BeanUtils.copyProperties(d,b);
@ -393,9 +395,17 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
b.setOpeneddate(new Date());
b.setOpenedby(loginRiskUser.getName());
b.setStatus("active");
saveBatch.add(b);
}
this.saveBatch(saveBatch);
for (ZtBug b:saveBatch) {
ZtBugBoundUser ztBugBoundUser = new ZtBugBoundUser();
ztBugBoundUser.setBugId(b.getId());
ztBugBoundUser.setAssignedTo(b.getAssignedTo());
bountSaveList.add(ztBugBoundUser);
}
bugBoundUserService.saveBatch(bountSaveList);
Map<Integer, List<ZtBug>> eMap = saveBatch.stream().filter(o->o.getExecution()!=null&&o.getExecution()!=0).collect(Collectors.groupingBy(ZtBug::getExecution));
for (Integer e:eMap.keySet()) {
@ -571,6 +581,21 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
return this.baseMapper.bugListByProductAndDate(pIds,firstDayOfMonth,lastDayOfMonth);
}
@Override
public List<ZtBug> bugListByProjectAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth) {
return this.baseMapper.bugListByProjectAndDate(pIds,firstDayOfMonth,lastDayOfMonth);
}
@Override
public List<ZtBug> bugBoundsListByProjectAndDate(List<Integer> pIds, Date firstDayOfMonth, Date lastDayOfMonth, String account) {
return this.baseMapper.bugBoundsListByProjectAndDate(pIds,firstDayOfMonth,lastDayOfMonth,account);
}
@Override
public List<ZtBug> getDevBugList(List<ZtBug> bugList) {
return bugList.stream().filter(o->"dev".equals(o.getBugType())||"releaseBug".equals(o.getBugType())).collect(Collectors.toList());
}
@Override
@Transactional
@ -599,6 +624,23 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
}
this.baseMapper.insert(ztBug);
List<ZtBugBoundUser> boundSaveList=new ArrayList<>();
List<ZtBugBoundUserDTO> boundList = dto.getBoundList();
if(!CollectionUtils.isEmpty(boundList)){
for (ZtBugBoundUserDTO ztBugBoundUserDTO:boundList ) {
ZtBugBoundUser bound = new ZtBugBoundUser();
bound.setBugId(ztBug.getId());
bound.setAssignedTo(ztBugBoundUserDTO.getAssignedTo());
boundSaveList.add(bound);
}
}else{
ZtBugBoundUser bound = new ZtBugBoundUser();
bound.setBugId(ztBug.getId());
bound.setAssignedTo(ztBug.getAssignedTo());
boundSaveList.add(bound);
}
this.bugBoundUserService.saveBatch(boundSaveList);
fileService.updateFile(dto.getFiles(),ztBug.getId(), FileTypes.bug);
if(dto.getExecution()!=null&&dto.getExecution()!=0){
kanbanlaneService.addBug(dto.getExecution(), Arrays.asList(ztBug));
@ -628,6 +670,30 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
ztBug.setLastediteddate(new Date());
ztBug.setStatus("active");
this.baseMapper.updateById(ztBug);
//删除老的
this.bugBoundUserService.remove(new QueryWrapper<ZtBugBoundUser>().lambda()
.eq(ZtBugBoundUser::getBugId,ztBug.getId()));
List<ZtBugBoundUser> boundSaveList=new ArrayList<>();
List<ZtBugBoundUserDTO> boundList = dto.getBoundList();
if(!CollectionUtils.isEmpty(boundList)){
for (ZtBugBoundUserDTO ztBugBoundUserDTO:boundList ) {
ZtBugBoundUser bound = new ZtBugBoundUser();
bound.setBugId(ztBug.getId());
bound.setAssignedTo(ztBugBoundUserDTO.getAssignedTo());
boundSaveList.add(bound);
}
}else{
ZtBugBoundUser bound = new ZtBugBoundUser();
bound.setBugId(ztBug.getId());
bound.setAssignedTo(ztBug.getAssignedTo());
boundSaveList.add(bound);
}
this.bugBoundUserService.saveBatch(boundSaveList);
if(dto.getReleaseId()!=null&&dto.getReleaseId()!=0){
this.releaseService.changeRelease(dto.getReleaseId(),ztBug.getId(),"bug");
}else{
@ -744,7 +810,7 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
}
if(ztBug.getFeedback()!=null&&ztBug.getFeedback()!=0){
this.storyFeedbackService.feedbackStart(ztBug.getFeedback());
this.storyFeedbackService.feedbackFinished(ztBug.getFeedback());
this.storyFeedbackService.feedbackFinished(ztBug.getFeedback(),null);
}

View File

@ -267,10 +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());
pfdStr= pfdStr.replace("{result}",StringUtils.isEmpty(ztMeeting.getResult())?" ":ztMeeting.getResult());
pfdStr= pfdStr.replace("{meetingAfter}",StringUtils.isEmpty(ztMeeting.getMeetingAfter())?" ":ztMeeting.getMeetingAfter());
textMap.put("result", StringUtils.isEmpty(ztMeeting.getResult())?" ":ztMeeting.getResult());
textMap.put("meetingAfter", StringUtils.isEmpty(ztMeeting.getMeetingAfter())?" ":ztMeeting.getMeetingAfter());
StringBuilder b=new StringBuilder();
if(!StringUtils.isEmpty(ztMeeting.getUsers())){
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);

View File

@ -3,6 +3,8 @@ package com.sa.zentao.service.impl;
import com.alibaba.fastjson2.JSONObject;
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;
@ -84,6 +86,12 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
@Autowired
private IZtBugService bugService;
@Autowired
private IZtCountService countService;
@Autowired
private IZtEffortService effortService;
List<String> pLis = new ArrayList<>() {{
add("develop");
add("test");
@ -309,6 +317,9 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
ztProject.setRealEnd(dto.getClosedDate());
ztProject.setLastEditedDate(new Date());
ztProject.setStatus("closed");
ztProject.setClosedBy(RiskUserThreadLocal.get().getName());
ztProject.setClosedDate(new Date());
ztProject.setLastEditedBy(RiskUserThreadLocal.get().getName());
this.baseMapper.updateById(ztProject);
ActionType type = null;
@ -376,6 +387,8 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
throw new BusinessException("未查询到");
}
ztProject.setDeleted("1");
ztProject.setCanceledBy(RiskUserThreadLocal.get().getName());
ztProject.setCanceledDate(new Date());
ztProject.setLastEditedBy(RiskUserThreadLocal.get().getName());
ztProject.setLastEditedDate(new Date());
this.baseMapper.updateById(ztProject);
@ -409,9 +422,12 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
if (ztProject == null || !"closed".equalsIgnoreCase(ztProject.getStatus())) {
throw new BusinessException("未查询到");
}
ztProject.setStatus("doing");
ztProject.setLastEditedBy(RiskUserThreadLocal.get().getName());
this.baseMapper.updateById(ztProject);
LambdaUpdateWrapper<ZtProject> updateWrapper = new UpdateWrapper<ZtProject>().lambda().set(ZtProject::getStatus, "doing")
.set(ZtProject::getRealEnd,null)
.set(ZtProject::getLastEditedBy, RiskUserThreadLocal.get().getName())
.set(ZtProject::getLastEditedDate, new Date())
.eq(ZtProject::getId,dto.getId()) ;
this.baseMapper.update(updateWrapper);
ActionType type = null;
String product = null;
Integer project = null;
@ -1211,8 +1227,6 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
);
}
@Autowired
private IZtEffortService effortService;
//按照每月多少天 1-31 每天的工作
@Override
@ -1826,8 +1840,6 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
return new PageInfo< Map<String, Object>>(workBuildResult(firstDayOfMonth,lastDayOfMonth, uList,list,effList,uMap,qo.getNeedWeek()));
}
@Autowired
private IZtCountService countService;
@Override
public PageInfo pageMonthReport(ZtProjectQo qo) {
@ -1943,18 +1955,16 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
BigDecimal onTime=BigDecimal.valueOf(floatBatchAdd(onTimeTask.stream().map(o->o.getEstimate())
.collect(Collectors.toList())));
//准时完成率
BigDecimal onTimeFinishRate = BigDecimalUtils.isZero(finishAllTime) ? finishAllTime : onTime.divide(finishAllTime, 2, BigDecimal.ROUND_HALF_UP);
BigDecimal onTimeFinishRate = BigDecimalUtils.isZero(finishAllTime) ? finishAllTime : onTime.divide(finishAllTime, 2, BigDecimal.ROUND_UP);
d.setTaskFinishOnTimeRate(onTimeFinishRate.multiply(BigDecimal.valueOf(100)) );
}else{
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))));
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_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")
.ge(ZtBug::getOpeneddate, firstDayOfMonth)
.le(ZtBug::getOpeneddate, lastDayOfMonth)
.eq(ZtBug::getAssignedTo, account));
List<ZtBug> bugList = this.bugService.bugBoundsListByProjectAndDate(products.stream().map(o -> o.getId()).collect(Collectors.toList()), firstDayOfMonth, lastDayOfMonth, account);
bugList =bugList.stream().filter(o->o.getBugType().equals("prod")).collect(Collectors.toList());
d.setBugCount(BigDecimal.valueOf(bugList.size()));
result.add(d);

View File

@ -66,6 +66,8 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
@Autowired
private IZtBugService bugService;
@Autowired
private IZtExecutionprojectService executionprojectService;
@Override
@Transactional
@ -500,8 +502,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
return null;
}
@Autowired
private IZtExecutionprojectService executionprojectService;
@Override
public PageInfo<ZtStoryDTO> execStoryPageList(ZtReleaseQo qo) {

View File

@ -50,7 +50,7 @@ public class ZtStoryCaseServiceImpl extends ServiceImpl<ZtStoryCaseMapper, ZtSto
ztStoryCase.setOpenedUser(RiskUserThreadLocal.get().getName());
this.baseMapper.insert(ztStoryCase);
actionService.addAction(ActionType.XQ, ActionStatus.CASEXJ, ztStoryCase.getId(), ztStoryCase.getProduct() + "", null, null,
actionService.addAction(ActionType.XQ, ActionStatus.CASEXJ, ztStoryCase.getStory(), ztStoryCase.getProduct() + "", null, null,
RiskUserThreadLocal.get() == null ? "admin" : RiskUserThreadLocal.get().getName(), "", "");
}
@ -74,7 +74,7 @@ public class ZtStoryCaseServiceImpl extends ServiceImpl<ZtStoryCaseMapper, ZtSto
ztStoryCase.setStatus("reviewing");
ztStoryCase.setUpdateUser(RiskUserThreadLocal.get().getName());
this.baseMapper.updateById(ztStoryCase);
actionService.addAction(ActionType.XQ, ActionStatus.CASEBJ, ztStoryCase.getId(), ztStoryCase.getProduct() + "", null, null,
actionService.addAction(ActionType.XQ, ActionStatus.CASEBJ, ztStoryCase.getStory(), ztStoryCase.getProduct() + "", null, null,
RiskUserThreadLocal.get() == null ? "admin" : RiskUserThreadLocal.get().getName(), "", "");
}
@ -95,12 +95,12 @@ public class ZtStoryCaseServiceImpl extends ServiceImpl<ZtStoryCaseMapper, ZtSto
if(qo.getRevieweResult().equals(1)){
//评审通过
ztStoryCase.setStatus("finished");
actionService.addAction(ActionType.XQ, ActionStatus.CASEPSTG, ztStoryCase.getId(), ztStoryCase.getProduct() + "", null, null,
actionService.addAction(ActionType.XQ, ActionStatus.CASEPSTG, ztStoryCase.getStory(), ztStoryCase.getProduct() + "", null, null,
RiskUserThreadLocal.get() == null ? "admin" : RiskUserThreadLocal.get().getName(), "", "");
}else{
//评审不通过
ztStoryCase.setStatus("refuse");
actionService.addAction(ActionType.XQ, ActionStatus.CASEPSBTG, ztStoryCase.getId(), ztStoryCase.getProduct() + "", null, null,
actionService.addAction(ActionType.XQ, ActionStatus.CASEPSBTG, ztStoryCase.getStory(), ztStoryCase.getProduct() + "", null, null,
RiskUserThreadLocal.get() == null ? "admin" : RiskUserThreadLocal.get().getName(), qo.getDesc(), "");
}
ztStoryCase.setUpdateDate(new Date());
@ -127,7 +127,7 @@ public class ZtStoryCaseServiceImpl extends ServiceImpl<ZtStoryCaseMapper, ZtSto
ztStoryCase.setStatus("reviewing");
this.baseMapper.updateById(ztStoryCase);
actionService.addAction(ActionType.XQ, ActionStatus.CASESUBREVIEW, ztStoryCase.getId(), ztStoryCase.getProduct() + "", null, null,
actionService.addAction(ActionType.XQ, ActionStatus.CASESUBREVIEW, ztStoryCase.getStory(), ztStoryCase.getProduct() + "", null, null,
RiskUserThreadLocal.get() == null ? "admin" : RiskUserThreadLocal.get().getName(), "", "");
}
}

View File

@ -23,6 +23,7 @@ import com.sa.zentao.qo.ZtProjectQo;
import com.sa.zentao.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sa.zentao.utils.BeanCopyUtil;
import com.sa.zentao.utils.SFunctionColums;
import com.sa.zentao.utils.VxMessageUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -373,30 +374,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
private List<ZtStoryFeedback> myPageList(ZtProjectQo qo) {
LambdaQueryWrapper<ZtStoryFeedback> query = new QueryWrapper<ZtStoryFeedback>().lambda();
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
);
query.select(SFunctionColums.feedbackColumes());
if (!org.apache.commons.lang3.StringUtils.isEmpty(qo.getSearchVal())) {
if ("ALL".equals(qo.getSearchVal())) {
}
@ -543,7 +521,7 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
}
@Override
public void feedbackFinished(Integer feedbackId) {
public void feedbackFinished(Integer feedbackId,String finishedRemark) {
if (feedbackId == null || feedbackId == 0) {
throw new BusinessException("请检查问题反馈id");
}
@ -582,6 +560,17 @@ public class ZtStoryFeedbackServiceImpl extends ServiceImpl<ZtStoryFeedbackMappe
}
ztStoryFeedback.setFinishDate(new Date());
ztStoryFeedback.setStatus("finished");
if(!CollectionUtils.isEmpty(feedbackList)){
String buff="";
for (ZtTask t:feedbackList) {
if(!org.apache.commons.lang3.StringUtils.isEmpty(t.getFeedbackRemark())){
buff+=t.getFeedbackRemark()+"</br>";
}
}
ztStoryFeedback.setFinishedRemark(buff);
}
this.baseMapper.updateById(ztStoryFeedback);
//添加action
actionService.addAction(ActionType.WTFK, ActionStatus.CLWC, ztStoryFeedback.getId(), ztStoryFeedback.getProduct() + "", null, null,

View File

@ -832,6 +832,11 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
}
}
@Override
public List<ZtStory> getStoryListByDatePidsProject(List<Integer> pids, Integer id, Date firstDayOfMonth, Date lastDayOfMonth) {
return this.baseMapper.getStoryListByDatePidsProject(pids,id,firstDayOfMonth,lastDayOfMonth);
}
private Map<Integer, List<ZtTask>> getTaskCountMap(List<ZtStoryDTO> list) {
List<ZtTask> tList = this.taskService.list(new QueryWrapper<ZtTask>().lambda()
@ -1133,7 +1138,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
ZtStory ztStory = this.baseMapper.selectById(story);
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback());
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback(),null);
}
if (ztStory == null) {
@ -1196,7 +1201,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
}
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback());
this.storyFeedbackService.feedbackFinished(ztStory.getFeedback(),null);
}

View File

@ -329,6 +329,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
}
List<ZtTask> taskList = this.list(new QueryWrapper<ZtTask>().lambda()
.select(SFunctionColums.taskColumes())
.in(ZtTask::getProduct,pids)
.ge(ZtTask::getFinishedDate, firstDayOfMonth).le(ZtTask::getFinishedDate, lastDayOfMonth));
// return this.baseMapper.taskListByPIdsAndDate(pids,firstDayOfMonth,lastDayOfMonth);
@ -492,7 +493,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
List<String> userIds = list.stream().map(o -> o.getFinishedby()).collect(Collectors.toList());
userIds.addAll(list.stream().map(o -> o.getAssignedTo()).collect(Collectors.toList()));
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
Date d=new Date();
for (ZtTaskDTO task : list) {
ZtUser ztUser = userMap.get(task.getFinishedby());
if (ztUser != null) {
@ -505,6 +506,20 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if (task.getDeadline() != null) {
task.setDeadline(DateUtils.getDayLast(task.getDeadline()));
}
if(task.getFinishedDate()!=null){
if(task.getFinishedDate().getTime()>DateUtils.getDayLast(task.getDeadline()).getTime()){
task.setDelayFlag(1);
}else{
task.setDelayFlag(2);
}
}else{
if(d.getTime()>DateUtils.getDayLast(task.getDeadline()).getTime()){
task.setDelayFlag(1);
}else{
task.setDelayFlag(2);
}
}
}
@ -785,6 +800,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
ztTask.setLastediteddate(new Date());
ztTask.setConsumed(dto.getConsumed());
ztTask.setLeft(dto.getLeft() - dto.getConsumed());
ztTask.setFeedbackRemark(dto.getFeedbackRemark());
if (ztTask.getLeft() < 0) {
ztTask.setLeft(0f);
}
@ -793,7 +809,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if ("doing".equals(ztTask.getStatus())) {
this.storyFeedbackService.feedbackStart(ztTask.getFeedback());
} else {
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback());
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
}
}
@ -907,17 +923,6 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
if (ztTask.getExecution() != null && ztTask.getExecution() != 0) {
if (StringUtils.isEmpty(dto.getTabType())) {
// KanbanQo qo = new KanbanQo();
// qo.setStatusType("developed");
// qo.setTabType("task");
// qo.setId(dto.getId());
// //查
// ZtKanbancell ztKanbanlane = this.kanbanlaneService.getZtKanbanlane("task", "developing", ztTask.getExecution());
//
// qo.setFromId(ztKanbanlane.getColumn());
// //查
// ztKanbanlane = this.kanbanlaneService.getZtKanbanlane("task", "developed", ztTask.getExecution());
// qo.setToId(ztKanbanlane.getColumn());
kanbanlaneService.changeStatus(ztTask.getExecution(), ztTask.getId(), "task", "developed");
} else {
KanbanQo qo = new KanbanQo();
@ -948,7 +953,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
// }
}
if (ztTask.getFeedback() != null && ztTask.getFeedback() != 0) {
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback());
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
}
}

View File

@ -63,13 +63,33 @@ public class SFunctionColums {
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);
result.add(ZtStoryFeedback::getId);
result.add(ZtStoryFeedback::getName);
result.add(ZtStoryFeedback::getOpenedBy);
result.add(ZtStoryFeedback::getFiles);
result.add(ZtStoryFeedback::getOpenedDate);
result.add(ZtStoryFeedback::getSource);
result.add(ZtStoryFeedback::getStatus);
result.add(ZtStoryFeedback::getOpenSource);
result.add(ZtStoryFeedback::getPlanEndDate);
result.add(ZtStoryFeedback::getAssignedTo);
result.add(ZtStoryFeedback::getSpec);
result.add(ZtStoryFeedback::getFinishDate);
result.add(ZtStoryFeedback::getType);
result.add(ZtStoryFeedback::getCloseRemark);
result.add(ZtStoryFeedback::getProduct);
result.add(ZtStoryFeedback::getPlanFinishDate);
result.add(ZtStoryFeedback::getHandDate);
result.add(ZtStoryFeedback::getCloseDate);
result.add(ZtStoryFeedback::getClosedBy);
result.add(ZtStoryFeedback::getApprovalRemark);
result.add(ZtStoryFeedback::getYsFlag);
result.add(ZtStoryFeedback::getDontHandSelect);
result.add(ZtStoryFeedback::getDontHandRemark);
result.add(ZtStoryFeedback::getFinishedRemark);
return result;
}

View File

@ -43,8 +43,14 @@ public class SendEmail {
String host = "smtp.qiye.163.com";
String port = "587";
String username = "sino-employee@sino-assistance.com";
String password = "A112233a";
String username = "itsm@sino-assistance.com";
String password = "GKXL@650";
// String host = "smtp.qiye.163.com";
// String port = "587";
// String username = "sino-employee@sino-assistance.com";
// String password = "A112233a";
Properties props = new Properties();
props.put("mail.smtp.host", host);
@ -57,7 +63,7 @@ public class SendEmail {
return new PasswordAuthentication(username, password);
}
});
session.setDebug(true);
try {
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(username));
@ -91,13 +97,17 @@ public class SendEmail {
// String host = "smtp.qiye.163.com";
// String port = "587";
// String username = "qinglin.yin@do-tec.com.cn";
// String password = "A112233a";
// 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 username = "sino-employee@sino-assistance.com";
String password = "A112233a";
String username = "itsm@sino-assistance.com";
String password = "GKXL@650";
// 创建Properties对象设置SMTP服务器相关信息
Properties props = new Properties();

View File

@ -34,13 +34,24 @@ file:
baseUrl: http://192.168.3.200:8013
meeting: /data/buildzentao/meeting.docx
#vx:
# token: vTniTyOG4csBmAnMr
# encodingAesKey : gCmhw7vKLcZwsDszILPNSEqyjgRKODemkYmRFdfelmk
# receiveid: wwa7cc4743271d6055
# corpid: wwa7cc4743271d6055
# corpsecret: qQNdRmtanymbshPOLgWTgB-TzX9QmNpVCpOx5suJ2xA
# dkCorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs
# salaryCorpsecretApp: ib0GyrjV573QdczASCeB-QmCsp0t_QpjsbnQwKBr-Os
# salaryCorpsecretAppUrl: https://qyapi.weixin.qq.com/cgi-bin/message/send
# dkcorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs
vx:
agentld: 1000059
token: vTniTyOG4csBmAnMr
encodingAesKey : gCmhw7vKLcZwsDszILPNSEqyjgRKODemkYmRFdfelmk
receiveid: wwa7cc4743271d6055
corpid: wwa7cc4743271d6055
corpsecret: qQNdRmtanymbshPOLgWTgB-TzX9QmNpVCpOx5suJ2xA
dkCorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs
salaryCorpsecretApp: ib0GyrjV573QdczASCeB-QmCsp0t_QpjsbnQwKBr-Os
salaryCorpsecretApp: BsgdcmLV5L1jbO7uro9QqdgGQaGItVb_tvfaasAq_3w
salaryCorpsecretAppUrl: https://qyapi.weixin.qq.com/cgi-bin/message/send
dkcorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs

View File

@ -52,15 +52,27 @@ file:
#
#file:
# baseUrl: http://127.0.0.1:8085
vx:
token: DGkygyJELpIY2
encodingAesKey: Pp2D1vttrxVMoTzocD1SukkRe3IYXQjW5nuOjvc2JRE
receiveid: ww0b2dc90421854148
corpid: ww0b2dc90421854148
corpsecret: LRVwfc11K-JQS2nJC8xTPrZLBKmMRZ7nPyGchsVfKF4
# salaryCorpsecretApp: KlE8J0rMS3W8Hprztl_EnCfAonm34mPpS1B6vaOmzBc
salaryCorpsecretApp: biYcz9e1gIJSsAaTgCZXbcO8Vh9YT11JtaFeZPaPmtU
salaryCorpsecretAppUrl: https://qyapi.weixin.qq.com/cgi-bin/message/send
dkcorpsecret: fMf4nGnkpcYMHq0JzEXx-LcyGvgoxX-DbbCjIjaHqZ0
#vx:
# agentld: 1000002
# token: DGkygyJELpIY2
# encodingAesKey: Pp2D1vttrxVMoTzocD1SukkRe3IYXQjW5nuOjvc2JRE
# receiveid: ww0b2dc90421854148
# corpid: ww0b2dc90421854148
# corpsecret: LRVwfc11K-JQS2nJC8xTPrZLBKmMRZ7nPyGchsVfKF4
# salaryCorpsecretApp: biYcz9e1gIJSsAaTgCZXbcO8Vh9YT11JtaFeZPaPmtU
# salaryCorpsecretAppUrl: https://qyapi.weixin.qq.com/cgi-bin/message/send
# dkcorpsecret: biYcz9e1gIJSsAaTgCZXbcO8Vh9YT11JtaFeZPaPmtU #书籍
# dkcorpsecret: biYcz9e1gIJSsAaTgCZXbcO8Vh9YT11JtaFeZPaPmtU #书籍
vx:
agentld: 1000059
token: vTniTyOG4csBmAnMr
encodingAesKey : gCmhw7vKLcZwsDszILPNSEqyjgRKODemkYmRFdfelmk
receiveid: wwa7cc4743271d6055
corpid: wwa7cc4743271d6055
corpsecret: qQNdRmtanymbshPOLgWTgB-TzX9QmNpVCpOx5suJ2xA
dkCorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs
salaryCorpsecretApp: BsgdcmLV5L1jbO7uro9QqdgGQaGItVb_tvfaasAq_3w
salaryCorpsecretAppUrl: https://qyapi.weixin.qq.com/cgi-bin/message/send
dkcorpsecret: 1MWQxoL8QtypfdnKJqdo3pGdZDAmdhqTF_MaWm3rVjs

View File

@ -2,295 +2,295 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sa.zentao.mapper.ZtBugMapper">
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtBug">
<result column="id" property="id" />
<result column="project" property="project" />
<result column="product" property="product" />
<result column="injection" property="injection" />
<result column="identify" property="identify" />
<result column="branch" property="branch" />
<result column="module" property="module" />
<result column="execution" property="execution" />
<result column="plan" property="plan" />
<result column="story" property="story" />
<result column="storyVersion" property="storyversion" />
<result column="task" property="task" />
<result column="toTask" property="totask" />
<result column="toStory" property="tostory" />
<result column="title" property="title" />
<result column="keywords" property="keywords" />
<result column="severity" property="severity" />
<result column="pri" property="pri" />
<result column="type" property="type" />
<result column="os" property="os" />
<result column="browser" property="browser" />
<result column="hardware" property="hardware" />
<result column="found" property="found" />
<result column="steps" property="steps" />
<result column="status" property="status" />
<result column="subStatus" property="substatus" />
<result column="color" property="color" />
<result column="confirmed" property="confirmed" />
<result column="activatedCount" property="activatedcount" />
<result column="activatedDate" property="activateddate" />
<result column="feedbackBy" property="feedbackby" />
<result column="notifyEmail" property="notifyemail" />
<result column="mailto" property="mailto" />
<result column="openedBy" property="openedby" />
<result column="openedDate" property="openeddate" />
<result column="openedBuild" property="openedbuild" />
<result column="assignedTo" property="assignedto" />
<result column="assignedDate" property="assigneddate" />
<result column="deadline" property="deadline" />
<result column="resolvedBy" property="resolvedby" />
<result column="resolution" property="resolution" />
<result column="resolvedBuild" property="resolvedbuild" />
<result column="resolvedDate" property="resolveddate" />
<result column="closedBy" property="closedby" />
<result column="closedDate" property="closeddate" />
<result column="duplicateBug" property="duplicatebug" />
<result column="linkBug" property="linkbug" />
<result column="case" property="caseId" />
<result column="caseVersion" property="caseversion" />
<result column="feedback" property="feedback" />
<result column="result" property="result" />
<result column="repo" property="repo" />
<result column="mr" property="mr" />
<result column="entry" property="entry" />
<result column="lines" property="lines" />
<result column="v1" property="v1" />
<result column="v2" property="v2" />
<result column="repoType" property="repotype" />
<result column="issueKey" property="issuekey" />
<result column="testtask" property="testtask" />
<result column="lastEditedBy" property="lasteditedby" />
<result column="lastEditedDate" property="lastediteddate" />
<result column="deleted" property="deleted" />
<result column="id" property="id"/>
<result column="project" property="project"/>
<result column="product" property="product"/>
<result column="injection" property="injection"/>
<result column="identify" property="identify"/>
<result column="branch" property="branch"/>
<result column="module" property="module"/>
<result column="execution" property="execution"/>
<result column="plan" property="plan"/>
<result column="story" property="story"/>
<result column="storyVersion" property="storyversion"/>
<result column="task" property="task"/>
<result column="toTask" property="totask"/>
<result column="toStory" property="tostory"/>
<result column="title" property="title"/>
<result column="keywords" property="keywords"/>
<result column="severity" property="severity"/>
<result column="pri" property="pri"/>
<result column="type" property="type"/>
<result column="os" property="os"/>
<result column="browser" property="browser"/>
<result column="hardware" property="hardware"/>
<result column="found" property="found"/>
<result column="steps" property="steps"/>
<result column="status" property="status"/>
<result column="subStatus" property="substatus"/>
<result column="color" property="color"/>
<result column="confirmed" property="confirmed"/>
<result column="activatedCount" property="activatedcount"/>
<result column="activatedDate" property="activateddate"/>
<result column="feedbackBy" property="feedbackby"/>
<result column="notifyEmail" property="notifyemail"/>
<result column="mailto" property="mailto"/>
<result column="openedBy" property="openedby"/>
<result column="openedDate" property="openeddate"/>
<result column="openedBuild" property="openedbuild"/>
<result column="assignedTo" property="assignedto"/>
<result column="assignedDate" property="assigneddate"/>
<result column="deadline" property="deadline"/>
<result column="resolvedBy" property="resolvedby"/>
<result column="resolution" property="resolution"/>
<result column="resolvedBuild" property="resolvedbuild"/>
<result column="resolvedDate" property="resolveddate"/>
<result column="closedBy" property="closedby"/>
<result column="closedDate" property="closeddate"/>
<result column="duplicateBug" property="duplicatebug"/>
<result column="linkBug" property="linkbug"/>
<result column="case" property="caseId"/>
<result column="caseVersion" property="caseversion"/>
<result column="feedback" property="feedback"/>
<result column="result" property="result"/>
<result column="repo" property="repo"/>
<result column="mr" property="mr"/>
<result column="entry" property="entry"/>
<result column="lines" property="lines"/>
<result column="v1" property="v1"/>
<result column="v2" property="v2"/>
<result column="repoType" property="repotype"/>
<result column="issueKey" property="issuekey"/>
<result column="testtask" property="testtask"/>
<result column="lastEditedBy" property="lasteditedby"/>
<result column="lastEditedDate" property="lastediteddate"/>
<result column="deleted" property="deleted"/>
</resultMap>
<select id="bugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
<select id="bugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
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 b.project =#{qo.project}
</if>
<if test="qo.bugType != null and qo.bugType != ''">
and b.bug_type =#{qo.bugType}
</if>
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 b.project =#{qo.project}
</if>
<if test="qo.bugType != null and qo.bugType != ''">
and b.bug_type =#{qo.bugType}
</if>
<if test="qo.id != null and qo.id != 0">
and b.id = #{qo.id}
</if>
<if test="qo.id != null and qo.id != 0">
and b.id = #{qo.id}
</if>
<if test="qo.name != null and qo.name != ''">
and b.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.severity != null and qo.severity != ''">
and b.severity = #{qo.severity}
</if>
<if test="qo.name != null and qo.name != ''">
and b.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.severity != null and qo.severity != ''">
and b.severity = #{qo.severity}
</if>
<if test="qo.status != null and qo.status != ''">
and b.status = #{qo.status}
</if>
<if test="qo.status != null and qo.status != ''">
and b.status = #{qo.status}
</if>
<if test="qo.pri != null and qo.pri != ''">
and b.pri = #{qo.pri}
</if>
<if test="qo.pri != null and qo.pri != ''">
and b.pri = #{qo.pri}
</if>
<if test="qo.type != null and qo.type != ''">
and b.`type` = #{qo.type}
</if>
<if test="qo.assignedTo != null and qo.assignedTo != ''">
and b.assignedTo = #{qo.assignedTo}
</if>
<if test="qo.startDate !=null">
and b.openedDate <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and b.openedDate <![CDATA[<=]]> #{qo.endDate}
</if>
<if test="qo.openedby != null and qo.openedby != ''">
and b.openedby = #{qo.openedby}
</if>
<if test="qo.type != null and qo.type != ''">
and b.`type` = #{qo.type}
</if>
<if test="qo.assignedTo != null and qo.assignedTo != ''">
and b.assignedTo = #{qo.assignedTo}
</if>
<if test="qo.startDate !=null">
and b.openedDate <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and b.openedDate <![CDATA[<=]]> #{qo.endDate}
</if>
<if test="qo.openedby != null and qo.openedby != ''">
and b.openedby = #{qo.openedby}
</if>
<if test="qo.openStartDate !=null">
and b.openedDate <![CDATA[>=]]> #{qo.openStartDate}
</if>
<if test="qo.openEndDate !=null">
and b.openedDate <![CDATA[<=]]> #{qo.openEndDate}
</if>
<if test="qo.execution != null and qo.execution != '' ">
and b.execution =#{qo.execution}
</if>
<if test="qo.openStartDate !=null">
and b.openedDate <![CDATA[>=]]> #{qo.openStartDate}
</if>
<if test="qo.openEndDate !=null">
and b.openedDate <![CDATA[<=]]> #{qo.openEndDate}
</if>
<if test="qo.execution != null and qo.execution != '' ">
and b.execution =#{qo.execution}
</if>
<if test="qo.productIds != null and qo.productIds.size() > 0">
and b.product in
<foreach collection="qo.productIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
<if test="qo.productIds != null and qo.productIds.size() > 0">
and b.product in
<foreach collection="qo.productIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</if>
<if test="qo.objIds != null and qo.objIds.size() > 0">
and b.id in
<foreach collection="qo.objIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
<if test="qo.objIds != null and qo.objIds.size() > 0">
and b.id in
<foreach collection="qo.objIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</if>
<if test="qo.searchVal == 'ALL' ">
<if test="qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal == 'WGB' ">
-- 未关闭
and b.status !='closed'
</if>
<if test="qo.searchVal == 'YWCJ' ">
-- 由我创建
and b.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'ZPGW' ">
-- 指派给我
and b.assignedTo =#{qo.userName}
</if>
<if test="qo.searchVal == 'YWJJ' ">
-- 由我解决
and b.resolvedBy =#{qo.userName}
and b.status= 'resolved'
</if>
<if test="qo.searchVal == 'YWZP' ">
-- 由我指派
and b.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'WJJ' ">
-- //未解决
and b.status= 'active'
</if>
</if>
<if test="qo.searchVal == 'WGB' ">
-- 未关闭
and b.status !='closed'
</if>
<if test="qo.searchVal == 'YWCJ' ">
-- 由我创建
and b.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'ZPGW' ">
-- 指派给我
and b.assignedTo =#{qo.userName}
</if>
<if test="qo.searchVal == 'YWJJ' ">
-- 由我解决
and b.resolvedBy =#{qo.userName}
and b.status= 'resolved'
</if>
<if test="qo.searchVal == 'YWZP' ">
-- 由我指派
and b.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'WJJ' ">
-- //未解决
and b.status= 'active'
</if>
<if test="qo.searchVal == 'WQR' ">
-- //未确认
and b.confirmed= 0
</if>
<if test="qo.searchVal == 'WQR' ">
-- //未确认
and b.confirmed= 0
</if>
<if test="qo.searchVal == 'WZP' ">
-- //未指派
and b.assignedTo is null
</if>
<if test="qo.searchVal == 'WZP' ">
-- //未指派
and b.assignedTo is null
</if>
<if test="qo.searchVal == 'JWCL' ">
-- //久未处理
<if test="qo.searchVal == 'JWCL' ">
-- //久未处理
</if>
</if>
<if test="qo.searchVal == 'DGB' ">
-- //待关闭
<if test="qo.searchVal == 'DGB' ">
-- //待关闭
</if>
<if test="qo.searchVal == 'BYQ' ">
-- //被延期
</if>
</if>
<if test="qo.searchVal == 'BYQ' ">
-- //被延期
</if>
<if test="qo.searchVal == 'GQ' ">
-- //过期BUG
</if>
<if test="qo.searchVal == 'GQ' ">
-- //过期BUG
</if>
<if test="qo.searchVal == 'XQBD' ">
-- //研发需求变动
</if>
<if test="qo.searchVal == 'XQBD' ">
-- //研发需求变动
</if>
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by ${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
<when test="qo.orderSort != '' and qo.orderSort != null ">
order by ${qo.orderName} ${qo.orderSort}
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
</when>
<otherwise>
order by id desc
</otherwise>
</choose>
</select>
</select>
<select id="myBugPageList" resultType="com.sa.zentao.dao.ZtBugDTO">
@ -364,52 +364,51 @@
s.ys_remark,
s.release_flag,
pt.name productName from zt_bug s left join zt_product pt on s.product = pt.id
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">
and s.id = #{qo.id}
and s.id = #{qo.id}
</if>
<if test="qo.name != null and qo.name != ''">
and s.title like concat('%', #{qo.name}, '%')
</if>
<if test="qo.severity != null and qo.severity != ''">
and s.severity = #{qo.severity}
and s.severity = #{qo.severity}
</if>
<if test="qo.pri != null and qo.pri != ''">
and pri = #{qo.pri}
and pri = #{qo.pri}
</if>
<if test="qo.type != null and qo.type != ''">
and s.`type` = #{qo.type}
and s.`type` = #{qo.type}
</if>
<if test="qo.assignedTo != null and qo.assignedTo != ''">
and s.assignedTo = #{qo.assignedTo}
and s.assignedTo = #{qo.assignedTo}
</if>
<if test="qo.openedby != null and qo.openedby != ''">
and s.openedby = #{qo.openedby}
and s.openedby = #{qo.openedby}
</if>
<if test="qo.openStartDate !=null">
and s.openedDate <![CDATA[>=]]> #{qo.openStartDate}
and s.openedDate <![CDATA[>=]]> #{qo.openStartDate}
</if>
<if test="qo.openEndDate !=null">
and s.openedDate <![CDATA[<=]]> #{qo.openEndDate}
and s.openedDate <![CDATA[<=]]> #{qo.openEndDate}
</if>
<if test="qo.startDate !=null">
and s.deadline <![CDATA[>=]]> #{qo.startDate}
and s.deadline <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and s.deadline <![CDATA[<=]]> #{qo.endDate}
and s.deadline <![CDATA[<=]]> #{qo.endDate}
</if>
<if test="qo.productName != null and qo.productName != '' ">
and pt.name like concat('%', #{qo.productName}, '%')
and pt.name like concat('%', #{qo.productName}, '%')
</if>
@ -435,70 +434,69 @@
</if>
<if test="qo.searchVal == 'WGB' ">
-- 未关闭
-- 未关闭
and s.status !='closed'
</if>
<if test="qo.searchVal == 'YWCJ' ">
-- 由我创建
-- 由我创建
and s.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'ZPGW' ">
-- 指派给我
-- 指派给我
and s.assignedTo =#{qo.userName}
</if>
<if test="qo.searchVal == 'YWJJ' ">
-- 由我解决
-- 由我解决
and resolvedBy =#{qo.userName}
and s.status= 'resolved'
</if>
<if test="qo.searchVal == 'YWZP' ">
-- 由我指派
-- 由我指派
and s.openedBy =#{qo.userName}
</if>
<if test="qo.searchVal == 'WJJ' ">
-- //未解决
-- //未解决
and s.status= 'active'
</if>
<if test="qo.searchVal == 'WQR' ">
-- //未确认
-- //未确认
and s.confirmed= 0
</if>
<if test="qo.searchVal == 'WZP' ">
-- //未指派
-- //未指派
and s.assignedTo is null
</if>
<if test="qo.searchVal == 'JWCL' ">
-- //久未处理
-- //久未处理
</if>
<if test="qo.searchVal == 'DGB' ">
-- //待关闭
-- //待关闭
</if>
<if test="qo.searchVal == 'BYQ' ">
-- //被延期
-- //被延期
</if>
<if test="qo.searchVal == 'GQ' ">
-- //过期BUG
-- //过期BUG
</if>
<if test="qo.searchVal == 'XQBD' ">
-- //研发需求变动
-- //研发需求变动
</if>
order by id desc
</select>
<select id="bugListByIds" resultType="com.sa.zentao.entity.ZtBug">
SELECT s.id,
SELECT s.id,
s.project,
s.product,
s.injection,
@ -567,7 +565,7 @@
s.ys_remark,
s.release_flag
from zt_bug s
WHERE 1=1
WHERE 1=1
<if test="ids != null and ids.size() > 0">
and s.id in
<foreach collection="ids" item="id" index="index"
@ -661,6 +659,177 @@
</select>
<select id="bugListByProjectAndDate" 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.project in
<foreach collection="pIds" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
and openedDate <![CDATA[>=]]> #{start}
and openedDate <![CDATA[<=]]> #{end}
</select>
<select id="bugBoundsListByProjectAndDate" 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
LEFT JOIN zt_bug_bound_user u on s.id = u.bug_id
WHERE 1= 1 and u.assigned_to = #{account}
<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}
group by s.id
</select>
</mapper>

View File

@ -22,6 +22,11 @@
and details.release_id = #{qo.id}
and details.status != 'closed'
<if test="qo.ysUser != null and qo.ysUser != '' ">
and s.ys_user = #{qo.ysUser}
</if>
<if test="qo.name != null and qo.name != '' ">
and s.title like concat('%', #{qo.name}, '%')
</if>

View File

@ -42,8 +42,8 @@
business_id,
ys_flag,
dont_hand_select,
dont_hand_remark
dont_hand_remark,
finished_remark
from zt_story_feedback s WHERE 1 = 1

View File

@ -1105,7 +1105,7 @@
s.user_story,
s.ys_user,
s.task_count,
s.ys_date,
s.ys_date
from zt_story s
left join zt_storyreview v on s.id = v.story and s.version = v.version
@ -1121,4 +1121,92 @@
order by s.id desc
</select>
<select id="getStoryListByDatePidsProject" resultType="com.sa.zentao.entity.ZtStory">
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, zt_projectstory ps WHERE s.id = ps.story
<if test="ids != null and ids.size() > 0">
and s.product in
<foreach collection="ids" item="id" index="index"
open="(" close=")" separator=",">
#{id}
</foreach>
</if>
and ps.project = #{project}
<if test="start !=null">
and s.end_date <![CDATA[>=]]> #{start}
</if>
<if test="end !=null">
and s.end_date <![CDATA[<=]]> #{end}
</if>
</select>
</mapper>

View File

@ -161,8 +161,18 @@
<if test="qo.openedby != null and qo.openedby != '' ">
and s.openedBy = #{qo.openedby}
</if>
<if test="qo.status != null and qo.status != '' ">
and s.status = #{qo.status}
-- 需求明确中、详细设计、详细设计中、产品已设计、需求待确认 这些查询状态合并成 “需求明确中”
<if test="qo.status != null and qo.status == 'unconfirmed' ">
and s.status in ('unconfirmed'
,'waitcommunicate'
,'waitdesign','designdoing','designdone','storyunconfirmed')
</if>
<if test="qo.status != null and qo.status != 'unconfirmed' ">
and s.status = #{qo.status}
</if>
</if>
<if test="qo.productName != null and qo.productName != '' ">

View File

@ -127,6 +127,18 @@
where 1= 1
<if test="qo.delayFlag != null and qo.delayFlag != 0">
<if test="qo.delayFlag==1">
and (date(deadline ) <![CDATA[<]]> date(finishedDate ) or( finishedDate is null and date(deadline) <![CDATA[<]]> date(now())))
</if>
<if test="qo.delayFlag==2">
and (date(deadline ) <![CDATA[>=]]> date(finishedDate ) or( finishedDate is null and date(deadline) <![CDATA[>=]]> date(now())))
</if>
</if>
<if test="qo.id != null and qo.id != 0">
and s.id = #{qo.id}
</if>

View File

@ -15,6 +15,16 @@
<select id="pageList" resultType="com.sa.zentao.dao.ZtYwBackupsDTO">
SELECT * from zt_yw_backups WHERE 1=1
<if test="qo.startDate !=null">
and backups_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and backups_date <![CDATA[<=]]> #{qo.endDate}
</if>
order by id desc
</select>

View File

@ -24,6 +24,15 @@
SELECT * from zt_yw_change WHERE 1=1
<if test="qo.startDate !=null">
and change_effect_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and change_effect_date <![CDATA[<=]]> #{qo.endDate}
</if>
order by id desc
</select>

View File

@ -17,6 +17,15 @@
<select id="pageList" resultType="com.sa.zentao.dao.ZtYwFwqsearchDTO">
SELECT * from zt_yw_fwqsearch WHERE 1=1
<if test="qo.startDate !=null">
and create_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and create_date <![CDATA[<=]]> #{qo.endDate}
</if>
order by id desc
</select>

View File

@ -19,6 +19,14 @@
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtYwMachineRoomDTO">
SELECT * from zt_yw_machine_room WHERE 1= 1
<if test="qo.startDate !=null">
and inspect_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and inspect_date <![CDATA[<=]]> #{qo.endDate}
</if>
order by id desc
</select>

View File

@ -19,6 +19,13 @@
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtYwPatrolDTO">
SELECT * from zt_yw_patrol WHERE 1=1
<if test="qo.startDate !=null">
and patrol_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and patrol_date <![CDATA[<=]]> #{qo.endDate}
</if>
</select>
</mapper>

View File

@ -18,6 +18,15 @@
</resultMap>
<select id="pageList" resultType="com.sa.zentao.dao.ZtYwTaskDTO">
SELECT * from zt_yw_task WHERE 1=1
<if test="qo.startDate !=null">
and task_end_date <![CDATA[>=]]> #{qo.startDate}
</if>
<if test="qo.endDate !=null">
and task_end_date <![CDATA[<=]]> #{qo.endDate}
</if>
order by id desc
</select>