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