Browse Source

任务

master
DX 2 months ago
parent
commit
3f1b95c2a0
  1. 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
  2. 15
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java
  3. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoSaveReqVO.java
  4. 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/taskinfo/TaskInfoServiceImpl.java

1
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java

@ -138,6 +138,7 @@ public class EnterpriseController {
pageResult.getList().forEach(item->{
item.setInviterName(adminUserService.getUser(Long.valueOf(item.getUserId())).getNickname());
});
return success(BeanUtils.toBean(pageResult, EnterpriseRespVO.class));
}

15
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/TaskInfoController.java

@ -49,7 +49,6 @@ public class TaskInfoController {
private DeptService deptService;
@PostMapping("/create")
@Operation(summary = "创建任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。")
@PreAuthorize("@ss.hasPermission('system:task-info:create')")
@ -97,6 +96,20 @@ public class TaskInfoController {
return success(BeanUtils.toBean(pageResult, TaskInfoRespVO.class));
}
@GetMapping("/pcpage")
@Operation(summary = "获得任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。分页")
@PreAuthorize("@ss.hasPermission('system:task-info:query')")
public CommonResult<PageResult<TaskInfoRespVO>> getTaskInfoPCPage(@Valid TaskInfoPageReqVO pageReqVO) {
PageResult<TaskInfoDO> 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("/export-excel")
@Operation(summary = "导出任务表,用于存储所有的任务信息,任务可由不同用户创建并管理。 Excel")
@PreAuthorize("@ss.hasPermission('system:task-info:export')")

4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taskinfo/vo/TaskInfoSaveReqVO.java

@ -35,7 +35,7 @@ public class TaskInfoSaveReqVO {
private Integer priority;
@Schema(description = "任务状态", example = "2")
@NotEmpty(message = "任务状态不能为空")
// @NotEmpty(message = "任务状态不能为空")
private String status;
@Schema(description = "任务计划开始时间")
@ -57,7 +57,7 @@ public class TaskInfoSaveReqVO {
private Integer taskTotal;
@Schema(description = "标签集合")
private List<Long> tagIds;
private List<Long> tags;
@Schema(defaultValue = "企业集合")
private List<Long> enterpriseIds;

4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/taskinfo/TaskInfoServiceImpl.java

@ -55,8 +55,8 @@ public class TaskInfoServiceImpl implements TaskInfoService {
taskInfoMapper.insert(taskInfo);
//添加任务标签
if (!createReqVO.getTagIds().isEmpty() && createReqVO.getTagIds().size() > 0) {
createReqVO.getTagIds().forEach(item->{
if (!createReqVO.getTags().isEmpty() && createReqVO.getTags().size() > 0) {
createReqVO.getTags().forEach(item->{
taskTagMapper.insert(new TaskTagDO().setTaskId(taskInfo.getId()).setTagId(item));
});
}

Loading…
Cancel
Save