From 914d77ce7d94c328c290c411331aff5fe3937b13 Mon Sep 17 00:00:00 2001 From: zy <276996223@qq.com> Date: Tue, 18 Feb 2025 15:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=BF=94=E6=98=BE=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/taskinfo/TaskInfoController.java | 14 +------------- .../admin/taskinfo/vo/TaskInfoPageReqVO.java | 3 +++ .../admin/taskinfo/vo/TaskInfoRespVO.java | 4 ++++ .../system/dal/dataobject/taskinfo/TaskInfoDO.java | 5 +++++ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java index c4e6c7e..45abe3d 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java @@ -191,24 +191,12 @@ public class TaskInfoController { enterprisePageReqVO.setIds(longs); List enterpriseIdes=enterpriseService.getEnterpriseList(enterprisePageReqVO); item.setEnterpriseIdes(enterpriseIdes); + item.setTaskTypeName(tagLibraryService.getTagLibrary(Integer.valueOf(item.getTaskType())).getTagName()); }); return success(BeanUtils.toBean(pageResult, TaskInfoRespVO.class)); } - @GetMapping("/pcpage") - @Operation(summary = "获得任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。分页") - @PreAuthorize("@ss.hasPermission('system:task-info:query')") - public CommonResult> getTaskInfoPCPage(@Valid TaskInfoPageReqVO pageReqVO) { - PageResult pageResult = taskInfoService.getTaskInfoPage(pageReqVO); - AdminUserDO user = adminUserService.getUser(SecurityFrameworkUtils.getLoginUserId()); - DeptDO dep= deptService.getDept( user.getDeptId()); - pageResult.getList().forEach(item->{ - item.setPublishDep(dep.getName()); - item.setCreateName(adminUserService.getUser(Long.valueOf(item.getCreator())).getRealName()); - }); - return success(BeanUtils.toBean(pageResult, TaskInfoRespVO.class)); - } @GetMapping("/appPage") @Operation(summary = "获得任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。分页") diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java index c3de4e2..1e358c7 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoPageReqVO.java @@ -34,6 +34,9 @@ public class TaskInfoPageReqVO extends PageParam { @Schema(description = "任务类型,表示任务的类别,例如:1.发布任务、2.自动任务等", example = "2") private Integer taskType; + @Schema(description = "任务类型名称,表示任务的类别,例如:1.发布任务、2.自动任务等", example = "2") + private String taskTypeName; + @Schema(description = "任务优先级") private Integer priority; diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java index c8a62cd..d180f8c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoRespVO.java @@ -54,6 +54,7 @@ public class TaskInfoRespVO { @DictFormat("task_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中 private Integer taskType; + @Schema(description = "任务优先级", requiredMode = Schema.RequiredMode.REQUIRED) @ExcelProperty("任务优先级") private Integer priority; @@ -142,6 +143,9 @@ public class TaskInfoRespVO { //检查记录id private Long inspectionsId; + //任务类型名称 + private String taskTypeName; + diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java index f3a3717..a9603d9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taskinfo/TaskInfoDO.java @@ -57,6 +57,8 @@ public class TaskInfoDO extends BaseDO { * 枚举 {@link TODO task_type 对应的类} */ private Integer taskType; + + /** * 任务优先级 */ @@ -95,6 +97,9 @@ public class TaskInfoDO extends BaseDO { @TableField(exist = false) private String createName; + //任务类型名称 + @TableField(exist = false) + private String taskTypeName; //发布部门 @TableField(exist = false)