feat - 审批日志增加节点其他属性
This commit is contained in:
parent
3b771aa153
commit
1070085454
@ -45,8 +45,12 @@ public interface VariableConstants {
|
||||
String PRINT_VAR_PROCESS_INITIATOR_POSITION_DESC = "发起人岗位";
|
||||
String PRINT_VAR_PROCESS_INITIATOR_PHONE = "initiatorPhone";
|
||||
String PRINT_VAR_PROCESS_INITIATOR_PHONE_DESC = "发起人联系方式";
|
||||
String PRINT_VAR_PROCESS_INITIATOR_UNIT = "initiatorUnit";
|
||||
String PRINT_VAR_PROCESS_INITIATOR_UNIT_DESC = "发起人单位";
|
||||
String PRINT_VAR_PROCESS_LOGS = "processLogs";
|
||||
String PRINT_VAR_PROCESS_LOGS_DESC = "审批日志";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_NODE_TYPE = "activityNodeType";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_NODE_TYPE_DESC = "节点类型";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_NAME = "activityName";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_NAME_DESC = "节点名称";
|
||||
String PRINT_VAR_PROCESS_LOG_APPROVER_NAME = "approverName";
|
||||
@ -61,4 +65,8 @@ public interface VariableConstants {
|
||||
String PRINT_VAR_PROCESS_LOG_OPERATION_TIME_DESC = "审批时间";
|
||||
String PRINT_VAR_PROCESS_LOG_SIGNATURE = "signature";
|
||||
String PRINT_VAR_PROCESS_LOG_SIGNATURE_DESC = "电子签名";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_RESULT = "activityResult";
|
||||
String PRINT_VAR_PROCESS_LOG_ACTIVITY_RESULT_DESC = "节点状态";
|
||||
String PRINT_VAR_PROCESS_LOG_OPERATION = "operationDesc";
|
||||
String PRINT_VAR_PROCESS_LOG_OPERATION_DESC = "操作描述";
|
||||
}
|
||||
|
||||
@ -79,16 +79,20 @@ import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCE
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INITIATOR_PHONE_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INITIATOR_POSITION;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INITIATOR_POSITION_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INITIATOR_UNIT;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INSTANCE_ID;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_INSTANCE_ID_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOGS;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOGS_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ACTIVITY_NAME;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ACTIVITY_NAME_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ACTIVITY_NODE_TYPE;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ACTIVITY_RESULT;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ADVICE;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_ADVICE_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_APPROVER_NAME;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_APPROVER_NAME_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_OPERATION;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_OPERATION_TIME;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_OPERATION_TIME_DESC;
|
||||
import static cn.axzo.workflow.common.constant.VariableConstants.PRINT_VAR_PROCESS_LOG_POSITION;
|
||||
@ -380,6 +384,7 @@ public class PrintAdminController implements PrintAdminApi {
|
||||
variables.put(PRINT_VAR_PROCESS_INITIATOR_NAME, user.isPresent() ? user.get().getRealName() : "");
|
||||
variables.put(PRINT_VAR_PROCESS_INITIATOR_POSITION, user.isPresent() && Objects.nonNull(user.get().getJob()) ? user.get().getJob().getName() : "");
|
||||
variables.put(PRINT_VAR_PROCESS_INITIATOR_PHONE, user.isPresent() ? user.get().getProfile().getPhone() : "");
|
||||
variables.put(PRINT_VAR_PROCESS_INITIATOR_UNIT, user.isPresent() ? user.get().getOrganizationalUnitName() : "");
|
||||
variables.remove(PRINT_VAR_PROCESS_INITIATOR);
|
||||
}
|
||||
// 填充审批日志
|
||||
@ -395,11 +400,14 @@ public class PrintAdminController implements PrintAdminApi {
|
||||
.forEach(taskLog -> {
|
||||
Map<String, Object> taskLogMap = new HashMap<>();
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_ACTIVITY_NAME, taskLog.getName());
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_ACTIVITY_NODE_TYPE, taskLog.getNodeType().getType());
|
||||
Optional<OrgNodeUserBriefInfoResp> user = getUserInfo(taskLog.getAssigneeSnapshot());
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_APPROVER_NAME, user.isPresent() ? user.get().getRealName() : "");
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_UNIT, user.isPresent() ? user.get().getOrganizationalUnitName() : "");
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_POSITION, user.isPresent() && Objects.nonNull(user.get().getJob()) ? user.get().getJob().getName() : "");
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_ADVICE, taskLog.getAdvice());
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_OPERATION, taskLog.getOperationDesc());
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_ACTIVITY_RESULT, taskLog.getResult().getStatus());
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_OPERATION_TIME, sdf.format(taskLog.getCreateTime()));
|
||||
taskLogMap.put(PRINT_VAR_PROCESS_LOG_SIGNATURE, taskLog.getSignatureUrl());
|
||||
taskLogs.add(taskLogMap);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user