|
|
@@ -2277,23 +2277,6 @@ public class BoilerTaskOrderServiceImpl extends ServiceImpl<BoilerTaskOrderMappe
|
|
|
userDO.setReportId(item.getId());
|
|
|
taskOrderItemReportUserMapper.insert(userDO);
|
|
|
|
|
|
- commonThread.runWithOutResult(() -> {
|
|
|
- try {
|
|
|
- byte[] bytes = pdfService.pdfByRefId(reportDO.getTemplateId(), reportDO.getId());
|
|
|
- bytes = PdfMergeUtils.buildInspectionPlanPdf(bytes, reportDO.getManualUrl(), fileApi);
|
|
|
-
|
|
|
- String fileUrl = fileApi.createFile(bytes);
|
|
|
- BoilerTaskOrderItemReportDO updateItemReportDO = new BoilerTaskOrderItemReportDO().setId(item.getId()).setIssueUrl(fileUrl);
|
|
|
- taskOrderItemReportMapper.updateById(updateItemReportDO);
|
|
|
-
|
|
|
- BoilerTaskOrderReportDO updateReportDO = new BoilerTaskOrderReportDO().setId(id).setIssueUrl(fileUrl);
|
|
|
- taskOrderReportMapper.updateById(updateReportDO);
|
|
|
-
|
|
|
- } catch (Exception e) {
|
|
|
- log.error("----生成PDF失败:{},{}----", reportDO.getId(), e.getMessage());
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
});
|
|
|
// itemReportDO.setReportNo(reportNo);
|
|
|
}
|
|
|
@@ -2323,6 +2306,27 @@ public class BoilerTaskOrderServiceImpl extends ServiceImpl<BoilerTaskOrderMappe
|
|
|
dynamicTbInsService.createInstantiateWithRule(ruleVO);
|
|
|
}
|
|
|
|
|
|
+ commonThread.runWithOutResult(() -> {
|
|
|
+ try {
|
|
|
+ byte[] bytes = pdfService.pdfByRefId(reportDO.getTemplateId(), reportDO.getId());
|
|
|
+ bytes = PdfMergeUtils.buildInspectionPlanPdf(bytes, reportDO.getManualUrl(), fileApi);
|
|
|
+
|
|
|
+ String fileUrl = fileApi.createFile(bytes);
|
|
|
+
|
|
|
+ List<String> orderItemIds = List.of(itemReportDO.getOrderItemIdsStr().split(","));
|
|
|
+ for (String orderItemId : orderItemIds) {
|
|
|
+ BoilerTaskOrderItemReportDO updateItemReportDO = new BoilerTaskOrderItemReportDO().setId(orderItemId).setIssueUrl(fileUrl);
|
|
|
+ taskOrderItemReportMapper.updateById(updateItemReportDO);
|
|
|
+ }
|
|
|
+
|
|
|
+ BoilerTaskOrderReportDO updateReportDO = new BoilerTaskOrderReportDO().setId(id).setIssueUrl(fileUrl);
|
|
|
+ taskOrderReportMapper.updateById(updateReportDO);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("----生成PDF失败:{},{}----", reportDO.getId(), e.getMessage());
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|