Pārlūkot izejas kodu

建设方案申报 完成

tags/24080901
PoffyZhang pirms 1 gada
vecāks
revīzija
9d442d98f1
3 mainītis faili ar 13 papildinājumiem un 19 dzēšanām
  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 Parādīt failu

@@ -35,9 +35,9 @@ public class ConstructionPlanController {
@ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表")
@GetMapping("/list")
public PageVo<ProjectLibListItemVO> 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);
}



+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java Parādīt failu

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


+ 8
- 14
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java Parādīt failu

@@ -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<ProjectApplication> projectApptions = projectApplicationService.list(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId, id));
vo.setProjectApplications(projectApptions);
return vo;
}

public PageVo<ProjectDraftVo> pageDraft(DeclaredProjectListParamDto params) {
Page<ProjectDraft> page = params.page();
LambdaQueryWrapper<ProjectDraft> 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());
}


Notiek ielāde…
Atcelt
Saglabāt