93 Commits
Author SHA1 Message Date
qitz 74112dc93b Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-03-22 10:06:30 +08:00
qitz 08717e84be 优化新增功能 2024-03-22 10:06:10 +08:00
wangqiong123andGitea 8d732fb8fb Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2024-02-28 09:40:24 +08:00
18792927508 5240926cd7 视频会议调用调解系统 2024-02-28 09:36:31 +08:00
qtzandGitea 16d6d1c29d Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-02-06 15:59:52 +08:00
qitz b0e0123c4a Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-02-06 15:56:21 +08:00
qitz abb96916e3 优化新增功能 2024-02-06 15:56:03 +08:00
qtzandGitea e3bdb44192 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-19 17:28:42 +08:00
qitz ff175c98df Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-19 17:26:09 +08:00
qitz 5c434e576f 优化用印功能 2024-01-19 17:25:40 +08:00
wangqiong123andGitea 6b5e91c4d7 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-19 10:47:36 +08:00
18792927508 5f622b0641 视频回调 2024-01-19 10:45:17 +08:00
qtzandGitea 9bfcc02a48 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-10 13:44:44 +08:00
qitz a3a3fa17f1 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-10 13:41:35 +08:00
qitz f38d6997bc 优化公章列表查询 2024-01-10 13:41:18 +08:00
qtzandGitea 13e3503af4 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-10 11:39:27 +08:00
qitz 70af2e822b Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-10 11:35:53 +08:00
qitz 71a228c625 修改送达裁决书功能 2024-01-10 11:35:28 +08:00
qtzandGitea 9f79c901ca Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-09 11:45:16 +08:00
qitz fa782834e7 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-09 11:41:50 +08:00
qitz 088bd41d0b 优化批量送达裁决书功能 2024-01-09 11:41:16 +08:00
qtzandGitea f6b1403e3c Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-08 14:51:20 +08:00
qitz da105d20e4 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-08 14:47:49 +08:00
qitz 293dd52e8c 优化案件列表查询 2024-01-08 14:47:19 +08:00
qtzandGitea eeb6757ec8 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-05 17:55:55 +08:00
qitz 6960564dde Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-05 17:53:28 +08:00
qitz fb8366fa78 优化批量列表查询 2024-01-05 17:53:02 +08:00
qtzandGitea 31dc8e4032 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-05 16:35:11 +08:00
qitz 6caf44a9ec Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-05 16:31:46 +08:00
qitz 95cacd287b 批量送达裁决书功能 2024-01-05 16:31:22 +08:00
qtzandGitea fdf48d2f14 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-05 14:49:01 +08:00
qitz b24fc351ea Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-05 14:45:44 +08:00
qitz 11e6c91cc6 实现批量签名用印功能 2024-01-05 14:45:10 +08:00
qtzandGitea fd04248c4b Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-04 18:02:31 +08:00
qitz 1f9cea5d3e Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-04 17:59:11 +08:00
qitz 4be8bcab6d 实现批量审核仲裁方式 2024-01-04 17:58:44 +08:00
qtzandGitea cf6b0e7d70 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-04 16:16:35 +08:00
qitz ff2a7dd781 实现批量部门长审核裁决书 2024-01-04 16:11:49 +08:00
wangqiong123andGitea f99cf25adf Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-04 10:04:46 +08:00
18792927508 1ea9767674 压缩包导入修改 2024-01-04 10:01:59 +08:00
qtzandGitea 2253984352 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-03 18:00:33 +08:00
qitz b14d46803c Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-03 17:56:31 +08:00
qitz 82b6431be9 实现批量组庭功能 2024-01-03 17:55:35 +08:00
qtzandGitea 6cb1ecab7b Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-03 13:52:37 +08:00
qitz 061bdc6312 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-03 13:49:30 +08:00
qitz f980592507 优化批量缴费功能 2024-01-03 13:49:01 +08:00
qtzandGitea 1d0e12ee18 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-03 09:37:41 +08:00
qitz d5b6cddd8f Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-03 09:33:57 +08:00
qitz e4931d1499 优化缴费功能 2024-01-03 09:33:26 +08:00
qtzandGitea 7748d4e558 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-02 16:45:32 +08:00
qitz 7d5ee5cffd Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-02 16:42:08 +08:00
qitz 48da135874 批量缴费 2024-01-02 16:41:36 +08:00
qtzandGitea 8be09de49c Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-02 14:15:19 +08:00
qitz 2aff2e8d7d Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-02 14:11:25 +08:00
qitz 06320d99ca 批量审查 2024-01-02 14:10:53 +08:00
qtzandGitea 7cd6c52db5 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2024-01-02 10:00:50 +08:00
qitz 455f3265ec Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2024-01-02 09:57:36 +08:00
qitz 33774c51fb 优化批量提交 2024-01-02 09:57:04 +08:00
qtzandGitea c68c91e0b3 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-29 17:29:36 +08:00
qitz 53c64c36da Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-29 17:24:05 +08:00
qitz 7a38c4e8a5 实现批量管理查询批量和批量提交 2023-12-29 17:23:09 +08:00
wangqiong123andGitea 66d66e5156 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-28 10:33:27 +08:00
18792927508 20517eaaaa bug修改 2023-12-28 10:30:45 +08:00
qitz deea55b1e9 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-27 14:40:48 +08:00
qitz 31a9287a8f 1 2023-12-27 14:40:26 +08:00
wangqiong123andGitea 4cd04ef10e Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-27 14:39:35 +08:00
18792927508 afb6b2a4b5 bug修改 2023-12-27 14:38:03 +08:00
qtzandGitea a12083d93c Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-27 14:03:58 +08:00
qitz f66af56144 优化查询案件列表 2023-12-27 13:58:02 +08:00
wangqiong123andGitea 0d71663935 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-25 16:04:49 +08:00
qitz 753039d5e9 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-25 16:04:45 +08:00
qitz 743040d813 优化下载zip 2023-12-25 16:04:29 +08:00
18792927508 9f8e21383d 1 2023-12-25 16:03:10 +08:00
wangqiong123andGitea 4e85bf306b Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-21 09:17:57 +08:00
18792927508 1da61f526d 案件bug修复 2023-12-21 09:16:26 +08:00
wangqiong123andGitea c7970e884f Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-20 09:17:46 +08:00
18792927508 20c95700ab 案件 2023-12-20 09:15:28 +08:00
qtzandGitea 547394f8d6 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-19 14:06:08 +08:00
qitz a671da2f11 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-19 14:02:23 +08:00
qitz 60561da44d 优化生成案件编号规则功能 2023-12-19 14:01:56 +08:00
qtzandGitea e5138339a8 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-15 17:30:36 +08:00
qitz 45f30d2dbc Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-15 17:26:14 +08:00
qitz 8aa82b28be 实现案件编号规则功能 2023-12-15 17:25:40 +08:00
wangqiong123andGitea 23847cf918 Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-15 10:58:52 +08:00
18792927508 c6d0cb9579 案件修改 2023-12-15 10:57:16 +08:00
qtzandGitea e590293b33 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-14 15:55:50 +08:00
qitz e1fa902c59 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-14 15:51:40 +08:00
qitz 5eb7b070fd 实现组庭审核时仲裁员待办案件数据显示 2023-12-14 15:51:09 +08:00
qtzandGitea fbf10a1ed9 Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-13 16:01:37 +08:00
qitz 0e96b4d8f4 Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into qtz5 2023-12-13 15:58:56 +08:00
qitz 61f8638635 增加是否书面审理 2023-12-13 15:58:38 +08:00
qtzandGitea 6c9a09f29a Merge branch 'qtz5' of SH-Arbitrate/Arbitrate-Backend into dev 2023-12-13 11:46:48 +08:00
qitz 2787aa38c6 优化驳回原因功能 2023-12-13 11:44:20 +08:00
56 changed files with 4948 additions and 1049 deletions
@@ -1,11 +1,16 @@
package com.ruoyi.web.controller.wisdomarbitrate; package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication; import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO; import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO; import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService; import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
@@ -14,6 +19,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List; import java.util.List;
@RestController @RestController
@@ -22,7 +28,65 @@ public class AdjudicationController extends BaseController {
@Autowired @Autowired
private IAdjudicationService adjudicationService; private IAdjudicationService adjudicationService;
/**
* 根据签署流程id查询批量签名链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectBatchSignUrl")
public AjaxResult selectBatchSignUrl(@RequestBody StringIdsReq idsReq) {
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSignUrl(idsReq);
return success(sealSignRecordselect);
}
/**
* 根据批号查询批量签名链接
*/
@PostMapping("/getSignUrlBatch")
public AjaxResult getSignUrlBatch(@RequestBody StringIdsReq idsReq) {
if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.getSignUrlBatch(idsReq);
return success(sealSignRecordselect);
}
/**
* 根据签署流程id查询批量用印链接
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@PostMapping("/selectBatchSealUrl")
public AjaxResult selectBatchSealUrl(@RequestBody StringIdsReq idsReq) {
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSealUrl(idsReq);
return success(sealSignRecordselect);
}
/**
* 根据仲裁员手机号分页查询待签名/待用印的案件
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
@GetMapping("/pageSignAdjudicate")
public TableDataInfo pageSignAdjudicate(@RequestParam(value = "personAccount",required = false) String personAccount, @RequestParam("caseStatus") Integer caseStatus) {
startPage();
List<CaseApplication> list = adjudicationService.selectSealSigning(personAccount,caseStatus);
return getDataTable(list);
}
/**
* 根据批号查询批量用印链接
*/
@PostMapping("/getSealUrlBatch")
public AjaxResult getSealUrlBatch(@RequestBody StringIdsReq idsReq) {
if(StrUtil.isEmpty(idsReq.getBatchNumber().toString())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
return error("参数校验失败");
}
SealSignRecord sealSignRecordselect = adjudicationService.getSealUrlBatch(idsReq);
return success(sealSignRecordselect);
}
/** /**
@@ -37,6 +101,18 @@ public class AdjudicationController extends BaseController {
} }
return adjudicationService.createDocument(caseApplication); return adjudicationService.createDocument(caseApplication);
} }
/**
* 批量生成裁决书
* @param caseApplication
* @return
*/
@PostMapping("/batchDocument")
public AjaxResult batchDocument(@Validated @RequestBody BatchCaseApplication caseApplication){
if (CollectionUtil.isEmpty(caseApplication.getIds())) {
return AjaxResult.error("参数校验失败");
}
return adjudicationService.batchDocument(caseApplication.getIds());
}
/** /**
* 重新生成裁决书 * 重新生成裁决书
@@ -81,6 +157,7 @@ public class AdjudicationController extends BaseController {
return adjudicationService.signature(caseApplication); return adjudicationService.signature(caseApplication);
} }
/** /**
* 归档(暂时只改案件状态) * 归档(暂时只改案件状态)
* @param batchCaseApplication * @param batchCaseApplication
@@ -95,6 +172,19 @@ public class AdjudicationController extends BaseController {
return adjudicationService.caseFile(batchCaseApplication.getIds()); return adjudicationService.caseFile(batchCaseApplication.getIds());
} }
/**
* 批量归档(暂时只改案件状态)
* @param batchCaseApplication
* @return
*/
@PostMapping("/caseFileBatch")
public AjaxResult caseFileBatch(@RequestBody CaseApplication caseApplication){
if(StrUtil.isEmpty(caseApplication.getBatchNumber().toString())){
return error("参数校验失败");
}
return adjudicationService.caseFileBatch(caseApplication.getBatchNumber());
}
/** /**
* 送达(不包含发送电子邮件) * 送达(不包含发送电子邮件)
* @param bookSendVO * @param bookSendVO
@@ -105,6 +195,20 @@ public class AdjudicationController extends BaseController {
public AjaxResult service(@RequestBody BookSendVO bookSendVO){ public AjaxResult service(@RequestBody BookSendVO bookSendVO){
return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum()); return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
} }
/**
* 批量送达仲裁书
* @param caseApplication
* @return
*/
@PostMapping("/serviceBatch")
public AjaxResult serviceBatch(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException, IOException {
if(StrUtil.isEmpty(caseApplication.getBatchNumber().toString())){
return error("参数校验失败");
}
return adjudicationService.serviceBatch(caseApplication.getBatchNumber());
}
/** /**
* 用印(暂时只改案件状态) * 用印(暂时只改案件状态)
* @param caseApplication * @param caseApplication
@@ -0,0 +1,54 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.json.JSONUtil;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.CheckSignatuerUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.vo.CaseApplicationVO;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/callArbitrateCaseApplication")
public class ArbitrateApplicationController extends BaseController {
@Autowired
private ICaseApplicationService caseApplicationService;
/**
* 新增立案数据
*/
@Anonymous
@PostMapping("/generateCaseApplication")
public AjaxResult generateCaseApplication(@Validated @RequestBody CaseApplicationVO caseApplicationVO) throws Exception {
String paramsbody = JSONUtil.toJsonStr(caseApplicationVO);
boolean checkResult= CheckSignatuerUtils.checkSignuter(paramsbody);
if(checkResult){
CaseApplication caseApplication = new CaseApplication();
BeanUtils.copyProperties(caseApplicationVO,caseApplication);
caseApplication.setCreateBy(getUsername());
return toAjax(caseApplicationService.insertcaseApplication1(caseApplication));
}else {
return AjaxResult.error("签名验证失败");
}
}
}
@@ -2,34 +2,29 @@ package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alipay.api.internal.util.file.IOUtils;
import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.FileTransformation;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.EsignDemoException; import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.WxAppletNotifyUtils; import com.ruoyi.common.utils.WxAppletNotifyUtils;
import com.ruoyi.util.FileUtil;
import com.ruoyi.wisdomarbitrate.domain.*; import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO; import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO; import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount; import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService; import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.*;
import java.io.InputStream;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.List; import java.util.List;
@@ -40,6 +35,8 @@ import java.util.List;
public class CaseApplicationController extends BaseController { public class CaseApplicationController extends BaseController {
@Autowired @Autowired
private ICaseApplicationService caseApplicationService; private ICaseApplicationService caseApplicationService;
@Autowired
private IAdjudicationService adjudicationService;
/** /**
@@ -56,6 +53,16 @@ public class CaseApplicationController extends BaseController {
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询批量管理案件列表
*/
@GetMapping("/listBatch")
public TableDataInfo listBatch(CaseApplication caseApplication) {
startPage();
List<CaseApplication> list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
return getDataTable(list);
}
/** /**
* 根据角色查询待办数量 * 根据角色查询待办数量
* @return * @return
@@ -116,6 +123,19 @@ public class CaseApplicationController extends BaseController {
return toAjax(caseApplicationService.submitCaseApplication(batchCaseApplication.getIds())); return toAjax(caseApplicationService.submitCaseApplication(batchCaseApplication.getIds()));
} }
/**
* 批量提交立案申请
*/
@Log(title = "批量提交立案申请", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationBatch")
public AjaxResult submitCaseApplicationBatch(@RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
return error("参数校验失败");
}
return toAjax(caseApplicationService.submitCaseApplicationBatch(batchCaseApplication.getBatchNumber()));
}
/** /**
@@ -171,6 +191,7 @@ public class CaseApplicationController extends BaseController {
return success(sealSignRecordselect); return success(sealSignRecordselect);
} }
/** /**
* 查询用印链接 * 查询用印链接
*/ */
@@ -263,6 +284,25 @@ public class CaseApplicationController extends BaseController {
return toAjax(caseApplicationService.pendTralSure(caseApplication)); return toAjax(caseApplicationService.pendTralSure(caseApplication));
} }
/**
* 批量组庭审核
*/
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
@Log(title = "批量组庭审核", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralCheckBatch")
public AjaxResult pendTralCheckBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralCheckBatch(caseApplication));
}
/**
* 批量组庭确认
*/
@Log(title = "批量组庭确认", businessType = BusinessType.UPDATE)
@PostMapping("/pendTralSureBatch")
public AjaxResult pendTralSureBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.pendTralSureBatch(caseApplication));
}
/** /**
* 修改开庭时间 * 修改开庭时间
*/ */
@@ -303,6 +343,35 @@ public class CaseApplicationController extends BaseController {
return caseApplicationService.arbitratorCheckArbitrateRecord(caseApplication); return caseApplicationService.arbitratorCheckArbitrateRecord(caseApplication);
} }
/**
* 批量操作仲裁员审核裁决书
*/
@Log(title = "批量操作仲裁员审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/arbitrator/checkArbitrateRecordBatch")
public AjaxResult arbitratorCheckArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.arbitratorCheckArbitrateRecordBatch(caseApplication);
}
/**
* 批量部门长审核裁决书
*/
@Log(title = "批量部门长审核裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/checkArbitrateRecordBatch")
public AjaxResult checkArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return caseApplicationService.checkArbitrateRecordBatch(caseApplication);
}
/**
* 批量核验裁决书
*/
@Log(title = "批量核验裁决书", businessType = BusinessType.UPDATE)
@PostMapping("/verificationArbitrateRecordBatch")
public AjaxResult verificationArbitrateRecordBatch(@Validated @RequestBody CaseApplication caseApplication) {
return toAjax(caseApplicationService.verificationArbitrateRecordBatch(caseApplication));
}
/** /**
* 是否指派仲裁员 * 是否指派仲裁员
@@ -337,6 +406,18 @@ public class CaseApplicationController extends BaseController {
return success(caseApplicationselect); return success(caseApplicationselect);
} }
/**
* 批量提交立案审查
*/
@Log(title = "批量提交立案审查", businessType = BusinessType.UPDATE)
@PostMapping("/submitCaseApplicationCheckBatch")
public AjaxResult submitCaseApplicationCheckBatch(@RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber()) || batchCaseApplication.getAgreeOrNotCheck()==null){
return error("参数校验失败");
}
return success(caseApplicationService.submitCaseApplicationCheckBatch(batchCaseApplication.getBatchNumber(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
}
/** /**
* 下载案件压缩包 * 下载案件压缩包
*/ */
@@ -348,6 +429,9 @@ public class CaseApplicationController extends BaseController {
} }
/** /**
* 发送房间号短信 * 发送房间号短信
*/ */
@@ -30,8 +30,18 @@ public class CaseArbitrateController extends BaseController {
@PutMapping("/method") @PutMapping("/method")
// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')") // @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
, Integer opinion){ , Integer opinion, Integer arbitratMethod){
return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion); return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
}
/**
* 批量审核仲裁方式
* @param caseApplication
* @return
*/
@PostMapping("/methodBatch")
public AjaxResult examineArbitrateMethodBatch(@Validated @RequestBody CaseApplication caseApplication){
return caseArbitrateService.examineArbitrateMethodBatch(caseApplication);
} }
/** /**
@@ -44,4 +54,14 @@ public class CaseArbitrateController extends BaseController {
return caseArbitrateService.writtenHear(caseIds); return caseArbitrateService.writtenHear(caseIds);
} }
/**
* 批量书面审理
* @param
* @return
*/
@PostMapping("/writtenHearBatch")
public AjaxResult writtenHearBatch(@Validated @RequestBody CaseApplication caseApplication){
return caseArbitrateService.writtenHearBatch(caseApplication);
}
} }
@@ -0,0 +1,74 @@
package com.ruoyi.web.controller.wisdomarbitrate;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.wisdomarbitrate.domain.CaseNumRule;
import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
import com.ruoyi.wisdomarbitrate.service.ICaseNumRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("/caseNumRule")
public class CaseNumRuleController extends BaseController {
@Autowired
private ICaseNumRuleService caseNumRuleService;
/**
* 新增案件编号规则
* @param caseNumRule
* @return
*/
@PostMapping("/insertCaseNumRule")
public AjaxResult insertCaseNumRule(@RequestBody CaseNumRule caseNumRule){
caseNumRule.setCreateBy(getUsername());
return caseNumRuleService.insertCaseNumRule(caseNumRule);
}
/**
* 修改案件编号规则
* @param caseNumRule
* @return
*/
@PostMapping("/updateCaseNumRule")
public AjaxResult updateCaseNumRule(@RequestBody CaseNumRule caseNumRule){
return caseNumRuleService.updateCaseNumRule(caseNumRule);
}
/**
* 删除案件编号规则
* @param caseNumRule
* @return
*/
@PostMapping("/deleteCaseNumRule")
public AjaxResult deleteCaseNumRule(@RequestBody CaseNumRule caseNumRule){
return caseNumRuleService.deleteCaseNumRule(caseNumRule);
}
/**
* 查询案件编号规则
*/
@GetMapping("/list")
public TableDataInfo list(CaseNumRule caseNumRule) {
startPage();
List<CaseNumRule> list = caseNumRuleService.selectCaseNumRule(caseNumRule);
return getDataTable(list);
}
}
@@ -1,6 +1,9 @@
package com.ruoyi.web.controller.wisdomarbitrate; package com.ruoyi.web.controller.wisdomarbitrate;
import cn.hutool.core.collection.CollectionUtil;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService; import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
@@ -9,6 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/** /**
* 缴费支付 * 缴费支付
*/ */
@@ -41,15 +47,38 @@ public class CasePaymentController {
return paymentService.confirmPay(payDTO); return paymentService.confirmPay(payDTO);
} }
/**
* 批量缴费
* @param casePayDTO 缴费传入参数
* @return 统一响应结果
*/
@PostMapping("/casePayBatch")
public AjaxResult casePayBatch(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePayBatch(casePayDTO);
}
/**
* 批量缴费
* @param payDTO 缴费传入参数
* @return 统一响应结果
*/
@PostMapping("/confirmPayBatch")
public AjaxResult confirmPayBatch(@Validated @RequestBody CasePayDTO payDTO) {
return paymentService.confirmPayBatch(payDTO);
}
/** /**
* 缴费确认 * 缴费确认
* @param caseApplication * @param batchCaseApplication
* @return * @return
*/ */
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')") // @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
@PutMapping("/confirm") @PutMapping("/confirm")
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) { public AjaxResult confirmPayment(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
return paymentService.confirmPayment(caseApplication); if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
return AjaxResult.error("参数校验失败");
}
return paymentService.confirmPayment(batchCaseApplication.getIds());
} }
/** /**
* 缴费列表查询 * 缴费列表查询
@@ -60,4 +89,22 @@ public class CasePaymentController {
public AjaxResult casePayList(CasePayDTO casePayDTO) { public AjaxResult casePayList(CasePayDTO casePayDTO) {
return paymentService.casePayList(casePayDTO); return paymentService.casePayList(casePayDTO);
} }
@PostMapping("/listBatch")
public AjaxResult casePayListBatch(@Validated @RequestBody CasePayDTO casePayDTO) {
return paymentService.casePayListBatch(casePayDTO);
}
/**
* 批量缴费确认
* @param batchCaseApplication
* @return
*/
@PostMapping("/confirmBatch")
public AjaxResult confirmPaymentBatch(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
if(StringUtils.isEmpty(batchCaseApplication.getBatchNumber())){
return AjaxResult.error("参数校验失败");
}
return paymentService.confirmPaymentBatch(batchCaseApplication.getBatchNumber());
}
} }
@@ -222,14 +222,13 @@ public class DeptIdentifyController extends BaseController {
/** /**
* 根据模板id查询模板字段列表 * 根据模板id查询模板字段列表
* @param templateManage * @param id
* @return * @return
*/ */
@GetMapping("/getTemplateInfoById") @GetMapping("/getTemplateInfoById")
public AjaxResult getTemplateInfoById(@RequestBody TemplateManage templateManage){ public AjaxResult getTemplateInfoById(@RequestParam("id") Long id){
if(templateManage.getId()==null){ TemplateManage templateManage = new TemplateManage();
return error("参数校验错误"); templateManage.setId(id);
}
List<FatchRule> fatchRuleList = deptIdentifyService.getTemplateInfoById(templateManage); List<FatchRule> fatchRuleList = deptIdentifyService.getTemplateInfoById(templateManage);
return AjaxResult.success(fatchRuleList); return AjaxResult.success(fatchRuleList);
} }
@@ -38,6 +38,18 @@ public class SysUser extends BaseEntity
/** 用户昵称 */ /** 用户昵称 */
@Excel(name = "用户名称") @Excel(name = "用户名称")
private String nickName; private String nickName;
/** 用户昵称和待办数量 */
private String nickNameAndNum;
public String getNickNameAndNum() {
return nickNameAndNum;
}
public void setNickNameAndNum(String nickNameAndNum) {
this.nickNameAndNum = nickNameAndNum;
}
/** 用户身份证号 */ /** 用户身份证号 */
@Excel(name = "身份证号") @Excel(name = "身份证号")
private String idCard; private String idCard;
@@ -0,0 +1,58 @@
package com.ruoyi.common.utils;
import cn.hutool.core.io.IoUtil;
import cn.hutool.crypto.digest.HMac;
import cn.hutool.crypto.digest.HmacAlgorithm;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
public class CheckSignatuerUtils {
public static String getSign(String paramsbody, String accessSec, long timestamp) {
String paramsStr = getParamsStr(paramsbody, timestamp);
return generateSign(paramsStr, accessSec);
}
public static String getParamsStr(String paramsbody,long timestamp) {
StringBuilder strbuild = new StringBuilder();
if (StringUtils.isNotBlank(paramsbody)) {
strbuild.append(paramsbody).append('#');
}
strbuild.append("#timestamp=").append(timestamp);
return strbuild.toString();
}
public static String generateSign(String paramsStr, String accessSec) {
HMac hMac = new HMac(HmacAlgorithm.HmacSHA256, accessSec.getBytes(StandardCharsets.UTF_8));
return hMac.digestHex(paramsStr);
}
public static boolean checkSignuter(String paramsbody) throws Exception {
HttpServletRequest reqParam = ((ServletRequestAttributes) (RequestContextHolder.currentRequestAttributes())).getRequest();
String timestampstr = reqParam.getHeader("timestampstr");
String signstr = reqParam.getHeader("signstr");
String accessSec = "mCFMA6ffe938v79m";
String newSignuter = getSign(paramsbody, accessSec,Long.parseLong(timestampstr));
if (StringUtils.equals(signstr, newSignuter)) {
return true;
}else {
return false;
}
}
}
@@ -1,6 +1,8 @@
package com.ruoyi.common.utils; package com.ruoyi.common.utils;
import com.ruoyi.common.utils.uuid.UUID;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@@ -14,18 +16,17 @@ import org.springframework.stereotype.Component;
import javax.activation.DataHandler; import javax.activation.DataHandler;
import javax.mail.*; import javax.mail.*;
import javax.mail.internet.*; import javax.mail.internet.*;
import javax.mail.search.*;
import javax.mail.util.ByteArrayDataSource; import javax.mail.util.ByteArrayDataSource;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.File; import java.io.*;
import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.security.Security; import java.security.Security;
import java.util.Date; import java.util.*;
import java.util.List;
import java.util.Properties;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import java.util.stream.Stream;
/** /**
* @ClassName EmailInUtil * @ClassName EmailInUtil
@@ -48,10 +49,12 @@ public class EmailOutUtil {
// private static String fromOut; // private static String fromOut;
@Value("${spring.mail.host}") @Value("${spring.mail.host}")
private String hostOut; private String hostOut;
@Value("${spring.mail.username}") // @Value("${spring.mail.username}")
private String usernameOut; // private String usernameOut;
@Value("${spring.mail.password}") private String usernameOut="wq18792927508@163.com";
private String passwordOut; // @Value("${spring.mail.password}")
// private String passwordOut;
private String passwordOut= "WDFHKSEMCKVRELEA";
@Value("${spring.mail.port}") @Value("${spring.mail.port}")
private Integer portOut; private Integer portOut;
@@ -98,6 +101,7 @@ public class EmailOutUtil {
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>"; String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
MimeBodyPart messageBodyPart = new MimeBodyPart(); MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(messageContent, "text/html;charset=utf-8"); messageBodyPart.setContent(messageContent, "text/html;charset=utf-8");
messageBodyPart.setContentID(UUID.randomUUID().toString());
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory"; final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
//设置邮件会话参数 //设置邮件会话参数
@@ -158,7 +162,7 @@ public class EmailOutUtil {
} }
//调用Transport的send方法去发送邮件 //调用Transport的send方法去发送邮件
Transport.send(msg); Transport.send(msg);
} catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return Boolean.FALSE; return Boolean.FALSE;
} }
@@ -269,4 +273,164 @@ public class EmailOutUtil {
} }
return flag; return flag;
} }
public void buildReceiveConnect() throws Exception {
//POP3主机名
String host = "pop3.163.com";
//设置传输协议
String protocol = "pop3";
//用户账号
String username = "wq18792927508@163.com";
//密码或者授权码
String password = "WDFHKSEMCKVRELEA";
/*
* 获取Session
*/
Properties props = new Properties();
//协议
props.setProperty("mail.store.protocol", protocol);
//POP3主机名
props.setProperty("mail.pop3.host", host);
props.setProperty("mail.smtp.auth", "true");
props.setProperty("mail.pop3.default-encoding", "UTF-8");
Session session = Session.getDefaultInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(usernameOut, passwordOut);
}
});
URLName urlName = new URLName(protocol, host, 110, null, username, password);
Store store = session.getStore(urlName);
store.connect(username, password);
Folder folder = store.getFolder("INBOX");
folder.open(Folder.READ_ONLY);
}
/**
* 接收邮件
*/
public List<String> receiverMail() {
List<String> messageIds=new ArrayList<>();
// session.setDebug(true);
try {
//POP3主机名
String host = "pop3.163.com";
//设置传输协议
String protocol = "pop3";
//用户账号
String username = "wq18792927508@163.com";
//密码或者授权码
String password = "WDFHKSEMCKVRELEA";
/*
* 获取Session
*/
Properties props = new Properties();
//协议
props.setProperty("mail.store.protocol", protocol);
//POP3主机名
props.setProperty("mail.pop3.host", host);
props.setProperty("mail.smtp.auth", "true");
props.setProperty("mail.pop3.default-encoding", "UTF-8");
Session session = Session.getDefaultInstance(props, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(usernameOut, passwordOut);
}
});
URLName urlName = new URLName(protocol, host, 110, null, username, password);
Store store = session.getStore(urlName);
store.connect(username, password);
Folder folder = store.getFolder("INBOX");
folder.open(Folder.READ_ONLY);
SearchTerm orTerm = new SubjectTerm("退信");
// Message[] messages = folder.search(orTerm);
Date endTime= new Date();
long oneDayMillis=24*60*60*1000L;
Date startTime=new Date(endTime.getTime()-oneDayMillis);
// SearchTerm comparisonTermGe = new SentDateTerm(ComparisonTerm.GE, startTime);
// SearchTerm comparisonTermLe = new SentDateTerm(ComparisonTerm.LE, endTime);
// SearchTerm comparisonAndTerm = new AndTerm(comparisonTermGe, comparisonTermLe);
// SearchTerm searchTerm = new AndTerm(comparisonAndTerm, orTerm);
Message[] messages = folder.search(orTerm);
if (messages != null) {
Arrays.stream(messages).forEach(message -> {
String messageId="";
try {
messageId = EmailUtil.getMessageId(message,session);
} catch (Exception e) {
e.printStackTrace();
}
messageIds.add(messageId);
});
}
folder.close(false);
store.close();
} catch (Exception e) {
return messageIds;
}
return messageIds;
}
public void analyseMail(Session session, Object content) throws Exception {
if (content instanceof Multipart) {
Multipart multipart = (Multipart) content;
for (int i = 0; i < multipart.getCount(); i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
// if (bodyPart.isMimeType("message/rfc822")) { if(bodyPart.getContentType().startsWith("Message/Rfc822"));
// MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
// }
if(bodyPart.isMimeType("Message/Rfc822")){
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
}
}
}
}
public static String getMessageId(Part part) throws Exception {
if (!part.isMimeType("multipart/*")) {
return "";
}
Multipart multipart = (Multipart) part.getContent();
for (int i = 0; i < multipart.getCount(); i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
if (part.isMimeType("message/rfc822")) {
return getMessageId((Part) part.getContent());
}
InputStream inputStream = bodyPart.getInputStream();
try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream))) {
String strLine;
while ((strLine = br.readLine()) != null) {
if (strLine.startsWith("Message_Id:")) {
String[] split = strLine.split("Message_Id:");
return split.length > 1 ? split[1].trim() : null;
}
}
}
}
return "";
}
//检查退信邮件
// Folder folder = ...; //打开收件箱
// Message[] messages = folder.getMessages();
// for (Message message : messages) {
// if (message.getSubject().contains("Delivery Status Notification")) {
// System.out.println("Delivery failed for recipient: " + message.getRecipients()[0]);
// }
// }
} }
@@ -0,0 +1,68 @@
package com.ruoyi.common.utils;
import lombok.extern.slf4j.Slf4j;
import javax.mail.*;
import javax.mail.internet.MimeMessage;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@Slf4j
public final class EmailUtil {
private static final String multipart = "multipart/*";
public static String getMessageId(Part part, Session session) throws Exception {
if (!part.isMimeType(multipart)) {
return "";
}
Multipart multipart = (Multipart) part.getContent();
for (int i = 0; i < multipart.getCount(); i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
if(bodyPart.getContentType().contains("Message/Rfc822")){
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
if(mimeMessage.getSubject()!=null&&mimeMessage.getSubject().contains("裁决书")){
String[] split = mimeMessage.getSubject().split("裁决书");
if(split.length>0){
return split[0];
}
}
}
} return "";
}
public static boolean isContainAttachment(Part part) {
boolean attachFlag = false;
try {
if (part.isMimeType(multipart)) {
Multipart mp = (Multipart) part.getContent();
for (int i = 0; i < mp.getCount(); i++) {
BodyPart mpart = mp.getBodyPart(i);
String disposition = mpart.getDisposition();
if ((disposition != null) && ((disposition.equals(Part.ATTACHMENT)) || (disposition.equals(Part.INLINE))))
attachFlag = true;
else if (mpart.isMimeType(multipart)) {
attachFlag = isContainAttachment((Part) mpart);
} else {
String contype = mpart.getContentType();
if (contype.toLowerCase().contains("application"))
attachFlag = true;
if (contype.toLowerCase().contains("name"))
attachFlag = true;
}
}
} else if (part.isMimeType("message/rfc822")) {
attachFlag = isContainAttachment((Part) part.getContent());
}
} catch (MessagingException | IOException e) {
e.printStackTrace();
}
return attachFlag;
}
}
@@ -72,6 +72,7 @@ public class SmsUtils {
* 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空 * 模板参数: 模板参数的个数需要与 TemplateId 对应模板的变量个数保持一致,若无模板参数,则设置为空
*/ */
private String[] templateParamSet; private String[] templateParamSet;
private Long caseId;
} }
} }
@@ -10,6 +10,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.system.mapper.*; import com.ruoyi.system.mapper.*;
import com.ruoyi.wisdomarbitrate.domain.Arbitrator; import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -61,6 +62,9 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired @Autowired
private ISysConfigService configService; private ISysConfigService configService;
@Autowired
private CaseApplicationMapper caseApplicationMapper;
@Autowired @Autowired
protected Validator validator; protected Validator validator;
@@ -78,7 +82,19 @@ public class SysUserServiceImpl implements ISysUserService {
@Override @Override
public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) { public List<SysUser> selectUserListByAdRole(Arbitrator arbitrator) {
return userMapper.selectUserListByAdRole(arbitrator); List<SysUser> sysUsers = userMapper.selectUserListByAdRole(arbitrator);
if(sysUsers!=null&&sysUsers.size()>0){
for(SysUser sysUser: sysUsers){
Long userId = sysUser.getUserId();
int casenum = caseApplicationMapper.selectCasenum(userId.toString());
String nickName = sysUser.getNickName();
String nickNamenew = nickName + "(待办案件数量" + casenum + "个)";
sysUser.setNickNameAndNum(nickNamenew);
}
}
return sysUsers;
} }
/** /**
@@ -0,0 +1,26 @@
package com.ruoyi.wisdomarbitrate;
import lombok.Data;
import java.util.List;
@Data
public class StringIdsReq {
private List<String> ids;
/**
* 签署人账号(即仲裁员手机号)
*/
private String psnAccount;
/**
* 签署人id
*/
private String psnId ;
/**
* 机构账户
*/
private String orgId ;
/**
* 批号
*/
private Integer batchNumber;
}
@@ -22,4 +22,10 @@ public class BatchCaseApplication {
private Integer opinion; private Integer opinion;
/** 驳回原因 */ /** 驳回原因 */
private String caseCheckReject; private String caseCheckReject;
/**
* 批号
*/
private String batchNumber;
} }
@@ -50,6 +50,19 @@ public class CaseApplication extends BaseEntity {
/** 案件状态 */ /** 案件状态 */
private Integer caseStatus; private Integer caseStatus;
private String caseStatusstr;
/** 申请人是否书面审理 */
private Integer applicantIsWrittenHear;
/** 被申请人是否书面审理 */
private Integer respondentIsWrittenHear;
/** 开庭方式是否一致 */
private Integer arbitraMethodIssame;
/** 仲裁方式说明 */
private String arbitratMethodIllustrate;
/** 案件申请表ID */ /** 案件申请表ID */
private Long caseAppliId; private Long caseAppliId;
@@ -395,9 +408,15 @@ public class CaseApplication extends BaseEntity {
/** /**
* 批号 * 批号
*/ */
private String batchNumber; private Integer batchNumber;
/** /**
* 自定义字段 * 自定义字段
*/ */
private List<ColumnValue> columnValues; private List<ColumnValue> columnValues;
/**
* 待办状态,0待办,1已办
*/
private Integer pendingStatus;
/** e签宝流程id */
private String signFlowId;
} }
@@ -0,0 +1,28 @@
package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
@Data
public class CaseNumRule extends BaseEntity {
/** ID */
private Long id;
/** 类型 */
private Integer ruleType;
/** 前缀 */
private String prefixstr;
/** 时间格式 */
private Integer dateFormat;
/** 机构名称 */
private String deptName;
/** 机构名称首字符拼写 */
private String deptNameFirchar;
/** 当前编号 */
private String currentNum;
}
@@ -1,7 +1,13 @@
package com.ruoyi.wisdomarbitrate.domain; package com.ruoyi.wisdomarbitrate.domain;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SealSignRecord extends BaseEntity { public class SealSignRecord extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@@ -25,15 +31,6 @@ public class SealSignRecord extends BaseEntity {
private String orgnizeNamepsnName; private String orgnizeNamepsnName;
String fileDownloadUrl; String fileDownloadUrl;
public String getFileDownloadUrl() {
return fileDownloadUrl;
}
public void setFileDownloadUrl(String fileDownloadUrl) {
this.fileDownloadUrl = fileDownloadUrl;
}
/** 流程状态 */ /** 流程状态 */
private Integer signFlowStatus; private Integer signFlowStatus;
/** 签名状态 */ /** 签名状态 */
@@ -44,171 +41,11 @@ public class SealSignRecord extends BaseEntity {
/** 签名链接 */ /** 签名链接 */
private String signUrl; private String signUrl;
public String getSignUrl() {
return signUrl;
}
public void setSignUrl(String signUrl) {
this.signUrl = signUrl;
}
public String getSealUrl() {
return sealUrl;
}
public void setSealUrl(String sealUrl) {
this.sealUrl = sealUrl;
}
/** 用印链接 */ /** 用印链接 */
private String sealUrl; private String sealUrl;
private Long caseAppliId; private Long caseAppliId;
public Long getCaseAppliId() {
return caseAppliId;
}
public void setCaseAppliId(Long caseAppliId) {
this.caseAppliId = caseAppliId;
}
public Integer getPsnsignStatus() {
return psnsignStatus;
}
public void setPsnsignStatus(Integer psnsignStatus) {
this.psnsignStatus = psnsignStatus;
}
public Integer getOrgsignStatus() {
return orgsignStatus;
}
public void setOrgsignStatus(Integer orgsignStatus) {
this.orgsignStatus = orgsignStatus;
}
public Integer getSignFlowStatus() {
return signFlowStatus;
}
public void setSignFlowStatus(Integer signFlowStatus) {
this.signFlowStatus = signFlowStatus;
}
public String getFileid() {
return fileid;
}
public void setFileid(String fileid) {
this.fileid = fileid;
}
public String getFilename() {
return filename;
}
public void setFilename(String filename) {
this.filename = filename;
}
public String getSignFlowid() {
return signFlowid;
}
public void setSignFlowid(String signFlowid) {
this.signFlowid = signFlowid;
}
public String getPensonAccount() {
return pensonAccount;
}
public void setPensonAccount(String pensonAccount) {
this.pensonAccount = pensonAccount;
}
public String getPensonName() {
return pensonName;
}
public void setPensonName(String pensonName) {
this.pensonName = pensonName;
}
public String getOrgnizeName() {
return orgnizeName;
}
public void setOrgnizeName(String orgnizeName) {
this.orgnizeName = orgnizeName;
}
public String getOrgnizeNamePsnAccount() {
return orgnizeNamePsnAccount;
}
public void setOrgnizeNamePsnAccount(String orgnizeNamePsnAccount) {
this.orgnizeNamePsnAccount = orgnizeNamePsnAccount;
}
public String getOrgnizeNamepsnName() {
return orgnizeNamepsnName;
}
public void setOrgnizeNamepsnName(String orgnizeNamepsnName) {
this.orgnizeNamepsnName = orgnizeNamepsnName;
}
public String getPositionPagepsn() {
return positionPagepsn;
}
public void setPositionPagepsn(String positionPagepsn) {
this.positionPagepsn = positionPagepsn;
}
public double getPositionXpsn() {
return positionXpsn;
}
public void setPositionXpsn(double positionXpsn) {
this.positionXpsn = positionXpsn;
}
public double getPositionYpsn() {
return positionYpsn;
}
public void setPositionYpsn(double positionYpsn) {
this.positionYpsn = positionYpsn;
}
public String getPositionPageorg() {
return positionPageorg;
}
public void setPositionPageorg(String positionPageorg) {
this.positionPageorg = positionPageorg;
}
public double getPositionXorg() {
return positionXorg;
}
public void setPositionXorg(double positionXorg) {
this.positionXorg = positionXorg;
}
public double getPositionYorg() {
return positionYorg;
}
public void setPositionYorg(double positionYorg) {
this.positionYorg = positionYorg;
}
/** 签名位置页数 */ /** 签名位置页数 */
private String positionPagepsn; private String positionPagepsn;
/** 签名位置x坐标 */ /** 签名位置x坐标 */
@@ -223,13 +60,5 @@ public class SealSignRecord extends BaseEntity {
private double positionYorg; private double positionYorg;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
} }
@@ -25,4 +25,5 @@ public class CaseConfirmPayDTO {
* 缴费凭证 * 缴费凭证
*/ */
private List<CaseAttach> payOrderList; private List<CaseAttach> payOrderList;
} }
@@ -38,6 +38,9 @@ public class CaseEvidenceDTO {
/** 是否管辖异议申请 */ /** 是否管辖异议申请 */
private Integer objectiJuris; private Integer objectiJuris;
/** 被申请人是否书面审理 */
private Integer respondentIsWrittenHear;
/** /**
* 案件仲裁员 * 案件仲裁员
@@ -35,4 +35,8 @@ public class CasePayDTO {
* 缴费凭证 * 缴费凭证
*/ */
private List<CaseAttach> payOrderList; private List<CaseAttach> payOrderList;
/**
* 批号
*/
private String batchNumber;
} }
@@ -0,0 +1,419 @@
package com.ruoyi.wisdomarbitrate.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
public class CaseApplicationVO {
private static final long serialVersionUID = 1L;
/**
* 查询案件时区分是否待办案件,0待办案件,1已办案件
*/
private String selectCaseStatus;
/** ID */
private Long id;
/** 案件名称 */
@Excel(name = "案件名称")
private String caseName;
/** 案件编号 */
// @Excel(name = "案件编号")
private String caseNum;
/** 案件标的 */
@Excel(name = "案件标的")
private BigDecimal caseSubjectAmount;
/**
* 模板id
*/
private Long templateId;
/** 立案日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date registerDate;
/** 仲裁方式 */
private Integer arbitratMethod;
/**
* 是否导入,0手动录入,1导入,默认0
*/
private Integer importFlag;
/** 仲裁方式名称 */
private String arbitratMethodName;
/** 案件状态 */
private Integer caseStatus;
private String caseStatusstr;
/** 申请人是否书面审理 */
private Integer applicantIsWrittenHear;
/** 被申请人是否书面审理 */
private Integer respondentIsWrittenHear;
/** 开庭方式是否一致 */
private Integer arbitraMethodIssame;
/** 仲裁方式说明 */
private String arbitratMethodIllustrate;
/** 案件申请表ID */
private Long caseAppliId;
/** 开庭日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date hearDate;
/** 借款开始日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借款开始日期")
private Date loanStartDate;
/** 借款结束日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "借款结束日期")
private Date loanEndDate;
/** 合同编号 */
@Excel(name = "合同编号")
private String contractNumber;
/** 申请人主张欠本金 */
@Excel(name = "申请人主张欠本金")
private BigDecimal claimPrinciOwed;
/** 申请人主张欠利息 */
@Excel(name = "申请人主张欠利息")
private BigDecimal claimInterestOwed;
/** 申请人主张违约金 */
@Excel(name = "申请人主张违约金")
private BigDecimal claimLiquidDamag;
/** 申请人请求仲裁庭裁决 */
@Excel(name = "申请人请求仲裁庭裁决",width = 36)
private String requestRule;
/** 是否财产保全申请 */
@Excel(name = "是否财产保全申请",width = 26,combo= {"是","否"},readConverterExp = "0=否,1=是")
private Integer properPreser;
/** 申请人仲裁请求及事实和理由 */
@Excel(name = "申请人仲裁请求及事实和理由",width = 36)
private String arbitratClaims;
/** 仲裁应缴费用 */
private BigDecimal feePayable;
/** 开始在线视频时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date beginVideoDate;
/** 在线视频人员 */
private String onlineVideoPerson;
/** 仲裁员id */
private String arbitratorId;
/** 仲裁员名称 */
private String arbitratorName;
/** 案件描述 */
private String caseDescribe;
/** 裁决书URL */
private String filearbitraUrl;
/** 是否同意组庭 */
private Integer isAgreePendTral;
/** 是否有异议需要举证 */
private Integer objectionAddEviden;
/** 是否需要开庭审理 */
private Integer openCourtHear;
/** 是否仲裁反请求 */
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/** 被申请人是否缺席 */
private Integer isAbsence;
/** 是否管辖异议申请 */
private Integer objectiJuris;
/** 被申请人质证意见 */
private String responCrossOpin;
/** 被申请人的答辩意见 */
private String responDefenOpini;
/** 申请人是否缺席 */
private Integer appliIsAbsen;
/** 申请人质证意见 */
private String applicaCrossOpin;
/** 支付状态 */
private Integer paymentStatus;
/** 支付状态描述 */
private String paymentStatusName;
/**
* 支付方式code,0线上支付,1线下支付
*/
private Integer payTypeCode;
/**
* 支付方式name,0线上支付,1线下支付
*/
private String payTypeName;
// 导入校验失败信息
private StringBuilder errorMsg;
/**
* 是否锁定,0-否,1-是
*/
private Integer lockStatus;
/** 案件状态名称 */
private String caseStatusName;
/** 是否同意审核 */
private Integer agreeOrNotCheck;
/** 申请人名称 */
private String applicantName;
/** 被申请人名称 */
private String respondentName;
/**
* 用户身份证号
*/
private String idCard;
/**
* 用户id
*/
private String userId;
/**
* 登录用户用户名
*/
private String loginUserName;
private List<Long> deptIds;
/**
* 部门长状态
*/
private List<Integer> deptHeadStatus;
/**
* 代理人角色有关部门
*/
private List<Long> agentDeptIds;
/**
* 财务状态
*/
private Integer financeStatus;
/**
* 是否是被申请人,仲裁员,部门长,财务,代理人,0-否,1-是
*/
private Integer isOtherRole;
/**
* 案件日志id
*/
private Long caseLogId;
/** 仲裁结果 */
private String caseResult;
/** 案件关联人信息 */
private List<CaseAffiliate> caseAffiliates;
private List<Integer> caseStatusList;
private List<Integer> annexTypeList;
private Integer annexType;
/**
* 案件附件列表
*/
private List<CaseAttach> caseAttachList;
/**
* 申请人主体信息
*/
/** 姓名 */
@Excel(name = "申请人主体信息-申请人(机构)",width = 26)
private String name;
/** 身份证号 */
@Excel(name = "申请人主体信息-代码",width = 26)
private String identityNum;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人",width = 26)
private String compLegalPerson;
/** 申请人主体信息-法定代表人 */
@Excel(name = "申请人主体信息-法定代表人职位",width = 26)
private String compLegalperPost;
/**
* 申请人主体信息-申请人(机构)id
*/
private String nameId;
/** 联系电话 */
@Excel(name = "申请人主体信息-联系电话",width = 26)
private String contactTelphone;
/** 联系地址 */
@Excel(name = "申请人主体信息-联系地址",width = 26)
private String contactAddress;
/** 单位电话 */
@Excel(name = "申请人主体信息-单位电话",width = 26)
private String workTelphone;
/** 单位地址 */
@Excel(name = "申请人主体信息-单位地址",width = 26)
private String workAddress;
/** 申请人住所 */
@Excel(name = "申请人主体信息-住所",width = 26)
private String residenAffiliAppli;
/** 申请人邮箱 */
@Excel(name = "申请人主体信息-邮箱",width = 26)
private String email;
/** 代理人姓名 */
@Excel(name = "申请人主体信息-代理人姓名",width = 26)
private String nameAgent;
/** 身份证号 */
@Excel(name = "申请人主体信息-代理人身份证号",width = 26)
private String identityNumAgent;
/** 联系电话 */
@Excel(name = "申请人主体信息-代理人联系电话",width = 26)
private String contactTelphoneAgent;
/** 联系地址 */
@Excel(name = "申请人主体信息-代理人联系地址",width = 26)
private String contactAddressAgent;
/** 申请人代理人职称 */
@Excel(name = "申请人主体信息-代理人职称",width = 26)
private String appliAgentTitle;
/**
* 被申请人主体信息
*/
/** 姓名 */
@Excel(name = "被申请人主体信息-申请人姓名",width = 26)
private String debtorName;
/** 身份证号 */
@Excel(name = "被申请人主体信息-身份证号",width = 26)
private String debtorIdentityNum;
/** 被申请人主体信息-性别 */
@Excel(name = "被申请人主体信息-性别",width = 26,combo= {"男","女"},readConverterExp = "0=男,1=女")
private String responSex;
/** 被申请人主体信息-出生年月日 */
@Excel(name = "被申请人主体信息-出生年月日",width = 26)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date responBirth;
/** 联系电话 */
@Excel(name = "被申请人主体信息-联系电话",width = 26)
private String debtorContactTelphone;
/** 联系地址 */
@Excel(name = "被申请人主体信息-联系地址",width = 26)
private String debtorContactAddress;
/** 被申请人住所 */
@Excel(name = "被申请人主体信息-住所",width = 26)
private String residenAffiliRespon;
/** 单位电话 */
@Excel(name = "被申请人主体信息-单位电话",width = 26)
private String debtorWorkTelphone;
/** 单位地址 */
@Excel(name = "被申请人主体信息-单位地址",width = 26)
private String debtorWorkAddress;
/** 邮箱 */
@Excel(name = "被申请人主体信息-邮箱",width = 26)
private String debtorEmail;
/** 代理人姓名 */
@Excel(name = "被申请人主体信息-代理人姓名",width = 26)
private String debtorNameAgent;
/** 身份证号 */
@Excel(name = "被申请人主体信息-代理人身份证号",width = 26)
private String debtorIdentityNumAgent;
/** 联系电话 */
@Excel(name = "被申请人主体信息-代理人联系电话",width = 26)
private String debtorContactTelphoneAgent;
/** 联系地址 */
@Excel(name = "被申请人主体信息-代理人联系地址",width = 26)
private String debtorContactAddressAgent;
/**
* 申请机构id
*/
private String applicationOrganId;
/**
* 版本号
*/
private Integer version;
/**
* 修改案件的提交状态,0-未提交,1-已提交,2-同意,3-拒绝,4-撤销
*/
private Integer updateSubmitStatus;
/** 合同名称 */
private String contractName;
/**
* 事实和理由
*/
private String facts;
/**
* 合同甲方
*/
private String partyA;
/**
* 利率
*/
private String interestRate;
/**
* 待还金额
*/
private String outstandingMoney;
/**
* 调解达成协议内容
*/
private String mediationAgreement;
/**
* 金融消费纠纷基本情况
*/
private String disputes;
/**
* 贷款类型
*/
private String loanType;
/**
* 贷款期限
*/
private String loanTerm;
/**
* 本案争议焦点
*/
private String caseFocus;
/**
* 本案事实
*/
private String caseFacts;
/**
* 被申请人对上述材料的质证意见
*/
private String respondentOpinion;
/**
* 申请人对上述材料的质证意见
*/
private String applicantOpinion;
/**
* 批号
*/
private Integer batchNumber;
/**
* 待办状态,0待办,1已办
*/
private Integer pendingStatus;
/** e签宝流程id */
private String signFlowId;
}
@@ -4,14 +4,15 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplicationPay; import com.ruoyi.wisdomarbitrate.domain.CaseApplicationPay;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Data @Data
public class CasePayListVO { public class CasePayListVO {
/** /**
* 订单总金额 单位:分 * 订单总金额
*/ */
private int totalFee; private BigDecimal totalFee;
/** /**
* 案件总条数 * 案件总条数
@@ -38,7 +38,7 @@ public interface CaseApplicationLogMapper {
Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id); Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
/** /**
* 根据案件id删除案件记录表和案件关联人日志表 * 删除日志
* @param ids * @param ids
*/ */
void batchDeleteLog(@Param("ids") List<Long> ids); void batchDeleteLog(@Param("ids") List<Long> ids);
@@ -46,4 +46,11 @@ public interface CaseApplicationLogMapper {
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version); CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
Integer batchSave(@Param("list")List<CaseApplication> caseApplications); Integer batchSave(@Param("list")List<CaseApplication> caseApplications);
/**
* 根据案件id查询所有的日志id
* @param ids
* @return
*/
List<Long> selectLogsByCaseIds(@Param("ids")List<Long> ids);
} }
@@ -131,4 +131,12 @@ public interface CaseApplicationMapper {
* @return * @return
*/ */
int batchSave(@Param("list")List<CaseApplication> caseApplications); int batchSave(@Param("list")List<CaseApplication> caseApplications);
int selectCasenum(@Param("userId") String userId);
List<CaseApplication> selectAdminCaseApplicationListBatch(CaseApplication caseApplication);
List<CaseApplication> listCaseApplicationByBatchNumber(CaseApplication caseApplication);
List<CaseApplication> selectAdminCaseApplicationListBatch1(CaseApplication caseApplication);
} }
@@ -0,0 +1,20 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseNumRule;
import java.util.List;
public interface CaseNumRuleMapper {
int insertCaseNumRule(CaseNumRule caseNumRule);
int updateCaseNumRule(CaseNumRule caseNumRule);
int deleteCaseNumRule(CaseNumRule caseNumRule);
List<CaseNumRule> selectCaseNumRules(CaseNumRule caseNumRule);
int countCaseNumRule(CaseNumRule caseNumRule);
CaseNumRule selectCaseNumRule(CaseNumRule caseNumRule);
}
@@ -2,10 +2,12 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord; import com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord;
import java.util.List;
public interface CasePaymentRecordMapper { public interface CasePaymentRecordMapper {
int saveRecord(CasePaymentRecord casePaymentRecord); int saveRecord(CasePaymentRecord casePaymentRecord);
CasePaymentRecord queryRecord(String orderNumber); List<CasePaymentRecord> queryRecord(String orderNumber);
void update(CasePaymentRecord casePaymentRecord); void update(CasePaymentRecord casePaymentRecord);
@@ -2,17 +2,33 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord; import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface SealSignRecordMapper { public interface SealSignRecordMapper {
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord); List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
/**
* 查询已签署和签署中的文件
* @param sealSignRecord
* @return
*/
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord); List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
/**
* 差询等待签署,签署中的案件
* @param penSonAccount 签署人员
* @return
*/
List<CaseApplication> selectSealSigning(@Param("penSonAccount") String penSonAccount, @Param("caseStatus") Integer caseStatus);
int updataSealSignRecord(SealSignRecord sealSignRecord); int updataSealSignRecord(SealSignRecord sealSignRecord);
void insertSealSignRecord(SealSignRecord sealSignRecord); void insertSealSignRecord(SealSignRecord sealSignRecord);
List<CaseApplication> selectsignFlow(@Param("batchNumber") Integer batchNumber,@Param("caseStatus") Integer caseStatus);
} }
@@ -2,6 +2,7 @@ package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord; import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@@ -11,4 +12,11 @@ public interface SmsRecordMapper {
int saveSmsSendRecord(SmsSendRecord smsSendRecord); int saveSmsSendRecord(SmsSendRecord smsSendRecord);
List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord); List<SmsSendRecord> getSmsSendRecord(SmsSendRecord smsSendRecord);
/**
* 批量新增
* @param smsSendRecordList
* @return
*/
int batchSaveSmsSendRecord(@Param("list") List<SmsSendRecord> smsSendRecordList);
} }
@@ -1,10 +1,14 @@
package com.ruoyi.wisdomarbitrate.service; package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.exception.EsignDemoException;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication; import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication; import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO; import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
import java.io.IOException;
import java.util.List; import java.util.List;
public interface IAdjudicationService { public interface IAdjudicationService {
@@ -39,4 +43,28 @@ public interface IAdjudicationService {
* @return * @return
*/ */
AjaxResult batchDocument(List<Long> ids); AjaxResult batchDocument(List<Long> ids);
/**
* 根据签署流程id查询批量签名链接
* @param idsReq
* @return
*/
SealSignRecord selectBatchSignUrl( StringIdsReq idsReq);
/**
* 根据仲裁员手机号分页查询等待签署,签署中的裁决书
* @param personAccount
* @return
*/
List<CaseApplication> selectSealSigning(String personAccount,Integer caseStatus);
SealSignRecord selectBatchSealUrl(StringIdsReq idsReq);
SealSignRecord getSignUrlBatch(StringIdsReq idsReq);
SealSignRecord getSealUrlBatch(StringIdsReq idsReq);
AjaxResult caseFileBatch(Integer batchNumber);
AjaxResult serviceBatch(Integer batchNumber) throws EsignDemoException, IOException;
} }
@@ -21,6 +21,8 @@ public interface ICaseApplicationService {
int insertcaseApplication(CaseApplication caseApplication); int insertcaseApplication(CaseApplication caseApplication);
int insertcaseApplication1(CaseApplication caseApplication);
int selectCaseApplicationCount(CaseApplication caseApplication); int selectCaseApplicationCount(CaseApplication caseApplication);
AjaxResult editCaseApplication(CaseApplication caseApplication); AjaxResult editCaseApplication(CaseApplication caseApplication);
@@ -135,4 +137,20 @@ public interface ICaseApplicationService {
AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication); AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
CaseAttach downloadCaseZipFile(CaseApplication caseApplication); CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
List<CaseApplication> selectCaseApplicationListBatchByRole(CaseApplication caseApplication);
int submitCaseApplicationBatch(String batchNumber);
int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject);
int pendTralCheckBatch(CaseApplication caseApplication);
int pendTralSureBatch(CaseApplication caseApplication);
int verificationArbitrateRecordBatch(CaseApplication caseApplication);
AjaxResult arbitratorCheckArbitrateRecordBatch(CaseApplication caseApplication);
AjaxResult checkArbitrateRecordBatch(CaseApplication caseApplication);
} }
@@ -13,5 +13,9 @@ public interface ICaseArbitrateService {
AjaxResult writtenHear(CaseIds caseIds); AjaxResult writtenHear(CaseIds caseIds);
AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion); AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
AjaxResult examineArbitrateMethodBatch(CaseApplication caseApplication);
AjaxResult writtenHearBatch(CaseApplication caseApplication);
} }
@@ -0,0 +1,20 @@
package com.ruoyi.wisdomarbitrate.service;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.wisdomarbitrate.domain.CaseNumRule;
import java.util.List;
public interface ICaseNumRuleService {
AjaxResult insertCaseNumRule(CaseNumRule caseNumRule);
AjaxResult updateCaseNumRule(CaseNumRule caseNumRule);
AjaxResult deleteCaseNumRule(CaseNumRule caseNumRule);
List<CaseNumRule> selectCaseNumRule(CaseNumRule caseNumRule);
}
@@ -6,13 +6,15 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import java.util.List;
public interface ICasePaymentService { public interface ICasePaymentService {
/** /**
* 案件缴费 * 案件缴费
*/ */
AjaxResult casePay(CasePayDTO casePayDTO); AjaxResult casePay(CasePayDTO casePayDTO);
AjaxResult confirmPayment(CaseApplication caseApplication); AjaxResult confirmPayment( List<Long> ids);
/** /**
* 确认缴费 * 确认缴费
@@ -24,4 +26,11 @@ public interface ICasePaymentService {
AjaxResult casePayList(CasePayDTO casePayDTO); AjaxResult casePayList(CasePayDTO casePayDTO);
AjaxResult confirmPayBatch(CasePayDTO payDTO);
AjaxResult casePayListBatch(CasePayDTO casePayDTO);
AjaxResult confirmPaymentBatch(String batchNumber);
AjaxResult casePayBatch(CasePayDTO casePayDTO);
} }
@@ -5,6 +5,7 @@ import com.deepoove.poi.data.PictureRenderData;
import com.ruoyi.common.constant.CaseApplicationConstants; import com.ruoyi.common.constant.CaseApplicationConstants;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.WordUtil; import com.ruoyi.common.utils.WordUtil;
import com.ruoyi.wisdomarbitrate.domain.*; import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.mapper.*; import com.ruoyi.wisdomarbitrate.mapper.*;
@@ -58,19 +59,17 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
@Override @Override
@Transactional @Transactional
public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion) { public AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethodNow) {
//查询案件详细信息 //查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) { if (caseApplication1 == null) {
return AjaxResult.success(); return AjaxResult.success();
} }
Integer arbitratMethod = caseApplication1.getArbitratMethod(); Integer arbitratMethodOriral = caseApplication.getArbitratMethod();
if (arbitratMethod == null) {
return AjaxResult.error("请先指定仲裁方式");
}
String caseNum = caseApplication1.getCaseNum(); String caseNum = caseApplication1.getCaseNum();
if (opinion == 0) { //拒绝 if (opinion == 0) { //拒绝
if (arbitratMethod == 2) { if (arbitratMethodOriral == 2) {
caseApplication1.setArbitratMethod(1); // 更改仲裁方式 caseApplication1.setArbitratMethod(1); // 更改仲裁方式
//修改案件状态修改开庭时间 //修改案件状态修改开庭时间
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE); caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
@@ -87,15 +86,35 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, ""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
} }
} else { } else if (opinion == 1 ) {
if (arbitratMethod == 2) { if (arbitratMethodOriral == 2) {
//修改案件状态为待书面审理 //修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR); caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, ""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
} else { } else {
//修改案件状态为待修改开庭时间 //修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
//修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
}
}else if (opinion == 2) {
if (arbitratMethodNow == 2) {
//修改案件状态为待书面审理
caseApplication1.setArbitratMethod(2);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
} else {
//修改案件状态为待修改开庭时间
caseApplication1.setArbitratMethod(1);
caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE); caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
//修改案件状态为待修改开庭时间 //修改案件状态为待修改开庭时间
// caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE); // caseApplication1.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
@@ -104,6 +123,7 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
} }
} }
caseApplication1.setLockStatus(1);
int i = caseApplicationMapper.submitCaseApplication(caseApplication1); int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) { if (i > 0) {
String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理"; String arbitratMethodStr = caseApplication1.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
@@ -145,6 +165,121 @@ public class CaseArbitrateServiceImpl implements ICaseArbitrateService {
return AjaxResult.success(); return AjaxResult.success();
} }
@Override
@Transactional
public AjaxResult examineArbitrateMethodBatch(CaseApplication caseApplication) {
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(caseApplication.getBatchNumber());
caseApplicationsel.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION_METHOD);
List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if (caseApplications1 != null && caseApplications1.size() > 0) {
for(CaseApplication caseApplicationse:caseApplications1){
String caseNum = caseApplicationse.getCaseNum();
Integer arbitratMethod = caseApplication.getArbitratMethod();
if (arbitratMethod == 1) {
caseApplicationse.setArbitratMethod(1);
caseApplicationse.setCaseStatus(CaseApplicationConstants.MODIFY_HEARDATE);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.MODIFY_HEARDATE, "");
}else if (arbitratMethod == 2) {
//修改案件状态为待书面审理
caseApplicationse.setArbitratMethod(2);
caseApplicationse.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_WRIITEN_HEAR, "");
}
int i = caseApplicationMapper.submitCaseApplication(caseApplicationse);
if (i > 0) {
String arbitratMethodStr = caseApplicationse.getArbitratMethod() == 1 ? "开庭审理" : "书面审理";
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplicationse.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
request.setTemplateId("1931000");
request.setPhone(affiliate.getContactTelphone());
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
// 1931000 尊敬的{1}用户,您的{2}仲裁案件,仲裁方式已确定为{3},请知晓,如非本人操作,请忽略本短信。
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseNum, arbitratMethodStr});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplicationse.getId());
smsSendRecord.setCaseNum(caseApplicationse.getCaseNum());
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseNum + "仲裁案件,仲裁方式已确定为" + arbitratMethodStr + ",请知晓,如非本人操作,请忽略本短信。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean){
smsSendRecord.setSendStatus(1);
}else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
}
}
}else{
throw new ServiceException("这个批号没有批量审核仲裁方式的案件");
}
return AjaxResult.success();
}
@Override
@Transactional
public AjaxResult writtenHearBatch(CaseApplication caseApplicationparam) {
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(caseApplicationparam.getBatchNumber());
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_WRIITEN_HEAR);
List<CaseApplication> caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if (caseApplications1 != null && caseApplications1.size() > 0) {
List<Long> ids = caseApplications1.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : ids) {
//查询案件详情
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
//案件日志表里添加数据
CaseLogRecord caseLogRecord = new CaseLogRecord();
caseLogRecord.setCaseAppliId(caseApplication1.getId());
caseLogRecord.setCaseNode(caseApplication1.getCaseStatus());
caseLogRecord.setCreateBy(getUsername());
caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, "");
// 生成裁决书
CaseApplication application = new CaseApplication();
application.setId(caseId);
adjudicationService.createDocument(application);
//修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
}
}else{
throw new ServiceException("这个批号没有批量书面审理的案件");
}
return AjaxResult.success();
}
@Override @Override
@Transactional @Transactional
public AjaxResult writtenHear(CaseIds caseIds) { public AjaxResult writtenHear(CaseIds caseIds) {
@@ -79,22 +79,42 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
//根据案件id查询案件证据材料 //根据案件id查询案件证据材料
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id); List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) { if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
for (CaseAttach caseAttach : evidenceMaterialList) { // for (CaseAttach caseAttach : evidenceMaterialList) {
//根据附件类型决定返回的路径 // //根据附件类型决定返回的路径
Integer annexType = caseAttach.getAnnexType(); // Integer annexType = caseAttach.getAnnexType();
if (annexType != 1){ // if (annexType != 1){
String path = caseAttach.getAnnexName(); // String path = caseAttach.getAnnexName();
// String prefix = "/profile";
// int startIndex = path.indexOf(prefix);
// startIndex += prefix.length();
// String extractedPath = "/uploadPath" + path.substring(startIndex);
// caseAttach.setAnnexPath(extractedPath);
// }else {
// String annexPath = caseAttach.getAnnexPath();
// String result = annexPath.replace("/home/ruoyi", "");
// caseAttach.setAnnexPath(result);
// }
// }
for (CaseAttach caseAttach : evidenceMaterialList) {
String annexName = caseAttach.getAnnexName();
String prefix = "/profile"; String prefix = "/profile";
int startIndex = path.indexOf(prefix); int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length(); if(startIndex!=-1) {
String extractedPath = "/uploadPath" + path.substring(startIndex); startIndex += prefix.length();
caseAttach.setAnnexPath(extractedPath);
}else { String annexPath = "/uploadPath" + annexName.substring(startIndex);
String annexPath = caseAttach.getAnnexPath(); caseAttach.setAnnexPath(annexPath);
String result = annexPath.replace("/home/ruoyi", ""); }
caseAttach.setAnnexPath(result); int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
} }
}
} }
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList); caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
} }
@@ -202,6 +222,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
} }
@Override @Override
@Transactional
public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) { public AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO) {
//查询案件详细信息 //查询案件详细信息
CaseApplication caseApplication = new CaseApplication(); CaseApplication caseApplication = new CaseApplication();
@@ -211,11 +232,10 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason()); caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
int caseStatus = caseApplication1.getCaseStatus(); int caseStatus = caseApplication1.getCaseStatus();
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden()); caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
//默认书面审理
caseApplication1.setOpenCourtHear(0);
caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar()); caseApplication1.setPendingAppointArbotrar(caseEvidenceDTO.getPendingAppointArbotrar());
caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter()); caseApplication1.setAdjudicaCounter(caseEvidenceDTO.getAdjudicaCounter());
caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris()); caseApplication1.setObjectiJuris(caseEvidenceDTO.getObjectiJuris());
caseApplication1.setRespondentIsWrittenHear(caseEvidenceDTO.getRespondentIsWrittenHear());
List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators(); List<Arbitrator> arbitrators = caseEvidenceDTO.getArbitrators();
if (arbitrators != null && arbitrators.size() > 0) { if (arbitrators != null && arbitrators.size() > 0) {
List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList()); List<Long> ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
@@ -227,15 +247,8 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
} }
//修改案件状态 //修改案件状态
caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT); caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
//选择仲裁方式
if (caseEvidenceDTO.getOpenCourtHear() == null){
//没选默认书面审理
caseApplication1.setArbitratMethod(2); //书面审理
}else if (caseEvidenceDTO.getOpenCourtHear() == 1){
caseApplication1.setArbitratMethod(1);
} else {
caseApplication1.setArbitratMethod(2); //书面审理
}
int i = caseApplicationMapper.submitCaseApplication(caseApplication1); int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) { if (i > 0) {
// 新增日志 // 新增日志
@@ -0,0 +1,72 @@
package com.ruoyi.wisdomarbitrate.service.impl;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseNumRule;
import com.ruoyi.wisdomarbitrate.mapper.CaseNumRuleMapper;
import com.ruoyi.wisdomarbitrate.service.ICaseNumRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
public class CaseNumRuleServiceImpl implements ICaseNumRuleService {
@Autowired
private CaseNumRuleMapper caseNumRuleMapper;
@Override
@Transactional
public AjaxResult insertCaseNumRule(CaseNumRule caseNumRule) {
int countCaseNumRule = caseNumRuleMapper.countCaseNumRule(caseNumRule);
if (countCaseNumRule>0){
return AjaxResult.error("不能新增相同案件编号规则");
}
int i = caseNumRuleMapper.insertCaseNumRule(caseNumRule);
if (i>0){
return AjaxResult.success("新增成功");
}
return AjaxResult.error("新增失败");
}
@Override
@Transactional
public AjaxResult updateCaseNumRule(CaseNumRule caseNumRule) {
int countCaseNumRule = caseNumRuleMapper.countCaseNumRule(caseNumRule);
if (countCaseNumRule>0){
return AjaxResult.error("不能修改相同案件编号规则");
}
int i = caseNumRuleMapper.updateCaseNumRule(caseNumRule);
if (i > 0) {
return AjaxResult.success("修改成功");
}
return AjaxResult.error("新增失败");
}
@Override
@Transactional
public AjaxResult deleteCaseNumRule(CaseNumRule caseNumRule) {
int i = caseNumRuleMapper.deleteCaseNumRule(caseNumRule);
if (i > 0) {
return AjaxResult.success("删除成功");
}
return AjaxResult.error();
}
@Override
public List<CaseNumRule> selectCaseNumRule(CaseNumRule caseNumRule) {
return caseNumRuleMapper.selectCaseNumRules(caseNumRule);
}
}
@@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.wisdomarbitrate.domain.*; import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO; import com.ruoyi.wisdomarbitrate.domain.vo.CasePayListVO;
@@ -20,6 +21,7 @@ import com.ruoyi.dto.PayRequest;
import com.ruoyi.dto.PayResponse; import com.ruoyi.dto.PayResponse;
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO; import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService; import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@@ -28,6 +30,7 @@ import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername; import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -90,26 +93,30 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
@Transactional @Transactional
public AjaxResult callback(String orderNumber) { public AjaxResult callback(String orderNumber) {
//查询记录 //查询记录
CasePaymentRecord casePaymentRecord = casePaymentRecordMapper.queryRecord(orderNumber); List<CasePaymentRecord> casePaymentRecords = casePaymentRecordMapper.queryRecord(orderNumber);
if (casePaymentRecord == null) { if(casePaymentRecords!=null&&casePaymentRecords.size()>0){
for (CasePaymentRecord casePaymentRecord:casePaymentRecords){
Long caseId = casePaymentRecord.getCaseId();
//更改记录表里的支付状态和支付时间
casePaymentRecord.setPaymentStatus(1);
casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
}
}else {
return AjaxResult.error("未查询到相关记录"); return AjaxResult.error("未查询到相关记录");
} }
Long caseId = casePaymentRecord.getCaseId();
//更改记录表里的支付状态和支付时间
casePaymentRecord.setPaymentStatus(1);
casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
return AjaxResult.success("支付成功"); return AjaxResult.success("支付成功");
} }
@Override @Override
@Transactional @Transactional
public AjaxResult confirmPayment(CaseApplication caseApplication) { public AjaxResult confirmPayment( List<Long> ids) {
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI); for (Long id : ids) {
int i = caseApplicationMapper.submitCaseApplication(caseApplication); CaseApplication caseApplication = new CaseApplication();
if (i > 0) { caseApplication.setId(id);
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
caseApplicationMapper.submitCaseApplication(caseApplication);
//发送短信通知 //发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest(); SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate(); CaseAffiliate caseAffiliate = new CaseAffiliate();
@@ -122,7 +129,7 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
//查询案件详细信息 //查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication); CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) { if (caseApplication1 == null) {
return AjaxResult.error(); continue;
} }
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死 String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
String caseNum = caseApplication1.getCaseNum(); String caseNum = caseApplication1.getCaseNum();
@@ -150,12 +157,13 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
} }
smsRecordMapper.saveSmsSendRecord(smsSendRecord); smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} else { //被申请人 } else { //被申请人
Boolean aBoolean = SmsUtils.sendSms(request);
request.setPhone(affiliate.getContactTelphone()); request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1952840"); request.setTemplateId("1952840");
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信 // 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
String name = affiliate.getName(); String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum}); request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录 //保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord(); SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId()); smsSendRecord.setCaseId(caseApplication.getId());
@@ -181,11 +189,10 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
casePaymentRecordMapper.update(casePaymentRecord); casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志 // 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, ""); CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
return AjaxResult.success();
} }
} }
return AjaxResult.error("暂无需要确认的缴费清单");
return AjaxResult.success();
} }
@Transactional @Transactional
@@ -248,9 +255,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
caseApplication.setId(caseId); caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication); CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
BigDecimal feePayable = caseApplication1.getFeePayable(); BigDecimal feePayable = caseApplication1.getFeePayable();
feePayable = feePayable.multiply(new BigDecimal(100));
sum = sum.add(feePayable); sum = sum.add(feePayable);
listVO.setTotalFee(sum.intValue()); listVO.setTotalFee(sum);
caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName()); caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
caseApplicationPay.setCaseResName(caseApplication1.getRespondentName()); caseApplicationPay.setCaseResName(caseApplication1.getRespondentName());
caseApplicationPay.setCaseNum(caseApplication1.getCaseNum()); caseApplicationPay.setCaseNum(caseApplication1.getCaseNum());
@@ -267,5 +273,219 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
return AjaxResult.success(listVO); return AjaxResult.success(listVO);
} }
@Override
@Transactional
public AjaxResult confirmPayBatch(CasePayDTO payDTO) {
String batchNumber = payDTO.getBatchNumber();
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
if(caseApplications!=null&&caseApplications.size()>0){
if (payDTO.getPayType() != null) {
payDTO.setCaseIds(caseIds);
// 修改支付方式
CaseConfirmPayDTO caseConfirmPayDTO = new CaseConfirmPayDTO();
BeanUtils.copyProperties(payDTO, caseConfirmPayDTO);
caseApplicationMapper.updatePayType(caseConfirmPayDTO);
}
for (Long caseId : caseIds) {
if (CollectionUtil.isNotEmpty(payDTO.getPayOrderList())) {
for (CaseAttach caseAttach : payDTO.getPayOrderList()) {
caseAttach.setCaseAppliId(caseId);
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// 修改节点状态
//根据案件id查询案件信息
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
caseApplication1.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
//修改案件状态
int i = caseApplicationMapper.submitCaseApplication(caseApplication1);
if (i > 0) {
// 修改支付状态
CasePaymentRecord paymentRecord = new CasePaymentRecord();
paymentRecord.setPayType(payDTO.getPayType());
paymentRecord.setCaseId(caseId);
paymentRecord.setPaymentStatus(1);
casePaymentRecordMapper.saveRecord(paymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT_CONFIRM, "");
}
}
}else{
throw new ServiceException("这个批号没有批量缴费的案件");
}
return AjaxResult.success("确认缴费成功");
}
@Override
public AjaxResult casePayListBatch(CasePayDTO casePayDTO) {
String batchNumber = casePayDTO.getBatchNumber();
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
// caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
CasePayListVO listVO = new CasePayListVO();
BigDecimal sum = new BigDecimal(0);
if(caseApplications!=null&&caseApplications.size()>0){
for(CaseApplication caseApplication:caseApplications){
BigDecimal feePayable = caseApplication.getFeePayable();
sum = sum.add(feePayable);
}
listVO.setTotalFee(sum);
}
if (sum.compareTo(BigDecimal.ZERO) == 0) {
return AjaxResult.error("没有可支付的费用");
}
return AjaxResult.success(listVO);
}
@Override
@Transactional
public AjaxResult confirmPaymentBatch(String batchNumber) {
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if (caseApplications != null && caseApplications.size() > 0) {
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : caseIds) {
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(caseId);
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
caseApplicationMapper.submitCaseApplication(caseApplication);
//发送短信通知
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
CaseAffiliate caseAffiliate = new CaseAffiliate();
caseAffiliate.setCaseAppliId(caseApplication.getId());
List<CaseAffiliate> caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate); //获取案件关联人信息
if (caseAffiliates != null && caseAffiliates.size() > 0) {
for (CaseAffiliate affiliate : caseAffiliates) {
//获取身份类型
int identityType = affiliate.getIdentityType();
//查询案件详细信息
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 == null) {
continue;
}
String caseName = "仲裁"; //这里案件名称表里未定义,暂时写死
String caseNum = caseApplication1.getCaseNum();
if (identityType == 1) { //申请人
request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1928003"); //传入申请人模板id
// 这个值,要看你的模板中是否预留了占位符,如果没有则不需要设置
// 模板id:1928003 普通短信 案件受理通知
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理。";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
} else { //被申请人
request.setPhone(affiliate.getContactTelphone());
request.setTemplateId("1952840");
// 1952840 尊敬的{1}用户,您的{2}案件{3}已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信
String name = affiliate.getName();
request.setTemplateParamSet(new String[]{name, caseName, caseNum});
Boolean aBoolean = SmsUtils.sendSms(request);
//保存短信发送记录
SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setCaseNum(caseNum);
smsSendRecord.setPhone(request.getPhone());
smsSendRecord.setSendTime(new Date());
String content = "尊敬的" + name + "用户,您的" + caseName + "案件" + caseNum + "已成功受理,请点击链接:https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 选择是否应诉。如非本人操作,请忽略本短信";
smsSendRecord.setSendContent(content);
smsSendRecord.setCreateBy(getUsername());
if (aBoolean) {
smsSendRecord.setSendStatus(1);
} else {
smsSendRecord.setSendStatus(0);
}
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
}
}
//更改记录表里的支付状态和支付时间
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setPaymentStatus(1);
casePaymentRecord.setCaseId(caseId);
casePaymentRecord.setPaymentTime(new Date());
casePaymentRecord.setUpdateTime(new Date());
casePaymentRecordMapper.update(casePaymentRecord);
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_CROSSEXAMI, "");
}
}
}else{
throw new ServiceException("这个批号没有批量缴费确认的案件");
}
return AjaxResult.success();
}
@Override
@Transactional
public AjaxResult casePayBatch(CasePayDTO casePayDTO) {
PayRequest payRequest = new PayRequest();
payRequest.setBody("案件缴费");
payRequest.setOrderSn(System.currentTimeMillis() + "");
payRequest.setTotalFee(casePayDTO.getTotalFee());
PayResponse response = elegentPay.requestPay(payRequest, casePayDTO.getTradeType(), casePayDTO.getPlatform());
if (response.getCode_url() == null) {
return AjaxResult.error();
}
String batchNumber = casePayDTO.getBatchNumber();
if(StringUtils.isEmpty(batchNumber) ){
return AjaxResult.error("请检查参数是否有误");
}
CaseApplication caseApplicationsel = new CaseApplication();
caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
caseApplicationsel.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
List<CaseApplication> caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
if(caseApplications!=null&&caseApplications.size()>0){
List<Long> caseIds = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
for (Long caseId : caseIds) {
//缴费记录表里新增数据
CasePaymentRecord casePaymentRecord = new CasePaymentRecord();
casePaymentRecord.setCaseId(caseId);
casePaymentRecord.setOrderNumber(payRequest.getOrderSn());
casePaymentRecord.setPaymentStatus(0);
casePaymentRecord.setCreateTime(new Date());
int count = casePaymentRecordMapper.saveRecord(casePaymentRecord);
if (count < 1) {
return AjaxResult.error();
}
}
}
return AjaxResult.success(response);
}
} }
@@ -25,18 +25,22 @@ import com.ruoyi.system.mapper.*;
import com.ruoyi.wisdomarbitrate.domain.*; import com.ruoyi.wisdomarbitrate.domain.*;
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue; import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
import com.ruoyi.wisdomarbitrate.mapper.*; import com.ruoyi.wisdomarbitrate.mapper.*;
import com.ruoyi.wisdomarbitrate.task.CaseZipImportTask;
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils; import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
import com.ruoyi.wisdomarbitrate.utils.OCRUtils; import com.ruoyi.wisdomarbitrate.utils.OCRUtils;
import com.ruoyi.wisdomarbitrate.utils.UnZipFileUtils; import com.ruoyi.wisdomarbitrate.utils.UnZipFileUtils;
import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocument;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.*; import java.io.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.function.Function; import java.util.function.Function;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -70,8 +74,6 @@ public class CaseZipImportImpl {
@Autowired @Autowired
private SysUserRoleMapper userRoleMapper; private SysUserRoleMapper userRoleMapper;
@Autowired @Autowired
private CaseApplicationLogMapper caseApplicationLogMapper;
@Autowired
private CaseAffiliateLogMapper caseAffiliateLogMapper; private CaseAffiliateLogMapper caseAffiliateLogMapper;
@Autowired @Autowired
private CaseAttachLogMapper caseAttachLogMapper; private CaseAttachLogMapper caseAttachLogMapper;
@@ -85,11 +87,14 @@ public class CaseZipImportImpl {
private ColumnValueLogMapper columnValueLogMapper; private ColumnValueLogMapper columnValueLogMapper;
@Autowired @Autowired
private CaseAffiliateMapper caseAffiliateMapper; private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseApplicationLogMapper caseApplicationLogMapper;
// 申请人角色id // 申请人角色id
private long roleId; private long roleId;
private Integer maxCaseNum; private Integer maxCaseNum;
private Integer maxBatchNumber;
@Transactional
public AjaxResult zipImport(MultipartFile file, Long templateId) { public AjaxResult zipImport(MultipartFile file, Long templateId) {
UUID uuid = UUID.randomUUID(); UUID uuid = UUID.randomUUID();
// todo // todo
@@ -113,51 +118,14 @@ public class CaseZipImportImpl {
boolean unzipSuccess = UnZipFileUtils.unZipFile(zipFile, targetPath); boolean unzipSuccess = UnZipFileUtils.unZipFile(zipFile, targetPath);
if (!unzipSuccess) { if (!unzipSuccess) {
// 解压失败 // 解压失败
return AjaxResult.error("解压失败"); throw new ServiceException("解压失败");
} }
// 查询抓取规则 // 查询抓取规则
// todo 批次需要再上传压缩包时用户填写 // todo 批次需要再上传压缩包时用户填写
List<FatchRule> fatchRuleList = fatchRuleMapper.listByTemplateId(templateId); List<FatchRule> fatchRuleList = fatchRuleMapper.listByTemplateId(templateId);
if (CollectionUtil.isEmpty(fatchRuleList)) { if (CollectionUtil.isEmpty(fatchRuleList)) {
return error("未设置抓取规则"); throw new ServiceException("未设置抓取规则");
} }
File directory = new File(targetPath);
// fileMap<caseId, List<File>>
Map<Long, List<File>> fileMap = findAndConvertPDF(directory);
if (fileMap == null || fileMap.size() <= 0) {
// 解压失败
return AjaxResult.error("未获取到文件");
}
Map<String, String> fatchMap = new HashMap<>();
if (CollectionUtil.isNotEmpty(fatchRuleList)) {
Map<String, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getFileName));
// 根据抓取规则循环抓取
fileMap.forEach((key, fileList) -> {
if (CollectionUtil.isNotEmpty(fileList)) {
for (File caseFile : fileList) {
if (fatchRuleMap.containsKey(caseFile.getName())) {
// 抓取内容
List<FatchRule> fatchRules = fatchRuleMap.get(caseFile.getName());
getFatchContentList(caseFile, fatchMap, fatchRules, key);
}
}
}
});
}
if (fatchMap.size() <= 0) {
return error("从压缩包中未抓取到内容,请检查抓取字段配置");
}
// 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1956159");
// 新增的案件
List<CaseApplication> caseApplications = new ArrayList<>();
// 从抓取规则表取字段和字典表取基本字段,字典表的字段名塞到基本表,is_default=1自定义字段塞到columnValue
// 抓取规则,0-内置字段,1-自定义字段
Map<Integer, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
// 在系统表中查询案件内置字段 // 在系统表中查询案件内置字段
SysDictData sysDictData = new SysDictData(); SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("case_built_type"); sysDictData.setDictType("case_built_type");
@@ -170,25 +138,8 @@ public class CaseZipImportImpl {
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV)); deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
} }
// 角色用户
List<SysUserRole> userRoleList = new ArrayList<>();
// 查询申请人角色id // 查询申请人角色id
roleId = roleMapper.selectRoleIdByName("申请人"); roleId = roleMapper.selectRoleIdByName("申请人");
// 案件基本信息
caseApplications = new ArrayList<>();
// 自定义字段,组装columnValue表
List<ColumnValue> columnValueList = new ArrayList<>();
// 案件人员
List<CaseAffiliate> caseAffiliates = new ArrayList<>();
// 组装机构
List<SysDept> sysDepts = new ArrayList<>();
// 案件附件
List<CaseAttach> caseAttachs = new ArrayList<>();
//发送短信列表
List<SmsSendRecord> smsSendRecordList = new ArrayList<>();
// 短信记录
List<SmsUtils.SendSmsRequest> smsRequestList = new ArrayList<>();
/** /**
* 用户表已存在的用户 * 用户表已存在的用户
*/ */
@@ -201,177 +152,360 @@ public class CaseZipImportImpl {
String currentDay = DateUtils.dateTime(); String currentDay = DateUtils.dateTime();
String caseNum = "zc" + currentDay; String caseNum = "zc" + currentDay;
maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum, caseNum.length()); maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum, caseNum.length());
// 需要新增的用户 // 抓取内容
List<SysUser> addUsers = new ArrayList<>(); Map<String, String> fatchMap = new HashMap<>();
for (Long caseId : fileMap.keySet()) { // 从抓取规则表取字段和字典表取基本字段,字典表的字段名塞到基本表,is_default=1自定义字段塞到columnValue
if (CollectionUtil.isEmpty(fileMap.get(caseId))) { // 抓取规则,0-内置字段,1-自定义字段
continue; Map<String, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getFileName));
}
CaseApplication caseApplication = new CaseApplication();
caseApplications.add(caseApplication);
caseApplication.setId(caseId);
caseApplication.setTemplateId(templateId);
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION); File directory = new File(targetPath);
caseApplication.setCaseLogId(IdWorkerUtil.getId()); if (!directory.exists()) {
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode()); throw new ServiceException("文件不存在");
caseApplication.setCaseAppliId(caseApplication.getId()); }
//默认案件标的 todo 案件标的是什么,默认写死 // 找出案件文件夹
caseApplication.setCaseSubjectAmount(new BigDecimal(100000)); if (!directory.isDirectory() || directory.listFiles() == null) {
//todo 暂时设置计费比率为0.01 throw new ServiceException("未找到文件夹");
BigDecimal feeRate = new BigDecimal(0.01); }
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP); Integer maxBatchNumber = caseApplicationMapper.selectBatchNumberLike();
caseApplication.setFeePayable(feePayable); if (maxBatchNumber == null) {
// 设置批号 maxBatchNumber = 1;
if (StrUtil.isEmpty(caseApplication.getBatchNumber())) {
maxBatchNumber = caseApplicationMapper.selectBatchNumberLike(); } else {
if (maxBatchNumber == null) { maxBatchNumber = maxBatchNumber + 1;
maxBatchNumber = 1;
caseApplication.setBatchNumber(maxBatchNumber.toString()); }
} else { File[] files = directory.listFiles();
maxBatchNumber = maxBatchNumber + 1; CaseZipImportTask caseZipImportTask = null;
caseApplication.setBatchNumber(maxBatchNumber.toString()); try {
caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchMap, fatchRuleMap, userMap, dictDataList, files , deptMap, SecurityUtils.getLoginUser(),maxBatchNumber);
} catch (Exception e) {
return error("导入失败");
}
Future<List<CaseApplication>> future = ThreadPoolUtil.submit(caseZipImportTask);
try {
if(future.get()!=null){
return success("导入成功");
}
} catch (InterruptedException e) {
e.printStackTrace();
return success("导入失败");
} catch (ExecutionException e) {
e.printStackTrace();
return success("导入失败");
}
return error("导入失败");
}
@Transactional
public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap, Map<String, String> fatchMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser, Integer maxBatchNumber) {
// fileMap<caseId, List<File>>
Map<String, String> fileMap = findFile(file, fatchRuleList);
if (fileMap != null && fileMap.size()> 0) {
// 根据抓取规则循环抓取
for (Map.Entry<String, List<FatchRule>> entry : fatchRuleMap.entrySet()) {
getFatchContent(fileMap, entry.getKey(), fatchMap, entry.getValue());
}
if (fatchMap.size() > 0) {
// 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1956159");
// 新增的案件
// 组装案件内置字段主表内容
CaseApplication caseApplication = new CaseApplication();
caseApplication.setId(IdWorkerUtil.getId());
caseApplication.setTemplateId(templateId);
Map<Integer, List<FatchRule>> defaultRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
// 自定义字段,组装columnValue表
List<ColumnValue> columnValueList = new ArrayList<>();
if (defaultRuleMap.size() > 0 && defaultRuleMap.containsKey(1)) {
List<FatchRule> columnRules = defaultRuleMap.get(1);
columnRules.forEach(columnRule -> {
ColumnValue columnValue = new ColumnValue();
columnValue.setColumn(columnRule.getColumn());
columnValue.setName(columnRule.getColumnName());
columnValue.setValue(fatchMap.get(columnRule.getColumnName()));
columnValue.setIsDefault(1);
columnValue.setCaseId(caseApplication.getId());
columnValueList.add(columnValue);
});
caseApplication.setColumnValues(columnValueList);
} }
}
// 设置编号
String maxCaseNumStr = generateCaseNum();
caseApplication.setCaseNum(maxCaseNumStr);
caseApplication.setCreateBy(getUsername());
caseApplication.setVersion(1);
// 组装案件内置字段主表内容
if (fatchRuleMap.size() > 0 && fatchRuleMap.containsKey(1)) { // 角色用户
List<FatchRule> columnRules = fatchRuleMap.get(1); List<SysUserRole> userRoleList = new ArrayList<>();
columnRules.forEach(columnRule -> {
ColumnValue columnValue = new ColumnValue(); // 组装机构
columnValue.setColumn(columnRule.getColumn()); List<SysDept> sysDepts = new ArrayList<>();
columnValue.setName(columnRule.getColumnName()); // 案件附件
columnValue.setName(columnRule.getColumnName()); List<CaseAttach> caseAttachs = new ArrayList<>();
columnValue.setValue(fatchMap.get(columnRule.getColumnName() + Constants.PDFSTR + caseId)); //发送短信列表
columnValue.setIsDefault(1); List<SmsSendRecord> smsSendRecordList = new ArrayList<>();
columnValue.setCaseId(caseId); // 短信记录
columnValue.setCaseAppliLogId(caseApplication.getCaseLogId()); List<SmsUtils.SendSmsRequest> smsRequestList = new ArrayList<>();
columnValueList.add(columnValue);
// 需要新增的用户
List<SysUser> addUsers = new ArrayList<>();
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
caseApplication.setCaseLogId(IdWorkerUtil.getId());
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
caseApplication.setCaseAppliId(caseApplication.getId());
// 设置批号
caseApplication.setBatchNumber(maxBatchNumber);
// 设置编号
String maxCaseNumStr = generateCaseNum();
caseApplication.setCaseNum(maxCaseNumStr);
caseApplication.setCreateBy(loginUser!=null?loginUser.getUsername():"admin");
caseApplication.setVersion(1);
// 组装案件内置字段主表内容
// 组装内置字段
buildDefaultColumn(caseApplication, dictDataList, fatchMap, deptMap, sysDepts, userMap, addUsers, userRoleList, smsSendRecordList, smsRequestList);
// 组装附件
for (Map.Entry<String, String> entry : fileMap.entrySet()) {
String fileUrl = entry.getValue();
if (StrUtil.isEmpty(fileUrl)) {
continue;
}
// 上传
String filePath = RuoYiConfig.getUploadPath();
CaseAttach caseAttach = new CaseAttach();
caseAttach.setCaseAppliId(caseApplication.getId());
caseAttach.setAnnexPath(filePath);
if (StrUtil.isNotEmpty(fileUrl)) {
String fileName = fileUrl.replace(filePath, "/profile/upload");
caseAttach.setAnnexName(fileName);
}
// 申请人提供的证据材料
caseAttach.setAnnexType(2);
caseAttachs.add(caseAttach);
if (fileUrl.contains("仲裁申请书")) {
CaseAttach applyFile = new CaseAttach();
BeanUtil.copyProperties(caseAttach, applyFile);
applyFile.setAnnexType(1);
caseAttachs.add(applyFile);
}
}
caseApplication.setCaseAttachList(caseAttachs);
// 案件压缩包导入
caseApplication.setImportFlag(2);
// 多线程执行
// List<MultipleThreadListParam> execList = new ArrayList<>();
// if (CollectionUtil.isNotEmpty(addUsers)) {
// Function<List<SysUser>, Integer> function = userMapper::batchSave;
// execList.add(new MultipleThreadListParam(function, addUsers));
// }
// if (CollectionUtil.isNotEmpty(userRoleList)) {
// Function<List<SysUserRole>, Integer> function = userRoleMapper::batchUserRole;
// execList.add(new MultipleThreadListParam(function, userRoleList));
//
// }
// if (CollectionUtil.isNotEmpty(sysDepts)) {
// Function<List<SysDept>, Integer> function = sysDeptMapper::batchSave;
// execList.add(new MultipleThreadListParam(function, sysDepts));
//
// }
// if (CollectionUtil.isNotEmpty(caseApplications)) {
// Function<List<CaseApplication>, Integer> function = caseApplicationMapper::batchSave;
// execList.add(new MultipleThreadListParam(function, caseApplications));
// Function<List<CaseApplication>, Integer> functionLog = caseApplicationLogMapper::batchSave;
// execList.add(new MultipleThreadListParam(functionLog, caseApplications));
//
// }
// if (CollectionUtil.isNotEmpty(caseAffiliates)) {
// Function<List<CaseAffiliate>, Integer> function = caseAffiliateMapper::batchCaseAffiliate;
// execList.add(new MultipleThreadListParam(function, caseAffiliates));
// Function<List<CaseAffiliate>, Integer> functionLog = caseAffiliateLogMapper::batchCaseAffiliate;
// execList.add(new MultipleThreadListParam(functionLog, caseAffiliates));
// }
// if (CollectionUtil.isNotEmpty(caseAttachs)) {
// Function<List<CaseAttach>, Integer> function = caseAttachMapper::batchSave;
// execList.add(new MultipleThreadListParam(function, caseAttachs));
// Function<List<CaseAttach>, Integer> functionLog = caseAttachLogMapper::batchSave;
// execList.add(new MultipleThreadListParam(functionLog, caseAttachs));
// }
// if (CollectionUtil.isNotEmpty(columnValueList)) {
// Function<List<ColumnValue>, Integer> function = columnValueMapper::batchSave;
// execList.add(new MultipleThreadListParam(function, columnValueList));
// Function<List<ColumnValue>, Integer> functionLog = columnValueLogMapper::batchSave;
// execList.add(new MultipleThreadListParam(functionLog, columnValueList));
// }
// if (CollectionUtil.isNotEmpty(execList)) {
// MultipleThreadWorkUtil.execListFun(execList.toArray(new MultipleThreadListParam[execList.size()]));
// }
// 多线程执行
ThreadPoolUtil.execute(() -> {
try {
caseApplicationMapper.insertCaseApplication(caseApplication);
caseApplicationLogMapper.insert(caseApplication);
// 多线程执行
if (CollectionUtil.isNotEmpty(addUsers)) {
userMapper.batchSave(addUsers);
}
if (CollectionUtil.isNotEmpty(userRoleList)) {
userRoleMapper.batchUserRole(userRoleList);
}
if (CollectionUtil.isNotEmpty(sysDepts)) {
sysDeptMapper.batchSave(sysDepts);
}
if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
}
if (CollectionUtil.isNotEmpty(caseAttachs)) {
caseAttachMapper.batchSave(caseAttachs);
caseAttachLogMapper.batchSave(caseAttachs);
}
if (CollectionUtil.isNotEmpty(columnValueList)) {
columnValueMapper.batchSave(columnValueList);
columnValueLogMapper.batchSave(columnValueList);
}
// 新增日志
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
// 发送短信
if (CollectionUtil.isNotEmpty(smsRequestList)) {
Map<Long, SmsSendRecord> sendRecordMap = null;
if (CollectionUtil.isNotEmpty(smsSendRecordList)) {
sendRecordMap = smsSendRecordList.stream().collect(Collectors.toMap(SmsSendRecord::getCaseId, Function.identity()));
for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
Boolean aBoolean = SmsUtils.sendSms(request);
if (sendRecordMap != null && sendRecordMap.containsKey(sendSmsRequest.getCaseId())) {
if (aBoolean) {
sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(1);
} else {
sendRecordMap.get(sendSmsRequest.getCaseId()).setSendStatus(0);
}
}
}
smsRecordMapper.batchSaveSmsSendRecord(smsSendRecordList);
}
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("导入失败,请检查抓取规则是否正确");
}
}); });
return caseApplication;
} }
caseApplication.setColumnValues(columnValueList); }
// 组装内置字段 return null;
buildDefaultColumn(caseApplication, dictDataList, fatchMap, caseAffiliates, deptMap, sysDepts, userMap, addUsers, userRoleList, smsSendRecordList, smsRequestList); }
for (File caseFile : fileMap.get(caseId)) {
String fileUrl = caseFile.getAbsolutePath(); /**
if (StrUtil.isEmpty(fileUrl)) { * 获取抓取内容
*
* @param andConvertPDF 文件路径map
* @param mapKey 文件名
* @param map 抓取内容map
* @param fatchRules 抓取规则
*/
private void getFatchContent(Map<String, String> andConvertPDF, String mapKey, Map<String, String> map, List<FatchRule> fatchRules) {
String fileURL =null;
for (Map.Entry<String, String> entry : andConvertPDF.entrySet()) {
if(entry.getKey().contains(mapKey)){
fileURL=entry.getValue();
}
}
if (StrUtil.isEmpty(fileURL)) {
return;
}
if (fileURL.endsWith("txt")) {
String readerFile = ReadFileUtils.readerTxtFile(fileURL);
OCRUtils.fatchRuleGetContent(readerFile, fatchRules, map);
} else if (fileURL.endsWith("doc") || fileURL.endsWith("docx")) {
// doc,docx,text识别内容
String readerFile = null;
try {
readerFile = ReadFileUtils.readWord(fileURL);
} catch (Exception e) {
e.printStackTrace();
}
OCRUtils.fatchRuleGetContent(readerFile, fatchRules, map);
} else if (fileURL.endsWith("pdf")) {
//获取文件的页数
int fileNumPage = getFileNumPage(fileURL);
//文件转成base64
String base64 = OCRUtils.pdfConvertBase64(fileURL);
if (base64 == null) {
throw new ServiceException("pdf转base64失败");
// return false;
}
StringBuilder ocrText = new StringBuilder(); // 创建一个StringBuilder对象
for (int i = 1; i <= fileNumPage; i++) {
//对接腾讯云接口.识别里面的数据
String text = OCRUtils.pdfIdentifyText(base64, i, fatchRules);
ocrText.append(text); // 拼接当前的字符串
}
// 根据抓取规则截取内容
OCRUtils.fatchRuleGetContent(ocrText.toString(), fatchRules, map);
}
}
/**
* 查找文件
*
* @param directory
* @param fatchRuleList
* @return
*/
private Map<String, String> findFile(File directory, List<FatchRule> fatchRuleList) {
Map<String, String> filePathMap = new HashMap<>();
if (directory.isFile()) {
String path = "";
// 如果传入的参数是一个文件
path = directory.getAbsolutePath();
filePathMap.put(directory.getName(), path);
} else if (directory.isDirectory()) {
searchAndConvertPDF(directory, filePathMap);
} else {
return null;
}
return filePathMap;
}
/**
* 递归查找文件夹
*
* @param directory
* @param filePathMap
*/
public static void searchAndConvertPDF(File directory, Map<String, String> filePathMap) {
File[] files = directory.listFiles();
if (files != null) {
for (File file : files) {
if (file.getName().contains("zip") || file.getName().contains("rar")) {
continue; continue;
} }
// 上传 if (file.isFile()) {
String filePath = RuoYiConfig.getUploadPath();
CaseAttach caseAttach = new CaseAttach(); filePathMap.put(file.getName(), file.getAbsolutePath());
caseAttach.setCaseAppliId(caseApplication.getId()); } else if (file.isDirectory()) {
caseAttach.setCaseAppliLogId(caseApplication.getCaseLogId()); // 如果是目录,递归查找
caseAttach.setAnnexPath(filePath); searchAndConvertPDF(file, filePathMap);
if (StrUtil.isNotEmpty(fileUrl)) {
String fileName = fileUrl.replace(filePath, "/profile/upload");
caseAttach.setAnnexName(fileName);
}
// 申请人提供的证据材料
caseAttach.setAnnexType(2);
caseAttachs.add(caseAttach);
if (fileUrl.contains("仲裁申请书")) {
CaseAttach applyFile = new CaseAttach();
BeanUtil.copyProperties(caseAttach, applyFile);
applyFile.setAnnexType(1);
caseAttachs.add(applyFile);
} }
} }
// 案件压缩包导入
caseApplication.setImportFlag(2);
// 组装短信
} }
// 多线程执行
List<MultipleThreadListParam> execList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(addUsers)) {
Function<List<SysUser>, Integer> function = userMapper::batchSave;
execList.add(new MultipleThreadListParam(function, addUsers));
}
if (CollectionUtil.isNotEmpty(userRoleList)) {
Function<List<SysUserRole>, Integer> function = userRoleMapper::batchUserRole;
execList.add(new MultipleThreadListParam(function, userRoleList));
}
if (CollectionUtil.isNotEmpty(sysDepts)) {
Function<List<SysDept>, Integer> function = sysDeptMapper::batchSave;
execList.add(new MultipleThreadListParam(function, sysDepts));
}
if (CollectionUtil.isNotEmpty(caseApplications)) {
Function<List<CaseApplication>, Integer> function = caseApplicationMapper::batchSave;
execList.add(new MultipleThreadListParam(function, caseApplications));
Function<List<CaseApplication>, Integer> functionLog = caseApplicationLogMapper::batchSave;
execList.add(new MultipleThreadListParam(functionLog, caseApplications));
}
if (CollectionUtil.isNotEmpty(caseAffiliates)) {
Function<List<CaseAffiliate>, Integer> function = caseAffiliateMapper::batchCaseAffiliate;
execList.add(new MultipleThreadListParam(function, caseAffiliates));
Function<List<CaseAffiliate>, Integer> functionLog = caseAffiliateLogMapper::batchCaseAffiliate;
execList.add(new MultipleThreadListParam(functionLog, caseAffiliates));
}
if (CollectionUtil.isNotEmpty(caseAttachs)) {
Function<List<CaseAttach>, Integer> function = caseAttachMapper::batchSave;
execList.add(new MultipleThreadListParam(function, caseAttachs));
Function<List<CaseAttach>, Integer> functionLog = caseAttachLogMapper::batchSave;
execList.add(new MultipleThreadListParam(functionLog, caseAttachs));
}
if (CollectionUtil.isNotEmpty(columnValueList)) {
Function<List<ColumnValue>, Integer> function = columnValueMapper::batchSave;
execList.add(new MultipleThreadListParam(function, columnValueList));
Function<List<ColumnValue>, Integer> functionLog = columnValueLogMapper::batchSave;
execList.add(new MultipleThreadListParam(functionLog, columnValueList));
}
if (CollectionUtil.isNotEmpty(execList)) {
MultipleThreadWorkUtil.execListFun(execList.toArray(new MultipleThreadListParam[execList.size()]));
}
if (CollectionUtil.isNotEmpty(caseApplications)) {
LoginUser loginUser = SecurityUtils.getLoginUser();
List<CaseLogRecord> logRecords = new ArrayList<>();
caseApplications.forEach(caseApplication -> {
CaseLogRecord operLog = new CaseLogRecord();
// 获取当前的用户
if (loginUser != null) {
SysUser user = loginUser.getUser();
operLog.setCreateBy(user.getUserName());
operLog.setCreateNickName(user.getNickName());
operLog.setUpdateBy(user.getUserName());
} else {
operLog.setCreateBy("admin");
operLog.setCreateNickName("管理员");
operLog.setUpdateBy("admin");
}
operLog.setCaseAppliId(caseApplication.getId());
operLog.setCaseNode(CaseApplicationConstants.CASE_APPLICATION);
logRecords.add(operLog);
}
);
// todo 发送短信
// ThreadPoolUtil.execute(() -> {
// CaseLogUtils.batchInsertCaseLog(logRecords);
// // 发送短信
// if (CollectionUtil.isNotEmpty(smsRequestList)) {
// for (SmsUtils.SendSmsRequest sendSmsRequest : smsRequestList) {
// Boolean aBoolean = SmsUtils.sendSms(request);
// }
// }
//
// }
//
// );
}
// 案件日志
return success("导入成功");
} }
/** /**
@@ -575,13 +709,14 @@ public class CaseZipImportImpl {
* @param fatchMap 抓取字段内容 * @param fatchMap 抓取字段内容
*/ */
private void buildDefaultColumn(CaseApplication caseApplication, List<SysDictData> dictDataList, Map<String, String> fatchMap, private void buildDefaultColumn(CaseApplication caseApplication, List<SysDictData> dictDataList, Map<String, String> fatchMap,
List<CaseAffiliate> caseAffiliates, Map<String, Long> deptMap, List<SysDept> sysDepts, Map<String, Long> deptMap, List<SysDept> sysDepts,
Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList, Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList,
List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) { List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) {
// 组装内置字段 // 组装内置字段
if (CollectionUtil.isEmpty(dictDataList)) { if (CollectionUtil.isEmpty(dictDataList)) {
return; return;
} }
List<CaseAffiliate> caseAffiliates = new ArrayList<>();
// 被申请人 // 被申请人
CaseAffiliate debtorAffiliate = new CaseAffiliate(); CaseAffiliate debtorAffiliate = new CaseAffiliate();
debtorAffiliate.setCaseAppliId(caseApplication.getId()); debtorAffiliate.setCaseAppliId(caseApplication.getId());
@@ -598,22 +733,38 @@ public class CaseZipImportImpl {
} else if (dictData.getDictLabel().contains("申请人") || dictData.getDictLabel().contains("统一社会信用代码") } else if (dictData.getDictLabel().contains("申请人") || dictData.getDictLabel().contains("统一社会信用代码")
|| dictData.getDictLabel().contains("法定代表人") || dictData.getDictLabel().contains("委托代理人")) { || dictData.getDictLabel().contains("法定代表人") || dictData.getDictLabel().contains("委托代理人")) {
// 组装申请人内置自段 // 组装申请人内置自段
buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication.getId(), smsSendRecords, smsRequestList); buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication, smsSendRecords, smsRequestList);
} else if (dictData.getDictLabel().contains("合同编号")) { } else if (dictData.getDictLabel().contains("合同编号")) {
// 合同编号 // 合同编号
String contractNumber = fatchMap.get("合同编号" + Constants.PDFSTR + caseApplication.getId()); String contractNumber = fatchMap.get("合同编号" );
if (StrUtil.isNotEmpty(contractNumber)) { if (StrUtil.isNotEmpty(contractNumber)) {
// 提取字母和数字 // 提取字母和数字
String regx = "[^a-zA-Z0-9]"; String regx = "[^a-zA-Z0-9]";
String replaceAll = contractNumber.replaceAll(regx, ""); String replaceAll = contractNumber.replaceAll(regx, "");
caseApplication.setContractNumber(replaceAll.toUpperCase()); caseApplication.setContractNumber(replaceAll.toUpperCase());
} }
} else if (dictData.getDictLabel().contains("案件标的")) {
String caseSubjectAmount = fatchMap.get(dictData.getDictLabel());
if(StrUtil.isNotEmpty(caseSubjectAmount)) {
try {
BigDecimal bigDecimal = new BigDecimal(caseSubjectAmount);
caseApplication.setCaseSubjectAmount(bigDecimal);
// todo 案件标的名字要改,字典配置中也要改
//todo 暂时设置计费比率为0.01
BigDecimal feeRate = new BigDecimal(0.01);
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
caseApplication.setFeePayable(feePayable);
} catch (Exception e) {
}
}
} else { } else {
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())); ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
} }
} else { } else {
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())); ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
} }
@@ -624,7 +775,7 @@ public class CaseZipImportImpl {
if (ObjectUtil.isNotEmpty(debtorAffiliate)) { if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
caseAffiliates.add(debtorAffiliate); caseAffiliates.add(debtorAffiliate);
} }
caseApplication.setCaseAffiliates(caseAffiliates);
} }
@@ -637,7 +788,7 @@ public class CaseZipImportImpl {
*/ */
private void buildAffilcateColumn(SysDictData dictData, Map<String, String> fatchMap, CaseAffiliate affiliate, private void buildAffilcateColumn(SysDictData dictData, Map<String, String> fatchMap, CaseAffiliate affiliate,
Map<String, Long> deptMap, List<SysDept> sysDepts, Map<String, Long> deptMap, List<SysDept> sysDepts,
Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList, Long caseId, Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList, CaseApplication caseApplication,
List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) { List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) {
affiliate.setIdentityType(1); affiliate.setIdentityType(1);
@@ -645,7 +796,7 @@ public class CaseZipImportImpl {
// 申请人 // 申请人
switch (dictData.getDictLabel()) { switch (dictData.getDictLabel()) {
case "申请人姓名": case "申请人姓名":
affiliate.setName((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId))); affiliate.setName((fatchMap.get(dictData.getDictLabel())));
if (StrUtil.isNotEmpty(affiliate.getName())) { if (StrUtil.isNotEmpty(affiliate.getName())) {
// 组装申请机构 // 组装申请机构
// 将组织机构id设为申请人名称 // 将组织机构id设为申请人名称
@@ -673,25 +824,25 @@ public class CaseZipImportImpl {
} }
break; break;
case "统一社会信用代码": case "统一社会信用代码":
affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId))); affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel())));
break; break;
case "法定代表人": case "法定代表人":
affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel()));
break; break;
case "法定代表人职位": case "法定代表人职位":
affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId))); affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel())));
break; break;
case "申请人住所": case "申请人住所":
affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId))); affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel())));
break; break;
case "申请人联系地址": case "申请人联系地址":
affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel()));
break; break;
case "委托代理人姓名": case "委托代理人姓名":
affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel()));
break; break;
case "委托代理人联系电话": case "委托代理人联系电话":
affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel()));
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) { if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
SysUser agentUser = null; SysUser agentUser = null;
// 用户已存在 // 用户已存在
@@ -736,31 +887,34 @@ public class CaseZipImportImpl {
} }
if (addUsers != null) { if (addUsers != null) {
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest(); SysUser finalAgentUser = agentUser;
request.setTemplateId("1956159"); if (CollectionUtil.isNotEmpty(smsRequestList) && smsRequestList.stream().noneMatch(smsSendRecord -> smsSendRecord.getPhone().equals(finalAgentUser.getPhonenumber()))) {
request.setPhone(agentUser.getPhonenumber()); SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateParamSet(new String[]{agentUser.getNickName()}); request.setTemplateId("1956159");
SmsSendRecord smsSendRecord = new SmsSendRecord(); request.setPhone(agentUser.getPhonenumber());
smsSendRecord.setCaseId(caseId); request.setTemplateParamSet(new String[]{agentUser.getNickName()});
CaseApplication caseApplication = new CaseApplication(); smsRequestList.add(request);
caseApplication.setId(caseId); SmsSendRecord smsSendRecord = new SmsSendRecord();
smsSendRecord.setCaseNum(caseApplication.getCaseNum()); smsSendRecord.setCaseId(caseApplication.getId());
smsSendRecord.setPhone(request.getPhone()); smsSendRecord.setCaseNum(caseApplication.getCaseNum());
smsSendRecord.setSendTime(new Date()); smsSendRecord.setPhone(request.getPhone());
String content = "尊敬的" + agentUser.getNickName() + ",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信"; smsSendRecord.setSendTime(new Date());
smsSendRecord.setSendContent(content); String content = "尊敬的" + agentUser.getNickName() + ",您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信";
smsSendRecord.setCreateBy(getUsername()); smsSendRecord.setSendContent(content);
smsSendRecords.add(smsSendRecord); smsSendRecord.setCreateBy(getUsername());
smsRequestList.add(request); smsSendRecords.add(smsSendRecord);
}
} }
} }
break; break;
case "委托代理人电子邮件": case "委托代理人电子邮件":
affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId).replace("\n", "").replaceAll("\\s", "") : null); affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel())) ? fatchMap.get(dictData.getDictLabel()).replace("\n", "").replaceAll("\\s", "") : null);
break; break;
default: default:
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
break; break;
} }
} }
@@ -793,11 +947,11 @@ public class CaseZipImportImpl {
// 被申请人 // 被申请人
switch (dictData.getDictLabel()) { switch (dictData.getDictLabel()) {
case "被申请人姓名": case "被申请人姓名":
debtorAffiliate.setName(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); debtorAffiliate.setName(fatchMap.get(dictData.getDictLabel() ));
break; break;
case "被申请人身份证号": case "被申请人身份证号":
String identityNum = fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId); String identityNum = fatchMap.get(dictData.getDictLabel() );
debtorAffiliate.setIdentityNum(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); debtorAffiliate.setIdentityNum(fatchMap.get(dictData.getDictLabel() ));
// 出生年月日,从身份证抓取 // 出生年月日,从身份证抓取
if (StrUtil.isNotEmpty(identityNum)) { if (StrUtil.isNotEmpty(identityNum)) {
identityNum = identityNum.replace("\n", ""); identityNum = identityNum.replace("\n", "");
@@ -819,13 +973,13 @@ public class CaseZipImportImpl {
break; break;
case "被申请人住所": case "被申请人住所":
debtorAffiliate.setResidenAffili(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); debtorAffiliate.setResidenAffili(fatchMap.get(dictData.getDictLabel() ));
break; break;
case "被申请人联系电话": case "被申请人联系电话":
debtorAffiliate.setContactTelphone(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)); debtorAffiliate.setContactTelphone(fatchMap.get(dictData.getDictLabel() ));
break; break;
case "被申请人电子邮件": case "被申请人电子邮件":
debtorAffiliate.setEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId).replace("\n", "").replaceAll("\\s", "") : null); debtorAffiliate.setEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() )) ? fatchMap.get(dictData.getDictLabel() ).replace("\n", "").replaceAll("\\s", "") : null);
break; break;
default: default:
@@ -291,12 +291,14 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
if (annexId != null) { if (annexId != null) {
//根据附件id查询路径 //根据附件id查询路径
CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId); CaseAttach caseAttach = caseAttachMapper.queryAnnexById(annexId);
String annexName = caseAttach.getAnnexName(); if(caseAttach!=null){
String prefix = "/profile"; String annexName = caseAttach.getAnnexName();
int startIndex = annexName.indexOf(prefix); String prefix = "/profile";
startIndex += prefix.length(); int startIndex = annexName.indexOf(prefix);
String annexPath = "/uploadPath" + annexName.substring(startIndex); startIndex += prefix.length();
sealManage1.setAnnexPath(annexPath); String annexPath = "/uploadPath" + annexName.substring(startIndex);
sealManage1.setAnnexPath(annexPath);
}
} else { } else {
sealManage1.setAnnexPath(null); sealManage1.setAnnexPath(null);
} }
@@ -7,6 +7,7 @@ import com.ruoyi.wisdomarbitrate.mapper.TemplateManualMapper;
import com.ruoyi.wisdomarbitrate.service.ITemplateService; import com.ruoyi.wisdomarbitrate.service.ITemplateService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
@Service @Service
@@ -14,6 +15,7 @@ public class TemplateServiceImpl implements ITemplateService {
@Autowired @Autowired
private TemplateManualMapper templateManualMapper; private TemplateManualMapper templateManualMapper;
@Override @Override
@Transactional
public AjaxResult insertTemplate(TemplateManual templateManual) { public AjaxResult insertTemplate(TemplateManual templateManual) {
int i = templateManualMapper.insertTemplateManual(templateManual); int i = templateManualMapper.insertTemplateManual(templateManual);
if (i>0){ if (i>0){
@@ -23,6 +25,7 @@ public class TemplateServiceImpl implements ITemplateService {
} }
@Override @Override
@Transactional
public AjaxResult deleteTemplate(Long id) { public AjaxResult deleteTemplate(Long id) {
TemplateManual templateManual = new TemplateManual(); TemplateManual templateManual = new TemplateManual();
templateManual.setId(id); templateManual.setId(id);
@@ -35,6 +38,7 @@ public class TemplateServiceImpl implements ITemplateService {
} }
@Override @Override
@Transactional
public AjaxResult updateTemplate(TemplateManual templateManual) { public AjaxResult updateTemplate(TemplateManual templateManual) {
int i = templateManualMapper.updateTemplateManual(templateManual); int i = templateManualMapper.updateTemplateManual(templateManual);
if (i > 0) { if (i > 0) {
@@ -3,6 +3,7 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@@ -118,8 +119,8 @@ public class VideoServiceImpl implements VideoService {
Integer eventType = jsonObject.getInteger("EventType"); // 事件类型 Integer eventType = jsonObject.getInteger("EventType"); // 事件类型
String eventInfo = jsonObject.getString("EventInfo"); // 事件信息 String eventInfo = jsonObject.getString("EventInfo"); // 事件信息
JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo); JSONObject jsonObject1 = (JSONObject) JSON.parse(eventInfo);
String roomId = jsonObject1.getString("RoomId"); String roomId = jsonObject1.getString("RoomId");
String taskId = jsonObject1.getString("TaskId"); // 任务ID String taskId = jsonObject1.getString("TaskId"); // 任务ID
String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同 String payload = jsonObject1.getString("Payload"); // 根据不同事件类型定义不同
JSONObject jsonObject2 = (JSONObject) JSON.parse(payload); JSONObject jsonObject2 = (JSONObject) JSON.parse(payload);
String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息 String tencentVod = jsonObject2.getString("TencentVod"); // 点播平台信息
@@ -134,10 +135,27 @@ public class VideoServiceImpl implements VideoService {
String mediaId = jsonObject3.getString("MediaId"); String mediaId = jsonObject3.getString("MediaId");
// 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载 // 建立相关的数据库用来存储音视频录制地址并和相关的业务ID绑定,用于后续下载
try { try {
downloadImage(fileId,videoUrl,roomId); // 调解系统roomId>4294967294L/2
if(StrUtil.isNotEmpty(roomId)) {
log.debug("roomId:" + roomId);
if (Long.valueOf(roomId) > 4294967294L / 2) {
log.debug("调用调解系统:" );
log.debug("回调jsonObject:"+jsonObject );
// 调用调解系统
cn.hutool.json.JSONObject params = JSONUtil.createObj();
params.set("roomId",roomId);
params.set("fileId",fileId);
params.set("videoUrl",videoUrl);
String post = HttpUtil.post("http://121.40.189.20:7001/video/videoRollBack", params.toJSONString(2));
throw new RuntimeException(post);
} else {
downloadImage(fileId, videoUrl, roomId);
}
}
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException("roomId:"+roomId);
} }
} }
@@ -174,6 +192,8 @@ public class VideoServiceImpl implements VideoService {
return success(caseAttachList); return success(caseAttachList);
} }
/** /**
* 开启腾讯云录制 * 开启腾讯云录制
* @param roomId * @param roomId
@@ -0,0 +1,72 @@
package com.ruoyi.wisdomarbitrate.task;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.FatchRule;
import com.ruoyi.wisdomarbitrate.service.impl.CaseZipImportImpl;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
/**
* @description rbd调用xfta计算任务类
* @Author mingYang
* @Date 2021/11/12 15:35
* @Version V1.0
**/
public class CaseZipImportTask implements Callable<List<CaseApplication>> {
private CaseZipImportImpl caseZipImportImpl;
private Long templateId;
private List<FatchRule> fatchRuleList;
private Map<String, String> fatchMap;
private Map<String, List<FatchRule>> fatchRuleMap;
private Map<String, SysUser> userMap;
private List<SysDictData> dictDataList;
private File[] files;
private Map<String, Long> deptMap;
private LoginUser loginUser;
private Integer maxBatchNumber;
public CaseZipImportTask(CaseZipImportImpl caseZipImportImpl, Long templateId, List<FatchRule> fatchRuleList, Map<String, String> fatchMap, Map<String, List<FatchRule>> fatchRuleMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, File[] files, Map<String, Long> deptMap, LoginUser loginUser,Integer maxBatchNumber) {
this.caseZipImportImpl = caseZipImportImpl;
this.templateId = templateId;
this.fatchRuleList = fatchRuleList;
this.fatchMap = fatchMap;
this.fatchRuleMap = fatchRuleMap;
this.userMap = userMap;
this.dictDataList = dictDataList;
this.files = files;
this.deptMap = deptMap;
this.loginUser = loginUser;
this.maxBatchNumber = maxBatchNumber;
}
@Override
public List<CaseApplication> call() {
List<CaseApplication> caseApplications = new ArrayList<>();
try {
for (File file1 : files) {
if (file1.isDirectory() && file1.listFiles() != null) {
for (File file2 : file1.listFiles()) {
CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser,maxBatchNumber);
if (caseApplication != null) {
caseApplications.add(caseApplication);
}
}
}
}
} catch (Exception e) {
throw new RuntimeException("导入失败");
}
return caseApplications;
}
}
@@ -47,6 +47,30 @@ public class CaseLogUtils
operLog.setNotes(notes); operLog.setNotes(notes);
caseLogRecordMapper.insertCaseLogRecord(operLog); caseLogRecordMapper.insertCaseLogRecord(operLog);
} }
/**
* 新增案件日志
* @param caseAppliId 案件id,不能为空
* @param caseNode 案件节点,不能为空
* @param notes 备注
*/
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ,LoginUser loginUser ){
CaseLogRecord operLog = new CaseLogRecord();
// 获取当前的用户
if(loginUser!=null) {
SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
operLog.setCreateBy(sysUser.getUserName());
operLog.setCreateNickName(sysUser.getNickName());
operLog.setUpdateBy(sysUser.getUserName());
}else {
operLog.setCreateBy("admin");
operLog.setCreateNickName("管理员");
operLog.setUpdateBy("admin");
}
operLog.setCaseAppliId(caseAppliId);
operLog.setCaseNode(caseNode);
operLog.setNotes(notes);
caseLogRecordMapper.insertCaseLogRecord(operLog);
}
/** /**
* 批量新增案件日志 * 批量新增案件日志
* @param list * @param list
@@ -167,14 +167,14 @@ public class OCRUtils {
String endContent = fatchRule.getEndContent(); String endContent = fatchRule.getEndContent();
// 开始为空结束为空 // 开始为空结束为空
if (StrUtil.isEmpty(startContent) && StrUtil.isEmpty(endContent)) { if (StrUtil.isEmpty(startContent) && StrUtil.isEmpty(endContent)) {
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(text)); fatchMap.put(fatchRule.getColumnName(), trimStr(text));
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isEmpty(endContent)) { } else if (StrUtil.isNotEmpty(startContent) && StrUtil.isEmpty(endContent)) {
// 开始不为空结束为空 // 开始不为空结束为空
int startContIndex = StrUtil.ordinalIndexOf(text, startContent, fatchRule.getStartContentRepeatOrder()); int startContIndex = StrUtil.ordinalIndexOf(text, startContent, fatchRule.getStartContentRepeatOrder());
if (startContIndex != -1 && text.length() >= (startContIndex + startContent.length())) { if (startContIndex != -1 && text.length() >= (startContIndex + startContent.length())) {
String substring = text.substring(startContIndex + startContent.length()); String substring = text.substring(startContIndex + startContent.length());
// 去除\n // 去除\n
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring)); fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
} }
} else if (StrUtil.isEmpty(startContent) && StrUtil.isNotEmpty(endContent)) { } else if (StrUtil.isEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
@@ -182,7 +182,7 @@ public class OCRUtils {
int endContIndex = StrUtil.ordinalIndexOf(text, endContent, fatchRule.getEndContentRepeatOrder()); int endContIndex = StrUtil.ordinalIndexOf(text, endContent, fatchRule.getEndContentRepeatOrder());
if (endContIndex != -1) { if (endContIndex != -1) {
String substring = text.substring(0, endContIndex); String substring = text.substring(0, endContIndex);
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring)); fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
} }
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isNotEmpty(endContent)) { } else if (StrUtil.isNotEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
// 开始结束不为空 // 开始结束不为空
@@ -191,7 +191,7 @@ public class OCRUtils {
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + startContent.length()) && text.length() >= endIndexOf) { if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + startContent.length()) && text.length() >= endIndexOf) {
String substring = text.substring(startIndexOf + startContent.length(), endIndexOf); String substring = text.substring(startIndexOf + startContent.length(), endIndexOf);
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring)); fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
} }
} }
@@ -221,7 +221,7 @@ public class OCRUtils {
} }
// 开始和结束截取都为空 // 开始和结束截取都为空
if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) { if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(text)); fatchMap.put(fatchRule.getColumnName(), trimStr(text));
} else if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isNotEmpty(reverseEndContent)) { } else if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isNotEmpty(reverseEndContent)) {
// 开始为空,结束不为空 // 开始为空,结束不为空
// 根据截取的序号查找出位置 // 根据截取的序号查找出位置
@@ -229,7 +229,7 @@ public class OCRUtils {
if (indexOf != -1) { if (indexOf != -1) {
String substring = reverseText.substring(0, indexOf); String substring = reverseText.substring(0, indexOf);
if (StrUtil.isNotEmpty(substring)) { if (StrUtil.isNotEmpty(substring)) {
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring))); fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
} }
} }
} else if (StrUtil.isNotEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) { } else if (StrUtil.isNotEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
@@ -238,7 +238,7 @@ public class OCRUtils {
if (indexOf != -1 && (indexOf + reverseStartContent.length() <= text.length())) { if (indexOf != -1 && (indexOf + reverseStartContent.length() <= text.length())) {
String substring = reverseText.substring(indexOf + reverseStartContent.length()); String substring = reverseText.substring(indexOf + reverseStartContent.length());
if (StrUtil.isNotEmpty(substring)) { if (StrUtil.isNotEmpty(substring)) {
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring))); fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
} }
} }
@@ -249,7 +249,7 @@ public class OCRUtils {
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + reverseStartContent.length()) && text.length() >= endIndexOf) { if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + reverseStartContent.length()) && text.length() >= endIndexOf) {
String substring = reverseText.substring(startIndexOf + reverseStartContent.length(), endIndexOf); String substring = reverseText.substring(startIndexOf + reverseStartContent.length(), endIndexOf);
if (StrUtil.isNotEmpty(substring)) { if (StrUtil.isNotEmpty(substring)) {
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring))); fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
} }
} }
} }
@@ -1,5 +1,7 @@
package com.ruoyi.wisdomarbitrate.utils; package com.ruoyi.wisdomarbitrate.utils;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.JsonArray; import com.google.gson.JsonArray;
@@ -11,6 +13,7 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.EsignApplicaConfig; import com.ruoyi.common.utils.EsignApplicaConfig;
import com.ruoyi.common.utils.EsignHttpHelper; import com.ruoyi.common.utils.EsignHttpHelper;
import com.ruoyi.common.utils.SealUtil; import com.ruoyi.common.utils.SealUtil;
import com.ruoyi.wisdomarbitrate.StringIdsReq;
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify; import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord; import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
@@ -252,7 +255,7 @@ public class SignAward {
/* " \"availableSealIds\": [\n" + /* " \"availableSealIds\": [\n" +
" \"" + availableSealId + "\"\n" + " \"" + availableSealId + "\"\n" +
" ],\n" +*/ " ],\n" +*/
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" + // " \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
" \"signFieldPosition\": {\n" + " \"signFieldPosition\": {\n" +
" \"positionPage\": \"" + positionPageorg + "\",\n" + " \"positionPage\": \"" + positionPageorg + "\",\n" +
@@ -305,6 +308,50 @@ public class SignAward {
//发起接口请求 //发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false); return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
} }
/**
* 获取批量签页面链接
*
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse batchSignUrl(StringIdsReq idsReq) throws EsignDemoException {
List<String> signFlowIds = idsReq.getIds();
String psnAccount = idsReq.getPsnAccount();
String apiaddr = "/v3/sign-flow/batch-sign-url";
JSONObject paramObj = new JSONObject();
paramObj.put("operatorId",idsReq.getPsnId());
paramObj.put("signFlowIds",signFlowIds);
paramObj.put("clientType","PC");
String jsonParm = JSON.toJSONString(paramObj);
//请求方法
EsignRequestType requestType = EsignRequestType.POST;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
}
/**
* 根据手机号获取账户id
*
* @return
* @throws EsignDemoException
*/
public static EsignHttpResponse identityInfo(StringIdsReq idsReq) throws EsignDemoException {
List<String> signFlowIds = idsReq.getIds();
String psnAccount = idsReq.getPsnAccount();
String apiaddr = "/v3/persons/identity-info?psnAccount=" +psnAccount;
String jsonParm = "{}";
//请求方法
EsignRequestType requestType = EsignRequestType.GET;
//生成请求签名鉴权方式的Header
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
//发起接口请求
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
}
/** /**
* 获取合同文件用印链接 * 获取合同文件用印链接
@@ -37,7 +37,12 @@
</resultMap> </resultMap>
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult"> <select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
select c.*,s.user_id select distinct (c.id),
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
c.residen_affili,appli_agent_title,
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
from case_affiliate c from case_affiliate c
left join sys_user s on c.identity_num=s.id_card left join sys_user s on c.identity_num=s.id_card
<where> <where>
@@ -47,7 +52,12 @@
</where> </where>
</select> </select>
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult"> <select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
select c.*,s.user_id select (c.id),
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
c.residen_affili,appli_agent_title,
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
from case_affiliate c from case_affiliate c
left join sys_user s on c.identity_num=s.id_card left join sys_user s on c.identity_num=s.id_card
<where> <where>
@@ -202,25 +202,27 @@
WHERE id = #{id} WHERE id = #{id}
</delete> </delete>
<delete id="batchDeleteLog"> <delete id="batchDeleteLog">
delete a from case_affiliate_log a
join case_application_log l on l.id=a.case_appli_log_id delete from case_application_log l where l.id in
where l.id in ( <foreach collection="ids" item="item" open="(" separator="," close=")">
<foreach collection="ids" item="id" separator=","> #{item}
#{id}
</foreach> </foreach>
); ;
delete a from case_attach_log a delete from case_affiliate_log l where l.case_appli_log_id in
join case_application_log l on l.id=a.case_appli_log_id <foreach collection="ids" item="item" open="(" separator="," close=")">
where l.id in ( #{item}
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach> </foreach>
); ;
delete from case_application_log l where l.id in ( delete from case_attach_log l where l.case_appli_log_id in
<foreach collection="ids" item="id" separator=","> <foreach collection="ids" item="item" open="(" separator="," close=")">
#{id} #{item}
</foreach> </foreach>
); ;
delete from column_value_log l where l.case_appli_log_id in
<foreach collection="ids" item="item" open="(" separator="," close=")">
#{item}
</foreach>
;
</delete> </delete>
@@ -278,6 +280,12 @@
FROM case_application_log FROM case_application_log
WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1 WHERE case_appli_id = #{caseId} and version &lt; #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
</select> </select>
<select id="selectLogsByCaseIds" resultType="java.lang.Long">
select id from case_application_log where case_appli_id in
<foreach collection="ids" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseNumRuleMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.wisdomarbitrate.domain.CaseNumRule" >
<result column="id" property="id" />
<result column="rule_type" property="ruleType" />
<result column="prefixstr" property="prefixstr" />
<result column="date_format" property="dateFormat" />
<result column="dept_name" property="deptName" />
<result column="current_num" property="currentNum" />
<result column="dept_name_firchar" property="deptNameFirchar" />
</resultMap>
<insert id="insertCaseNumRule" parameterType="CaseNumRule" useGeneratedKeys="true" keyProperty="id">
insert into case_num_rule(
<if test="ruleType != null">rule_type,</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr,</if>
<if test="dateFormat != null">date_format,</if>
<if test="deptName != null and deptName != '' ">dept_name,</if>
<if test="currentNum != null and currentNum != '' ">current_num,</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar,</if>
create_by,
create_time
)values(
<if test="ruleType != null">#{ruleType},</if>
<if test="prefixstr != null and prefixstr != '' ">#{prefixstr},</if>
<if test="dateFormat != null">#{dateFormat},</if>
<if test="deptName != null and deptName != '' ">#{deptName},</if>
<if test="currentNum != null and currentNum != '' ">#{currentNum},</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">#{deptNameFirchar},</if>
#{createBy},
sysdate()
)
</insert>
<update id="updateCaseNumRule" parameterType="CaseNumRule">
update case_num_rule
<set>
<if test="ruleType != null">rule_type = #{ruleType},</if>
<if test="prefixstr != null and prefixstr != '' ">prefixstr = #{prefixstr},</if>
<if test="dateFormat != null ">date_format = #{dateFormat},</if>
<if test="deptName != null and deptName != '' ">dept_name = #{deptName},</if>
<if test="currentNum != null and currentNum != '' ">current_num = #{currentNum},</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">dept_name_firchar = #{deptNameFirchar},</if>
</set>
<where>
<if test="id != null">
AND id = #{id}
</if>
</where>
</update>
<delete id="deleteCaseNumRule" parameterType="CaseNumRule">
delete from case_num_rule where id = #{id}
</delete>
<select id="selectCaseNumRules" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
<where>
<if test="deptNameFirchar != null and deptNameFirchar != ''">
AND dept_name_firchar = #{deptNameFirchar}
</if>
</where>
order by create_time desc
</select>
<select id="countCaseNumRule" resultType="Integer">
select count(1) from case_num_rule c
<where>
<if test="prefixstr != null and prefixstr != '' ">
AND c.prefixstr = #{prefixstr}
</if>
<if test="ruleType != null ">
AND c.rule_type = #{ruleType}
</if>
<if test="dateFormat != null ">
AND c.date_format = #{dateFormat}
</if>
<if test="deptName != null and deptName != '' ">
AND c.dept_name = #{deptName}
</if>
<if test="deptNameFirchar != null and deptNameFirchar != '' ">
AND c.dept_name_firchar = #{deptNameFirchar}
</if>
</where>
</select>
<select id="selectCaseNumRule" parameterType="CaseNumRule" resultMap="BaseResultMap">
SELECT id, rule_type ,prefixstr , date_format,dept_name,dept_name_firchar,current_num
FROM case_num_rule
<where>
<if test="id != null ">
AND id = #{id}
</if>
</where>
</select>
</mapper>
@@ -27,13 +27,20 @@
<if test="updateTime != null ">update_time = #{updateTime},</if> <if test="updateTime != null ">update_time = #{updateTime},</if>
<if test="payType != null ">pay_type = #{payType},</if> <if test="payType != null ">pay_type = #{payType},</if>
</set> </set>
where id = #{id} <where>
<if test="caseId != null ">
AND case_id = #{caseId}
</if>
<if test="id != null ">
AND id = #{id}
</if>
</where>
</update> </update>
<select id="queryRecord" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult"> <select id="queryRecord" resultType="com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord" resultMap="CasePaymentRecordResult">
select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status select c.id ,c.case_id ,c.order_number ,c.payment_time ,c.create_time ,c.update_time ,c.payment_status
from case_payment_record c from case_payment_record c
<where> <where>
<if test="orderNumber != null "> <if test="orderNumber != null and orderNumber != '' ">
AND c.order_number = #{orderNumber} AND c.order_number = #{orderNumber}
</if> </if>
</where> </where>
@@ -42,10 +42,60 @@
</select> </select>
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult"> <select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
from seal_sign_record s from seal_sign_record s join case_application c on s.case_appli_id=c.id
where s.sign_flow_status in (1,2) where s.sign_flow_status in (1,2)
</select> </select>
<select id="selectSealSigning" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
when 18 then '待仲裁员审核仲裁文书'
when 31 then '待修改开庭时间'
ELSE '无案件状态'
END caseStatusName,
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
c.arbitrat_method arbitratMethod ,
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
ELSE '无审理方式'
END arbitratMethodName,
c.arbitrator_id arbitratorId,
c.arbitrator_name arbitratorName
from seal_sign_record s
join case_application c on s.case_appli_id=c.id
JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
<!-- where s.sign_flow_status in (0,1,2)-->
<where>
<if test="penSonAccount != null and penSonAccount!='' ">
AND s.penson_account = #{penSonAccount}
</if>
<if test="caseStatus != null and caseStatus!='' ">
AND c.case_status = #{caseStatus}
</if>
</where>
order by c.case_num desc
</select>
<select id="selectsignFlow" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
c.arbitrator_id arbitratorId,
c.arbitrator_name arbitratorName
from seal_sign_record s
join case_application c on s.case_appli_id=c.id
WHERE c.lock_status = 0
<if test="batchNumber != null">
AND c.batch_number = #{batchNumber}
</if>
<if test="caseStatus != null">
AND c.case_status = #{caseStatus}
</if>
</select>
<update id="updataSealSignRecord" parameterType="SealSignRecord"> <update id="updataSealSignRecord" parameterType="SealSignRecord">
update seal_sign_record update seal_sign_record
@@ -39,6 +39,31 @@
sysdate() sysdate()
) )
</insert> </insert>
<insert id="batchSaveSmsSendRecord">
insert into sms_send_record(
case_appli_id,
case_num,
phone,
send_time,
send_content,
create_by,
send_status,
create_time
)values
<foreach item="item" index="index" collection="list" separator=",">
(
#{item.caseId},
#{item.caseNum},
#{item.phone},
#{item.sendTime},
#{item.sendContent},
#{item.createBy},
#{item.sendStatus},
sysdate()
)
</foreach>
</insert>
<select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult"> <select id="getSmsSendRecord" parameterType="SmsSendRecord" resultMap="SmsSendRecordResult">
@@ -79,6 +79,7 @@
</if> </if>
AND del_flag =0 AND del_flag =0
</where> </where>
ORDER BY create_time DESC
</select> </select>
</mapper> </mapper>