流程各节点加上审批人姓名

This commit is contained in:
wangliwen 2022-04-22 16:15:17 +08:00
parent 9c39989591
commit 3decf28405
3 changed files with 29 additions and 9 deletions

View File

@ -36,7 +36,7 @@ public class HistoryDetailDTO {
@ApiModelProperty(value = "执行ID")
private String executionId;
@ApiModelProperty(value = "受理人")
@ApiModelProperty(value = "受理人id")
private String assignee;
@ApiModelProperty(value = "开始时间")
@ -50,4 +50,7 @@ public class HistoryDetailDTO {
@ApiModelProperty(value = "审批意见")
private String comment;
@ApiModelProperty(value = "受理人姓名")
private String assigneeName;
}

View File

@ -37,4 +37,6 @@ public class HistoryDetailEntity {
private String comment;
private String assigneeName;
}

View File

@ -56,13 +56,28 @@
</select>
<select id="getTaskHandleDetailInfo" resultMap="HistoryDetail">
SELECT ahc.ID_, ahc.TYPE_, aht.ID_ as TASK_ID_, aht.PROC_INST_ID_, ahc.MESSAGE_,
aht.PROC_DEF_ID_, aht.EXECUTION_ID_, aht.NAME_, aht.ASSIGNEE_, aht.START_TIME_,
aht.END_TIME_ from ACT_HI_TASKINST aht
left join ACT_HI_COMMENT ahc on ahc.TASK_ID_ = aht.ID_ and ahc.TYPE_ = 'comment'
where aht.PROC_INST_ID_ = #{processInstanceId}
and aht.end_time_ is not null
order by aht.START_TIME_ desc
SELECT
ahc.ID_,
ahc.TYPE_,
aht.ID_ AS TASK_ID_,
aht.PROC_INST_ID_,
ahc.MESSAGE_,
aht.PROC_DEF_ID_,
aht.EXECUTION_ID_,
aht.NAME_,
aht.ASSIGNEE_,
aht.START_TIME_,
aht.END_TIME_,
( SELECT user1.real_name FROM sys_user user1 WHERE user1.id = aht.ASSIGNEE_ ) ASSIGNEE_NAME_
FROM
ACT_HI_TASKINST aht
LEFT JOIN ACT_HI_COMMENT ahc ON ahc.TASK_ID_ = aht.ID_
AND ahc.TYPE_ = 'comment'
WHERE
aht.PROC_INST_ID_ = #{processInstanceId}
AND aht.end_time_ IS NOT NULL
ORDER BY
aht.START_TIME_ DESC
</select>
</mapper>