Commit 0debde2b authored by lcl's avatar lcl

u

parent 3e8fcfb1
......@@ -59,19 +59,20 @@ public class DataAnalysisComponent {
//文件处理
for (CbProjectFile file : fileList) {
if (file.getDelFlag() == 0) {
//文件下载
InputStream inputStream = ossService.downFileIO(file.getFileOssId());
if (ObjectUtil.isNull(inputStream)) {
file.setFailRemark("文件数据不存在");
file.setFileParseStatus(3);
file.setFailRemark("文件数据不存在");
projectFileService.updateById(file);
break;
}
//解析数据
List<CbQuantitySummary> importList = new ExcelUtils<>(CbQuantitySummary.class).importExcelAllSheet(inputStream, 1);
if (importList.isEmpty()) {
file.setFailRemark("表格中不存在待导入数据!");
file.setFileParseStatus(3);
file.setFailRemark("表格中不存在待导入数据!");
projectFileService.updateById(file);
break;
}
......@@ -106,10 +107,15 @@ public class DataAnalysisComponent {
}
}
file.setFileParseStatus(2);
projectFileService.updateById(file);
}catch (Exception e){
boolean b = projectFileService.updateById(file);
if (!b) {
throw new ServiceException("文件状态更新失败!");
}
} catch (Exception e) {
status.setRollbackOnly();
file.setFileParseStatus(3);
file.setFailRemark(e.getMessage());
projectFileService.updateById(file);
}
return Boolean.TRUE;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment