资源推送微服务
parent
ff8f7822be
commit
1e382a6ea4
|
@ -24,13 +24,13 @@ private String id;
|
|||
private String recommendId;
|
||||
@Excel(name = "*题名")
|
||||
private String title;
|
||||
@Excel(name = "只用来查重,格式化题名")
|
||||
//@Excel(name = "只用来查重,格式化题名")
|
||||
private String titleFormat;
|
||||
@Excel(name = "题名译名")
|
||||
private String otherTitle;
|
||||
@Excel(name = "分辑号 - 预留")
|
||||
//@Excel(name = "分辑号 - 预留")
|
||||
private String seriesNumber;
|
||||
@Excel(name = "分辑名")
|
||||
//@Excel(name = "分辑名")
|
||||
private String seriesTitle;
|
||||
@Excel(name = "PISSN")
|
||||
private String pissn;
|
||||
|
@ -42,25 +42,25 @@ private String pisbn;
|
|||
private String eisbn;
|
||||
@Excel(name = "订购号")
|
||||
private String orderNumber;
|
||||
@Excel(name = "学科")
|
||||
//@Excel(name = "学科")
|
||||
private String subject;
|
||||
@Excel(name = "出版社")
|
||||
//@Excel(name = "出版社")
|
||||
private String publisher;
|
||||
@Excel(name = "国别")
|
||||
@Excel(name = "国家/地区")
|
||||
private String country;
|
||||
@Excel(name = "出版年")
|
||||
//@Excel(name = "出版年")
|
||||
private String pubYear;
|
||||
@Excel(name = "创刊年")
|
||||
//@Excel(name = "创刊年")
|
||||
private String foundedYear;
|
||||
@Excel(name = "语种")
|
||||
private String language;
|
||||
@Excel(name = "出版频率")
|
||||
//@Excel(name = "出版频率")
|
||||
private String pubFeq;
|
||||
@Excel(name = "内容简介")
|
||||
//@Excel(name = "内容简介")
|
||||
private String Intro;
|
||||
@Excel(name = "分类号")
|
||||
//@Excel(name = "分类号")
|
||||
private String classiNumber;
|
||||
@Excel(name = "期刊URL地址")
|
||||
//@Excel(name = "期刊URL地址")
|
||||
private String url;
|
||||
private String carrier;
|
||||
private String type;
|
||||
|
|
|
@ -154,7 +154,7 @@ public class ExcelUtil<T>
|
|||
// 定义一个map用于存放excel列的序号和field.
|
||||
Map<String, Integer> cellMap = new HashMap<String, Integer>();
|
||||
// 获取表头
|
||||
Row heard = sheet.getRow(0);
|
||||
Row heard = sheet.getRow(2);
|
||||
for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) {
|
||||
Cell cell = heard.getCell(i);
|
||||
if (cell != null) {
|
||||
|
@ -176,7 +176,8 @@ public class ExcelUtil<T>
|
|||
// 设置类的私有字段属性可访问.
|
||||
field.setAccessible(true);
|
||||
Integer column = cellMap.get(attr.name());
|
||||
if(column == null){
|
||||
Integer column2 = cellMap.get("*"+attr.name());
|
||||
if(column == null && column2 == null){
|
||||
System.out.println("模板错误:Excel表头和项目里面设置的表头["+attr.name()+"]不一致,请检查!");
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
@ -185,7 +186,7 @@ public class ExcelUtil<T>
|
|||
}
|
||||
}
|
||||
|
||||
for (int i = 1; i < rows; i++) {
|
||||
for (int i = 3; i < rows; i++) {
|
||||
// 从第2行开始取数据,默认第一行是表头.
|
||||
Row row = sheet.getRow(i);
|
||||
T entity = null;
|
||||
|
|
Loading…
Reference in New Issue