bug修改+资源开发
This commit is contained in:
@ -22,7 +22,7 @@ public class CodeGenerator {
|
||||
//自己的名字
|
||||
static String Author = "gqb";
|
||||
|
||||
public static String tableName = "zt_story_user_task";
|
||||
public static String tableName = "zt_computer_source";
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
@ -0,0 +1,47 @@
|
||||
package com.sa.zentao.controller;
|
||||
|
||||
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtComputerSourceDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.qo.ZtComputerSourceQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import com.sa.zentao.service.IZtComputerSourceService;
|
||||
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-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/zt-computer-source")
|
||||
public class ZtComputerSourceController {
|
||||
|
||||
@Autowired
|
||||
private IZtComputerSourceService computerSourceService;
|
||||
|
||||
@RequestMapping(value = "/pageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtComputerSourceDTO> storyPageList(@RequestBody ZtComputerSourceQo qo){
|
||||
return Result.success(computerSourceService.pageList(qo));
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtComputerSourceDTO> add(@RequestBody ZtComputerSourceDTO dto){
|
||||
computerSourceService.addComputerSource(dto);
|
||||
return Result.success();
|
||||
}
|
||||
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtComputerSourceDTO> modify(@RequestBody ZtComputerSourceDTO dto){
|
||||
computerSourceService.modify(dto);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
@ -2,10 +2,8 @@ package com.sa.zentao.controller;
|
||||
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtReleaseDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.dao.ZtTaskDTO;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.ZtBug;
|
||||
import com.sa.zentao.entity.ZtStory;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import com.sa.zentao.qo.ZtReleaseQo;
|
||||
@ -39,6 +37,25 @@ public class ZtReleaseController {
|
||||
releaseService.addRelease(dto);
|
||||
return Result.success();
|
||||
}
|
||||
//提交评审
|
||||
@RequestMapping(value = "/submitReviewing", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result submitReviewing(@RequestBody ZtReleaseDTO dto){
|
||||
releaseService.submitReviewing(dto);
|
||||
return Result.success();
|
||||
}
|
||||
//提交重新评审
|
||||
@RequestMapping(value = "/submitAgainReviewing", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result submitAgainReviewing(@RequestBody ZtReleaseDTO dto){
|
||||
releaseService.submitAgainReviewing(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/releaseList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result releaseList(@RequestBody ZtReleaseDTO dto){
|
||||
List<ZtReleaseDTO> list= releaseService.releaseList(dto);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/getById", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result getById(@RequestBody ZtReleaseQo qo){
|
||||
@ -57,13 +74,24 @@ public class ZtReleaseController {
|
||||
public Result<ZtReleaseDTO> pageList(@RequestBody ZtReleaseQo qo){
|
||||
return Result.success(releaseService.pageList(qo));
|
||||
}
|
||||
|
||||
//发布下已关联的需求
|
||||
@RequestMapping(value = "/releaseStoryPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> releaseStoryPageList(@RequestBody ZtReleaseQo qo){
|
||||
PageInfo<ZtStoryDTO> info=releaseService.releaseStoryPageList(qo);
|
||||
return Result.success(info);
|
||||
}
|
||||
@RequestMapping(value = "/releaseBugPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> releaseBugPageList(@RequestBody ZtReleaseQo qo){
|
||||
PageInfo<ZtBugDTO> info=releaseService.releaseBugPageList(qo);
|
||||
return Result.success(info);
|
||||
}
|
||||
@RequestMapping(value = "/releaseNotSyncBugPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> releaseNotSyncBugPageList(@RequestBody ZtReleaseQo qo){
|
||||
PageInfo<ZtBugDTO> info=releaseService.releaseNotSyncBugPageList(qo);
|
||||
return Result.success(info);
|
||||
}
|
||||
|
||||
//迭代下需求
|
||||
@RequestMapping(value = "/projectStoryPageList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> projectStoryPageList(@RequestBody ZtReleaseQo qo){
|
||||
PageInfo<ZtStoryDTO> info=releaseService.projectStoryPageList(qo);
|
||||
@ -75,12 +103,23 @@ public class ZtReleaseController {
|
||||
releaseService.removeStory(qo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/removeBug", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> removeBug(@RequestBody ZtReleaseQo qo){
|
||||
releaseService.removeBug(qo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/batchSyncStory", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> batchSyncStory(@RequestBody ZtReleaseQo qo){
|
||||
releaseService.batchSyncStory(qo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/batchSyncBug", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtReleaseDTO> batchSyncBug(@RequestBody ZtReleaseQo qo){
|
||||
releaseService.batchSyncBug(qo);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/assignedTo", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result assignedTo(@RequestBody ZtReleaseQo dto){
|
||||
@ -101,6 +140,12 @@ public class ZtReleaseController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/closeRelease", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result closeRelease(@RequestBody ZtReleaseQo dto){
|
||||
releaseService.closeRelease(dto);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/execMenu", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result execMenu(@RequestBody ZtReleaseQo dto){
|
||||
return Result.success(releaseService.execMenu(dto));
|
||||
|
@ -309,15 +309,15 @@ public class ZtTaskController {
|
||||
}
|
||||
List<ZtStoryspec> listSpec = storyspecService.getPrdById(oldStory.getId());
|
||||
|
||||
// ZtStory newStory = storyService.getById(oldStory.getId());
|
||||
// if(newStory!=null){
|
||||
// continue;
|
||||
// }
|
||||
// if(!CollectionUtils.isEmpty(listSpec)){
|
||||
// ZtStoryspec ztStoryspec = listSpec.get(0);
|
||||
// ztStoryspec.setFiles(null);
|
||||
// storyspecService.save(ztStoryspec);
|
||||
// }
|
||||
ZtStory newStory = storyService.getById(oldStory.getId());
|
||||
if(newStory!=null){
|
||||
continue;
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(listSpec)){
|
||||
ZtStoryspec ztStoryspec = listSpec.get(0);
|
||||
ztStoryspec.setFiles(null);
|
||||
storyspecService.save(ztStoryspec);
|
||||
}
|
||||
|
||||
List<String> userList=new ArrayList();
|
||||
|
||||
@ -409,10 +409,10 @@ public class ZtTaskController {
|
||||
|
||||
|
||||
//创建新的需求
|
||||
// oldStory.setProduct(product);
|
||||
// oldStory.setStage("wait");
|
||||
// oldStory.setStatus("active");
|
||||
// storyService.save(oldStory);
|
||||
oldStory.setProduct(product);
|
||||
oldStory.setStage("wait");
|
||||
oldStory.setStatus("active");
|
||||
storyService.save(oldStory);
|
||||
//项目关联需求
|
||||
ZtProjectDTO dto=new ZtProjectDTO();
|
||||
dto.setStoryIds(new ArrayList<>(){
|
||||
|
@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
||||
import com.sa.zentao.dao.BusinessException;
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtProjectDTO;
|
||||
import com.sa.zentao.dao.ZtUserDTO;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.ZtTeam;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
@ -70,8 +67,40 @@ public class ZtUserController {
|
||||
@RequestMapping(value = "/allList", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result allList(@RequestBody ZtUser user){
|
||||
List<ZtUserDTO> ztUserDTOS = userMapper.listAll(null);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/syncOldZentaoUser", method = RequestMethod.GET, produces = "application/json; charset=UTF-8")
|
||||
public Result allList(){
|
||||
List<ZtUserDTO> ztUserDTOS = userMapper.listAll(null);
|
||||
//老的禅道 新的禅道
|
||||
List result=new ArrayList();
|
||||
|
||||
for (ZtUserDTO u:ztUserDTOS) {
|
||||
ZtUser ztUser = new ZtUser();
|
||||
List<ZtUser> list = this.userService.list(new QueryWrapper<ZtUser>().lambda().eq(ZtUser::getAccount, u.getAccount()));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
continue;
|
||||
}
|
||||
BeanUtils.copyProperties(u,ztUser);
|
||||
ztUser.setPassword("e10adc3949ba59abbe56e057f20f883e");
|
||||
ztUser.setNickname(u.getRealname());
|
||||
List<BaseStaff> staff = this.userService.oaUserByNikeName(u.getRealname());
|
||||
if(!CollectionUtils.isEmpty(staff)){
|
||||
String vxId = staff.get(0).getVxId();
|
||||
ztUser.setVx(vxId);
|
||||
Integer departId = staff.get(0).getDepartId();
|
||||
|
||||
BaseDepartment depart =this.userService.getDepart(departId);
|
||||
Integer level = depart.getLevel();
|
||||
while (level.intValue()>1){
|
||||
depart=this.userService.getDepart(depart.getParentId());
|
||||
level =depart.getLevel();
|
||||
}
|
||||
ztUser.setDeptName(depart.getName());
|
||||
}
|
||||
result.add(ztUser);
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@ -190,6 +219,18 @@ public class ZtUserController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/resetPassword", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtUser> resetPassword(@RequestBody ZtUserDTO user){
|
||||
this.userService.resetPassword(user);
|
||||
return Result.success();
|
||||
}
|
||||
@RequestMapping(value = "/deleteUser", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtUser> deleteUser(@RequestBody ZtUserDTO user){
|
||||
this.userService.deleteUser(user);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/modify", method = RequestMethod.POST, produces = "application/json; charset=UTF-8")
|
||||
public Result<ZtUser> modify(@RequestBody ZtUserDTO user){
|
||||
|
||||
|
114
src/main/java/com/sa/zentao/dao/BaseDepartment.java
Normal file
114
src/main/java/com/sa/zentao/dao/BaseDepartment.java
Normal file
@ -0,0 +1,114 @@
|
||||
package com.sa.zentao.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2024-04-29
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("base_department")
|
||||
public class BaseDepartment implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 部门名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 负责人名
|
||||
*/
|
||||
private String manageName;
|
||||
|
||||
/**
|
||||
* 负责人手机
|
||||
*/
|
||||
private String managePhone;
|
||||
|
||||
/**
|
||||
* 负责人邮箱
|
||||
*/
|
||||
private String manageMail;
|
||||
|
||||
/**
|
||||
* 父节点
|
||||
*/
|
||||
private Integer parentId;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
private Integer companyId;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private Date updateDate;
|
||||
|
||||
private Integer createUser;
|
||||
|
||||
private Integer updateUser;
|
||||
|
||||
/**
|
||||
* 0正常1.删除
|
||||
*/
|
||||
private String deleteFlag;
|
||||
|
||||
/**
|
||||
* 编制用户数量
|
||||
*/
|
||||
private BigDecimal bzUserCount;
|
||||
|
||||
/**
|
||||
* 是否需要验证用户 1.需要
|
||||
*/
|
||||
private Integer checkUser;
|
||||
|
||||
private String dkStart;
|
||||
|
||||
private String dkEnd;
|
||||
|
||||
/**
|
||||
* 部门,级别,岗位
|
||||
*/
|
||||
private String departmentType;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Integer departmentId;
|
||||
|
||||
private String workingHoursType;
|
||||
|
||||
private Integer parentDepartId;
|
||||
|
||||
private Integer parentCompanyId;
|
||||
//排序
|
||||
private Integer sortIndex;
|
||||
|
||||
}
|
290
src/main/java/com/sa/zentao/dao/BaseStaff.java
Normal file
290
src/main/java/com/sa/zentao/dao/BaseStaff.java
Normal file
@ -0,0 +1,290 @@
|
||||
package com.sa.zentao.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.sa.zentao.utils.CryptoUtils;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author
|
||||
* @since 2022-11-08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
|
||||
public class BaseStaff implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
private Integer companyId;
|
||||
|
||||
//微信id
|
||||
private String vxId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 员工号
|
||||
*/
|
||||
private String staffNo;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private Integer departId;
|
||||
private String departName;
|
||||
/**
|
||||
* 职位
|
||||
*/
|
||||
private String position;
|
||||
|
||||
/**
|
||||
* 1.男 2女
|
||||
*/
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
private Date birthday;
|
||||
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
private Date workDate;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer age;
|
||||
/**
|
||||
* 上海社保缴纳年数
|
||||
*/
|
||||
private BigDecimal shSocSecYears;
|
||||
|
||||
/**
|
||||
* 1.试用期 2见习 3.正式 4.退休期 5.离职员工
|
||||
*/
|
||||
private String staffStatus;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String mail;
|
||||
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 户籍
|
||||
*/
|
||||
private String births;
|
||||
|
||||
/**
|
||||
* 户籍地址
|
||||
*/
|
||||
private String birthsAddress;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String liveAddress;
|
||||
|
||||
/**
|
||||
* 0 未婚 1.已婚
|
||||
*/
|
||||
private String marriageType;
|
||||
|
||||
/**
|
||||
* 学历
|
||||
*/
|
||||
private String education;
|
||||
|
||||
/**
|
||||
* 毕业学校
|
||||
*/
|
||||
private String school;
|
||||
|
||||
/**
|
||||
* 专业
|
||||
*/
|
||||
private String major;
|
||||
|
||||
/**
|
||||
* 毕业时间
|
||||
*/
|
||||
private String graduationDate;
|
||||
|
||||
/**
|
||||
* 紧急联系人
|
||||
*/
|
||||
private String emergencyUser;
|
||||
|
||||
/**
|
||||
* 紧急联系人关系
|
||||
*/
|
||||
private String emergencyRelationship;
|
||||
|
||||
/**
|
||||
* 紧急联人电话
|
||||
*/
|
||||
private String emergencyPhone;
|
||||
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Integer createUser;
|
||||
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
private Date updateDate;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private Integer updateUser;
|
||||
|
||||
//政治面貌1.党员2.团员3.群众4.其他
|
||||
private String politicalOutlook;
|
||||
//级别
|
||||
private String level;
|
||||
//职称
|
||||
private String workName;
|
||||
// 上海户籍
|
||||
private String shBirths;
|
||||
//邮编
|
||||
private String postalCode;
|
||||
|
||||
private String maxEducation;
|
||||
|
||||
private String header;
|
||||
//全日制 1.是 0否
|
||||
private Integer qrz;
|
||||
|
||||
private String gjjAccount;
|
||||
|
||||
private String bankNo;
|
||||
private String zpType;
|
||||
//所在编制公司
|
||||
private String bzCompany;
|
||||
|
||||
//职业资格
|
||||
private String zyzg;
|
||||
//家人手机
|
||||
private String familyPhone;
|
||||
//家人关系
|
||||
private String familyRelationship;
|
||||
//家人姓名
|
||||
private String familyName;
|
||||
//户口类型
|
||||
private String hkType;
|
||||
// 首次工作日起
|
||||
private Date firstWorkDate;
|
||||
|
||||
//打卡机id
|
||||
private String dkId;
|
||||
|
||||
private String deleteFlagEnum;
|
||||
|
||||
//独身子女 1 是 0 否
|
||||
private Integer dszvFlag;
|
||||
//独生子女多少钱
|
||||
private BigDecimal dszvMoney;
|
||||
//独生子女多少钱到期时间
|
||||
private Date dszvExpireTime;
|
||||
//银行名称
|
||||
private String bankName;
|
||||
//财务编号
|
||||
private String financeNo;
|
||||
//发薪公司
|
||||
private Integer fxCompany;
|
||||
//合同公司
|
||||
private Integer contactCompany;
|
||||
//1.是工会会员 0不是
|
||||
private Integer tradeUnionVip;
|
||||
//入职推荐人
|
||||
private String recommend;
|
||||
//所属中心
|
||||
private String belongTo;
|
||||
//业务系统账号
|
||||
private String accountId;
|
||||
|
||||
|
||||
//其他信息
|
||||
private String otherData;
|
||||
//项目群组
|
||||
private String projectGroup;
|
||||
//驾驶证
|
||||
private String driverLicense;
|
||||
|
||||
//用工性质
|
||||
private String workType;
|
||||
|
||||
//工作地点
|
||||
private String workAddress;
|
||||
|
||||
//民族
|
||||
private String nation;
|
||||
|
||||
//身份证到期时间
|
||||
private Date idExpireDate;
|
||||
|
||||
//司龄校正值
|
||||
private BigDecimal workYearAdd;
|
||||
//预算部门
|
||||
private Integer budgetDepartId;
|
||||
//是否计算工龄工资 1.计算 0不计算
|
||||
private Integer computeWorkYear;
|
||||
//是否开启信息缺省提醒 0不开 1 开
|
||||
private Integer reminderEnabledStatus;
|
||||
//最后提醒时间
|
||||
private Date lastReminderTime;
|
||||
|
||||
|
||||
|
||||
public Integer getBzCompanyInter(){
|
||||
if(StringUtils.isEmpty(bzCompany)){
|
||||
return null;
|
||||
}
|
||||
return Integer.valueOf(bzCompany);
|
||||
}
|
||||
|
||||
public String getVxidAesValue(){
|
||||
if(vxId==null){
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return CryptoUtils.aesDecryptForFront(vxId, CryptoUtils.KEY_DES);
|
||||
}catch (Exception e){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -209,4 +209,7 @@ public class ZtBugDTO implements Serializable {
|
||||
private Integer reviewerResult;
|
||||
|
||||
private String desc;
|
||||
|
||||
private Integer releaseId;
|
||||
private String releaseName;
|
||||
}
|
||||
|
104
src/main/java/com/sa/zentao/dao/ZtComputerSourceDTO.java
Normal file
104
src/main/java/com/sa/zentao/dao/ZtComputerSourceDTO.java
Normal file
@ -0,0 +1,104 @@
|
||||
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;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ZtComputerSourceDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 服务器/网络设备/安全设备/语音网关
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 内网ip
|
||||
*/
|
||||
private String innerIp;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String bread;
|
||||
|
||||
/**
|
||||
* cpu核心数
|
||||
*/
|
||||
private String cpuCore;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String memory;
|
||||
|
||||
/**
|
||||
* 硬盘
|
||||
*/
|
||||
private String disk;
|
||||
|
||||
/**
|
||||
* 道路救援/飞侠车服/小仟安行/OA系统/财务系统/其他
|
||||
*/
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 用途
|
||||
*/
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*/
|
||||
private String serverName;
|
||||
|
||||
/**
|
||||
* 宝山机房/高科西路机房/其他
|
||||
*/
|
||||
private String house;
|
||||
|
||||
/**
|
||||
* 机柜编号
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private Date buyDate;
|
||||
|
||||
/**
|
||||
* 未启用/启用中/报废
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
private Date updateDate;
|
||||
|
||||
|
||||
}
|
@ -68,4 +68,10 @@ public class ZtMeetingDTO implements Serializable {
|
||||
private String files;
|
||||
|
||||
private String address;
|
||||
|
||||
private String title;
|
||||
|
||||
private Integer userStory;
|
||||
|
||||
private String userStoryName;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public class ZtReleaseDTO implements Serializable {
|
||||
private String deleted;
|
||||
|
||||
private String executions;
|
||||
|
||||
private Integer execution;
|
||||
private String executionsName;
|
||||
private String level;
|
||||
|
||||
|
@ -256,7 +256,9 @@ public class ZtStoryDTO implements Serializable {
|
||||
private Integer taskCount;
|
||||
|
||||
private Integer releaseFlag=0;
|
||||
|
||||
//发布id
|
||||
private Integer releaseId;
|
||||
private String releaseName;
|
||||
private List<ZtBugDTO> bugList;
|
||||
|
||||
|
||||
|
@ -201,4 +201,6 @@ public class ZtBug implements Serializable {
|
||||
//1 通过 2不通过
|
||||
private Integer ysFlag;
|
||||
private String ysRemark;
|
||||
@TableField(exist = false)
|
||||
private Integer releaseFlag;
|
||||
}
|
||||
|
105
src/main/java/com/sa/zentao/entity/ZtComputerSource.java
Normal file
105
src/main/java/com/sa/zentao/entity/ZtComputerSource.java
Normal file
@ -0,0 +1,105 @@
|
||||
package com.sa.zentao.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ZtComputerSource implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 服务器/网络设备/安全设备/语音网关
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 内网ip
|
||||
*/
|
||||
private String innerIp;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String bread;
|
||||
|
||||
/**
|
||||
* cpu核心数
|
||||
*/
|
||||
private String cpuCore;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String memory;
|
||||
|
||||
/**
|
||||
* 硬盘
|
||||
*/
|
||||
private String disk;
|
||||
|
||||
/**
|
||||
* 道路救援/飞侠车服/小仟安行/OA系统/财务系统/其他
|
||||
*/
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 用途
|
||||
*/
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*/
|
||||
private String serverName;
|
||||
|
||||
/**
|
||||
* 宝山机房/高科西路机房/其他
|
||||
*/
|
||||
private String house;
|
||||
|
||||
/**
|
||||
* 机柜编号
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private Date buyDate;
|
||||
|
||||
/**
|
||||
* 未启用/启用中/报废
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
private Date updateDate;
|
||||
|
||||
|
||||
}
|
@ -64,5 +64,8 @@ public class ZtMeeting implements Serializable {
|
||||
private Date updateDate;
|
||||
|
||||
private String address;
|
||||
private String title;
|
||||
|
||||
private Integer userStory;
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.sa.zentao.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@ -58,9 +59,10 @@ public class ZtRelease implements Serializable {
|
||||
private String notify;
|
||||
//active 激活
|
||||
//reviewing待评审
|
||||
//reviewingError 评审失败
|
||||
//waitRelease 待发布
|
||||
//released 发不成功
|
||||
//close 发布失败
|
||||
//close 关闭
|
||||
@TableField("`status`")
|
||||
private String status;
|
||||
|
||||
@ -89,7 +91,7 @@ public class ZtRelease implements Serializable {
|
||||
|
||||
private String noticeContent;
|
||||
|
||||
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private String failRemark;
|
||||
|
||||
private String releaseFailRemark;
|
||||
|
@ -29,7 +29,7 @@ public class ZtReleaseDetails implements Serializable {
|
||||
private Integer objectId;
|
||||
//story bug
|
||||
private String objectType;
|
||||
// released已发布 closed 关闭
|
||||
// closed 关闭 wait
|
||||
private String status;
|
||||
|
||||
|
||||
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.sa.zentao.enums.UserStoryEnums;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ -64,6 +65,21 @@ public class ZtStoryUser implements Serializable {
|
||||
|
||||
private Float estimate;
|
||||
// active finished closed //reviewing 评审中 active 激活 draft 草稿
|
||||
/// DPS("reviewing", "待评审",0),
|
||||
// CG("draft", "草稿",1),
|
||||
// JH("active", "激活",2),
|
||||
// UNCFM("unconfirmed", "产品确认中",3),
|
||||
// DGT("waitcommunicate", "待沟通",4),
|
||||
//
|
||||
// DSJ("waitdesign","需求待设计",5),
|
||||
// XXSJZ("designdoing","详细设计中",6),
|
||||
// CPYSJ("designdone","产品已设计",7),
|
||||
// //待确认
|
||||
// DQR("storyunconfirmed","需求待确认",8),
|
||||
// CFM("confirmed","需求已确认",9),
|
||||
// KFZ("developing","研发中",10),
|
||||
// YWC("finished","已完成",11),
|
||||
// CLOSED("closed","已关闭",12),
|
||||
private String status;
|
||||
// reviewing
|
||||
@TableField("subStatus")
|
||||
|
@ -27,11 +27,13 @@ public enum ActionStatus {
|
||||
FBSB(30, "fb","发布不通过"),
|
||||
QR(19, "qr","确认"),
|
||||
KSCE(21, "testing","开始测试"),
|
||||
SUBPS(23, "submitreview","提交评审"),
|
||||
|
||||
CSWC(20, "tested","测试完成"),
|
||||
KFWC(41, "developed","开发完成"),
|
||||
|
||||
ZTBG(41, "changeStatus","状态变更"),
|
||||
MQXU(41, "mqxu","明确需求"),
|
||||
ZTBG(42, "changeStatus","状态变更"),
|
||||
MQXU(43, "mqxu","明确需求"),
|
||||
|
||||
TJYS(51, "verified","提交验收"),
|
||||
|
||||
@ -42,6 +44,7 @@ public enum ActionStatus {
|
||||
|
||||
LOGIN(100, "login","登录"),
|
||||
XGMM(101, "xgmm","修改密码"),
|
||||
CZMM(101, "czmm","重置密码"),
|
||||
;
|
||||
|
||||
@EnumValue
|
||||
|
@ -29,7 +29,7 @@ public enum ActionType {
|
||||
LOGIN(7, "LOGIN","登录"),
|
||||
USER(8, "user","用户"),
|
||||
|
||||
|
||||
SOURCE(9, "source","服务器资源"),
|
||||
;
|
||||
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.sa.zentao.mapper;
|
||||
|
||||
import com.sa.zentao.dao.ZtComputerSourceDTO;
|
||||
import com.sa.zentao.entity.ZtComputerSource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.sa.zentao.qo.ZtComputerSourceQo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
public interface ZtComputerSourceMapper extends BaseMapper<ZtComputerSource> {
|
||||
|
||||
List<ZtComputerSourceDTO> pageList(@Param("qo") ZtComputerSourceQo qo);
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.sa.zentao.mapper;
|
||||
|
||||
import com.sa.zentao.dao.ZtBugDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.entity.ZtReleaseDetails;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@ -18,7 +19,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface ZtReleaseDetailsMapper extends BaseMapper<ZtReleaseDetails> {
|
||||
|
||||
List<ZtStoryDTO> releasePageList(@Param("qo") ZtReleaseQo qo);
|
||||
List<ZtStoryDTO> releaseStoryPageList(@Param("qo") ZtReleaseQo qo);
|
||||
|
||||
List<ZtStoryDTO> storyPageList(@Param("qo") ZtReleaseQo qo);
|
||||
|
||||
List<ZtBugDTO> releaseBugPageList(@Param("qo") ZtReleaseQo qo);
|
||||
|
||||
List<ZtBugDTO> releaseNotSyncBugPageList(@Param("qo") ZtReleaseQo qo);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.sa.zentao.mapper;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.sa.zentao.dao.BaseDepartment;
|
||||
import com.sa.zentao.dao.BaseStaff;
|
||||
import com.sa.zentao.dao.DkInfo;
|
||||
import com.sa.zentao.dao.ZtUserDTO;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
@ -34,5 +36,7 @@ public interface ZtUserMapper extends BaseMapper<ZtUser> {
|
||||
ZtUser selectPrdByName(@Param("name")String userName);
|
||||
|
||||
|
||||
List<BaseStaff> oaUserByNikeName(@Param("nickname") String nickname);
|
||||
|
||||
BaseDepartment getDepart(@Param("departId") Integer departId);
|
||||
}
|
||||
|
105
src/main/java/com/sa/zentao/qo/ZtComputerSourceQo.java
Normal file
105
src/main/java/com/sa/zentao/qo/ZtComputerSourceQo.java
Normal file
@ -0,0 +1,105 @@
|
||||
package com.sa.zentao.qo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class ZtComputerSourceQo extends BaseQo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 服务器/网络设备/安全设备/语音网关
|
||||
*/
|
||||
private String sourceType;
|
||||
|
||||
/**
|
||||
* 内网ip
|
||||
*/
|
||||
private String innerIp;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
private String bread;
|
||||
|
||||
/**
|
||||
* cpu核心数
|
||||
*/
|
||||
private String cpuCore;
|
||||
|
||||
/**
|
||||
* 内存
|
||||
*/
|
||||
private String memory;
|
||||
|
||||
/**
|
||||
* 硬盘
|
||||
*/
|
||||
private String disk;
|
||||
|
||||
/**
|
||||
* 道路救援/飞侠车服/小仟安行/OA系统/财务系统/其他
|
||||
*/
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 用途
|
||||
*/
|
||||
private String purpose;
|
||||
|
||||
/**
|
||||
* 服务名称
|
||||
*/
|
||||
private String serverName;
|
||||
|
||||
/**
|
||||
* 宝山机房/高科西路机房/其他
|
||||
*/
|
||||
private String house;
|
||||
|
||||
/**
|
||||
* 机柜编号
|
||||
*/
|
||||
private String idNo;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
private Date buyDate;
|
||||
|
||||
/**
|
||||
* 未启用/启用中/报废
|
||||
*/
|
||||
private String status;
|
||||
|
||||
private String createUser;
|
||||
|
||||
private Date createDate;
|
||||
|
||||
private String updateUser;
|
||||
|
||||
private Date updateDate;
|
||||
//1年内、3年内、3~5年、5~7年,7年以上 1 2 3 4 5
|
||||
private String yearSearch;
|
||||
|
||||
}
|
@ -30,4 +30,6 @@ public class ZtMeetingQo extends BaseQo {
|
||||
private String title;
|
||||
|
||||
private Integer productId;
|
||||
|
||||
|
||||
}
|
||||
|
@ -103,4 +103,6 @@ public class ZtProjectQo extends BaseQo {
|
||||
//如果查询 execution 迭代里面加的
|
||||
private String source;
|
||||
private String spec;
|
||||
|
||||
private String bugType;
|
||||
}
|
||||
|
@ -54,5 +54,9 @@ public class ZtReleaseQo extends BaseQo {
|
||||
|
||||
private Integer storyId;
|
||||
|
||||
private Integer bugId;
|
||||
|
||||
private List<Integer> storyList;
|
||||
private List<Integer> bugList;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
package com.sa.zentao.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.ZtComputerSourceDTO;
|
||||
import com.sa.zentao.entity.ZtComputerSource;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sa.zentao.qo.ZtComputerSourceQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
public interface IZtComputerSourceService extends IService<ZtComputerSource> {
|
||||
|
||||
PageInfo<ZtComputerSourceDTO> pageList(ZtComputerSourceQo qo);
|
||||
|
||||
void addComputerSource(ZtComputerSourceDTO dto);
|
||||
|
||||
void modify(ZtComputerSourceDTO dto);
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.sa.zentao.service;
|
||||
|
||||
import com.sa.zentao.dao.ZtBugDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.entity.ZtReleaseDetails;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
@ -17,7 +18,11 @@ import java.util.List;
|
||||
*/
|
||||
public interface IZtReleaseDetailsService extends IService<ZtReleaseDetails> {
|
||||
|
||||
List<ZtStoryDTO> releasePageList(ZtReleaseQo qo);
|
||||
List<ZtStoryDTO> releaseStoryPageList(ZtReleaseQo qo);
|
||||
|
||||
List<ZtStoryDTO> storyPageList(ZtReleaseQo qo);
|
||||
|
||||
List<ZtBugDTO> releaseBugPageList(ZtReleaseQo qo);
|
||||
|
||||
List<ZtBugDTO> releaseNotSyncBugPageList(ZtReleaseQo qo);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.sa.zentao.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.Result;
|
||||
import com.sa.zentao.dao.ZtBugDTO;
|
||||
import com.sa.zentao.dao.ZtReleaseDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.entity.ZtRelease;
|
||||
@ -48,4 +49,26 @@ public interface IZtReleaseService extends IService<ZtRelease> {
|
||||
void batchSyncStory(ZtReleaseQo qo);
|
||||
|
||||
ZtReleaseDTO getReleaseById(Integer id);
|
||||
|
||||
List<ZtReleaseDTO> releaseList(ZtReleaseDTO dto);
|
||||
|
||||
void batchSyncBug(ZtReleaseQo qo);
|
||||
|
||||
void removeBug(ZtReleaseQo qo);
|
||||
|
||||
//id 业务id type story bug
|
||||
void changeRelease(Integer releaseId,Integer id, String type);
|
||||
|
||||
PageInfo<ZtBugDTO> releaseBugPageList(ZtReleaseQo qo);
|
||||
|
||||
PageInfo<ZtBugDTO> releaseNotSyncBugPageList(ZtReleaseQo qo);
|
||||
|
||||
void closeRelease(ZtReleaseQo dto);
|
||||
|
||||
void submitReviewing(ZtReleaseDTO dto);
|
||||
|
||||
void submitAgainReviewing(ZtReleaseDTO dto);
|
||||
|
||||
ZtRelease getReleaseByStory(Integer id);
|
||||
ZtRelease getReleaseByBug(Integer id);
|
||||
}
|
||||
|
@ -1,9 +1,7 @@
|
||||
package com.sa.zentao.service;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.dao.DkInfo;
|
||||
import com.sa.zentao.dao.ZtProjectDTO;
|
||||
import com.sa.zentao.dao.ZtUserDTO;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.sa.zentao.qo.ZtUserQo;
|
||||
@ -43,4 +41,14 @@ public interface IZtUserService extends IService<ZtUser> {
|
||||
ZtUser getbyVxId(String vx);
|
||||
|
||||
List<DkInfo> dkList(@Param("ids") List<String> account, @Param("startDate") Date startDate, @Param("endDate")Date endDate);
|
||||
|
||||
void resetPassword(ZtUserDTO user);
|
||||
|
||||
void deleteUser(ZtUserDTO user);
|
||||
|
||||
List<BaseStaff> oaUserByNikeName(String nickname);
|
||||
|
||||
BaseDepartment getDepart(Integer departId);
|
||||
|
||||
ZtUser getByAccount(String openedby);
|
||||
}
|
||||
|
@ -196,7 +196,8 @@ public class IZtCountService {
|
||||
|
||||
if(!loginRiskUser.getName().equals("admin")){
|
||||
if(!CollectionUtils.isEmpty(pIds)){
|
||||
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getProduct,pIds).in(ZtStoryUser::getStatus, "active", "reviewing"));
|
||||
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getProduct,pIds)
|
||||
.in(ZtStoryUser::getStatus, "active", "reviewing","active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed"));
|
||||
ztStory = storyService.list(new QueryWrapper<ZtStory>()
|
||||
.lambda().eq(ZtStory::getDeleted, "0")
|
||||
.in(ZtStory::getProduct,pIds)
|
||||
@ -207,7 +208,7 @@ public class IZtCountService {
|
||||
ztStory=new ArrayList<>();
|
||||
}
|
||||
}else{
|
||||
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getStatus, "active", "reviewing"));
|
||||
list = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda().in(ZtStoryUser::getStatus, "active", "reviewing","active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed"));
|
||||
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
ztStory=new ArrayList<>();
|
||||
@ -244,18 +245,19 @@ public class IZtCountService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
result.setPstgCount(list.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")).map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
result.setPstgCount(list.stream().filter(o ->
|
||||
Arrays.asList("active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed").contains(o.getStatus()))
|
||||
.map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
result.setPlanCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")).map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
result.setTestingCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("testing")).map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
.filter(o -> Arrays.asList("testing","tested").contains(o.getStage()) ).map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
// developing 研发中 developed 研发完毕 testing 测试中 tested测试完毕
|
||||
|
||||
result.setJxzCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> Arrays.asList("developing").contains(o.getStage())
|
||||
.filter(o -> Arrays.asList("developing","developed").contains(o.getStage())
|
||||
).map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
|
||||
@ -349,8 +351,9 @@ public class IZtCountService {
|
||||
|
||||
result.setDpsCount(storyUsers.stream().filter(o -> "reviewing".equals(o.getStatus())) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
result.setPstgCount(storyUsers.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
result.setPstgCount(storyUsers.stream().filter(o ->
|
||||
Arrays.asList("active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed").contains(o.getStatus()))
|
||||
.map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
result.setPlanCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
@ -392,7 +395,7 @@ public class IZtCountService {
|
||||
List<ZtProduct> pList = this.productService.listByIds(pIds);
|
||||
|
||||
List<ZtStoryUser> storyUsers = this.storyUserService.list(new QueryWrapper<ZtStoryUser>().lambda()
|
||||
.in(ZtStoryUser::getStatus, "active", "reviewing")
|
||||
.in(ZtStoryUser::getStatus, "active", "reviewing","active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed")
|
||||
.in(ZtStoryUser::getProduct,pList.stream().map(o->o.getId()).collect(Collectors.toList()))
|
||||
);
|
||||
|
||||
@ -412,9 +415,11 @@ public class IZtCountService {
|
||||
}
|
||||
|
||||
result.setDpsCount(storyUsers.stream().filter(o -> "reviewing".equals(o.getStatus())) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
result.setPstgCount(storyUsers.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
// result.setPstgCount(storyUsers.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
// .filter(o -> o.getStage().equals("wait")) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
result.setPstgCount(storyUsers.stream().filter(o ->
|
||||
Arrays.asList("active","unconfirmed","waitcommunicate","waitdesign","designdoing","designdone","storyunconfirmed","confirmed").contains(o.getStatus()))
|
||||
.map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
|
||||
result.setPlanCount(ztStory.stream().filter(o -> "active".equals(o.getStatus()))
|
||||
.filter(o -> o.getStage().equals("wait")) .map(o->o.getId()+"").collect(Collectors.joining(",")));
|
||||
@ -776,8 +781,14 @@ public class IZtCountService {
|
||||
dto.setSaturation(dto.getTotalTime().floatValue()==0?BigDecimal.ZERO:dto.getAllocationTime().divide(dto.getExamineTime(),2,BigDecimal.ROUND_HALF_UP));
|
||||
float saturation = dto.getSaturation().floatValue();
|
||||
//完成准时率 TODO 延期 / 总完成
|
||||
List<ZtTask> delayTaskList = taskList.stream().filter(o->u.getAccount().equals(o.getAssignedTo())).filter(o -> o.getFinishedDate() != null
|
||||
&& o.getFinishedDate().getTime() > DateUtils.getDayLast(o.getDeadline()).getTime()).collect(Collectors.toList());
|
||||
List<ZtTask> delayTaskList =null;
|
||||
try {
|
||||
delayTaskList = taskList.stream().filter(o->u.getAccount().equals(o.getAssignedTo())).filter(o -> o.getFinishedDate() != null
|
||||
&& o.getFinishedDate().getTime() > DateUtils.getDayLast(o.getDeadline()).getTime()).collect(Collectors.toList());
|
||||
}catch (Exception e){
|
||||
log.error("",e);
|
||||
}
|
||||
|
||||
dto.setFinishTask(BigDecimal.valueOf(taskTimeList.stream().filter(o->o.getFinishedDate()!=null).map(o->o.getEstimate()).collect(Collectors.toList()).size()));
|
||||
dto.setDelayTask(BigDecimal.valueOf(delayTaskList.size()));
|
||||
//准时完成率
|
||||
|
@ -2,6 +2,7 @@ package com.sa.zentao.service.impl;
|
||||
|
||||
import ch.qos.logback.core.util.StringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@ -19,6 +20,7 @@ import com.sa.zentao.enums.UserType;
|
||||
import com.sa.zentao.mapper.ZtBugMapper;
|
||||
import com.sa.zentao.qo.ZtBugQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import com.sa.zentao.qo.ZtReleaseQo;
|
||||
import com.sa.zentao.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.utils.BeanCopyUtil;
|
||||
@ -83,6 +85,9 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
@Autowired
|
||||
private IZtStoryFeedbackService storyFeedbackService;
|
||||
|
||||
@Autowired
|
||||
private IZtReleaseService releaseService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@ -137,6 +142,9 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
if(ztUser!=null){
|
||||
bug.setYsUserName(ztUser.getNickname());
|
||||
}
|
||||
if(bug.getDeadline()!=null){
|
||||
bug.setDeadline(DateUtils.getDayLast(bug.getDeadline()));
|
||||
}
|
||||
}
|
||||
}
|
||||
PageInfo<ZtBugDTO> ztBugDTOPageInfo = new PageInfo<>(result);
|
||||
@ -217,6 +225,9 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
if(ztUser!=null){
|
||||
bug.setYsUserName(ztUser.getNickname());
|
||||
}
|
||||
if(bug.getDeadline()!=null){
|
||||
bug.setDeadline(DateUtils.getDayLast(bug.getDeadline()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -242,6 +253,11 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
Integer tostory = ztBug.getTostory();
|
||||
ZtBugDTO d=new ZtBugDTO();
|
||||
BeanUtils.copyProperties(ztBug,d);
|
||||
ZtRelease release = this.releaseService.getReleaseByBug(id);
|
||||
if(release!=null){
|
||||
d.setReleaseId(release.getId());
|
||||
d.setReleaseName(release.getName());
|
||||
}
|
||||
if(project!=null&&project!=0){
|
||||
d.setZtProject(this.projectService.getById(project));
|
||||
}
|
||||
@ -562,7 +578,13 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
ztBug.setLastediteddate(new Date());
|
||||
ztBug.setStatus("active");
|
||||
this.baseMapper.updateById(ztBug);
|
||||
|
||||
if(dto.getReleaseId()!=null&&dto.getReleaseId()!=0){
|
||||
this.releaseService.changeRelease(dto.getReleaseId(),ztBug.getId(),"bug");
|
||||
}else{
|
||||
ZtReleaseQo qo =new ZtReleaseQo();
|
||||
qo.setBugList(Arrays.asList(ztBug.getId()));
|
||||
this.releaseService.removeBug(qo);
|
||||
}
|
||||
fileService.updateFile(dto.getFiles(),ztBug.getId(), FileTypes.bug);
|
||||
|
||||
this.actionService.addAction(ActionType.BUG, ActionStatus.BJ,ztBug.getId(),ztBug.getProject()+"",ztBug.getProject(),ztBug.getExecution()
|
||||
@ -670,12 +692,20 @@ public class ZtBugServiceImpl extends ServiceImpl<ZtBugMapper, ZtBug> implements
|
||||
if(ztBug.getStatus().equals("closed")){
|
||||
throw new BusinessException("已关闭");
|
||||
}
|
||||
ztBug.setStatus("active");
|
||||
ztBug.setLastediteddate(new Date());
|
||||
ztBug.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
this.baseMapper.updateById(ztBug);
|
||||
if(ztBug.getReleaseFlag().equals(1)){
|
||||
throw new BusinessException("已发布的bug无法重新激活");
|
||||
}
|
||||
// ztBug.setStatus("active");
|
||||
// ztBug.setLastediteddate(new Date());
|
||||
// ztBug.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
// this.baseMapper.updateById(ztBug);
|
||||
this.baseMapper.update(new UpdateWrapper<ZtBug>().lambda().set(ZtBug::getStatus,"active").set(ZtBug::getLastediteddate,new Date())
|
||||
.set(ZtBug::getLasteditedby,RiskUserThreadLocal.get().getName())
|
||||
.set(ZtBug::getResolvedby,"")
|
||||
.set(ZtBug::getResolveddate,null)
|
||||
.eq(ZtBug::getId,ztBug.getId()));
|
||||
if(ztBug.getExecution()!=null&&ztBug.getExecution()!=0) {
|
||||
kanbanlaneService.changeStatus(ztBug.getExecution(), ztBug.getId(), "bug", "fixing");
|
||||
kanbanlaneService.changeStatus(ztBug.getExecution(), ztBug.getId(), "bug", "unconfirmed");
|
||||
}
|
||||
|
||||
this.actionService.addAction(ActionType.BUG, ActionStatus.JH,ztBug.getId(),ztBug.getProject()+"",ztBug.getProject(),ztBug.getExecution()
|
||||
|
@ -0,0 +1,92 @@
|
||||
package com.sa.zentao.service.impl;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
||||
import com.sa.zentao.dao.BusinessException;
|
||||
import com.sa.zentao.dao.ZtBugDTO;
|
||||
import com.sa.zentao.dao.ZtComputerSourceDTO;
|
||||
import com.sa.zentao.entity.ZtComputerSource;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
import com.sa.zentao.enums.ActionType;
|
||||
import com.sa.zentao.mapper.ZtComputerSourceMapper;
|
||||
import com.sa.zentao.qo.ZtComputerSourceQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import com.sa.zentao.service.IZtActionService;
|
||||
import com.sa.zentao.service.IZtComputerSourceService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.service.IZtUserService;
|
||||
import com.sa.zentao.utils.DateUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
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.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
* @since 2025-04-07
|
||||
*/
|
||||
@Service
|
||||
public class ZtComputerSourceServiceImpl extends ServiceImpl<ZtComputerSourceMapper, ZtComputerSource> implements IZtComputerSourceService {
|
||||
|
||||
@Autowired
|
||||
private IZtUserService userService;
|
||||
|
||||
@Autowired
|
||||
private IZtActionService actionService;
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtComputerSourceDTO> pageList(ZtComputerSourceQo qo) {
|
||||
|
||||
////1年内、3年内、3~5年、5~7年,7年以上 1 2 3 4 5
|
||||
String yearSearch = qo.getYearSearch();
|
||||
|
||||
|
||||
Page<ZtComputerSourceDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
List<ZtComputerSourceDTO> list = this.baseMapper.pageList(qo);
|
||||
PageInfo<ZtComputerSourceDTO> ztBugDTOPageInfo = new PageInfo<>(list);
|
||||
return ztBugDTOPageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addComputerSource(ZtComputerSourceDTO dto) {
|
||||
|
||||
ZtComputerSource info=new ZtComputerSource();
|
||||
BeanUtils.copyProperties(dto,info);
|
||||
info.setCreateDate(new Date());
|
||||
info.setCreateUser(RiskUserThreadLocal.get().getName());
|
||||
info.setUpdateDate(new Date());
|
||||
info.setUpdateUser(RiskUserThreadLocal.get().getName());
|
||||
this.baseMapper.insert(info);
|
||||
this.actionService.addAction(ActionType.SOURCE, ActionStatus.XJ,info.getId(),"",null,null
|
||||
,RiskUserThreadLocal.get().getName(),null,null
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modify(ZtComputerSourceDTO dto) {
|
||||
ZtComputerSource ztComputerSource = this.baseMapper.selectById(dto.getId());
|
||||
if(ztComputerSource==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
BeanUtils.copyProperties(dto,ztComputerSource);
|
||||
ztComputerSource.setUpdateUser(RiskUserThreadLocal.get().getName());
|
||||
ztComputerSource.setUpdateDate(new Date());
|
||||
this.baseMapper.updateById(ztComputerSource);
|
||||
this.actionService.addAction(ActionType.SOURCE, ActionStatus.XJ,ztComputerSource.getId(),"",null,null
|
||||
,RiskUserThreadLocal.get().getName(),null,null
|
||||
);
|
||||
}
|
||||
}
|
@ -52,9 +52,12 @@ public class ZtEffortServiceImpl extends ServiceImpl<ZtEffortMapper, ZtEffort> i
|
||||
}
|
||||
|
||||
List saveList=new ArrayList();
|
||||
Float consumed =0f;
|
||||
//剩余工时
|
||||
BigDecimal left = BigDecimal.valueOf(ztTask.getLeft());
|
||||
|
||||
BigDecimal consumed =BigDecimal.ZERO;
|
||||
for (ZtEffortDTO d:list) {
|
||||
if(d.getLeft()==0&&d.getConsumed()==0){
|
||||
if(d.getConsumed()==0){
|
||||
continue;
|
||||
}
|
||||
ZtEffort ztEffort = new ZtEffort();
|
||||
@ -65,8 +68,11 @@ public class ZtEffortServiceImpl extends ServiceImpl<ZtEffortMapper, ZtEffort> i
|
||||
ztEffort.setAccount(RiskUserThreadLocal.get().getName());
|
||||
ztEffort.setDeleted("0");
|
||||
ztEffort.setProject(ztTask.getProject());
|
||||
left =left.subtract(BigDecimal.valueOf(ztEffort.getConsumed()));
|
||||
float fLeft = left.floatValue();
|
||||
ztEffort.setLeft(fLeft<0?0:fLeft);
|
||||
saveList.add(ztEffort);
|
||||
consumed=d.getLeft();
|
||||
consumed=consumed.add(BigDecimal.valueOf(ztEffort.getConsumed()));
|
||||
}
|
||||
if(CollectionUtils.isEmpty(saveList)){
|
||||
throw new BusinessException("请检查工时");
|
||||
@ -86,9 +92,10 @@ public class ZtEffortServiceImpl extends ServiceImpl<ZtEffortMapper, ZtEffort> i
|
||||
}
|
||||
}
|
||||
//剩余
|
||||
ztTask.setLeft(max.getLeft());
|
||||
if(ztTask.getLeft()<0){
|
||||
if(left.floatValue()<0){
|
||||
ztTask.setLeft(0f);
|
||||
}else{
|
||||
ztTask.setLeft(left.floatValue());
|
||||
}
|
||||
ztTask.setConsumed(ztTask.getConsumed()+f);
|
||||
this.saveBatch(saveList);
|
||||
|
@ -311,19 +311,47 @@ public class ZtKanbanlaneServiceImpl extends ServiceImpl<ZtKanbanlaneMapper, ZtK
|
||||
|
||||
List<ZtKanbancolumnDTO> ztKanbancolumnDTOS = this.kanbancolumnMapper.listByLaneIds(Arrays.asList(lane.getId()));
|
||||
|
||||
List<ZtKanbancolumnDTO> backlog = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("backlog")).collect(Collectors.toList());
|
||||
ZtKanbancolumnDTO ztKanbancolumnDTO = backlog.get(0);
|
||||
for (ZtStory st:ztStories ) {
|
||||
|
||||
ZtKanbancell kanbancell = this.kanbancellService.getOne(new QueryWrapper<ZtKanbancell>().lambda()
|
||||
.eq(ZtKanbancell::getKanban, id).eq(ZtKanbancell::getColumn, ztKanbancolumnDTO.getId()));
|
||||
|
||||
if(StringUtils.isEmpty(kanbancell.getCards())){
|
||||
kanbancell.setCards(StringUtils.join(ztStories.stream().map(o->o.getId()).collect(Collectors.toList()),","));
|
||||
}else{
|
||||
kanbancell.setCards(kanbancell.getCards()+","+StringUtils.join(ztStories.stream().map(o->o.getId()).collect(Collectors.toList()),","));
|
||||
ZtKanbancolumnDTO ztKanbancolumnDTO =null;
|
||||
if("closed".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("closed")).collect(Collectors.toList()).get(0);
|
||||
}else if ("wait".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("backlog")).collect(Collectors.toList()).get(0);
|
||||
}else if ("projected".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("backlog")).collect(Collectors.toList()).get(0);
|
||||
}else if ("developing".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("developing")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}else if ("developed".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("developed")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}else if ("testing".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("testing")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}else if ("tested".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("tested")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}else if ("released".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("released")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}else if ("verified".equals(st.getStage())){
|
||||
ztKanbancolumnDTO = ztKanbancolumnDTOS.stream().filter(o -> o.getType().equals("verified")).collect(Collectors.toList()).get(0);
|
||||
|
||||
}
|
||||
ZtKanbancell kanbancell = this.kanbancellService.getOne(new QueryWrapper<ZtKanbancell>().lambda()
|
||||
.eq(ZtKanbancell::getKanban, id).eq(ZtKanbancell::getColumn, ztKanbancolumnDTO.getId()));
|
||||
if(StringUtils.isEmpty(kanbancell.getCards())){
|
||||
kanbancell.setCards(StringUtils.join(ztStories.stream().map(o->o.getId()).collect(Collectors.toList()),","));
|
||||
}else{
|
||||
kanbancell.setCards(kanbancell.getCards()+","+StringUtils.join(ztStories.stream().map(o->o.getId()).collect(Collectors.toList()),","));
|
||||
}
|
||||
|
||||
kanbancellService.updateById(kanbancell);
|
||||
}
|
||||
|
||||
kanbancellService.updateById(kanbancell);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ import com.sa.zentao.dao.ZtMeetingDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.entity.ZtMeeting;
|
||||
import com.sa.zentao.entity.ZtProduct;
|
||||
import com.sa.zentao.entity.ZtStoryUser;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
import com.sa.zentao.enums.ActionType;
|
||||
@ -73,6 +74,9 @@ public class ZtMeetingServiceImpl extends ServiceImpl<ZtMeetingMapper, ZtMeeting
|
||||
@Autowired
|
||||
private IZtActionService actionService;
|
||||
|
||||
@Autowired
|
||||
private IZtStoryUserService storyUserService;
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtMeetingDTO> pageList(ZtMeetingQo qo) {
|
||||
Page<ZtStoryDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
@ -168,7 +172,13 @@ public class ZtMeetingServiceImpl extends ServiceImpl<ZtMeetingMapper, ZtMeeting
|
||||
ZtMeetingDTO ztMeetingDTO = new ZtMeetingDTO();
|
||||
|
||||
BeanUtils.copyProperties(ztMeeting,ztMeetingDTO);
|
||||
if(ztMeetingDTO.getUserStory()!=null&&ztMeetingDTO.getUserStory()!=0){
|
||||
ZtStoryUser storyUser = this.storyUserService.getById(ztMeetingDTO.getUserStory());
|
||||
if(storyUser!=null){
|
||||
ztMeetingDTO.setUserStoryName(storyUser.getTitle());
|
||||
}
|
||||
|
||||
}
|
||||
if(ztMeetingDTO.getProductId()!=null){
|
||||
ZtProduct product = this.productService.getById(ztMeetingDTO.getProductId());
|
||||
|
||||
|
@ -1827,9 +1827,21 @@ public class ZtProjectServiceImpl extends ServiceImpl<ZtProjectMapper, ZtProject
|
||||
if (CollectionUtils.isEmpty(ztProjects)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
// 查询日期范围内的迭代
|
||||
List<Integer> execFilterList = ztProjects.stream().filter(o -> (o.getBegin().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getBegin().getTime() <= lastDayOfMonth.getTime()) || (
|
||||
o.getEnd().getTime() >= firstDayOfMonth.getTime()
|
||||
&& o.getEnd().getTime() <= lastDayOfMonth.getTime()
|
||||
)
|
||||
|
||||
)
|
||||
.map(o -> o.getId()).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(execFilterList)){
|
||||
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()).collect(Collectors.toList())));
|
||||
.in(ZtTeam::getRoot, execFilterList));
|
||||
|
||||
List<String> accountIds = teams.stream().map(o -> o.getAccount()).distinct().collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(accountIds)) {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.sa.zentao.service.impl;
|
||||
|
||||
import com.sa.zentao.dao.ZtBugDTO;
|
||||
import com.sa.zentao.dao.ZtStoryDTO;
|
||||
import com.sa.zentao.entity.ZtReleaseDetails;
|
||||
import com.sa.zentao.mapper.ZtReleaseDetailsMapper;
|
||||
@ -22,12 +23,22 @@ import java.util.List;
|
||||
public class ZtReleaseDetailsServiceImpl extends ServiceImpl<ZtReleaseDetailsMapper, ZtReleaseDetails> implements IZtReleaseDetailsService {
|
||||
|
||||
@Override
|
||||
public List<ZtStoryDTO> releasePageList(ZtReleaseQo qo) {
|
||||
return this.baseMapper.releasePageList(qo);
|
||||
public List<ZtStoryDTO> releaseStoryPageList(ZtReleaseQo qo) {
|
||||
return this.baseMapper.releaseStoryPageList(qo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtStoryDTO> storyPageList(ZtReleaseQo qo) {
|
||||
return this.baseMapper.storyPageList(qo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtBugDTO> releaseBugPageList(ZtReleaseQo qo) {
|
||||
return this.baseMapper.releaseBugPageList(qo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtBugDTO> releaseNotSyncBugPageList(ZtReleaseQo qo) {
|
||||
return this.baseMapper.releaseNotSyncBugPageList(qo);
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,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.DateUtils;
|
||||
import com.sa.zentao.utils.SendEmail;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -30,7 +31,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
@ -62,25 +63,29 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Autowired
|
||||
private IZtStoryService storyService;
|
||||
|
||||
@Autowired
|
||||
private IZtBugService bugService;
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void addRelease(ZtReleaseDTO dto) {
|
||||
Integer project = dto.getProject();
|
||||
|
||||
|
||||
if(project==null||project==0){
|
||||
if (project == null || project == 0) {
|
||||
throw new BusinessException("请选择项目");
|
||||
}
|
||||
|
||||
|
||||
ZtRelease ztRelease = new ZtRelease();
|
||||
BeanUtils.copyProperties(dto,ztRelease);
|
||||
BeanUtils.copyProperties(dto, ztRelease);
|
||||
ztRelease.setCreatedby(RiskUserThreadLocal.get().getName());
|
||||
ztRelease.setStatus("reviewing");
|
||||
ztRelease.setStatus("active");
|
||||
ztRelease.setCreateddate(new Date());
|
||||
ZtProjectproduct projectproduct = this.projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda()
|
||||
.eq(ZtProjectproduct::getProject, project));
|
||||
if(projectproduct!=null){
|
||||
if (projectproduct != null) {
|
||||
ztRelease.setProduct(projectproduct.getProduct());
|
||||
}
|
||||
|
||||
@ -88,43 +93,47 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
|
||||
|
||||
String execStr = dto.getExecutions();
|
||||
if(!StringUtils.isEmpty(execStr)){
|
||||
if (!StringUtils.isEmpty(execStr)) {
|
||||
List<String> execIds = new ArrayList<String>(Arrays.asList(execStr.split(",")));
|
||||
|
||||
List<ZtProjectstory> list = this.projectstoryService.list(new QueryWrapper<ZtProjectstory>().lambda()
|
||||
.in(ZtProjectstory::getProject, execIds)
|
||||
.eq(ZtProjectstory::getType, ProjectTypeEnums.execution.getValue())
|
||||
);
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
//当前迭代下所有 测试完成的任务
|
||||
List<ZtStory> sList = this.storyService.list(new QueryWrapper<ZtStory>()
|
||||
.lambda().eq(ZtStory::getStatus, "active")
|
||||
.in(ZtStory::getId,list.stream().map(o->o.getStory()).distinct().collect(Collectors.toList()))
|
||||
.in(ZtStory::getId, list.stream().map(o -> o.getStory()).distinct().collect(Collectors.toList()))
|
||||
.eq(ZtStory::getStage, StoryStageEnums.tested.getValue()));
|
||||
if(!CollectionUtils.isEmpty(sList)){
|
||||
if (!CollectionUtils.isEmpty(sList)) {
|
||||
//没有被关联的需求 测试完成的
|
||||
List<ZtReleaseDetails> releaseStoryList = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.ne(ZtReleaseDetails::getStatus,"closed")
|
||||
.eq(ZtReleaseDetails::getObjectType,"story")
|
||||
.ne(ZtReleaseDetails::getStatus, "closed")
|
||||
.eq(ZtReleaseDetails::getObjectType, "story")
|
||||
.in(ZtReleaseDetails::getObjectId, sList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
List<Integer> sIds = releaseStoryList.stream().map(o -> o.getObjectId().intValue()).collect(Collectors.toList());
|
||||
|
||||
|
||||
List<ZtReleaseDetails> saveBatch=new ArrayList<>();
|
||||
for (ZtStory s:sList) {
|
||||
if(!sIds.contains(s.getId())){
|
||||
ZtReleaseDetails e=new ZtReleaseDetails();
|
||||
e.setObjectId(s.getId());
|
||||
e.setObjectType("story");
|
||||
e.setReleaseId(ztRelease.getId());
|
||||
e.setStatus("wait");
|
||||
saveBatch.add(e);
|
||||
List<ZtReleaseDetails> saveBatch = new ArrayList<>();
|
||||
for (ZtStory s : sList) {
|
||||
if (!sIds.contains(s.getId())) {
|
||||
ZtReleaseDetails e = new ZtReleaseDetails();
|
||||
e.setObjectId(s.getId());
|
||||
e.setObjectType("story");
|
||||
e.setReleaseId(ztRelease.getId());
|
||||
e.setStatus("wait");
|
||||
saveBatch.add(e);
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isEmpty(saveBatch)){
|
||||
throw new BusinessException("当前没有符合发布的需求,请检查");
|
||||
if (CollectionUtils.isEmpty(saveBatch)) {
|
||||
// throw new BusinessException("当前没有符合发布的需求,请检查");
|
||||
} else {
|
||||
releaseDetailsService.saveBatch(saveBatch);
|
||||
}
|
||||
releaseDetailsService.saveBatch(saveBatch);
|
||||
}else{
|
||||
throw new BusinessException("当前没有符合发布的需求,请检查");
|
||||
|
||||
} else {
|
||||
// throw new BusinessException("当前没有符合发布的需求,请检查");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -137,45 +146,54 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Transactional
|
||||
public void modifyRelease(ZtReleaseDTO dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if (!Arrays.asList("active","reviewing").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
String danger = ztRelease.getDanger();
|
||||
String executions = ztRelease.getExecutions();
|
||||
|
||||
|
||||
if(ztRelease==null){
|
||||
if (ztRelease == null) {
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
BeanUtils.copyProperties(dto,ztRelease,"id");
|
||||
BeanUtils.copyProperties(dto, ztRelease, "id");
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
|
||||
String project = ztRelease.getExecutions();
|
||||
String[] split = project.split(",");
|
||||
// String project = ztRelease.getExecutions();
|
||||
// String[] split = project.split(",");
|
||||
|
||||
|
||||
String execStr = dto.getExecutions();
|
||||
if(!StringUtils.isEmpty(execStr)&&!execStr.equals(executions)){
|
||||
if (!StringUtils.isEmpty(execStr) && !execStr.equals(executions)) {
|
||||
List<String> execIds = new ArrayList<String>(Arrays.asList(execStr.split(",")));
|
||||
|
||||
List<ZtProjectstory> list = this.projectstoryService.list(new QueryWrapper<ZtProjectstory>().lambda()
|
||||
.in(ZtProjectstory::getProject, execIds)
|
||||
.eq(ZtProjectstory::getType, ProjectTypeEnums.execution.getValue())
|
||||
);
|
||||
List<Integer> eIds = new ArrayList<>();
|
||||
for (String s : execIds) {
|
||||
eIds.add(Integer.valueOf(s));
|
||||
}
|
||||
List<ZtProjectstory> list = this.projectstoryService.projectListByStory(eIds, ProjectTypeEnums.execution);
|
||||
|
||||
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
//迭代下所有的测试完成需求
|
||||
List<ZtStory> sList = this.storyService.list(new QueryWrapper<ZtStory>()
|
||||
.lambda().eq(ZtStory::getStatus, "active")
|
||||
.in(ZtStory::getId,list.stream().map(o->o.getStory()).distinct().collect(Collectors.toList()))
|
||||
.in(ZtStory::getId, list.stream().map(o -> o.getStory()).distinct().collect(Collectors.toList()))
|
||||
.eq(ZtStory::getStage, StoryStageEnums.tested.getValue()));
|
||||
if(!CollectionUtils.isEmpty(sList)){
|
||||
if (!CollectionUtils.isEmpty(sList)) {
|
||||
List<ZtReleaseDetails> releaseStoryList = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.in(ZtReleaseDetails::getObjectId, sList.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
.in(ZtReleaseDetails::getObjectId, sList.stream().map(o -> o.getId()).collect(Collectors.toList()))
|
||||
.eq(ZtReleaseDetails::getObjectType, "story")
|
||||
.ne(ZtReleaseDetails::getStatus, "closed")
|
||||
);
|
||||
List<Integer> sIds = releaseStoryList.stream().map(o -> o.getObjectId().intValue()).collect(Collectors.toList());
|
||||
this.releaseDetailsService.remove(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getReleaseId,ztRelease.getId()));
|
||||
this.releaseDetailsService.remove(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getReleaseId, ztRelease.getId())
|
||||
.ne(ZtReleaseDetails::getObjectType, "bug")
|
||||
);
|
||||
|
||||
List<ZtReleaseDetails> saveBatch=new ArrayList<>();
|
||||
for (ZtStory s:sList) {
|
||||
if(!sIds.contains(s.getId())){
|
||||
ZtReleaseDetails e=new ZtReleaseDetails();
|
||||
List<ZtReleaseDetails> saveBatch = new ArrayList<>();
|
||||
for (ZtStory s : sList) {
|
||||
if (!sIds.contains(s.getId())) {
|
||||
ZtReleaseDetails e = new ZtReleaseDetails();
|
||||
e.setObjectId(s.getId());
|
||||
e.setObjectType("story");
|
||||
e.setReleaseId(ztRelease.getId());
|
||||
@ -189,7 +207,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
}
|
||||
|
||||
actionService.addAction(ActionType.FB, ActionStatus.BJ, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(),danger==null?null: danger.equals(dto.getDanger())?"":dto.getDanger(), "");
|
||||
RiskUserThreadLocal.get().getName(), danger == null ? null : danger.equals(dto.getDanger()) ? "" : dto.getDanger(), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -199,27 +217,26 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
|
||||
List<ZtReleaseDTO> list = this.baseMapper.pageList(qo);
|
||||
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
Map<String, ZtUser> userMap = userService.userMapByIds(null);
|
||||
|
||||
List<ZtReleaseDetails> details = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda().in(ZtReleaseDetails::getReleaseId, list.stream().map(o -> o.getId()).collect(Collectors.toList())));
|
||||
|
||||
|
||||
|
||||
for (ZtReleaseDTO dto:list) {
|
||||
for (ZtReleaseDTO dto : list) {
|
||||
|
||||
// ZtReleaseDetailsDTO
|
||||
List<ZtReleaseDetails> fDetails = details.stream().filter(o -> o.getReleaseId().intValue() == dto.getId().intValue()).collect(Collectors.toList());
|
||||
|
||||
if(!CollectionUtils.isEmpty(fDetails)){
|
||||
if (!CollectionUtils.isEmpty(fDetails)) {
|
||||
dto.setDetails(BeanCopyUtil.copyListProperties(fDetails, ZtReleaseDetailsDTO::new));
|
||||
}
|
||||
ZtUser ztUser = userMap.get(dto.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
dto.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(dto.getCreatedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
dto.setCreatedbyName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
@ -231,7 +248,7 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Override
|
||||
public void assignedTo(ZtReleaseQo dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
if (ztRelease == null) {
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
ztRelease.setAssignedTo(dto.getAssignedTo());
|
||||
@ -244,30 +261,29 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Transactional
|
||||
public void userReview(ZtReleaseQo dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
if (ztRelease == null) {
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
if(!"reviewing".equals(ztRelease.getStatus())){
|
||||
if (!"reviewing".equals(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无需评审");
|
||||
}
|
||||
//0 不通过
|
||||
if(dto.getRevieweResult()==1){
|
||||
if (dto.getRevieweResult() == 1) {
|
||||
ztRelease.setStatus("waitRelease");
|
||||
}else{
|
||||
ztRelease.setStatus("closed");
|
||||
} else {
|
||||
ztRelease.setStatus("reviewingError");
|
||||
ztRelease.setFailRemark(dto.getFailRemark());
|
||||
String project = ztRelease.getExecutions();
|
||||
String[] split = project.split(",");
|
||||
List<ZtReleaseDetails> executions = releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getReleaseId,ztRelease.getId())
|
||||
);
|
||||
for (ZtReleaseDetails s:executions ) {
|
||||
s.setStatus("closed");
|
||||
releaseDetailsService.updateById(s);
|
||||
}
|
||||
// String project = ztRelease.getExecutions();
|
||||
// String[] split = project.split(",");
|
||||
// List<ZtReleaseDetails> executions = releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
// .eq(ZtReleaseDetails::getReleaseId, ztRelease.getId())
|
||||
// );
|
||||
// for (ZtReleaseDetails s : executions) {
|
||||
// s.setStatus("closed");
|
||||
// releaseDetailsService.updateById(s);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
|
||||
actionService.addAction(ActionType.FB, ActionStatus.PS, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
@ -280,90 +296,162 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
public void release(ZtReleaseQo dto) {
|
||||
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
if (ztRelease == null) {
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
|
||||
if (!Arrays.asList("waitRelease").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法发布");
|
||||
}
|
||||
//0 不通过
|
||||
if(dto.getRevieweResult()==0){
|
||||
if (dto.getRevieweResult() == 0) {
|
||||
|
||||
ztRelease.setStatus("closed");
|
||||
ztRelease.setReleaseFailRemark(dto.getReleaseFailRemark());
|
||||
String project = ztRelease.getExecutions();
|
||||
String[] split = project.split(",");
|
||||
List<ZtReleaseDetails> executions = releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getReleaseId,ztRelease.getId())
|
||||
.eq(ZtReleaseDetails::getReleaseId, ztRelease.getId())
|
||||
);
|
||||
for (ZtReleaseDetails s:executions ) {
|
||||
for (ZtReleaseDetails s : executions) {
|
||||
s.setStatus("closed");
|
||||
releaseDetailsService.updateById(s);
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
ztRelease.setStatus("released");
|
||||
}
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
if(1==dto.getPushFlag()){
|
||||
if (1 == dto.getPushFlag()) {
|
||||
//推送
|
||||
ZtNotice notice=new ZtNotice();
|
||||
ZtNotice notice = new ZtNotice();
|
||||
notice.setName(dto.getTitle());
|
||||
notice.setTitle(dto.getTitle());
|
||||
notice.setRemark(dto.getRemark());
|
||||
notice.setCreateDate(new Date());
|
||||
notice.setCreateUser(RiskUserThreadLocal.get().getName());
|
||||
notice.setLoseDate(DateUtils.dateAddDay(new Date(),30));
|
||||
notice.setLoseDate(DateUtils.dateAddDay(new Date(), 30));
|
||||
notice.setObjectType("release");
|
||||
notice.setObjectId(ztRelease.getId());
|
||||
notice.setFlag(0);
|
||||
noticeService.save(notice);
|
||||
}
|
||||
List<ZtReleaseDetails> details = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getReleaseId, ztRelease.getId()).ne(ZtReleaseDetails::getStatus,"closed").eq(ZtReleaseDetails::getObjectType, "story"));
|
||||
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>();
|
||||
for (ZtReleaseDetails d:details ) {
|
||||
storyList.add(d.getObjectId());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
// List<ZtProjectstory> list = this.projectstoryService.list(new QueryWrapper<ZtProjectstory>().lambda()
|
||||
// .in(ZtProjectstory::getStory, split).ne(ZtProjectstory::getExecution,0));
|
||||
if(CollectionUtils.isEmpty(storyList)){
|
||||
if (CollectionUtils.isEmpty(storyList) &&CollectionUtils.isEmpty(bugList) ) {
|
||||
throw new BusinessException("当前迭代无需求无法发布");
|
||||
}
|
||||
List<ZtStory> ztStories = storyService.listByIds(storyList);
|
||||
|
||||
ZtProduct product = this.productService.getById(ztRelease.getProduct());
|
||||
if(dto.getRevieweResult()==1){
|
||||
for (ZtStory st:ztStories) {
|
||||
if("active".equals(st.getStatus())&&"wait".equals(st.getStage())){
|
||||
continue;
|
||||
}
|
||||
if("closed".equals(st.getStatus())||"closed".equals(st.getStage())){
|
||||
continue;
|
||||
}
|
||||
if(!"tested".equals(st.getStage())){
|
||||
throw new BusinessException(st.getTitle()+" 当前需求无法发布,请检查");
|
||||
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) {
|
||||
long notTested = ztStories.stream().filter(o -> !o.getStage().equals("tested")).count();
|
||||
if(notTested>0){
|
||||
throw new BusinessException("当前需求存在未测试完成的请检查");
|
||||
}
|
||||
//'active','resolved','closed'?
|
||||
long count = bugs.stream().filter(o -> !Arrays.asList("resolved","closed").contains(o.getStatus())).count();
|
||||
if(count>0){
|
||||
throw new BusinessException("当前bug存在未完成请检查");
|
||||
}
|
||||
for (ZtStory st : ztStories) {
|
||||
if (!"tested".equals(st.getStage())) {
|
||||
throw new BusinessException(st.getTitle() + " 当前需求无法发布,请检查");
|
||||
}
|
||||
this.storyService.releaseStory(st.getId());
|
||||
}
|
||||
product.setReleases(product.getReleases()+ztStories.size());
|
||||
this.productService.updateById(product);
|
||||
for (ZtBug b : bugs) {
|
||||
b.setReleaseFlag(1);
|
||||
b.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
b.setLastediteddate(new Date());
|
||||
this.bugService.updateById(b);
|
||||
}
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
List<String> mailTo =new ArrayList<>();
|
||||
StringBuilder b=new StringBuilder();
|
||||
b.append("<table 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;\">" +
|
||||
"<tbody style=\"border: none\">" +
|
||||
"<tr style=\"\n" +
|
||||
" border: none !important;\n" +
|
||||
"\"><td style=\"width: 157.638px;height: 33.993px;border: none !important;border-width: 1px;border-style: solid;border-color: rgb(171, 171, 171);vertical-align: middle;box-sizing: border-box;padding: 4px 8px; border: none !important\"><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=\"width: 524.769px; height: 33.993px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); vertical-align: middle; box-sizing: border-box; padding: 4px 8px;border: none !important\"><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=\"width: 202.274px; height: 33.993px; border-width: 1px; border-style: solid; border-color: rgb(171, 171, 171); vertical-align: middle; box-sizing: border-box; padding: 4px 8px; border: none !important\"><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="<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());
|
||||
|
||||
//{userName} {title} {id}
|
||||
String str= "<tr><td style=\"width: 157.638px; height: 82.4866px; 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: 524.769px; height: 82.4866px; 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: 202.274px; height: 82.4866px; 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;\">{userName}</span></div></td></tr>" ;
|
||||
str=str.replace("{userName}",ztUser.getNickname());
|
||||
str=str.replace("{title}",s.getTitle());
|
||||
str=str.replace("{id}",s.getId().toString());
|
||||
b.append(str);
|
||||
mailTo.add(ztUser.getEmail());
|
||||
}
|
||||
|
||||
}
|
||||
b.append( "</tbody>" );
|
||||
b.append( "</table>");
|
||||
if(!CollectionUtils.isEmpty(mailTo)){
|
||||
SendEmail.sendMessage("需求发布提醒:",mailTo,
|
||||
null,
|
||||
b.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
// if(!StringUtils.isEmpty(ysUser)){
|
||||
// ZtUser ztUser = this.userService.selectByName(ysUser);
|
||||
// if(ztUser!=null&&!StringUtils.isEmpty(ztUser.getEmail())){
|
||||
// try {
|
||||
// StringBuilder b=new StringBuilder();
|
||||
// b.append("<div>尊敬的{userName}:</div>");
|
||||
// b.append("<div>您的需求 \"{id} {name}\"、\"{id} {name}\" 已发布,请及时登录系统验收。</div>");
|
||||
// String str = b.toString();
|
||||
// str= str.replace("{userName}",ztUser.getNickname());
|
||||
// str=str.replace("{id}",ztStory.getId().toString());
|
||||
// str=str.replace("{name}",ztStory.getTitle());
|
||||
// SendEmail.sendMail(ztUser.getEmail(),str,"需求发布提醒");
|
||||
// }catch (Exception e){
|
||||
// log.error("",e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
} else {
|
||||
actionService.addAction(ActionType.FB, ActionStatus.FBSB, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> execMenu(ZtReleaseQo qo) {
|
||||
public List<Map<String, Object>> execMenu(ZtReleaseQo qo) {
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IZtExecutionprojectService executionprojectService;
|
||||
|
||||
@ -379,24 +467,23 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
Integer id = qo.getId();
|
||||
Page<ZtReleaseDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
|
||||
List<ZtStoryDTO> list = this.releaseDetailsService.releasePageList(qo);
|
||||
List<ZtStoryDTO> list = this.releaseDetailsService.releaseStoryPageList(qo);
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
||||
|
||||
// Map<Integer, List<ZtProject>> executionMapByStory = this.storyService.getExecutionMapByStory(list);
|
||||
|
||||
|
||||
for (ZtStoryDTO d : list) {
|
||||
d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
// List<ZtProject> ztProject = executionMapByStory.get(d.getId());
|
||||
@ -407,71 +494,208 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
}
|
||||
return new PageInfo<ZtStoryDTO>(list);
|
||||
}
|
||||
@Override
|
||||
public PageInfo<ZtBugDTO> releaseBugPageList(ZtReleaseQo qo) {
|
||||
Integer id = qo.getId();
|
||||
Page<ZtReleaseDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
|
||||
List<ZtBugDTO> list = this.releaseDetailsService.releaseBugPageList(qo);
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
||||
for (ZtBugDTO d : list) {
|
||||
// d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
return new PageInfo<ZtBugDTO>(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtBugDTO> releaseNotSyncBugPageList(ZtReleaseQo qo) {
|
||||
Integer id = qo.getId();
|
||||
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(qo.getId());
|
||||
if(ztRelease==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
Page<ZtReleaseDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
qo.setProject(ztRelease.getProject());
|
||||
List<ZtBugDTO> list = this.releaseDetailsService.releaseNotSyncBugPageList(qo);
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
||||
for (ZtBugDTO d : list) {
|
||||
// d.setRevieweUser(d.getReviewedby().replaceAll(",", ""));
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
return new PageInfo<ZtBugDTO>(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void closeRelease(ZtReleaseQo dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
if(Arrays.asList("released","closed").contains(ztRelease.getStatus())){
|
||||
throw new BusinessException("当前无法关闭");
|
||||
}
|
||||
ztRelease.setStatus("closed");
|
||||
List<ZtReleaseDetails> releaseDetails = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getReleaseId, ztRelease.getId()));
|
||||
if(!CollectionUtils.isEmpty(releaseDetails)){
|
||||
for (ZtReleaseDetails r:releaseDetails ) {
|
||||
r.setStatus("closed");
|
||||
}
|
||||
this.releaseDetailsService.saveOrUpdateBatch(releaseDetails);
|
||||
}
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
actionService.addAction(ActionType.FB, ActionStatus.GB, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), dto.getRemark(), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void submitReviewing(ZtReleaseDTO dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
if(!ztRelease.getStatus().equals("active")){
|
||||
throw new BusinessException("当前无法提交评审");
|
||||
}
|
||||
ztRelease.setStatus("reviewing");
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
actionService.addAction(ActionType.FB, ActionStatus.SUBPS, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(),"", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void submitAgainReviewing(ZtReleaseDTO dto) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(dto.getId());
|
||||
if(ztRelease==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
if(!ztRelease.getStatus().equals("reviewingError")){
|
||||
throw new BusinessException("当前无法提交评审");
|
||||
}
|
||||
ztRelease.setFailRemark(null);
|
||||
ztRelease.setStatus("reviewing");
|
||||
this.baseMapper.updateById(ztRelease);
|
||||
actionService.addAction(ActionType.FB, ActionStatus.SUBPS, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(),"", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZtRelease getReleaseByStory(Integer id) {
|
||||
List<ZtReleaseDetails> list = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getObjectId, id)
|
||||
.eq(ZtReleaseDetails::getObjectType, "story").ne(ZtReleaseDetails::getStatus, "closed")
|
||||
);
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return null;
|
||||
}
|
||||
return this.baseMapper.selectById(list.get(0).getReleaseId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZtRelease getReleaseByBug(Integer id) {
|
||||
List<ZtReleaseDetails> list = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda().eq(ZtReleaseDetails::getObjectId, id)
|
||||
.eq(ZtReleaseDetails::getObjectType, "bug").ne(ZtReleaseDetails::getStatus, "closed")
|
||||
);
|
||||
if(CollectionUtils.isEmpty(list)){
|
||||
return null;
|
||||
}
|
||||
return this.baseMapper.selectById(list.get(0).getReleaseId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtStoryDTO> projectStoryPageList(ZtReleaseQo qo) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(qo.getId());
|
||||
|
||||
Integer project = ztRelease.getProject();
|
||||
String executions = ztRelease.getExecutions();
|
||||
String[] split = executions.split(",");
|
||||
List<Integer> execIds = new ArrayList();
|
||||
for (String s : split) {
|
||||
execIds.add(Integer.valueOf(s));
|
||||
}
|
||||
|
||||
// 项目查找所有迭代
|
||||
List<ZtExecutionproject> execList = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().eq(ZtExecutionproject::getProject, project));
|
||||
if(CollectionUtils.isEmpty(execList)){
|
||||
return new PageInfo<ZtStoryDTO>();
|
||||
}
|
||||
// List<ZtExecutionproject> execList = this.executionprojectService.list(new QueryWrapper<ZtExecutionproject>().lambda().eq(ZtExecutionproject::getProject, project));
|
||||
// if(CollectionUtils.isEmpty(execList)){
|
||||
// return new PageInfo<ZtStoryDTO>();
|
||||
// }
|
||||
//迭代查找所有需求
|
||||
List<ZtProjectstory> execStorys = projectstoryService.projectStoryList(execList.stream().map(o -> o.getExecution()).collect(Collectors.toList()),ProjectTypeEnums.execution);
|
||||
List<ZtProjectstory> execStorys = projectstoryService.projectStoryList(execIds, ProjectTypeEnums.execution);
|
||||
|
||||
if(CollectionUtils.isEmpty(execStorys)){
|
||||
if (CollectionUtils.isEmpty(execStorys)) {
|
||||
return new PageInfo<ZtStoryDTO>();
|
||||
}
|
||||
//过滤掉已关联的迭代需求
|
||||
List<Integer> storyIdList = execStorys.stream().map(o -> o.getStory()).collect(Collectors.toList());
|
||||
|
||||
List<ZtRelease> ztReleases = this.baseMapper.selectList(new QueryWrapper<ZtRelease>().lambda().eq(ZtRelease::getProject, project));
|
||||
// List<ZtRelease> ztReleases = this.baseMapper.selectList(new QueryWrapper<ZtRelease>().lambda().eq(ZtRelease::getProject, project));
|
||||
|
||||
List<ZtReleaseDetails> list = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.ne(ZtReleaseDetails::getStatus, "closed")
|
||||
.in(ZtReleaseDetails::getObjectId,storyIdList)
|
||||
.in(ZtReleaseDetails::getObjectId, storyIdList)
|
||||
.eq(ZtReleaseDetails::getObjectType, "story")
|
||||
);
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
List<Integer> fIds = list.stream().map(o -> o.getObjectId()).collect(Collectors.toList());
|
||||
|
||||
Iterator<ZtProjectstory> iterator = execStorys.iterator();
|
||||
while (iterator.hasNext()){
|
||||
while (iterator.hasNext()) {
|
||||
ZtProjectstory next = iterator.next();
|
||||
if(fIds.contains(next.getStory())){
|
||||
if (fIds.contains(next.getStory())) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
qo.setStoryList(execStorys.stream().map(o->o.getStory()).collect(Collectors.toList()));
|
||||
if(CollectionUtils.isEmpty(execStorys)){
|
||||
qo.setStoryList(execStorys.stream().map(o -> o.getStory()).collect(Collectors.toList()));
|
||||
if (CollectionUtils.isEmpty(execStorys)) {
|
||||
return new PageInfo<ZtStoryDTO>();
|
||||
}
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
Page<ZtReleaseDTO> page = PageHelper.startPage(qo.getCurrentPage(), qo.getPageSize());
|
||||
List<ZtStoryDTO> storyList = this.releaseDetailsService.storyPageList(qo);
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
||||
|
||||
// Map<Integer, ZtProject> executionMapByStory = this.storyService.getExecutionMapByStory(storyList);
|
||||
|
||||
|
||||
for (ZtStoryDTO d : storyList) {
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(d.getYsUser());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setYsUserName(ztUser.getNickname());
|
||||
}
|
||||
// ZtProject ztProject = executionMapByStory.get(d.getId());
|
||||
@ -486,15 +710,25 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Override
|
||||
@Transactional
|
||||
public void removeStory(ZtReleaseQo qo) {
|
||||
Integer id = qo.getId();
|
||||
Integer storyId = qo.getStoryId();
|
||||
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(id);
|
||||
|
||||
List<ZtReleaseDetails> releaseDetails = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getReleaseId, id)
|
||||
.in(ZtReleaseDetails::getObjectId, qo.getStoryList()).eq(ZtReleaseDetails::getObjectType,"story"));
|
||||
for (ZtReleaseDetails d:releaseDetails) {
|
||||
.in(ZtReleaseDetails::getObjectId, qo.getStoryList()).eq(ZtReleaseDetails::getObjectType, "story") .ne(ZtReleaseDetails::getStatus,"closed"));
|
||||
if(CollectionUtils.isEmpty(releaseDetails)){
|
||||
return;
|
||||
}
|
||||
|
||||
Integer id = qo.getId();
|
||||
if(id==null||id==0){
|
||||
id=releaseDetails.get(0).getReleaseId();
|
||||
}
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(id);
|
||||
if (!Arrays.asList("active").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
// if(ztRelease.getStatus().equals("active")){
|
||||
|
||||
// }
|
||||
for (ZtReleaseDetails d : releaseDetails) {
|
||||
d.setStatus("closed");
|
||||
}
|
||||
this.releaseDetailsService.saveOrUpdateBatch(releaseDetails);
|
||||
@ -503,13 +737,130 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBug(ZtReleaseQo qo) {
|
||||
List<ZtReleaseDetails> releaseDetails = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.in(ZtReleaseDetails::getObjectId, qo.getBugList()).eq(ZtReleaseDetails::getObjectType, "bug").ne(ZtReleaseDetails::getStatus,"closed"));
|
||||
if(CollectionUtils.isEmpty(releaseDetails)){
|
||||
return;
|
||||
}
|
||||
|
||||
Integer id = qo.getId();
|
||||
if(id==null||id==0){
|
||||
id=releaseDetails.get(0).getReleaseId();
|
||||
}
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(id);
|
||||
if (!Arrays.asList("active").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
|
||||
for (ZtReleaseDetails d : releaseDetails) {
|
||||
d.setStatus("closed");
|
||||
}
|
||||
this.releaseDetailsService.saveOrUpdateBatch(releaseDetails);
|
||||
|
||||
actionService.addAction(ActionType.FB, ActionStatus.BJ, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
}
|
||||
|
||||
// releaseId 新发布id
|
||||
@Override
|
||||
public void changeRelease(Integer releaseId, Integer id, String type) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(releaseId);
|
||||
List<ZtReleaseDetails> sList = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getObjectId, id).eq(ZtReleaseDetails::getObjectType, type).ne(ZtReleaseDetails::getStatus, "closed"));
|
||||
if(!CollectionUtils.isEmpty(sList)){
|
||||
|
||||
Integer oldReleaseId = sList.get(0).getReleaseId();
|
||||
if(releaseId.equals(oldReleaseId)){
|
||||
return;
|
||||
}
|
||||
ZtRelease oldRelease = this.baseMapper.selectById(oldReleaseId);
|
||||
if (!Arrays.asList("active").contains(oldRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
}
|
||||
if (!Arrays.asList("active").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
|
||||
|
||||
if (!CollectionUtils.isEmpty(sList)) {
|
||||
ZtReleaseDetails ztReleaseDetails = sList.get(0);
|
||||
//没有修改直接返回
|
||||
if (ztReleaseDetails.getReleaseId().equals(releaseId)) {
|
||||
return;
|
||||
} else {
|
||||
//改变了先移除
|
||||
ZtReleaseQo qo = new ZtReleaseQo();
|
||||
qo.setId(releaseId);
|
||||
if ("story".equals(type)) {
|
||||
qo.setStoryList(Arrays.asList(id));
|
||||
this.removeStory(qo);
|
||||
} else if ("bug".equals(type)) {
|
||||
qo.setBugList(Arrays.asList(id));
|
||||
this.removeBug(qo);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
ZtReleaseQo qo = new ZtReleaseQo();
|
||||
qo.setId(releaseId);
|
||||
if ("story".equals(type)) {
|
||||
qo.setStoryList(Arrays.asList(id));
|
||||
this.batchSyncStory(qo);
|
||||
} else if ("bug".equals(type)) {
|
||||
qo.setBugList(Arrays.asList(id));
|
||||
this.batchSyncBug(qo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void batchSyncBug(ZtReleaseQo qo) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(qo.getId());
|
||||
//released 发不成功
|
||||
//close 发布失败
|
||||
if (!Arrays.asList("active").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
List<Integer> bugList = qo.getBugList();
|
||||
List<ZtReleaseDetails> list = this.releaseDetailsService.list(new QueryWrapper<ZtReleaseDetails>().lambda()
|
||||
.eq(ZtReleaseDetails::getObjectType, "bug")
|
||||
.ne(ZtReleaseDetails::getStatus, "closed")
|
||||
.in(ZtReleaseDetails::getObjectId, bugList)
|
||||
);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
throw new BusinessException("BUG已被关联id :" + list.get(0).getObjectId());
|
||||
}
|
||||
List<ZtReleaseDetails> saveBatch = new ArrayList<>();
|
||||
for (Integer story : bugList) {
|
||||
ZtReleaseDetails e = new ZtReleaseDetails();
|
||||
e.setObjectId(story);
|
||||
e.setObjectType("bug");
|
||||
e.setReleaseId(qo.getId());
|
||||
e.setStatus("wait");
|
||||
saveBatch.add(e);
|
||||
}
|
||||
|
||||
releaseDetailsService.saveBatch(saveBatch);
|
||||
|
||||
|
||||
actionService.addAction(ActionType.FB, ActionStatus.BJ, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void batchSyncStory(ZtReleaseQo qo) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(qo.getId());
|
||||
//released 发不成功
|
||||
//close 发布失败
|
||||
if(Arrays.asList("released","closed").contains(ztRelease.getStatus())){
|
||||
if (!Arrays.asList("active").contains(ztRelease.getStatus())) {
|
||||
throw new BusinessException("当前无法更新发布");
|
||||
}
|
||||
List<Integer> storyList = qo.getStoryList();
|
||||
@ -518,12 +869,12 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
.ne(ZtReleaseDetails::getStatus, "closed")
|
||||
.in(ZtReleaseDetails::getObjectId, storyList)
|
||||
);
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
throw new BusinessException("需求已被关联需求id :"+ list.get(0).getObjectId());
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
throw new BusinessException("需求已被关联需求id :" + list.get(0).getObjectId());
|
||||
}
|
||||
List<ZtReleaseDetails> saveBatch=new ArrayList<>();
|
||||
for (Integer story:storyList) {
|
||||
ZtReleaseDetails e=new ZtReleaseDetails();
|
||||
List<ZtReleaseDetails> saveBatch = new ArrayList<>();
|
||||
for (Integer story : storyList) {
|
||||
ZtReleaseDetails e = new ZtReleaseDetails();
|
||||
e.setObjectId(story);
|
||||
e.setObjectType("story");
|
||||
e.setReleaseId(qo.getId());
|
||||
@ -534,7 +885,6 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
releaseDetailsService.saveBatch(saveBatch);
|
||||
|
||||
|
||||
|
||||
actionService.addAction(ActionType.FB, ActionStatus.BJ, ztRelease.getId(), ztRelease.getProduct() + "", ztRelease.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
}
|
||||
@ -542,32 +892,69 @@ public class ZtReleaseServiceImpl extends ServiceImpl<ZtReleaseMapper, ZtRelease
|
||||
@Override
|
||||
public ZtReleaseDTO getReleaseById(Integer id) {
|
||||
ZtRelease ztRelease = this.baseMapper.selectById(id);
|
||||
ZtReleaseDTO d=new ZtReleaseDTO();
|
||||
BeanUtils.copyProperties(ztRelease,d);
|
||||
ZtReleaseDTO d = new ZtReleaseDTO();
|
||||
BeanUtils.copyProperties(ztRelease, d);
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ZtUser ztUser = userMap.get(d.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
Integer productId = d.getProduct();
|
||||
if(productId!=null&&productId!=0){
|
||||
if (productId != null && productId != 0) {
|
||||
ZtProduct p = this.productService.getById(productId);
|
||||
d.setProductName(p.getName());
|
||||
}
|
||||
ZtProject ztProject = this.projectService.getById(d.getProject());
|
||||
if(ztProject!=null){
|
||||
if (ztProject != null) {
|
||||
d.setProjectName(ztProject.getName());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getCreatedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setCreatedby(ztUser.getNickname());
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZtReleaseDTO> releaseList(ZtReleaseDTO dto) {
|
||||
|
||||
Integer product = dto.getProduct();
|
||||
Integer project = dto.getProject();
|
||||
Integer execution = dto.getExecution();
|
||||
if (project != null && project != 0) {
|
||||
List<ZtRelease> activeList = this.list(new QueryWrapper<ZtRelease>().lambda().eq(ZtRelease::getProject, project).eq(ZtRelease::getStatus, "active"));
|
||||
if (CollectionUtils.isEmpty(activeList)) {
|
||||
return Arrays.asList();
|
||||
}
|
||||
return BeanCopyUtil.copyListProperties(activeList, ZtReleaseDTO::new);
|
||||
}
|
||||
if (execution != null && execution != 0) {
|
||||
ZtExecutionproject executionproject = this.executionprojectService.getOne(new QueryWrapper<ZtExecutionproject>().lambda().eq(ZtExecutionproject::getExecution, execution));
|
||||
|
||||
List<ZtRelease> activeList = this.list(new QueryWrapper<ZtRelease>().lambda().eq(ZtRelease::getProject, executionproject.getProject()).eq(ZtRelease::getStatus, "active"));
|
||||
if (CollectionUtils.isEmpty(activeList)) {
|
||||
return Arrays.asList();
|
||||
}
|
||||
return BeanCopyUtil.copyListProperties(activeList, ZtReleaseDTO::new);
|
||||
}
|
||||
if (product != null && product != 0) {
|
||||
List<ZtProjectproduct> list = this.projectproductService.list(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProduct, product));
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return Arrays.asList();
|
||||
}
|
||||
|
||||
List<ZtRelease> activeList = this.list(new QueryWrapper<ZtRelease>().lambda()
|
||||
.in(ZtRelease::getProject, list.stream().map(o -> o.getProject()).collect(Collectors.toList())).eq(ZtRelease::getStatus, "active"));
|
||||
if (CollectionUtils.isEmpty(activeList)) {
|
||||
return Arrays.asList();
|
||||
}
|
||||
return BeanCopyUtil.copyListProperties(activeList, ZtReleaseDTO::new);
|
||||
}
|
||||
return Arrays.asList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import com.sa.zentao.mapper.ZtStoryMapper;
|
||||
import com.sa.zentao.qo.KanbanQo;
|
||||
import com.sa.zentao.qo.ZtBugQo;
|
||||
import com.sa.zentao.qo.ZtProjectQo;
|
||||
import com.sa.zentao.qo.ZtReleaseQo;
|
||||
import com.sa.zentao.service.*;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.sa.zentao.utils.BeanCopyUtil;
|
||||
@ -96,6 +97,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
@Autowired
|
||||
private IZtStoryUserService storyUserService;
|
||||
|
||||
@Autowired
|
||||
private IZtReleaseService releaseService;
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<ZtStoryDTO> pageList(ZtProjectQo qo) {
|
||||
@ -486,6 +490,7 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
executionUnBindStory(storyId, execList.stream().map(o -> o.getProject()).collect(Collectors.toList()));
|
||||
}
|
||||
}
|
||||
|
||||
//old userStory
|
||||
Integer userStory = ztStory.getUserStory();
|
||||
//new
|
||||
@ -525,6 +530,16 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.baseMapper.updateById(ztStory);
|
||||
if(dto.getReleaseId()!=null&&dto.getReleaseId()!=0){
|
||||
this.releaseService.changeRelease(dto.getReleaseId(),ztStory.getId(),"story");
|
||||
}else{
|
||||
ZtReleaseQo qo =new ZtReleaseQo();
|
||||
qo.setStoryList(Arrays.asList(id));
|
||||
this.releaseService.removeStory(qo);
|
||||
}
|
||||
String stage = ztStory.getStage();
|
||||
if (!StringUtils.isEmpty(stage) && !StringUtils.isEmpty(dto.getStage()) && !stage.equals(dto.getStage())) {
|
||||
ZtStoryDTO s = new ZtStoryDTO();
|
||||
@ -532,8 +547,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
s.setStage(dto.getStage());
|
||||
this.changeStatus(s);
|
||||
}
|
||||
this.baseMapper.updateById(ztStory);
|
||||
|
||||
if(ObjectUtils.notEqual(userStory,newUserStory)){
|
||||
if(userStory!=null&&userStory!=0){
|
||||
this.storyUserService.storyFinishedChangeStatus(userStory,UserStoryEnums.YWC);
|
||||
@ -976,7 +989,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if ("closed".equals(ztStory.getStatus())) {
|
||||
throw new BusinessException("需求当前已关闭");
|
||||
}
|
||||
|
||||
if("developing".equals(ztStory.getStage())){
|
||||
return;
|
||||
}
|
||||
// List<String> stateList = Arrays.asList("wait", "projected");
|
||||
//
|
||||
//
|
||||
@ -998,10 +1013,6 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
||||
this.storyFeedbackService.feedbackStart(ztStory.getFeedback());
|
||||
}
|
||||
|
||||
actionService.addAction(ActionType.XQ, ActionStatus.KS, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), null, "");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1017,7 +1028,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztStory == null) {
|
||||
throw new BusinessException("未查询到需求");
|
||||
}
|
||||
|
||||
if(ztStory.getStatus().equals("developed")){
|
||||
return;
|
||||
}
|
||||
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
||||
this.storyFeedbackService.feedbackStart(ztStory.getFeedback());
|
||||
}
|
||||
@ -1201,28 +1214,13 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
String newStatus = "released";
|
||||
|
||||
ztStory.setStage(newStatus);
|
||||
ztStory.setReleaseddate(new Date());
|
||||
if (ztStory.getEndDate() == null) {
|
||||
ztStory.setEndDate(new Date());
|
||||
}
|
||||
this.baseMapper.updateById(ztStory);
|
||||
String ysUser = ztStory.getYsUser();
|
||||
if(!StringUtils.isEmpty(ysUser)){
|
||||
ZtUser ztUser = this.userService.selectByName(ysUser);
|
||||
if(ztUser!=null&&!StringUtils.isEmpty(ztUser.getEmail())){
|
||||
try {
|
||||
StringBuilder b=new StringBuilder();
|
||||
b.append("<div>尊敬的{userName}:</div>");
|
||||
b.append("<div>您的需求 \"{id} {name}\"、\"{id} {name}\" 已发布,请及时登录系统验收。</div>");
|
||||
String str = b.toString();
|
||||
str= str.replace("{userName}",ztUser.getNickname());
|
||||
str=str.replace("{id}",ztStory.getId().toString());
|
||||
str=str.replace("{name}",ztStory.getTitle());
|
||||
SendEmail.sendMail(ztUser.getEmail(),str,"需求发布提醒");
|
||||
}catch (Exception e){
|
||||
log.error("",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (Integer execId : execIds) {
|
||||
@ -1466,6 +1464,9 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
if (ztStory == null) {
|
||||
throw new BusinessException("未查询到数据-需求");
|
||||
}
|
||||
if(ztStory.getStatus().equals("testing")){
|
||||
return;
|
||||
}
|
||||
if (ztStory.getFeedback() != null && ztStory.getFeedback() != 0) {
|
||||
this.storyFeedbackService.feedbackStart(ztStory.getFeedback());
|
||||
}
|
||||
@ -1995,6 +1996,12 @@ public class ZtStoryServiceImpl extends ServiceImpl<ZtStoryMapper, ZtStory> impl
|
||||
ZtStoryDTO d = new ZtStoryDTO();
|
||||
|
||||
BeanUtils.copyProperties(ztStory, d);
|
||||
|
||||
ZtRelease release = releaseService.getReleaseByStory(ztStory.getId());
|
||||
if(release!=null){
|
||||
d.setReleaseId(release.getId());
|
||||
d.setReleaseName(release.getName());
|
||||
}
|
||||
if (d.getProduct() != null && d.getProduct() != 0) {
|
||||
ZtProduct product = this.productService.getById(d.getProduct());
|
||||
|
||||
|
@ -21,6 +21,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.SendEmail;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -33,7 +34,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gqb
|
||||
@ -80,15 +81,15 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
s.setVersion(1);
|
||||
s.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
s.setLastediteddate(new Date());
|
||||
if(!"draft".equals(dto.getStatus())){
|
||||
if (!"draft".equals(dto.getStatus())) {
|
||||
s.setStatus("reviewing");
|
||||
}
|
||||
s.setStage("wait");
|
||||
this.baseMapper.insert(s);
|
||||
|
||||
fileService.updateFile(dto.getFiles(),s.getId(), FileTypes.userStory);
|
||||
fileService.updateFile(dto.getFiles(), s.getId(), FileTypes.userStory);
|
||||
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.XJ, s.getId(), dto.getProduct()+"", null, null,
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.XJ, s.getId(), dto.getProduct() + "", null, null,
|
||||
RiskUserThreadLocal.get().getName(), "", "");
|
||||
|
||||
if (!CollectionUtils.isEmpty(dto.getUserViewId())) {
|
||||
@ -99,8 +100,10 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
v.setReviewer(str);
|
||||
v.setType("userStory");
|
||||
this.storyreviewService.save(v);
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.PS, s.getId(), s.getProduct() + "", s.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(),"", str);
|
||||
if (!"draft".equals(dto.getStatus())) {
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.PS, s.getId(), s.getProduct() + "", s.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", str);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -117,35 +120,75 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
String storyStatus = ztStory.getStatus();
|
||||
|
||||
|
||||
if(ztStory.getStatus().equals("closed")||ztStory.getStatus().equals("finished")){
|
||||
if (ztStory.getStatus().equals("closed") || ztStory.getStatus().equals("finished")) {
|
||||
throw new BusinessException("当前状态无法更改");
|
||||
}
|
||||
|
||||
if("closed".equals(ztStory.getStatus())){
|
||||
if ("closed".equals(ztStory.getStatus())) {
|
||||
throw new BusinessException("当前已关闭");
|
||||
}
|
||||
String status = ztStory.getStatus();
|
||||
|
||||
|
||||
BeanUtils.copyProperties(dto, ztStory,"status");
|
||||
BeanUtils.copyProperties(dto, ztStory, "status");
|
||||
ztStory.setLasteditedby(RiskUserThreadLocal.get().getName());
|
||||
ztStory.setLastediteddate(new Date());
|
||||
if(Arrays.asList("reviewing","draft").contains(storyStatus)){
|
||||
if("draft".equals(dto.getStatus())){
|
||||
if (Arrays.asList("reviewing", "draft").contains(storyStatus)) {
|
||||
|
||||
if (!CollectionUtils.isEmpty(dto.getUserViewId())) {
|
||||
|
||||
this.storyreviewService.remove(new QueryWrapper<ZtStoryreview>().lambda().eq(ZtStoryreview::getStory, ztStory.getId()).eq(ZtStoryreview::getType, "userStory"));
|
||||
|
||||
for (String str : dto.getUserViewId()) {
|
||||
ZtStoryreview v = new ZtStoryreview();
|
||||
v.setStory(ztStory.getId());
|
||||
v.setVersion(ztStory.getVersion());
|
||||
v.setReviewer(str);
|
||||
v.setType("userStory");
|
||||
this.storyreviewService.save(v);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ("draft".equals(dto.getStatus())) {
|
||||
ztStory.setStatus("draft");
|
||||
}else{
|
||||
if("draft".equals(status)){
|
||||
} else {
|
||||
if ("draft".equals(status)) {
|
||||
ztStory.setStatus("reviewing");
|
||||
//
|
||||
List<ZtStoryreview> userStory = this.storyreviewService.list(new QueryWrapper<ZtStoryreview>().lambda().eq(ZtStoryreview::getStory, ztStory.getId())
|
||||
.eq(ZtStoryreview::getType, "userStory"));
|
||||
if (!CollectionUtils.isEmpty(userStory)) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
|
||||
for (int i = 0; i < userStory.size(); i++) {
|
||||
ZtStoryreview v = userStory.get(i);
|
||||
|
||||
ZtUser ztUser = userMap.get(v.getReviewer());
|
||||
if (ztUser != null) {
|
||||
b.append(ztUser.getNickname());
|
||||
}
|
||||
if (i != (userStory.size() - 1)) {
|
||||
b.append(",");
|
||||
}
|
||||
|
||||
}
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.PS, ztStory.getId(), ztStory.getProduct() + "", ztStory.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), "", b.toString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.baseMapper.updateById(ztStory);
|
||||
|
||||
fileService.updateFile(dto.getFiles(),ztStory.getId(), FileTypes.userStory);
|
||||
fileService.updateFile(dto.getFiles(), ztStory.getId(), FileTypes.userStory);
|
||||
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.BJ, dto.getId(), dto.getProduct() + "", dto.getProject(), null,
|
||||
RiskUserThreadLocal.get().getName(), dto.getRemark(), "");
|
||||
RiskUserThreadLocal.get().getName(), dto.getRemark(), "");
|
||||
|
||||
}
|
||||
|
||||
@ -155,7 +198,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
|
||||
qo.setUserName(RiskUserThreadLocal.get().getName());
|
||||
|
||||
if(!StringUtils.isEmpty(qo.getIds())){
|
||||
if (!StringUtils.isEmpty(qo.getIds())) {
|
||||
String[] split = qo.getIds().split(",");
|
||||
qo.setStoryIds(new ArrayList<>(Arrays.asList(split)));
|
||||
}
|
||||
@ -177,13 +220,13 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
Map<Integer, List<ZtStoryreviewDTO>> rMap = getReviewMap(list);
|
||||
for (ZtStoryUserDTO d : list) {
|
||||
|
||||
if(!StringUtils.isEmpty(d.getReviewedby())){
|
||||
if (!StringUtils.isEmpty(d.getReviewedby())) {
|
||||
String[] split = d.getReviewedby().split(",");
|
||||
StringBuilder b=new StringBuilder();
|
||||
for (String s:split) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (String s : split) {
|
||||
ZtUser u = userMap.get(s);
|
||||
if(u!=null){
|
||||
b.append(u.getNickname()+",");
|
||||
if (u != null) {
|
||||
b.append(u.getNickname() + ",");
|
||||
}
|
||||
|
||||
}
|
||||
@ -194,21 +237,21 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
d.setViews(rMap.get(d.getId()));
|
||||
|
||||
ZtUser ztUser = userMap.get(d.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
|
||||
ztUser = userMap.get(d.getLasteditedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setLasteditedby(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(d.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
d.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
d.setStoryList(ztStories.stream().map(o->o.getTitle()).collect(Collectors.joining(",")));
|
||||
if (!CollectionUtils.isEmpty(ztStories)) {
|
||||
d.setStoryList(ztStories.stream().map(o -> o.getTitle()).collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
}
|
||||
@ -221,8 +264,8 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
@Transactional
|
||||
public void changeStatus(ZtStoryUserDTO dto) {
|
||||
ZtStoryUser ztStoryUser = this.baseMapper.selectById(dto.getId());
|
||||
if(!"closed".equals(dto.getStatus())){
|
||||
if(ztStoryUser==null||ztStoryUser.getStatus().equals("reviewing")||ztStoryUser.getStatus().equals("closed")||ztStoryUser.getStatus().equals("finished")){
|
||||
if (!"closed".equals(dto.getStatus())) {
|
||||
if (ztStoryUser == null || ztStoryUser.getStatus().equals("reviewing") || ztStoryUser.getStatus().equals("closed") || ztStoryUser.getStatus().equals("finished")) {
|
||||
throw new BusinessException("当前状态无法更改");
|
||||
}
|
||||
}
|
||||
@ -254,13 +297,13 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
@Transactional
|
||||
public ZtStoryUserDTO userReview(ZtStoryDTO dto) {
|
||||
ZtStoryUser ztStory = this.baseMapper.selectById(dto.getId());
|
||||
if("closed".equals(ztStory.getStatus())){
|
||||
if ("closed".equals(ztStory.getStatus())) {
|
||||
throw new BusinessException("当前已关闭");
|
||||
}
|
||||
ZtStoryreview view = this.storyreviewService.getOne(new QueryWrapper<ZtStoryreview>().lambda()
|
||||
.eq(ZtStoryreview::getStory, ztStory.getId())
|
||||
.eq(ZtStoryreview::getReviewer, RiskUserThreadLocal.get().getName())
|
||||
.eq(ZtStoryreview::getType,"userStory")
|
||||
.eq(ZtStoryreview::getType, "userStory")
|
||||
);
|
||||
if (view == null) {
|
||||
throw new BusinessException("当前无评审");
|
||||
@ -271,24 +314,65 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
if (dto.getRevieweResult() == 1) {
|
||||
//通过
|
||||
lambda.set(ZtStoryreview::getResult, "pass");
|
||||
actionStatus=ActionStatus.PSTG;
|
||||
actionStatus = ActionStatus.PSTG;
|
||||
} else if (dto.getRevieweResult() == 2) {
|
||||
// lambda.set(ZtStoryreview::getResult, "reject");
|
||||
actionStatus=ActionStatus.PSYDMQ;
|
||||
actionStatus = ActionStatus.PSYDMQ;
|
||||
} else {
|
||||
lambda.set(ZtStoryreview::getResult, "reject");
|
||||
actionStatus=ActionStatus.PSBTG;
|
||||
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())) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
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: 11pt; 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: 11pt; 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();
|
||||
|
||||
|
||||
str = str.replace("{userName}", u.getNickname());
|
||||
str = str.replace("{storyId}", ztStory.getId().toString());
|
||||
str = str.replace("{storyName}", ztStory.getTitle());
|
||||
SendEmail.sendMessage("需求评审通知:", Arrays.asList(u.getEmail()),
|
||||
null,
|
||||
str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
lambda.set(ZtStoryreview::getReviewdate, new Date());
|
||||
lambda.eq(ZtStoryreview::getStory, ztStory.getId());
|
||||
lambda.eq(ZtStoryreview::getReviewer, RiskUserThreadLocal.get().getName());
|
||||
lambda.eq(ZtStoryreview::getType,"userStory");
|
||||
lambda.eq(ZtStoryreview::getType, "userStory");
|
||||
this.storyreviewService.update(lambda);
|
||||
|
||||
|
||||
ztStory.setReviewedby(StringUtils.isEmpty(ztStory.getReviewedby()) ? "," + RiskUserThreadLocal.get().getName() : ztStory.getReviewedby() + "," + RiskUserThreadLocal.get().getName());
|
||||
List<ZtStoryreview> list = this.storyreviewService.list(new QueryWrapper<ZtStoryreview>().lambda()
|
||||
.eq(ZtStoryreview::getStory, ztStory.getId()).eq(ZtStoryreview::getType,"userStory")
|
||||
.eq(ZtStoryreview::getStory, ztStory.getId()).eq(ZtStoryreview::getType, "userStory")
|
||||
);
|
||||
|
||||
if (list.stream().filter(o -> o.getReviewdate() != null).collect(Collectors.toList()).size() >= list.size()) {
|
||||
@ -308,7 +392,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
ztStory.setStatus("closed");
|
||||
ztStory.setStage("closed");
|
||||
ztStory.setClosedreason(dto.getClosedreason());
|
||||
}else if(dto.getRevieweResult() == 2 ){
|
||||
} else if (dto.getRevieweResult() == 2) {
|
||||
ztStory.setStatus("draft");
|
||||
}
|
||||
ztStory.setYsRemark(dto.getDesc());
|
||||
@ -342,65 +426,65 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
@Override
|
||||
public ZtStoryUserDTO getUserStoryById(ZtStoryDTO d) {
|
||||
ZtStoryUser ztStoryUser = this.baseMapper.selectById(d.getId());
|
||||
ZtStoryUserDTO dto=new ZtStoryUserDTO();
|
||||
BeanUtils.copyProperties(ztStoryUser,dto);
|
||||
ZtStoryUserDTO dto = new ZtStoryUserDTO();
|
||||
BeanUtils.copyProperties(ztStoryUser, dto);
|
||||
|
||||
if(ztStoryUser.getProduct()!=null&&ztStoryUser.getProduct()!=0){
|
||||
if (ztStoryUser.getProduct() != null && ztStoryUser.getProduct() != 0) {
|
||||
ZtProduct product = this.productService.getById(ztStoryUser.getProduct());
|
||||
dto.setProductName(product.getName());
|
||||
}
|
||||
Map<String, ZtUser> userMap = userService.userMapByIds(null);
|
||||
String openedby = dto.getOpenedby();
|
||||
ZtUser ztUser = userMap.get(openedby);
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
dto.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(dto.getClosedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
dto.setClosedbyName(ztUser.getNickname());
|
||||
}
|
||||
Map<Integer, List<ZtStory>> storyUserMap = getStoryUserMap(Arrays.asList(dto));
|
||||
List<ZtStory> ztStories = storyUserMap.get(d.getId());
|
||||
if(!CollectionUtils.isEmpty(ztStories)){
|
||||
dto.setStoryList(ztStories.stream().map(o->o.getTitle()).collect(Collectors.joining(",")));
|
||||
if (!CollectionUtils.isEmpty(ztStories)) {
|
||||
dto.setStoryList(ztStories.stream().map(o -> o.getTitle()).collect(Collectors.joining(",")));
|
||||
}
|
||||
if(!StringUtils.isEmpty(dto.getReviewedby())){
|
||||
if (!StringUtils.isEmpty(dto.getReviewedby())) {
|
||||
String[] split = dto.getReviewedby().split(",");
|
||||
StringBuilder b=new StringBuilder();
|
||||
for (String s:split) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (String s : split) {
|
||||
|
||||
ZtUser u = userMap.get(s);
|
||||
if(u!=null){
|
||||
b.append(u.getNickname()+",");
|
||||
if (u != null) {
|
||||
b.append(u.getNickname() + ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(dto.getParent()!=null&&dto.getParent()!=0){
|
||||
if (dto.getParent() != null && dto.getParent() != 0) {
|
||||
ZtStoryUser pStory = this.getById(dto.getParent());
|
||||
if(pStory!=null){
|
||||
if (pStory != null) {
|
||||
dto.setParentName(pStory.getTitle());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(dto.getModule()!=null&&dto.getModule()!=0){
|
||||
if (dto.getModule() != null && dto.getModule() != 0) {
|
||||
ZtModule ztModule = this.moduleService.getById(dto.getModule());
|
||||
if(ztModule!=null){
|
||||
if (ztModule != null) {
|
||||
dto.setModuleName(ztModule.getName());
|
||||
}
|
||||
}
|
||||
Map<Integer, List<ZtStoryreviewDTO>> rMap = getReviewMap(Arrays.asList(dto));
|
||||
|
||||
if(!StringUtils.isEmpty(dto.getReviewedby())){
|
||||
if (!StringUtils.isEmpty(dto.getReviewedby())) {
|
||||
String[] split = dto.getReviewedby().split(",");
|
||||
StringBuilder b=new StringBuilder();
|
||||
for ( int i =0 ;i<split.length;i++) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
ZtUser u = userMap.get(split[i]);
|
||||
if(u!=null){
|
||||
if(i==split.length-1){
|
||||
if (u != null) {
|
||||
if (i == split.length - 1) {
|
||||
b.append(u.getNickname());
|
||||
}else{
|
||||
b.append(u.getNickname()+",");
|
||||
} else {
|
||||
b.append(u.getNickname() + ",");
|
||||
}
|
||||
|
||||
}
|
||||
@ -410,17 +494,17 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
}
|
||||
dto.setViews(rMap.get(d.getId()));
|
||||
List<ZtStory> list = this.storyService.list(new QueryWrapper<ZtStory>().lambda().eq(ZtStory::getUserStory, dto.getId()));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
List<ZtStoryDTO> storyDTOList = BeanCopyUtil.copyListProperties(list, ZtStoryDTO::new);
|
||||
if(!CollectionUtils.isEmpty(storyDTOList)){
|
||||
if (!CollectionUtils.isEmpty(storyDTOList)) {
|
||||
|
||||
for (ZtStoryDTO storyDTO:storyDTOList) {
|
||||
for (ZtStoryDTO storyDTO : storyDTOList) {
|
||||
ztUser = userMap.get(storyDTO.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
storyDTO.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(storyDTO.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
storyDTO.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
@ -429,15 +513,15 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
}
|
||||
}
|
||||
List<ZtStoryUserTask> tasks = this.storyUserTaskService.list(new QueryWrapper<ZtStoryUserTask>().lambda().eq(ZtStoryUserTask::getUserStoryId, dto.getId()));
|
||||
if(!CollectionUtils.isEmpty(tasks)){
|
||||
if (!CollectionUtils.isEmpty(tasks)) {
|
||||
List<ZtStoryUserTaskDTO> ztStoryUserTaskDTOS = BeanCopyUtil.copyListProperties(tasks, ZtStoryUserTaskDTO::new);
|
||||
for (ZtStoryUserTaskDTO t:ztStoryUserTaskDTOS) {
|
||||
for (ZtStoryUserTaskDTO t : ztStoryUserTaskDTOS) {
|
||||
ztUser = userMap.get(t.getAssignedTo());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
t.setAssignedToName(ztUser.getNickname());
|
||||
}
|
||||
ztUser = userMap.get(t.getOpenedby());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
t.setOpenedbyName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
@ -445,7 +529,6 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
}
|
||||
|
||||
|
||||
|
||||
dto.setViews(rMap.get(d.getId()));
|
||||
|
||||
return dto;
|
||||
@ -454,7 +537,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
@Override
|
||||
public void addRemark(ZtStoryDTO dto) {
|
||||
ZtStoryUser ztStory = this.baseMapper.selectById(dto.getId());
|
||||
if(ztStory==null){
|
||||
if (ztStory == null) {
|
||||
throw new BusinessException("未查询到");
|
||||
}
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.TJBZ, dto.getId(), ztStory.getProduct() + "", null, null,
|
||||
@ -466,7 +549,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
public void closedStory(ZtStoryUserDTO dto) {
|
||||
String closedreason = dto.getClosedreason();
|
||||
ZtStoryUser ztStoryUser = this.baseMapper.selectById(dto.getId());
|
||||
if(ztStoryUser==null||ztStoryUser.getStatus().equals("closed")){
|
||||
if (ztStoryUser == null || ztStoryUser.getStatus().equals("closed")) {
|
||||
throw new BusinessException("当前未查询到或已关闭");
|
||||
}
|
||||
ztStoryUser.setClosedreason(closedreason);
|
||||
@ -476,14 +559,14 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
this.baseMapper.updateById(ztStoryUser);
|
||||
this.storyUserTaskService.closedAll(dto.getId());
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.GB, dto.getId(), ztStoryUser.getProduct() + "", null, null,
|
||||
RiskUserThreadLocal.get().getName(),"关闭原因:"+closedreason+"\r\n 关闭备注: " +dto.getRemark(), "");
|
||||
RiskUserThreadLocal.get().getName(), "关闭原因:" + closedreason + "\r\n 关闭备注: " + dto.getRemark(), "");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List myWaitYsStory(ZtStoryDTO dto) {
|
||||
LoginRiskUser loginRiskUser = RiskUserThreadLocal.get();
|
||||
if(loginRiskUser==null||dto.getProductId()==null){
|
||||
if (loginRiskUser == null || dto.getProductId() == null) {
|
||||
throw new BusinessException("请检查");
|
||||
}
|
||||
|
||||
@ -494,30 +577,31 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
);
|
||||
|
||||
|
||||
|
||||
return released;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private IZtStoryUserTaskService storyUserTaskService;
|
||||
|
||||
@Override
|
||||
public void changeStatus(Integer id, UserStoryEnums status) {
|
||||
ZtStoryUser storyUser = this.baseMapper.selectById(id);
|
||||
if(storyUser==null){
|
||||
if (storyUser == null) {
|
||||
throw new BusinessException("请检查");
|
||||
}
|
||||
String oldStatus = storyUser.getStatus();
|
||||
storyUser.setOldStatus(oldStatus);
|
||||
UserStoryEnums userStoryEnums = UserStoryEnums.transfer(oldStatus);
|
||||
if(userStoryEnums.getIndex()>status.getIndex()){
|
||||
if (userStoryEnums.getIndex() > status.getIndex()) {
|
||||
return;
|
||||
}
|
||||
if(status==UserStoryEnums.UNCFM){
|
||||
if (status == UserStoryEnums.UNCFM) {
|
||||
List<ZtStoryUserTask> list = storyUserTaskService.list(new QueryWrapper<ZtStoryUserTask>().lambda().eq(ZtStoryUserTask::getUserStoryId, id));
|
||||
if(list.size()>1){
|
||||
if (list.size() > 1) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(UserStoryEnums.CFM==status){
|
||||
if (UserStoryEnums.CFM == status) {
|
||||
//需求已确认
|
||||
}
|
||||
|
||||
@ -527,60 +611,60 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
|
||||
this.baseMapper.updateById(storyUser);
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.ZTBG, id, storyUser.getProduct() + "", null, null,
|
||||
RiskUserThreadLocal.get().getName(), userStoryEnums==null?"":userStoryEnums.getValue() +" 变更 "+status.getValue(), "");
|
||||
RiskUserThreadLocal.get().getName(), userStoryEnums == null ? "" : userStoryEnums.getValue() + " 变更 " + status.getValue(), "");
|
||||
|
||||
}
|
||||
|
||||
public void storyFinishedChangeStatus(Integer id, UserStoryEnums status){
|
||||
if(id==null||id==0){
|
||||
public void storyFinishedChangeStatus(Integer id, UserStoryEnums status) {
|
||||
if (id == null || id == 0) {
|
||||
return;
|
||||
}
|
||||
ZtStoryUser storyUser = this.baseMapper.selectById(id);
|
||||
if(storyUser==null){
|
||||
if (storyUser == null) {
|
||||
throw new BusinessException("请检查");
|
||||
}
|
||||
if(UserStoryEnums.transfer(storyUser.getStatus()).getIndex()<UserStoryEnums.CFM.getIndex()){
|
||||
if (UserStoryEnums.transfer(storyUser.getStatus()).getIndex() < UserStoryEnums.CFM.getIndex()) {
|
||||
throw new BusinessException("用户需求无法关联");
|
||||
}
|
||||
if(storyUser.getStatus().equals(UserStoryEnums.YWC.getCode())||storyUser.getStatus().equals(UserStoryEnums.CLOSED.getCode())){
|
||||
if (storyUser.getStatus().equals(UserStoryEnums.YWC.getCode()) || storyUser.getStatus().equals(UserStoryEnums.CLOSED.getCode())) {
|
||||
return;
|
||||
}
|
||||
if(status==UserStoryEnums.KFZ){
|
||||
if (status == UserStoryEnums.KFZ) {
|
||||
List<ZtStory> activeList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().eq(ZtStory::getUserStory, id)
|
||||
.in(ZtStory::getStatus, "active")
|
||||
);
|
||||
if(CollectionUtils.isEmpty(activeList)||storyUser.getStatus().equals(UserStoryEnums.KFZ.getCode())){
|
||||
if (CollectionUtils.isEmpty(activeList) || storyUser.getStatus().equals(UserStoryEnums.KFZ.getCode())) {
|
||||
return;
|
||||
}
|
||||
|
||||
}else if(status==UserStoryEnums.CFM){
|
||||
} else if (status == UserStoryEnums.CFM) {
|
||||
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested测试完毕 released已发布 verified
|
||||
List<ZtStory> activeList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().eq(ZtStory::getUserStory, id)
|
||||
.eq(ZtStory::getStatus, "active")
|
||||
.in(ZtStory::getStage,"wait","projected","developing","developed","testing","tested","released","verified")
|
||||
.in(ZtStory::getStage, "wait", "projected", "developing", "developed", "testing", "tested", "released", "verified")
|
||||
);
|
||||
if(!CollectionUtils.isEmpty(activeList)){
|
||||
if (!CollectionUtils.isEmpty(activeList)) {
|
||||
return;
|
||||
}
|
||||
}else if(status==UserStoryEnums.YWC){
|
||||
} else if (status == UserStoryEnums.YWC) {
|
||||
// wait 初始化 projected 已立项 developing 研发中 developed 研发完毕 testing 测试中 tested测试完毕 released已发布 verified
|
||||
List<ZtStory> activeList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().eq(ZtStory::getUserStory, id)
|
||||
.eq(ZtStory::getStatus, "active")
|
||||
.in(ZtStory::getStage,"wait","projected","developing","developed","testing","tested","verified","released")
|
||||
.in(ZtStory::getStage, "wait", "projected", "developing", "developed", "testing", "tested", "verified", "released")
|
||||
);
|
||||
//如果完成先查看相关需求是否以全部完成
|
||||
if(!CollectionUtils.isEmpty(activeList)){
|
||||
if (!CollectionUtils.isEmpty(activeList)) {
|
||||
return;
|
||||
}else{
|
||||
} else {
|
||||
List<ZtStory> finishList = this.storyService.list(new QueryWrapper<ZtStory>().lambda().eq(ZtStory::getUserStory, id)
|
||||
.eq(ZtStory::getStatus, "finished")
|
||||
);
|
||||
//如果没有进行中 那么查询是否有完成的研发需求
|
||||
if(CollectionUtils.isEmpty(finishList)){
|
||||
if (CollectionUtils.isEmpty(finishList)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
String oldStatus = storyUser.getStatus();
|
||||
@ -594,7 +678,7 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
|
||||
this.baseMapper.updateById(storyUser);
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.ZTBG, id, storyUser.getProduct() + "", null, null,
|
||||
RiskUserThreadLocal.get().getName(), userStoryEnums==null?"":userStoryEnums.getValue() +" 变更 "+status.getValue(), "");
|
||||
RiskUserThreadLocal.get().getName(), userStoryEnums == null ? "" : userStoryEnums.getValue() + " 变更 " + status.getValue(), "");
|
||||
}
|
||||
|
||||
//明确需求 需要有交付物
|
||||
@ -602,25 +686,25 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
@Transactional
|
||||
public void improveStory(ZtStoryUserDTO dto) {
|
||||
ZtStoryUser storyUser = this.baseMapper.selectById(dto.getId());
|
||||
if(UserStoryEnums.transfer(storyUser.getStatus())!=UserStoryEnums.CPYSJ ){
|
||||
if (UserStoryEnums.transfer(storyUser.getStatus()) != UserStoryEnums.CPYSJ) {
|
||||
throw new BusinessException("当前无需明确");
|
||||
}
|
||||
//
|
||||
fileService.updateFile(dto.getFiles(),dto.getId(), FileTypes.userStoryTaskImprove);
|
||||
fileService.updateFile(dto.getFiles(), dto.getId(), FileTypes.userStoryTaskImprove);
|
||||
storyUser.setDeliverRemark(dto.getDeliverRemark());
|
||||
this.baseMapper.updateById(storyUser);
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.DQR);
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.DQR);
|
||||
actionService.addAction(ActionType.USERXQ, ActionStatus.MQXU, storyUser.getId(), storyUser.getProduct() + "", null, null,
|
||||
RiskUserThreadLocal.get().getName(),dto.getDeliverRemark(), "");
|
||||
RiskUserThreadLocal.get().getName(), dto.getDeliverRemark(), "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void confirmStory(ZtStoryUserDTO dto) {
|
||||
ZtStoryUser storyUser = this.baseMapper.selectById(dto.getId());
|
||||
if(UserStoryEnums.transfer(storyUser.getStatus())!=UserStoryEnums.DQR ){
|
||||
if (UserStoryEnums.transfer(storyUser.getStatus()) != UserStoryEnums.DQR) {
|
||||
throw new BusinessException("当前无需明确");
|
||||
}
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.CFM);
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.CFM);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -628,19 +712,19 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
Integer needDesign = dto.getNeedDesign();
|
||||
Integer needImprove = dto.getNeedImprove();
|
||||
//需要设计
|
||||
if(needDesign!=null&&needDesign!=0){
|
||||
if(needDesign==1){
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.DSJ);
|
||||
}else{
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.CFM);
|
||||
if (needDesign != null && needDesign != 0) {
|
||||
if (needDesign == 1) {
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.DSJ);
|
||||
} else {
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.CFM);
|
||||
}
|
||||
}
|
||||
//需要会议
|
||||
if(needImprove!=null&&needImprove!=0){
|
||||
if(needImprove==1){
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.DGT);
|
||||
}else{
|
||||
this.changeStatus(dto.getId(),UserStoryEnums.CFM);
|
||||
if (needImprove != null && needImprove != 0) {
|
||||
if (needImprove == 1) {
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.DGT);
|
||||
} else {
|
||||
this.changeStatus(dto.getId(), UserStoryEnums.CFM);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -648,39 +732,38 @@ public class ZtStoryUserServiceImpl extends ServiceImpl<ZtStoryUserMapper, ZtSto
|
||||
private Map<Integer, List<ZtStory>> getStoryUserMap(List<ZtStoryUserDTO> list) {
|
||||
List<Integer> ids = list.stream().map(o -> o.getId()).collect(Collectors.toList());
|
||||
|
||||
List<ZtStory> list1 = storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getUserStory,ids ));
|
||||
if(CollectionUtils.isEmpty(list1)){
|
||||
List<ZtStory> list1 = storyService.list(new QueryWrapper<ZtStory>().lambda().in(ZtStory::getUserStory, ids));
|
||||
if (CollectionUtils.isEmpty(list1)) {
|
||||
return new HashMap<>();
|
||||
}else{
|
||||
return list1.stream().collect(Collectors.groupingBy(ZtStory::getUserStory));
|
||||
} else {
|
||||
return list1.stream().collect(Collectors.groupingBy(ZtStory::getUserStory));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Map<Integer, List<ZtStoryreviewDTO>> getReviewMap(List<ZtStoryUserDTO> list) {
|
||||
List<ZtStoryreview> list1 = storyreviewService.list(new QueryWrapper<ZtStoryreview>().lambda().in(ZtStoryreview::getStory
|
||||
, list.stream().map(o -> o.getId()).collect(Collectors.toList())
|
||||
).eq(ZtStoryreview::getType,"userStory"));
|
||||
).eq(ZtStoryreview::getType, "userStory"));
|
||||
|
||||
if (CollectionUtils.isEmpty(list1)) {
|
||||
return new HashMap<>();
|
||||
} else {
|
||||
list1 = list1.stream().filter(o -> StringUtils.isEmpty(o.getResult())).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(list1)){
|
||||
if (CollectionUtils.isEmpty(list1)) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
Map<String, ZtUser> userMap = this.userService.userMapByIds(null);
|
||||
List<ZtStoryreviewDTO> ztStoryreviewDTOS = BeanCopyUtil.copyListProperties(list1, ZtStoryreviewDTO::new);
|
||||
for (ZtStoryreviewDTO view:ztStoryreviewDTOS) {
|
||||
for (ZtStoryreviewDTO view : ztStoryreviewDTOS) {
|
||||
ZtUser ztUser = userMap.get(view.getReviewer());
|
||||
if(ztUser!=null){
|
||||
if (ztUser != null) {
|
||||
view.setReviewerName(ztUser.getNickname());
|
||||
}
|
||||
}
|
||||
|
||||
return ztStoryreviewDTOS.stream().collect(Collectors.groupingBy(ZtStoryreviewDTO::getStory));
|
||||
return ztStoryreviewDTOS.stream().collect(Collectors.groupingBy(ZtStoryreviewDTO::getStory));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,11 +5,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.sa.zentao.conf.RiskUserThreadLocal;
|
||||
import com.sa.zentao.dao.*;
|
||||
import com.sa.zentao.entity.VerificationCode;
|
||||
import com.sa.zentao.entity.ZtProduct;
|
||||
import com.sa.zentao.entity.ZtProject;
|
||||
import com.sa.zentao.entity.ZtUser;
|
||||
import com.sa.zentao.enums.ActionStatus;
|
||||
import com.sa.zentao.enums.ActionType;
|
||||
import com.sa.zentao.mapper.ZtUserMapper;
|
||||
import com.sa.zentao.qo.ZtUserQo;
|
||||
import com.sa.zentao.service.*;
|
||||
@ -55,6 +58,8 @@ public class ZtUserServiceImpl extends ServiceImpl<ZtUserMapper, ZtUser> impleme
|
||||
|
||||
@Autowired
|
||||
private IVerificationCodeService verificationCodeService;
|
||||
@Autowired
|
||||
private IZtActionService actionService;
|
||||
|
||||
|
||||
|
||||
@ -192,6 +197,9 @@ public class ZtUserServiceImpl extends ServiceImpl<ZtUserMapper, ZtUser> impleme
|
||||
if(login==null){
|
||||
throw new BusinessException("未查询到");
|
||||
}
|
||||
if(login.getDeleted().equals("1")){
|
||||
throw new BusinessException("已经删除");
|
||||
}
|
||||
String userPass = login.getPassword();
|
||||
String loginPass = user.getPassword();
|
||||
if(!userPass.equalsIgnoreCase(loginPass)){
|
||||
@ -239,6 +247,59 @@ public class ZtUserServiceImpl extends ServiceImpl<ZtUserMapper, ZtUser> impleme
|
||||
return this.baseMapper.dkList(account,startDate,endDate);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void resetPassword(ZtUserDTO user) {
|
||||
String name = RiskUserThreadLocal.get().getName();
|
||||
if(!"admin".equals(name)){
|
||||
throw new BusinessException("没有权限");
|
||||
}
|
||||
Integer id = user.getId();
|
||||
ZtUser ztUser = this.getById(id);
|
||||
if(ztUser==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
//123456
|
||||
ztUser.setPassword("e10adc3949ba59abbe56e057f20f883e");
|
||||
this.updateById(ztUser);
|
||||
this.actionService.addAction(ActionType.LOGIN, ActionStatus.CZMM,user.getId(),null,null,null,RiskUserThreadLocal.get().getAccount(),null,ztUser.getAccount());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteUser(ZtUserDTO user) {
|
||||
String name = RiskUserThreadLocal.get().getName();
|
||||
if(!"admin".equals(name)){
|
||||
throw new BusinessException("没有权限");
|
||||
}
|
||||
Integer id = user.getId();
|
||||
ZtUser ztUser = this.getById(id);
|
||||
if(ztUser==null){
|
||||
throw new BusinessException("未查询到数据");
|
||||
}
|
||||
//123456
|
||||
ztUser.setDeleted("1");
|
||||
this.updateById(ztUser);
|
||||
this.actionService.addAction(ActionType.LOGIN, ActionStatus.SC,user.getId(),null,null,null,RiskUserThreadLocal.get().getAccount(),null,ztUser.getAccount());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseStaff> oaUserByNikeName(String nickname) {
|
||||
return this.baseMapper.oaUserByNikeName(nickname);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseDepartment getDepart(Integer departId) {
|
||||
return this.baseMapper.getDepart(departId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZtUser getByAccount(String openedby) {
|
||||
return this.baseMapper.selectOne(new QueryWrapper<ZtUser>().lambda().eq(ZtUser::getAccount, openedby));
|
||||
}
|
||||
|
||||
public boolean sendSms(String phoneNumber, String verificationCode) {
|
||||
try {
|
||||
// 初始化腾讯云短信服务客户端
|
||||
|
@ -156,9 +156,10 @@ public class ZtYwTaskServiceImpl extends ServiceImpl<ZtYwTaskMapper, ZtYwTask> i
|
||||
}catch (Exception e){
|
||||
log.error("",e);
|
||||
}
|
||||
t.setTaskStatus(2);
|
||||
this.baseMapper.updateById(t);
|
||||
}
|
||||
t.setTaskStatus(2);
|
||||
this.baseMapper.updateById(t);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class KanBanConstant {
|
||||
// put("confirmed","已确认");
|
||||
// put("resolving","解决中");
|
||||
// put("fixing","进行中");
|
||||
put("fixed","完成");
|
||||
put("fixed","已解决");
|
||||
// put("test","测试");
|
||||
// put("testing","测试中");
|
||||
// put("tested","测试完毕");
|
||||
|
@ -73,6 +73,9 @@
|
||||
<if test="qo.project != null and qo.project != 0">
|
||||
and project =#{qo.project}
|
||||
</if>
|
||||
<if test="qo.bugType != null and qo.bugType != ''">
|
||||
and bug_type =#{qo.bugType}
|
||||
</if>
|
||||
|
||||
<if test="qo.id != null and qo.id != 0">
|
||||
and id = #{qo.id}
|
||||
|
66
src/main/resources/mapper/ZtComputerSourceMapper.xml
Normal file
66
src/main/resources/mapper/ZtComputerSourceMapper.xml
Normal file
@ -0,0 +1,66 @@
|
||||
<?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.ZtComputerSourceMapper">
|
||||
<resultMap id="BaseResultMap" type="com.sa.zentao.entity.ZtComputerSource">
|
||||
<result column="id" property="id" />
|
||||
<result column="source_type" property="sourceType" />
|
||||
<result column="inner_ip" property="innerIp" />
|
||||
<result column="bread" property="bread" />
|
||||
<result column="cpu_core" property="cpuCore" />
|
||||
<result column="memory" property="memory" />
|
||||
<result column="disk" property="disk" />
|
||||
<result column="system_type" property="systemType" />
|
||||
<result column="purpose" property="purpose" />
|
||||
<result column="server_name" property="serverName" />
|
||||
<result column="house" property="house" />
|
||||
<result column="id_no" property="idNo" />
|
||||
<result column="address" property="address" />
|
||||
<result column="buy_date" property="buyDate" />
|
||||
<result column="status" property="status" />
|
||||
<result column="create_user" property="createUser" />
|
||||
<result column="create_date" property="createDate" />
|
||||
<result column="update_user" property="updateUser" />
|
||||
<result column="update_date" property="updateDate" />
|
||||
</resultMap>
|
||||
<select id="pageList" resultType="com.sa.zentao.dao.ZtComputerSourceDTO">
|
||||
|
||||
SELECT * from zt_computer_source WHERE 1=1
|
||||
<if test="qo.yearSearch != null and qo.yearSearch != ''">
|
||||
-- 1年内、3年内、3~5年、5~7年,7年以上
|
||||
<if test="qo.yearSearch == 1">
|
||||
and DATE_ADD(buy_date, INTERVAL 1 YEAR) <![CDATA[>=]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 2">
|
||||
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 3">
|
||||
and DATE_ADD(buy_date, INTERVAL 3 YEAR) <![CDATA[<]]> now()
|
||||
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 4">
|
||||
and DATE_ADD(buy_date, INTERVAL 5 YEAR) <![CDATA[<]]> now()
|
||||
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[>]]> now()
|
||||
</if>
|
||||
<if test="qo.yearSearch == 5">
|
||||
and DATE_ADD(buy_date, INTERVAL 7 YEAR) <![CDATA[<]]> now()
|
||||
</if>
|
||||
</if>
|
||||
<if test=" qo.sourceType != null and qo.sourceType != ''">
|
||||
and source_type = #{qo.sourceType}
|
||||
</if>
|
||||
<if test=" qo.systemType != null and qo.systemType != ''">
|
||||
and system_type = #{qo.systemType}
|
||||
</if>
|
||||
<if test=" qo.idNo != null and qo.idNo != ''">
|
||||
and id_no = #{qo.idNo}
|
||||
</if>
|
||||
<if test=" qo.status != null and qo.status != ''">
|
||||
and status = #{qo.status}
|
||||
</if>
|
||||
<if test=" qo.house != null and qo.house != ''">
|
||||
and house = #{qo.house}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -17,8 +17,8 @@
|
||||
<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.*,us.title userStoryName from zt_meeting m left join zt_product p on p.id = m.product_id
|
||||
left join zt_story_user us on m.user_story = us.id
|
||||
WHERE 1=1
|
||||
|
||||
<if test="qo.productId != null ">
|
||||
|
@ -7,7 +7,7 @@
|
||||
<result column="object_id" property="objectId" />
|
||||
<result column="status" property="status" />
|
||||
</resultMap>
|
||||
<select id="releasePageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
<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
|
||||
@ -30,6 +30,23 @@
|
||||
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
|
||||
and details.object_type='bug'
|
||||
and details.release_id = #{qo.id}
|
||||
and details.status != 'closed'
|
||||
<if test="qo.name != null and qo.name != '' ">
|
||||
and b.title like concat('%', #{qo.name}, '%')
|
||||
</if>
|
||||
<if test="qo.bugId != null ">
|
||||
and b.id = #{qo.bugId}
|
||||
</if>
|
||||
order by b.id desc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="storyPageList" resultType="com.sa.zentao.dao.ZtStoryDTO">
|
||||
|
||||
select s.*,sp.spec ,sp.verify,sp.files from zt_story s
|
||||
@ -37,7 +54,7 @@
|
||||
left join zt_storyspec sp on s.id = sp.story
|
||||
where 1=1
|
||||
and s.status='active'
|
||||
and s.stage='tested'
|
||||
and stage in ('wait','projected','developing','developed','testing','tested')
|
||||
and s.id in
|
||||
<foreach collection="qo.storyList" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
@ -54,5 +71,21 @@
|
||||
|
||||
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')
|
||||
and b.project = #{qo.project}
|
||||
<if test="qo.name != null and qo.name != '' ">
|
||||
and b.title like concat('%', #{qo.name}, '%')
|
||||
</if>
|
||||
<if test="qo.bugId != null ">
|
||||
and b.id = #{qo.bugId}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
@ -55,6 +55,7 @@
|
||||
or account like concat('%', #{qo.account}, '%')
|
||||
or pinyin like concat('%', #{qo.account}, '%')
|
||||
</if>
|
||||
and deleted = '0'
|
||||
order by id desc
|
||||
|
||||
</select>
|
||||
@ -82,5 +83,13 @@
|
||||
GROUP BY date_str,u.account
|
||||
|
||||
</select>
|
||||
<select id="oaUserByNikeName" resultType="com.sa.zentao.dao.BaseStaff">
|
||||
SELECT * from os_system.base_staff staff WHERE staff.`name` = #{nickname}
|
||||
|
||||
</select>
|
||||
<select id="getDepart" resultType="com.sa.zentao.dao.BaseDepartment">
|
||||
select * from os_system.base_department WHERE id = #{departId}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user