暂存
This commit is contained in:
+10
@@ -16,8 +16,18 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
public class AdjudicationController extends BaseController {
|
public class AdjudicationController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IAdjudicationService adjudicationService;
|
private IAdjudicationService adjudicationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成裁决书
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("/document")
|
@PostMapping("/document")
|
||||||
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
|
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
|
||||||
return adjudicationService.createDocument(caseApplication);
|
return adjudicationService.createDocument(caseApplication);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/")
|
||||||
|
public AjaxResult sendDocumentByEmail(){
|
||||||
|
return adjudicationService.sendDocumentByEmail();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import com.sun.xml.internal.messaging.saaj.packaging.mime.MessagingException;
|
||||||
|
import org.springframework.core.io.FileSystemResource;
|
||||||
|
import org.springframework.mail.javamail.MimeMessageHelper;
|
||||||
|
//
|
||||||
|
//import java.io.File;
|
||||||
|
//import java.util.List;
|
||||||
|
//
|
||||||
|
//public class SendMailUtils {
|
||||||
|
// /**
|
||||||
|
// * 发送带附件的邮件
|
||||||
|
// *
|
||||||
|
// * @param to 收件人
|
||||||
|
// * @param subject 主题
|
||||||
|
// * @param content 内容
|
||||||
|
// * @param fileList 附件
|
||||||
|
// */
|
||||||
|
// public void sendFileMail(String to, String subject, String content, List<File> fileList) {
|
||||||
|
// MimeMessage message = mailSender.createMimeMessage();
|
||||||
|
// try {
|
||||||
|
// //true表示需要创建一个multipart message
|
||||||
|
// MimeMessageHelper helper = new MimeMessageHelper(message, true);
|
||||||
|
// helper.setFrom(SENDER);
|
||||||
|
// helper.setTo(to);
|
||||||
|
// helper.setSubject(subject);
|
||||||
|
// helper.setText(content, true);
|
||||||
|
//
|
||||||
|
// if (fileList != null && fileList.size() > 0) {
|
||||||
|
// for (File file : fileList) {
|
||||||
|
// FileSystemResource fileSystemResource = new FileSystemResource(file);
|
||||||
|
// String fileName = fileSystemResource.getFilename();
|
||||||
|
// helper.addAttachment(fileName, fileSystemResource);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// mailSender.send(message);
|
||||||
|
// } catch (MessagingException e) {
|
||||||
|
// System.out.println("发送带附件的邮件时发生异常!" + e);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
@@ -19,8 +19,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: ymbgy
|
* 文档生成工具类
|
||||||
* @Date: 2022-09-21 13:26
|
|
||||||
*/
|
*/
|
||||||
public class WordUtil {
|
public class WordUtil {
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,7 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|||||||
|
|
||||||
public interface IAdjudicationService {
|
public interface IAdjudicationService {
|
||||||
AjaxResult createDocument(CaseApplication caseApplication);
|
AjaxResult createDocument(CaseApplication caseApplication);
|
||||||
|
|
||||||
|
AjaxResult sendDocumentByEmail();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -155,4 +155,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult sendDocumentByEmail() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user