diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java index 8c3dbda..c64adaf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java @@ -35,9 +35,9 @@ public class ConstructionPlanController { @ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表") @GetMapping("/list") public PageVo list(@Validated @ModelAttribute ProjectListReq req) { - //项目阶段 状态 已定 待预审 + //项目阶段 状态 已定 方案待申报 req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); - req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); + req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); return projectLibManage.projectLibList(req); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java index 0dcbbd9..bb6a190 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java @@ -65,8 +65,8 @@ public class ConstructionPlanManage { 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())) .throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); //TODO 再判断 该项目是否 真实走完 单位内部审批 @@ -85,7 +85,7 @@ public class ConstructionPlanManage { } params.setFormData(dto.getFormData()); String instanceId = processService.startProcess(model.getProcessDefId(), params); - log.info("提交预审项目成功 【{}】", instanceId); + log.info("建设方案项目申报成功 【{}】", instanceId); //保存建设项目 modifyProject(projectInfo, instanceId,dto.getConstructionPlanFile()); 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 6e4caf4..b594e00 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 @@ -86,16 +86,6 @@ public class DeclaredProjectManage { 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 projectApptions = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class) - .eq(ProjectApplication::getProjectId, id)); - vo.setProjectApplications(projectApptions); - return vo; - } - public PageVo pageDraft(DeclaredProjectListParamDto params) { Page page = params.page(); LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(ProjectDraft.class) @@ -125,10 +115,10 @@ public class DeclaredProjectManage { ProjectDraftVo vo = new ProjectDraftVo(); BeanUtils.copyProperties(draft, vo); 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())){ - vo.setDynamicForm(JSON.parseObject(draft.getProjectApplicationList(),Map.class)); + vo.setDynamicForm(JSON.parseObject(draft.getDynamicForm(),Map.class)); } return vo; } @@ -221,8 +211,12 @@ public class DeclaredProjectManage { ProjectDraft draft = new ProjectDraft(); BeanUtils.copyProperties(projectInfo, draft); 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())) { draft.setCreateOn(LocalDateTime.now()); }