|
|
|
@ -0,0 +1,181 @@
|
|
|
|
|
//package cn.estsh.i3plus.pojo.mes.model;
|
|
|
|
|
//
|
|
|
|
|
//import io.swagger.annotations.Api;
|
|
|
|
|
//import io.swagger.annotations.ApiParam;
|
|
|
|
|
//import lombok.AllArgsConstructor;
|
|
|
|
|
//import lombok.Data;
|
|
|
|
|
//import lombok.NoArgsConstructor;
|
|
|
|
|
//import org.apache.poi.ss.usermodel.CellStyle;
|
|
|
|
|
//import org.springframework.util.StringUtils;
|
|
|
|
|
//
|
|
|
|
|
//import java.io.Serializable;
|
|
|
|
|
//import java.math.BigDecimal;
|
|
|
|
|
//
|
|
|
|
|
///**
|
|
|
|
|
// * @Author: wangjie
|
|
|
|
|
// * @CreateDate: 2019/8/21 9:19 AM
|
|
|
|
|
// * @Description:
|
|
|
|
|
// **/
|
|
|
|
|
//@Data
|
|
|
|
|
//@NoArgsConstructor
|
|
|
|
|
//@AllArgsConstructor
|
|
|
|
|
//@Api("EXCEL参数model")
|
|
|
|
|
//public class ExcelDataParamModel<T> implements Serializable {
|
|
|
|
|
//
|
|
|
|
|
// public ExcelDataParamModel(Class<T> clazz){
|
|
|
|
|
// this.clazz = clazz;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("获取相对应的类,用来映射数据,如果不设置此值,那么整个数据将会用String[]作为数据,不再通过映射拿取数据")
|
|
|
|
|
// private Class<T> clazz;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("对应类的映射字段名,String类型")
|
|
|
|
|
// private String[] strField;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("对应类的标题,需要一一对应")
|
|
|
|
|
// private String[] titleStr;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("大标题")
|
|
|
|
|
// private String title;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("文件名,如果传入的ExcelDataParamModel是一个List的时候,以sheetNo = 1为文件名,如果sheetNo为空,则默认随机")
|
|
|
|
|
// private String fileName;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("后缀")
|
|
|
|
|
// private String sufix;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("大标题样式")
|
|
|
|
|
// private CellStyle bigTitleCellStyle;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("标题样式")
|
|
|
|
|
// private CellStyle titleCellStyle;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("数据样式")
|
|
|
|
|
// private CellStyle cellStyle;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("sheet名")
|
|
|
|
|
// private String sheetName;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("每个格子的宽度")
|
|
|
|
|
// private BigDecimal[] cellWidth;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("如果传入的ExcelDataParamModel是List的时候,默认以sheetNo排序")
|
|
|
|
|
// private Integer sheetNo;
|
|
|
|
|
//
|
|
|
|
|
// @ApiParam("导出数据转换器")
|
|
|
|
|
// private QueryDataInterface queryDataInterface;
|
|
|
|
|
//
|
|
|
|
|
// public Class<T> getClazz() {
|
|
|
|
|
// return clazz;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String[] getStrField() {
|
|
|
|
|
// return strField;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String[] getTitleStr() {
|
|
|
|
|
// return titleStr;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String getTitle() {
|
|
|
|
|
// if(StringUtils.isEmpty(this.title)){
|
|
|
|
|
// return "无效的标题";
|
|
|
|
|
// }else{
|
|
|
|
|
// return title;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String getFileName() {
|
|
|
|
|
// if(StringUtils.isEmpty(this.fileName)){
|
|
|
|
|
// return "未命名";
|
|
|
|
|
// }else{
|
|
|
|
|
// return this.fileName;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public CellStyle getBigTitleCellStyle() {
|
|
|
|
|
// return bigTitleCellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public CellStyle getTitleCellStyle() {
|
|
|
|
|
// return titleCellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public CellStyle getCellStyle() {
|
|
|
|
|
// return cellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String getSheetName() {
|
|
|
|
|
// return sheetName;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public Integer getSheetNo() {
|
|
|
|
|
// return sheetNo;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public BigDecimal[] getCellWidth() {
|
|
|
|
|
// return cellWidth;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public String getSufix() {
|
|
|
|
|
// return sufix;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public QueryDataInterface getQueryDataInterface() {
|
|
|
|
|
// return queryDataInterface;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setClazz(Class<T> clazz) {
|
|
|
|
|
// this.clazz = clazz;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setStrField(String[] strField) {
|
|
|
|
|
// this.strField = strField;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setTitleStr(String[] titleStr) {
|
|
|
|
|
// this.titleStr = titleStr;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setTitle(String title) {
|
|
|
|
|
// this.title = title;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setFileName(String fileName) {
|
|
|
|
|
// this.fileName = fileName;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setSufix(String sufix) {
|
|
|
|
|
// this.sufix = sufix;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setBigTitleCellStyle(CellStyle bigTitleCellStyle) {
|
|
|
|
|
// this.bigTitleCellStyle = bigTitleCellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setTitleCellStyle(CellStyle titleCellStyle) {
|
|
|
|
|
// this.titleCellStyle = titleCellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setCellStyle(CellStyle cellStyle) {
|
|
|
|
|
// this.cellStyle = cellStyle;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setSheetName(String sheetName) {
|
|
|
|
|
// this.sheetName = sheetName;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setCellWidth(BigDecimal[] cellWidth) {
|
|
|
|
|
// this.cellWidth = cellWidth;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// public void setSheetNo(Integer sheetNo) {
|
|
|
|
|
// this.sheetNo = sheetNo;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// public void setQueryDataInterface(QueryDataInterface queryDataInterface) {
|
|
|
|
|
// this.queryDataInterface = queryDataInterface;
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//}
|