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; /** * 责任人 */