| | |
| | | private boolean isRun = false; |
| | | |
| | | public ExportDataExecutor(boolean isRun) { |
| | | this.userDownloadFileV1InnerServiceSMOImpl = ApplicationContextFactory.getBean("userDownloadFileV1InnerServiceSMOImpl", IUserDownloadFileV1InnerServiceSMO.class); |
| | | this.fileUploadTemplate = ApplicationContextFactory.getBean("fileUploadTemplate", FileUploadTemplate.class); |
| | | |
| | | this.isRun = isRun; |
| | | } |
| | | |
| | |
| | | log.debug("导出数据线程开始处理"); |
| | | try { |
| | | doExportData(); |
| | | } catch (Exception e) { |
| | | } catch (Throwable e) { |
| | | log.error("处理消息异常", e); |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | private void doExportData() throws Exception { |
| | | |
| | | ExportDataDto exportDataDto = ExportDataQueue.getData(); |
| | | |
| | | this.userDownloadFileV1InnerServiceSMOImpl = ApplicationContextFactory.getBean("userDownloadFileV1InnerServiceSMOImpl", IUserDownloadFileV1InnerServiceSMO.class); |
| | | this.fileUploadTemplate = ApplicationContextFactory.getBean("fileUploadTemplate", FileUploadTemplate.class); |
| | | |
| | | ByteArrayInputStream inputStream = null; |
| | | ByteArrayOutputStream os = null; |
| | |
| | | |
| | | updateUserDownloadFile(exportDataDto, UserDownloadFileDto.STATE_FINISH,fileName, "下载完成"); |
| | | |
| | | } catch (Exception e) { |
| | | } catch (Throwable e) { |
| | | e.printStackTrace(); |
| | | updateUserDownloadFile(exportDataDto, UserDownloadFileDto.STATE_FAIL, "","下载失败" + ExceptionUtil.getStackTrace(e)); |
| | | } finally { |
| | | try { |