diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index e2a23b3..0e3a983 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -286,6 +286,9 @@ public class TodoCenterManage { ProjectListReq projectListReq = new ProjectListReq(); BeanUtils.copyProperties(param, projectListReq); List projects = projectLibManage.projectList(projectListReq); + if(StringUtils.isBlank(employeeCode)){ + projects = Collections.emptyList(); + } if (CollUtil.isNotEmpty(projects)) { Map projectsMap = CollUtils.listToMap(projects, Project::getId); // 再查出项目关联的流程实例ID @@ -1725,8 +1728,12 @@ public class TodoCenterManage { // 获取登录用户全量信息 UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); // 获取员工浙政钉code - String employeeCode = userFullInfo.getEmployeeCode(); TodoNumVO todoNumVo = new TodoNumVO(); + String employeeCode = userFullInfo.getEmployeeCode(); + if (StringUtils.isBlank(employeeCode)) { + return todoNumVo; + } + // 查出项目库项目 ProjectListReq projectListReq = new ProjectListReq(); BeanUtils.copyProperties(param, projectListReq); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/TodoNumVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/TodoNumVO.java index d1ab1c3..ae03f91 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/TodoNumVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/TodoNumVO.java @@ -18,11 +18,11 @@ import lombok.NoArgsConstructor; public class TodoNumVO { @ApiModelProperty("待我处理总数量") - private Integer totalNum; + private Integer totalNum = 0; @ApiModelProperty("待我处理非增补项目总数量") - private Integer notAppendNum; + private Integer notAppendNum = 0; @ApiModelProperty("待我处理非增补项目总数量") - private Integer appendNum; + private Integer appendNum = 0; }