Quellcode durchsuchen

优化 processType

tags/24080901
PoffyZhang vor 1 Jahr
Ursprung
Commit
6e05e665e1
13 geänderte Dateien mit 48 neuen und 48 gelöschten Zeilen
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java
  2. +8
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java
  3. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java
  4. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java
  5. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java
  6. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java
  8. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java
  9. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java
  10. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java
  11. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  12. +17
    -17
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  13. +4
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java Datei anzeigen

@@ -1,7 +1,7 @@
package com.ningdatech.pmapi.projectdeclared.controller;

import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO;
import com.ningdatech.pmapi.projectdeclared.manage.ConstructionPlanManage;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
@@ -43,7 +43,7 @@ public class ConstructionPlanController {

@ApiOperation(value = "建设方案申报", notes = "建设方案申报")
@PostMapping("/start")
public String startTheProcess(@Validated @RequestBody ConstructionPlanDto dto) {
public String startTheProcess(@Validated @RequestBody ConstructionPlanDTO dto) {
String instanceId = constructionPlanManage.startTheProcess(dto);
return "建设方案申报 【" + instanceId + "】 成功";
}


+ 8
- 8
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java Datei anzeigen

@@ -1,10 +1,10 @@
package com.ningdatech.pmapi.projectdeclared.controller;

import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDto;
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.ProjectDraftSaveDTO;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO;
import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
@@ -41,25 +41,25 @@ public class DeclaredProjectController {

@ApiOperation(value = "申报项目草稿箱列表", notes = "申报项目草稿箱列表")
@GetMapping("/draft")
public PageVo<ProjectDraftVo> draft(@ModelAttribute DeclaredProjectListParamDto params) {
public PageVo<ProjectDraftVO> draft(@ModelAttribute DeclaredProjectListParamDTO params) {
return declaredProjectManage.pageDraft(params);
}

@ApiOperation(value = "申报项目草稿箱详情", notes = "申报项目草稿箱详情")
@GetMapping("/draft/{id}")
public ProjectDraftVo draft(@PathVariable Long id) {
public ProjectDraftVO draft(@PathVariable Long id) {
return declaredProjectManage.draftDatail(id);
}

@ApiOperation(value = "申报项目保存至草稿箱", notes = "申报项目保存至草稿箱")
@PostMapping("/save-to-draft")
public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDto dto) {
public Object saveToDraft(@Validated @RequestBody ProjectDraftSaveDTO dto) {
return declaredProjectManage.saveToDraft(dto);
}

@ApiOperation(value = "申报项目", notes = "申报项目")
@PostMapping("/start")
public String startTheProcess(@Validated @RequestBody DeclaredProjectDto dto) {
public String startTheProcess(@Validated @RequestBody DeclaredProjectDTO dto) {
String instanceId = declaredProjectManage.startTheProcess(dto);
return "启动流程实例 【" + instanceId + "】 成功";
}


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java Datei anzeigen

@@ -1,7 +1,7 @@
package com.ningdatech.pmapi.projectdeclared.controller;

import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
@@ -43,7 +43,7 @@ public class PrequalificationDeclaredController {

@ApiOperation(value = "申报预审", notes = "申报预审")
@PostMapping("/start")
public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDto dto) {
public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDTO dto) {
String instanceId = prequalificationDeclaredProjectManage.startTheProcess(dto);
return "提交预审 【" + instanceId + "】 成功";
}


pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java Datei anzeigen

@@ -22,7 +22,7 @@ import java.util.Map;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ConstructionPlanDto implements Serializable {
public class ConstructionPlanDTO implements Serializable {

@NotNull
private Long projectId;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java Datei anzeigen

@@ -2,7 +2,7 @@ package com.ningdatech.pmapi.projectdeclared.entity.dto;

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
@@ -23,10 +23,10 @@ import java.util.Map;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DeclaredProjectDto implements Serializable {
public class DeclaredProjectDTO implements Serializable {

@NotNull
private ProjectDto projectInfo;
private ProjectDTO projectInfo;

private Map<String,Object> formData;


pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java Datei anzeigen

@@ -17,7 +17,7 @@ import org.springframework.format.annotation.DateTimeFormat;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DeclaredProjectListParamDto extends PagePo {
public class DeclaredProjectListParamDTO extends PagePo {

private String userId;


pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java Datei anzeigen

@@ -22,7 +22,7 @@ import java.util.Map;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PreDeclaredProjectDto implements Serializable {
public class PreDeclaredProjectDTO implements Serializable {

@NotNull
private Long projectId;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java Datei anzeigen

@@ -18,7 +18,7 @@ import java.math.BigDecimal;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProjectConditionDto implements Serializable {
public class ProjectConditionDTO implements Serializable {

private Long projectId;


pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java Datei anzeigen

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;

import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import io.swagger.annotations.ApiModel;
import lombok.*;
@@ -21,12 +21,12 @@ import java.io.Serializable;
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ProjectDraftSaveDto implements Serializable {
public class ProjectDraftSaveDTO implements Serializable {

private static final long serialVersionUID = 1L;

@NotNull
private ProjectDto projectInfo;
private ProjectDTO projectInfo;

@NotNull
private ProcessInstanceUserDto user;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVo.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java Datei anzeigen

@@ -29,7 +29,7 @@ import java.util.Map;
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ProjectDraftVo implements Serializable {
public class ProjectDraftVO implements Serializable {

private static final long serialVersionUID = 1L;


+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java Datei anzeigen

@@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
@@ -50,7 +50,7 @@ public class ConstructionPlanManage {
* @param dto
* @return
*/
public String startTheProcess(ConstructionPlanDto dto) {
public String startTheProcess(ConstructionPlanDTO dto) {
Project projectInfo = projectService.getById(dto.getProjectId());

VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
@@ -77,7 +77,7 @@ public class ConstructionPlanManage {
params.setUser(dto.getUser());
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDto conditionDto = new ProjectConditionDto();
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(projectInfo, conditionDto);
dto.getFormData().putAll(
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {


+ 17
- 17
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java Datei anzeigen

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


+ 4
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java Datei anzeigen

@@ -6,8 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
@@ -51,7 +51,7 @@ public class PrequalificationDeclaredProjectManage {
* @param dto
* @return
*/
public String startTheProcess(PreDeclaredProjectDto dto) {
public String startTheProcess(PreDeclaredProjectDTO dto) {
Project projectInfo = projectService.getById(dto.getProjectId());

VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
@@ -78,7 +78,7 @@ public class PrequalificationDeclaredProjectManage {
params.setUser(dto.getUser());
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDto conditionDto = new ProjectConditionDto();
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(projectInfo, conditionDto);
if (Objects.nonNull(conditionDto)) {
dto.getFormData().putAll(


Laden…
Abbrechen
Speichern