|
|
@@ -53,6 +53,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.NumberFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@@ -330,11 +331,13 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
String fileName = orgName + "_" + ExportPdfType.EDUCATION_TRAINING.getText() + "_" + DateUtil.format(new Date(), "yyyyMMddHHmmss") + ".pdf";
|
|
|
Map<String, Object> data = this.getFtlEdu(task);
|
|
|
data.put("fileName", fileName);
|
|
|
-
|
|
|
- R<String> r = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.generateEduTrainingPdf(data), ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
- if (ObjectUtil.hasEmpty(r, r.getData())) {
|
|
|
- throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
- }
|
|
|
+ data.put("id", id);
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ R<String> r = RemoteCallHandlerExecutor.executeRemoteCall(() -> fileService.generateEduTrainingPdf(data), ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
+ if (ObjectUtil.hasEmpty(r, r.getData())) {
|
|
|
+ throw new SystemException(ErrorMsgConstants.GENERATE_PDF_ERROR);
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
/* //新方式生成pdf
|
|
|
try {
|
|
|
@@ -353,7 +356,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}*/
|
|
|
- return r.getData();
|
|
|
+ return null;
|
|
|
}
|
|
|
|
|
|
private Map<String, Object> getFtlEdu(CoreEduTrainingTaskDetailVo task) {
|