diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/ProjectManagerController.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/ProjectManagerController.java index a559111..183c268 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/ProjectManagerController.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/ProjectManagerController.java @@ -106,7 +106,8 @@ public class ProjectManagerController { projectInfo.getSuperiorFundPayRate(), projectInfo.getCurrentStage(), projectInfo.getTotalPercent(), - projectInfo.getDutyWorkplace())) + projectInfo.getDutyWorkplace(), + projectInfo.getReformName())) .collect(Collectors.toList()); // for (HuzhouProjectinfoExportDTO huzhouProjectinfoExportDTO : dtoList) { @@ -128,7 +129,7 @@ public class ProjectManagerController { EasyExcel.write(response.getOutputStream(), HuzhouProjectinfoExportDTO.class) .registerWriteHandler(new HorizontalCellStyleStrategy(headStyle, bodyStyle)) .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) - .registerWriteHandler(new CustomMergeStrategy(Arrays.asList("dutyWorkplace"))) + .registerWriteHandler(new CustomMergeStrategy(Arrays.asList("dutyWorkplace","reformName"))) .sheet("上级资金执行率汇总") .doWrite(dtoList); } diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/converter/ReformNameConverter.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/converter/ReformNameConverter.java new file mode 100644 index 0000000..f0629dd --- /dev/null +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/converter/ReformNameConverter.java @@ -0,0 +1,60 @@ +package com.easy.admin.modules.huzhou.converter; + +import com.alibaba.excel.converters.Converter; +import com.alibaba.excel.metadata.GlobalConfiguration; +import com.alibaba.excel.metadata.data.WriteCellData; +import com.alibaba.excel.metadata.property.ExcelContentProperty; + +/** + * 所属改革任务,转换器。 + * + * @author gjh + */ +public class ReformNameConverter implements Converter { + /** + * Convert Java objects to excel objects + * + * @param value Java Data.NotNull. + * @param contentProperty Content property.Nullable. + * @param globalConfiguration Global configuration.NotNull. + * @return Data to put into a Excel + */ + + @Override + public WriteCellData convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { + switch (value) { + case "1": + return new WriteCellData<>("2+N紧密型城市医疗集团建设"); + case "2": + return new WriteCellData<>("9+9+N县域医共体建设"); + case "3": + return new WriteCellData<>("市县公立医院妇幼能力建设"); + case "4": + return new WriteCellData<>("打造长三角市域医学高地"); + case "5": + return new WriteCellData<>("高水平县级医院建设"); + case "6": + return new WriteCellData<>("公立医院院前急救与院内救治服务融合发展"); + case "7": + return new WriteCellData<>("医共体下三医联动改革"); + case "8": + return new WriteCellData<>("智慧医院服务能力提档升级"); + case "9": + return new WriteCellData<>("数字健康大脑建设"); + case "10": + return new WriteCellData<>("高层次人才引育"); + case "11": + return new WriteCellData<>("舒心就医"); + case "12": + return new WriteCellData<>("中医药固本培元"); + case "13": + return new WriteCellData<>("公立医院运营管理"); + case "14": + return new WriteCellData<>("公立医院党建全行业引领改革工程"); + case "15": + return new WriteCellData<>("高质量临床重点专科建设"); + default: + return new WriteCellData<>("未知"); + } + } +} diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/dto/HuzhouProjectinfoExportDTO.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/dto/HuzhouProjectinfoExportDTO.java index e5c910d..1bea5d6 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/dto/HuzhouProjectinfoExportDTO.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/dto/HuzhouProjectinfoExportDTO.java @@ -5,10 +5,14 @@ import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.format.NumberFormat; import com.alibaba.excel.annotation.write.style.HeadStyle; import com.baomidou.mybatisplus.annotation.TableField; +import com.easy.admin.modules.huzhou.converter.ReformNameConverter; import lombok.Data; @HeadStyle(fillForegroundColor = 44) @Data public class HuzhouProjectinfoExportDTO { + @ExcelProperty(value = {"任务名称"}, converter = ReformNameConverter.class) + private String reformName; + @ExcelProperty("指导处室") private String dutyWorkplace; @@ -30,11 +34,13 @@ public class HuzhouProjectinfoExportDTO { Double superiorFundPayRate, String currentStage, String totalPercent, - String dutyWorkplace) { + String dutyWorkplace, + String reformName) { this.projectName = projectName; this.superiorFundPayRate = superiorFundPayRate; this.currentStage = currentStage; this.totalPercent = totalPercent; this.dutyWorkplace = dutyWorkplace; + this.reformName = reformName; } } \ No newline at end of file diff --git a/huzhou/src/main/java/com/easy/admin/modules/huzhou/entity/HuzhouProjectinfo.java b/huzhou/src/main/java/com/easy/admin/modules/huzhou/entity/HuzhouProjectinfo.java index 30957d2..9370145 100644 --- a/huzhou/src/main/java/com/easy/admin/modules/huzhou/entity/HuzhouProjectinfo.java +++ b/huzhou/src/main/java/com/easy/admin/modules/huzhou/entity/HuzhouProjectinfo.java @@ -204,7 +204,8 @@ public class HuzhouProjectinfo extends BaseEntity { this.superiorFundPayRate, this.currentStage, this.totalPercent, - this.dutyWorkplace); + this.dutyWorkplace, + this.reformName); } }