任务模块 任务类型的上级类型

dev_4newlayout
shiji 1 year ago
parent 86a3278abd
commit 555902224c
  1. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/controller/TaskController.java
  2. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/task/entity/Task.java

@ -30,6 +30,8 @@ import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService; import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.task.entity.Task; import org.jeecg.modules.task.entity.Task;
import org.jeecg.modules.task.service.ITaskService; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -74,6 +76,9 @@ public class TaskController extends JeecgController<Task, ITaskService> {
@Resource @Resource
private IRulexService iRulexService; private IRulexService iRulexService;
@Resource
private ITaskTypeService taskTypeService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -221,6 +226,12 @@ public class TaskController extends JeecgController<Task, ITaskService> {
e.setUpperTaskName(taskUpper.getTaskName()); 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("")) { if (e.getTaskFile() != null && !e.getTaskFile().equals("")) {
e.setContentType("file"); e.setContentType("file");
} else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) { } else if (e.getTaskPic() != null && !e.getTaskPic().equals("")) {

@ -118,6 +118,13 @@ public class Task implements Serializable {
@ApiModelProperty(value = "任务类型id") @ApiModelProperty(value = "任务类型id")
@Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id") @Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
private java.lang.String typeId; private java.lang.String typeId;
/**
* 任务类型父id
*/
@TableField(exist = false)
@Dict(dictTable = "task_type", dicText = "type_name",dicCode = "id")
private java.lang.String typePid;
/** /**
* 责任人 * 责任人
*/ */

Loading…
Cancel
Save