|
@@ -86,16 +86,6 @@ public class DeclaredProjectManage { |
|
|
return PageVo.of(res, page.getTotal()); |
|
|
return PageVo.of(res, page.getTotal()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ProjectDeclaredDetailVO detail(Long id) { |
|
|
|
|
|
Project project = projectService.getById(id); |
|
|
|
|
|
ProjectDeclaredDetailVO vo = new ProjectDeclaredDetailVO(); |
|
|
|
|
|
BeanUtils.copyProperties(project, vo); |
|
|
|
|
|
List<ProjectApplication> projectApptions = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) |
|
|
|
|
|
.eq(ProjectApplication::getProjectId, id)); |
|
|
|
|
|
vo.setProjectApplications(projectApptions); |
|
|
|
|
|
return vo; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PageVo<ProjectDraftVo> pageDraft(DeclaredProjectListParamDto params) { |
|
|
public PageVo<ProjectDraftVo> pageDraft(DeclaredProjectListParamDto params) { |
|
|
Page<ProjectDraft> page = params.page(); |
|
|
Page<ProjectDraft> page = params.page(); |
|
|
LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class) |
|
|
LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class) |
|
@@ -125,10 +115,10 @@ public class DeclaredProjectManage { |
|
|
ProjectDraftVo vo = new ProjectDraftVo(); |
|
|
ProjectDraftVo vo = new ProjectDraftVo(); |
|
|
BeanUtils.copyProperties(draft, vo); |
|
|
BeanUtils.copyProperties(draft, vo); |
|
|
if(StringUtils.isNotBlank(draft.getProjectApplicationList())){ |
|
|
if(StringUtils.isNotBlank(draft.getProjectApplicationList())){ |
|
|
vo.setApplicationList(JSONArray.parseArray(draft.getProjectApplicationList(),ProjectApplication.class)); |
|
|
|
|
|
|
|
|
vo.setApplicationList(JSON.parseArray(draft.getProjectApplicationList(),ProjectApplication.class)); |
|
|
} |
|
|
} |
|
|
if(StringUtils.isNotBlank(draft.getDynamicForm())){ |
|
|
if(StringUtils.isNotBlank(draft.getDynamicForm())){ |
|
|
vo.setDynamicForm(JSON.parseObject(draft.getProjectApplicationList(),Map.class)); |
|
|
|
|
|
|
|
|
vo.setDynamicForm(JSON.parseObject(draft.getDynamicForm(),Map.class)); |
|
|
} |
|
|
} |
|
|
return vo; |
|
|
return vo; |
|
|
} |
|
|
} |
|
@@ -221,8 +211,12 @@ public class DeclaredProjectManage { |
|
|
ProjectDraft draft = new ProjectDraft(); |
|
|
ProjectDraft draft = new ProjectDraft(); |
|
|
BeanUtils.copyProperties(projectInfo, draft); |
|
|
BeanUtils.copyProperties(projectInfo, draft); |
|
|
draft.setUserId(dto.getUser().getUserId()); |
|
|
draft.setUserId(dto.getUser().getUserId()); |
|
|
draft.setDynamicForm(JSON.toJSONString(projectInfo.getDynamicForm())); |
|
|
|
|
|
draft.setProjectApplicationList(JSON.toJSONString(projectInfo.getApplicationList())); |
|
|
|
|
|
|
|
|
if(CollUtil.isNotEmpty(projectInfo.getDynamicForm())){ |
|
|
|
|
|
draft.setDynamicForm(JSON.toJSONString(projectInfo.getDynamicForm())); |
|
|
|
|
|
} |
|
|
|
|
|
if(CollUtil.isNotEmpty(projectInfo.getApplicationList())){ |
|
|
|
|
|
draft.setProjectApplicationList(JSON.toJSONString(projectInfo.getApplicationList())); |
|
|
|
|
|
} |
|
|
if (Objects.isNull(draft.getId())) { |
|
|
if (Objects.isNull(draft.getId())) { |
|
|
draft.setCreateOn(LocalDateTime.now()); |
|
|
draft.setCreateOn(LocalDateTime.now()); |
|
|
} |
|
|
} |
|
|