From bb5e5dfec5f077ead07be0939073b949f4aa1889 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Tue, 5 Nov 2024 13:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=90=8E=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=97=A0=E6=B3=95=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dictionary/pojo/vo/DictTypeVO.java | 78 +++++++++++++++++++ .../service/impl/DictTypeServiceImpl.java | 8 +- 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 system/src/main/java/com/njcn/gather/system/dictionary/pojo/vo/DictTypeVO.java diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/pojo/vo/DictTypeVO.java b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/vo/DictTypeVO.java new file mode 100644 index 00000000..984053f7 --- /dev/null +++ b/system/src/main/java/com/njcn/gather/system/dictionary/pojo/vo/DictTypeVO.java @@ -0,0 +1,78 @@ +package com.njcn.gather.system.dictionary.pojo.vo; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author caozehui + * @since 2024-11-05 + */ +@Data +@AllArgsConstructor +public class DictTypeVO implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 字典类型表Id + */ + //private String id; + + /** + * 名称 + */ + private String name; + + /** + * 编码 + */ + private String code; + + /** + * 排序 + */ + //private Integer sort; + + /** + * 开启等级:0-不开启;1-开启,默认不开启 + */ + //private Integer openLevel; + + /** + * 开启描述:0-不开启;1-开启,默认不开启 + */ + //private Integer openDescribe; + + /** + * 描述 + */ + //private String remark; + + /** + * 状态:0-删除 1-正常 + */ + //private Integer state; + + /** + * 创建人 + */ + //private String createBy; + + /** + * 创建时间 + */ + //private String createTime; + + /** + * 更新人 + */ + //private String updateBy; + + /** + * 更新时间 + */ + //private String updateTime; +} diff --git a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java index 79ddd81f..03171cb7 100644 --- a/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java +++ b/system/src/main/java/com/njcn/gather/system/dictionary/service/impl/DictTypeServiceImpl.java @@ -13,6 +13,7 @@ import com.njcn.db.mybatisplus.constant.DbConstant; import com.njcn.gather.system.dictionary.mapper.DictTypeMapper; import com.njcn.gather.system.dictionary.pojo.param.DictTypeParam; import com.njcn.gather.system.dictionary.pojo.po.DictType; +import com.njcn.gather.system.dictionary.pojo.vo.DictTypeVO; import com.njcn.gather.system.dictionary.service.IDictTypeService; import com.njcn.gather.system.pojo.enums.SystemResponseEnum; import com.njcn.web.factory.PageFactory; @@ -77,8 +78,11 @@ public class DictTypeServiceImpl extends ServiceImpl i @Override public void exportDictType(DictTypeParam.DictTypeQueryParam queryParam) { - List dictTypes=this.listDictTypes(queryParam).getRecords(); - ExcelUtil.exportExcel("字典类型导出数据.xls", "字典类型", DictType.class, dictTypes); + List dictTypes = this.listDictTypes(queryParam).getRecords(); + //List dictTypeVOS = BeanUtil.copyToList(dictTypes, DictTypeVO.class); + List dictTypeVOS = new ArrayList<>(); + dictTypeVOS.add(new DictTypeVO("性别","SEX")); + ExcelUtil.exportExcel("字典类型导出数据.xls", "字典类型", DictTypeVO.class, dictTypeVOS); }