diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java index 63ab3c0..bd96289 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java @@ -234,6 +234,25 @@ public class TaskController extends JeecgController { if (task == null) { return Result.error("未找到对应数据"); } + if (StringUtils.isNotBlank(task.getUpperId())) { + Task taskUpper = taskService.getById(task.getUpperId()); + if (ObjectUtils.isNotEmpty(taskUpper)) { + task.setUpperTaskName(taskUpper.getTaskName()); + } + } + if (task.getTaskFile()!=null&& !task.getTaskFile().equals("")){ + task.setContentType("file"); + }else if(task.getTaskPic()!=null&& !task.getTaskPic().equals("")){ + task.setContentType("image"); + }else{ + task.setContentType("text"); + } + String managerUsers = task.getManagerUsers(); + if (managerUsers!=null&&!managerUsers.equals("")) { + SysUser byId = iSysUserService.getById(managerUsers); + if (byId!=null) + task.setHeadpic(byId.getAvatar()); + } return Result.OK(task); }