From c89d2bfbd94a016a525df2e441464155d630c764 Mon Sep 17 00:00:00 2001 From: CMM <2198256324@qq.com> Date: Tue, 21 Feb 2023 13:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/enumeration/ExportOptionEnum.java | 25 ++++++++++++--------- .../pmapi/common/util/ExcelDownUtil.java | 15 ++++++++++++- .../pmapi/todocenter/bean/entity/Attachment.java | 26 ---------------------- .../pmapi/todocenter/manage/TodoCenterManage.java | 8 +------ 4 files changed, 29 insertions(+), 45 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java index 1067f97..50f674b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java @@ -56,7 +56,7 @@ public enum ExportOptionEnum { relatedExistsApplicationCode(19, "关联应用IRS编码"), - declareAmount(20, "申报金额(万元)"), + declareAmount(20, "申报金额"), approvedTotalInvestmentIncrease(21, "批复金额"), @@ -104,11 +104,11 @@ public enum ExportOptionEnum { orgName(40, "单位名称"), - softwareDevelopmentAmount(41, "软件开发(万元)"), + softwareDevelopmentAmount(41, "软件开发"), - cloudHardwarePurchaseAmount(42, "云资源、硬件购置(万元)"), + cloudHardwarePurchaseAmount(42, "云资源、硬件购置"), - thirdPartyAmount(43, "第三方服务(万元)"), + thirdPartyAmount(43, "第三方服务"), safetyInputTitle(44, "投入项"), @@ -116,17 +116,17 @@ public enum ExportOptionEnum { safetyInputAmount(46, "金额"), - annualPlanAmount(47, "年度支付金额(万元)"), + annualPlanAmount(47, "年度支付金额"), - annualPlanHaveAmount(48, "自有资金(万元)"), + annualPlanHaveAmount(48, "自有资金"), - declareGovOwnFinanceAmount(49, "政府投资-本级财政资金(万元)"), + declareGovOwnFinanceAmount(49, "政府投资-本级财政资金"), - declareGovSuperiorFinanceAmount(50, "政府投资-上级补助资金(万元)"), + declareGovSuperiorFinanceAmount(50, "政府投资-上级补助资金"), - declareBankLendingAmount(51, "银行贷款(万元)"), + declareBankLendingAmount(51, "银行贷款"), - declareOtherAmount(52, "其它资金(万元)"), + declareOtherAmount(52, "其它资金"), engineeringSpeedOne(53, "第一季度"), @@ -140,7 +140,10 @@ public enum ExportOptionEnum { supportingMaterialsFile(58, "附件-佐证材料"), - projectRemarks(59, "备注"); + projectRemarks(59, "备注"), + processStatusName(60, "流程状态名称"), + processLaunchTime(61,"流程发起时间"), + processHandleTime(62,"流程处理时间"); private Integer code; private String desc; 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 ca867fa..ae2fa91 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,10 +12,14 @@ 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; @@ -148,7 +152,16 @@ public class ExcelDownUtil { projects.stream().sorted(Comparator.comparing(Project::getId)).forEach(record -> { String s = JSON.toJSONString(record); JSONObject jsonObject = JSON.parseObject(s); - String columnValue = String.valueOf(jsonObject.get(column.toString())); + String columnValue = null; + if (column.name().equals(ExportOptionEnum.processStatusName.name())){ + columnValue = ProcessStatusEnum.getDescByCode(record.getProcessStatus()); + }else if (column.name().equals(ExportOptionEnum.processLaunchTime.name())){ + columnValue = NdDateUtils.format(record.getCreateOn(), "yyyy-MM-dd HH:mm"); + }else if (column.name().equals(ExportOptionEnum.processHandleTime.name())){ + columnValue = NdDateUtils.format(record.getUpdateOn(), "yyyy-MM-dd HH:mm"); + }else { + columnValue = String.valueOf(jsonObject.get(column.toString())); + } columnValues.add(columnValue); }); rowList.add(columnValues); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java deleted file mode 100644 index 274335e..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.ningdatech.pmapi.todocenter.bean.entity; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 审核附件实体 - * - * @author CMM - * @since 2023/02/01 16:27 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class Attachment { - private String id; - //文件名 - private String name; - //文件类型 - private Boolean isImage; - //访问地址 - private String url; -} 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 3bd2333..2562784 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 @@ -3,7 +3,6 @@ package com.ningdatech.pmapi.todocenter.manage; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.PageVo; @@ -36,7 +35,6 @@ import com.ningdatech.pmapi.todocenter.model.dto.vo.ResToBeProcessedVO; import com.ningdatech.pmapi.user.entity.UserInfo; import com.ningdatech.pmapi.user.service.IUserInfoService; import com.ningdatech.zwdd.client.ZwddClient; -import com.wflow.bean.entity.WflowCcTasks; import com.wflow.bean.entity.WflowModels; import com.wflow.contants.HisProInsEndActId; import com.wflow.exception.BusinessException; @@ -44,13 +42,9 @@ import com.wflow.mapper.WflowCcTasksMapper; import com.wflow.mapper.WflowModelHistorysMapper; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.process.ProgressNode; -import com.wflow.workflow.bean.process.enums.ApprovalModeEnum; -import com.wflow.workflow.bean.process.enums.NodeTypeEnum; -import com.wflow.workflow.bean.process.props.ApprovalProps; 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.bean.vo.ProgressNodeAuditInfoVo; import com.wflow.workflow.enums.ProcessHandlerEnum; import com.wflow.workflow.enums.ProcessStatusEnum; import com.wflow.workflow.service.*; @@ -68,7 +62,6 @@ import org.flowable.engine.runtime.Execution; import org.flowable.engine.task.Comment; import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; -import org.flowable.variable.api.history.HistoricVariableInstance; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletResponse; @@ -175,6 +168,7 @@ public class TodoCenterManage { projectListReq.setInstCodes(instCodes); BeanUtils.copyProperties(param,projectListReq); List projects = projectLibManage.projectList(projectListReq); + PageVo projectLibList = projectLibManage.projectLibList(projectListReq); ExcelExportWriter excelExportWriter = new ExcelExportWriter(); String fileName = null;