Commit c05f0e54 authored by neo's avatar neo

[DEV] set status error postion

parent 22f66510
......@@ -94,6 +94,7 @@ public class ReportGeneratorImpl {
Sheet sheet = workbook.getSheetAt(i);
String code = sheet.getSheetName();
logger.info("-------------------------------------Begin Job [{}]------------------------------------------------------", code);
setStatus(job, STATUS_END);
setStatus(job,code,STATUS_BEGIN);
job.setCurrentStep(code);
periodJobMapper.updateByPrimaryKey(job);
......@@ -406,8 +407,6 @@ public class ReportGeneratorImpl {
}
}
}
setStatus(job,code,STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
logger.info("-------------------------------------End Job [{}]------------------------------------------------------", code);
}
}
......
......@@ -277,9 +277,6 @@ public class ReportServiceImpl {
List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
clearPeriodData(projectId, period, exceptTemplateIds, isMergeManualData);
copyTemplateAndConfigFromAdmin(projectId, templates, period);
setStatus(job, STATUS_END);
periodJobMapper.updateByPrimaryKey(job);
}
private List<Template> getTemplatesByProjectId(String projectId) {
......@@ -517,12 +514,13 @@ public class ReportServiceImpl {
evaluator.evaluateAll();
reportGenerator.updateWorkbookCaclsValueToDb(projectId, periodParam, workbook, resources, isMergeManualData, genJob);
setStatus(genJob,STATUS_END);
periodJobMapper.updateByPrimaryKey(genJob);
} catch (Exception e) {
setStatus(genJob, STATUS_ERROR);
e.printStackTrace();
genJob.setErrorMsg("Sever error "+e.getClass().getName());
periodJobMapper.updateByPrimaryKey(genJob);
}
}
}).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