Commit 926a1063 by chenweisong

更新

parent 801f26f3
......@@ -100,9 +100,18 @@ public class TaskController {
List<Mission> missions = new ArrayList<>();
// 获取个人任务
List<Task> tasks = taskService.createTaskQuery().taskAssignee(username).active().list();
List<Task> tasks = taskService.createTaskQuery().taskAssigneeLike(username + "%").active().list();
tasks.forEach(task -> {
missions.add(convertTaskToMission(task, ImmutableMap.of("username", username, "type", CommonConstant.TASK_TYPE_PERSONAL)));
Map vars = ImmutableMap.of("username", username, "type", CommonConstant.TASK_TYPE_PERSONAL);
// 个人审核任务和补录任务
if (task.getAssignee().indexOf(":") > 0) {
String[] array = task.getAssignee().split(":");
long templateId = Long.parseLong(array[1]);
Template template = templateService.findById(templateId);
vars.put("config", template.getConfig());
vars.put("templateId", template.getId());
}
missions.add(convertTaskToMission(task, vars));
});
// 获取组任务
......@@ -343,21 +352,8 @@ public class TaskController {
missionType = CommonConstant.MISSION_TYPE_DATA_AUDIT;
mission = CommonConstant.MISSION_TEXT_DATA_AUDIT;
}
long templateId = 0;
String config = "";
if (type == CommonConstant.TASK_TYPE_PERSONAL) {
String assignee = task.getAssignee();
String[] array = assignee.split(":");
try {
templateId = Long.parseLong(array[1]);
config = "";
} catch (Exception e) {
}
} else if (type == CommonConstant.TASK_TYPE_GROUP) {
templateId = Long.parseLong(params.get("templateId").toString());
config = params.get("config").toString();
}
long templateId = Long.parseLong(params.get("templateId").toString());
String config = params.get("config").toString();
builder.config(config);
builder.excelId(templateId);
} else if (task.getTaskDefinitionKey().equals(CommonConstant.MISSION_KEY_MANAGER_AUDIT)) {
......
......@@ -77,7 +77,7 @@ public class TemplateController {
vars.put(CommonConstant.ACT_NEED_DATA_AUDIT, true);
Map audit = feignAuthService.getUserById(template.getAuditId());
CommonValidator.notNull(audit, "模板审核人不存在");
vars.put(CommonConstant.ACT_AUDIT_USER, audit.get("name").toString());
vars.put(CommonConstant.ACT_AUDIT_USER, audit.get("name").toString() + ":" + template.getId());
} else {
vars.put(CommonConstant.ACT_NEED_DATA_AUDIT, false);
String executionId = task.getExecutionId();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment