Merge remote-tracking branch 'origin/dev-2025' into dev-2025
# Conflicts: # src/main/java/com/sa/zentao/service/impl/ZtTaskServiceImpl.java # src/main/resources/mapper/ZtStoryMapper.xml
This commit is contained in:
@@ -646,16 +646,16 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
ztTask.setEstimate(ztTask.getUseTime().floatValue());
|
ztTask.setEstimate(ztTask.getUseTime().floatValue());
|
||||||
ztTask.setLeft(ztTask.getUseTime().floatValue());
|
ztTask.setLeft(ztTask.getUseTime().floatValue());
|
||||||
}
|
}
|
||||||
if(ztTask.getDeadline()==null){
|
if (ztTask.getDeadline() == null) {
|
||||||
throw new BusinessException("当前环境异常请联系管理员");
|
throw new BusinessException("当前环境异常请联系管理员");
|
||||||
}
|
}
|
||||||
this.baseMapper.insert(ztTask);
|
this.baseMapper.insert(ztTask);
|
||||||
if(ztTask.getDeadline()!=null&&ztTask.getStory()!=null&&ztTask.getStory()!=0){
|
if (ztTask.getDeadline() != null && ztTask.getStory() != null && ztTask.getStory() != 0) {
|
||||||
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
||||||
if(ztTask.getType().equals("devel")&&(ztStory.getDevelPlanEndTime()==null||ztTask.getDeadline().after(ztStory.getDevelPlanEndTime()))){
|
if (ztTask.getType().equals("devel") && (ztStory.getDevelPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getDevelPlanEndTime()))) {
|
||||||
ztStory.setDevelPlanEndTime(ztTask.getDeadline());
|
ztStory.setDevelPlanEndTime(ztTask.getDeadline());
|
||||||
}
|
}
|
||||||
if(ztTask.getType().equals("test")&&(ztStory.getTestPlanEndTime()==null||ztTask.getDeadline().after(ztStory.getTestPlanEndTime()))){
|
if (ztTask.getType().equals("test") && (ztStory.getTestPlanEndTime() == null || ztTask.getDeadline().after(ztStory.getTestPlanEndTime()))) {
|
||||||
ztStory.setTestPlanEndTime(ztTask.getDeadline());
|
ztStory.setTestPlanEndTime(ztTask.getDeadline());
|
||||||
}
|
}
|
||||||
this.storyService.updateById(ztStory);
|
this.storyService.updateById(ztStory);
|
||||||
@@ -705,7 +705,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void modifyTask(ZtTaskDTO dto) {
|
public void modifyTask(ZtTaskDTO dto) {
|
||||||
if(dto.getDeadline()==null||dto.getEstStarted()==null){
|
if (dto.getDeadline() == null || dto.getEstStarted() == null) {
|
||||||
throw new BusinessException("请录入开始结束日期");
|
throw new BusinessException("请录入开始结束日期");
|
||||||
}
|
}
|
||||||
ZtTask ztTask = this.baseMapper.selectById(dto.getId());
|
ZtTask ztTask = this.baseMapper.selectById(dto.getId());
|
||||||
@@ -852,11 +852,11 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false);
|
this.storyService.taskFinishChangeStatus(ztTask.getStory(), null, TaskType.transferType(ztTask.getType()), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ObjectUtils.notEqual(oldExecution,newExecution)){
|
if (ObjectUtils.notEqual(oldExecution, newExecution)) {
|
||||||
//迭代切换了
|
//迭代切换了
|
||||||
this.kanbanlaneService.removeKanbanCell(oldExecution,ztTask.getId(),KanbanCellType.TASK);
|
this.kanbanlaneService.removeKanbanCell(oldExecution, ztTask.getId(), KanbanCellType.TASK);
|
||||||
//添加新的看板迭代
|
//添加新的看板迭代
|
||||||
this.kanbanlaneService.addKanbanCell(newExecution,ztTask.getId(),KanbanCellType.TASK,ztTask);
|
this.kanbanlaneService.addKanbanCell(newExecution, ztTask.getId(), KanbanCellType.TASK, ztTask);
|
||||||
}
|
}
|
||||||
taskSendZpMessage(ztTask.getId(), oldAssignedTo, ztTask.getAssignedTo());
|
taskSendZpMessage(ztTask.getId(), oldAssignedTo, ztTask.getAssignedTo());
|
||||||
|
|
||||||
@@ -912,7 +912,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
if ("doing".equals(ztTask.getStatus())) {
|
if ("doing".equals(ztTask.getStatus())) {
|
||||||
this.storyFeedbackService.feedbackStart(ztTask.getFeedback());
|
this.storyFeedbackService.feedbackStart(ztTask.getFeedback());
|
||||||
} else {
|
} else {
|
||||||
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
|
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(), ztTask.getFeedbackRemark());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dto.getConsumed() > 0) {
|
if (dto.getConsumed() > 0) {
|
||||||
@@ -929,26 +929,26 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
|
|
||||||
actionService.addAction(ActionType.RW, ActionStatus.KS, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.RW, ActionStatus.KS, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
RiskUserThreadLocal.get().getName(), "", null);
|
RiskUserThreadLocal.get().getName(), "", null);
|
||||||
if("done".equals(ztTask.getStatus())){
|
if ("done".equals(ztTask.getStatus())) {
|
||||||
String finishBy = StringUtils.isEmpty(ztTask.getFinishedby())?RiskUserThreadLocal.get().getName():ztTask.getFinishedby();
|
String finishBy = StringUtils.isEmpty(ztTask.getFinishedby()) ? RiskUserThreadLocal.get().getName() : ztTask.getFinishedby();
|
||||||
//如果是测试任务 提交交付物
|
//如果是测试任务 提交交付物
|
||||||
if("test".equals(ztTask.getType())&&!StringUtils.isEmpty(ztTask.getDeliverContent())){
|
if ("test".equals(ztTask.getType()) && !StringUtils.isEmpty(ztTask.getDeliverContent())) {
|
||||||
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, ztTask.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
||||||
if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
|
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
|
||||||
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, ztTask.getStory(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
||||||
}
|
}
|
||||||
if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
|
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
|
||||||
//更新需求交付物
|
//更新需求交付物
|
||||||
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
||||||
if(ztStory!=null){
|
if (ztStory != null) {
|
||||||
ztStory.setDeliverContent(ztTask.getDeliverContent());
|
ztStory.setDeliverContent(ztTask.getDeliverContent());
|
||||||
this.storyService.updateById(ztStory);
|
this.storyService.updateById(ztStory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!StringUtils.isEmpty(dto.getRemark())){
|
if (!StringUtils.isEmpty(dto.getRemark())) {
|
||||||
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
||||||
}
|
}
|
||||||
@@ -1032,7 +1032,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
//添加action
|
//添加action
|
||||||
ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject()));
|
ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject()));
|
||||||
//如果是测试任务 提交交付物
|
//如果是测试任务 提交交付物
|
||||||
if("test".equals(ztTask.getType())&&!StringUtils.isEmpty(ztTask.getDeliverContent())){
|
if ("test".equals(ztTask.getType()) && !StringUtils.isEmpty(ztTask.getDeliverContent())) {
|
||||||
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.RW, ActionStatus.TJJFW, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
||||||
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
|
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
|
||||||
@@ -1046,7 +1046,8 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|||||||
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, ztTask.getStory(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.XQ, ActionStatus.TJJFW, ztTask.getStory(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
||||||
}
|
}
|
||||||
if(!StringUtils.isEmpty(dto.getRemark())){
|
}
|
||||||
|
if (!StringUtils.isEmpty(dto.getRemark())) {
|
||||||
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
actionService.addAction(ActionType.RW, ActionStatus.TJBZ, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
||||||
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,6 +283,8 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
group by s.id
|
group by s.id
|
||||||
|
|
||||||
|
|
||||||
<choose>
|
<choose>
|
||||||
<when test="qo.orderName != '' and qo.orderName != null ">
|
<when test="qo.orderName != '' and qo.orderName != null ">
|
||||||
<choose>
|
<choose>
|
||||||
@@ -405,6 +407,12 @@
|
|||||||
<if test="qo.productUser != null and qo.productUser != '' ">
|
<if test="qo.productUser != null and qo.productUser != '' ">
|
||||||
and s.product_user like concat('%', #{qo.productUser}, '%')
|
and s.product_user like concat('%', #{qo.productUser}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<!-- <if test="qo.startDate !=null">-->
|
||||||
|
<!-- and s.openedDate <![CDATA[>=]]> #{qo.startDate}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- <if test="qo.endDate !=null">-->
|
||||||
|
<!-- and s.openedDate <![CDATA[<=]]> #{qo.endDate}-->
|
||||||
|
<!-- </if>-->
|
||||||
<if test="qo.pri != null and qo.pri != '' ">
|
<if test="qo.pri != null and qo.pri != '' ">
|
||||||
and s.pri = #{qo.pri}
|
and s.pri = #{qo.pri}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user