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