ready
This commit is contained in:
@@ -171,21 +171,22 @@ public class ReportGenerationService {
|
|||||||
persistReport(req, rb);
|
persistReport(req, rb);
|
||||||
|
|
||||||
// Отправляем PDF на email, если указан email и формат PDF
|
// Отправляем PDF на email, если указан email и формат PDF
|
||||||
if (req.getRecipientEmail() != null && !req.getRecipientEmail().trim().isEmpty()
|
// if (req.getRecipientEmail() != null &&
|
||||||
&& "PDF".equalsIgnoreCase(req.getFormat())) {
|
// !req.getRecipientEmail().trim().isEmpty()
|
||||||
try {
|
// && "PDF".equalsIgnoreCase(req.getFormat())) {
|
||||||
emailService.sendReportByEmail(
|
// try {
|
||||||
req.getRecipientEmail(),
|
// emailService.sendReportByEmail(
|
||||||
req.getReportTitle(),
|
// req.getRecipientEmail(),
|
||||||
req.getAuthorName(),
|
// req.getReportTitle(),
|
||||||
req.getCompanyName(),
|
// req.getAuthorName(),
|
||||||
rb.getBytes(),
|
// req.getCompanyName(),
|
||||||
rb.getFilename());
|
// rb.getBytes(),
|
||||||
} catch (Exception e) {
|
// rb.getFilename());
|
||||||
System.err.println("Ошибка при отправке email: " + e.getMessage());
|
// } catch (Exception e) {
|
||||||
// Не прерываем выполнение, если email не отправился
|
// System.err.println("Ошибка при отправке email: " + e.getMessage());
|
||||||
}
|
// // Не прерываем выполнение, если email не отправился
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
return rb;
|
return rb;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user