|
|
|
|
@@ -863,6 +863,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|
|
|
|
ztTask.setConsumed(dto.getConsumed());
|
|
|
|
|
ztTask.setLeft(dto.getLeft() - dto.getConsumed());
|
|
|
|
|
ztTask.setFeedbackRemark(dto.getFeedbackRemark());
|
|
|
|
|
ztTask.setDeliverContent(dto.getDeliverContent());
|
|
|
|
|
if (ztTask.getLeft() < 0) {
|
|
|
|
|
ztTask.setLeft(0f);
|
|
|
|
|
}
|
|
|
|
|
@@ -887,8 +888,34 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|
|
|
|
.eq(ZtProjectproduct::getProject, ztTask.getProject()));
|
|
|
|
|
|
|
|
|
|
actionService.addAction(ActionType.RW, ActionStatus.KS, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
|
|
|
|
RiskUserThreadLocal.get().getName(), dto.getRemark(), null);
|
|
|
|
|
RiskUserThreadLocal.get().getName(), "", null);
|
|
|
|
|
if("done".equals(ztTask.getStatus())){
|
|
|
|
|
String finishBy = StringUtils.isEmpty(ztTask.getFinishedby())?RiskUserThreadLocal.get().getName():ztTask.getFinishedby();
|
|
|
|
|
//如果是测试任务 提交交付物
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
|
|
|
|
}
|
|
|
|
|
if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
|
|
|
|
|
//更新需求交付物
|
|
|
|
|
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
|
|
|
|
|
if(ztStory!=null){
|
|
|
|
|
ztStory.setDeliverContent(ztTask.getDeliverContent());
|
|
|
|
|
this.storyService.updateById(ztStory);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
|
|
|
|
}
|
|
|
|
|
actionService.addAction(ActionType.RW, ActionStatus.WC, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, "", null);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (ztTask.getExecution() != null && ztTask.getExecution() != 0) {
|
|
|
|
|
if (StringUtils.isEmpty(dto.getTabType())) {
|
|
|
|
|
KanbanQo qo = new KanbanQo();
|
|
|
|
|
@@ -949,7 +976,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|
|
|
|
ztTask.setFinishedDate(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ztTask.setDeliverContent(dto.getDeliverContent());
|
|
|
|
|
ztTask.setLasteditedby(RiskUserThreadLocal.get().getName());
|
|
|
|
|
ztTask.setLastediteddate(new Date());
|
|
|
|
|
this.baseMapper.updateById(ztTask);
|
|
|
|
|
@@ -964,8 +991,22 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
|
|
|
|
|
|
|
|
|
|
//添加action
|
|
|
|
|
ZtProjectproduct projectproduct = projectproductService.getOne(new QueryWrapper<ZtProjectproduct>().lambda().eq(ZtProjectproduct::getProject, ztTask.getProject()));
|
|
|
|
|
actionService.addAction(ActionType.RW, ActionStatus.WC, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
|
|
|
|
//如果是测试任务 提交交付物
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
|
|
|
|
|
}
|
|
|
|
|
actionService.addAction(ActionType.RW, ActionStatus.WC, dto.getId(), projectproduct == null ? null : projectproduct.getProduct().toString(), projectproduct == null ? null : projectproduct.getProject(), ztTask.getExecution(),
|
|
|
|
|
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, "", null);
|
|
|
|
|
|
|
|
|
|
if (ztTask.getExecution() != null && ztTask.getExecution() != 0) {
|
|
|
|
|
if (StringUtils.isEmpty(dto.getTabType())) {
|
|
|
|
|
kanbanlaneService.changeStatus(ztTask.getExecution(), ztTask.getId(), "task", "developed");
|
|
|
|
|
|