Commit c05f0e54 authored by neo's avatar neo

[DEV] set status error postion

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