注释掉模板类型校验
This commit is contained in:
@@ -346,7 +346,7 @@ public class ImportExcel {
|
|||||||
//log.debug("Import column count:"+annotationList.size());
|
//log.debug("Import column count:"+annotationList.size());
|
||||||
// Get excel data
|
// Get excel data
|
||||||
List<E> dataList = Lists.newArrayList();
|
List<E> dataList = Lists.newArrayList();
|
||||||
Row header = this.getRow(headerNum);
|
/*Row header = this.getRow(headerNum);
|
||||||
List<Object[]> annotationListCopy=Lists.newArrayList();
|
List<Object[]> annotationListCopy=Lists.newArrayList();
|
||||||
for(int i=header.getFirstCellNum();i<=header.getLastCellNum();i++) {
|
for(int i=header.getFirstCellNum();i<=header.getLastCellNum();i++) {
|
||||||
Object value=this.getCellValue(header, i);
|
Object value=this.getCellValue(header, i);
|
||||||
@@ -398,21 +398,21 @@ public class ImportExcel {
|
|||||||
if(!has) {
|
if(!has) {
|
||||||
throw new ServiceException(props.getProperty("template_error"));
|
throw new ServiceException(props.getProperty("template_error"));
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
// Field sorting
|
// Field sorting
|
||||||
Collections.sort(annotationListCopy, new Comparator<Object[]>() {
|
Collections.sort(annotationList, new Comparator<Object[]>() {
|
||||||
public int compare(Object[] o1, Object[] o2) {
|
public int compare(Object[] o1, Object[] o2) {
|
||||||
return new Integer(((ExcelField)o1[0]).sort()).compareTo(
|
return new Integer(((ExcelField)o1[0]).sort()).compareTo(
|
||||||
new Integer(((ExcelField)o2[0]).sort()));
|
new Integer(((ExcelField)o2[0]).sort()));
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
annotationList.clear();
|
//annotationList.clear();
|
||||||
for (int i = this.getDataRowNum(); i < this.getLastDataRowNum(); i++) {
|
for (int i = this.getDataRowNum(); i < this.getLastDataRowNum(); i++) {
|
||||||
E e = (E)cls.newInstance();
|
E e = (E)cls.newInstance();
|
||||||
int column = 0;
|
int column = 0;
|
||||||
Row row = this.getRow(i);
|
Row row = this.getRow(i);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (Object[] os : annotationListCopy){
|
for (Object[] os : annotationList){
|
||||||
Object val = this.getCellValue(row, column++);
|
Object val = this.getCellValue(row, column++);
|
||||||
if (val != null){
|
if (val != null){
|
||||||
ExcelField ef = (ExcelField)os[0];
|
ExcelField ef = (ExcelField)os[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user