From 555902224c77a76ffb0ebf68609a877bd2ed2f6b Mon Sep 17 00:00:00 2001 From: shiji <1913712590@qq.com> Date: Thu, 20 Jul 2023 16:16:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A8=A1=E5=9D=97=20?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B=E7=9A=84=E4=B8=8A=E7=BA=A7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/task/controller/TaskController.java | 11 +++++++++++ .../main/java/org/jeecg/modules/task/entity/Task.java | 7 +++++++ 2 files changed, 18 insertions(+) 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 108c9e6..b731b9a 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 @@ -30,6 +30,8 @@ import org.jeecg.modules.system.entity.SysUser; import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.task.entity.Task; import org.jeecg.modules.task.service.ITaskService; +import org.jeecg.modules.taskType.entity.TaskType; +import org.jeecg.modules.taskType.service.ITaskTypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -74,6 +76,9 @@ public class TaskController extends JeecgController { @Resource private IRulexService iRulexService; + @Resource + private ITaskTypeService taskTypeService; + /** * 分页列表查询 * @@ -221,6 +226,12 @@ public class TaskController extends JeecgController { e.setUpperTaskName(taskUpper.getTaskName()); } } + if (StringUtils.isNotBlank(e.getTypeId())) { + TaskType taskType = taskTypeService.getById(e.getTypeId()); + if (ObjectUtils.isNotEmpty(taskType)) { + e.setTypePid(taskType.getPid()); + } + } if (e.getTaskFile() != null && !e.getTaskFile().equals("")) { e.setContentType("file"); } else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) { diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java index e75d257..5f2c6d6 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java @@ -118,6 +118,13 @@ public class Task implements Serializable { @ApiModelProperty(value = "任务类型id") @Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id") private java.lang.String typeId; + + /** + * 任务类型父id + */ + @TableField(exist = false) + @Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id") + private java.lang.String typePid; /** * 责任人 */