|
|
@@ -9,14 +9,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.ningdatech.basic.model.PageVo; |
|
|
|
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDTO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO; |
|
|
|
import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; |
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.Project; |
|
|
|
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; |
|
|
|
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; |
|
|
@@ -60,7 +60,7 @@ public class DeclaredProjectManage { |
|
|
|
|
|
|
|
private final ProcessModelService processModelService; |
|
|
|
|
|
|
|
public PageVo<ProjectDraftVo> pageDraft(DeclaredProjectListParamDto params) { |
|
|
|
public PageVo<ProjectDraftVO> pageDraft(DeclaredProjectListParamDTO params) { |
|
|
|
Page<ProjectDraft> page = params.page(); |
|
|
|
LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class) |
|
|
|
.eq(ProjectDraft::getUserId,params.getUserId()) |
|
|
@@ -76,17 +76,17 @@ public class DeclaredProjectManage { |
|
|
|
if (0L == page.getTotal()) { |
|
|
|
return PageVo.empty(); |
|
|
|
} |
|
|
|
List<ProjectDraftVo> res = page.getRecords().stream().map(record -> { |
|
|
|
ProjectDraftVo vo = new ProjectDraftVo(); |
|
|
|
List<ProjectDraftVO> res = page.getRecords().stream().map(record -> { |
|
|
|
ProjectDraftVO vo = new ProjectDraftVO(); |
|
|
|
BeanUtils.copyProperties(record, vo); |
|
|
|
return vo; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return PageVo.of(res, page.getTotal()); |
|
|
|
} |
|
|
|
|
|
|
|
public ProjectDraftVo draftDatail(Long id) { |
|
|
|
public ProjectDraftVO draftDatail(Long id) { |
|
|
|
ProjectDraft draft = projectDraftService.getById(id); |
|
|
|
ProjectDraftVo vo = new ProjectDraftVo(); |
|
|
|
ProjectDraftVO vo = new ProjectDraftVO(); |
|
|
|
BeanUtils.copyProperties(draft, vo); |
|
|
|
if(StringUtils.isNotBlank(draft.getProjectApplicationList())){ |
|
|
|
vo.setApplicationList(JSON.parseArray(draft.getProjectApplicationList(),ProjectApplication.class)); |
|
|
@@ -103,8 +103,8 @@ public class DeclaredProjectManage { |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public String startTheProcess(DeclaredProjectDto dto) { |
|
|
|
ProjectDto projectInfo = dto.getProjectInfo(); |
|
|
|
public String startTheProcess(DeclaredProjectDTO dto) { |
|
|
|
ProjectDTO projectInfo = dto.getProjectInfo(); |
|
|
|
String regionCode = projectInfo.getAreaCode(); |
|
|
|
|
|
|
|
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) |
|
|
@@ -121,7 +121,7 @@ public class DeclaredProjectManage { |
|
|
|
params.setUser(dto.getUser()); |
|
|
|
params.setProcessUsers(Collections.emptyMap()); |
|
|
|
//放入条件判断的项目字段 |
|
|
|
ProjectConditionDto conditionDto = new ProjectConditionDto(); |
|
|
|
ProjectConditionDTO conditionDto = new ProjectConditionDTO(); |
|
|
|
BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto); |
|
|
|
if (Objects.nonNull(conditionDto)) { |
|
|
|
dto.getFormData().putAll( |
|
|
@@ -145,7 +145,7 @@ public class DeclaredProjectManage { |
|
|
|
* @param projectDto |
|
|
|
* @param instanceId |
|
|
|
*/ |
|
|
|
private void saveProject(ProjectDto projectDto, String instanceId, String regionCode) { |
|
|
|
private void saveProject(ProjectDTO projectDto, String instanceId, String regionCode) { |
|
|
|
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示 |
|
|
|
try { |
|
|
|
//保存项目表信息 |
|
|
@@ -180,8 +180,8 @@ public class DeclaredProjectManage { |
|
|
|
* @param dto |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public Long saveToDraft(ProjectDraftSaveDto dto) { |
|
|
|
ProjectDto projectInfo = dto.getProjectInfo(); |
|
|
|
public Long saveToDraft(ProjectDraftSaveDTO dto) { |
|
|
|
ProjectDTO projectInfo = dto.getProjectInfo(); |
|
|
|
ProjectDraft draft = new ProjectDraft(); |
|
|
|
BeanUtils.copyProperties(projectInfo, draft); |
|
|
|
draft.setUserId(dto.getUser().getUserId()); |
|
|
|