Commit 61db7611 by chenweisong

更新

parent cf7a308e
...@@ -85,7 +85,7 @@ public class IndexCtrl { ...@@ -85,7 +85,7 @@ public class IndexCtrl {
public ApiResponse getMyTasks() { public ApiResponse getMyTasks() {
User user = userService.getNormalUser(); User user = userService.getNormalUser();
User audit = userService.getAudit(); User audit = userService.getAudit();
List<Job> jobList = new ArrayList<>(); List<Map> jobList = new ArrayList<>();
// 获取任务 // 获取任务
List<Task> tasks = taskService.createNativeTaskQuery() List<Task> tasks = taskService.createNativeTaskQuery()
.sql("SELECT * FROM " + managementService.getTableName(Task.class) + " T WHERE T.ASSIGNEE_ = #{assignee1} OR T.ASSIGNEE_ = #{assignee2}") .sql("SELECT * FROM " + managementService.getTableName(Task.class) + " T WHERE T.ASSIGNEE_ = #{assignee1} OR T.ASSIGNEE_ = #{assignee2}")
...@@ -96,12 +96,20 @@ public class IndexCtrl { ...@@ -96,12 +96,20 @@ public class IndexCtrl {
String processId = task.getProcessInstanceId(); String processId = task.getProcessInstanceId();
Job job = jobService.findByProcessId(processId); Job job = jobService.findByProcessId(processId);
if (job != null && job.getStatus() != Job.STATUS_COMPLETED) { if (job != null && job.getStatus() != Job.STATUS_COMPLETED) {
Map map = new HashMap();
if (task.getTaskDefinitionKey().equals("addData")) { if (task.getTaskDefinitionKey().equals("addData")) {
job.setKind(Job.KIND_RECORD); map.put("kind", Job.KIND_RECORD);
} else { } else {
job.setKind(Job.KIND_AUDIT); map.put("kind", Job.KIND_AUDIT);
} }
jobList.add(job); map.put("taskId", job.getId());
if (job.getExcelList().size() > 0) {
Excel excel = job.getExcelList().get(0);
map.put("excelId", excel.getId());
map.put("config", excel.getConfig());
map.put("name", excel.getName());
}
jobList.add(map);
} }
} }
......
...@@ -73,8 +73,4 @@ public class Job implements Serializable { ...@@ -73,8 +73,4 @@ public class Job implements Serializable {
@ManyToOne @ManyToOne
private User user; private User user;
@Transient
private int kind;
} }
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