包头工作流流程保存字段到表单打日志
This commit is contained in:
parent
4b8950b696
commit
af381b87c8
@ -20,8 +20,10 @@ import java.util.Map;
|
|||||||
@Data
|
@Data
|
||||||
public class ApprovalProps implements Serializable {
|
public class ApprovalProps implements Serializable {
|
||||||
private static final long serialVersionUID = -45475579271153023L;
|
private static final long serialVersionUID = -45475579271153023L;
|
||||||
|
//流程中保存时间到表单
|
||||||
private String saveDateTime;
|
private String saveDateTime;
|
||||||
|
|
||||||
|
//流程中保存账号到表单
|
||||||
private String saveFormUser;
|
private String saveFormUser;
|
||||||
|
|
||||||
private ApprovalTypeEnum assignedType;
|
private ApprovalTypeEnum assignedType;
|
||||||
|
|||||||
@ -415,12 +415,13 @@ public class ProcessTaskServiceImpl implements ProcessTaskService {
|
|||||||
if (StrUtil.isNotBlank(params.getTaskId())) {
|
if (StrUtil.isNotBlank(params.getTaskId())) {
|
||||||
task = taskService.createTaskQuery().taskId(params.getTaskId()).active().singleResult();
|
task = taskService.createTaskQuery().taskId(params.getTaskId()).active().singleResult();
|
||||||
}
|
}
|
||||||
|
//保存流程中的账号
|
||||||
String instanceId = params.getInstanceId();
|
String instanceId = params.getInstanceId();
|
||||||
String processDefinitionId = task.getProcessDefinitionId();
|
String processDefinitionId = task.getProcessDefinitionId();
|
||||||
Map<String, Object> contextVar = uelTools.getContextVar(instanceId, processDefinitionId);
|
Map<String, Object> contextVar = uelTools.getContextVar(instanceId, processDefinitionId);
|
||||||
Map map = (Map) contextVar.get(WflowGlobalVarDef.WFLOW_NODE_PROPS);
|
Map map = (Map) contextVar.get(WflowGlobalVarDef.WFLOW_NODE_PROPS);
|
||||||
Object nodeProps = map.get(task.getTaskDefinitionKey());
|
Object nodeProps = map.get(task.getTaskDefinitionKey());
|
||||||
Map<String, JSONArray> nodeLis = null;
|
log.info("保存流程中的账号用户id:{},信息:{}", userId, JSON.toJSONString(nodeProps));
|
||||||
if (nodeProps instanceof ApprovalProps) {
|
if (nodeProps instanceof ApprovalProps) {
|
||||||
ApprovalProps props = (ApprovalProps) nodeProps;
|
ApprovalProps props = (ApprovalProps) nodeProps;
|
||||||
String saveFormUser = props.getSaveFormUser();
|
String saveFormUser = props.getSaveFormUser();
|
||||||
@ -430,7 +431,7 @@ public class ProcessTaskServiceImpl implements ProcessTaskService {
|
|||||||
jsonObject.put("id", userId);
|
jsonObject.put("id", userId);
|
||||||
jsonObject.put("type", "user");
|
jsonObject.put("type", "user");
|
||||||
jsonObject.put("selected", true);
|
jsonObject.put("selected", true);
|
||||||
params.getFormData().put(saveFormUser, Arrays.asList(jsonObject));
|
params.getFormData().put(saveFormUser, Collections.singletonList(jsonObject));
|
||||||
}
|
}
|
||||||
String saveDateTime = props.getSaveDateTime();
|
String saveDateTime = props.getSaveDateTime();
|
||||||
if (StrUtil.isNotBlank(saveDateTime)) {
|
if (StrUtil.isNotBlank(saveDateTime)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user