diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java index f141baa..1b56480 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java @@ -113,8 +113,12 @@ public class DeclaredProjectManage { VUtils.isTrue(Objects.isNull(userId)).throwMessage("获取登录用户失败!"); ProjectDTO projectInfo = dto.getProjectInfo(); - projectInfo.setAreaCode(userInfoDetails.getRegionCode()); - projectInfo.setArea(regionCacheHelper.getRegionName(userInfoDetails.getRegionCode(), RegionConst.RL_COUNTY)); + + if(StringUtils.isNotBlank(userInfoDetails.getRegionCode())){ + projectInfo.setAreaCode(userInfoDetails.getRegionCode()); + projectInfo.setArea(regionCacheHelper.getRegionName(userInfoDetails.getRegionCode(), RegionConst.RL_COUNTY)); + } + projectInfo.setBuildOrgCode(userInfoDetails.getOrganizationCode()); projectInfo.setBuildOrgName(userInfoDetails.getOrganizationName()); @@ -131,7 +135,7 @@ public class DeclaredProjectManage { //如果是重新提交的话 判断下 项目是否存在 if(Objects.nonNull(projectInfo.getId())){ - //不允许带项目id + //新申报的项目不允许带项目id projectInfo.setId(null); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java index 4a7876e..e35da18 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java @@ -187,12 +187,8 @@ public class PrequalificationDeclaredProjectManage { UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(userId); //放入用户的单位 req.setBuildOrgCode(userFullInfo.getOrganizationCode()); - req.setPageNumber(CommonConst.EXPORT_PAGE_NUMBER); - req.setPageSize(CommonConst.EXPORT_PAGE_SIZE); LambdaQueryWrapper query = ProjectHelper.projectQuery(req); - Page page = projectService.page(req.page(), query); - List records = page.getRecords(); - + List records = projectService.list(query); List collect = records.stream().map(r -> { PretrialDeclaredExportDTO exportDTO = new PretrialDeclaredExportDTO(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java index 5512e53..dc7c87e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectdeclared.model.req; +import com.ningdatech.basic.model.PagePo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -13,7 +14,7 @@ import java.time.LocalDateTime; * @Author PoffyZhang */ @Data -public class AdjustmentListReq { +public class AdjustmentListReq extends PagePo { @ApiModelProperty("项目名称") private String projectName; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java index 38d3e54..efa731a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectdeclared.model.req; +import com.ningdatech.basic.model.PagePo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -13,7 +14,7 @@ import java.time.LocalDateTime; * @Author PoffyZhang */ @Data -public class ConstrctionPlanListReq { +public class ConstrctionPlanListReq extends PagePo { @ApiModelProperty("项目名称") private String projectName; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java index 3d90f21..3e40df3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectdeclared.model.req; +import com.ningdatech.basic.model.PagePo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -13,7 +14,7 @@ import java.time.LocalDateTime; * @Author PoffyZhang */ @Data -public class PrequalificationDeclaredListReq { +public class PrequalificationDeclaredListReq extends PagePo { @ApiModelProperty("项目名称") private String projectName; 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 c986008..67a8557 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 @@ -90,10 +90,13 @@ import org.apache.commons.io.FileUtils; import org.assertj.core.util.Lists; import org.flowable.bpmn.model.*; import org.flowable.engine.HistoryService; +import org.flowable.engine.TaskService; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ActivityInstance; import org.flowable.task.api.Task; +import org.flowable.task.api.TaskQuery; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mock.web.MockMultipartFile; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -143,6 +146,8 @@ public class TodoCenterManage { private final StatisticsService statisticsService; + @Autowired + private TaskService taskService; /** * 待办中心待我处理项目列表查询 @@ -155,6 +160,12 @@ public class TodoCenterManage { // 获取登录用户ID Long userId = LoginUserUtil.getUserId(); + //测试 有多少个 + TaskQuery taskQuery = taskService.createTaskQuery(); + taskQuery.active() + .taskCandidateOrAssigned(String.valueOf(userId)); + List taskList = taskQuery.list(); + // 查出项目库项目 ProjectListReq projectListReq = new ProjectListReq(); BeanUtils.copyProperties(param, projectListReq);