提交 956f9b45 authored 作者: taojinlong's avatar taojinlong

fix: 处理 excel 公式错误

上级 c94ec455
......@@ -70,6 +70,7 @@ public class ExcelReaderUtil {
}
public static void main(String[] args) throws Exception {
ExcelReaderUtil.readExcel("根据前100行判断数据类型.xls", new FileInputStream("/Users/taojinlong/Desktop/根据前100行判断数据类型.xls"));
String file ="全国现有确诊趋势.xlsx";
ExcelReaderUtil.readExcel(file, new FileInputStream("/Users/taojinlong/Desktop/" + file));
}
}
......@@ -221,15 +221,6 @@ public class ExcelXlsxReader extends DefaultHandler {
return;
}
lastIndex += new String(ch, start, length);
if(curRow==5){
System.out.println("---------");
System.out.println(ch);
System.out.println("start: " + start);
System.out.println("length: " + length);
System.out.println(lastIndex);
System.out.println("---------");
}
}
/**
......@@ -330,7 +321,7 @@ public class ExcelXlsxReader extends DefaultHandler {
} else if ("s".equals(cellType)) { //处理字符串
nextDataType = CellDataType.SSTINDEX;
} else if ("str".equals(cellType)) {
nextDataType = CellDataType.FORMULA;
nextDataType = CellDataType.SSTINDEX;
}
String cellStyleStr = attributes.getValue("s"); //
......
......@@ -90,6 +90,9 @@ public class DataSetTableTaskService {
}
datasetTableTaskMapper.insert(datasetTableTask);
} else {
datasetTableTask.setStatus(null);
datasetTableTask.setLastExecTime(null);
datasetTableTask.setLastExecStatus(null);
datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask);
}
......@@ -197,6 +200,7 @@ public class DataSetTableTaskService {
if(datasetTableTask.getRate().equalsIgnoreCase(ScheduleType.SIMPLE.name())){
datasetTableTask.setStatus(TaskStatus.Stopped.name());
}else {
datasetTableTask = datasetTableTaskMapper.selectByPrimaryKey(datasetTableTask.getId());
if(StringUtils.isNotEmpty(datasetTableTask.getEnd()) && datasetTableTask.getEnd().equalsIgnoreCase("1")){
BaseGridRequest request = new BaseGridRequest();
ConditionEntity conditionEntity = new ConditionEntity();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论