Browse Source

年度计划编辑接口

tags/24080901
WendyYang 1 year ago
parent
commit
7029c92069
8 changed files with 26 additions and 15 deletions
  1. +2
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java
  2. +0
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java
  3. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java
  4. +4
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  5. +8
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java
  6. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java
  8. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java

+ 2
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java View File

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


import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map; import java.util.Map;
@@ -28,7 +26,7 @@ import java.util.Map;
public class DeclaredProjectDto implements Serializable { public class DeclaredProjectDto implements Serializable {


@NotNull @NotNull
private ProjectDto projectInfo;
private ProjectDTO projectInfo;


private Map<String,Object> formData; private Map<String,Object> formData;




+ 0
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java View File

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


import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDto;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;


+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto; 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 com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.*; import lombok.*;
@@ -26,7 +26,7 @@ public class ProjectDraftSaveDto implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


@NotNull @NotNull
private ProjectDto projectInfo;
private ProjectDTO projectInfo;


@NotNull @NotNull
private ProcessInstanceUserDto user; private ProcessInstanceUserDto user;


+ 4
- 5
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -14,11 +14,10 @@ import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamD
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDto;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto; import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDto;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredDetailVO; import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredDetailVO;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDeclaredListItemVO;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo; import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVo;
import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; 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.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
@@ -134,7 +133,7 @@ public class DeclaredProjectManage {
* @return * @return
*/ */
public String startTheProcess(DeclaredProjectDto dto) { public String startTheProcess(DeclaredProjectDto dto) {
ProjectDto projectInfo = dto.getProjectInfo();
ProjectDTO projectInfo = dto.getProjectInfo();
String regionCode = projectInfo.getAreaCode(); String regionCode = projectInfo.getAreaCode();


WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
@@ -175,7 +174,7 @@ public class DeclaredProjectManage {
* @param projectDto * @param projectDto
* @param instanceId * @param instanceId
*/ */
private void saveProject(ProjectDto projectDto, String instanceId, String regionCode) {
private void saveProject(ProjectDTO projectDto, String instanceId, String regionCode) {
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示 //流程启动之后 入库项目 重要业务信息 用于列表查询 展示
try { try {
//保存项目表信息 //保存项目表信息
@@ -211,7 +210,7 @@ public class DeclaredProjectManage {
* @return * @return
*/ */
public Long saveToDraft(ProjectDraftSaveDto dto) { public Long saveToDraft(ProjectDraftSaveDto dto) {
ProjectDto projectInfo = dto.getProjectInfo();
ProjectDTO projectInfo = dto.getProjectInfo();
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());


+ 8
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java View File

@@ -3,6 +3,7 @@ package com.ningdatech.pmapi.projectlib.controller;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog; import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.projectlib.manage.AnnualPlanLibManage; import com.ningdatech.pmapi.projectlib.manage.AnnualPlanLibManage;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
@@ -73,4 +74,11 @@ public class AnnualPlanController {
annualPlanLibManage.exportAnnualPlanEditTable(response); annualPlanLibManage.exportAnnualPlanEditTable(response);
} }


@GetMapping("/modify")
@ApiOperation("年度计划编辑")
@WebLog("年度计划编辑")
public void modify(@RequestBody ProjectDTO req) {
annualPlanLibManage.updateAnnualPlan(req);
}

} }

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.projectlib.manage; package com.ningdatech.pmapi.projectlib.manage;


import cn.hutool.core.bean.BeanUtil;
import com.alibaba.excel.EasyExcel; import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener; import com.alibaba.excel.event.AnalysisEventListener;
@@ -16,6 +17,7 @@ import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper; import com.ningdatech.pmapi.projectlib.helper.ProjectHelper;
import com.ningdatech.pmapi.projectlib.model.dto.AnnualLibImportDTO; import com.ningdatech.pmapi.projectlib.model.dto.AnnualLibImportDTO;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectApprovedReq;
import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq;
@@ -204,4 +206,9 @@ public class AnnualPlanLibManage {
// TODO // TODO
} }


public void updateAnnualPlan(ProjectDTO req) {
Project project = BeanUtil.copyProperties(req, Project.class);
projectService.updateById(project);
}

} }

pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java View File

@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
*/ */
@ApiModel(value = "NdProjectApplication对象", description = "") @ApiModel(value = "NdProjectApplication对象", description = "")
@Data @Data
public class ProjectApplicationDto implements Serializable {
public class ProjectApplicationDTO implements Serializable {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;



pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java → pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java View File

@@ -20,7 +20,7 @@ import java.util.List;
*/ */
@Data @Data
@ApiModel(value = "NdProjectDto", description = "") @ApiModel(value = "NdProjectDto", description = "")
public class ProjectDto implements Serializable {
public class ProjectDTO implements Serializable {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


@@ -280,7 +280,7 @@ public class ProjectDto implements Serializable {
private String formId; private String formId;


@ApiModelProperty("项目应用实例") @ApiModelProperty("项目应用实例")
private List<ProjectApplicationDto> applicationList;
private List<ProjectApplicationDTO> applicationList;


@ApiModelProperty("流程状态") @ApiModelProperty("流程状态")
private Integer processStatus; private Integer processStatus;

Loading…
Cancel
Save