Browse Source

项目库编辑表导出修改

tags/24080901
CMM 1 year ago
parent
commit
2c9edc2969
2 changed files with 9 additions and 13 deletions
  1. +9
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  2. +0
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java

+ 9
- 10
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java View File

@@ -185,12 +185,10 @@ public class AnnualPlanLibManage {
List<Project> projects = projectService.list(query);

ExcelExportWriter excelExportWriter = new ExcelExportWriter();

ProjectLibFlagEnum projectLibFlag = param.getProjectLibFlag();
String fileName = null;
if (ProjectLibFlagEnum.ANNUAL_PLAN.equals(projectLibFlag)) {
if (CommonEnum.NO.getCode().equals(isTemporaryAugment)) {
fileName = "年度计划库列表";
} else if (ProjectLibFlagEnum.ANNUAL_PLAN_SUPPLEMENT.equals(projectLibFlag)) {
} else if (CommonEnum.YES.getCode().equals(isTemporaryAugment)) {
fileName = "年度计划增补库列表";
}
excelExportWriter.setFileName(fileName);
@@ -329,16 +327,17 @@ public class AnnualPlanLibManage {
}

public void exportModifyList(ProjectListReq param, HttpServletResponse response) {
ProjectLibFlagEnum projectLibFlag = param.getProjectLibFlag();
int year = LocalDateTime.now().getYear();
Integer isTemporaryAugment = null;
Integer isTemporaryAugment = param.getIsTemporaryAugment();
if (Objects.isNull(isTemporaryAugment)) {
throw new BizException("请传入是否临时增补标志!");
}
param.setIsTemporaryAugment(isTemporaryAugment);
String fileName = null;
// 设置excel的文件名称和是否增补
if (ProjectLibFlagEnum.ANNUAL_PLAN.equals(projectLibFlag)) {
isTemporaryAugment = 0;
if (CommonEnum.NO.getCode().equals(isTemporaryAugment)) {
fileName = "丽水市" + year + "年数字化项目年度计划库编辑表";
} else if (ProjectLibFlagEnum.ANNUAL_PLAN_SUPPLEMENT.equals(projectLibFlag)) {
isTemporaryAugment = 1;
} else if (CommonEnum.YES.getCode().equals(isTemporaryAugment)) {
fileName = "丽水市" + year + "年数字化项目年度计划增补库编辑表";
}
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(param);


+ 0
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java View File

@@ -91,7 +91,4 @@ public class ProjectListReq extends PagePo {

@ApiModelProperty("导出选项")
private List<ExportOptionEnum> exportOptionList;

@ApiModelProperty(value = "项目库标志枚举")
private ProjectLibFlagEnum projectLibFlag;
}

Loading…
Cancel
Save