导出后的文件无法打开
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
@@ -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.mapper.DictTypeMapper;
|
||||||
import com.njcn.gather.system.dictionary.pojo.param.DictTypeParam;
|
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.po.DictType;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.vo.DictTypeVO;
|
||||||
import com.njcn.gather.system.dictionary.service.IDictTypeService;
|
import com.njcn.gather.system.dictionary.service.IDictTypeService;
|
||||||
import com.njcn.gather.system.pojo.enums.SystemResponseEnum;
|
import com.njcn.gather.system.pojo.enums.SystemResponseEnum;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
@@ -78,7 +79,10 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> i
|
|||||||
@Override
|
@Override
|
||||||
public void exportDictType(DictTypeParam.DictTypeQueryParam queryParam) {
|
public void exportDictType(DictTypeParam.DictTypeQueryParam queryParam) {
|
||||||
List<DictType> dictTypes = this.listDictTypes(queryParam).getRecords();
|
List<DictType> dictTypes = this.listDictTypes(queryParam).getRecords();
|
||||||
ExcelUtil.exportExcel("字典类型导出数据.xls", "字典类型", DictType.class, dictTypes);
|
//List<DictTypeVO> dictTypeVOS = BeanUtil.copyToList(dictTypes, DictTypeVO.class);
|
||||||
|
List<DictTypeVO> dictTypeVOS = new ArrayList<>();
|
||||||
|
dictTypeVOS.add(new DictTypeVO("性别","SEX"));
|
||||||
|
ExcelUtil.exportExcel("字典类型导出数据.xls", "字典类型", DictTypeVO.class, dictTypeVOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user