fix: 修复需求部门审核备注信息不传递给后续节点的问题

1. TaskApprovalService: 在approvePrimaryTask中将审核备注保存到task.remark字段
2. TaskItem: 添加remark字段用于传递主任务备注信息
3. TaskItemController: 在enrichTaskItemsWithSubTasks中填充remark
4. TaskHall.vue: 在mapTaskItemToTask中映射remark字段

同时将190条历史审核备注从task_approval_log同步到task表
This commit is contained in:
Your Name 2026-01-27 21:16:46 +08:00
parent 1d66f0d7f5
commit 3d6c649388
5 changed files with 21 additions and 1 deletions

View File

@ -192,6 +192,8 @@ public class TaskItemController {
Task mainTask = taskMap.get(taskId);
if (mainTask != null) {
item.setIsPipeline(mainTask.getIsPipeline());
// 🔥 传递主任务的备注信息给子任务(需求部门审核时填写的备注)
item.setRemark(mainTask.getRemark());
}
// 填充同一主任务的所有子任务列表

View File

@ -272,4 +272,15 @@ public class TaskItem implements Serializable {
*/
@TableField(exist = false)
private String detailCompleterName;
/**
* 主任务备注信息(非数据库字段,从主任务关联)
* 用于传递需求部门审核时填写的备注给后续节点
*/
@TableField(exist = false)
private String remark;
// Getter和Setter
public String getRemark() { return remark; }
public void setRemark(String remark) { this.remark = remark; }
}

View File

@ -79,6 +79,10 @@ public class TaskApprovalService {
task.setDemandApprovalTime(LocalDateTime.now());
task.setCurrentApproverId(completerId);
task.setCurrentApproverRole("detail_completer");
// 🔥 保存审核备注到任务表,以便后续节点可以查看
if (comment != null && !comment.trim().isEmpty()) {
task.setRemark(comment);
}
taskMapper.updateById(task);
// 4. 记录审核日志

View File

@ -70,5 +70,6 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
TaskCard: typeof import('./../components/TaskCard.vue')['default']
TaskFilters: typeof import('./../components/TaskFilters.vue')['default']
TaskFlowQueryDialog: typeof import('./../components/TaskFlowQueryDialog.vue')['default']
}
}

View File

@ -4947,7 +4947,9 @@ const mapTaskItemToTask = (item: any) => {
isPrimaryTask: item.isPrimaryTask, // 是否一级需求任务
primaryPublisherName: item.primaryPublisherName, // 一级需求发起人姓名
primaryPublisherDeptName: item.primaryPublisherDeptName, // 一级需求发起人部门名称
detailCompleterName: item.detailCompleterName // 明细完善人姓名
detailCompleterName: item.detailCompleterName, // 明细完善人姓名
// 🔥 主任务备注信息(需求部门审核时填写)
remark: item.remark
}
}