REQ-2924-修复评论添加附件报错问题

This commit is contained in:
yangqicheng 2024-09-13 15:22:55 +08:00
parent 336bfb47ff
commit 35b0fe5e40
2 changed files with 9 additions and 10 deletions

View File

@ -112,15 +112,6 @@ public class CustomCommentTaskCmd extends AbstractCommand<Void> implements Seria
.filter(i -> Objects.equals(i.getId(), task.getId())).findAny()
.ifPresent(i -> i.setAssignee(operator.buildAssigneeId()));
// 新增评论
Authentication.setAuthenticatedUserId(operator.buildAssigneeId());
addComment(commandContext, task, COMMENT_TYPE_ADVICE, comment);
addComment(commandContext, task, COMMENT_TYPE_COMMENT_EXT, JSONUtil.toJsonStr(commentExt));
Authentication.setAuthenticatedUserId(null);
// 处理附件
batchAddAttachment(commandContext, processInstanceId, task.getId(), attachmentList, operator);
createExtTaskInst(extAxHiTaskInstService, processInstanceId,
task.getId(), task.getTaskDefinitionKey(), operator, COMMENTED.getStatus());
task.setTransientVariable(TASK_COMPLETE_OPERATION_TYPE + task.getId(), COMMENTED.getStatus());
@ -128,6 +119,14 @@ public class CustomCommentTaskCmd extends AbstractCommand<Void> implements Seria
// 保存临时节点
taskService.saveTask(task);
// 新增评论
Authentication.setAuthenticatedUserId(operator.buildAssigneeId());
addComment(commandContext, task, COMMENT_TYPE_ADVICE, comment);
addComment(commandContext, task, COMMENT_TYPE_COMMENT_EXT, JSONUtil.toJsonStr(commentExt));
Authentication.setAuthenticatedUserId(null);
// 处理附件
batchAddAttachment(commandContext, processInstanceId, task.getId(), attachmentList, operator);
// 设置快照信息
task.setTransientVariable(INTERNAL_TASK_RELATION_ASSIGNEE_INFO + task.getId(), operator.toJson());

View File

@ -16,7 +16,7 @@ create table `workflow-engine`.ext_ax_process_log
assignee_id bigint default 0 not null comment '审批人标识(axzo=personId)',
assignee_tenant_id varchar(255) default '' not null comment '审批人归属租户',
assignee_name varchar(255) default '' not null comment '审批人姓名',
assignee_ou_id bigint default 0 not null comment '审批人归属单位',
assignee_ou_id varchar(64) default '' not null comment '审批人归属单位',
start_time datetime(3) default CURRENT_TIMESTAMP(3) not null comment '任务开始时间',
end_time datetime(3) null comment '任务结束时间',
button_conf json null comment '按钮配置',