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:
2025-12-30 17:17:40 +08:00
2 changed files with 63 additions and 54 deletions

View File

@@ -646,16 +646,16 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
ztTask.setEstimate(ztTask.getUseTime().floatValue());
ztTask.setLeft(ztTask.getUseTime().floatValue());
}
if(ztTask.getDeadline()==null){
if (ztTask.getDeadline() == null) {
throw new BusinessException("当前环境异常请联系管理员");
}
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());
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());
}
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());
}
this.storyService.updateById(ztStory);
@@ -705,7 +705,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
@Override
@Transactional
public void modifyTask(ZtTaskDTO dto) {
if(dto.getDeadline()==null||dto.getEstStarted()==null){
if (dto.getDeadline() == null || dto.getEstStarted() == null) {
throw new BusinessException("请录入开始结束日期");
}
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);
}
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());
@@ -912,7 +912,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
if ("doing".equals(ztTask.getStatus())) {
this.storyFeedbackService.feedbackStart(ztTask.getFeedback());
} else {
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(),ztTask.getFeedbackRemark());
this.storyFeedbackService.feedbackFinished(ztTask.getFeedback(), ztTask.getFeedbackRemark());
}
}
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(),
RiskUserThreadLocal.get().getName(), "", null);
if("done".equals(ztTask.getStatus())){
String finishBy = StringUtils.isEmpty(ztTask.getFinishedby())?RiskUserThreadLocal.get().getName():ztTask.getFinishedby();
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(),
if ("test".equals(ztTask.getType()) && !StringUtils.isEmpty(ztTask.getDeliverContent())) {
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);
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(),
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
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);
}
if(ztTask.getStory()!=null&&ztTask.getStory()!=0){
if (ztTask.getStory() != null && ztTask.getStory() != 0) {
//更新需求交付物
ZtStory ztStory = this.storyService.getById(ztTask.getStory());
if(ztStory!=null){
if (ztStory != null) {
ztStory.setDeliverContent(ztTask.getDeliverContent());
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(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
}
@@ -1032,7 +1032,7 @@ public class ZtTaskServiceImpl extends ServiceImpl<ZtTaskMapper, ZtTask> impleme
//添加action
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(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getDeliverContent(), null);
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(),
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(),
StringUtils.isEmpty(finishBy) ? RiskUserThreadLocal.get().getName() : finishBy, dto.getRemark(), null);
}

View File

@@ -283,6 +283,8 @@
</if>
group by s.id
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">
<choose>
@@ -379,12 +381,12 @@
pt.name productName
from zt_story s
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
left join zt_project pj on pstory.project = pj.id
left join zt_product pt on s.product = pt.id
left join zt_storyreview v on s.id = v.story and s.version = v.version
left join zt_projectstory pstory on s.id = pstory.story and pstory.`type` = 'project'
left join zt_project pj on pstory.project = pj.id
left join zt_product pt on s.product = pt.id
left join zt_projectstory ps on s.id = ps.story
WHERE 1=1
WHERE 1=1
<!-- <if test="qo.startDate !=null">-->
@@ -405,6 +407,12 @@
<if test="qo.productUser != null and qo.productUser != '' ">
and s.product_user like concat('%', #{qo.productUser}, '%')
</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 != '' ">
and s.pri = #{qo.pri}
</if>
@@ -451,37 +459,37 @@
and pt.name like concat('%', #{qo.productName}, '%')
</if>
<if test="qo.project != null ">
and ps.project =#{qo.project}
and ps.type= 'project'
</if>
<if test="qo.execution != null ">
and ps.project =#{qo.execution}
and ps.type= 'execution'
</if>
<if test="qo.moduleId != null ">
and s.module =#{qo.moduleId}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
<if test="qo.project != null ">
and ps.project =#{qo.project}
and ps.type= 'project'
</if>
<if test="qo.execution != null ">
and ps.project =#{qo.execution}
and ps.type= 'execution'
</if>
<if test="qo.moduleId != null ">
and s.module =#{qo.moduleId}
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ALL' ">
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
and s.status !='closed'
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
and s.assignedTo = #{qo.userName}
</if>
<if test="qo.kfz == 1 ">
<if test="qo.userName != null and qo.userName != '' ">
and
(s.assignedTo = #{qo.userName}
or s.openedBy = #{qo.userName}
)
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WGB' ">
and s.status !='closed'
</if>
<if test="qo.searchVal != null and qo.searchVal == 'ZGW' ">
and s.assignedTo = #{qo.userName}
</if>
</if>
<if test="qo.kfz == 1 ">
<if test="qo.userName != null and qo.userName != '' ">
and
(s.assignedTo = #{qo.userName}
or s.openedBy = #{qo.userName}
)
</if>
</if>
<if test="qo.searchVal != null and qo.searchVal == 'WCJ' ">
and s.openedBy = #{qo.userName}
@@ -608,7 +616,7 @@
</if>
group by s.id
group by s.id
<choose>
<when test="qo.orderName != '' and qo.orderName != null ">