Merge branch 'bgy' of SH-Arbitrate/Arbitrate-Backend into dev

This commit was merged in pull request #90.
This commit is contained in:
bgy
2023-10-13 18:28:04 +08:00
committed by Gitea
8 changed files with 379 additions and 354 deletions
@@ -25,7 +25,6 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/document")
@PreAuthorize("@ss.hasPermi('caseManagement:list:createaward')")
public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.createDocument(caseApplication);
}
@@ -58,7 +57,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/signature")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.signature(caseApplication);
}
@@ -69,7 +68,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/caseFile")
@PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
public AjaxResult caseFile(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.caseFile(caseApplication);
}
@@ -80,7 +79,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/service")
@PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
}
@@ -90,7 +89,7 @@ public class AdjudicationController extends BaseController {
* @return
*/
@PostMapping("/stamp")
@PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
// @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
return adjudicationService.stamp(caseApplication);
}
@@ -44,7 +44,7 @@ public class CaseApplicationController extends BaseController {
/**
* 新增立案数据
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
@Log(title = "新增立案数据", businessType = BusinessType.INSERT)
@PostMapping("/addCaseApplication")
public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
@@ -57,7 +57,7 @@ public class CaseApplicationController extends BaseController {
/**
* 修改立案数据
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
@Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
@PostMapping("/editCaseApplication")
public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -69,7 +69,7 @@ public class CaseApplicationController extends BaseController {
/**
* 提交立案申请
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
@Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplication")
public AjaxResult submitCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -80,7 +80,7 @@ public class CaseApplicationController extends BaseController {
/**
* 删除立案数据
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
@Log(title = "删除立案数据", businessType = BusinessType.DELETE)
@PostMapping("/removeCaseApplication")
public AjaxResult removeCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
@@ -91,7 +91,7 @@ public class CaseApplicationController extends BaseController {
/**
* 查询立案信息
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
@PostMapping("/selectCaseApplication")
public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
@@ -101,7 +101,7 @@ public class CaseApplicationController extends BaseController {
/**
* 查询签名链接
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectSignUrl")
public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
@@ -111,7 +111,7 @@ public class CaseApplicationController extends BaseController {
/**
* 查询用印链接
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
@PostMapping("/selectSealUrl")
public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
@@ -128,7 +128,7 @@ public class CaseApplicationController extends BaseController {
}
@Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file) throws Exception {
if(file==null){
@@ -144,7 +144,7 @@ public class CaseApplicationController extends BaseController {
/**
* 组庭
*/
@PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
@Log(title = "组庭", businessType = BusinessType.UPDATE)
@PostMapping("/pendTral")
public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
@@ -154,7 +154,7 @@ public class CaseApplicationController extends BaseController {
/**
* 组庭审核
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheck")
public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -164,7 +164,7 @@ public class CaseApplicationController extends BaseController {
/**
* 组庭确认
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
@Log(title = "组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSure")
public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication caseApplication) {
@@ -174,7 +174,7 @@ public class CaseApplicationController extends BaseController {
/**
* 核验裁决书
*/
@PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
// @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
@Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecord")
public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -184,7 +184,7 @@ public class CaseApplicationController extends BaseController {
/**
* 审核裁决书
*/
@PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
@Log(title = "审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecord")
public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
@@ -195,7 +195,7 @@ public class CaseApplicationController extends BaseController {
/**
* 是否指派仲裁员
*/
@PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
// @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
@Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
@PostMapping("/pendingAppointArbotrar")
public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
@@ -205,7 +205,7 @@ public class CaseApplicationController extends BaseController {
/**
* 提交立案审查
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
@Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheck")
public AjaxResult submitCaseApplicationCheck(@Validated @RequestBody CaseApplication caseApplication) {
@@ -216,7 +216,7 @@ public class CaseApplicationController extends BaseController {
/**
* 确认缴费查询立案信息
*/
@PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
@PostMapping("/selectCaseApplicationConfirm")
public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
@@ -23,7 +23,7 @@ public class CaseArbitrateController extends BaseController {
* @return
*/
@PutMapping("/method")
@PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
,Integer opinion){
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion);
@@ -35,7 +35,6 @@ public class CaseArbitrateController extends BaseController {
* @return
*/
@PostMapping("/writtenHear")
@PreAuthorize("@ss.hasPermi('caseManagement:hear')")
public AjaxResult writtenHear(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
return caseArbitrateService.writtenHear(arbitrateRecord);
}
@@ -22,7 +22,7 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
@PreAuthorize("@ss.hasPermi('caseLog:list')")
// @PreAuthorize("@ss.hasPermi('caseLog:list')")
@GetMapping("/list")
public TableDataInfo list(CaseLogRecord caseLogRecord)
{
@@ -25,7 +25,7 @@ public class CasePaymentController {
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
@PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
@PostMapping("/casePay")
public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePay(casePayDTO);
@@ -36,7 +36,7 @@ public class CasePaymentController {
* @param caseApplication
* @return
*/
@PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
return paymentService.confirmPayment(caseApplication);
@@ -94,14 +94,20 @@ spring:
mail:
host: smtp.163.com
port: 25
username: hjbjava@163.com
password: BSRSSEPJWGNNVYYL
username: lmj1549843951@163.com
password: JGIOQVFCLAZKXRKO
default-encoding: UTF-8
properties:
mail:
smtp:
connectiontimeout: 5000
timeout: 5000
writetimeout: 5000
socketFactoryClass: javax.net.ssl.SSLSocketFactory
socketFactoryFallback: false
socketFactoryPort: 465
debug: false
protocol: smtp
#上上签配置参数
ssq:
developerId: 1695872832013855470
@@ -302,7 +302,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATED_SEAL,"");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
}
@@ -313,7 +313,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_ARCHIVED,"");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
return AjaxResult.success("归档成功,案件状态已改为已归档");
}
@@ -346,19 +346,58 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
}
}
}
//发送邮件
sendCaseEmail(caseApplication1, appEmail, resEmail);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.CASE_FILING,"");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
return AjaxResult.success("仲裁文书送达成功");
}
/**
* 通过邮件发送裁决书文件
*
* @param caseApplication1
* @param appEmail
* @param resEmail
*/
private void sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail) {
List<File> fileList = new ArrayList<>();
File file = null;
List<CaseAttach> caseAttachList = caseApplication1.getCaseAttachList();
if (caseAttachList != null && caseAttachList.size() > 0) {
for (CaseAttach caseAttach : caseAttachList) {
if (caseAttach.getAnnexType() == 3) {
String annexPath = caseAttach.getAnnexPath();
String path = "/home/ruoyi/" + annexPath;
// String path = "/home/ruoyi/uploadPath/upload/2023/10/12/裁决书测试20231012test.docx";
// String path = "E:/WorkDoc/SH/裁决书测试20231012test.docx";
file = new File(path);
fileList.add(file);
System.out.println("文件长度:" + file.length());
}
}
}
if (file != null) {
JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
try {
// emailOutUtil.sendMessageCarryFile(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", file, "hjbjava@163.com", javaMailSender);
emailOutUtil.sendMessageCarryFiles(appEmail, "裁决书", "您好,审核后的裁决书在附件中请查阅", fileList, "lmj1549843951@163.com", javaMailSender);
} catch (Exception e) {
System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
System.out.println(e.toString());
}
}
}
@Override
public AjaxResult stamp(CaseApplication caseApplication) {
//更改案件状态(暂时)
caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
caseApplicationMapper.submitCaseApplication(caseApplication);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(),CaseApplicationConstants.ARBITRATION_DELIVERY,"");
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
}
@@ -392,7 +431,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
try {
// List<File> fileList = new ArrayList<>();
// fileList.add(new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\10\\7\\b442880179844a848f1f8b08c29e3d0c.docx"));
// File file = fileList.get(0);//System.out.println("这是文件"+file);
// File file = fileList.get(0);//System.out.println("这是文件"+file);
//电子邮件送达
// EmailOutUtil emailOutUtil = new EmailOutUtil();
// JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();