From 69544acbd1c893b00391e926b32a44cb0c70e87f Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 7 Mar 2023 17:48:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=9B=9E=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=86=85=E5=AE=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/util/ExcelDownUtil.java | 3 - .../bean/vo/ProcessProgressDetailVo.java | 36 ---------- .../controller/TodoCenterController.java | 21 ++++-- .../pmapi/todocenter/manage/TodoCenterManage.java | 84 ++++++++++++++++++++-- .../todocenter/model/dto/AdjustHandleDTO.java | 59 +++++++++++++++ .../todocenter/model/dto/ResCcMeExportDTO.java | 41 +++++++++++ .../todocenter/model/dto/ResHandledExportDTO.java | 44 ++++++++++++ .../model/dto/ResMySubmittedExportDTO.java | 41 +++++++++++ .../todocenter/model/dto/dto/ResCcMeExportDTO.java | 41 ----------- .../model/dto/dto/ResHandledExportDTO.java | 44 ------------ .../model/dto/dto/ResMySubmittedExportDTO.java | 41 ----------- .../todocenter/model/dto/req/ProcessDetailReq.java | 30 -------- .../model/dto/req/ToBeProcessedExportReq.java | 27 ------- .../todocenter/model/dto/req/ToBeProcessedReq.java | 48 ------------- .../model/dto/vo/ResToBeProcessedVO.java | 66 ----------------- .../todocenter/model/req/ProcessDetailReq.java | 30 ++++++++ .../model/req/ToBeProcessedExportReq.java | 26 +++++++ .../todocenter/model/req/ToBeProcessedReq.java | 48 +++++++++++++ .../model/vo/ProcessProgressDetailVo.java | 36 ++++++++++ .../todocenter/model/vo/ResToBeProcessedVO.java | 66 +++++++++++++++++ 20 files changed, 484 insertions(+), 348 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResCcMeExportDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResHandledExportDTO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResMySubmittedExportDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResCcMeExportDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResHandledExportDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResMySubmittedExportDTO.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ProcessDetailReq.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedExportReq.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedReq.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/vo/ResToBeProcessedVO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ProcessDetailReq.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedExportReq.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ProcessProgressDetailVo.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java index 4aa4f05..ff57b93 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java @@ -12,13 +12,10 @@ import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.fastjson.JSONObject; import com.ningdatech.basic.exception.BizException; -import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.NdDateUtils; import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; import com.ningdatech.pmapi.projectlib.model.entity.Project; -import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; -import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq; import com.wflow.workflow.enums.ProcessStatusEnum; import org.apache.commons.collections4.CollectionUtils; import org.apache.http.HttpStatus; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java deleted file mode 100644 index 975df53..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.ningdatech.pmapi.todocenter.bean.vo; - - -import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; -import com.wflow.workflow.bean.vo.ProcessProgressVo; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 流程进展详情实体 - * - * @author CMM - * @since 2023/01/30 17:21 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ProcessProgressDetailVo { - - /** - * 流程处理详情 - */ - private ProcessProgressVo processProgressVo; - /** - * 流程状态 - */ - private String status; - /** - * 项目ID - */ - private Long projectId; - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java index a51ecd0..3def55b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java @@ -4,15 +4,19 @@ package com.ningdatech.pmapi.todocenter.controller; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; -import com.ningdatech.pmapi.todocenter.model.dto.req.ProcessDetailReq; -import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq; +import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; +import com.ningdatech.pmapi.todocenter.model.dto.AdjustHandleDTO; +import com.ningdatech.pmapi.todocenter.model.vo.ProcessProgressDetailVo; +import com.ningdatech.pmapi.todocenter.model.req.ProcessDetailReq; +import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedExportReq; import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO; +import io.swagger.annotations.ApiOperation; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import com.ningdatech.basic.model.PageVo; import com.ningdatech.pmapi.todocenter.manage.TodoCenterManage; -import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq; -import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO; +import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedReq; +import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO; import io.swagger.annotations.Api; import lombok.AllArgsConstructor; @@ -158,4 +162,11 @@ public class TodoCenterController { param.setIsTemporaryAugment(isTemporaryAugment); todoCenterManage.exportCcMeProjectList(response,param); } + + @ApiOperation(value = "被退回项目内容调整并通过", notes = "被退回项目内容调整并通过") + @PostMapping + public String startTheProcess(@Validated @RequestBody AdjustHandleDTO dto) { + String instanceId = todoCenterManage.adjustment(dto); + return "退回项目内容调整并且重新通过 【" + instanceId + "】 成功"; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 8e5148d..26e0359 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -17,25 +17,32 @@ import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; import com.ningdatech.pmapi.organization.model.entity.DingOrganization; import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; import com.ningdatech.pmapi.organization.service.IDingOrganizationService; +import com.ningdatech.pmapi.projectdeclared.manage.DefaultDeclaredProjectManage; +import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; +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.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; +import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.staging.enums.MsgTypeEnum; import com.ningdatech.pmapi.staging.service.INdWorkNoticeStagingService; import com.ningdatech.pmapi.todocenter.bean.entity.WorkNoticeInfo; -import com.ningdatech.pmapi.todocenter.bean.vo.ProcessProgressDetailVo; +import com.ningdatech.pmapi.todocenter.model.dto.AdjustHandleDTO; +import com.ningdatech.pmapi.todocenter.model.vo.ProcessProgressDetailVo; import com.ningdatech.pmapi.todocenter.enumeration.IsAppendProjectEnum; -import com.ningdatech.pmapi.todocenter.model.dto.req.ProcessDetailReq; -import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedExportReq; -import com.ningdatech.pmapi.todocenter.model.dto.req.ToBeProcessedReq; -import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO; +import com.ningdatech.pmapi.todocenter.model.req.ProcessDetailReq; +import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedExportReq; +import com.ningdatech.pmapi.todocenter.model.req.ToBeProcessedReq; +import com.ningdatech.pmapi.todocenter.model.vo.ResToBeProcessedVO; import com.ningdatech.pmapi.user.entity.UserInfo; import com.ningdatech.pmapi.user.service.IUserInfoService; import com.ningdatech.pmapi.user.util.LoginUserUtil; import com.wflow.contants.HisProInsEndActId; +import com.wflow.exception.BusinessException; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO; import com.wflow.workflow.bean.process.ProgressNode; @@ -43,6 +50,7 @@ import com.wflow.workflow.bean.process.enums.NodeTypeEnum; import com.wflow.workflow.bean.vo.ProcessInstanceVo; import com.wflow.workflow.bean.vo.ProcessProgressVo; import com.wflow.workflow.bean.vo.ProcessTaskVo; +import com.wflow.workflow.enums.ProcessHandlerEnum; import com.wflow.workflow.enums.ProcessStatusEnum; import com.wflow.workflow.service.ProcessInstanceService; import com.wflow.workflow.service.ProcessTaskService; @@ -55,6 +63,7 @@ import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.runtime.ActivityInstance; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.time.LocalDateTime; @@ -85,6 +94,8 @@ public class TodoCenterManage { private final IDingOrganizationService dingOrganizationService; private final ProcessInstanceService processInstanceService; private final INdWorkNoticeStagingService workNoticeStagingService; + private final DefaultDeclaredProjectManage defaultDeclaredProjectManage; + private final IProjectApplicationService projectApplicationService; /** @@ -617,7 +628,9 @@ public class TodoCenterManage { return PageVo.empty(); } List instCodes = userIdoList.stream().map(ProcessTaskVo::getInstanceId).collect(Collectors.toList()); - + List instances = historyService.createHistoricProcessInstanceQuery() + .list(); + Map instanceMap = CollUtils.listToMap(instances, HistoricProcessInstance::getId); // 分页查询项目信息 ProjectListReq projectListReq = new ProjectListReq(); @@ -632,7 +645,7 @@ public class TodoCenterManage { ResToBeProcessedVO res = new ResToBeProcessedVO(); BeanUtils.copyProperties(d, res); res.setProjectId(d.getId()); - res.setProcessStatusName(ProcessStatusEnum.getDescByCode(d.getProcessStatus())); + res.setProcessStatusName(processInstanceService.buildProcessStatusStr(instanceMap.get(d.getInstCode()))); res.setProcessLaunchTime(d.getCreateOn()); res.setProcessHandleTime(d.getUpdateOn()); return res; @@ -886,4 +899,61 @@ public class TodoCenterManage { ExcelDownUtil.excelExportFile(response, excelExportWriter); } + + /** + * 被退回项目内容调整并重新通过 + * @param dto + * @return + */ + @Transactional(rollbackFor = Exception.class) + public String adjustment(AdjustHandleDTO dto) { + ProjectDTO projectDto = dto.getProjectInfo(); + Project projectInfo = projectService.getById(projectDto.getId()); + + VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("调整失败 此项目不存在!"); + + //项目名称去重 + defaultDeclaredProjectManage.checkDuplication(projectDto); + + //修改项目内容 + if(!modifyProject(projectDto)){ + throw new BusinessException("调整项目失败!"); + } + + //最后去审批(通过)当前退回节点的审核任务 + ReqProcessHandlerDTO handlerDTO = new ReqProcessHandlerDTO(); + handlerDTO.setProjectId(dto.getProjectId()); + handlerDTO.setInstanceId(dto.getInstanceId()); + handlerDTO.setTaskId(dto.getTaskId()); + handlerDTO.setAction(ProcessHandlerEnum.PASS); + handlerDTO.setAuditInfo(dto.getAuditInfo()); + handler(handlerDTO); + return dto.getInstanceId(); + + } + + private Boolean modifyProject(ProjectDTO projectDto) { + //先修改项目信息 + Project project = new Project(); + BeanUtils.copyProperties(projectDto,project); + project.setUpdateOn(LocalDateTime.now()); + if(!projectService.updateById(project)){ + throw new BusinessException("项目调整失败"); + } + //再修改应用信息 + if(CollUtil.isNotEmpty(projectDto.getApplicationList())){ + //采取批量删除 批量添加的方式 + projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class) + .eq(ProjectApplication::getProjectId,project.getId())); + //批量添加 + List applications = projectDto.getApplicationList().stream().map(application -> { + ProjectApplication projectApplication = new ProjectApplication(); + BeanUtils.copyProperties(application, projectApplication); + projectApplication.setProjectId(project.getId()); + return projectApplication; + }).collect(Collectors.toList()); + projectApplicationService.saveBatch(applications); + } + return Boolean.TRUE; + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java new file mode 100644 index 0000000..6378d49 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/AdjustHandleDTO.java @@ -0,0 +1,59 @@ +package com.ningdatech.pmapi.todocenter.model.dto; + +import java.io.Serializable; +import java.util.Map; + +import javax.validation.constraints.NotNull; + +import com.google.common.collect.Maps; +import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; +import com.wflow.workflow.bean.process.ProcessComment; +import com.wflow.workflow.enums.ProcessHandlerEnum; + +import cn.hutool.core.collection.CollUtil; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Classname DefaultDeclaredDTO + * @Description + * @Date 2023/2/14 17:16 + * @Author PoffyZhang + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AdjustHandleDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + @NotNull + @ApiModelProperty("项目信息") + private ProjectDTO projectInfo; + + @ApiModelProperty("表单信息 新增模块") + private Map formData; + + public Map getFormData(){ + if(CollUtil.isEmpty(this.formData)){ + this.formData = Maps.newHashMap(); + return this.formData; + } + return this.formData; + } + @ApiModelProperty("项目ID") + @NotNull(message = "要处理的项目ID不能为空!") + private Long projectId; + + @NotNull(message = "流程实例ID不能为空!") + private String instanceId; + + @ApiModelProperty("任务ID") + @NotNull(message = "任务ID不能为空!") + private String taskId; + + @ApiModelProperty("审核信息") + private ProcessComment auditInfo; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResCcMeExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResCcMeExportDTO.java new file mode 100644 index 0000000..248657d --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResCcMeExportDTO.java @@ -0,0 +1,41 @@ +package com.ningdatech.pmapi.todocenter.model.dto; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 待办中心抄送我的项目列表导出实体 + * + * @author CMM + * @since 2023/01/19 16:42 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ResCcMeExportDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ExcelProperty("项目名称") + private String projectName; + + @ExcelProperty("申报单位") + private String reportUnitName; + + @ExcelProperty("申报金额") + private Integer reportAmount; + + @ExcelProperty("预算年度") + private Integer budgetYear; + + @ExcelProperty("流程状态") + private String processStatusName; + + @ExcelProperty("发起时间") + private LocalDateTime processLaunchTime; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResHandledExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResHandledExportDTO.java new file mode 100644 index 0000000..40f68da --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResHandledExportDTO.java @@ -0,0 +1,44 @@ +package com.ningdatech.pmapi.todocenter.model.dto; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 待办中心我已处理项目列表导出实体 + * + * @author CMM + * @since 2023/01/19 16:42 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ResHandledExportDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ExcelProperty("项目名称") + private String projectName; + + @ExcelProperty("申报单位") + private String reportUnitName; + + @ExcelProperty("申报金额") + private Integer reportAmount; + + @ExcelProperty("预算年度") + private Integer budgetYear; + + @ExcelProperty("流程状态") + private String processStatusName; + + @ExcelProperty("发起时间") + private LocalDateTime processLaunchTime; + + @ExcelProperty("处理时间") + private LocalDateTime processHandleTime; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResMySubmittedExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResMySubmittedExportDTO.java new file mode 100644 index 0000000..f3f2329 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/ResMySubmittedExportDTO.java @@ -0,0 +1,41 @@ +package com.ningdatech.pmapi.todocenter.model.dto; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.alibaba.excel.annotation.ExcelProperty; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 待办中心我发起的项目列表导出实体 + * + * @author CMM + * @since 2023/01/19 16:42 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ResMySubmittedExportDTO implements Serializable { + private static final long serialVersionUID = 1L; + + @ExcelProperty("项目名称") + private String projectName; + + @ExcelProperty("申报单位") + private String reportUnitName; + + @ExcelProperty("申报金额") + private Integer reportAmount; + + @ExcelProperty("预算年度") + private Integer budgetYear; + + @ExcelProperty("流程状态") + private String processStatusName; + + @ExcelProperty("发起时间") + private LocalDateTime processLaunchTime; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResCcMeExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResCcMeExportDTO.java deleted file mode 100644 index 8cb3241..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResCcMeExportDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心抄送我的项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResCcMeExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResHandledExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResHandledExportDTO.java deleted file mode 100644 index 3adf4ae..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResHandledExportDTO.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心我已处理项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResHandledExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; - - @ExcelProperty("处理时间") - private LocalDateTime processHandleTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResMySubmittedExportDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResMySubmittedExportDTO.java deleted file mode 100644 index af0382f..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/dto/ResMySubmittedExportDTO.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.dto; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心我发起的项目列表导出实体 - * - * @author CMM - * @since 2023/01/19 16:42 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ResMySubmittedExportDTO implements Serializable { - private static final long serialVersionUID = 1L; - - @ExcelProperty("项目名称") - private String projectName; - - @ExcelProperty("申报单位") - private String reportUnitName; - - @ExcelProperty("申报金额") - private Integer reportAmount; - - @ExcelProperty("预算年度") - private Integer budgetYear; - - @ExcelProperty("流程状态") - private String processStatusName; - - @ExcelProperty("发起时间") - private LocalDateTime processLaunchTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ProcessDetailReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ProcessDetailReq.java deleted file mode 100644 index df66044..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ProcessDetailReq.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.req; - -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotNull; - -/** - * 流程处理进度详情请求参数 - * - * @author CMM - * @since 2023/02/24 10:15 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ProcessDetailReq { - - @ApiModelProperty("流程实例ID") - @NotNull - private String instanceId; - - @ApiModelProperty("流程节点ID") - private String nodeId; - - @ApiModelProperty("项目ID") - private Long projectId; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedExportReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedExportReq.java deleted file mode 100644 index 0ffda75..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedExportReq.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.req; - -import java.util.List; - -import javax.validation.constraints.NotNull; -import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; - -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 待办中心-导出查询实体信息 - * - * @author zpf - * @since 2023/02/18 16:01 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ToBeProcessedExportReq extends ToBeProcessedReq { - - @ApiModelProperty("导出选项") - private List exportOptionList; - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedReq.java deleted file mode 100644 index 111f05d..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/req/ToBeProcessedReq.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.req; - -import java.io.Serializable; -import java.time.LocalDateTime; - -import com.ningdatech.basic.model.PagePo; - -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.springframework.format.annotation.DateTimeFormat; - -/** - * 待办中心-列表查询实体信息 - * - * @author zpf - * @since 2023/02/19 16:01 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -public class ToBeProcessedReq extends PagePo implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("申报单位名称") - private String buildOrgName; - - @ApiModelProperty("预算年度") - private Integer projectYear; - - @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime createOnMin; - - @ApiModelProperty("创建时间") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private LocalDateTime createOnMax; - - @ApiModelProperty(value = "是否增补项目",allowableValues = "0,1") - private Integer isTemporaryAugment; - - @ApiModelProperty("流程配置ID") - private String processDefId; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/vo/ResToBeProcessedVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/vo/ResToBeProcessedVO.java deleted file mode 100644 index fee797c..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/vo/ResToBeProcessedVO.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.ningdatech.pmapi.todocenter.model.dto.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.wflow.workflow.bean.vo.ProcessInstanceVo; -import com.wflow.workflow.bean.vo.ProcessTaskVo; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; - -/** - * 待办中心-待我处理返回实体信息 - * - * @author CMM - * @since 2023/01/12 14:57 - */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@ExcelIgnoreUnannotated -public class ResToBeProcessedVO implements Serializable { - private static final long serialVersionUID = 1L; - - @ApiModelProperty("项目ID") - private Long projectId; - - @ApiModelProperty("流程实例编号") - private String instCode; - - @ApiModelProperty("待处理节点ID") - private String nodeId; - - @ApiModelProperty("项目名称") - private String projectName; - - @ApiModelProperty("建设单位名称") - private String buildOrgName; - - @ApiModelProperty("建设单位统一社会信用代码") - private String buildOrgCode; - - @ApiModelProperty("申报金额") - private BigDecimal declareAmount; - - @ApiModelProperty("预算年度") - private Integer projectYear; - - @ApiModelProperty("流程状态") - private Integer processStatus; - - @ApiModelProperty("流程状态名称") - private String processStatusName; - - @ApiModelProperty("流程发起时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime processLaunchTime; - - @ApiModelProperty("流程处理时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm") - private LocalDateTime processHandleTime; -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ProcessDetailReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ProcessDetailReq.java new file mode 100644 index 0000000..fd3dc3c --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ProcessDetailReq.java @@ -0,0 +1,30 @@ +package com.ningdatech.pmapi.todocenter.model.req; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; + +/** + * 流程处理进度详情请求参数 + * + * @author CMM + * @since 2023/02/24 10:15 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ProcessDetailReq { + + @ApiModelProperty("流程实例ID") + @NotNull + private String instanceId; + + @ApiModelProperty("流程节点ID") + private String nodeId; + + @ApiModelProperty("项目ID") + private Long projectId; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedExportReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedExportReq.java new file mode 100644 index 0000000..7e1eb1e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedExportReq.java @@ -0,0 +1,26 @@ +package com.ningdatech.pmapi.todocenter.model.req; + +import java.util.List; + +import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 待办中心-导出查询实体信息 + * + * @author zpf + * @since 2023/02/18 16:01 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ToBeProcessedExportReq extends ToBeProcessedReq { + + @ApiModelProperty("导出选项") + private List exportOptionList; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java new file mode 100644 index 0000000..ce41441 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java @@ -0,0 +1,48 @@ +package com.ningdatech.pmapi.todocenter.model.req; + +import java.io.Serializable; +import java.time.LocalDateTime; + +import com.ningdatech.basic.model.PagePo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * 待办中心-列表查询实体信息 + * + * @author zpf + * @since 2023/02/19 16:01 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ToBeProcessedReq extends PagePo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("申报单位名称") + private String buildOrgName; + + @ApiModelProperty("预算年度") + private Integer projectYear; + + @ApiModelProperty("创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createOnMin; + + @ApiModelProperty("创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createOnMax; + + @ApiModelProperty(value = "是否增补项目",allowableValues = "0,1") + private Integer isTemporaryAugment; + + @ApiModelProperty("流程配置ID") + private String processDefId; +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ProcessProgressDetailVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ProcessProgressDetailVo.java new file mode 100644 index 0000000..a6a1be4 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ProcessProgressDetailVo.java @@ -0,0 +1,36 @@ +package com.ningdatech.pmapi.todocenter.model.vo; + + +import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; +import com.wflow.workflow.bean.vo.ProcessProgressVo; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 流程进展详情实体 + * + * @author CMM + * @since 2023/01/30 17:21 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ProcessProgressDetailVo { + + /** + * 流程处理详情 + */ + private ProcessProgressVo processProgressVo; + /** + * 流程状态 + */ + private String status; + /** + * 项目ID + */ + private Long projectId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java new file mode 100644 index 0000000..b1dc02b --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/vo/ResToBeProcessedVO.java @@ -0,0 +1,66 @@ +package com.ningdatech.pmapi.todocenter.model.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wflow.workflow.bean.vo.ProcessInstanceVo; +import com.wflow.workflow.bean.vo.ProcessTaskVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 待办中心-待我处理返回实体信息 + * + * @author CMM + * @since 2023/01/12 14:57 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ExcelIgnoreUnannotated +public class ResToBeProcessedVO implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("项目ID") + private Long projectId; + + @ApiModelProperty("流程实例编号") + private String instCode; + + @ApiModelProperty("待处理节点ID") + private String nodeId; + + @ApiModelProperty("项目名称") + private String projectName; + + @ApiModelProperty("建设单位名称") + private String buildOrgName; + + @ApiModelProperty("建设单位统一社会信用代码") + private String buildOrgCode; + + @ApiModelProperty("申报金额") + private BigDecimal declareAmount; + + @ApiModelProperty("预算年度") + private Integer projectYear; + + @ApiModelProperty("流程状态") + private Integer processStatus; + + @ApiModelProperty("流程状态名称") + private String processStatusName; + + @ApiModelProperty("流程发起时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime processLaunchTime; + + @ApiModelProperty("流程处理时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm") + private LocalDateTime processHandleTime; +}