Browse Source

建设方案申报 完成

tags/24080901
PoffyZhang 1 year ago
parent
commit
9d442d98f1
3 changed files with 13 additions and 19 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java
  2. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  3. +8
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java View File

@@ -35,9 +35,9 @@ public class ConstructionPlanController {
@ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表") @ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表")
@GetMapping("/list") @GetMapping("/list")
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ProjectListReq req) { public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ProjectListReq req) {
//项目阶段 状态 已定 待预审
//项目阶段 状态 已定 方案待申报
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode());
return projectLibManage.projectLibList(req); return projectLibManage.projectLibList(req);
} }




+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -65,8 +65,8 @@ public class ConstructionPlanManage {
throw new BusinessException(String.format("此 【%s】区域找不到 建设申报流程配置", regionCode)); throw new BusinessException(String.format("此 【%s】区域找不到 建设申报流程配置", regionCode));
} }


//首先要判断 项目当前状态 是不是 待预审
VUtils.isTrue(!ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(projectInfo.getStatus()) ||
//首先要判断 项目当前状态 是不是 方案待申报
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(projectInfo.getStatus()) ||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage())) !ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage()))
.throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); .throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段");
//TODO 再判断 该项目是否 真实走完 单位内部审批 //TODO 再判断 该项目是否 真实走完 单位内部审批
@@ -85,7 +85,7 @@ public class ConstructionPlanManage {
} }
params.setFormData(dto.getFormData()); params.setFormData(dto.getFormData());
String instanceId = processService.startProcess(model.getProcessDefId(), params); String instanceId = processService.startProcess(model.getProcessDefId(), params);
log.info("提交预审项目成功 【{}】", instanceId);
log.info("建设方案项目申报成功 【{}】", instanceId);


//保存建设项目 //保存建设项目
modifyProject(projectInfo, instanceId,dto.getConstructionPlanFile()); modifyProject(projectInfo, instanceId,dto.getConstructionPlanFile());


+ 8
- 14
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -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());
} }


Loading…
Cancel
Save