|
@@ -37,14 +37,14 @@ public class AsyncExaminationExportTemplateService extends AsyncExportTaskTemple
|
|
TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
|
|
TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
|
|
|
|
|
|
StringJoiner stringJoinerSummary = new StringJoiner("\n")
|
|
StringJoiner stringJoinerSummary = new StringJoiner("\n")
|
|
- .add(MessageFormat.format("{0}{1}{2}", FORMAT_TIME, BEGIN_TITLE, OBJ_TITLE));
|
|
|
|
|
|
+ .add(MessageFormat.format("{0}{1}{2}", getFormatTime(), BEGIN_TITLE, OBJ_TITLE));
|
|
tbTask.setStatus(TaskStatusEnum.RUNNING);
|
|
tbTask.setStatus(TaskStatusEnum.RUNNING);
|
|
TBTaskService tbTaskService = SpringContextHolder.getBean(TBTaskService.class);
|
|
TBTaskService tbTaskService = SpringContextHolder.getBean(TBTaskService.class);
|
|
tbTaskService.updateById(tbTask);
|
|
tbTaskService.updateById(tbTask);
|
|
try {
|
|
try {
|
|
TaskLogicService taskLogicService = SpringContextHolder.getBean(TaskLogicService.class);
|
|
TaskLogicService taskLogicService = SpringContextHolder.getBean(TaskLogicService.class);
|
|
Map<String, Object> result = taskLogicService.executeExaminationLogic(map);
|
|
Map<String, Object> result = taskLogicService.executeExaminationLogic(map);
|
|
- stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", FORMAT_TIME, FINISH_TITLE, result.size(), FINISH_SIZE));
|
|
|
|
|
|
+ stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", getFormatTime(), FINISH_TITLE, result.size(), FINISH_SIZE));
|
|
String path = String.valueOf(result.get(SystemConstant.PATH));
|
|
String path = String.valueOf(result.get(SystemConstant.PATH));
|
|
System.out.println("path = " + path);
|
|
System.out.println("path = " + path);
|
|
tbTask.setImportFileName(TaskTypeEnum.EXAMINATION_EXPORT.getTitle());
|
|
tbTask.setImportFileName(TaskTypeEnum.EXAMINATION_EXPORT.getTitle());
|
|
@@ -53,7 +53,7 @@ public class AsyncExaminationExportTemplateService extends AsyncExportTaskTemple
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("请求出错", e);
|
|
log.error("请求出错", e);
|
|
- stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", FORMAT_TIME, EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
|
|
|
|
|
|
+ stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", getFormatTime(), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
|
|
tbTask.setResult(TaskResultEnum.ERROR);
|
|
tbTask.setResult(TaskResultEnum.ERROR);
|
|
if (e instanceof ApiException) {
|
|
if (e instanceof ApiException) {
|
|
ResultUtil.error((ApiException) e, e.getMessage());
|
|
ResultUtil.error((ApiException) e, e.getMessage());
|