diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java index 31e2e9d..f88bd05 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDto.java @@ -2,15 +2,13 @@ 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.entity.Project; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.util.Map; @@ -28,7 +26,7 @@ import java.util.Map; public class DeclaredProjectDto implements Serializable { @NotNull - private ProjectDto projectInfo; + private ProjectDTO projectInfo; private Map formData; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java index fae8f58..92d2e62 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDto.java @@ -2,7 +2,6 @@ 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.wflow.workflow.bean.dto.ProcessInstanceUserDto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java index 0fdf995..62070a3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDto.java @@ -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.*; @@ -26,7 +26,7 @@ public class ProjectDraftSaveDto implements Serializable { private static final long serialVersionUID = 1L; @NotNull - private ProjectDto projectInfo; + private ProjectDTO projectInfo; @NotNull private ProcessInstanceUserDto user; 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 26b88c6..a1d78b3 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 @@ -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.ProjectDraftSaveDto; 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.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.model.vo.ProjectLibListItemVO; @@ -134,7 +133,7 @@ public class DeclaredProjectManage { * @return */ public String startTheProcess(DeclaredProjectDto dto) { - ProjectDto projectInfo = dto.getProjectInfo(); + ProjectDTO projectInfo = dto.getProjectInfo(); String regionCode = projectInfo.getAreaCode(); WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class) @@ -175,7 +174,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 { //保存项目表信息 @@ -211,7 +210,7 @@ public class DeclaredProjectManage { * @return */ public Long saveToDraft(ProjectDraftSaveDto dto) { - ProjectDto projectInfo = dto.getProjectInfo(); + ProjectDTO projectInfo = dto.getProjectInfo(); ProjectDraft draft = new ProjectDraft(); BeanUtils.copyProperties(projectInfo, draft); draft.setUserId(dto.getUser().getUserId()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java index 7098b1d..2eeb57a 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/controller/AnnualPlanController.java @@ -3,6 +3,7 @@ package com.ningdatech.pmapi.projectlib.controller; import com.ningdatech.basic.model.PageVo; import com.ningdatech.log.annotation.WebLog; 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.ProjectIdReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; @@ -73,4 +74,11 @@ public class AnnualPlanController { annualPlanLibManage.exportAnnualPlanEditTable(response); } + @GetMapping("/modify") + @ApiOperation("年度计划编辑") + @WebLog("年度计划编辑") + public void modify(@RequestBody ProjectDTO req) { + annualPlanLibManage.updateAnnualPlan(req); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index 7b0ceba..2a5f18b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.projectlib.manage; +import cn.hutool.core.bean.BeanUtil; import com.alibaba.excel.EasyExcel; import com.alibaba.excel.context.AnalysisContext; 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.helper.ProjectHelper; 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.req.ProjectApprovedReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectIdReq; @@ -204,4 +206,9 @@ public class AnnualPlanLibManage { // TODO } + public void updateAnnualPlan(ProjectDTO req) { + Project project = BeanUtil.copyProperties(req, Project.class); + projectService.updateById(project); + } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java similarity index 98% rename from pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java rename to pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java index e55d4c8..a256131 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectApplicationDTO.java @@ -17,7 +17,7 @@ import java.time.LocalDateTime; */ @ApiModel(value = "NdProjectApplication对象", description = "") @Data -public class ProjectApplicationDto implements Serializable { +public class ProjectApplicationDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java similarity index 98% rename from pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java rename to pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java index 03c465c..c0d68aa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDto.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java @@ -20,7 +20,7 @@ import java.util.List; */ @Data @ApiModel(value = "NdProjectDto", description = "") -public class ProjectDto implements Serializable { +public class ProjectDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -280,7 +280,7 @@ public class ProjectDto implements Serializable { private String formId; @ApiModelProperty("项目应用实例") - private List applicationList; + private List applicationList; @ApiModelProperty("流程状态") private Integer processStatus;