Sfoglia il codice sorgente

增加导出枚举字段

master
CMM 1 anno fa
parent
commit
c89d2bfbd9
4 ha cambiato i file con 29 aggiunte e 45 eliminazioni
  1. +14
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java
  2. +14
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java
  3. +0
    -26
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java
  4. +1
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 14
- 11
pmapi/src/main/java/com/ningdatech/pmapi/common/enumeration/ExportOptionEnum.java Vedi File

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


+ 14
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/util/ExcelDownUtil.java Vedi File

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


+ 0
- 26
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/entity/Attachment.java Vedi File

@@ -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;
}

+ 1
- 7
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java Vedi File

@@ -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<Project> projects = projectLibManage.projectList(projectListReq);
PageVo<ProjectLibListItemVO> projectLibList = projectLibManage.projectLibList(projectListReq);

ExcelExportWriter excelExportWriter = new ExcelExportWriter();
String fileName = null;


Loading…
Annulla
Salva