wangfeng 4 lat temu
rodzic
commit
22557fdedc

+ 3 - 14
cdssman-service/src/main/java/com/diagbot/dto/ExportConceptAllDTO.java

@@ -11,19 +11,8 @@ import lombok.Setter;
  */
 @Setter
 @Getter
-public class ExportConceptAllDTO {
-    @Excel(name = "医学标准术语",width = 40, orderNum = "1", isImportField = "true" )
-    private String libName;
-    @Excel(name = "同义词",width = 40, orderNum = "2", isImportField = "true" )
-    private String synonymName;
-    @Excel(name = "类型",orderNum = "3", isImportField = "true" )
-    private String typeName;
-    @Excel(name = "性别", mergeRely = {1,2,3},orderNum = "4", isImportField = "true" )
-    private Integer sexType;
-    @Excel(name = "最小年龄", orderNum = "5", isImportField = "true" )
-    private Double minAge;
-    @Excel(name = "最大年龄", orderNum = "6", isImportField = "true" )
-    private Double maxAge;
-    @Excel(name = "错误信息", orderNum = "7", isImportField = "true" )
+public class ExportConceptAllDTO extends ExportConceptModeDTO {
+
+    @Excel(name = "错误信息", orderNum = "7", isImportField = "true")
     private String msg;
 }

+ 27 - 0
cdssman-service/src/main/java/com/diagbot/dto/ExportConceptModeDTO.java

@@ -0,0 +1,27 @@
+package com.diagbot.dto;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2021-06-08 11:24
+ */
+@Setter
+@Getter
+public class ExportConceptModeDTO {
+    @Excel(name = "医学标准术语",width = 40, orderNum = "1", isImportField = "true" )
+    private String libName;
+    @Excel(name = "同义词",width = 40, orderNum = "2", isImportField = "true" )
+    private String synonymName;
+    @Excel(name = "类型",orderNum = "3", isImportField = "true" )
+    private String typeName;
+    @Excel(name = "性别", mergeRely = {1,2,3},orderNum = "4", isImportField = "true" )
+    private Integer sexType;
+    @Excel(name = "最小年龄", orderNum = "5", isImportField = "true" )
+    private Double minAge;
+    @Excel(name = "最大年龄", orderNum = "6", isImportField = "true" )
+    private Double maxAge;
+}

+ 2 - 1
cdssman-service/src/main/java/com/diagbot/facade/TermImportFacade.java

@@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.ExcelExportUtil;
 import cn.afterturn.easypoi.excel.entity.ExportParams;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.diagbot.dto.ExportConceptAllDTO;
+import com.diagbot.dto.ExportConceptModeDTO;
 import com.diagbot.entity.KlConcept;
 import com.diagbot.entity.KlConceptCommon;
 import com.diagbot.entity.KlLexicon;
@@ -331,7 +332,7 @@ public class TermImportFacade {
         if (StringUtil.isNotBlank(title)) {
             havTitle = true;
         }
-        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(title, "sheet1"), ExportConceptAllDTO.class, new ArrayList<>());
+        Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(title, "sheet1"), ExportConceptModeDTO.class, new ArrayList<>());
         if (workbook != null) {
             //设置第5,6整列只能是数字
             Sheet sheet = workbook.getSheetAt(0);//创建Excel工作表的行