浏览代码

log error修改

wangliang 3 年之前
父节点
当前提交
5141c57264
共有 64 个文件被更改,包括 193 次插入144 次删除
  1. 2 3
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java
  2. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java
  3. 4 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java
  4. 10 10
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceServiceImpl.java
  5. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceImpl.java
  6. 1 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TExamTaskFlowServiceImpl.java
  7. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TSyncExamStudentScoreServiceImpl.java
  8. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncBasicClazzImportService.java
  9. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncCourseDataImportService.java
  10. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncCreatePdfTempleteService.java
  11. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncDownloadPdfTempleteService.java
  12. 1 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncExaminationExportTemplateService.java
  13. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncExaminationImportTemplateService.java
  14. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncPaperReviewPdfExportService.java
  15. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScoreBatchDownloadService.java
  16. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScoreExportService.java
  17. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScorePushService.java
  18. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncStatisticsDataImportService.java
  19. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncStudentDataImportService.java
  20. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncSysUserDataImportService.java
  21. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncTaskReviewSampleExportService.java
  22. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncUserPushService.java
  23. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/export/AsyncExportTaskTemplete.java
  24. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/importData/AsyncImportTaskTemplete.java
  25. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/push/AsyncPushTaskTemplate.java
  26. 0 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/PushLogicServiceImpl.java
  27. 5 7
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java
  28. 2 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java
  29. 1 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/FreemarkerUtil.java
  30. 6 2
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/GoogleBarCodeUtil.java
  31. 2 1
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToPdfUtil.java
  32. 14 13
      distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java
  33. 2 2
      distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java
  34. 1 1
      distributed-print/src/main/java/com/qmth/distributed/print/api/TFFlowController.java
  35. 2 1
      distributed-print/src/main/java/com/qmth/distributed/print/aspect/ApiControllerAspect.java
  36. 2 1
      distributed-print/src/main/java/com/qmth/distributed/print/config/MapApiReader.java
  37. 2 0
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java
  38. 3 3
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java
  39. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java
  40. 4 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TBTaskServiceImpl.java
  41. 4 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java
  42. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/StmmsUtils.java
  43. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/AesUtil.java
  44. 5 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java
  45. 1 1
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ExcelUtil.java
  46. 6 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileUtil.java
  47. 9 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpKit.java
  48. 5 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpUtil.java
  49. 2 2
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ImageTrajectoryUtil.java
  50. 5 4
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/JacksonUtil.java
  51. 5 5
      teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ServletUtil.java
  52. 1 1
      teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/execute/AsyncDataCalculateTempleteService.java
  53. 2 1
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/aspect/ApiControllerAspect.java
  54. 2 1
      teachcloud-report/src/main/java/com/qmth/teachcloud/report/config/MapApiReader.java
  55. 1 2
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/config/RedisMessageListener.java
  56. 4 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/RedisMqSyncJob.java
  57. 5 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/ResendSmsJob.java
  58. 5 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/ResetCreatePdfJob.java
  59. 5 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SendSmsExpireJob.java
  60. 6 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SendSmsOverdueJob.java
  61. 5 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncSchoolJob.java
  62. 6 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncUserNeedPushAgainJob.java
  63. 6 1
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncUserPushErrorJob.java
  64. 10 9
      teachcloud-task/src/main/java/com/qmth/teachcloud/task/service/impl/QuartzServiceImpl.java

+ 2 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ActivitiServiceImpl.java

@@ -253,7 +253,7 @@ public class ActivitiServiceImpl implements ActivitiService {
             examTaskService.updateById(examTask);
             runtimeService.deleteProcessInstance(flowId, FlowApproveSetupEnum.END.getTitle());
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -374,8 +374,7 @@ public class ActivitiServiceImpl implements ActivitiService {
             objectMap.putIfAbsent("sysUser", sysUser);
             return objectMap;
         } catch (Exception e) {
-            log.error("请求出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamPaperStructureServiceImpl.java

@@ -144,7 +144,7 @@ public class ExamPaperStructureServiceImpl extends ServiceImpl<ExamPaperStructur
                 subjectiveStructureList.add(subjectiveStructureMap);
                 objectiveStructureList.add(objectiveStructureMap);
             } catch (Exception e) {
-                log.error("请求出错", e);
+                log.error(SystemConstant.LOG_ERROR, e);
                 for (BasicAttachment basicAttachment : basicAttachmentList) {
                     basicAttachmentService.deleteAttachment(basicAttachment);
                 }

+ 4 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/ExamTaskServiceImpl.java

@@ -434,13 +434,12 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             map2.computeIfAbsent(SystemConstant.FLOW_ID, v -> examTask.getFlowId());
             tExamTaskFlowService.saveOrUpdate(map2);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ActivitiObjectNotFoundException) {
                 ResultUtil.error("流程不存在");
             } else {
                 ResultUtil.error(e.getMessage());
             }
-            e.printStackTrace();
         }
         return examTask;
     }
@@ -850,7 +849,7 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
 //                try {
 //                    printCommonService.checkData(examTask.getSchoolId(), examTask.getCourseCode(), examTask.getPaperNumber(), sysUser);
 //                } catch (IOException e) {
-//                    log.error("调用生成pdf异常");
+
 //                }
 //            }
 //        }
@@ -1540,13 +1539,12 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             examTaskDetailService.saveOrUpdate(examTaskDetail);
 
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ActivitiObjectNotFoundException) {
                 ResultUtil.error("流程不存在");
             } else {
                 ResultUtil.error(e.getMessage());
             }
-            e.printStackTrace();
         }
         return examTask;
     }
@@ -1744,13 +1742,12 @@ public class ExamTaskServiceImpl extends ServiceImpl<ExamTaskMapper, ExamTask> i
             }
             return examTask;
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ActivitiObjectNotFoundException) {
                 ResultUtil.error("流程不存在");
             } else {
                 ResultUtil.error(e.getMessage());
             }
-            e.printStackTrace();
         }
         return null;
     }

+ 10 - 10
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceServiceImpl.java

@@ -233,7 +233,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
                 }
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -337,7 +337,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             basicAttachment.setPages(pdfDto.getActualPageCount());
             basicAttachmentService.save(basicAttachment);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             basicAttachmentService.deleteAttachment(basicAttachment);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
@@ -435,7 +435,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             basicAttachment = new BasicAttachment(jsonObject.toJSONString(), fileName, SystemConstant.HTML_PREFIX, new BigDecimal(size), fileMd5, userId);
             basicAttachmentService.save(basicAttachment);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             basicAttachmentService.deleteAttachment(basicAttachment);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
@@ -543,7 +543,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             }
             basicAttachment.setPages(pages);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             basicAttachmentService.deleteAttachment(basicAttachment);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
@@ -835,7 +835,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
                 tbTaskService.save(tbTask);
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(basicAttachment)) {
                 basicAttachmentService.deleteAttachment(basicAttachment);
             }
@@ -865,7 +865,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
                 tbTaskService.save(tbTask);
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(basicAttachment)) {
                 basicAttachmentService.deleteAttachment(basicAttachment);
             }
@@ -887,7 +887,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             TBTask tbTask = tbTaskService.saveTaskCommon(null, taskTypeEnum, map, null);
             tbTaskService.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -907,7 +907,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             tbTask.setPrintPlanId(printPlanId);
             tbTaskService.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -926,7 +926,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             TBSyncTask tbSyncTask = tbSyncTaskService.savePushCommon(pushTypeEnum, map, null);
             tbSyncTaskService.save(tbSyncTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -1113,7 +1113,7 @@ public class PrintCommonServiceServiceImpl implements PrintCommonService {
             jsonObject.put(SystemConstant.PATH, dirName);
             jsonObject.put(SystemConstant.UPLOAD_TYPE, UploadFileEnum.FILE);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(inputStream)) {
                 inputStream.close();

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TCStatisticsServiceImpl.java

@@ -137,7 +137,7 @@ public class TCStatisticsServiceImpl extends ServiceImpl<TCStatisticsMapper, TCS
             try {
                 this.freshenJoinData(sysUser, batchNoSet);
             } catch (Exception e) {
-                log.error("请求出错", e);
+                log.error(SystemConstant.LOG_ERROR, e);
                 if (e instanceof ApiException) {
                     return ResultUtil.error((ApiException) e, e.getMessage());
                 } else {

+ 1 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TExamTaskFlowServiceImpl.java

@@ -61,8 +61,7 @@ public class TExamTaskFlowServiceImpl extends ServiceImpl<TExamTaskFlowMapper, T
                 this.save(tExamTaskFlowSub);
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/TSyncExamStudentScoreServiceImpl.java

@@ -210,7 +210,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                 tSyncExamStudentScore.setTrajectoryFileList(fileTargetList);
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
             tSyncExamStudentScore.setErrorInfo();
             if (Objects.nonNull(fileTargetList)) {
                 for (File f : fileTargetList) {
@@ -272,7 +272,7 @@ public class TSyncExamStudentScoreServiceImpl extends ServiceImpl<TSyncExamStude
                 IOUtils.copy(new FileInputStream(zipFile), outputStream);
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(outputStream)) {
                 outputStream.flush();

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncBasicClazzImportService.java

@@ -55,7 +55,7 @@ public class AsyncBasicClazzImportService extends AsyncImportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncCourseDataImportService.java

@@ -55,7 +55,7 @@ public class AsyncCourseDataImportService extends AsyncImportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncCreatePdfTempleteService.java

@@ -62,7 +62,7 @@ public class AsyncCreatePdfTempleteService extends AsyncCreateTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, map.get("size"), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
 //            TBTask dbTask = tbTaskService.getById(tbTask.getId());

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncDownloadPdfTempleteService.java

@@ -55,7 +55,7 @@ public class AsyncDownloadPdfTempleteService extends AsyncExportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, map.get("size"), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncExaminationExportTemplateService.java

@@ -52,9 +52,8 @@ public class AsyncExaminationExportTemplateService extends AsyncExportTaskTemple
             tbTask.setImportFileName(TaskTypeEnum.EXAMINATION_EXPORT.getTitle());
             tbTask.setResultFilePath(path);
             tbTask.setResult(TaskResultEnum.SUCCESS);
-
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncExaminationImportTemplateService.java

@@ -69,7 +69,7 @@ public class AsyncExaminationImportTemplateService extends AsyncImportTaskTemple
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncPaperReviewPdfExportService.java

@@ -50,7 +50,7 @@ public class AsyncPaperReviewPdfExportService extends AsyncExportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("count"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScoreBatchDownloadService.java

@@ -50,7 +50,7 @@ public class AsyncScoreBatchDownloadService extends AsyncExportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}{4}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("count"))), FINISH_SIZE, Objects.nonNull(result.get("error")) ? (String) result.get("error") : ""));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScoreExportService.java

@@ -48,7 +48,7 @@ public class AsyncScoreExportService extends AsyncExportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("count"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncScorePushService.java

@@ -50,7 +50,7 @@ public class AsyncScorePushService extends AsyncPushTaskTemplate {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}{4}{5}{6}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Integer.parseInt(String.valueOf(result.get("count"))), SUCCESS_TITLE, Integer.parseInt(String.valueOf(result.get("correct"))), FINISH_SIZE, Objects.nonNull(result.get("error")) ? (String) result.get("error") : ""));
             tbSyncTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbSyncTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncStatisticsDataImportService.java

@@ -53,7 +53,7 @@ public class AsyncStatisticsDataImportService extends AsyncImportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncStudentDataImportService.java

@@ -55,7 +55,7 @@ public class AsyncStudentDataImportService extends AsyncImportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncSysUserDataImportService.java

@@ -69,7 +69,7 @@ public class AsyncSysUserDataImportService extends AsyncImportTaskTemplete {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("dataCount"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncTaskReviewSampleExportService.java

@@ -47,7 +47,7 @@ public class AsyncTaskReviewSampleExportService extends AsyncExportTaskTemplete
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Long.valueOf(String.valueOf(result.get("count"))), FINISH_SIZE));
             tbTask.setResult(TaskResultEnum.SUCCESS);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/execute/AsyncUserPushService.java

@@ -55,7 +55,7 @@ public class AsyncUserPushService extends AsyncPushTaskTemplate {
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}{4}{5}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), FINISH_TITLE, Integer.parseInt(String.valueOf(result.get("count"))),SUCCESS_TITLE,Integer.parseInt(String.valueOf(result.get("correct"))), FINISH_SIZE));
             tbSyncTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_TITLE, EXCEPTION_DATA, e.getMessage()));
 //            tbTask.setResult(TaskResultEnum.ERROR);
             if (e instanceof ApiException) {

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/export/AsyncExportTaskTemplete.java

@@ -112,7 +112,7 @@ public abstract class AsyncExportTaskTemplete {
             String result = json.toJSONString();
             tbTask.setReportFilePath(json.toJSONString());
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             StringJoiner stringJoinerSummary = new StringJoiner("").add(tbTask.getSummary()).add("\n");
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_CREATE_TXT_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setSummary(stringJoinerSummary.toString());
@@ -132,7 +132,7 @@ public abstract class AsyncExportTaskTemplete {
                     out.close();
                 }
             } catch (IOException e) {
-                e.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, e);
             }
             tbTask.setStatus(TaskStatusEnum.FINISH);
             tbTaskService.updateById(tbTask);

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/importData/AsyncImportTaskTemplete.java

@@ -137,7 +137,7 @@ public abstract class AsyncImportTaskTemplete {
 
             tbTask.setReportFilePath(json.toJSONString());
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             StringJoiner stringJoinerSummary = new StringJoiner("").add(tbTask.getSummary()).add("\n");
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_CREATE_TXT_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbTask.setSummary(stringJoinerSummary.toString());
@@ -161,7 +161,7 @@ public abstract class AsyncImportTaskTemplete {
                     out.close();
                 }
             } catch (IOException e) {
-                e.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, e);
             }
             tbTask.setStatus(TaskStatusEnum.FINISH);
             if (tbTask.getType() == TaskTypeEnum.CREATE_PDF) {

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/push/AsyncPushTaskTemplate.java

@@ -111,7 +111,7 @@ public abstract class AsyncPushTaskTemplate {
 
             tbSyncTask.setReportFilePath(json.toJSONString());
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             StringJoiner stringJoinerSummary = new StringJoiner("").add(tbSyncTask.getSummary()).add("\n");
             stringJoinerSummary.add(MessageFormat.format("{0}{1}{2}{3}", DateUtil.format(new Date(), SystemConstant.DEFAULT_DATE_PATTERN), EXCEPTION_CREATE_TXT_TITLE, EXCEPTION_DATA, e.getMessage()));
             tbSyncTask.setSummary(stringJoinerSummary.toString());
@@ -131,7 +131,7 @@ public abstract class AsyncPushTaskTemplate {
                     out.close();
                 }
             } catch (IOException e) {
-                e.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, e);
             }
             tbSyncTask.setStatus(TaskStatusEnum.FINISH);
             tbSyncTaskService.updateById(tbSyncTask);

+ 0 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/PushLogicServiceImpl.java

@@ -136,7 +136,6 @@ public class PushLogicServiceImpl implements PushLogicService {
                                     tSyncExamStudentScoreList.add(new TSyncExamStudentScore(student));
                                 } catch (Exception e) {
                                     log.info("同步学生成绩信息失败:{}", e.getMessage());
-                                    e.printStackTrace();
                                     errorTSyncExamStudentScoreList.add(student.get("name") + "," + student.get("examNumber") + "\r\n");
                                 }
                             }

+ 5 - 7
distributed-print-business/src/main/java/com/qmth/distributed/print/business/templete/service/impl/TaskLogicServiceImpl.java

@@ -535,7 +535,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             //最后一步删除附件
 //            createPdfUtil.deleteAttachment(attachmentIds, ftlList);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             basicAttachmentService.batchDeleteAttachment(basicAttachmentList);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
@@ -863,7 +863,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                 map.computeIfAbsent(SystemConstant.SIZE, v -> attachmentIds.size());
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -1465,8 +1465,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
             TBTask tbTask = (TBTask) map.get(SystemConstant.TASK);
             tbTask.setResultFilePath(excelExportFilePath);
         } catch (Exception e) {
-            log.error("请求出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(fos)) {
                 fos.flush();
@@ -1539,7 +1538,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                             updateTSyncExamStudentScoreList.add(t);
                         }
                     } catch (Exception e) {
-                        e.printStackTrace();
+                        log.error(SystemConstant.LOG_ERROR, e);
                         errorTSyncExamStudentScoreList.add(t);
                     }
                 }
@@ -1571,8 +1570,7 @@ public class TaskLogicServiceImpl implements TaskLogicService {
                 map.computeIfAbsent("error", v -> "其中未下载成功数据" + finalErrorTSyncExamStudentScoreList.size() + "条:" + stringJoiner.toString());
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(zipFile)) {
                 zipFile.delete();

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/CreatePdfUtil.java

@@ -589,7 +589,7 @@ public class CreatePdfUtil {
                     }
                     break;
                 } catch (Exception e) {
-                    log.error("请求出错", e);
+                    log.error(SystemConstant.LOG_ERROR, e);
                 } finally {
                     redisUtil.releaseLock(key);
                 }
@@ -597,7 +597,7 @@ public class CreatePdfUtil {
                 try {
                     Thread.sleep(500);
                 } catch (InterruptedException e) {
-                    e.printStackTrace();
+                    log.error(SystemConstant.LOG_ERROR, e);
                 }
             }
         }

+ 1 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/FreemarkerUtil.java

@@ -134,7 +134,7 @@ public class FreemarkerUtil {
             }
 //            htmlFile.delete();
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(out)) {
                 out.close();

+ 6 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/GoogleBarCodeUtil.java

@@ -6,7 +6,10 @@ import com.google.zxing.WriterException;
 import com.google.zxing.client.j2se.MatrixToImageWriter;
 import com.google.zxing.common.BitMatrix;
 import com.google.zxing.oned.Code128Writer;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.Base64Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.imageio.ImageIO;
 import java.awt.*;
@@ -25,6 +28,8 @@ import java.util.Objects;
  * @Date: 2020/4/27
  */
 public class GoogleBarCodeUtil {
+    private final static Logger log = LoggerFactory.getLogger(GoogleBarCodeUtil.class);
+
     /**
      * 条形码宽度
      */
@@ -65,7 +70,7 @@ public class GoogleBarCodeUtil {
             BitMatrix bitMatrix = writer.encode(vaNumber, BarcodeFormat.CODE_128, WIDTH, HEIGHT, hints);
             return MatrixToImageWriter.toBufferedImage(bitMatrix);
         } catch (WriterException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return null;
     }
@@ -150,7 +155,6 @@ public class GoogleBarCodeUtil {
 //            }
 //            br.close();
 //        } catch (Exception e) {
-//            e.printStackTrace();
 //        }
 //        String s = result.toString();
 //        s = s.replaceAll("\\$\\{examNumber\\}", createBarCode("202007080001", true));

+ 2 - 1
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/HtmlToPdfUtil.java

@@ -2,6 +2,7 @@ package com.qmth.distributed.print.business.util;
 
 import com.qmth.teachcloud.common.config.DictionaryConfig;
 import com.qmth.teachcloud.common.contant.SpringContextHolder;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.PageSizeEnum;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,7 +64,7 @@ public class HtmlToPdfUtil {
             Process proc = Runtime.getRuntime().exec(cmd.toString());
             proc.waitFor();
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             result = false;
         }
         log.info("proc result:{}", result);

+ 14 - 13
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java

@@ -74,7 +74,7 @@ public class PdfUtil {
                 }
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(document)) {
                 document.close();
@@ -112,7 +112,7 @@ public class PdfUtil {
                 }
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(reader)) {
                 reader.close();
@@ -140,7 +140,7 @@ public class PdfUtil {
                 return reader.getNumberOfPages();
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(reader)) {
                 reader.close();
@@ -163,22 +163,22 @@ public class PdfUtil {
         PdfReader reader = new PdfReader(ByteArray.fromFile(file).value());
         int totalPages = reader.getNumberOfPages();
         PageSizeEnum pageSizeEnum = null;
-        for (int i = 1;i <= totalPages;i ++){
+        for (int i = 1; i <= totalPages; i++) {
             Rectangle pageSize = reader.getPageSize(i);
             float width = pageSize.getWidth();
             float height = pageSize.getHeight();
-            if (width <= height){
+            if (width <= height) {
                 min = width;
                 max = height;
-            }else {
+            } else {
                 min = height;
                 max = width;
             }
-            if (pageSizeEnum != null){
-                if (!pageSizeEnum.equals(PageSizeEnum.convertToEnum(min, max))){
+            if (pageSizeEnum != null) {
+                if (!pageSizeEnum.equals(PageSizeEnum.convertToEnum(min, max))) {
                     throw ExceptionResultEnum.ERROR.exception("上传的试卷pdf中存在纸张格式不一样的");
                 }
-            }else {
+            } else {
                 pageSizeEnum = PageSizeEnum.convertToEnum(min, max);
             }
         }
@@ -199,9 +199,10 @@ public class PdfUtil {
 
     /**
      * 两页打印到一页(A4 -> A3)
+     *
      * @param streamOfPDFFile 原卷
-     * @param outputStream 输出的试卷
-     * @param paginate 是否生成A3 每页页码
+     * @param outputStream    输出的试卷
+     * @param paginate        是否生成A3 每页页码
      */
     public static void concatPDFs(InputStream streamOfPDFFile, OutputStream outputStream, boolean paginate) {
 
@@ -257,7 +258,7 @@ public class PdfUtil {
             document.close();
             outputStream.close();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (document.isOpen())
                 document.close();
@@ -265,7 +266,7 @@ public class PdfUtil {
                 if (outputStream != null)
                     outputStream.close();
             } catch (IOException ioe) {
-                ioe.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, ioe);
             }
         }
     }

+ 2 - 2
distributed-print/src/main/java/com/qmth/distributed/print/api/SysController.java

@@ -269,7 +269,7 @@ public class SysController {
                 throw ExceptionResultEnum.ATTACHMENT_ERROR.exception();
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(basicAttachment)) {
                 basicAttachmentService.deleteAttachment(basicAttachment);
             }
@@ -337,7 +337,7 @@ public class SysController {
             resultMap.put("original",original);
             resultMap.put("translate",translate);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(basicOriginalAttachment)) {
                 basicAttachmentService.deleteAttachment(basicOriginalAttachment);
             }

+ 1 - 1
distributed-print/src/main/java/com/qmth/distributed/print/api/TFFlowController.java

@@ -114,7 +114,7 @@ public class TFFlowController {
             TFFlow tfFlow = new TFFlow(SystemConstant.getHeadOrUserSchoolId(), sysUser.getOrgId(), name, sysUser.getId(), fileName, actFlowId);
             tfFlowService.save(tfFlow);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(basicAttachment)) {
                 basicAttachmentService.deleteAttachment(basicAttachment);
             }

+ 2 - 1
distributed-print/src/main/java/com/qmth/distributed/print/aspect/ApiControllerAspect.java

@@ -1,6 +1,7 @@
 package com.qmth.distributed.print.aspect;
 
 import com.qmth.boot.api.exception.ApiException;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
@@ -79,7 +80,7 @@ public class ApiControllerAspect {
             log.info("============耗时============:{}秒", (end - start) / 1000);
             return proceed;
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 return ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 2 - 1
distributed-print/src/main/java/com/qmth/distributed/print/config/MapApiReader.java

@@ -4,6 +4,7 @@ import com.fasterxml.classmate.TypeResolver;
 import com.google.common.base.Optional;
 import com.qmth.teachcloud.common.annotation.ApiJsonObject;
 import com.qmth.teachcloud.common.annotation.ApiJsonProperty;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.apache.ibatis.javassist.*;
 import org.apache.ibatis.javassist.bytecode.AnnotationsAttribute;
 import org.apache.ibatis.javassist.bytecode.ConstPool;
@@ -70,7 +71,7 @@ public class MapApiReader implements ParameterBuilderPlugin {
             }
             return ctClass.toClass();
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             return null;
         }
     }

+ 2 - 0
teachcloud-common/src/main/java/com/qmth/teachcloud/common/contant/SystemConstant.java

@@ -235,6 +235,8 @@ public class SystemConstant {
     public static final String TASK_MACHINE_ID = "task_machine_id:";//任务机器id
     public static final String TASK_MACHINE_ID_LIKE = "task_machine_id*";//任务机器like
 
+    public static final String LOG_ERROR = "请求出错:";
+
     /**
      * 初始化附件文件路径
      */

+ 3 - 3
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/BasicAttachmentServiceImpl.java

@@ -78,7 +78,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
             FileCopyUtils.copy(bytes, file);
             //计算html文件md5
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return file;
     }
@@ -109,7 +109,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
             basicAttachment = new BasicAttachment(jsonPdf.toJSONString(), localPdfFile.getName(), SystemConstant.PDF_PREFIX, new BigDecimal(localPdfFile.length()), DigestUtils.md5Hex(new FileInputStream(localPdfFile)), userId);
             save(basicAttachment);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             deleteAttachment(basicAttachment);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
@@ -218,7 +218,7 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
             basicAttachment = new BasicAttachment(jsonObject.toJSONString(), fileName, format, b, fileMd5, requestUser.getId(), null);
             save(basicAttachment);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             deleteAttachment(basicAttachment);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/SysUserServiceImpl.java

@@ -566,7 +566,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 //                basicUserCourseService.saveBatch(sysUser);
 //            }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             isSuccess = false;
             if (e instanceof DuplicateKeyException) {
                 String errorColumn = e.getCause().toString();
@@ -671,7 +671,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
 //                basicUserCourseService.saveBatch(sysUser);
 //            }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             isSuccess = false;
             if (e instanceof DuplicateKeyException) {
                 String errorColumn = e.getCause().toString();

+ 4 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TBTaskServiceImpl.java

@@ -102,7 +102,7 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
             tbTask.setPrintPlanId(printPlanId);
             this.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -132,7 +132,7 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
             tbTask.setPrintPlanId(printPlanId);
             this.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -160,7 +160,7 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
             }
             this.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {
@@ -177,7 +177,7 @@ public class TBTaskServiceImpl extends ServiceImpl<TBTaskMapper, TBTask> impleme
             TBTask tbTask = saveTaskCommon(null, taskTypeEnum, map, null);
             this.save(tbTask);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 4 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/service/impl/TeachcloudCommonServiceImpl.java

@@ -297,7 +297,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
                 }
             }
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.ERROR.exception("添加用户鉴权缓存失败");
         }
         return authBean;
@@ -644,7 +644,7 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             } catch (IOException e) {
                 throw ExceptionResultEnum.ERROR.exception("文件读取异常");
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, e);
             }
             return sb.toString();
         }
@@ -960,9 +960,9 @@ public class TeachcloudCommonServiceImpl implements TeachcloudCommonService {
             br.close();
             outStream.close();
         } catch (FileNotFoundException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/sync/StmmsUtils.java

@@ -113,7 +113,7 @@ public class StmmsUtils {
                 return false;
             }
         } catch (Exception e) {
-            log.error(e.getMessage());
+            log.error(SystemConstant.LOG_ERROR, e);
             return false;
         }
     }

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/AesUtil.java

@@ -121,7 +121,7 @@ public class AesUtil {
             byte[] result = cipher.doFinal(content.getBytes(SystemConstant.CHARSET_NAME));
             encoderText = Base64.getEncoder().encodeToString(result);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return encoderText;
     }
@@ -142,7 +142,7 @@ public class AesUtil {
             cipher.init(Cipher.DECRYPT_MODE, keySpec, paramSpec);
             decoderText = new String(cipher.doFinal(Base64.getDecoder().decode(content)), SystemConstant.CHARSET_NAME);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return decoderText;
     }

+ 5 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ConvertUtil.java

@@ -5,6 +5,8 @@ import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.support.atomic.RedisAtomicLong;
 import org.springframework.stereotype.Component;
@@ -24,6 +26,7 @@ import java.util.*;
 
 @Component
 public class ConvertUtil {
+    private final static Logger log = LoggerFactory.getLogger(ConvertUtil.class);
 
     @Resource
     RedisTemplate<String, Object> redisTemplate;
@@ -225,7 +228,7 @@ public class ConvertUtil {
             File myFilePath = new File(filePath);
             myFilePath.delete(); //删除空文件夹
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -321,7 +324,7 @@ public class ConvertUtil {
             inputStream.close();
             outStream.close();
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ExcelUtil.java

@@ -222,7 +222,7 @@ public class ExcelUtil {
             log.info("读取excel里的数据结束,============耗时============:{}秒", (end - start) / 1000);
             return callback.callback(finalOList, finalColumnNameList, finalExcelErrorList);
         } catch (Exception e) {
-            log.error("excel读取报错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof IllegalArgumentException) {
                 String errorColumn = e.getMessage();
                 if (errorColumn.indexOf("Can not set java.lang.String field") != -1 && errorColumn.indexOf("to java.lang.Long") != -1) {

+ 6 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/FileUtil.java

@@ -3,6 +3,8 @@ package com.qmth.teachcloud.common.util;
 import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import org.apache.tomcat.util.http.fileupload.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.crypto.Cipher;
@@ -22,6 +24,8 @@ import java.util.zip.ZipFile;
 import java.util.zip.ZipOutputStream;
 
 public class FileUtil {
+    private final static Logger log = LoggerFactory.getLogger(FileUtil.class);
+
     /**
      * 将网络文件保存到本地
      *
@@ -494,7 +498,7 @@ public class FileUtil {
             }
             data = baos.toByteArray();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(fis)) {
                 fis.close();
@@ -534,7 +538,7 @@ public class FileUtil {
             os.close();
             ins.close();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 9 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpKit.java

@@ -1,7 +1,10 @@
 package com.qmth.teachcloud.common.util;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
 import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.*;
 import java.net.HttpURLConnection;
@@ -10,6 +13,7 @@ import java.util.Date;
 import java.util.Map;
 
 public class HttpKit {
+    private final static Logger log = LoggerFactory.getLogger(HttpKit.class);
 
     /**
      * 向指定 URL 发送POST方法的请求
@@ -69,7 +73,7 @@ public class HttpKit {
                 result.append(line);
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         //使用finally块来关闭输出流、输入流
         finally {
@@ -81,7 +85,7 @@ public class HttpKit {
                     in.close();
                 }
             } catch (IOException ex) {
-                ex.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, ex);
             }
         }
         return result.toString();
@@ -136,7 +140,7 @@ public class HttpKit {
                 result.append(line);
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         //使用finally块来关闭输出流、输入流
         finally {
@@ -148,7 +152,7 @@ public class HttpKit {
                     in.close();
                 }
             } catch (IOException ex) {
-                ex.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, ex);
             }
         }
         return result.toString();
@@ -258,7 +262,7 @@ public class HttpKit {
                     reader.close();
                 }
             } catch (IOException ex) {
-                ex.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, ex);
             }
         }
         return result;

+ 5 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/HttpUtil.java

@@ -87,7 +87,7 @@ public class HttpUtil {
         try {
             entity = new UrlEncodedFormEntity(pairs, SystemConstant.CHARSET_NAME);
         } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         post.setEntity(entity);
         // 执行请求,获取响应
@@ -109,7 +109,7 @@ public class HttpUtil {
             ou = new ByteArrayOutputStream();
             IOUtils.copy(in, ou);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(in)) {
                 in.close();
@@ -133,7 +133,7 @@ public class HttpUtil {
         try {
             response = HttpClients.createDefault().execute(request);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         if (response == null) {
             return null;
@@ -146,7 +146,7 @@ public class HttpUtil {
             try {
                 in = entity.getContent();
             } catch (Exception e) {
-                e.printStackTrace();
+                log.error(SystemConstant.LOG_ERROR, e);
             }
         }
         return in;
@@ -178,7 +178,7 @@ public class HttpUtil {
             }
             FileUtils.copyInputStreamToFile(is, file);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(is)) {
                 is.close();

+ 2 - 2
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ImageTrajectoryUtil.java

@@ -2,6 +2,7 @@ package com.qmth.teachcloud.common.util;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -60,8 +61,7 @@ public class ImageTrajectoryUtil {
             output = new FileOutputStream(targetFile);
             ImageIO.write(image, "jpg", output);
         } catch (Exception e) {
-            log.error("请求出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         } finally {
             if (Objects.nonNull(output)) {
                 output.flush();

+ 5 - 4
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/JacksonUtil.java

@@ -3,6 +3,7 @@ package com.qmth.teachcloud.common.util;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JavaType;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,7 +48,7 @@ public class JacksonUtil {
         try {
             return objectMapper.writeValueAsString(o);
         } catch (JsonProcessingException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return null;
     }
@@ -64,7 +65,7 @@ public class JacksonUtil {
         try {
             return objectMapper.readValue(o, valueType);
         } catch (JsonProcessingException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return null;
     }
@@ -82,7 +83,7 @@ public class JacksonUtil {
             JavaType javaType = objectMapper.getTypeFactory().constructCollectionType(List.class, cla);
             return objectMapper.readValue(o, javaType);
         } catch (JsonProcessingException e) {
-            log.error("请求报错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return null;
     }
@@ -100,7 +101,7 @@ public class JacksonUtil {
             JavaType javaType = objectMapper.getTypeFactory().constructCollectionType(Set.class, cla);
             return objectMapper.readValue(o, javaType);
         } catch (JsonProcessingException e) {
-            log.error("请求报错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return null;
     }

+ 5 - 5
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/ServletUtil.java

@@ -51,7 +51,7 @@ public class ServletUtil {
             HttpServletRequest request = getRequest();
             return Objects.isNull(request.getHeader(SystemConstant.TOKEN)) ? request.getParameter(SystemConstant.TOKEN) : request.getHeader(SystemConstant.TOKEN);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.TOKEN_INVALID.exception();
         }
     }
@@ -67,7 +67,7 @@ public class ServletUtil {
             String value = Objects.isNull(request.getHeader(SystemConstant.HEADER_PLATFORM)) ? request.getParameter(SystemConstant.HEADER_PLATFORM) : request.getHeader(SystemConstant.HEADER_PLATFORM);
             return Platform.valueOf(value);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.PLATFORM_INVALID.exception();
         }
     }
@@ -82,7 +82,7 @@ public class ServletUtil {
             HttpServletRequest request = getRequest();
             return Objects.isNull(request.getHeader(SystemConstant.HEADER_DEVICE_ID)) ? request.getParameter(SystemConstant.HEADER_DEVICE_ID) : request.getHeader(SystemConstant.HEADER_DEVICE_ID);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.DEVICE_ID_INVALID.exception();
         }
     }
@@ -97,7 +97,7 @@ public class ServletUtil {
             HttpServletRequest request = getRequest();
             return Objects.isNull(request.getHeader(SystemConstant.HEADER_AUTHORIZATION)) ? request.getParameter(SystemConstant.HEADER_AUTHORIZATION) : request.getHeader(SystemConstant.HEADER_AUTHORIZATION);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.AUTHORIZATION_INVALID.exception();
         }
     }
@@ -113,7 +113,7 @@ public class ServletUtil {
             String time = Objects.isNull(request.getHeader(SystemConstant.HEADER_TIME)) ? request.getParameter(SystemConstant.HEADER_TIME) : request.getHeader(SystemConstant.HEADER_TIME);
             return Objects.nonNull(time) ? Long.parseLong(time) : null;
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             throw ExceptionResultEnum.TIME_INVALID.exception();
         }
     }

+ 1 - 1
teachcloud-report-business/src/main/java/com/qmth/teachcloud/report/business/templete/execute/AsyncDataCalculateTempleteService.java

@@ -62,7 +62,7 @@ public class AsyncDataCalculateTempleteService extends AsyncCalculateTaskTemplet
             tbExamCourse.setPublishStatus(PublishStatusEnum.UN_PUBLISH);
             tbTask.setResult(TaskResultEnum.SUCCESS);
         }catch (Exception e){
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             exception = e.getMessage();
             tbTask.setRemark(exception);
             tbTask.setResult(TaskResultEnum.ERROR);

+ 2 - 1
teachcloud-report/src/main/java/com/qmth/teachcloud/report/aspect/ApiControllerAspect.java

@@ -1,6 +1,7 @@
 package com.qmth.teachcloud.report.aspect;
 
 import com.qmth.boot.api.exception.ApiException;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.common.util.JacksonUtil;
 import com.qmth.teachcloud.common.util.ResultUtil;
 import com.qmth.teachcloud.common.util.ServletUtil;
@@ -79,7 +80,7 @@ public class ApiControllerAspect {
             log.info("============耗时============:{}秒", (end - start) / 1000);
             return proceed;
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             if (e instanceof ApiException) {
                 return ResultUtil.error((ApiException) e, e.getMessage());
             } else {

+ 2 - 1
teachcloud-report/src/main/java/com/qmth/teachcloud/report/config/MapApiReader.java

@@ -4,6 +4,7 @@ import com.fasterxml.classmate.TypeResolver;
 import com.google.common.base.Optional;
 import com.qmth.teachcloud.common.annotation.ApiJsonObject;
 import com.qmth.teachcloud.common.annotation.ApiJsonProperty;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import org.apache.ibatis.javassist.*;
 import org.apache.ibatis.javassist.bytecode.AnnotationsAttribute;
 import org.apache.ibatis.javassist.bytecode.ConstPool;
@@ -70,7 +71,7 @@ public class MapApiReader implements ParameterBuilderPlugin {
             }
             return ctClass.toClass();
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
             return null;
         }
     }

+ 1 - 2
teachcloud-task/src/main/java/com/qmth/teachcloud/task/config/RedisMessageListener.java

@@ -108,8 +108,7 @@ public class RedisMessageListener implements MessageListener {
                 }
             }
         } catch (Exception e) {
-            log.error("redis mq消息监听,消息消费出错", e);
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
             if (Objects.nonNull(mqDto)) {//存入库
                 Gson gson = new Gson();
                 mqDto.setAck(SystemConstant.POSION_ACK_TYPE);

+ 4 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/RedisMqSyncJob.java

@@ -4,6 +4,8 @@ import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -17,6 +19,7 @@ import java.io.IOException;
  * @Date: 2021/7/9
  */
 public class RedisMqSyncJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(RedisMqSyncJob.class);
 
     @Resource
     JobService jobService;
@@ -26,7 +29,7 @@ public class RedisMqSyncJob extends QuartzJobBean {
         try {
             jobService.assembleJob(SystemConstant.MQ_TOPIC_BUFFER_LIST);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 5 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/ResendSmsJob.java

@@ -1,8 +1,11 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -11,6 +14,7 @@ import javax.annotation.Resource;
  * @Description: 定时重发失败短信
  */
 public class ResendSmsJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(ResendSmsJob.class);
 
     @Resource
     JobService jobService;
@@ -20,7 +24,7 @@ public class ResendSmsJob extends QuartzJobBean {
         try {
             jobService.resendSmsTask();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 5 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/ResetCreatePdfJob.java

@@ -1,8 +1,11 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -16,6 +19,7 @@ import java.io.IOException;
  * @Date: 2021/5/6
  */
 public class ResetCreatePdfJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(ResetCreatePdfJob.class);
 
     @Resource
     JobService jobService;
@@ -25,7 +29,7 @@ public class ResetCreatePdfJob extends QuartzJobBean {
         try {
             jobService.resetCreatePdfTask();
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 5 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SendSmsExpireJob.java

@@ -1,8 +1,11 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -11,6 +14,7 @@ import javax.annotation.Resource;
  * @Description: 发送即将到期数据短信提醒(每天15点)
  */
 public class SendSmsExpireJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(SendSmsExpireJob.class);
 
     @Resource
     JobService jobService;
@@ -20,7 +24,7 @@ public class SendSmsExpireJob extends QuartzJobBean {
         try {
             jobService.sendSmsExpireTask();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 6 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/SendSmsOverdueJob.java

@@ -1,8 +1,12 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.distributed.print.business.service.impl.ActivitiServiceImpl;
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -11,6 +15,7 @@ import javax.annotation.Resource;
  * @Description: 发送已逾期数据(每天9点)
  */
 public class SendSmsOverdueJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(SendSmsOverdueJob.class);
 
     @Resource
     JobService jobService;
@@ -20,7 +25,7 @@ public class SendSmsOverdueJob extends QuartzJobBean {
         try {
             jobService.sendSmsOverdueTask();
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 5 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncSchoolJob.java

@@ -1,8 +1,11 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -14,6 +17,7 @@ import java.io.IOException;
  * @Date: 2021-04-19
  */
 public class TimedSyncSchoolJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(TimedSyncSchoolJob.class);
 
     @Resource
     JobService jobService;
@@ -25,7 +29,7 @@ public class TimedSyncSchoolJob extends QuartzJobBean {
             jobService.updatePrintPlan();
 //            jobService.syncData();
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 6 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncUserNeedPushAgainJob.java

@@ -1,7 +1,10 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -12,6 +15,8 @@ import javax.annotation.Resource;
  * @Date: 2021-11-05
  */
 public class TimedSyncUserNeedPushAgainJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(TimedSyncUserNeedPushAgainJob.class);
+
     @Resource
     JobService jobService;
 
@@ -20,7 +25,7 @@ public class TimedSyncUserNeedPushAgainJob extends QuartzJobBean {
         try {
             jobService.needPushAgain();
         } catch (IllegalAccessException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 6 - 1
teachcloud-task/src/main/java/com/qmth/teachcloud/task/job/TimedSyncUserPushErrorJob.java

@@ -1,7 +1,10 @@
 package com.qmth.teachcloud.task.job;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.job.service.JobService;
 import org.quartz.JobExecutionContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.scheduling.quartz.QuartzJobBean;
 
 import javax.annotation.Resource;
@@ -12,6 +15,8 @@ import javax.annotation.Resource;
  * @Date: 2021-11-05
  */
 public class TimedSyncUserPushErrorJob extends QuartzJobBean {
+    private final static Logger log = LoggerFactory.getLogger(TimedSyncUserPushErrorJob.class);
+
     @Resource
     JobService jobService;
 
@@ -20,7 +25,7 @@ public class TimedSyncUserPushErrorJob extends QuartzJobBean {
         try {
             jobService.autoPushUserErrorData();
         } catch (IllegalAccessException e) {
-            e.printStackTrace();
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 }

+ 10 - 9
teachcloud-task/src/main/java/com/qmth/teachcloud/task/service/impl/QuartzServiceImpl.java

@@ -1,5 +1,6 @@
 package com.qmth.teachcloud.task.service.impl;
 
+import com.qmth.teachcloud.common.contant.SystemConstant;
 import com.qmth.teachcloud.task.service.QuartzService;
 import org.quartz.*;
 import org.quartz.impl.matchers.GroupMatcher;
@@ -60,7 +61,7 @@ public class QuartzServiceImpl implements QuartzService {
             }
             scheduler.scheduleJob(jobDetail, trigger);
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -94,7 +95,7 @@ public class QuartzServiceImpl implements QuartzService {
             // 把作业和触发器注册到任务调度中
             scheduler.scheduleJob(jobDetail, trigger);
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -115,7 +116,7 @@ public class QuartzServiceImpl implements QuartzService {
             // 重启触发器
             scheduler.rescheduleJob(triggerKey, trigger);
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -130,7 +131,7 @@ public class QuartzServiceImpl implements QuartzService {
         try {
             scheduler.deleteJob(new JobKey(jobName, jobGroupName));
         } catch (Exception e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -146,7 +147,7 @@ public class QuartzServiceImpl implements QuartzService {
             JobKey jobKey = JobKey.jobKey(jobName, jobGroupName);
             scheduler.pauseJob(jobKey);
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -162,7 +163,7 @@ public class QuartzServiceImpl implements QuartzService {
             JobKey jobKey = JobKey.jobKey(jobName, jobGroupName);
             scheduler.resumeJob(jobKey);
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -178,7 +179,7 @@ public class QuartzServiceImpl implements QuartzService {
             JobKey jobKey = JobKey.jobKey(jobName, jobGroupName);
             scheduler.triggerJob(jobKey);
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
     }
 
@@ -212,7 +213,7 @@ public class QuartzServiceImpl implements QuartzService {
                 }
             }
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return jobList;
     }
@@ -246,7 +247,7 @@ public class QuartzServiceImpl implements QuartzService {
                 jobList.add(map);
             }
         } catch (SchedulerException e) {
-            log.error("请求出错", e);
+            log.error(SystemConstant.LOG_ERROR, e);
         }
         return jobList;
     }