Commit bc10900c authored by neo's avatar neo

[Bugfix] fixed batch copy config and use msg

parent 70fe571d
...@@ -342,7 +342,11 @@ public class ReportServiceImpl { ...@@ -342,7 +342,11 @@ public class ReportServiceImpl {
periodCellTemplateConfigList.add(periodCellTemplateConfig); periodCellTemplateConfigList.add(periodCellTemplateConfig);
} }
periodCellTemplateConfigMapper.batchInsert(periodCellTemplateConfigList);
CommonUtils.subListWithLen(periodCellTemplateConfigList,CommonUtils.BATCH_NUM).forEach(batch->{
periodCellTemplateConfigMapper.batchInsert(batch);
});
} }
private void fixedAccountCode(PeriodCellTemplateConfig pctc) { private void fixedAccountCode(PeriodCellTemplateConfig pctc) {
...@@ -425,7 +429,12 @@ public class ReportServiceImpl { ...@@ -425,7 +429,12 @@ public class ReportServiceImpl {
periodCellTemplateList.add(periodCellTemplate); periodCellTemplateList.add(periodCellTemplate);
} }
periodCellTemplateMapper.batchInsert(periodCellTemplateList); CommonUtils.subListWithLen(periodCellTemplateList,CommonUtils.BATCH_NUM).forEach(batch->{
periodCellTemplateMapper.batchInsert(batch);
});
} }
private List<Template> queryTemplateByGroup(Long templateGroupId) { private List<Template> queryTemplateByGroup(Long templateGroupId) {
...@@ -510,9 +519,10 @@ public class ReportServiceImpl { ...@@ -510,9 +519,10 @@ public class ReportServiceImpl {
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob); reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
} catch (Exception e) { } catch (Exception e) {
setStatus(genJob, STATUS_ERROR); setStatus(genJob, STATUS_ERROR);
genJob.setErrorMsg("Sever error " + e.getMessage());
periodJobMapper.updateByPrimaryKey(genJob);
e.printStackTrace(); e.printStackTrace();
genJob.setErrorMsg("Sever error "+e.getClass().getName());
periodJobMapper.updateByPrimaryKey(genJob);
} }
} }
}).start(); }).start();
......
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