diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 9813b9f..8679bb4 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -54,17 +54,7 @@
com.ruoyi
ruoyi-quartz
-
-
- tk.mybatis
- mapper-spring-boot-starter
- 2.1.5
-
-
-
- com.ruoyi
- ruoyi-generator
-
+
com.ruoyi
pay
@@ -98,37 +88,7 @@
${project.artifactId}
-
-
- org.mybatis.generator
- mybatis-generator-maven-plugin
- 1.3.6
-
-
- ${basedir}/src/main/resources/generator/generatorConfig.xml
-
- true
- true
-
-
-
- mysql
- mysql-connector-java
- 8.0.26
-
-
- tk.mybatis
- mapper
- 4.1.5
-
-
- org.projectlombok
- lombok
- 1.18.20
- compile
-
-
-
+
org.apache.maven.plugins
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
index 775f772..63ee852 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* 启动程序
@@ -12,6 +13,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
+@EnableSwagger2
public class RuoYiApplication
{
public static void main(String[] args)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index e68e0f0..f937871 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -6,6 +6,8 @@ import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.annotation.Anonymous;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -33,6 +35,7 @@ import com.ruoyi.system.service.ISysUserService;
*
* @author ruoyi
*/
+@Api("用户信息管理")
@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController
@@ -52,6 +55,7 @@ public class SysUserController extends BaseController
/**
* 获取用户列表
*/
+ @ApiOperation(value = "获取用户列表",notes = "分页获取用户列表")
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/list")
public TableDataInfo list(SysUser user)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
deleted file mode 100644
index 6d2513f..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/AdjudicationController.java
+++ /dev/null
@@ -1,191 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.wisdomarbitrate.StringIdsReq;
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-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.LogisticsInfoVO;
-import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/adjudication")
-public class AdjudicationController extends BaseController {
- @Autowired
- 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);
- }
-
- /**
- * 根据签署流程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 list = adjudicationService.selectSealSigning(personAccount,caseStatus);
- return getDataTable(list);
- }
-
-
- /**
- * 生成裁决书
- * @param caseApplication
- * @return
- */
- @PostMapping("/document")
- public AjaxResult createDocument(@Validated @RequestBody CaseApplication caseApplication){
- if (caseApplication.getId() == null) {
- return AjaxResult.error("案件id不能为空");
- }
- 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());
- }
-
- /**
- * 重新生成裁决书
- * @param caseApplication
- * @return
- */
- @PostMapping("/regenerationDocument")
- public AjaxResult regenerationDocument(@Validated @RequestBody CaseApplication caseApplication){
- return adjudicationService.regenerationDocument(caseApplication);
- }
-
- /**
- * 裁决书送达(电子邮件)
- * @param bookSendVO
- * @return
- */
- @PostMapping("/delivery")
- public AjaxResult sendDocumentByEmail(@RequestBody BookSendVO bookSendVO){
- return adjudicationService.sendDocumentByEmail(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
- }
-
- /**
- * 根据快递单号查询物流信息
- * @param caseApplication
- * @return
- */
- @GetMapping("/logistics")
-// @PreAuthorize("@ss.hasPermi('delivery:detail')")
- public AjaxResult getLogisticsInfo(CaseApplication caseApplication){
- List logisticsInfo = adjudicationService.getLogisticsInfo(caseApplication);
- return AjaxResult.success(logisticsInfo);
- }
-
- /**
- * 签名(暂时只改案件状态)
- * @param caseApplication
- * @return
- */
- @PostMapping("/signature")
-// @PreAuthorize("@ss.hasPermi('awardManagement:list:sign')")
- public AjaxResult signature(@Validated @RequestBody CaseApplication caseApplication){
- return adjudicationService.signature(caseApplication);
- }
-
-
- /**
- * 归档(暂时只改案件状态)
- * @param batchCaseApplication
- * @return
- */
- @PostMapping("/caseFile")
-// @PreAuthorize("@ss.hasPermi('awardManagement:list:file')")
- public AjaxResult caseFile(@RequestBody BatchCaseApplication batchCaseApplication){
- if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
- return error("参数校验失败");
- }
- return adjudicationService.caseFile(batchCaseApplication.getIds());
- }
-
- /**
- * 送达(不包含发送电子邮件)
- * @param bookSendVO
- * @return
- */
- @PostMapping("/service")
-// @PreAuthorize("@ss.hasPermi('awardManagement:list:sendaward')")
- public AjaxResult service(@RequestBody BookSendVO bookSendVO){
- return adjudicationService.service(bookSendVO.getId(),bookSendVO.getAppEmail(),bookSendVO.getResEmail(),bookSendVO.getApptrackingNum(),bookSendVO.getRestrackingNum());
- }
- /**
- * 用印(暂时只改案件状态)
- * @param caseApplication
- * @return
- */
- @PostMapping("/stamp")
-// @PreAuthorize("@ss.hasPermi('awardManagement:list:signprint')")
- public AjaxResult stamp(@Validated @RequestBody CaseApplication caseApplication){
- return adjudicationService.stamp(caseApplication);
- }
-
- /**
- * 档案详情查询
- * @param id 案件id
- * @return
- */
- @GetMapping("/archives")
- public AjaxResult getArchivesDetail(Long id){
-
- return adjudicationService.getArchivesDetail(id);
- }
- /**
- * 根据案件id获取邮箱
- * @param id 案件id
- * @return
- */
- @GetMapping("/emailByCaseId")
- public AjaxResult emailByCaseId(@RequestParam("id") Long id){
-
- return adjudicationService.emailByCaseId(id);
- }
-
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java
deleted file mode 100644
index b4af1e4..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/ArbitratorController.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.system.mapper.SysUserMapper;
-import com.ruoyi.system.service.ISysUserService;
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/arbitrator")
-public class ArbitratorController extends BaseController {
- @Autowired
- private ISysUserService sysUserService;
-
- /**
- * 查询仲裁员信息
- */
-// @PreAuthorize("@ss.hasPermi('arbitrator:list')")
- @GetMapping("/list")
- public TableDataInfo list(Arbitrator arbitrator)
- {
- startPage();
- List list = sysUserService.selectUserListByAdRole(arbitrator);
- return getDataTable(list);
- }
-
-
-
-
-
-
-
-
-
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
deleted file mode 100644
index 4ab8ac6..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationController.java
+++ /dev/null
@@ -1,588 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.collection.CollectionUtil;
-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.Log;
-import com.ruoyi.common.constant.FileTransformation;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
-import com.ruoyi.common.enums.BusinessType;
-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.util.FileUtil;
-import com.ruoyi.wisdomarbitrate.StringIdsReq;
-import com.ruoyi.wisdomarbitrate.domain.*;
-import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
-import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
-import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import com.ruoyi.common.utils.poi.ExcelUtil;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.*;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.util.List;
-
-
-@RestController
-@RequestMapping("/caseApplication")
-public class CaseApplicationController extends BaseController {
- @Autowired
- private ICaseApplicationService caseApplicationService;
- @Autowired
- private IAdjudicationService adjudicationService;
-
-
- /**
- * 查询立案数据
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list')")
- @GetMapping("/list")
- public TableDataInfo list(CaseApplication caseApplication) {
- if(StrUtil.isEmpty(caseApplication.getSelectCaseStatus())){
- caseApplication.setSelectCaseStatus("0");
- }
- startPage();
- List list = caseApplicationService.selectCaseApplicationListByRole(caseApplication);
- return getDataTable(list);
- }
-
- /**
- * 查询批量管理案件列表
- */
- @GetMapping("/listBatch")
- public TableDataInfo listBatch(CaseApplication caseApplication) {
- startPage();
- List list = caseApplicationService.selectCaseApplicationListBatchByRole(caseApplication);
- return getDataTable(list);
- }
-
- /**
- * 根据角色查询待办数量
- * @return
- */
-
- @GetMapping("/toDoCount")
- public AjaxResult toDoCount() {
- ToDoCount toDoCount = caseApplicationService.selectToDoCount();
-// List list = caseApplicationService.selectCaseApplicationList(caseApplication);
- return success(toDoCount);
- }
-
- /**
- * 新增立案数据
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:add')")
- @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
- @PostMapping("/addCaseApplication")
- public AjaxResult addCaseApplication(@Validated @RequestBody CaseApplication caseApplication)
- {
-
- caseApplication.setCreateBy(getUsername());
- return toAjax(caseApplicationService.insertcaseApplication(caseApplication));
- }
-
- /**
- * 修改立案数据
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
- @Log(title = "修改立案数据", businessType = BusinessType.UPDATE)
- @PostMapping("/editCaseApplication")
- public AjaxResult editCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
-
- caseApplication.setUpdateBy(getUsername());
- return caseApplicationService.editCaseApplication(caseApplication);
- }
-
- /**
- * 修改立案数据自定义字段
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:update')")
- @Log(title = "修改立案数据自定义字段", businessType = BusinessType.UPDATE)
- @PostMapping("/editCaseApplicationDefineval")
- public AjaxResult editCaseApplicationDefineval(@Validated @RequestBody CaseApplication caseApplication) {
- return caseApplicationService.editCaseApplicationDefineval(caseApplication);
- }
-
- /**
- * 提交立案申请
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:submit')")
- @Log(title = "提交立案申请", businessType = BusinessType.UPDATE)
- @PostMapping("/submitCaseApplication")
- public AjaxResult submitCaseApplication(@RequestBody BatchCaseApplication batchCaseApplication) {
- if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
- return error("参数校验失败");
- }
- 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()));
- }
-
-
-
-
- /**
- * 删除立案数据
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:delete')")
- @Log(title = "删除立案数据", businessType = BusinessType.DELETE)
- @PostMapping("/removeCaseApplication")
- public AjaxResult removeCaseApplication(@RequestBody BatchCaseApplication batchCaseApplication) {
- if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
- return error("参数校验失败");
- }
- return success(caseApplicationService.deletecaseApplicationByIds(batchCaseApplication.getIds()));
- }
-
- /**
- * 查询立案信息
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:detail')")
- @PostMapping("/selectCaseApplication")
- public AjaxResult selectCaseApplication(@Validated @RequestBody CaseApplication caseApplication) {
-
- CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplication(caseApplication);
- return success(caseApplicationselect);
- }
-
- /**
- * 查询已签署裁决书URL
- */
- @PostMapping("/selectSignSealUrl")
- public AjaxResult selectSignSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
- CaseApplication caseApplicationselect = caseApplicationService.selectSignSealUrl(caseApplication);
- return success(caseApplicationselect);
- }
-
- /**
- * 查询案件进度
- */
- @PostMapping("/selectCaseProgress")
- public AjaxResult selectCaseProgress(@Validated @RequestBody CaseApplication caseApplication) {
- AjaxResult caseApplicationselect = caseApplicationService.selectCaseProgress(caseApplication);
- return success(caseApplicationselect);
- }
-
-
- /**
- * 查询签名链接
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
- @PostMapping("/selectSignUrl")
- public AjaxResult selectSignUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
- SealSignRecord sealSignRecordselect = caseApplicationService.selectSignUrl(caseApplication);
- return success(sealSignRecordselect);
- }
-
-
- /**
- * 查询用印链接
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSealUrl')")
- @PostMapping("/selectSealUrl")
- public AjaxResult selectSealUrl(@Validated @RequestBody CaseApplication caseApplication) throws EsignDemoException {
- SealSignRecord sealUrlRecordselect = caseApplicationService.selectSealUrl(caseApplication);
- return success(sealUrlRecordselect);
- }
-
-
- /**
- * 案件证据材料压缩包上传
- *
- * @param file 附件
- * @param id 案件申请id
- * @return
- */
- @PostMapping("/uploadZipFile")
- public AjaxResult uploadZipFile(@RequestParam("file") MultipartFile file, Long id) {
- String username = this.getUsername();
- Long userId = this.getUserId();
- return caseApplicationService.uploadZipFile(file, id, username, userId);
- }
-
- /**
- * 立案申请导入模板下载
- */
- @PostMapping("/importTemplate")
- public void importTemplate(HttpServletResponse response) {
- // 读取文件
- try {
- InputStream fileInputStream = new URL("http://121.40.189.20:8000/API/uploadPath/template/案件导入模板.xlsx").openStream();
- response.setHeader("content-type", "application/octet-stream");
- response.setContentType("application/octet-stream");
- response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("案件导入模板.xlsx","UTF-8"));
- byte[] buffer = new byte[1024];
- int length;
- while ((length = fileInputStream.read(buffer)) > 0) {
- response.getOutputStream().write(buffer, 0, length);
- }
-
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- }
-
- @Log(title = "立案信息导入", businessType = BusinessType.IMPORT)
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:import')")
- @PostMapping("/importData")
- public AjaxResult importData(MultipartFile file) throws Exception {
- if(file==null){
- return warn("请上传文件");
- }
- ExcelUtil util = new ExcelUtil(CaseApplication.class);
- List caseApplicationList = util.importExcel(file.getInputStream());
- String operName = getUsername();
- String message = caseApplicationService.importCaseApplication(caseApplicationList, operName);
- return success(message);
- }
-
- /**
- * 组庭
- */
-// @PreAuthorize("@ss.hasPermi('caseApplication:pendTral')")
- @Log(title = "组庭", businessType = BusinessType.UPDATE)
- @PostMapping("/pendTral")
- public AjaxResult pendTral(@Validated @RequestBody CaseApplication caseApplication) {
- return toAjax(caseApplicationService.pendTral(caseApplication));
- }
-
- /**
- * 组庭审核
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkgroup')")
- @Log(title = "组庭审核", businessType = BusinessType.UPDATE)
- @PostMapping("/pendTralCheck")
- public AjaxResult pendTralCheck(@Validated @RequestBody CaseApplication caseApplication) {
- return toAjax(caseApplicationService.pendTralCheck(caseApplication));
- }
-
- /**
- * 组庭确认
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:confirmgroup')")
- @Log(title = "组庭确认", businessType = BusinessType.UPDATE)
- @PostMapping("/pendTralSure")
- public AjaxResult pendTralSure(@Validated @RequestBody CaseApplication 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));
- }
-
- /**
- * 修改开庭时间
- */
- @Log(title = "修改开庭时间", businessType = BusinessType.UPDATE)
- @PostMapping("/updateHeardate")
- public AjaxResult updateHeardate(@Validated @RequestBody CaseApplication caseApplication) {
- return toAjax(caseApplicationService.updateHeardate(caseApplication));
- }
-
- /**
- * 核验裁决书
- */
-// @PreAuthorize("@ss.hasPermi('caseApplication:verificationArbitrateRecord')")
- @Log(title = "核验裁决书", businessType = BusinessType.UPDATE)
- @PostMapping("/verificationArbitrateRecord")
- public AjaxResult verificationArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
- return toAjax(caseApplicationService.verificationArbitrateRecord(caseApplication));
- }
-
- /**
- * 部门长审核裁决书
- */
-// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
- @Log(title = "部门长审核裁决书", businessType = BusinessType.UPDATE)
- @PostMapping("/checkArbitrateRecord")
- public AjaxResult checkArbitrateRecord(@Validated @RequestBody CaseApplication caseApplication) {
-
- return caseApplicationService.checkArbitrateRecord(caseApplication);
- }
- /**
- * 仲裁员审核裁决书
- */
-// @PreAuthorize("@ss.hasPermi('caseApplication:checkArbitrateRecord')")
- @Log(title = "仲裁员审核裁决书", businessType = BusinessType.UPDATE)
- @PostMapping("/arbitrator/checkArbitrateRecord")
- public AjaxResult arbitratorCheckArbitrateRecord(@Validated @RequestBody CaseApplication 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));
- }
-
-
- /**
- * 是否指派仲裁员
- */
-// @PreAuthorize("@ss.hasPermi('caseApplication:pendingAppointArbotrar')")
- @Log(title = "是否指派仲裁员", businessType = BusinessType.UPDATE)
- @PostMapping("/pendingAppointArbotrar")
- public AjaxResult pendingAppointArbotrar(@Validated @RequestBody CaseApplication caseApplication) {
- return toAjax(caseApplicationService.pendingAppointArbotrar(caseApplication));
- }
-
- /**
- * 提交立案审查
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:check')")
- @Log(title = "提交立案审查", businessType = BusinessType.UPDATE)
- @PostMapping("/submitCaseApplicationCheck")
- public AjaxResult submitCaseApplicationCheck(@RequestBody BatchCaseApplication batchCaseApplication) {
- if(CollectionUtil.isEmpty(batchCaseApplication.getIds())|| batchCaseApplication.getAgreeOrNotCheck()==null){
- return error("参数校验失败");
- }
- return success(caseApplicationService.submitCaseApplicationCheck(batchCaseApplication.getIds(),batchCaseApplication.getAgreeOrNotCheck(),batchCaseApplication.getCaseCheckReject()));
- }
-
- /**
- * 确认缴费查询立案信息
- */
-// @PreAuthorize("@ss.hasPermi('paymentManagement:list:detail')")
- @PostMapping("/selectCaseApplicationConfirm")
- public AjaxResult selectCaseApplicationConfirm(@Validated @RequestBody CaseApplication caseApplication) {
- CaseApplication caseApplicationselect = caseApplicationService.selectCaseApplicationConfirm(caseApplication);
- 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()));
- }
-
- /**
- * 下载案件压缩包
- */
- @PostMapping("/downloadCaseZipFile")
- public AjaxResult downloadCaseZipFile(@Validated @RequestBody CaseApplication caseApplication) {
-
- CaseAttach caseAttach = caseApplicationService.downloadCaseZipFile(caseApplication);
- return success(caseAttach);
- }
-
-
-
-
-
- /**
- * 发送房间号短信
- */
- @Anonymous
- @PostMapping("/sendRoomNoMessage")
- public AjaxResult sendRoomNoMessage(@Validated @RequestBody SendRoomNoMessageVO messageVO) {
- String result = caseApplicationService.sendRoomNoMessage(messageVO);
- return success(result);
- }
- /**
- * 获取UrlScheme
- */
- @Anonymous
- @GetMapping("/getUrlScheme")
- public AjaxResult getUrlScheme() {
- String schemeUrl = WxAppletNotifyUtils.jumpAppletSchemeUrl();
- return success(schemeUrl);
- }
-
- /**
- * 生成庭审笔录
- * @param arbitrateRecord
- * @return
- */
- @PostMapping("/creatTrialRecord")
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
- public AjaxResult creatTrialRecord(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
- return caseApplicationService.creatTrialRecord(arbitrateRecord);
- }
-
- /**
- * 记录庭审笔录
- * @param arbitrateRecord
- * @return
- */
- @PostMapping("/creatTrialRecordnew")
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
- public AjaxResult creatTrialRecordnew(@Validated @RequestBody ArbitrateRecord arbitrateRecord){
- return caseApplicationService.creatTrialRecordnew(arbitrateRecord);
- }
-
- /**
- * 案件锁定或者解锁
- * @param caseApplication
- * @return
- */
- @PostMapping("/updateCaseLockStatus")
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:creatTrialRecord')")
- public AjaxResult updateCaseLockStatus(@Validated @RequestBody CaseApplication caseApplication){
- if(caseApplication.getId()==null || caseApplication.getLockStatus()==null){
- return error("参数校验失败");
- }
- return AjaxResult.success(caseApplicationService.updateCaseLockStatus(caseApplication));
- }
-
- /**
- * 查询短信发送记录
- * @param smsSendRecord
- * @return
- */
- @PostMapping("/smsRecord")
- public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
- startPage();
- List list = caseApplicationService.getSmsSendRecord(smsSendRecord);
- return getDataTable(list);
- }
- /**
- * 获取userSign
- * @param userId
- * @return
- */
- @Anonymous
- @GetMapping("/generateUserSign")
- public AjaxResult generateUserSign(@RequestParam(required = true) String userId){
- if(StrUtil.isEmpty(userId)){
- error("参数校验失败");
- }
- return AjaxResult.success(caseApplicationService.generateUserSign(userId));
- }
- /**
- * 预约会议
- * @param reservedConferenceVO
- * @return
- */
- @PostMapping("/reservedConference")
- public AjaxResult reservedConference(@Validated @RequestBody ReservedConferenceVO reservedConferenceVO) throws Exception {
-
- return caseApplicationService.reservedConference(reservedConferenceVO);
- }
-
- /**
- * 生成房间号
- * @return
- */
- @Anonymous
- @GetMapping("/createRoomId")
- public AjaxResult createRoomId(@RequestParam("caseId") Long caseId) {
-
- return success(caseApplicationService.createRoomId(caseId));
- }
- /**
- * 删除房间号
- * @return
- */
- @Anonymous
- @PostMapping("/deleteRoom")
- public AjaxResult deleteRoom(@RequestParam("roomId") String roomId) {
-
- return caseApplicationService.deleteRoom(roomId);
- }
- /**
- * 根据案件id查询已预约的会议
- * @param caseId
- * @return
- */
- @Anonymous
- @GetMapping("/reserveConferenceList")
- public AjaxResult reserveConferenceList( @RequestParam("caseId") Long caseId) {
-
- return success(caseApplicationService.reserveConferenceList(caseId));
- }
-
- /**
- * 案件压缩包导入
- * @param file
- * @return
- * @throws IOException
- */
- @PostMapping("/uploadCaseZipFile")
- public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file,@RequestParam("templateId") Long templateId) throws IOException {
- return caseApplicationService.uploadCaseZipFile(file,templateId);
- }
-
- /**
- * 根据附件id修改案件id
- * @param caseAttach
- * @return
- */
- @PostMapping("/updateCaseIdByAnnexId")
- public AjaxResult updateCaseIdByAnnexId(@RequestBody CaseAttach caseAttach) {
- if(caseAttach.getAnnexId()==null || caseAttach.getCaseAppliId()==null){
- return error("参数校验失败");
- }
- return caseApplicationService.updateCaseIdByAnnexId(caseAttach);
- }
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationLogController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationLogController.java
deleted file mode 100644
index e980e1c..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseApplicationLogController.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import com.ruoyi.common.annotation.Anonymous;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
-import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.bind.annotation.PostMapping;
-
-import static com.ruoyi.common.core.domain.AjaxResult.success;
-
-/**
- * @author wangqiong
- * @description 案件日志
- * @date 2023-11-17 13:58
- */
-@RestController
-@RequestMapping (value = "/caseApplicationLog")
-public class CaseApplicationLogController {
-
- @Autowired
- private CaseApplicationLogService caseApplicationLogService;
-
- /**
- * 新增
- * @author wangqiong
- * @date 2023/11/17
- **/
- @PostMapping("/insert")
- public AjaxResult insert(@RequestBody CaseApplication caseApplicationLog){
- return success(caseApplicationLogService.insert(caseApplicationLog));
- }
-
- /**
- * 刪除
- * @author wangqiong
- * @date 2023/11/17
- **/
- @PostMapping("/delete")
- public AjaxResult delete(Long id){
- return success(caseApplicationLogService.delete(id));
- }
- /**
- * 修改的案件提交到秘书
- * @author wangqiong
- * @date 2023/11/17
- **/
- @PostMapping("/submit")
- public AjaxResult submit(@RequestBody UpdateSubmitVO vo){
- if(vo.getCaseId()==null || vo.getVersion()==null){
- return AjaxResult.error("参数校验错误");
- }
- return caseApplicationLogService.submit(vo);
- }
-
- /**
- * 修改撤销申请
- * @author wangqiong
- * @date 2023/11/17
- **/
- @PostMapping("/revoke")
- public AjaxResult revoke(@RequestBody UpdateSubmitVO vo){
- if(vo.getCaseId()==null || vo.getVersion()==null){
- return AjaxResult.error("参数校验错误");
- }
- // todo 需确定
- return caseApplicationLogService.revoke(vo);
- }
-
- /**
- * 查询 根据主键 id 查询
- * @author wangqiong
- * @date 2023/11/17
- **/
- @GetMapping("/selectByCaseIdAndVersion")
- public AjaxResult selectByCaseIdAndVersion(@RequestParam(value = "caseId") Long caseId,@RequestParam(value = "version")Integer version ){
- return success(caseApplicationLogService.selectByCaseIdAndVersion(caseId,version));
- }
- /**
- * 秘书审核修改的案件
- * @author wangqiong
- * @date 2023/11/17
- **/
- @PostMapping("/updateAudit")
- public AjaxResult updateAudit(@RequestBody UpdateSubmitVO vo){
- if(vo.getCaseId()==null || vo.getVersion()==null || vo.getIsAgree()==null || vo.getUpdateSubmitStatus()==null){
- return AjaxResult.error("参数校验错误");
- }
- return caseApplicationLogService.updateAudit(vo);
- }
- /**
- * 查询该版本及之前版本案件进行对比
- * @author wangqiong
- * @date 2023/11/17
- **/
- @Anonymous
- @PostMapping("/selectCompareCase")
- public AjaxResult selectCompareCase(@RequestBody UpdateSubmitVO vo){
- if(vo.getCaseId()==null || vo.getVersion()==null ){
- return AjaxResult.error("参数校验错误");
- }
- return caseApplicationLogService.selectCompareCase(vo);
- }
-
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java
deleted file mode 100644
index 198ccd8..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseArbitrateController.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.collection.CollectionUtil;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseIds;
-import com.ruoyi.wisdomarbitrate.service.ICaseArbitrateService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-@RestController
-@RequestMapping("/arbitrate")
-public class CaseArbitrateController extends BaseController {
- @Autowired
- private ICaseArbitrateService caseArbitrateService;
-
- /**
- * 审核仲裁方式
- * @param caseApplication
- * @param opinion 1同意,0拒绝
- * @return
- */
- @PutMapping("/method")
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:checkarbitrationway')")
- public AjaxResult examineArbitrateMethod(@Validated @RequestBody CaseApplication caseApplication
- , Integer opinion, Integer arbitratMethod){
- return caseArbitrateService.examineArbitrateMethod(caseApplication,opinion,arbitratMethod);
- }
-
- /**
- * 书面审理
- * @param
- * @return
- */
- @PostMapping("/writtenHear")
- public AjaxResult writtenHear(@RequestBody CaseIds caseIds){
- return caseArbitrateService.writtenHear(caseIds);
-
- }
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
deleted file mode 100644
index 152aacb..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseEvidenceController.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-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.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
-import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
-import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
-import com.ruoyi.wisdomarbitrate.service.ICaseEvidenceService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 案件证据
- */
-@RestController
-@RequestMapping("/evidence")
-public class CaseEvidenceController extends BaseController {
- private final ICaseEvidenceService caseEvidenceService;
-
- @Autowired
- public CaseEvidenceController(ICaseEvidenceService caseEvidenceService) {
- this.caseEvidenceService = caseEvidenceService;
- }
-
- /**
- * 根据案件id查询案件详情
- *
- * @param id
- * @return
- */
- @GetMapping("/{id}")
- public AjaxResult getCaseDetailsById(@PathVariable Long id) {
- String username = this.getUsername();
- return caseEvidenceService.getCaseDetailsById(id, username);
- }
-
- /**
- * 案件证据上传
- *
- * @param file 附件
- * @param annexType 附件类型,立案申请书(1)、证据材料(2)、仲裁文书(3)、案件视频(4)、身份证件(5)
- * @param id 案件申请id
- * @return
- */
- @PostMapping("/upload")
- public AjaxResult uploadEvidence(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
- String username = this.getUsername();
- Long userId = this.getUserId();
- return caseEvidenceService.uploadEvidence(file, annexType, id, username, userId);
- }
-
- /**
- * 上传庭审笔录
- *
- * @param file 附件
- * @param annexType 附件类型,庭审笔录(7)
- * @param id 案件申请id
- * @return
- */
- @PostMapping("/uploadRecord")
- public AjaxResult uploadRecord(@RequestParam("file") MultipartFile file, Integer annexType, Long id) {
- String username = this.getUsername();
- Long userId = this.getUserId();
- return caseEvidenceService.uploadRecord(file, annexType, id, username, userId);
- }
-
- @PostMapping("/batchUpload")
- public AjaxResult batchUpload(@RequestParam("file") MultipartFile[] file, Integer annexType, Long id) {
- if(file==null){
- return error("请选择要上传的文件");
- }
- String username = this.getUsername();
- Long userId = this.getUserId();
- return caseEvidenceService.batchUpload(file, annexType, id, username, userId);
- }
-
- /**
- * 获取附件
- * @param caseAppliId
- * @param annexTypeList
- * @param
- * @return
- */
- @GetMapping("/fileList")
- public AjaxResult fileList(Long caseAppliId, @RequestParam("annexTypeList") List annexTypeList){
- if(caseAppliId==null){
- return error("案件id不能为空");
- }
- return caseEvidenceService.fileList(caseAppliId, annexTypeList);
- }
-
- /**
- * 删除附件
- * @param fileIds
- * @return
- */
- @PostMapping("/deleteFile")
- public AjaxResult deleteFile( @RequestParam("fileIds") List fileIds){
-
- if(CollectionUtil.isEmpty(fileIds)){
- return error("附件id不能为空");
- }
- return toAjax(caseEvidenceService.deleteFile( fileIds));
- }
-
-
- /**
- * 查询当前用户案件列表
- *
- * @param caseStatus
- * @return
- */
- @GetMapping("/all")
- public AjaxResult getCaseListAll(@RequestParam("caseStatus") Integer caseStatus) {
-
- return success(caseEvidenceService.getCaseListAll(caseStatus));
-
- }
-
- /**
- * 证据确认
- *
- * @param caseApplication 案件对象
- * @return 统一返回结果
- */
- @PutMapping("/confirm")
- public AjaxResult evidenceConfirmation(@Validated @RequestBody CaseApplication caseApplication) {
- return caseEvidenceService.evidenceConfirmation(caseApplication);
- }
-
- /**
- * 案件质证
- *
- * @param caseEvidenceDTO
- * @return
- */
- @PostMapping("/crossexami")
- public AjaxResult caseCrossexamination(@Validated @RequestBody CaseEvidenceDTO caseEvidenceDTO) {
- return caseEvidenceService.caseCrossexamination(caseEvidenceDTO);
- }
- /**
- * 获取证据目录树列表
- */
- @GetMapping("/evidenceTree")
- public AjaxResult evidenceTree(CaseEvidenceDirectory caseEvidenceDirectory)
- {
- return success(caseEvidenceService.selectEvidenceTreeList(caseEvidenceDirectory)) ;
- }
-
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java
index e67a1b3..9f936c4 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CaseLogRecordController.java
@@ -2,8 +2,6 @@ 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.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -23,7 +21,7 @@ public class CaseLogRecordController extends BaseController {
/**
* 查询案件日志列表
*/
-// @PreAuthorize("@ss.hasPermi('caseLog:list')")
+ @PreAuthorize("@ss.hasPermi('caseLog:list')")
@GetMapping("/list")
public AjaxResult list(CaseLogRecord caseLogRecord)
{
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java
deleted file mode 100644
index 15a0cd2..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/CasePaymentController.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.collection.CollectionUtil;
-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.dto.CaseConfirmPayDTO;
-import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
-import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 缴费支付
- */
-@RestController
-@RequestMapping("/pay")
-public class CasePaymentController {
- private final ICasePaymentService paymentService;
- @Autowired
- public CasePaymentController(ICasePaymentService paymentService){
- this.paymentService=paymentService;
- }
- /**
- * 案件缴费
- * @param casePayDTO 缴费传入参数
- * @return 统一响应结果
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
- @PostMapping("/casePay")
- public AjaxResult casePay(@Validated @RequestBody CasePayDTO casePayDTO) {
- return paymentService.casePay(casePayDTO);
- }
- /**
- * 确认缴费
- * @param payDTO 缴费传入参数
- * @return 统一响应结果
- */
-// @PreAuthorize("@ss.hasPermi('caseManagement:list:pay')")
- @PostMapping("/confirmPay")
- public AjaxResult confirmPay(@Validated @RequestBody CaseConfirmPayDTO 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 batchCaseApplication
- * @return
- */
-// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
- @PutMapping("/confirm")
- public AjaxResult confirmPayment(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
- if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
- return AjaxResult.error("参数校验失败");
- }
- return paymentService.confirmPayment(batchCaseApplication.getIds());
- }
- /**
- * 缴费列表查询
- * @param casePayDTO
- * @return
- */
- @GetMapping("/list")
- public AjaxResult casePayList(CasePayDTO 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());
- }
-}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/SendMailRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/SendMailRecordController.java
index cc9ac35..30abad2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/SendMailRecordController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/SendMailRecordController.java
@@ -30,19 +30,5 @@ public class SendMailRecordController extends BaseController {
}
-// /**
-// * 新增立案数据
-// */
-// @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
-// @PostMapping("/addSendMailRecord")
-// public AjaxResult addSendMailRecord(@Validated @RequestBody SendMailRecord sendMailRecord)
-// {
-//
-// return toAjax(sendMailRecordService.addSendMailRecord(sendMailRecord));
-// }
-
-
-
-
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java
deleted file mode 100644
index db1f865..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/VideoController.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.ruoyi.web.controller.wisdomarbitrate;
-
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.ruoyi.common.annotation.Anonymous;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
-import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
-import com.ruoyi.wisdomarbitrate.service.VideoService;
-import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
-import com.tencentcloudapi.common.Credential;
-import com.tencentcloudapi.common.exception.TencentCloudSDKException;
-import com.tencentcloudapi.common.profile.ClientProfile;
-import com.tencentcloudapi.common.profile.HttpProfile;
-import com.tencentcloudapi.trtc.v20190722.TrtcClient;
-import com.tencentcloudapi.trtc.v20190722.models.*;
-import com.tencentyun.TLSSigAPIv2;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.validation.Valid;
-import java.io.IOException;
-
-/**
- * @author wangqiong
- * @description trtc实时音视频
- * @date 2023-10-26 11:25
- */
-@RestController
-@RequestMapping("/video")
-public class VideoController extends BaseController {
- @Autowired
- private VideoService videoService;
-
- /**
- * 从腾讯云下载文件到本地
- * @param
- * @return
- */
- @Anonymous
- @PostMapping("/videoRollBack")
- public AjaxResult videoRollBack( @RequestBody String body, HttpServletRequest request) {
- videoService.videoRollBack(body,request);
- return success();
- }
- /**
- * 根据房间号绑定案件ID
- * @param
- * @return
- */
- @Anonymous
- @PostMapping("/bindCaseId")
- public AjaxResult bindCaseId(@Valid @RequestBody SendRoomNoMessageVO vo) {
-
- return videoService.bindCaseId(vo.getId(),vo.getRoomNo());
- }
- /**
- * 根据案件ID查询视频
- * @param caseId 案件id
- * @return
- */
- @GetMapping("/videoList")
- public AjaxResult videoList( @RequestParam Long caseId) {
-
- return videoService.videoList(caseId);
- }
- /**
- * 开启腾讯云录制
- * @param vo
- * @return
- * @throws Exception
- */
- @Anonymous
- @PostMapping("/openCloudRecording")
- private AjaxResult openCloudRecording( @RequestBody ReservedConferenceVO vo) {
- if(vo.getCaseId()==null || vo.getRoomId()==null){
- return AjaxResult.error("参数错误");
- }
- return videoService.openCloudRecording(vo.getCaseId(),vo.getRoomId());
- }
- /**
- * 关闭腾讯云录制
- * @param taskId 任务ID
- * @return
- */
- @Anonymous
- @PostMapping("/closeDeleteCloudRecording")
- public AjaxResult closeDeleteCloudRecording(@RequestParam("taskId") String taskId){
- return videoService.closeDeleteCloudRecording(taskId);
- }
- /**
- * 解散房间
- * @param reservedConferenceVO
- * @return
- */
- @Anonymous
- @PostMapping("/dissolveRoom")
- public AjaxResult dissolveRoom( @RequestBody ReservedConferenceVO reservedConferenceVO) {
- if( reservedConferenceVO.getRoomId()==null){
- return error("参数校验失败");
- }
-
- return videoService.dissolveRoom(reservedConferenceVO.getRoomId());
- }
- /**
- * 根据userId查询该用户是否是秘书
- * @param userId
- * @return
- */
- @Anonymous
- @GetMapping("secretaryRoleByUserId")
- public AjaxResult secretaryRoleByUserId( @RequestParam(value = "userId",required = true) Long userId) {
-
- return videoService.secretaryRoleByUserId(userId);
- }
- /**
- * 根据html字符串转pdf并和案件关联
- * @param reservedConferenceVO
- * @return
- */
- @Anonymous
- @PostMapping("htmlToPDF")
- public AjaxResult secretaryRoleByUserId( @RequestBody ReservedConferenceVO reservedConferenceVO) {
- if( reservedConferenceVO.getCaseId()==null || StrUtil.isEmpty(reservedConferenceVO.getHtmlContent())){
- return success();
- }
-
- return videoService.htmlToPDF(reservedConferenceVO);
- }
- /**
- * 根据案件id和类型查询附件
- * @param caseAppliId
- * @param annexType
- * @return
- */
-
- @GetMapping("attachListByCaseId")
- public AjaxResult attachListByCaseId( @RequestParam("caseAppliId") Long caseAppliId,@RequestParam("annexType") Integer annexType) {
-
- return videoService.attachListByCaseId(caseAppliId,annexType);
- }
-
-
-}
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index fb697f9..77d08a9 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
- url: jdbc:mysql://121.40.189.20:3306/test_smart_arbitration?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
+ url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: YMzc157#
# 从库数据源
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 22aa6db..96fca58 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -143,7 +143,7 @@ swagger:
# 是否开启swagger
enabled: true
# 请求前缀
- pathMapping: /dev-api
+ pathMapping:
# 防止XSS攻击
xss:
diff --git a/ruoyi-admin/src/main/resources/generator/config.properties b/ruoyi-admin/src/main/resources/generator/config.properties
index 63f0610..18487e5 100644
--- a/ruoyi-admin/src/main/resources/generator/config.properties
+++ b/ruoyi-admin/src/main/resources/generator/config.properties
@@ -1,7 +1,7 @@
jdbc.driverClass=com.mysql.cj.jdbc.Driver
-jdbc.url=jdbc:mysql://158.58.50.21:3306/knslm?serverTimezone=Asia/Shanghai&useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&nullCatalogMeansCurrent=true
-jdbc.user=knslm
-jdbc.password=knslm2022
+jdbc.url=jdbc:mysql://158.58.50.21:3306/mediation_system?serverTimezone=Asia/Shanghai&useSSL=false&zeroDateTimeBehavior=CONVERT_TO_NULL&nullCatalogMeansCurrent=true
+jdbc.user=root
+jdbc.password=YMzc157#
#模块名称
moduleName=diagnosis
diff --git a/ruoyi-admin/src/main/resources/generator/generatorConfig.xml b/ruoyi-admin/src/main/resources/generator/generatorConfig.xml
index 2743fc9..2af0e43 100644
--- a/ruoyi-admin/src/main/resources/generator/generatorConfig.xml
+++ b/ruoyi-admin/src/main/resources/generator/generatorConfig.xml
@@ -21,13 +21,13 @@
password="${jdbc.password}">
-
-
-
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java
index 3fef049..9806eb9 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/EmailOutUtil.java
@@ -3,6 +3,7 @@ package com.ruoyi.common.utils;
import com.ruoyi.common.utils.uuid.UUID;
+import com.sun.net.ssl.internal.ssl.Provider;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@@ -102,7 +103,7 @@ public class EmailOutUtil {
MimeBodyPart messageBodyPart = new MimeBodyPart();
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 Provider());
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
//设置邮件会话参数
Properties props = new Properties();
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
index 46ab4b2..2ec4d23 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java
@@ -1,11 +1,12 @@
package com.ruoyi.framework.config;
import java.util.TimeZone;
-import org.mybatis.spring.annotation.MapperScan;
+
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import tk.mybatis.spring.annotation.MapperScan;
/**
* 程序注解配置
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
index 66109de..95fa61f 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml
@@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from gen_table_column
+ select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, create_by, create_time, update_by, update_time from ms_gen_table_column
- insert into gen_table_column (
+ insert into ms_gen_table_column (
table_id,
column_name,
column_comment,
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- update gen_table_column
+ update ms_gen_table_column
column_comment = #{columnComment},
java_type = #{javaType},
@@ -111,14 +111,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from gen_table_column where table_id in
+ delete from ms_gen_table_column where table_id in
#{tableId}
- delete from gen_table_column where column_id in
+ delete from ms_gen_table_column where column_id in
#{item.columnId}
diff --git a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
index b605e90..619a3e8 100644
--- a/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
+++ b/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -54,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table
+ select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from ms_gen_table
-
+
+ javax.persistence
+ persistence-api
+ 1.0
+
+
+
+ tk.mybatis
+ mapper-spring-boot-starter
+ 2.1.5
+
+
+
+ com.ruoyi
+ ruoyi-generator
+
-
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.3.6
+
+
+ ${basedir}/src/main/resources/generator/generatorConfig.xml
+
+ true
+ true
+
+
+
+ mysql
+ mysql-connector-java
+ 8.0.26
+
+
+ tk.mybatis
+ mapper
+ 4.1.5
+
+
+ org.projectlombok
+ lombok
+ 1.18.20
+ compile
+
+
+
+
+
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
index 8830025..5e17118 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
@@ -20,7 +20,6 @@ public interface ISysUserService
* @return 用户信息集合信息
*/
public List selectUserList(SysUser user);
- public List selectUserListByAdRole(Arbitrator arbitrator);
/**
* 根据条件分页查询已分配用户角色列表
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
index dcc8cdf..9542c7f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
@@ -9,8 +9,6 @@ import javax.validation.Validator;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.system.mapper.*;
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -62,8 +60,6 @@ public class SysUserServiceImpl implements ISysUserService {
@Autowired
private ISysConfigService configService;
- @Autowired
- private CaseApplicationMapper caseApplicationMapper;
@Autowired
protected Validator validator;
@@ -80,23 +76,6 @@ public class SysUserServiceImpl implements ISysUserService {
return userMapper.selectUserList(user);
}
- @Override
- public List selectUserListByAdRole(Arbitrator arbitrator) {
- List 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;
- }
-
/**
* 根据条件分页查询已分配用户角色列表
*
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/MsCaseLogRecordDTO.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/MsCaseLogRecordDTO.java
new file mode 100644
index 0000000..856b657
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/MsCaseLogRecordDTO.java
@@ -0,0 +1,76 @@
+package com.ruoyi.wisdomarbitrate.domain.dto;
+
+import lombok.Data;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+@Entity
+@Data
+@Table(name="ms_case_log_record")
+public class MsCaseLogRecordDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ @Id
+ @Column(name = "Id")
+ @GeneratedValue(generator = "JDBC")
+ private Long id;
+
+ /**
+ * 案件申请id
+ */
+ @Column(name="case_appli_id")
+ private Long caseAppliId;
+
+ /**
+ * 案件节点
+ */
+ @Column(name="case_node")
+ private Integer caseNode;
+
+ /**
+ * 案件节点时间
+ */
+ @Column(name="case_node_time")
+ private Date caseNodeTime;
+
+ /**
+ * 备注
+ */
+ @Column(name="notes")
+ private String notes;
+
+ /**
+ * 操作人用户名
+ */
+ @Column(name="create_by")
+ private String createBy;
+
+ /**
+ * 操作人用户昵称
+ */
+ @Column(name="create_nick_name")
+ private String createNickName;
+
+ /**
+ * 创建时间
+ */
+ @Column(name="create_time")
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ @Column(name="update_by")
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ @Column(name="update_time")
+ private Date updateTime;
+
+
+
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/StringIdsReq.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/StringIdsReq.java
similarity index 88%
rename from ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/StringIdsReq.java
rename to ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/StringIdsReq.java
index 7e561dd..fd651c2 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/StringIdsReq.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/StringIdsReq.java
@@ -1,4 +1,4 @@
-package com.ruoyi.wisdomarbitrate;
+package com.ruoyi.wisdomarbitrate.domain.vo;
import lombok.Data;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitrateRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitrateRecordMapper.java
deleted file mode 100644
index c4aaa18..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitrateRecordMapper.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-
-import java.util.List;
-
-public interface ArbitrateRecordMapper {
- int insertArbitrateRecord(ArbitrateRecord arbitrateRecord);
-
- int updataArbitrateRecord(ArbitrateRecord arbitrateRecord);
-
- ArbitrateRecord selectArbitrateRecord(ArbitrateRecord arbitrateRecord);
-
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java
deleted file mode 100644
index 3cfece2..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/ArbitratorMapper.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface ArbitratorMapper {
- List selectArbitratorList(Arbitrator arbitrator);
-
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java
deleted file mode 100644
index 7e5affd..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateLogMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-@Repository
-public interface CaseAffiliateLogMapper {
-
-
- int batchCaseAffiliate(List caseAffiliates);
-
-
- void deletecaseAffiliate(CaseApplication caseApplication);
- void batchDeletecaseAffiliate(@Param("ids") List ids);
-
-
- List selectCaseAffiliate(@Param("caseAppliLogId") Long caseAppliLogId);
- CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliLogId") Long caseAppliLogId, @Param("identityType")int identityType);
-
- int updataCaseAffiliate(CaseAffiliate caseAffiliate);
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
deleted file mode 100644
index 97eca71..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseAffiliateMapper.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface CaseAffiliateMapper {
-
-
- int batchCaseAffiliate(List caseAffiliates);
-
-
- void deletecaseAffiliate(CaseApplication caseApplication);
- void batchDeletecaseAffiliate(@Param("ids") List ids);
-
-
- List selectCaseAffiliate(CaseAffiliate caseAffiliate);
- List selectCaseAffiliateByCaseIds(@Param("ids") List ids);
- CaseAffiliate selectCaseAffiliateByIdentityType(@Param("caseAppliId") Long caseAppliId, @Param("identityType")int identityType);
-
- int updataCaseAffiliate(CaseAffiliate caseAffiliate);
-
- /**
- * 根据案件查询邮箱
- * @param id
- * @return
- */
- List emailByCaseId(@Param("caseAppliId")Long id);
-
- /**
- * 批量修改
- * @param affiliateLogList
- */
- void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List affiliateLogList);
-
- /**
- * 根据案件id删除
- * @param caseId
- */
- void deleteByCaseId(@Param("caseAppliId") Long caseId);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java
deleted file mode 100644
index ca49a36..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationLogMapper.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-/**
- * @author wangqiong
- * @description 案件日志
- * @date 2023-11-17 14:05
- */
-@Repository
-public interface CaseApplicationLogMapper {
- int insert(CaseApplication caseApplicationLog);
-
- int deleteById(Long id);
-
-
-
- CaseApplication selectByCaseIdAndVersion(@Param("caseAppliId")long caseAppliId,@Param("version") int version);
-
- Integer selectMaxVersionByCaseId(@Param("caseAppliId")long caseAppliId);
-
- /**
- * 修改日志表状态
- * @param vo
- */
- void updateStatus(UpdateSubmitVO vo);
-
- /**
- * 根据案件id查询秘书角色最新版本号
- * @param id
- * @return
- */
- Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
-
- /**
- * 删除日志
- * @param ids
- */
- void batchDeleteLog(@Param("ids") List ids);
-
- CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
-
- Integer batchSave(@Param("list")List caseApplications);
-
- /**
- * 根据案件id查询所有的日志id
- * @param ids
- * @return
- */
- List selectLogsByCaseIds(@Param("ids")List ids);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
deleted file mode 100644
index 3145ff4..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseApplicationMapper.java
+++ /dev/null
@@ -1,140 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
-import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface CaseApplicationMapper {
- List selectCaseApplicationList(CaseApplication caseApplication);
- List selectCaseApplicationList1(CaseApplication caseApplication);
-
- int selectCaseApplicationCount(CaseApplication caseApplication);
-
- /**
- * 查询超级管理员案件
- * @param caseApplication
- * @return
- */
- List selectAdminCaseApplicationList(CaseApplication caseApplication);
-
- int insertCaseApplication(CaseApplication caseApplication);
-
-
- int updataCaseApplication(CaseApplication caseApplication);
-
- int submitCaseApplication(CaseApplication caseApplication);
-
- int deletecaseApplication(CaseApplication caseApplication);
-
- CaseApplication selectCaseApplication(CaseApplication caseApplication);
-
- /**
- * 根据案件id查询案件信息
- * @param ids
- * @return
- */
- List listCaseApplicationByIds(@Param("ids")List ids);
-
- CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
-
- /**
- * 查询最大编号
- * @param caseNum
- * @param length
- * @return
- */
- Integer selectCaseNumLike(@Param("caseNum") String caseNum, @Param("length") int length);
-
- /**
- * 查询仲裁员根据案件id
- * @param id
- * @return
- */
- String selectArbitratorList(@Param("id") String id);
-
- /**
- * 修改支付方式
- * @param payDTO
- */
- void updatePayType(CaseConfirmPayDTO payDTO);
-
-
- ToDoCount selectAdminCaseToDoCount();
-
-
- ToDoCount selectTodoCountByRole(CaseApplication caseApplication);
-
- /**
- * 修改案件锁定状态
- * @param id
- * @param lockStatus
- * @return
- */
- int updateCaseLockStatus(@Param("id")Long id,@Param("lockStatus") Integer lockStatus);
-
- /**
- * 批量删除案件
- * @param ids
- * @return
- */
- int batchDeletecaseApplication(@Param("ids") List ids);
-
- /**
- * 绑定房间号
- * @param caseId
- * @param roomId
- */
- void bindCaseId(@Param("caseId")Long caseId,@Param("roomId") String roomId);
-
- /**
- * 根据房间号查询案件id
- * @param roomId
- * @return
- */
- Long selectCaseIdByRoomId(@Param("roomId")String roomId);
-
- /**
- * 查询已办案件
- * @param caseApplication
- * @return
- */
- List selectHandledCase(CaseApplication caseApplication);
- /**
- * 查询最大房间号
- * @return
- */
- Long selectMaxRoomId();
-
- /**
- * 修改案件版本号
- * @param id
- * @param version
- */
- void updateVersionById(@Param("id")Long id, @Param("version")Integer version);
-
-
- /**
- * 查询最大批号
- * @return
- */
- Integer selectBatchNumberLike();
-
- /**
- * 批量新增案件
- * @param caseApplications
- * @return
- */
- int batchSave(@Param("list")List caseApplications);
-
- int selectCasenum(@Param("userId") String userId);
-
- List selectAdminCaseApplicationListBatch(CaseApplication caseApplication);
-
- List listCaseApplicationByBatchNumber(CaseApplication caseApplication);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceDirectoryMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceDirectoryMapper.java
deleted file mode 100644
index e0528ba..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceDirectoryMapper.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-@Mapper
-public interface CaseEvidenceDirectoryMapper {
-
- int save(CaseEvidenceDirectory caseEvidenceDirectory);
- /**
- * 查询证据目录信息
- *
- * @param caseEvidenceDirectory 目录信息
- * @return 目录信息集合
- */
- List selectList(CaseEvidenceDirectory caseEvidenceDirectory);
-
- /**
- * 根据证据名称查询证据目录树信息
- * @param evidenceName 证据名称
- * @param deptCheckStrictly 目录树选择项是否关联显示
- */
- List selectDeptListByEvidenceName(@Param("evidenceName") String evidenceName, @Param("deptCheckStrictly") boolean deptCheckStrictly);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java
deleted file mode 100644
index 5f0a4a2..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseEvidenceMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-@Mapper
-public interface CaseEvidenceMapper {
- List getCaseListByRespondent(@Param(value = "identityNum" ) String identityNum
- , @Param(value = "caseStatusList") List caseStatusList
- , @Param(value = "identityType" ) Integer identityType
- );
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseLogRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseLogRecordMapper.java
index af2d85a..45bb433 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseLogRecordMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CaseLogRecordMapper.java
@@ -1,14 +1,13 @@
package com.ruoyi.wisdomarbitrate.mapper;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
-import org.apache.ibatis.annotations.Mapper;
+import com.ruoyi.wisdomarbitrate.domain.dto.MsCaseLogRecordDTO;
import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
+import tk.mybatis.mapper.common.Mapper;
import java.util.List;
-@Mapper
-public interface CaseLogRecordMapper {
+
+public interface CaseLogRecordMapper extends Mapper {
List selectCaseLogRecordList(CaseLogRecord caseLogRecord);
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java
deleted file mode 100644
index fd5549c..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/CasePaymentRecordMapper.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.CasePaymentRecord;
-
-import java.util.List;
-
-public interface CasePaymentRecordMapper {
- int saveRecord(CasePaymentRecord casePaymentRecord);
-
- List queryRecord(String orderNumber);
-
- void update(CasePaymentRecord casePaymentRecord);
-
- CasePaymentRecord selectRecordByCaseId(Long id);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java
deleted file mode 100644
index 13d2cba..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/SealSignRecordMapper.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-
-
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-public interface SealSignRecordMapper {
- List selectSealSignRecord(SealSignRecord sealSignRecord);
-
- /**
- * 查询已签署和签署中的文件
- * @param sealSignRecord
- * @return
- */
- List selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
-
- /**
- * 差询等待签署,签署中的案件
- * @param penSonAccount 签署人员
- * @return
- */
- List selectSealSigning(@Param("penSonAccount") String penSonAccount, @Param("caseStatus") Integer caseStatus);
-
- int updataSealSignRecord(SealSignRecord sealSignRecord);
-
-
- void insertSealSignRecord(SealSignRecord sealSignRecord);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/TemplateManualMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/TemplateManualMapper.java
deleted file mode 100644
index 6927105..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/TemplateManualMapper.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.ruoyi.wisdomarbitrate.mapper;
-
-import com.ruoyi.wisdomarbitrate.domain.TemplateManual;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-
-@Mapper
-public interface TemplateManualMapper {
-
- int insertTemplateManual(TemplateManual templateManual);
-
- int updateTemplateManual(TemplateManual templateManual);
-
- List selectTemplateManual(TemplateManual templateManual);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/CaseApplicationLogService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/CaseApplicationLogService.java
deleted file mode 100644
index 246bcd2..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/CaseApplicationLogService.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
-
-/**
- * @author wangqiong
- * @description 案件日志
- * @date 2023-11-17 13:58
- */
-public interface CaseApplicationLogService {
- /**
- * 新增案件日志
- * @param caseApplicationLog
- * @return
- */
- int insert(CaseApplication caseApplicationLog);
-
- /**
- * 根据案件日志id删除案件日志
- * @param id
- * @return
- */
- int delete(Long id);
-
- /**
- * 根据案件id和版本号查询案件日志
- * @param id
- * @param version
- * @return
- */
- CaseApplication selectByCaseIdAndVersion(Long id, int version);
-
- /**
- * 修改的案件提交到秘书
- * @param vo
- * @return
- */
- AjaxResult submit(UpdateSubmitVO vo);
-
- /**
- * 修改撤销申请
- * @param vo
- * @return
- */
- AjaxResult revoke(UpdateSubmitVO vo);
-
- /**
- * 秘书审核修改的案件
- * @param vo
- * @return
- */
- AjaxResult updateAudit(UpdateSubmitVO vo);
-
-
- AjaxResult selectCompareCase(UpdateSubmitVO vo);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java
deleted file mode 100644
index 5fa26f4..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IAdjudicationService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.StringIdsReq;
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
-import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
-
-import java.util.List;
-
-public interface IAdjudicationService {
- AjaxResult createDocument(CaseApplication caseApplication);
-
- AjaxResult sendDocumentByEmail(Long id,String appEmail,String resEmail ,String apptrackingNum,String restrackingNum);
-
- List getLogisticsInfo(CaseApplication caseApplication);
-
- AjaxResult signature(CaseApplication caseApplication);
-
- AjaxResult caseFile( List ids);
-
- AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum);
-
- AjaxResult stamp(CaseApplication caseApplication);
-
- AjaxResult getArchivesDetail(Long id);
-
- AjaxResult regenerationDocument(CaseApplication caseApplication);
-
- /**
- * 根据案件id查询邮箱
- * @param id
- * @return
- */
- AjaxResult emailByCaseId(Long id);
-
- /**
- * 批量生成裁决书
- * @param ids
- * @return
- */
- AjaxResult batchDocument(List ids);
-
- /**
- * 根据签署流程id查询批量签名链接
- * @param idsReq
- * @return
- */
- SealSignRecord selectBatchSignUrl( StringIdsReq idsReq);
-
- /**
- * 根据仲裁员手机号分页查询等待签署,签署中的裁决书
- * @param personAccount
- * @return
- */
- List selectSealSigning(String personAccount,Integer caseStatus);
-
- SealSignRecord selectBatchSealUrl(StringIdsReq idsReq);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IArbitratorService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IArbitratorService.java
deleted file mode 100644
index ee7a8ab..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/IArbitratorService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-
-import java.util.List;
-
-public interface IArbitratorService {
- List selectArbitratorList(Arbitrator arbitrator);
-
-
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
deleted file mode 100644
index 03c5eec..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseApplicationService.java
+++ /dev/null
@@ -1,154 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.exception.EsignDemoException;
-import com.ruoyi.wisdomarbitrate.domain.*;
-import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
-import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.multipart.MultipartFile;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-import java.util.Map;
-
-public interface ICaseApplicationService {
- List selectCaseApplicationList(CaseApplication caseApplication);
- List selectCaseApplicationListByRole(CaseApplication caseApplication);
-
-
- int insertcaseApplication(CaseApplication caseApplication);
-
- int selectCaseApplicationCount(CaseApplication caseApplication);
-
- AjaxResult editCaseApplication(CaseApplication caseApplication);
-
- int submitCaseApplication( List ids);
-
- int deletecaseApplicationByIds(List ids);
-
- CaseApplication selectCaseApplication(CaseApplication caseApplication);
-
- String importCaseApplication(List caseApplicationList, String operName);
-
- int pendTral(CaseApplication caseApplication);
-
- int pendingAppointArbotrar(CaseApplication caseApplication);
-
- int pendTralCheck(CaseApplication caseApplication);
-
- int pendTralSure(CaseApplication caseApplication);
-
- int verificationArbitrateRecord(CaseApplication caseApplication);
-
- AjaxResult checkArbitrateRecord(CaseApplication caseApplication);
-
- int submitCaseApplicationCheck(List ids, Integer agreeOrNotCheck,String caseCheckReject);
-
- CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication);
-
- String sendRoomNoMessage(SendRoomNoMessageVO messageVO);
-
- SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException;
-
- SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException;
-
- AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecord);
-
- CaseApplication selectSignSealUrl(CaseApplication caseApplication) throws EsignDemoException;
-
- /**
- * 查询待办数量
- * @return
- */
- ToDoCount selectToDoCount();
-
- AjaxResult selectCaseProgress(CaseApplication caseApplication);
-
- int updateHeardate(CaseApplication caseApplication);
-
- /**
- * 修改案件锁定状态
- * @param caseApplication
- * @return
- */
- int updateCaseLockStatus(CaseApplication caseApplication);
-
- AjaxResult uploadZipFile(MultipartFile file, Long id, String username, Long userId);
- /**
- * 查询短信发送记录
- * @param smsSendRecord
- * @return
- */
- List getSmsSendRecord(SmsSendRecord smsSendRecord);
-
- /**
- * 获取userSign
- * @param userId
- * @return
- */
- String generateUserSign(String userId);
-
- /**
- * 预约会议
- * @param reservedConferenceVO
- * @return
- * @throws Exception
- */
- AjaxResult reservedConference(ReservedConferenceVO reservedConferenceVO) throws Exception;
-
- /**
- * 腾讯云销毁房间回调
- * @return
- */
- long createRoomId(Long caseId);
-
- /**
- * 根据案件id查询已预约的会议
- * @param caseId
- * @return
- */
- List reserveConferenceList(Long caseId);
-
- AjaxResult deleteRoom( String roomId);
-
- AjaxResult uploadCaseZipFile(MultipartFile file,Long templateId);
-
- /**
- * 根据附件id修改案件id
- * @param caseAttach
- * @return
- */
- AjaxResult updateCaseIdByAnnexId(CaseAttach caseAttach);
-
- /**
- * 仲裁员审核裁决书
- * @param caseApplication
- * @return
- */
- AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication);
-
- AjaxResult creatTrialRecordnew(ArbitrateRecord arbitrateRecord);
-
- AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
-
- CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
-
- List 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);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java
deleted file mode 100644
index 98bafbb..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseArbitrateService.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.ArbitrateRecord;
-import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseIds;
-
-import java.util.List;
-
-public interface ICaseArbitrateService {
-
-
- AjaxResult writtenHear(CaseIds caseIds);
-
- AjaxResult examineArbitrateMethod(CaseApplication caseApplication, Integer opinion, Integer arbitratMethod);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
deleted file mode 100644
index 1e8d4d1..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICaseEvidenceService.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseEvidenceDirectory;
-import com.ruoyi.wisdomarbitrate.domain.dto.CaseEvidenceDTO;
-import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceDirectoryVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.CaseEvidenceVO;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-
-public interface ICaseEvidenceService {
-
- AjaxResult getCaseDetailsById(Long id,String userName);
-
- AjaxResult uploadEvidence(MultipartFile file, Integer annexType, Long id,String userName,Long userId);
-
- List getCaseListAll(Integer caseStatus);
-
- AjaxResult evidenceConfirmation(CaseApplication caseApplication);
-
- AjaxResult caseCrossexamination(CaseEvidenceDTO caseEvidenceDTO);
-
- /**
- * 批量上传文件
- * @param file
- * @param annexType
- * @param id
- * @param username
- * @param userId
- * @return
- */
- AjaxResult batchUpload(MultipartFile[] file, Integer annexType, Long id, String username, Long userId);
-
- AjaxResult fileList(Long caseAppliId, List annexTypeList);
-
- int deleteFile( List fileIds);
-
- List selectEvidenceTreeList(CaseEvidenceDirectory caseEvidenceDirectory);
-
-
- /**
- * 查询证据目录数据
- *
- * @param caseEvidenceDirectory 证据目录信息
- * @return 证据目录信息集合
- */
- List selectCaseEvidenceList(CaseEvidenceDirectory caseEvidenceDirectory);
-
-
- /**
- * 构建前端所需要树结构
- *
- * @param caseEvidenceDirectorys 证据列表
- * @return 树结构列表
- */
- List buildCaseEvidenceTree(List caseEvidenceDirectorys);
-
- /**
- * 构建前端所需要下拉树结构
- *
- * @param caseEvidenceDirectorys 证据目录列表
- * @return 下拉树结构列表
- */
- List buildCaseEvidenceTreeSelect(List caseEvidenceDirectorys);
-
- AjaxResult uploadRecord(MultipartFile file, Integer annexType, Long id, String username, Long userId);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java
deleted file mode 100644
index 9b4e911..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/ICasePaymentService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service;
-
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.dto.PayRequest;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
-import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
-
-import java.util.List;
-
-public interface ICasePaymentService {
- /**
- * 案件缴费
- */
- AjaxResult casePay(CasePayDTO casePayDTO);
-
- AjaxResult confirmPayment( List ids);
-
- /**
- * 确认缴费
- * @param payDTO
- * @return
- */
- AjaxResult confirmPay(CaseConfirmPayDTO payDTO);
-
-
- AjaxResult casePayList(CasePayDTO casePayDTO);
-
- AjaxResult confirmPayBatch(CasePayDTO payDTO);
-
- AjaxResult casePayListBatch(CasePayDTO casePayDTO);
-
- AjaxResult confirmPaymentBatch(String batchNumber);
-
- AjaxResult casePayBatch(CasePayDTO casePayDTO);
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
deleted file mode 100644
index af495a9..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/AdjudicationServiceImpl.java
+++ /dev/null
@@ -1,1513 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service.impl;
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
-import com.deepoove.poi.data.PictureRenderData;
-import com.google.gson.Gson;
-import com.google.gson.JsonObject;
-import com.ruoyi.common.constant.CaseApplicationConstants;
-import com.ruoyi.common.core.controller.BaseController;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
-import com.ruoyi.common.core.domain.entity.SysDictData;
-import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.exception.EsignDemoException;
-import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.*;
-import com.ruoyi.common.utils.thread.MultipleThreadListParam;
-import com.ruoyi.common.utils.thread.MultipleThreadWorkUtil;
-import com.ruoyi.system.mapper.SysDictDataMapper;
-import com.ruoyi.wisdomarbitrate.StringIdsReq;
-import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
-import com.ruoyi.wisdomarbitrate.mapper.*;
-import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
-import com.ruoyi.wisdomarbitrate.domain.*;
-import com.ruoyi.wisdomarbitrate.domain.vo.ArchivesDetailVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
-import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
-import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
-import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
-import com.ruoyi.wisdomarbitrate.utils.SignAward;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.apache.poi.xwpf.usermodel.XWPFDocument;
-import org.apache.poi.xwpf.usermodel.XWPFParagraph;
-import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTBookmark;
-import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.mail.MailSendException;
-import org.springframework.mail.javamail.JavaMailSender;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import java.io.*;
-import java.math.BigDecimal;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.net.URLEncoder;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
-import java.text.NumberFormat;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.util.*;
-import java.util.concurrent.CountDownLatch;
-import java.util.function.Function;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-
-import static com.ruoyi.common.utils.PageUtils.startPage;
-import static com.ruoyi.common.utils.SecurityUtils.getUsername;
-
-@Service
-@Slf4j
-public class AdjudicationServiceImpl implements IAdjudicationService {
- private final String apiUrl = "http://api.cainiaoapi.com/api/exp/v1/index";
-
- @Autowired
- private CaseApplicationMapper caseApplicationMapper;
- @Autowired
- private CaseAffiliateMapper caseAffiliateMapper;
- @Autowired
- private ArbitrateRecordMapper arbitrateRecordMapper;
- @Autowired
- private CaseAttachMapper caseAttachMapper;
- @Autowired
- private EmailOutUtil emailOutUtil;
- @Autowired
- private ICaseApplicationService caseApplicationService;
- @Autowired
- private ICaseLogRecordService caseLogRecordService;
- @Autowired
- private RedisCache redisCache;
- @Autowired
- private SendMailRecordMapper sendMailRecordMapper;
- @Autowired
- private SmsRecordMapper smsRecordMapper;
- @Autowired
- private TemplateManageMapper templateManageMapper;
- @Autowired
- private ColumnValueMapper columnValueMapper;
- @Autowired
- private FatchRuleMapper fatchRuleMapper;
- @Autowired
- private SysDictDataMapper dictDataMapper;
- @Autowired
- private SealManageMapper sealManageMapper;
- @Autowired
- private SealSignRecordMapper sealSignRecordMapper;
-
-
- // 仲裁反请求模板内容
- private final String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
- "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
- "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
- // 财产保全内容
- String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
- "第二十八条之规定,将该申请提交至法院。";
- // 管辖权异议
- String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《管辖异议申请书》,认为" +
- ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
- // 线上开庭时+线上仲裁
- String onLineDate = "{{onLineDate}}";
- String onLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于" + onLineDate + "通过仲裁委智慧仲裁平台开庭审理了本案。";
- // 开庭+线下仲裁
- String offLineDate = "{{offLineDate}}";
- String offLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于 " + offLineDate + "在仲裁委所在地开庭审理了本案。";
- //书面仲裁时
- String writtenDate = "{{writtenDate}}";
- String written = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于" + writtenDate + "在仲裁委所在地开庭审理了本案。仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,根据《2022年版仲裁规则》第五十八条的规定对本案进行了书面审理。 ";
- //开庭+缺席审理
- String absent = "申请人的特别授权委托代理人{{agentName}}" + "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
- "《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明,\" +\n" +
- " \"发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。" + "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
- "第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
- // 开庭+出席
- String attend = "申请人的特别授权委托代理人{{agentName}}和被申请人本人出席了庭审。 ";
- // 开庭+出席+被申提供证据
- String onLineAttendFile = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;双方当事人均出示了证据材料并对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
- // 开庭+出席+被申未提供证据
- String onLineAttend = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;申请人出示了证据材料,被申请人对对方的证据材料进行了质证; 双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
- // 被申请人出席答辩意见
- String resAttendOpinion = "\n(二)被申请人的答辩意见 \n(三)当事人提供的证据材料及对方的质证意见\n" +
- "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}\n被申请人对上述材料的质证意见为:{{respondentOpinion}}\n";
- // 被申请人出席+被申请人提供了资料
- String resFile = "被申请人向仲裁庭提交了如下证据材料:\n{{resFile}}" +
- "申请人对上述材料的质证意见为:{{applicantOpinion}}";
- // 被申请人缺席
- String resAbsent = "(二)当事人提供的证据材料\n" +
- "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}";
- // 日期格式化年月日
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
-
- @Override
- @Transactional
- public AjaxResult createDocument(CaseApplication caseApplicationReq) {
- String templatePath = "";
- String templateName = "";
- String agentName = "";
- String resName = "";
- try {
- Map datas = new HashMap<>();
- Long id = caseApplicationReq.getId();
- //获取案件详细信息
- CaseApplication caseApplicationById = caseApplicationService.selectCaseApplication(caseApplicationReq);
- if (caseApplicationById == null) {
- return AjaxResult.error("案件不存在");
- }
-
- if (caseApplicationById.getTemplateId() == null) {
- return AjaxResult.error("请先指定裁决书模板");
- }
- // 根据模板id查找对应的模板
- TemplateManage templateManage = new TemplateManage();
- templateManage.setId(caseApplicationById.getTemplateId());
- List templateManages = templateManageMapper.selectTemplateList(templateManage);
- if (CollectionUtil.isEmpty(templateManages)) {
- return AjaxResult.error("请先指定裁决书模板");
- }
- templatePath = templateManages.get(0).getTemOrigPath();
- if (StrUtil.isEmpty(templatePath)) {
- return AjaxResult.error("未找到该模板");
- }
-
- // todo 部署放开
- if (templatePath != null) {
- templatePath = "/home/ruoyi/" + templatePath;
- }
- try {
- File file = new File(templatePath);
- } catch (Exception e) {
- return AjaxResult.error("未找到该模板");
- }
- templateName = templateManages.get(0).getFileName();
- // 查询案件相关表信息
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(id);
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- //获取仲裁记录表里的相关信息
- ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
- arbitrateRecord.setCaseAppliId(id);
- ArbitrateRecord arbitrateRecordSelect = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
- // 在系统表中查询案件内置字段
- SysDictData sysDictData = new SysDictData();
- sysDictData.setDictType("case_built_type");
- List dictDataList = dictDataMapper.selectDictDataList(sysDictData);
- // 根据模板id查询抓取规则,判断从主表取值还是从columnValue值取
- List fatchRuleList = fatchRuleMapper.listByTemplateId(caseApplicationById.getTemplateId());
- // 抓取规则,0-内置字段,1-自定义字段
- Map> fatchRuleMap = new HashMap<>();
- // 裁决书需要的字段和内容,占位符需要配置成中文
- Map valueMap = new HashMap<>();
- // 如果未设置抓取规则,则从主表取数据,设置内置字段值
- if (CollectionUtil.isNotEmpty(fatchRuleList)) {
- fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
- }
- // 自定义字段,从columnValue值取
- if (fatchRuleMap.size() > 0 && fatchRuleMap.containsKey(1)) {
- // 根据案件id查询key-value表
- List columnValueList = columnValueMapper.listByCaseId(caseApplicationReq.getId());
- if (CollectionUtil.isNotEmpty(columnValueList)) {
- columnValueList.forEach(columnValue -> valueMap.put(columnValue.getName(), columnValue.getValue()));
- }
- }
- // 组装内置字段,在主表中查出内容
- buildDefaultColumnValue(dictDataList, caseAffiliates, valueMap, caseApplicationById);
-
- // 获取模板中的占位符key
- List bookmarkList = getBookmarkByDocx(templatePath);
- if (CollectionUtil.isEmpty(bookmarkList)) {
- return AjaxResult.success("请检查模板是否配置正确,未获取到占位符");
- }
- // 遍历书签,给书签赋值
- replaceBookmark(bookmarkList, datas, valueMap);
- // 根据条件替换书签
- conditionReplaceBookmark(caseApplicationById, datas, agentName, resName, arbitrateRecordSelect);
- // 裁决书生成时间
- LocalDate now = LocalDate.now();
- String year = Integer.toString(now.getYear());
- datas.put("裁决书生成时间", year);
- //生成编码
- String equipmentNo = getNewEquipmentNo();
- // 裁决书编号
- datas.put("裁决书编号", equipmentNo);
- // 仲裁费
- datas.put("仲裁费", caseApplicationById.getFeePayable() != null ? caseApplicationById.getFeePayable().toString() : "");
- // 案件创建时间
- Date createTime = caseApplicationById.getCreateTime();
- // 将日期格式化为字符串
- String createTimeStr = sdf.format(createTime);
- datas.put("案件创建时间", createTimeStr);
- // 立案日期
- Date registerDate = caseApplicationById.getRegisterDate();
- String registerDateStr = sdf.format(registerDate);
- datas.put("立案日期", registerDateStr);
-
-
- String month = String.format("%02d", now.getMonthValue());
- String day = String.format("%02d", now.getDayOfMonth());
- // todo
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
-// String saveFolderPath = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
- // todo
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
-// String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
- // 将word中的标签替换掉,生成新的word
- String docFilePath = wordChangeText(templatePath, datas, saveFolderPath, fileName);
-
- String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
- // 保存裁决书附件
- saveArbitorFile(id, saveName, savePath, caseApplicationById, arbitrateRecordSelect);
-
- return AjaxResult.success("裁决书已生成");
- } catch (IOException e) {
- return AjaxResult.error(e + "请检查文件路径是否有误");
- }
- }
-
- /**
- * 将word中的标签替换掉,生成新的word
- *
- * @param modalFilePath 裁决书模板路径
- * @param datas 替换标签的内容
- * @param saveFolderPath 保存路径
- * @param fileName 保存文件名
- * @return
- * @throws IOException
- */
- private String wordChangeText(String modalFilePath, Map datas, String saveFolderPath, String fileName) throws IOException {
- String resultFilePath = saveFolderPath + "/" + fileName;
- // 创建日期目录
- File saveFolder = new File(saveFolderPath);
- if (!saveFolder.exists()) {
- saveFolder.mkdirs();
- }
- Path sourcePath = new File(modalFilePath).toPath();
- Path destinationPath = new File(resultFilePath).toPath();
- Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
- String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
- File file = new File(docFilePath);
- if (file.exists()) {
- InputStream in = new FileInputStream(file);
- XWPFDocument xwpfDocument = new XWPFDocument(in);
- WordUtil.changeText(xwpfDocument);
- }
- return docFilePath;
- }
-
- /**
- * 根据条件判断裁决书中是否需要该内容
- *
- * @param caseApplicationById 案件信息
- * @param datas 替换标签值
- * @param agentName 代理人名称
- * @param resName 被申请人名称
- * @param arbitrateRecordSelect 仲裁记录
- */
- private void conditionReplaceBookmark(CaseApplication caseApplicationById, Map datas, String agentName, String resName, ArbitrateRecord arbitrateRecordSelect) {
- // 如果有仲裁反请求,该字段设置值
- Integer adjudicaCounter = caseApplicationById.getAdjudicaCounter();
- if (adjudicaCounter != null && adjudicaCounter == 1) {
- datas.put("仲裁反请求", counterclaim);
- }
- //财产保全
- Integer properPreser = caseApplicationById.getProperPreser();
- if (properPreser != null && properPreser == 1) {
- datas.put("财产保全", preservation);
- }
- //管辖权异议
- Integer objectiJuris = caseApplicationById.getObjectiJuris();
- if (objectiJuris != null && objectiJuris == 1) {
- datas.put("管辖权异议", jurisdictionalObjection);
- }
-
- // 出席庭审人员角色名称
- String attendName = "秘书、";
- boolean isAbsenceFlag = caseApplicationById.getIsAbsence() != null && caseApplicationById.getIsAbsence().equals(0);
- boolean appIsAbsenceFlag = caseApplicationById.getAppliIsAbsen() != null && caseApplicationById.getAppliIsAbsen().equals(0);
- if (isAbsenceFlag || appIsAbsenceFlag) {
- if (isAbsenceFlag) {
- attendName += "申请代理人" + agentName + "、";
- }
- if (appIsAbsenceFlag) {
- attendName += "被申请人" + resName;
- }
- if (attendName.endsWith("、")) {
- attendName = attendName.replace("、", "");
- }
- datas.put("出席庭审人员", attendName);
- }
-
- // 仲裁员名称
- datas.put("仲裁员姓名", caseApplicationById.getArbitratorName());
- // 审理方式
- Integer arbitratMethod = caseApplicationById.getArbitratMethod();
- Date hearDate = caseApplicationById.getHearDate();
- String hearDateStr = "";
- if (hearDate != null) {
- // 审理日期
- hearDateStr = sdf.format(hearDate);
- datas.put("审理日期", hearDateStr);
- }
- // todo 线上仲裁/线下仲裁方式未选择
- //线上开庭时+线上仲裁
- if (arbitratMethod != null && arbitratMethod == 1) {
- String replace = onLine.replace(onLineDate, Optional.of(hearDateStr).orElse(""));
- datas.put("线上开庭并线上仲裁", replace);
- // 所有附件
- List caseAttachList = caseApplicationById.getCaseAttachList();
- Map> caseAttachMap = new HashMap<>();
- if (caseAttachList != null && caseAttachList.size() > 0) {
- caseAttachMap = caseAttachList.stream().collect(Collectors.groupingBy(CaseAttach::getAnnexType));
- }
- // 被申请人是否缺席
- Integer isAbsence = caseApplicationById.getIsAbsence();
- if (isAbsence != null && isAbsence == 1) {
- // 被申请人缺席,开庭+缺席审理
- String absentReplace = absent.replace("{{agentName}}", Optional.of(agentName).orElse(""));
-
- // 被申请人缺席
- String resAbsentReplace = resAbsent;
- if (caseAttachMap != null && CollectionUtil.isNotEmpty(caseAttachMap.get(2))) {
- List caseAttaches = caseAttachMap.get(2);
- StringBuilder stringBuilder = new StringBuilder();
- for (CaseAttach caseAttach : caseAttaches) {
- stringBuilder.append(caseAttach.getAnnexName()).append("\n");
- }
- resAbsentReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString());
- }
- datas.put("开庭并缺席", absentReplace + resAbsentReplace);
- } else {
- // 被申出席
- String attendReplace = attend.replace("{{agentName}}", Optional.ofNullable(agentName).orElse(""));
- datas.put("开庭并出席", attendReplace);
- // 被申请人证据
- if (caseAttachMap != null && CollectionUtil.isNotEmpty(caseAttachMap.get(6))) {
- // 开庭+出席+被申提供证据
-
- // 开庭+出席+被申提供证据
- String resFileReplace = resFile;
- if (CollectionUtil.isNotEmpty(caseAttachMap.get(6))) {
- List caseAttaches = caseAttachMap.get(6);
- StringBuilder stringBuilder = new StringBuilder();
- for (CaseAttach caseAttach : caseAttaches) {
- stringBuilder.append(caseAttach.getAnnexName()).append("\n");
- }
- resFileReplace = resFile.replace("{{resFile}}", stringBuilder.toString()).replace("{{applicantOpinion}}", (arbitrateRecordSelect == null || arbitrateRecordSelect.getApplicantOpinion() == null ? "" : arbitrateRecordSelect.getApplicantOpinion()));
- }
- datas.put("开庭并出席并被申提供证据", onLineAttendFile + resFileReplace);
- } else {
- // 开庭+出席+被申未提供证据
- datas.put("开庭并出席并被申未提供证据", onLineAttend);
- }
- // 被申请人出席答辩意见
- String resAttendOpinionReplace = resAttendOpinion;
- if (caseAttachMap != null && CollectionUtil.isNotEmpty(caseAttachMap.get(2))) {
- List caseAttaches = caseAttachMap.get(2);
- StringBuilder stringBuilder = new StringBuilder();
- for (CaseAttach caseAttach : caseAttaches) {
- stringBuilder.append(caseAttach.getAnnexName()).append("\n");
- }
- resAttendOpinionReplace = resAttendOpinion.replace("{{applicantFile}}", stringBuilder.toString()).replace("{{respondentOpinion}}", (arbitrateRecordSelect == null || arbitrateRecordSelect.getRespondentOpinion() == null) ? "" : arbitrateRecordSelect.getRespondentOpinion());
- }
-
- datas.put("被申请人出席答辩意见", resAttendOpinionReplace);
- }
-
- } else {
- //书面仲裁时
- String replace = written.replace(writtenDate, Optional.of(hearDateStr).orElse(""));
- datas.put("书面仲裁", replace);
-
- }
-
- }
-
- /**
- * 给模板中的占位符赋值
- *
- * @param bookmarkList 书签
- * @param datas 书签赋值
- * @param valueMap 案件内容
- */
- private void replaceBookmark(List bookmarkList, Map datas, Map valueMap) {
- for (String bookmark : bookmarkList) {
- if (valueMap.containsKey(bookmark)) {
- if (bookmark.equals("仲裁请求")) {
- // 请求仲裁庭裁决
- String arbitratClaims = valueMap.get(bookmark);
- if (StrUtil.isNotEmpty(arbitratClaims)) {
- String replace = arbitratClaims.replace("甲方", "被申请人").replace("乙方", "申请人");
- datas.put(bookmark, replace);
-
- } else {
- datas.put(bookmark, "");
- }
- } else if (bookmark.equals("本案事实")) {
- // 查询本案事实如下
- String mediationAgreement = valueMap.get(bookmark);
- if (StrUtil.isNotEmpty(mediationAgreement)) {
- String replace = mediationAgreement.replace("甲方", "被申请人").replace("乙方", "申请人");
- datas.put(bookmark, replace);
-
- } else {
- datas.put(bookmark, "");
- }
- } else {
- datas.put(bookmark, valueMap.get(bookmark));
- }
- }
- }
- }
-
- /**
- * 组装案件内置字段值,即主表和相关人员表信息
- *
- * @param dictDataList 内置字段
- * @param caseAffiliates 关联人员
- * @param valueMap 组装的值
- */
- private void buildDefaultColumnValue(List dictDataList, List caseAffiliates, Map valueMap, CaseApplication caseApplication) {
- if (CollectionUtil.isNotEmpty(dictDataList)) {
- Map affiliateMap = caseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, Function.identity(), (n1, n2) -> n2));
- for (SysDictData dictData : dictDataList) {
- if (StrUtil.isNotEmpty(dictData.getDictLabel())) {
- if (dictData.getDictLabel().contains("被申请人")) {
- CaseAffiliate affiliate = affiliateMap.get(2);
- if (affiliate == null) {
- continue;
- }
- // 被申请人
- switch (dictData.getDictLabel()) {
- case "被申请人姓名":
- valueMap.put(dictData.getDictLabel(), affiliate.getName());
- break;
- case "被申请人身份证号":
- valueMap.put(dictData.getDictLabel(), affiliate.getIdentityNum());
- break;
- case "被申请人住所":
- valueMap.put(dictData.getDictLabel(), affiliate.getResidenAffili());
- break;
- case "被申请人联系地址":
- valueMap.put(dictData.getDictLabel(), affiliate.getContactAddress());
- break;
- case "被申请人联系电话":
- valueMap.put(dictData.getDictLabel(), affiliate.getContactTelphone());
- break;
- case "被申请人电子邮件":
- valueMap.put(dictData.getDictLabel(), affiliate.getEmail());
- break;
- case "被申请人性别":
- String responSex = affiliate.getResponSex();
- if (responSex.equals("0")) {
- valueMap.put(dictData.getDictLabel(), "男");
- } else {
- valueMap.put(dictData.getDictLabel(), "女");
- }
- break;
- case "被申请人出生年月日":
- Date responBirth = affiliate.getResponBirth();
- if (responBirth != null) {
- valueMap.put(dictData.getDictLabel(), sdf.format(responBirth));
- } else {
- valueMap.put(dictData.getDictLabel(), "");
- }
- break;
- default:
- break;
- }
- } else if (dictData.getDictLabel().contains("申请人") || dictData.getDictLabel().contains("统一社会信用代码")
- || dictData.getDictLabel().contains("法定代表人") || dictData.getDictLabel().contains("法定代表人职位")
- || dictData.getDictLabel().contains("代理人")) {
- CaseAffiliate affiliate = affiliateMap.get(1);
- if (affiliate == null) {
- continue;
- }
- // 申请人
- switch (dictData.getDictLabel()) {
- case "申请人姓名":
- valueMap.put(dictData.getDictLabel(), affiliate.getName());
- break;
- case "统一社会信用代码":
- valueMap.put(dictData.getDictLabel(), affiliate.getIdentityNum());
- break;
- case "法定代表人":
- valueMap.put(dictData.getDictLabel(), affiliate.getCompLegalPerson());
- break;
- case "法定代表人职位":
- valueMap.put(dictData.getDictLabel(), affiliate.getCompLegalperPost());
- break;
- case "申请人住所":
- valueMap.put(dictData.getDictLabel(), affiliate.getResidenAffili());
- break;
- case "申请人联系地址":
- valueMap.put(dictData.getDictLabel(), affiliate.getContactAddress());
- break;
- case "委托代理人姓名":
- valueMap.put(dictData.getDictLabel(), affiliate.getNameAgent());
- break;
- case "委托代理人联系电话":
- valueMap.put(dictData.getDictLabel(), affiliate.getContactTelphoneAgent());
- break;
- case "委托代理人电子邮件":
- valueMap.put(dictData.getDictLabel(), affiliate.getAgentEmail());
- break;
- default:
- break;
- }
- } else {
- valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
- }
- } else {
- valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
- }
-
- }
- }
- }
-
- /**
- * 保存裁决书附件
- *
- * @param id 案件id
- * @param saveName 保存的文件名
- * @param savePath 保存路径
- * @param caseApplicationById 案件基本信息
- * @param arbitrateRecordSelect 出裁决书生成记录
- */
- private void saveArbitorFile(Long id, String saveName, String savePath, CaseApplication caseApplicationById, ArbitrateRecord arbitrateRecordSelect) {
- CaseAttach caseAttach = CaseAttach.builder()
- .caseAppliId(id)
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(3)
- .build();
- //保存到附件表里,先判断之前有没有,有的话更新,没有的话新增
- List caseAttachList = caseAttachMapper.getCaseAttachByCaseIdAndType(caseAttach);
- if (caseAttachList != null && caseAttachList.size() > 0) {
- //之前已经生成过了,更新
- int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
- } else {
- //之前没生成过,新增
- int i = caseAttachMapper.save(caseAttach);
- if (i > 0) {
- if (arbitrateRecordSelect != null) {
- Integer annexId = caseAttach.getAnnexId();
- //将附件id保存到仲裁记录表里面
- arbitrateRecordSelect.setAnnexId(annexId);
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordSelect);
- }
- }
- }
- //修改案件状态
- caseApplicationById.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
- caseApplicationMapper.submitCaseApplication(caseApplicationById);
- }
-
- @Override
- @Transactional
- public AjaxResult sendDocumentByEmail(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum) {
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
- if (caseApplication1 == null) {
- return AjaxResult.error("未查询到相关案件");
- }
-
- //根据案件id查询裁决书
- try {
- List fileList = new ArrayList<>();
- CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
- List caseAttachList = caseApplication2.getCaseAttachList();
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- if (caseAttach.getAnnexType() == 3) {
- String annexPath = caseAttach.getAnnexPath();
- //File file = new File("/home/ruoyi/" + annexPath);
- String path = "/home/ruoyi" + annexPath;
- System.out.println("原文件路径是:" + path);
- String newpath = path.replace("/", "\\");
- System.out.println("新文件路径是:" + newpath);
- File file = new File(newpath);
- System.out.println("新文件是:" + file);
- fileList.add(file);
- }
- }
- }
- if (fileList.size() < 1) {
- return AjaxResult.error("未查询到裁决书");
- }
- File file = fileList.get(0);
- //电子邮件送达
- JavaMailSender javaMailSender = emailOutUtil.rebuildMailSender();
- if (appEmail != null) {
- emailOutUtil.sendMessageCarryFile(appEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
- , "hjbjava@163.com", javaMailSender);
- }
- if (resEmail != null) {
- emailOutUtil.sendMessageCarryFile(resEmail, "案件裁决书", "您的裁决书已送达,详情请查阅附件", file
- , "hjbjava@163.com", javaMailSender);
-
- }
- //修改案件状态
- caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
- caseApplicationMapper.submitCaseApplication(caseApplication1);
- //保存邮箱信息和快递单号到关联人表
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(id);
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- if (affiliate.getIdentityType() == 1) { //申请人
- affiliate.setSendEmail(appEmail);
- affiliate.setTrackNum(apptrackingNum);
- caseAffiliateMapper.updataCaseAffiliate(affiliate);
- } else {
- affiliate.setSendEmail(resEmail);
- affiliate.setTrackNum(restrackingNum);
- caseAffiliateMapper.updataCaseAffiliate(affiliate);
- }
- }
- }
-
- return AjaxResult.success("仲裁文书送达成功");
- } catch (MailSendException e) {
- return AjaxResult.error("发送失败,请检查文件路径");
- }
- }
-
- @Override
- public List getLogisticsInfo(CaseApplication caseApplication) {
- try {
- //快递单号查询
- String key = "729437f92468910aee6c12dbfeaee3c1";
- String com = "auto";
- //根据案件id查询单号信息
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- List logisticsInfoVOList = new ArrayList<>();
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- LogisticsInfoVO logisticsInfoVO = new LogisticsInfoVO();
- String trackNum = affiliate.getTrackNum();
- if (trackNum != null) {
- // 构造查询字符串参数
- String queryParameters = String.format("key=%s&com=%s&no=%s&phone=%d",
- URLEncoder.encode(key, "UTF-8"),
- URLEncoder.encode(com, "UTF-8"),
- URLEncoder.encode(trackNum, "UTF-8"), null);
- // 拼接到API URL中
- String fullUrl = apiUrl + "?" + queryParameters;
- URL url = new URL(fullUrl);
- HttpURLConnection connection = (HttpURLConnection) url.openConnection();
- connection.setRequestMethod("GET");
- int responseCode = connection.getResponseCode();
- if (responseCode == HttpURLConnection.HTTP_OK) {
- BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
- String line;
- StringBuilder response = new StringBuilder();
- while ((line = reader.readLine()) != null) {
- response.append(line);
- }
- reader.close();
- // 处理返回的响应数据\
- JSONObject jsonObject = JSON.parseObject(response.toString());
- // 提取 "data" 字段并转换为字符串
- String data = jsonObject.getString("data");
- if (data != null) {
- logisticsInfoVO.setIdentityType(affiliate.getIdentityType());
- logisticsInfoVO.setLogisticsInfo(data);
- logisticsInfoVOList.add(logisticsInfoVO);
- }
- } else {
- // 请求失败
- return null;
- }
- }
- }
- return logisticsInfoVOList;
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- @Override
- public AjaxResult signature(CaseApplication caseApplication) {
- //更改案件状态(暂时)
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATED_SEAL);
- caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATED_SEAL, "");
-
- return AjaxResult.success("签名成功,案件状态已改为待仲裁文书用印");
- }
-
- @Override
- public AjaxResult caseFile(List ids) {
- try {
- for (Long id : ids) {
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- //更改案件状态(暂时)
- caseApplication.setCaseStatus(CaseApplicationConstants.CASE_ARCHIVED);
- caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_ARCHIVED, "");
- }
- } catch (Exception e) {
- return AjaxResult.error(e.getMessage());
- }
-
- return AjaxResult.success("归档成功,案件状态已改为已归档");
- }
-
- @Override
- @Transactional
- public AjaxResult service(Long id, String appEmail, String resEmail, String apptrackingNum, String restrackingNum) {
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
- if (caseApplication1 == null) {
- return AjaxResult.error("未查询到相关案件");
- }
- List caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication1);
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- if (caseAttach.getAnnexType() == 3) {
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile/upload/";
- int startIndex = prefix.length();
- String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
- File file = new File(path);
- // todo 部署放开
- if (!file.exists()) {
- return AjaxResult.error("未生成裁决书");
- }
-
- }
- }
- }
- //修改案件状态
- caseApplication1.setCaseStatus(CaseApplicationConstants.CASE_FILING);
- caseApplicationMapper.submitCaseApplication(caseApplication1);
- //保存邮箱信息和快递单号到关联人表
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(id);
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- if (affiliate.getIdentityType() == 1) { //申请人
- affiliate.setSendEmail(appEmail);
- affiliate.setTrackNum(apptrackingNum);
- caseAffiliateMapper.updataCaseAffiliate(affiliate);
- } else {
- affiliate.setSendEmail(resEmail);
- affiliate.setTrackNum(restrackingNum);
- caseAffiliateMapper.updataCaseAffiliate(affiliate);
- }
- }
- }
- //申请人发送邮件
- boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
- SendMailRecord sendMailRecord = new SendMailRecord();
- sendMailRecord.setCaseId(id);
- sendMailRecord.setMailAddress(appEmail);
- sendMailRecord.setMailContent("您好,审核后的裁决书在附件中请查阅");
-// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
- sendMailRecord.setMailName("签署后的裁决书");
- sendMailRecord.setSendTime(new Date());
- sendMailRecord.setCreateBy(getUsername());
- if (appEmailFlag) {
- sendMailRecord.setSendStatus(1);
- } else {
- sendMailRecord.setSendStatus(0);
- }
- sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
- // 被申请人发送邮件
- boolean resEmailFlag = sendCaseEmail(caseApplication1, resEmail, caseAttachList);
-
- SendMailRecord sendMailRecord1 = new SendMailRecord();
- sendMailRecord1.setCaseId(id);
- sendMailRecord1.setMailAddress(resEmail);
-// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
- sendMailRecord1.setMailContent("您好,审核后的裁决书在附件中请查阅");
- sendMailRecord1.setMailName("签署后的裁决书");
- sendMailRecord1.setSendTime(new Date());
- sendMailRecord1.setCreateBy(getUsername());
- if (resEmailFlag) {
- sendMailRecord1.setSendStatus(1);
- }else {
- sendMailRecord1.setSendStatus(0);
- }
- sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
- if(!appEmailFlag&&!resEmailFlag){
- throw new ServiceException("裁决书发送失败");
- }
- if(!appEmailFlag){
- throw new ServiceException("申请人裁决书发送失败");
- }
- if(!resEmailFlag){
- throw new ServiceException("被申请人裁决书发送失败");
- }
- // 发送短信
- if (appEmailFlag||resEmailFlag) {
-
- if (CollectionUtil.isNotEmpty(caseAffiliates)) {
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- request.setTemplateId("1990362");
- for (CaseAffiliate affiliate : caseAffiliates) {
- String telphone=null;
- if(appEmailFlag&&affiliate.getIdentityType()==1){
- telphone = affiliate.getContactTelphone();
- }else if(resEmailFlag&&affiliate.getIdentityType()==2){
- telphone = affiliate.getContactTelphone();
- }
- if(StrUtil.isEmpty(telphone)){
- continue;
- }
-
- request.setPhone(telphone);
-// if(affiliate.getIdentityType() == 1) {
-// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
-// }else {
-// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
-// }
- request.setTemplateParamSet(new String[]{affiliate.getName(), caseApplication1.getCaseNum()});
- Boolean aBoolean = SmsUtils.sendSms(request);
-
- // 保存短信发送记录
- SmsSendRecord smsSendRecord = new SmsSendRecord();
- smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
-
- smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
- smsSendRecord.setPhone(request.getPhone());
- smsSendRecord.setSendTime(new Date());
-// // 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。
-// if(affiliate.getIdentityType() == 1) {
-// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
-// }else {
-// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
-// }
- smsSendRecord.setSendContent("尊敬的" + affiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。");
-
-
- smsSendRecord.setCreateBy(getUsername());
- if (aBoolean) {
- smsSendRecord.setSendStatus(1);
- } else {
- smsSendRecord.setSendStatus(0);
- }
- smsRecordMapper.saveSmsSendRecord(smsSendRecord);
-
-
- }
-
- }
-
- }
-
-
- // 新增日志
- CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
-
- return AjaxResult.success("仲裁文书送达成功");
- }
-
- /**
- * 通过邮件发送裁决书文件
- *
- * @param caseApplication1
- */
- private boolean sendCaseEmail(CaseApplication caseApplication1, String email, List caseAttachList) {
- List fileList = new ArrayList<>();
- File file = null;
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- if (caseAttach.getAnnexType() == 3) {
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile/upload/";
- int startIndex = prefix.length();
- String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
- // todo 部署放开
- file = new File(path);
-// file = new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\09\\b10b20d66cfa44df8995c3999e3b6266.pdf");
- fileList.add(file);
- System.out.println("文件长度==================:" + file.length());
- }
- }
- }
-
- if (file != null && file.exists()) {
- try {
- Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
-
-// String appUid = UUID.randomUUID().toString();
-// Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅", appUid +"裁决书", fileList, null);
-// // Thread.sleep(20);
- // 收到退信的所有id,即发送失败的uuid
- // emailOutUtil.receiverMail();
- // Thread.sleep(3);
- // List messageIds = emailOutUtil.receiverMail();
-// if (aBoolean&&(CollectionUtil.isEmpty(messageIds)||!messageIds.contains(appUid))) {
-// return Boolean.TRUE;
-// }
- if (aBoolean) {
- return Boolean.TRUE;
- }
- } catch (Exception e) {
- System.out.println("邮件发送失败++++++++++++++++++++++++++++++++");
- System.out.println(e.toString());
- return Boolean.FALSE;
- }
- }
- return Boolean.FALSE;
- }
-
- @Override
- public AjaxResult stamp(CaseApplication caseApplication) {
- //更改案件状态(暂时)
- caseApplication.setCaseStatus(CaseApplicationConstants.ARBITRATION_DELIVERY);
- caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.ARBITRATION_DELIVERY, "");
-
- return AjaxResult.success("用印成功,案件状态已改为待仲裁文书送达");
- }
-
- @Override
- public AjaxResult getArchivesDetail(Long id) {
- ArchivesDetailVO archivesDetailVO = new ArchivesDetailVO();
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- //查询案件信息
-// CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
-// if (caseApplication1 != null) {
-// archivesDetailVO.setCaseApplication(caseApplication1);
-// }
- //查询案件日志信息
-// CaseLogRecord caseLogRecord = new CaseLogRecord();
-// caseLogRecord.setCaseAppliId(id);
-// List caseLogRecords = caseLogRecordService.selectCaseLogRecordList(caseLogRecord);
-// if (caseLogRecords != null && caseLogRecords.size() > 0) {
-// archivesDetailVO.setCaseLogRecordList(caseLogRecords);
-// }
- //查询快递信息
- List logisticsInfo = this.getLogisticsInfo(caseApplication);
- if (logisticsInfo != null && logisticsInfo.size() > 0) {
- archivesDetailVO.setLogisticsInfoVOList(logisticsInfo);
- }
- return AjaxResult.success(archivesDetailVO);
- }
-
- @Override
- @Transactional
- public AjaxResult regenerationDocument(CaseApplication caseApplication) {
- try {
- Map datas = new HashMap<>();
- Long id = caseApplication.getId();
- if (id == null) {
- return null;
- }
- //获取案件详细信息
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
- //生成编码
- String equipmentNo = getNewEquipmentNo();
- datas.put("num", equipmentNo);
- //获取仲裁记录相关信息
- ArbitrateRecord arbitrateRecord1 = caseApplication.getArbitrateRecord();
-
- //获取案件关联人信息
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(id);
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- List nameAgentList = new ArrayList<>();
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- //获取身份类型
- int identityType = affiliate.getIdentityType();
- if (identityType == 1) { //申请人
- datas.put("appName", affiliate.getName());
- datas.put("appAddress", affiliate.getResidenAffili());
- datas.put("appContactAddress", affiliate.getContactAddress());
- datas.put("appLegalPerson", affiliate.getCompLegalPerson());
- datas.put("appLegalPersonTitle", affiliate.getCompLegalperPost());
- datas.put("appAgentName", affiliate.getNameAgent());
- datas.put("appAgentTitle", affiliate.getAppliAgentTitle());
- nameAgentList.add(affiliate.getNameAgent());
- } else if (identityType == 2) { //被申请人
- datas.put("resName", affiliate.getName());
- datas.put("resAddress", affiliate.getResidenAffili());
- String responSex = affiliate.getResponSex();
- if (responSex.equals("0")) {
- datas.put("resSex", "男");
- } else {
- datas.put("resSex", "女");
- }
- Date responBirth = affiliate.getResponBirth();
- if (responBirth != null) {
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
- String responBirthStr = sdf.format(responBirth);
- datas.put("resDateOfBirth", responBirthStr);
- }
- datas.put("resContactAddress", affiliate.getContactAddress());
- nameAgentList.add(affiliate.getNameAgent());
- }
- }
- }
- Date createTime = caseApplication1.getCreateTime();
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- // 将日期格式化为字符串
- String createTimeStr = sdf.format(createTime);
- datas.put("submissionDate", createTimeStr);
- Date registerDate = caseApplication1.getRegisterDate();
- String registerDateStr = sdf.format(registerDate);
- datas.put("acceptDate", registerDateStr);
- //反请求
- Integer adjudicaCounter = caseApplication1.getAdjudicaCounter();
- String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
- "《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
- "仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
- if (adjudicaCounter == null) {
- datas.put("counterclaim", null);
- } else if (adjudicaCounter == 1) {
- datas.put("counterclaim", counterclaim);
- } else {
- datas.put("counterclaim", null);
- }
- //财产保全
- Integer properPreser = caseApplication1.getProperPreser();
- String preservation = "本案受理后,申请人向仲裁委提交了财产保全申请,仲裁委根据《中华人民共和国仲裁法》" +
- "第二十八条之规定,将该申请提交至法院。";
- if (properPreser == null) {
- datas.put("preservation", null);
- } else if (properPreser == 1) {
- datas.put("preservation", preservation);
- } else {
- datas.put("preservation", null);
- }
- //管辖权异议
- Integer objectiJuris = caseApplication1.getObjectiJuris();
- String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《管辖异议申请书》,认为" +
- ",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
- if (objectiJuris == null) {
- datas.put("jurisdictionalObjection", null);
- } else if (objectiJuris == 1) {
- datas.put("jurisdictionalObjection", jurisdictionalObjection);
- } else {
- datas.put("jurisdictionalObjection", null);
- }
- String arbitratorName = caseApplication1.getArbitratorName();
- datas.put("arbitratorName", arbitratorName);
- Integer arbitratMethod = caseApplication1.getArbitratMethod();
- Date hearDate = caseApplication1.getHearDate();
- String hearDateStr = "";
- if (hearDate != null) {
- hearDateStr = sdf.format(hearDate);
- }
- //线上开庭时
- if (arbitratMethod == 1) {
- String onLine1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
- String onLine2 = "通过仲裁委智慧仲裁平台开庭审理了本案。";
- datas.put("onLine1", onLine1);
- datas.put("hearDate", hearDateStr);
- datas.put("onLine2", onLine2);
- } else {
- //书面仲裁时
- String written1 = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于";
- String written2 = "在仲裁委所在地开庭审理了本案。";
- datas.put("written1", written1);
- datas.put("hearDate1", hearDateStr);
- datas.put("written2", written2);
- }
- Integer isAbsence = caseApplication1.getIsAbsence();
- if (isAbsence == null) {
- datas.put("absent1", null);
- datas.put("absent2", null);
- datas.put("absent3", null);
- datas.put("absent4", null);
- datas.put("absent5", null);
- datas.put("attend1", null);
- datas.put("attend2", null);
- datas.put("attend3", null);
- datas.put("attend4", null);
- datas.put("attend5", null);
- datas.put("attend6", null);
- datas.put("attend7", null);
- datas.put("appAgentName1", null);
- datas.put("appAgentName2", null);
- datas.put("resAgentName", null);
- } else if (isAbsence == 1) {
- //缺席审理
- String absent1 = "申请人的特别授权委托代理人";
- String absent2 = "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
- "《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。";
- String absent3 = "庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明," +
- "发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。";
- String absent4 = "(二/三)当事人提供的证据材料\n" +
- "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
- String absent5 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
- "第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
- datas.put("absent1", absent1);
- datas.put("absent2", absent2);
- datas.put("absent3", absent3);
- datas.put("absent4", absent4);
- datas.put("absent5", absent5);
- datas.put("appAgentName1", nameAgentList.get(0));
- } else {
- //出席审理
- String attend1 = "申请人的特别授权委托代理人";
- String attend2 = "和被申请人本人/的特别授权委托代理人";
- String attend3 = "出席了庭审。";
- String attend4 = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;" +
- "双方当事人均出示了证据材料并对对方的证据材料进行了质证;申请人出示了证据材料," +
- "被申请人对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论," +
- "并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。";
- String attend5 = "(二)被申请人的答辩意见";
- String attend6 = "(二/三)当事人提供的证据材料及对方的质证意见\n" +
- "申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:";
- String attend7 = "被申请人对上述材料的质证意见为:";
- datas.put("attend1", attend1);
- datas.put("attend2", attend2);
- datas.put("attend3", attend3);
- datas.put("attend4", attend4);
- datas.put("attend5", attend5);
- datas.put("attend6", attend6);
- datas.put("attend7", attend7);
- datas.put("responCrossOpin", caseApplication1.getResponCrossOpin());
- datas.put("appAgentName2", nameAgentList.get(0));
- datas.put("resAgentName", nameAgentList.get(1));
- if (arbitratMethod == 1) {
- //被申出席+开庭
- String attend8 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
- "第五十一条的规定,裁决如下:";
- datas.put("attend8", attend8);
- } else {
- //被申出席+书面
- String attend9 = "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
- "第五十一条、第五十八条的规定,裁决如下:";
- datas.put("attend9", attend9);
- }
- }
- datas.put("claims", caseApplication1.getArbitratClaims());
- datas.put("request", caseApplication1.getRequestRule());
- CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
- List caseAttachList1 = caseApplication2.getCaseAttachList();
- if (caseAttachList1 != null && caseAttachList1.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList1) {
- if (caseAttach.getAnnexType() == 6) { //被申请人证据材料
- String annexName = caseAttach.getAnnexName();
- boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
- if (isImageFile) {
- String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
- System.out.println("路径是===========" + annexPath);
- PictureRenderData pictureRenderData = WordUtil
- .rebuildImageContent(100, 100, null, annexPath);
- datas.put("resEvidenceMaterial", pictureRenderData);
- }
- } else if (caseAttach.getAnnexType() == 2) { //申请人证据材料
- String annexName = caseAttach.getAnnexName();
- boolean isImageFile = Pattern.matches(".*\\.(jpg|png|gif|bmp)$", annexName);
- if (isImageFile) {
- String annexPath = "/home/ruoyi" + caseAttach.getAnnexPath();
- System.out.println("路径是===========" + annexPath);
- PictureRenderData pictureRenderData = WordUtil
- .rebuildImageContent(100, 100, null, annexPath);
- //申请人证据材料
- datas.put("appEvidenceMaterial", pictureRenderData);
- }
- }
- }
- }
- datas.put("applicaCrossOpin", "被申请人证据不足,无法说明事实");
-
- datas.put("factDetermi", "被申请人欠款属实");
- datas.put("arbitrateThink", "被申请人应按约定还款");
- datas.put("rulingFollows", "被申请人依法偿还申请人欠款");
-
- LocalDate now = LocalDate.now();
- String year = Integer.toString(now.getYear());
- datas.put("year", year);
- String month = String.format("%02d", now.getMonthValue());
- String day = String.format("%02d", now.getDayOfMonth());
- String modalFilePath = "/data/arbitrate-document/template/新裁决书模板.docx";
-// String modalFilePath = "D:/develop/新裁决书模板.docx";
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
-// String saveFolderPath = "D:/data/" + year + "/" + month + "/" + day;
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
- String resultFilePath = saveFolderPath + "/" + fileName;
- // 创建日期目录
- File saveFolder = new File(saveFolderPath);
- if (!saveFolder.exists()) {
- saveFolder.mkdirs();
- }
- Path sourcePath = new File(modalFilePath).toPath();
- Path destinationPath = new File(resultFilePath).toPath();
- Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
- String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
- String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
-
-
- //将裁决书更新到附件表里
- CaseAttach caseAttach = CaseAttach.builder()
- .caseAppliId(id)
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(3)
- .build();
- int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
-
-
- if (i > 0) {
- if (arbitrateRecord1 != null) {
- //将仲裁记录更新到仲裁记录表
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord1);
- }
- }
-
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- startIndex += prefix.length();
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- caseAttach.setAnnexPath(annexPath);
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- caseAttach.setAnnexName(annexNamenew);
- }
-
- return AjaxResult.success(caseAttach);
- } catch (IOException e) {
- e.printStackTrace();
- return AjaxResult.error("重新生成裁决书异常");
- }
- }
-
- @Override
- public AjaxResult emailByCaseId(Long id) {
- List list = caseAffiliateMapper.emailByCaseId(id);
- BookSendVO bookSendVO = new BookSendVO();
- if (CollectionUtil.isNotEmpty(list)) {
- for (CaseAffiliate caseAffiliate : list) {
- // 申请人邮箱
- if (caseAffiliate.getIdentityType() == 1) {
- bookSendVO.setAppEmail(caseAffiliate.getEmail());
- } else {
- // 被申请人邮箱
- bookSendVO.setResEmail(caseAffiliate.getEmail());
- }
- }
- }
- return AjaxResult.success(bookSendVO);
- }
-
- private void setExecList(List execList, List columnValueList) {
- if (CollectionUtil.isNotEmpty(columnValueList)) {
- Function, Integer> function = columnValueMapper::batchSave;
- execList.add(new MultipleThreadListParam(function, columnValueList));
- }
-
- }
-
- @Transactional
- @Override
- public AjaxResult batchDocument(List ids) {
- // todo 多线程生成裁决书
-// List execList=new ArrayList<>();
-// if(CollectionUtil.isNotEmpty(columnValueList)) {
-// setExecList(execList, columnValueList);
-// }
-//
-// if(CollectionUtil.isNotEmpty(execList)){
-// MultipleThreadWorkUtil.execListFun(execList.toArray(new MultipleThreadListParam[execList.size()]));
-// }
- for (Long id : ids) {
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- createDocument(caseApplication);
- }
-
- return AjaxResult.success();
- }
-
- /**
- * 根据签署流程id查询批量签名链接
- *
- * @param idsReq
- * @return
- */
- @Override
- public SealSignRecord selectBatchSignUrl(StringIdsReq idsReq) {
- SealSignRecord signRecord = new SealSignRecord();
-
- try {
- EsignHttpResponse identityInfo = SignAward.identityInfo(idsReq);
-
- Gson gson = new Gson();
- if (StrUtil.isNotEmpty(identityInfo.getBody())) {
- JsonObject identityInfoJsonObject = gson.fromJson(identityInfo.getBody(), JsonObject.class);
- if (identityInfoJsonObject != null && !identityInfoJsonObject.get("data").isJsonNull()) {
- JsonObject identityInfoData = identityInfoJsonObject.getAsJsonObject("data");
- if (identityInfoData != null && !identityInfoData.get("psnId").isJsonNull()) {
- idsReq.setPsnId(identityInfoData.get("psnId").getAsString());
- }
- }
- }
- if (StrUtil.isEmpty(idsReq.getPsnId())) {
- throw new ServiceException("该用户未认证");
- }
- EsignHttpResponse batchSignUrl = SignAward.batchSignUrl(idsReq);
- if (StrUtil.isNotEmpty(batchSignUrl.getBody())) {
- JsonObject signUrlJsonObject = gson.fromJson(batchSignUrl.getBody(), JsonObject.class);
- if (signUrlJsonObject != null && !signUrlJsonObject.get("data").isJsonNull()) {
- JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
- if (signUrlData != null && !signUrlData.get("batchSignUrlWithoutLogin").isJsonNull()) {
- // 免登录批量签链接(链接有效期2小时)
- String url = signUrlData.get("batchSignUrlWithoutLogin").getAsString();
- // batchSignUrl 需登录批量签链接(链接有效期2小时),batchSignShortUrl需登录批量签短链接(链接有效期2小时),batchSignShortUrlWithoutLogin免登录批量签短链接(链接有效期2小时)
- signRecord.setSignUrl(url);
- }
- }
- }
- } catch (EsignDemoException e) {
- e.printStackTrace();
- }
-
- return signRecord;
- }
-
- @Override
- public SealSignRecord selectBatchSealUrl(StringIdsReq idsReq) {
- SealSignRecord signRecord = new SealSignRecord();
-
- try {
- EsignHttpResponse identityInfo = SignAward.identityInfo(idsReq);
-
- Gson gson = new Gson();
- if (StrUtil.isNotEmpty(identityInfo.getBody())) {
- JsonObject identityInfoJsonObject = gson.fromJson(identityInfo.getBody(), JsonObject.class);
- if(identityInfoJsonObject!=null&&!identityInfoJsonObject.get("data").isJsonNull()) {
- JsonObject identityInfoData = identityInfoJsonObject.getAsJsonObject("data");
- if (identityInfoData != null && !identityInfoData.get("psnId") .isJsonNull()) {
- idsReq.setPsnId(identityInfoData.get("psnId").getAsString());
- }
- }
- }
- if (StrUtil.isEmpty(idsReq.getPsnId())) {
- throw new ServiceException("该用户未认证");
- }
- EsignHttpResponse batchSignUrl = SignAward.batchSignUrl(idsReq);
- if (StrUtil.isNotEmpty(batchSignUrl.getBody())) {
- JsonObject signUrlJsonObject = gson.fromJson(batchSignUrl.getBody(), JsonObject.class);
- if (signUrlJsonObject != null && !signUrlJsonObject.get("data").isJsonNull()) {
- JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
- if (signUrlData != null&& !signUrlData.get("batchSignUrlWithoutLogin").isJsonNull()) {
- // 免登录批量签链接(链接有效期2小时)
- String url = signUrlData.get("batchSignUrlWithoutLogin").getAsString();
- // batchSignUrl 需登录批量签链接(链接有效期2小时),batchSignShortUrl需登录批量签短链接(链接有效期2小时),batchSignShortUrlWithoutLogin免登录批量签短链接(链接有效期2小时)
- signRecord.setSignUrl(url);
- }
- }
- }
- } catch (EsignDemoException e) {
- e.printStackTrace();
- }
-
- return signRecord;
- }
-
- /**
- * 根据仲裁员手机号分页查询等待签署,签署中的裁决书
- *
- * @param personAccount 仲裁员手机号
- * @return
- */
- @Override
- public List selectSealSigning(String personAccount, Integer caseStatus) {
- return sealSignRecordMapper.selectSealSigning(personAccount, caseStatus);
- }
-
-
- public String getNewEquipmentNo() {
- Object awardNum = redisCache.getCacheObject("awardNum");
- if (awardNum == null) {
- redisCache.setCacheObject("awardNum", "00001");
- String s = redisCache.getCacheObject("awardNum").toString();
- // 字符串数字解析为整数
- int no = Integer.parseInt(s);
- // 最新设备编号自增1
- int newEquipment = ++no;
- // 将整数格式化为5位数字
- s = String.format("%05d", newEquipment);
- redisCache.setCacheObject("awardNum", s);
- return s;
- } else {
- String s = awardNum.toString();
- // 字符串数字解析为整数
- int no = Integer.parseInt(s);
- // 最新设备编号自增1
- int newEquipment = ++no;
- // 将整数格式化为5位数字
- s = String.format("%05d", newEquipment);
- redisCache.setCacheObject("awardNum", s);
- return s;
- }
- }
-
- /**
- * 根据裁决书模板获取所有的占位符,占位符必须是{{name}}格式
- *
- * @param path
- * @return
- */
- public List getBookmarkByDocx(String path) {
- XWPFDocument xwpfDocument = null;
- try {
- log.error("path====" + path);
- FileInputStream fileInputStream = new FileInputStream(path);
- log.error("fileInputStream====");
- xwpfDocument = new XWPFDocument(fileInputStream);
- log.error("xwpfDocument====" + xwpfDocument);
- } catch (IOException e) {
- e.printStackTrace();
- }
- if (xwpfDocument == null) {
- return new ArrayList<>();
- }
- List paragraphs = xwpfDocument.getParagraphs();
- if (CollectionUtil.isEmpty(xwpfDocument.getParagraphs())) {
- return new ArrayList<>();
- }
- String regex = "\\{\\{.*?\\}\\}"; // 定义占位符的正则表达式
- Pattern pattern = Pattern.compile(regex);
- List bookmarkList = new ArrayList<>();
- for (XWPFParagraph paragraph : paragraphs) {
- String text = paragraph.getText();
- if (StrUtil.isNotEmpty(text)) {
- Matcher matcher = pattern.matcher(text);
-
- while (matcher.find()) {
- String placeholder = matcher.group();
- String keyword = placeholder.substring(2, placeholder.length() - 2);
- bookmarkList.add(keyword);
- }
- }
- }
- return bookmarkList;
- }
-
-
-}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/ArbitratorServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/ArbitratorServiceImpl.java
deleted file mode 100644
index 78f9e4b..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/ArbitratorServiceImpl.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service.impl;
-
-import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
-import com.ruoyi.wisdomarbitrate.mapper.ArbitratorMapper;
-import com.ruoyi.wisdomarbitrate.service.IArbitratorService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-@Service
-public class ArbitratorServiceImpl implements IArbitratorService {
- @Autowired
- private ArbitratorMapper arbitratorMapper;
-
-
- @Override
- public List selectArbitratorList(Arbitrator arbitrator) {
- return arbitratorMapper.selectArbitratorList(arbitrator);
-
- }
-
-
-
-
-
-
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java
index dfa8aca..ad0635f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CallBackHandleServiceImpl.java
@@ -11,12 +11,13 @@ import org.springframework.stereotype.Component;
@Component
@Slf4j
public class CallBackHandleServiceImpl implements CallBackService {
- @Autowired
- private CasePaymentServiceImpl casePaymentService;
-
+ // todo
+// @Autowired
+// private CasePaymentServiceImpl casePaymentService;
+
@Override
public void successPay(String orderSn) {
- casePaymentService.callback(orderSn);
+ // casePaymentService.callback(orderSn);
}
@Override
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java
deleted file mode 100644
index d879caf..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationLogServiceImpl.java
+++ /dev/null
@@ -1,512 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service.impl;
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.enums.UpdateSubmitStatus;
-import com.ruoyi.common.enums.YesOrNoEnum;
-import com.ruoyi.common.utils.ObjectFieldUtils;
-import com.ruoyi.common.utils.SmsUtils;
-import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
-import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
-import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
-import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
-import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
-import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
-import com.ruoyi.wisdomarbitrate.mapper.*;
-import com.ruoyi.wisdomarbitrate.service.CaseApplicationLogService;
-import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import static com.ruoyi.common.utils.SecurityUtils.getUsername;
-
-/**
- * @author wangqiong
- * @description 案件日志
- * @date 2023-11-17 14:05
- */
-@Service
-public class CaseApplicationLogServiceImpl implements CaseApplicationLogService {
- @Autowired
- private CaseApplicationLogMapper caseApplicationLogMapper;
- @Autowired
- private CaseApplicationMapper caseApplicationMapper;
- @Autowired
- private CaseAffiliateLogMapper caseAffiliateLogMapper;
- @Autowired
- private CaseAffiliateMapper caseAffiliateMapper;
- @Autowired
- private CaseAttachMapper caseAttachMapper;
- @Autowired
- private CaseAttachLogMapper caseAttachLogMapper;
- @Autowired
- private SmsRecordMapper smsRecordMapper;
- @Autowired
- private ICaseApplicationService caseApplicationService;
- @Autowired
- private ColumnValueLogMapper columnValueLogMapper;
- // 对比两个版本修改的字段,基本字段对比
- private static final String[] columns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
- "claimPrinciOwed","arbitratClaims","properPreser","requestRule","facts"};
- // 人员字段对比
- private static final String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress","email",
- "nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
- "compLegalperPost","responSex","responBirth"};
- @Override
- public int insert(CaseApplication caseApplicationLog) {
- return caseApplicationLogMapper.insert(caseApplicationLog);
- }
-
- @Override
- public int delete(Long id) {
- return caseApplicationLogMapper.deleteById(id);
- }
-
-
-
- @Override
- public CaseApplication selectByCaseIdAndVersion(Long id, int version) {
- return caseApplicationLogMapper.selectByCaseIdAndVersion(id,version);
- }
- /**
- * 修改的案件提交到秘书
- * @param vo
- * @return
- */
- @Override
- public AjaxResult submit(UpdateSubmitVO vo) {
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
- // 修改日志表提交状态
- caseApplicationLogMapper.updateStatus(vo);
- return AjaxResult.success();
- }
- @Transactional
- @Override
- public AjaxResult revoke(UpdateSubmitVO vo) {
- // 根据案件id和版本号查询改案件
- CaseApplication caseApplication = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
- if(caseApplication == null){
- return AjaxResult.error("案件不存在");
- }
- // 如果秘书没有审核,将撤销状态改为同意撤销,否则改为撤销
- if(caseApplication.getUpdateSubmitStatus()!=null && !caseApplication.getUpdateSubmitStatus().equals(UpdateSubmitStatus.AGREE.getCode())){
- agreeRevoke(vo);
-
- }else {
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.REVOKE.getCode());
- // 修改日志表提交状态
- caseApplicationLogMapper.updateStatus(vo);
- }
-
- return AjaxResult.success();
- }
-
- /**
- * 秘书审核修改的案件
- * @param vo
- * @return
- */
- @Transactional
- @Override
- public AjaxResult updateAudit(UpdateSubmitVO vo) {
- if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.COMMITTED.getCode())) {
- // 审核修改提交状态
- if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
- // 如果版本号为1,则直接返回
- if(vo.getVersion() <= 1){
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
- caseApplicationLogMapper.updateStatus(vo);
- return AjaxResult.success();
- }
- // 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
- // 查询日志记录表本版本数据
- CaseApplication caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
- if (caseApplicationLog == null) {
- return AjaxResult.error("未找到该案件");
- }
- // 将日志表改版本的状态改为同意
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
- caseApplicationLogMapper.updateStatus(vo);
- // 根据caseLogId查询相关人员表
- List affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
- // 更新案件主表
- caseApplicationMapper.updataCaseApplication(caseApplicationLog);
-
- // 更新相关人员主表
- if(CollectionUtil.isNotEmpty(affiliateLogList)){
- caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
- for (CaseAffiliate caseAffiliate : affiliateLogList) {
- caseAffiliate.setCaseAppliId(vo.getCaseId());
-
- }
- caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
- }
- // // 根据caseLogId查询案件记录附件表
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
- caseApplication.setAnnexType(2);
- List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
- // 更新记录附件表
- if(CollectionUtil.isNotEmpty(attachLogList)){
- for (CaseAttach caseAttach : attachLogList) {
- caseAttach.setCaseAppliId(vo.getCaseId());
- caseAttachMapper.updateCaseAttach(caseAttach);
- }
- }
- // 更新自定义字段表
- // 根据caseLogId查询自定义字段表
- List columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
- if(CollectionUtil.isNotEmpty(columnValueList)){
- for (ColumnValue columnValue : columnValueList) {
- columnValue.setCaseAppliLogId(vo.getCaseId());
-
- }
- columnValueLogMapper.batchUpdate(columnValueList);
- }
- } else {
- // 拒绝,将日志表改版本的状态改为拒绝
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE.getCode());
- caseApplicationLogMapper.updateStatus(vo);
- return sendAuditMessage(vo);
- }
- return AjaxResult.success();
- } else if (Objects.equals(vo.getUpdateSubmitStatus(), UpdateSubmitStatus.REVOKE.getCode())) {
- // 审核修改撤销状态
- if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
- // 同意撤销
- agreeRevoke(vo);
- } else {
- // 拒绝撤销,将日志表改版本的状态改为拒绝撤销
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.REFUSE_REVOKE.getCode());
- caseApplicationLogMapper.updateStatus(vo);
- return sendAuditMessage(vo);
- }
- return AjaxResult.success();
- }
- return AjaxResult.success();
- }
-
- /**
- * 给申请人发送短信
- * @param vo
- * @return
- */
- private AjaxResult sendAuditMessage(UpdateSubmitVO vo) {
- // 查询申请人
- CaseApplication logCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
- if(logCase == null){
- return AjaxResult.success();
- }
- CaseAffiliate caseAffiliate = caseAffiliateLogMapper.selectCaseAffiliateByIdentityType(logCase.getCaseLogId(), 1);
- if(caseAffiliate == null){
- return AjaxResult.success();
- }
-
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- request.setTemplateId("1996949");
- request.setPhone(caseAffiliate.getContactTelphone());
- request.setTemplateParamSet(new String[]{caseAffiliate.getName(), logCase.getCaseNum(),vo.getReason()});
- Boolean aBoolean = SmsUtils.sendSms(request);
- //保存短信发送记录
- SmsSendRecord smsSendRecord = new SmsSendRecord();
- smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(caseAffiliate.getCaseAppliId());
- caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
- smsSendRecord.setCaseNum(caseApplication.getCaseNum());
- smsSendRecord.setPhone(request.getPhone());
- smsSendRecord.setSendTime(new Date());
- // 1996949 审核案件结果通知 尊敬的{1}用户,您的{2}仲裁案件,审核未通过,理由为{3},请知晓,如非本人操作,请忽略本短信
- String content = "尊敬的" + caseAffiliate.getName() + ",您的"+logCase.getCaseNum()+"仲裁案件,审核未通过,理由为"+vo.getReason()+",请知晓,如非本人操作,请忽略本短信。";
- smsSendRecord.setSendContent(content);
- smsSendRecord.setCreateBy(getUsername());
- if (aBoolean) {
- smsSendRecord.setSendStatus(1);
- } else {
- smsSendRecord.setSendStatus(0);
- }
- smsRecordMapper.saveSmsSendRecord(smsSendRecord);
- return AjaxResult.success();
- }
-
- @Override
- public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
- // 查询当前版本号和主表的案件
- CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setCaseAppliId(vo.getCaseId());
- caseApplication.setId(vo.getCaseId());
- CaseApplication beforeCase = caseApplicationService.selectCaseApplication(caseApplication);
-
- // 查询案件关联人员
- afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
- // 查询自定义字段表
- afterCase.setColumnValues(columnValueLogMapper.listBycaseAppliLogId(afterCase.getCaseLogId()));
- // 查询附件
- CaseAttach caseAttach = new CaseAttach();
- caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
- caseAttach.setAnnexType(2);
- caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
- caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
- List afterAttachList = caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
- if (CollectionUtil.isNotEmpty(afterAttachList)) {
- for (CaseAttach attach : afterAttachList) {
- String annexName = attach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- startIndex += prefix.length();
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- attach.setAnnexPath(annexPath);
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- attach.setAnnexName(annexNamenew);
- }
- }
- afterCase.setCaseAttachList(afterAttachList);
- }
- afterCase.setCaseAttachList(afterAttachList);
- CompareCaseVO compareCaseVO = new CompareCaseVO();
- compareCaseVO.setBeforeCase(beforeCase);
- compareCaseVO.setAfterCase(afterCase);
-
- StringBuilder changeColumn = new StringBuilder();
- // 对比基本字段
- for (String column : columns) {
- String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
- String afterValue = ObjectFieldUtils.getValue(afterCase, column);
- if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
- changeColumn.append(column).append(",");
- continue;
- }
- if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
- changeColumn.append(column).append(",");
- continue;
- }
- if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
- changeColumn.append(column).append(",");
- continue;
-
- }
-
- }
- // 对比案件人员字段
- compareAffilate(beforeCase, afterCase);
- // 对比申请人证据资料
- compareCaseVO.setChangeColumn(compareApplicantFile(beforeCase, afterCase, changeColumn).toString());
- // 对比自定义字段
- //
- List beforeColumnValues = beforeCase.getColumnValues();
- List afterColumnValues = afterCase.getColumnValues();
- StringBuilder columnValueChange = new StringBuilder();
-
- if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
- Map beforeColumnValueMap = beforeColumnValues.stream().collect(Collectors.toMap(ColumnValue::getColumn, ColumnValue::getValue, (n1, n2) -> n2));
- for (ColumnValue afterColumnValue : afterColumnValues) {
- // 改变前字段不包含改变后字段
- if (!beforeColumnValueMap.containsKey(afterColumnValue.getColumn())) {
- columnValueChange.append(afterColumnValue.getColumn()).append(",");
- } else {
- // 都有这个字段,比较内容是否相同
- // 修改后为空,修改前不为空
- if (StrUtil.isEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
- columnValueChange.append(afterColumnValue.getColumn()).append(",");
- } else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
- // 修改前为空,修改后不为空
- columnValueChange.append(afterColumnValue.getColumn()).append(",");
- } else if (StrUtil.isNotEmpty(afterColumnValue.getValue()) && StrUtil.isNotEmpty(beforeColumnValueMap.get(afterColumnValue.getColumn()))
- && !afterColumnValue.getValue().equals(beforeColumnValueMap.get(afterColumnValue.getColumn()))) {
- // 修改前不为空,修改后不为空,内容不同
- columnValueChange.append(afterColumnValue.getColumn()).append(",");
- }
- }
- }
-
- } else if (CollectionUtil.isEmpty(beforeColumnValues) && CollectionUtil.isNotEmpty(afterColumnValues)) {
- for (ColumnValue afterColumnValue : afterColumnValues) {
- columnValueChange.append(afterColumnValue.getColumn()).append(",");
- }
-
- } else if (CollectionUtil.isNotEmpty(beforeColumnValues) && CollectionUtil.isEmpty(afterColumnValues)) {
- for (ColumnValue beforeColumn : beforeColumnValues) {
- columnValueChange.append(beforeColumn.getColumn()).append(",");
- }
-
- }
- compareCaseVO.setColumnValueChangeColumn(columnValueChange.toString());
-
- return AjaxResult.success(compareCaseVO);
- }
-
- /**
- * 对比申请人证据资料
- * @param beforeCase
- * @param afterCase
- * @param changeColumn
- * @return
- */
- private StringBuilder compareApplicantFile(CaseApplication beforeCase, CaseApplication afterCase, StringBuilder changeColumn) {
- List beforeAttachFilter =new ArrayList<>();
- List afterAttachFilter =new ArrayList<>();
- if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList())){
- beforeAttachFilter = beforeCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
- }
- if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
- afterAttachFilter = afterCase.getCaseAttachList().stream().filter(n -> n.getAnnexType() == 2).collect(Collectors.toList());
- }
- if(CollectionUtil.isNotEmpty(beforeAttachFilter)&& CollectionUtil.isNotEmpty(afterAttachFilter)){
- if(beforeAttachFilter.size()!=afterAttachFilter.size()){
- changeColumn.append("fileColumn");
- }else {
- Map afterAttachMap = afterAttachFilter.stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
- for (CaseAttach beforeCaseAttach : beforeAttachFilter) {
- if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
- changeColumn.append("fileColumn");
- break;
- }
- }
- }
- }
-
-
- return changeColumn;
- }
-
- /**
- * 对比案件人员字段
- * @param beforeCase
- * @param afterCase
- */
- private void compareAffilate(CaseApplication beforeCase, CaseApplication afterCase) {
- // 对比人员字段
- List beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
- List afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
- Map beforeCaseCaseAffiliateMap = null;
- if (CollectionUtil.isNotEmpty(beforeCaseCaseAffiliates)) {
- // 转为map
- beforeCaseCaseAffiliateMap = beforeCaseCaseAffiliates.stream().collect(Collectors.toMap(CaseAffiliate::getIdentityType, v -> v, (n1, n2) -> n2));
- }
- StringBuilder affiliateChangeColumn;
- // 如果上一个版本和现版本有一个为空,那么所有字段都修改
- if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates == null) {
- affiliateChangeColumn = new StringBuilder();
- for (String column : affiliateColumns) {
-
- affiliateChangeColumn.append(column).append(",");
- }
-
- } else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
- affiliateChangeColumn = new StringBuilder();
- for (String column : affiliateColumns) {
-
- affiliateChangeColumn.append(column).append(",");
- }
- } else if (beforeCaseCaseAffiliates != null && afterCaseCaseAffiliates != null) {
- for (CaseAffiliate afterCaseCaseAffiliate : afterCaseCaseAffiliates) {
- // 找到相同身份类型的数据,进行对比
- affiliateChangeColumn = new StringBuilder();
- int identityType = afterCaseCaseAffiliate.getIdentityType();
- if (beforeCaseCaseAffiliateMap != null && beforeCaseCaseAffiliateMap.containsKey(identityType)) {
- CaseAffiliate beforeCaseCaseAffiliate = beforeCaseCaseAffiliateMap.get(identityType);
- for (String column : affiliateColumns) {
- String beforeValue = ObjectFieldUtils.getValue(beforeCaseCaseAffiliate, column);
- String afterValue = ObjectFieldUtils.getValue(afterCaseCaseAffiliate, column);
- if (StrUtil.isEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue)) {
- affiliateChangeColumn.append(column).append(",");
- continue;
- }
- if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isEmpty(afterValue)) {
- affiliateChangeColumn.append(column).append(",");
- continue;
- }
- if (StrUtil.isNotEmpty(beforeValue) && StrUtil.isNotEmpty(afterValue) && !Objects.equals(beforeValue, afterValue)) {
- affiliateChangeColumn.append(column).append(",");
- continue;
-
- }
-
- }
-
-
- } else {
- for (String column : affiliateColumns) {
-
- affiliateChangeColumn.append(column).append(",");
- }
- }
- afterCaseCaseAffiliate.setChangeColumn(affiliateChangeColumn.toString());
-
- }
-
-
- }
- }
-
- /**
- * 同意撤销
- * @param vo
- */
- private void agreeRevoke(UpdateSubmitVO vo) {
- CaseApplication caseApplicationLog;
- // 查询日志记录表上个版本未被拒绝数据
- if(vo.getVersion()<=1){
- caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
-
- }else {
- caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
- }
- if (caseApplicationLog == null) {
- return;
- }
- // 将日志表改版本的状态改为拒绝
- vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE_REVOKE.getCode());
- caseApplicationLogMapper.updateStatus(vo);
- // 根据caseLogId查询相关人员表
- List affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
-
-
- // 更新案件主表
- caseApplicationMapper.updataCaseApplication(caseApplicationLog);
-
- // 更新相关人员主表
- if(CollectionUtil.isNotEmpty(affiliateLogList)){
- caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
- for (CaseAffiliate caseAffiliate : affiliateLogList) {
- caseAffiliate.setCaseAppliId(vo.getCaseId());
-
- }
- caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
- }
- // // 根据caseLogId查询案件记录附件表
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
- caseApplication.setAnnexType(2);
- List attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
- // 更新记录附件表
- if(CollectionUtil.isNotEmpty(attachLogList)){
- for (CaseAttach caseAttach : attachLogList) {
- caseAttach.setCaseAppliId(vo.getCaseId());
- caseAttachMapper.updateCaseAttach(caseAttach);
- }
- }
- // 根据caseLogId查询自定义字段表
- List columnValueList = columnValueLogMapper.listBycaseAppliLogId(caseApplicationLog.getCaseLogId());
-
- // 更新相关人员主表
- if(CollectionUtil.isNotEmpty(columnValueList)){
- for (ColumnValue columnValue : columnValueList) {
- columnValue.setCaseAppliLogId(vo.getCaseId());
-
- }
- columnValueLogMapper.batchUpdate(columnValueList);
- }
- }
-}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
deleted file mode 100644
index 7005ca1..0000000
--- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
+++ /dev/null
@@ -1,3703 +0,0 @@
-package com.ruoyi.wisdomarbitrate.service.impl;
-
-
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-
-import com.ruoyi.common.annotation.DataScope;
-import com.ruoyi.common.constant.CaseApplicationConstants;
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.*;
-import com.ruoyi.common.core.domain.model.LoginUser;
-import com.ruoyi.common.enums.UpdateSubmitStatus;
-import com.ruoyi.common.exception.EsignDemoException;
-import com.ruoyi.common.exception.ServiceException;
-import com.ruoyi.common.utils.*;
-import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.utils.thread.ThreadPoolUtil;
-import com.ruoyi.system.domain.SysUserRole;
-import com.ruoyi.system.mapper.*;
-import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
-import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
-import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
-import com.ruoyi.wisdomarbitrate.domain.*;
-import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
-import com.ruoyi.wisdomarbitrate.mapper.*;
-import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
-import com.ruoyi.wisdomarbitrate.utils.SignAward;
-import com.ruoyi.wisdomarbitrate.utils.UnZipFileUtils;
-import com.ruoyi.wisdomarbitrate.utils.ZipFileUtils;
-import com.tencentyun.TLSSigAPIv2;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.multipart.MultipartFile;
-import java.io.*;
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardCopyOption;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.ZoneId;
-import java.util.*;
-import java.util.List;
-import java.util.function.Function;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.zip.ZipOutputStream;
-
-import static com.ruoyi.common.core.domain.AjaxResult.error;
-import static com.ruoyi.common.core.domain.AjaxResult.success;
-import static com.ruoyi.common.utils.PageUtils.startPage;
-import static com.ruoyi.common.utils.SecurityUtils.getLoginUser;
-import static com.ruoyi.common.utils.SecurityUtils.getUsername;
-import static com.ruoyi.wisdomarbitrate.utils.CaseLogUtils.insertCaseLog;
-
-
-@Service
-public class CaseApplicationServiceImpl implements ICaseApplicationService {
- // 腾讯云即时通信sdkAppId
- @Value("${imConfig.sdkAppId}")
- private long sdkAppId;
- // 腾讯云即时通信密钥
- @Value("${imConfig.sdkSecretKey}")
- private String sdkSecretKey;
- @Autowired
- private CaseApplicationMapper caseApplicationMapper;
-
- @Autowired
- private CaseAffiliateMapper caseAffiliateMapper;
-
- @Autowired
- private ArbitrateRecordMapper arbitrateRecordMapper;
- @Autowired
- private ICaseApplicationService caseApplicationService;
- @Autowired
- private CaseAttachMapper caseAttachMapper;
- @Autowired
- private SysDeptMapper sysDeptMapper;
- @Autowired
- private SysUserMapper sysUserMapper;
- @Autowired
- private SysUserRoleMapper userRoleMapper;
- @Autowired
- private SysRoleMapper roleMapper;
- @Autowired
- private SealSignRecordMapper sealSignRecordMapper;
- @Autowired
- private CaseLogRecordMapper caseLogRecordMapper;
- @Autowired
- private CaseEvidenceDirectoryMapper caseEvidenceDirectoryMapper;
- @Autowired
- private SmsRecordMapper smsRecordMapper;
- @Autowired
- private DeptIdentifyMapper deptIdentifyMapper;
- @Autowired
- private ReservedConferenceMapper reservedConferenceMapper;
-
- @Autowired
- private SealManageMapper sealManageMapper;
- @Autowired
- private CaseApplicationLogMapper caseApplicationLogMapper;
- @Autowired
- private CaseAffiliateLogMapper caseAffiliateLogMapper;
- @Autowired
- private CaseAttachLogMapper caseAttachLogMapper;
-
- @Autowired
- private ColumnValueMapper columnValueMapper;
- @Autowired
- private ColumnValueLogMapper columnValueLogMapper;
-
- @Autowired
- private CaseZipImportImpl caseZipImportImpl;
- // 手机号正则
- private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
- // 邮箱正则
- private static final Pattern EMAIL_PATTERN = Pattern.compile("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,7}$");
-
- // 基本字段校验
- private static final String[] baseColumns = {"caseName","caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
- "claimPrinciOwed","arbitratClaims"};
- // 申请人字段校验
- private static final String[] applicAffiliateColumns = {"name", "contactTelphone","contactAddress","workTelphone","workAddress",
- "residenAffili","compLegalPerson",
- "compLegalperPost","email","nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
- // 申请人/被申请人代理人字段校验
- private static final String[] applicAgentAffiliateColumns = {"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
- // 被申请人字段校验
- private static final String[] dectborAffiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
- "residenAffili","responSex","responBirth","email","nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent"};
-
- /**
- * 数据权限:1.每个人不同的角色,而每个角色可以操作不同的案件状态
- * 2.申请人:金融机构下,可以看到改机构的所有的案件
- * 3.被申请人:可以看到自己相关的案件(案件有被申请人相关的信息)
- * 4.仲裁员:案件选定了某个仲裁员后,该仲裁员就可以查看该案件
- * 5.仲裁委(部门长):可以查看所有的案件
- * 6.法律顾问秘书:可以属于多个机构,可以查看相关机构的所有案件
- * 7.超级管理员:可以查看所有的信息和数据
- *
- * @param caseApplication
- * @return
- */
- @Override
- public List selectCaseApplicationListByRole(CaseApplication caseApplication) {
- // 获取登录用户
- LoginUser loginUser = getLoginUser();
- SysUser user = loginUser.getUser();
- Long userId = user.getUserId();
- // 查询登录人身份证号
- SysUser sysUser = sysUserMapper.selectUserById(userId);
- startPage();
- caseApplication.setLoginUserName(sysUser.getUserName());
- List roles = sysUser.getRoles();
- // 没有角色不能查看案件列表
- if (CollectionUtil.isEmpty(roles)) {
- throw new ServiceException("该用户没有角色权限");
- }
-
- for (SysRole role : roles) {
- if (StrUtil.isEmpty(role.getRoleName())) {
- continue;
- }
- // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
- if ("超级管理员".equals(role.getRoleName())
- ) {
- List caseApplicationlist = caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
- if(caseApplicationlist!=null&&caseApplicationlist.size()>0){
- for(CaseApplication caseApplicationsel : caseApplicationlist){
- Integer caseStatus = caseApplicationsel.getCaseStatus();
- if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
- Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
- Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
- if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
- if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
- caseApplicationsel.setArbitraMethodIssame(1);
- if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
- caseApplicationsel.setArbitratMethod(2);
- }else {
- caseApplicationsel.setArbitratMethod(1);
- }
- }else {
- caseApplicationsel.setArbitraMethodIssame(2);
- String applicantarbitratMethod = "";
- String respondentbitratMethod = "";
- if(applicantIsWrittenHear.intValue()==1){
- applicantarbitratMethod = "书面审理";
- }else {
- applicantarbitratMethod = "开庭审理";
- }
- if(respondentIsWrittenHear.intValue()==1){
- respondentbitratMethod = "书面审理";
- }else {
- respondentbitratMethod = "开庭审理";
- }
- String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
- "被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
- caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
- }
- }
-
- }
- }
- }
- return caseApplicationlist;
- }
- if ("仲裁委".equals(role.getRoleName())
- || "部门长".equals(role.getRoleName())) {
- List caseStatusList = new ArrayList<>();
- caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
- caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
- // caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
- caseApplication.setDeptHeadStatus(caseStatusList);
- caseApplication.setIsOtherRole(1);
- }
- if ("仲裁员".equals(role.getRoleName())) {
- caseApplication.setUserId(String.valueOf(userId));
- caseApplication.setIsOtherRole(1);
- }
- if ("财务".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
- }
- if ("法律顾问".equals(role.getRoleName())) {
- // 秘书查看所有案件
- // 查询角色有关的用户部门
- List deptIds = new ArrayList<>();
- deptIds.add(sysUser.getDeptId());
- caseApplication.setDeptIds(deptIds);
- }
- if ("申请人".equals(role.getRoleName())) {
- // caseApplication.setIsOtherRole(1);
- // 查询有关的用户部门
- caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
- }
- if ("被申请人".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- //
- caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
- }
- if ("代理人".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- // 查询角色有关的用户部门
- // List agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
- List agentDeptIds = new ArrayList<>();
- agentDeptIds.add(sysUser.getDeptId());
- caseApplication.setAgentDeptIds(agentDeptIds);
- }
- }
-
-
- // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
-// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
- List caseApplications = caseApplicationMapper.selectCaseApplicationList1(caseApplication);
- if(caseApplications!=null&&caseApplications.size()>0){
- for(CaseApplication caseApplicationsel : caseApplications){
- Integer caseStatus = caseApplicationsel.getCaseStatus();
- if(caseStatus.intValue() == CaseApplicationConstants.CHECK_ARBITRATION_METHOD){
- Integer applicantIsWrittenHear = caseApplicationsel.getApplicantIsWrittenHear();
- Integer respondentIsWrittenHear = caseApplicationsel.getRespondentIsWrittenHear();
- if(applicantIsWrittenHear!=null&&respondentIsWrittenHear!=null){
- if(applicantIsWrittenHear.intValue()==respondentIsWrittenHear.intValue()){
- caseApplicationsel.setArbitraMethodIssame(1);
- if(applicantIsWrittenHear.intValue()==1&&respondentIsWrittenHear.intValue()==1){
- caseApplicationsel.setArbitratMethod(2);
- }else {
- caseApplicationsel.setArbitratMethod(1);
- }
- }else {
- caseApplicationsel.setArbitraMethodIssame(2);
- String applicantarbitratMethod = "";
- String respondentbitratMethod = "";
- if(applicantIsWrittenHear.intValue()==1){
- applicantarbitratMethod = "书面审理";
- }else {
- applicantarbitratMethod = "开庭审理";
- }
- if(respondentIsWrittenHear.intValue()==1){
- respondentbitratMethod = "书面审理";
- }else {
- respondentbitratMethod = "开庭审理";
- }
- String arbitratMethodIllustrate = "当前案件开庭方式:申请人选择开庭方式为"+applicantarbitratMethod+
- "被申请人选择开庭方式为"+respondentbitratMethod+",请确定开庭方式。";
- caseApplicationsel.setArbitratMethodIllustrate(arbitratMethodIllustrate);
- }
- }
-
- }
- }
- }
- return caseApplications;
-
- }
-
-
- @Override
- public ToDoCount selectToDoCount() {
-
- // 获取登录用户
- LoginUser loginUser = getLoginUser();
- SysUser user = loginUser.getUser();
- Long userId = user.getUserId();
-
- // 查询登录人信息
- SysUser sysUser = sysUserMapper.selectUserById(userId);
- List roles = sysUser.getRoles();
- // 没有角色不能查看案件列表
- if (CollectionUtil.isEmpty(roles)) {
- throw new ServiceException("该用户没有角色权限");
- }
- CaseApplication caseApplication = new CaseApplication();
- List caseStatusList = new ArrayList<>();
- for (SysRole role : roles) {
- if (StrUtil.isEmpty(role.getRoleName())) {
- continue;
- }
- // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
- if (role.getRoleName().equals("超级管理员")
- ) {
- return caseApplicationMapper.selectAdminCaseToDoCount();
- }
- if ("仲裁委".equals(role.getRoleName())
- || "部门长".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
- caseStatusList.add(CaseApplicationConstants.CHECK_ARBITRATION);
- // caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
- caseApplication.setDeptHeadStatus(caseStatusList);
- }
- if ("仲裁员".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- caseApplication.setUserId(String.valueOf(userId));
- }
- if ("财务".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- caseApplication.setFinanceStatus(CaseApplicationConstants.PENDING_PAYMENT_CONFIRM);
- }
- if ("法律顾问".equals(role.getRoleName())) {
- // 查询角色有关的用户部门
- // List deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
- List deptIds = new ArrayList<>();
- deptIds.add(sysUser.getDeptId());
- caseApplication.setDeptIds(deptIds);
- }
- if ("申请人".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- // 查询角色有关的用户部门
- caseApplication.setApplicationOrganId(String.valueOf(sysUser.getDeptId()));
- }
- if ("被申请人".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- //
- caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
- }
- if ("代理人".equals(role.getRoleName())) {
- caseApplication.setIsOtherRole(1);
- // 查询角色有关的用户部门
- // List agentDeptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
- List agentDeptIds = new ArrayList<>();
- agentDeptIds.add(sysUser.getDeptId());
- caseApplication.setAgentDeptIds(agentDeptIds);
- }
- }
-
-
- // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
- ToDoCount toDoCount = caseApplicationMapper.selectTodoCountByRole(caseApplication);
- if (toDoCount == null) {
- return new ToDoCount();
- }
- return toDoCount;
- }
-
- @Override
- public AjaxResult selectCaseProgress(CaseApplication caseApplication) {
- Map datas = new HashMap<>();
- Long id = caseApplication.getId();
- CaseLogRecord caseLogRecord = new CaseLogRecord();
- caseLogRecord.setCaseAppliId(id);
- List records = caseLogRecordMapper.selectCaseLogRecordList(caseLogRecord);
- CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
- Integer caseStatus = caseApplicationselect.getCaseStatus();
- if (caseStatus.intValue() != 0) {
- CaseLogRecord caseLogRecordin = getInCasenode(caseStatus);
- records.add(caseLogRecordin);
- }
-
- List recordsnofinish = getNofinishCasenode(caseStatus);
- records.addAll(recordsnofinish);
- datas.put("allCasenode", records);
- datas.put("caseStatus", caseStatus);
- return success(datas);
-
- }
-
- @Override
- @Transactional
- public int updateHeardate(CaseApplication caseApplication) {
-// caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
- caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_OPENCOURT_HEAR);
- int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- //1975139 修改开庭时间通知 尊敬的{1}用户,您的{2}仲裁案件,开庭日期已改为{3},请知晓,如非本人操作,请忽略本短信
- //发送短信通知
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- request.setTemplateId("1975139");
-
- // 发送开庭日期通知短信
- sendHearDateMessage(caseApplication, request, "1975139");
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_OPENCOURT_HEAR, "");
- return rows;
- }
-
- @Override
- public int updateCaseLockStatus(CaseApplication caseApplication) {
- return caseApplicationMapper.updateCaseLockStatus(caseApplication.getId(), caseApplication.getLockStatus());
- }
-
-
-
- @Override
- @Transactional
- public AjaxResult uploadZipFile(MultipartFile file, Long id, String username, Long userId) {
- if (file.isEmpty()) {
- return AjaxResult.error("请选择要上传的文件");
- }
-
- String targetPath = "/home/ruoyi/uploadPath/upload/unzipFile";
- File zipFile = null;
- InputStream ins = null;
- try {
- ins = file.getInputStream();
- zipFile = new File(file.getOriginalFilename());
- caseZipImportImpl.inputChangeToFile(ins, zipFile);
- } catch (IOException e) {
- e.printStackTrace();
- }
- //解压缩上传的压缩包
- UnZipFileUtils.unZipFile(zipFile, targetPath);
-
- //得到解压缩的所有文件
- String zipName = file.getOriginalFilename();
- String subzipName = zipName.substring(0, zipName.indexOf(".zip"));
- // todo
- String zipPath = "/home/ruoyi/uploadPath/upload/unzipFile/" + subzipName;
-// String zipPath = "D:/home/ruoyi/uploadPath/upload/unzipFile/" + subzipName;
-
- File dirUnzipPath = new File(zipPath);
- List allFiles = new ArrayList<>();
- List allFilestr = new ArrayList<>();
- UnZipFileUtils.getFiles(dirUnzipPath, allFiles);
- if (allFiles != null && allFiles.size() > 0) {
- for (File fileIter : allFiles) {
- System.out.println(fileIter.getAbsolutePath());
- allFilestr.add(fileIter.getAbsolutePath());
- }
- }
-
- //保存目录和文件
- if (allFilestr != null && allFilestr.size() > 0) {
- for (String filestr : allFilestr) {
- List allindex = new ArrayList<>();
-// int indexKey = filestr.indexOf("\\");
- int indexKey = filestr.indexOf("/");
-// System.out.println("filestr:------------"+filestr);
- allindex.add(indexKey);
- while (indexKey != -1) {
-// indexKey = filestr.indexOf("\\", indexKey + 1);
- indexKey = filestr.indexOf("/", indexKey + 1);
- allindex.add(indexKey);
- }
-
- if (allindex != null && allindex.size() > 0) {
- String substrOne = filestr.substring(allindex.get(6) + 1, allindex.get(7));
- Integer series = null;
- for (int i = 0; i < allindex.size() - 7; i++) {
- String substr = filestr.substring(allindex.get(i + 5) + 1, allindex.get(i + 6));
- series = i + 1;
- if (series == 1) {
- //查询这个级数的目录是否存在,若不存在,则新建这个目录
- CaseEvidenceDirectory caseEvidenceDirectoryselect = new CaseEvidenceDirectory();
- caseEvidenceDirectoryselect.setCaseId(id);
- caseEvidenceDirectoryselect.setEvidenceName(filestr.substring(allindex.get(i + 5) + 1, allindex.get(i + 6)));
- caseEvidenceDirectoryselect.setSeries(series);
- List caseEvidenceDirectorys = caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectoryselect);
- if (caseEvidenceDirectorys != null && caseEvidenceDirectorys.size() > 0) {
- continue;
- } else {
- CaseEvidenceDirectory caseEvidenceDirectory = new CaseEvidenceDirectory();
- caseEvidenceDirectory.setEvidenceName(substr);
- caseEvidenceDirectory.setSeries(series);
- caseEvidenceDirectory.setCaseId(id);
- caseEvidenceDirectory.setCreateBy(username);
- caseEvidenceDirectory.setCreateTime(new Date());
- caseEvidenceDirectoryMapper.save(caseEvidenceDirectory);
- }
- } else {
- //查询这个级数的目录是否存在,若不存在,则新建这个目录
- CaseEvidenceDirectory directoryselect = new CaseEvidenceDirectory();
- directoryselect.setCaseId(id);
- directoryselect.setEvidenceName(filestr.substring(allindex.get(i + 5) + 1, allindex.get(i + 6)));
- directoryselect.setSeries(series);
- List evidenceDirectorys = caseEvidenceDirectoryMapper.selectList(directoryselect);
- if (evidenceDirectorys != null && evidenceDirectorys.size() > 0) {
- continue;
- } else {
- Long parentId = null;
- CaseEvidenceDirectory caseEvidenceDirectoryselect = new CaseEvidenceDirectory();
- caseEvidenceDirectoryselect.setCaseId(id);
- caseEvidenceDirectoryselect.setEvidenceName(filestr.substring(allindex.get(i + 4) + 1, allindex.get(i + 5)));
- caseEvidenceDirectoryselect.setSeries(series - 1);
- List caseEvidenceDirectorys = caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectoryselect);
- if (caseEvidenceDirectorys != null && caseEvidenceDirectorys.size() > 0) {
- parentId = caseEvidenceDirectorys.get(0).getId();
- }
-
- CaseEvidenceDirectory caseEvidenceDirectory = new CaseEvidenceDirectory();
- caseEvidenceDirectory.setEvidenceName(substr);
- caseEvidenceDirectory.setSeries(series);
- caseEvidenceDirectory.setCreateBy(username);
- caseEvidenceDirectory.setCreateTime(new Date());
- caseEvidenceDirectory.setCaseId(id);
- caseEvidenceDirectory.setParentId(parentId);
- caseEvidenceDirectoryMapper.save(caseEvidenceDirectory);
- }
-
- }
- }
-
- //得到最后1级的目录,即文件
- int lastIndex = allindex.get(7);
- String substrfile = filestr.substring(lastIndex + 1);
- //保存到附件表
- LocalDate now = LocalDate.now();
- String year = Integer.toString(now.getYear());
- String month = String.format("%02d", now.getMonthValue());
- String day = String.format("%02d", now.getDayOfMonth());
- // todo
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
-// String saveFolderPath = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
- String fileName = UUID.randomUUID().toString().replace("-", "") + "_" + substrfile;
- String resultFilePath = saveFolderPath + "/" + fileName;
- try {
- File resultFilePathFile = new File(resultFilePath);
- File parentFilePathFile = resultFilePathFile.getParentFile();
- if (!parentFilePathFile.exists()) {
- parentFilePathFile.mkdirs();
- }
- if (!resultFilePathFile.exists()) {
- resultFilePathFile.createNewFile();
- }
-
- FileInputStream fis = new FileInputStream(new File(filestr));
- FileOutputStream fos = new FileOutputStream(resultFilePathFile);
- byte[] btyeBuf = new byte[1024];
- int len = 0;
- while ((len = fis.read(btyeBuf)) != -1) {
- fos.write(btyeBuf, 0, len);
- }
- fis.close();
- fos.close();
-
- } catch (IOException e) {
- AjaxResult.error("文件解压异常", e);
- }
-
- String substrTwo = filestr.substring(allindex.get(6) + 1, allindex.get(7));
- Integer annexType = null;
- if ("申请书".equals(substrTwo)) {
- annexType = 1;
- } else if ("证据材料".equals(substrTwo)) {
- annexType = 2;
- }
- String savePath = "/home/ruoyi/uploadPath/upload";
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
- //将附件保存到附件表里
- CaseAttach caseAttach = CaseAttach.builder()
- .caseAppliId(id)
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(annexType)
- .build();
- int i = caseAttachMapper.save(caseAttach);
- Integer annexId = caseAttach.getAnnexId();
-
- //保存到目录表
- Long parentId = null;
- CaseEvidenceDirectory caseEvidenceDirectoryselect = new CaseEvidenceDirectory();
- caseEvidenceDirectoryselect.setCaseId(id);
- caseEvidenceDirectoryselect.setEvidenceName(filestr.substring(allindex.get(6) + 1, allindex.get(7)));
- caseEvidenceDirectoryselect.setSeries(series);
- List caseEvidenceDirectorys = caseEvidenceDirectoryMapper.selectList(caseEvidenceDirectoryselect);
- if (caseEvidenceDirectorys != null && caseEvidenceDirectorys.size() > 0) {
- parentId = caseEvidenceDirectorys.get(0).getId();
- }
-
- CaseEvidenceDirectory caseEvidenceDirectory = new CaseEvidenceDirectory();
- caseEvidenceDirectory.setEvidenceName(substrfile);
- caseEvidenceDirectory.setSeries(series + 1);
- caseEvidenceDirectory.setCreateBy(username);
- caseEvidenceDirectory.setCreateTime(new Date());
- caseEvidenceDirectory.setAnnexId(annexId);
- caseEvidenceDirectory.setCaseId(id);
- caseEvidenceDirectory.setParentId(parentId);
-
- caseEvidenceDirectoryMapper.save(caseEvidenceDirectory);
- }
- }
- }
- return success();
-
- }
-
- @Override
- public List getSmsSendRecord(SmsSendRecord smsSendRecord) {
- return smsRecordMapper.getSmsSendRecord(smsSendRecord);
- }
-
- private List getNofinishCasenode(Integer caseStatus) {
- CaseLogRecord caseLogRecord1 = new CaseLogRecord();
- caseLogRecord1.setCaseNodeName("立案审查");
- caseLogRecord1.setCaseNode(1);
- caseLogRecord1.setContent("法律顾问将进行立案审查");
- CaseLogRecord caseLogRecord2 = new CaseLogRecord();
- caseLogRecord2.setCaseNode(2);
- caseLogRecord2.setCaseNodeName("缴费");
- caseLogRecord2.setContent("申请人将进行缴费");
- CaseLogRecord caseLogRecord3 = new CaseLogRecord();
- caseLogRecord3.setCaseNode(3);
- caseLogRecord3.setCaseNodeName("缴费确认");
- caseLogRecord3.setContent("财务将进行缴费确认");
- CaseLogRecord caseLogRecord4 = new CaseLogRecord();
- caseLogRecord4.setCaseNode(4);
- caseLogRecord4.setCaseNodeName("案件质证");
- caseLogRecord4.setContent("被申请人将进行案件质证");
- CaseLogRecord caseLogRecord5 = new CaseLogRecord();
- caseLogRecord5.setCaseNode(5);
- caseLogRecord5.setCaseNodeName("组庭审核");
- caseLogRecord5.setContent("法律顾问将进行组庭审核");
-
- CaseLogRecord caseLogRecord6 = new CaseLogRecord();
- caseLogRecord6.setCaseNode(6);
- caseLogRecord6.setCaseNodeName("修改开庭时间");
- caseLogRecord6.setContent("部门长将修改开庭时间");
-
- CaseLogRecord caseLogRecord7 = new CaseLogRecord();
- caseLogRecord6.setCaseNode(7);
- caseLogRecord6.setCaseNodeName("组庭确定");
- caseLogRecord6.setContent("部门长将进行组庭确定");
-
- CaseLogRecord caseLogRecord8 = new CaseLogRecord();
- caseLogRecord7.setCaseNode(8);
- caseLogRecord7.setCaseNodeName("审核仲裁方式");
- caseLogRecord7.setContent("仲裁员将进行审核仲裁方式");
- CaseLogRecord caseLogRecord9 = new CaseLogRecord();
- caseLogRecord8.setCaseNode(9);
- caseLogRecord8.setCaseNodeName("开庭审理");
- caseLogRecord8.setContent("仲裁员将进行开庭审理");
- CaseLogRecord caseLogRecord11 = new CaseLogRecord();
- caseLogRecord9.setCaseNode(11);
- caseLogRecord9.setCaseNodeName("书面审理");
- caseLogRecord9.setContent("仲裁员将进行书面审理");
- CaseLogRecord caseLogRecord12 = new CaseLogRecord();
- caseLogRecord11.setCaseNode(12);
- caseLogRecord11.setCaseNodeName("核验仲裁文书");
- caseLogRecord11.setContent("法律顾问将进行核验仲裁文书");
- CaseLogRecord caseLogRecord13 = new CaseLogRecord();
- caseLogRecord12.setCaseNode(13);
- caseLogRecord12.setCaseNodeName("确认仲裁文书");
- caseLogRecord12.setContent("仲裁员将进行确认仲裁文书");
- CaseLogRecord caseLogRecord14 = new CaseLogRecord();
- caseLogRecord13.setCaseNode(14);
- caseLogRecord13.setCaseNodeName("仲裁文书签名");
- caseLogRecord13.setContent("仲裁员将进行仲裁文书签名");
- CaseLogRecord caseLogRecord15 = new CaseLogRecord();
- caseLogRecord14.setCaseNode(15);
- caseLogRecord14.setCaseNodeName("仲裁文书用印");
- caseLogRecord14.setContent("部门长将进行仲裁文书用印");
- CaseLogRecord caseLogRecord16 = new CaseLogRecord();
- caseLogRecord15.setCaseNode(16);
- caseLogRecord15.setCaseNodeName("仲裁文书送达");
- caseLogRecord15.setContent("法律顾问将进行仲裁文书送达");
- CaseLogRecord caseLogRecord17 = new CaseLogRecord();
- caseLogRecord16.setCaseNode(17);
- caseLogRecord16.setCaseNodeName("案件归档");
- caseLogRecord16.setContent("法律顾问将进行案件归档");
-
-
- List caseLogRecords = new ArrayList<>();
- switch (caseStatus.toString()) {
- case "0":
- caseLogRecords.add(caseLogRecord1);
- caseLogRecords.add(caseLogRecord2);
- caseLogRecords.add(caseLogRecord3);
- caseLogRecords.add(caseLogRecord4);
- caseLogRecords.add(caseLogRecord5);
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
- break;
- case "1":
- caseLogRecords.add(caseLogRecord2);
- caseLogRecords.add(caseLogRecord3);
- caseLogRecords.add(caseLogRecord4);
- caseLogRecords.add(caseLogRecord5);
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
- break;
- case "2":
- caseLogRecords.add(caseLogRecord3);
- caseLogRecords.add(caseLogRecord4);
- caseLogRecords.add(caseLogRecord5);
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
- break;
- case "3":
- caseLogRecords.add(caseLogRecord4);
- caseLogRecords.add(caseLogRecord5);
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "4":
- caseLogRecords.add(caseLogRecord5);
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "5":
- caseLogRecords.add(caseLogRecord6);
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "6":
- caseLogRecords.add(caseLogRecord7);
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "7":
- caseLogRecords.add(caseLogRecord8);
- caseLogRecords.add(caseLogRecord9);
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "8":
- case "9":
- caseLogRecords.add(caseLogRecord11);
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
- break;
-
- case "11":
- caseLogRecords.add(caseLogRecord12);
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "12":
- caseLogRecords.add(caseLogRecord13);
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "13":
- caseLogRecords.add(caseLogRecord14);
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "14":
- caseLogRecords.add(caseLogRecord15);
- caseLogRecords.add(caseLogRecord16);
-
- break;
- case "15":
- caseLogRecords.add(caseLogRecord16);
-
- break;
- default:
- List caseLogRecords1 = new ArrayList<>();
- }
-
- return caseLogRecords;
-
-
- }
-
- private CaseLogRecord getInCasenode(Integer caseStatus) {
- CaseLogRecord caseLogRecord = new CaseLogRecord();
- switch (caseStatus.toString()) {
- case "1":
- caseLogRecord.setCaseNodeName("立案审查");
- caseLogRecord.setCaseNode(1);
- caseLogRecord.setContent("法律顾问正在进行立案审查");
- caseLogRecord.setNextRoleName("下一节点角色:申请人");
- break;
- case "2":
- caseLogRecord.setCaseNodeName("缴费");
- caseLogRecord.setCaseNode(2);
- caseLogRecord.setContent("申请人正在进行缴费");
- caseLogRecord.setNextRoleName("下一节点角色:仲裁财务");
- break;
- case "3":
- caseLogRecord.setCaseNodeName("缴费确认");
- caseLogRecord.setCaseNode(3);
- caseLogRecord.setContent("财务正在进行缴费确认");
- caseLogRecord.setNextRoleName("下一节点角色:被申请人");
- break;
- case "4":
- caseLogRecord.setCaseNodeName("案件质证");
- caseLogRecord.setCaseNode(4);
- caseLogRecord.setContent("被申请人将进行案件质证");
- caseLogRecord.setNextRoleName("下一节点角色:法律顾问");
- break;
- case "5":
- caseLogRecord.setCaseNodeName("组庭审核");
- caseLogRecord.setCaseNode(5);
- caseLogRecord.setContent("法律顾问正在进行组庭审核");
- caseLogRecord.setNextRoleName("下一节点角色:部门长");
- break;
- case "6":
- caseLogRecord.setCaseNodeName("组庭确定");
- caseLogRecord.setCaseNode(6);
- caseLogRecord.setContent("部门长正在进行组庭确定");
- caseLogRecord.setNextRoleName("下一节点角色:法律顾问");
- break;
- case "7":
- caseLogRecord.setCaseNodeName("审核仲裁方式");
- caseLogRecord.setCaseNode(7);
- caseLogRecord.setContent("仲裁员正在进行审核仲裁方式");
- caseLogRecord.setNextRoleName("下一节点角色:秘书顾问");
- break;
- case "8":
- caseLogRecord.setCaseNodeName("开庭审理");
- caseLogRecord.setCaseNode(8);
- caseLogRecord.setContent("仲裁员正在进行开庭审理");
- caseLogRecord.setNextRoleName("下一节点角色:仲裁员");
- break;
- case "9":
- caseLogRecord.setCaseNodeName("书面审理");
- caseLogRecord.setCaseNode(9);
- caseLogRecord.setContent("仲裁员正在进行书面审理");
- caseLogRecord.setNextRoleName("下一节点角色:仲裁员");
- break;
- case "11":
- caseLogRecord.setCaseNodeName("核验仲裁文书");
- caseLogRecord.setCaseNode(11);
- caseLogRecord.setContent("法律顾问正在进行核验仲裁文书");
- caseLogRecord.setNextRoleName("下一节点角色:部门长");
- break;
- case "12":
- caseLogRecord.setCaseNodeName("确认仲裁文书");
- caseLogRecord.setCaseNode(12);
- caseLogRecord.setContent("仲裁员正在进行确认仲裁文书");
- caseLogRecord.setNextRoleName("下一节点角色:仲裁员");
- break;
- case "13":
- caseLogRecord.setCaseNodeName("仲裁文书签名");
- caseLogRecord.setCaseNode(13);
- caseLogRecord.setContent("仲裁员正在进行仲裁文书签名");
- caseLogRecord.setNextRoleName("下一节点角色:法律顾问");
- break;
- case "14":
- caseLogRecord.setCaseNodeName("仲裁文书用印");
- caseLogRecord.setCaseNode(14);
- caseLogRecord.setContent("部门长正在进行仲裁文书用印");
- caseLogRecord.setNextRoleName("下一节点角色:法律顾问");
- break;
- case "15":
- caseLogRecord.setCaseNodeName("仲裁文书送达");
- caseLogRecord.setCaseNode(15);
- caseLogRecord.setContent("法律顾问正在进行仲裁文书送达");
- caseLogRecord.setNextRoleName("下一节点角色:法律顾问");
- break;
- case "16":
- caseLogRecord.setCaseNodeName("案件归档");
- caseLogRecord.setCaseNode(16);
- caseLogRecord.setContent("法律顾问正在进行案件归档");
- break;
- default:
- caseLogRecord.setCaseNodeName("无案件状态");
- caseLogRecord.setContent("无操作内容");
-
- }
- return caseLogRecord;
- }
-
- @Override
- public List selectCaseApplicationList(CaseApplication caseApplication) {
- return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
-
- }
-
- /**
- * 新增案件
- *
- * @param caseApplication
- * @return
- */
- @Override
- @Transactional
- public int insertcaseApplication(CaseApplication caseApplication) {
- List columnValueList=caseApplication.getColumnValues();
- caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
- //根据仲裁费用计费规则计算应缴费用
- //暂时设置计费比率为0.01
- BigDecimal feeRate = new BigDecimal(0.01);
- BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
- caseApplication.setFeePayable(feePayable);
- // 获取自动编码
- String caseNum = generateCaseNum();
- caseApplication.setCaseNum(caseNum);
- // 设置批号
-
- caseApplication.setBatchNumber(0);
-
- caseApplication.setCreateBy(getUsername());
- caseApplication.setVersion(1);
- caseApplication.setId(IdWorkerUtil.getId());
- // 新增立案信息
- int rows = caseApplicationMapper.insertCaseApplication(caseApplication);
- if (rows == 0) {
- return rows;
- }
- List caseAffiliates = caseApplication.getCaseAffiliates();
- Map deptMap = new HashMap<>();
- // 判断申请机构
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- // 查询所有的组织机构,组装成map
- List deptList = sysDeptMapper.selectDeptList(new SysDept());
- if (CollectionUtil.isEmpty(deptList)) {
- deptList = new ArrayList<>();
- }
- deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
- // 查询申请人角色id
- Long roleId = roleMapper.selectRoleIdByName("申请人");
- for (CaseAffiliate caseAffiliate : caseAffiliates) {
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- // caseAffiliate.setCaseAppliLogId(caseApplication.getId());
- if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getName())) {
- // 将组织机构id设为申请人名称
- if (deptMap.containsKey(caseAffiliate.getName())) {
- caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
- caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
- } else {
- // 如果不存在则新增
- SysDept dept = new SysDept();
- dept.setParentId(0L);
- dept.setDeptName(caseAffiliate.getName());
- dept.setAncestors("0");
- dept.setOrderNum(1);
- dept.setStatus("0");
- dept.setDelFlag("0");
- dept.setCreateBy(getUsername());
- dept.setUpdateBy(getUsername());
- sysDeptMapper.insertDept(dept);
- deptMap.put(dept.getDeptName(), dept.getDeptId());
- caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
- caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
-
- }
- // 组装申请代理人信息
- String agentInfoFlag = buildAgentInfo(caseAffiliate, roleId);
- if (StrUtil.isNotEmpty(agentInfoFlag)) {
- throw new ServiceException(agentInfoFlag);
- }
- }
- }
- // 新增案件关联人
- caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
- }
-
- List caseAttachList = caseApplication.getCaseAttachList();
- // 是否是压缩包导入,压缩包导入则不更新附件
- boolean isZipImport = caseApplication.getImportFlag() == null || caseApplication.getImportFlag() != 2;
- if (caseAttachList != null && caseAttachList.size() > 0 ) {
- if(isZipImport) {
- for (CaseAttach caseAttach : caseAttachList) {
- caseAttach.setCaseAppliId(caseApplication.getId());
- // 修改案件附件
- caseAttachMapper.updateCaseAttach(caseAttach);
- }
- }else {
- // 压缩包导入
- for (CaseAttach caseAttach : caseAttachList) {
- caseAttach.setCaseAppliId(caseApplication.getId());
- }
- caseAttachMapper.batchSave(caseAttachList);
- }
- }
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
- // 异步新增案件日志
-
- ThreadPoolUtil.execute(() -> {
- // 批量新增columnValue自定义字段
- if(CollectionUtil.isNotEmpty(columnValueList)) {
- columnValueList.forEach(columnValue -> columnValue.setCaseId(caseApplication.getId()));
- columnValueMapper.batchSave(columnValueList);
- }
- // 新增案件日志表
- caseApplication.setCaseAppliId(caseApplication.getId());
- caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
- caseApplication.setCaseLogId(IdWorkerUtil.getId());
- int insertRow = caseApplicationLogMapper.insert(caseApplication);
- // 插入案件相关人员表日志
- if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
- caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId()));
-
- caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
- }
- // 插入附件表日志
- if (CollectionUtil.isNotEmpty(caseAttachList)) {
- List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
- // 插入日志附件表
- if (CollectionUtil.isNotEmpty(filterList)) {
- for (CaseAttach caseAttach : filterList) {
- // 查询附件表
- CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
- attach.setCaseAppliLogId(caseApplication.getCaseLogId());
- caseAttachLogMapper.save(attach);
- }
- }
-
- }
- // 插入columnValueLog自定义字段日志表
- if (CollectionUtil.isNotEmpty(columnValueList)) {
- columnValueList.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId()));
- columnValueLogMapper.batchSave(columnValueList);
-
- }
-
-
- });
-
- return rows;
- }
-
- /**
- * 获取自动编码
- *
- * @return
- */
-
- public String generateCaseNum() {
- // 自动编码格式 zc+yyyyMMdd+001
- String currentDay = DateUtils.dateTime();
- String caseNum = "zc" + currentDay;
- //查询出当天的案件编号的最大值
- Integer maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum, caseNum.length());
- if (null == maxCaseNum) {
- caseNum = caseNum + "001";
- } else {
- maxCaseNum=maxCaseNum+1;
- caseNum = caseNum + String.format("%03d", maxCaseNum);
- }
- return caseNum;
-
- }
-
- @Override
- public int selectCaseApplicationCount(CaseApplication caseApplication) {
- return caseApplicationMapper.selectCaseApplicationCount(caseApplication);
- }
-
- @Override
- @Transactional
- public AjaxResult editCaseApplication(CaseApplication caseApplication) {
- //根据仲裁费用计费规则计算应缴费用
- //暂时设置计费比率为0.01
- BigDecimal feeRate = new BigDecimal("0.01");
- BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
- caseApplication.setFeePayable(feePayable);
- caseApplication.setUpdateBy(getUsername());
- // 立案申请状态直接修改主表信息
- if (caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
- // 修改内置字段
- caseApplicationMapper.updataCaseApplication(caseApplication);
- if(CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
- // 修改自定义字段
- for (ColumnValue columnValue : caseApplication.getColumnValues()) {
- if(StrUtil.isNotEmpty(columnValue.getValue())) {
- columnValueMapper.updateColumnValue(columnValue);
- }
- }
- }
- // 修改记录表状态为同意提交修改的内容
- caseApplication.setUpdateSubmitStatus(0);
- } else {
- // 修改记录表状态为已提交修改的内容
- caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.COMMITTED.getCode());
- }
- List caseAffiliates = caseApplication.getCaseAffiliates();
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- // 查询所有的组织机构,组装成map
- List deptList = sysDeptMapper.selectDeptList(new SysDept());
- if (CollectionUtil.isEmpty(deptList)) {
- deptList = new ArrayList<>();
- }
- Map deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
- // 查询申请人角色id
- Long roleId = roleMapper.selectRoleIdByName("申请人");
- for (CaseAffiliate caseAffiliate : caseAffiliates) {
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getName())) {
- // 将组织机构id设为申请人名称
- if (deptMap.containsKey(caseAffiliate.getName())) {
- caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
- caseAffiliate.setApplicationOrganId(String.valueOf(deptMap.get(caseAffiliate.getName())));
- } else {
- // 如果不存在则新增
- SysDept dept = new SysDept();
- dept.setParentId(0L);
- dept.setDeptName(caseAffiliate.getName());
- dept.setAncestors("0");
- dept.setOrderNum(1);
- dept.setStatus("0");
- dept.setDelFlag("0");
- dept.setCreateBy(getUsername());
- dept.setUpdateBy(getUsername());
- sysDeptMapper.insertDept(dept);
- deptMap.put(dept.getDeptName(), dept.getDeptId());
-
- caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
- caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
-
- }
- String agentInfoFlag = buildAgentInfo(caseAffiliate, roleId);
- if (StrUtil.isNotEmpty(agentInfoFlag)) {
- throw new ServiceException(agentInfoFlag);
- }
-
- }
- // 立案申请状态直接修改主表信息
- if (caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
-
- caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
- }
- }
-
- }
- List caseAttachList = caseApplication.getCaseAttachList();
- // 立案申请状态直接修改主表信息
- if (caseAttachList != null && caseAttachList.size() > 0
- && caseApplication.getCaseStatus() != null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
- List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
- if (CollectionUtil.isNotEmpty(filterList)) {
- for (CaseAttach caseAttach : caseAttachList) {
- caseAttach.setCaseAppliId(caseApplication.getId());
- caseAttachMapper.updateCaseAttach(caseAttach);
- }
- }
-
- }
- // 根据案件id查询最新版本号
- Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
- if (maxVersion == null) {
- maxVersion = 1;
- }
- caseApplication.setVersion(maxVersion + 1);
- // 异步新增案件日志
- ThreadPoolUtil.execute(() -> {
- try {
- caseApplication.setCaseAppliId(caseApplication.getId());
- caseApplication.setCaseLogId(IdWorkerUtil.getId());
- int insertRow = caseApplicationLogMapper.insert(caseApplication);
- if (insertRow != 0) {
- if (CollectionUtil.isNotEmpty(caseAffiliates)) {
- caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getCaseLogId()));
- // 插入案件日志人员相关表
- caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
- }
- if (CollectionUtil.isNotEmpty(caseAttachList)) {
- List filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
- // 插入日志附件表
- if (CollectionUtil.isNotEmpty(filterList)) {
- for (CaseAttach caseAttach : filterList) {
- // 查询附件表
- CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
- attach.setCaseAppliLogId(caseApplication.getCaseLogId());
- caseAttachLogMapper.save(attach);
- }
- }
-
- }
- // 插入案件columnValueLog自定义字段表
- if (CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
- caseApplication.getColumnValues().forEach(columnValue -> columnValue.setCaseAppliLogId(caseApplication.getCaseLogId()));
-
- columnValueLogMapper.batchSave(caseApplication.getColumnValues());
- }
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- });
-
- return success();
- }
-
-
- /**
- * 组装申请代理人信息
- *
- * @param caseAffiliate
- */
- private String buildAgentInfo(CaseAffiliate caseAffiliate, Long roleId) {
- if (caseAffiliate.getIdentityType() == 1 && StrUtil.isNotEmpty(caseAffiliate.getNameAgent())) {
-
- // 组装申请机构代理人信息,用户表新增并且和部门关联
- // 根据代理人手机号去用户表查询,有修改,么有新增
- SysUser agentUser = sysUserMapper.selectUserByPhone(caseAffiliate.getContactTelphoneAgent());
- if (agentUser == null) {
- agentUser = new SysUser();
- agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
- agentUser.setNickName(caseAffiliate.getNameAgent());
- agentUser.setUserName(caseAffiliate.getContactTelphoneAgent());
- agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
- agentUser.setPassword(SecurityUtils.encryptPassword("abc123456"));
- agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
- int insertUserRow = sysUserMapper.insertUser(agentUser);
- // 新增角色为申请人
- ArrayList sysUserRoles = new ArrayList<>();
- SysUserRole sysUserRole = new SysUserRole();
- sysUserRole.setUserId(agentUser.getUserId());
- sysUserRole.setRoleId(roleId);
- sysUserRoles.add(sysUserRole);
- if (CollectionUtil.isNotEmpty(sysUserRoles)) {
- userRoleMapper.batchUserRole(sysUserRoles);
- }
- if (insertUserRow > 0) {
- caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
- // 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- request.setCaseId(caseAffiliate.getCaseAppliId());
- request.setTemplateId("1956159");
- request.setPhone(agentUser.getPhonenumber());
- request.setTemplateParamSet(new String[]{agentUser.getNickName()});
- Boolean aBoolean = SmsUtils.sendSms(request);
-
- //保存短信发送记录
- SmsSendRecord smsSendRecord = new SmsSendRecord();
- smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(caseAffiliate.getCaseAppliId());
- caseApplication = caseApplicationMapper.selectCaseApplication(caseApplication);
- smsSendRecord.setCaseNum(caseApplication.getCaseNum());
- smsSendRecord.setPhone(request.getPhone());
- smsSendRecord.setSendTime(new Date());
- String content = "尊敬的" + agentUser.getNickName() + ",您的代理的案件已接入仲裁系统,复制访问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);
- }
- } else if (null != agentUser.getDeptId() && !String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
-// return "该申请代理人已在"+agentUser.getDeptName()+"申请机构下存在,请检查填写信息是否正确";
- if (null != agentUser.getDept() && StrUtil.isNotEmpty(agentUser.getDept().getDeptName())) {
- return "该申请代理人已在【" + agentUser.getDept().getDeptName() + "】申请机构下存在,请检查填写信息是否正确";
- } else {
- return "该申请代理人已存在,与申请机构不匹配,请检查填写信息是否正确";
- }
- } else if (null != agentUser.getDeptId() && String.valueOf(agentUser.getDeptId()).equals(caseAffiliate.getApplicationOrganId())) {
- // 同步用户表和案件关联人表的手机号和名称
- caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
- caseAffiliate.setNameAgent(agentUser.getNickName());
- caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
- if(StrUtil.isNotEmpty(agentUser.getIdCard())){
- caseAffiliate.setIdentityNumAgent(agentUser.getIdCard());
- }else {
- caseAffiliate.setIdentityNumAgent(caseAffiliate.getIdentityNumAgent());
- }
- List longList = new ArrayList<>();
- // 新增角色为申请人
- if (CollectionUtil.isNotEmpty(agentUser.getRoles())) {
- longList = agentUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList());
- if (!longList.contains(roleId)) {
- insertAgentUserRole(agentUser, roleId);
- }
- } else {
-
- insertAgentUserRole(agentUser, roleId);
- }
-
- }
-
- }
- return null;
- }
-
- /**
- * 新增角色为申请人
- *
- * @param agentUser
- * @param roleId
- */
- private void insertAgentUserRole(SysUser agentUser, Long roleId) {
- ArrayList sysUserRoles = new ArrayList<>();
- SysUserRole sysUserRole = new SysUserRole();
- sysUserRole.setUserId(agentUser.getUserId());
- sysUserRole.setRoleId(roleId);
- sysUserRoles.add(sysUserRole);
- if (CollectionUtil.isNotEmpty(sysUserRoles)) {
- userRoleMapper.batchUserRole(sysUserRoles);
- }
- }
-
- @Override
- @Transactional
- public int submitCaseApplication(List ids) {
- int rows = 0;
- // 查询案件信息,做必填校验,校验不通过,提示,不能提交
- StringBuilder errorMsg = new StringBuilder();
- List caseApplications = caseApplicationMapper.listCaseApplicationByIds(ids);
- if(CollectionUtil.isNotEmpty(caseApplications)) {
-
- Map applicationMap = caseApplications.stream().collect(Collectors.toMap(CaseApplication::getId, Function.identity(), (n1, n2) -> n2));
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliateByCaseIds(ids);
- // 转换为Map>形式
- Map> caseAffiliateMap = caseAffiliates.stream().collect(Collectors.groupingBy(CaseAffiliate::getCaseAppliId));
- for (Long id : ids) {
- // 必填校验
- CaseApplication caseApplication = applicationMap.get(id);
- // 基本字段校验
- if(caseApplication!=null) {
- for (String baseColumn : baseColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, baseColumn))){
- errorMsg.append(baseColumn).append("不能为空,");
- // todo 暂抛出异常,后边改为提示具体的字段
- throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- // 校验人员
- if(CollectionUtil.isNotEmpty(caseAffiliates)){
- List affiliateList = caseAffiliateMap.get(id);
- if(CollectionUtil.isNotEmpty(affiliateList)){
- for (CaseAffiliate caseAffiliate : affiliateList) {
- if(caseAffiliate.getIdentityType()==1){
- // 校验申请人
- for (String applicAffiliateColumn : applicAffiliateColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
- errorMsg.append(applicAffiliateColumn).append("不能为空,");
- // todo 暂抛出异常,后边改为提示具体的字段
- throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- }else {
- // 校验被申请人
- // 校验申请人
- for (String applicAffiliateColumn : dectborAffiliateColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
- errorMsg.append(applicAffiliateColumn).append("不能为空,");
- // todo 暂抛出异常,后边改为提示具体的字段
- throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- }
- }
- }
- }
- }
-
- CaseApplication application = new CaseApplication();
- application.setId(id);
- //提交立案申请
- application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
- rows += caseApplicationMapper.submitCaseApplication(application);
- // 新增日志
- insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
- }
- }
- return rows;
- }
-
- @Override
- @Transactional
- public int deletecaseApplicationByIds(List ids) {
- // 查出所有的日志id
- List logIds= caseApplicationLogMapper.selectLogsByCaseIds(ids);
- int rows = caseApplicationMapper.batchDeletecaseApplication(ids);
- // 删除日志
- if(CollectionUtil.isNotEmpty(logIds)) {
- caseApplicationLogMapper.batchDeleteLog(logIds);
- }
- return rows;
- }
-
- @Override
- public CaseApplication selectCaseApplication(CaseApplication caseApplication) {
- CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
- if(caseApplicationselect==null){
- throw new ServiceException("案件不存在");
- }
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(caseApplication.getId());
-
- ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
- arbitrateRecord.setCaseAppliId(caseApplication.getId());
- ArbitrateRecord arbitrateRecordselect = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
- ColumnValue columnValue = new ColumnValue();
- columnValue.setIsDefault(1);
- columnValue.setCaseId(caseApplication.getId());
- List columnValueList = columnValueMapper.queryColumnValueList(columnValue);
- caseApplicationselect.setColumnValues(columnValueList);
- List caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- if(startIndex!=-1) {
- startIndex += prefix.length();
-
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- caseAttach.setAnnexPath(annexPath);
- }
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- caseAttach.setAnnexName(annexNamenew);
- }
-
-
- }
- }
- caseApplicationselect.setCaseAttachList(caseAttachList);
-
- List caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliatListeselect != null) {
- // 查询组织机构
- List sysDepts = sysDeptMapper.selectDeptList(new SysDept());
- Map deptMap = new HashMap<>();
- if (CollectionUtil.isNotEmpty(sysDepts)) {
- for (SysDept sysDept : sysDepts) {
- deptMap.put(String.valueOf(sysDept.getDeptId()), sysDept.getDeptName());
- }
- }
- StringBuffer applicantName = new StringBuffer();
- StringBuffer respondentName = new StringBuffer();
- for (int i = 0; i < caseAffiliatListeselect.size(); i++) {
- CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
- int identityType = caseAffiliateselect.getIdentityType();
- if (identityType == 1) {
- if (StrUtil.isNotEmpty(caseAffiliateselect.getName()) && deptMap.containsKey(caseAffiliateselect.getName())) {
- caseAffiliateselect.setName(deptMap.get(caseAffiliateselect.getName()));
- }
- applicantName.append(caseAffiliateselect.getName()).append(",");
- ;
- } else if (identityType == 2) {
- respondentName.append(caseAffiliateselect.getName()).append(",");
- }
- }
- caseApplicationselect.setApplicantName(applicantName.toString());
- caseApplicationselect.setRespondentName(respondentName.toString());
- caseApplicationselect.setCaseAffiliates(caseAffiliatListeselect);
- caseApplicationselect.setArbitrateRecord(arbitrateRecordselect);
-
- }
- return caseApplicationselect;
- }
-
- @Override
- @Transactional
- public String importCaseApplication(List caseApplicationList, String operName) {
- StringBuilder failureMsg = new StringBuilder();
- StringBuilder successMsg = new StringBuilder();
- int successNum = 0;
- List caseAffiliateLogList = new ArrayList<>();
- if (caseApplicationList != null && caseApplicationList.size() > 0) {
- // 1,查询所有的组织机构,组装成map
- List deptList = sysDeptMapper.selectDeptList(new SysDept());
- Map deptMap = new HashMap<>();
- if (CollectionUtil.isNotEmpty(deptList)) {
- deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
- }
- // 查询申请人角色id
- Long roleId = roleMapper.selectRoleIdByName("申请人");
- List caseApplicationListinsert = new ArrayList<>();
- for (int i = 0; i < caseApplicationList.size(); i++) {
- CaseApplication caseApplication = caseApplicationList.get(i);
- CaseImportValid caseImportValid = new CaseImportValid(caseApplication, deptMap);
- // 导入校验
- caseImportValid.importValid(caseApplication, deptMap);
- // 校验成功的数据
- if (StrUtil.isEmpty(caseApplication.getErrorMsg())) {
- //根据仲裁费用计费规则计算应缴费用
- //暂时设置计费比率为0.01
- BigDecimal feeRate = new BigDecimal("0.01");
- BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, RoundingMode.HALF_UP);
- caseApplication.setFeePayable(feePayable);
-
- //赋值CaseApplication的案件关联人信息
- List caseAffiliatesnew = new ArrayList<>();
- // 组装案件关联人信息
- assignmentCaseAffiliates(caseApplication, caseAffiliatesnew, deptMap, roleId);
- caseApplication.setImportFlag(1);
- caseApplicationListinsert.add(caseApplication);
- } else {
- // 拼接错误信息
- failureMsg.append("
").append("第").append(i + 2).append("行:").append(caseApplication.getErrorMsg().toString());
- }
- }
- if (caseApplicationListinsert.size() > 0) {
- //对不重复的立案对象集合的立案对象重新组装对应的案件关联人信息
- List caseApplicationNewList = null;
- for (int i = 0; i < caseApplicationListinsert.size(); i++) {
- caseApplicationNewList = new ArrayList<>();
- CaseApplication caseApplicationinsertDiffer = caseApplicationListinsert.get(i);
- // 设置自动编码
- caseApplicationinsertDiffer.setCaseNum(generateCaseNum());
- List caseAffiliatesnew = new ArrayList<>();
- CaseApplication caseApplicationNew = new CaseApplication();
- copyCaseApplication(caseApplicationinsertDiffer, caseApplicationNew);
- if (caseApplicationListinsert.size() > 0) {
- for (int j = 0; j < caseApplicationListinsert.size(); j++) {
- CaseApplication caseApplicationinsert = caseApplicationListinsert.get(j);
-
- if (StringUtils.isNotEmpty(caseApplicationinsert.getCaseNum()) &&
- caseApplicationinsert.getCaseNum().equals(caseApplicationinsertDiffer.getCaseNum())) {
-
- caseAffiliatesnew.addAll(caseApplicationinsert.getCaseAffiliates());
- }
- }
- caseApplicationNew.setCaseAffiliates(caseAffiliatesnew);
- caseApplicationNewList.add(caseApplicationNew);
- }
-
- for (int k = 0; k < caseApplicationNewList.size(); k++) {
- CaseApplication caseApplicationItera = caseApplicationNewList.get(k);
- // 新增立案信息
- caseApplicationItera.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
- caseApplicationItera.setCreateBy(getUsername());
- caseApplicationItera.setImportFlag(1);
- caseApplicationItera.setId(IdWorkerUtil.getId());
- int rows = caseApplicationMapper.insertCaseApplication(caseApplicationItera);
- if (rows == 0) {
- continue;
- }
- // 新增日志
- insertCaseLog(caseApplicationItera.getId(), CaseApplicationConstants.CASE_APPLICATION, "");
-
- List caseAffiliates = caseApplicationItera.getCaseAffiliates();
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate caseAffiliate : caseAffiliates) {
- caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
-
- }
- caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
- }
- // 新增案件记录
- caseApplicationItera.setCaseAppliId(caseApplicationItera.getId());
- caseApplicationItera.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
- caseApplicationItera.setVersion(1);
- caseApplicationItera.setCaseLogId(IdWorkerUtil.getId());
- int insertRow = caseApplicationLogMapper.insert(caseApplicationItera);
- if (insertRow > 0) {
- caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplicationItera.getId()));
- caseAffiliateLogList.addAll(caseAffiliates);
- }
- successNum++;
- successMsg.append("
").append(successNum).append("、立案编号 ").append(caseApplicationItera.getCaseNum()).append(" 导入成功");
- }
-
-
- }
-
- }
- // 异步新增案件日志
- ThreadPoolUtil.execute(() -> {
- if (CollectionUtil.isNotEmpty(caseAffiliateLogList)) {
- // 插入案件日志人员相关表
- caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliateLogList);
- }
- });
-
-
- } else {
- throw new ServiceException("导入立案申请数据不能为空!");
- }
- return successMsg.append(failureMsg).toString();
-
- }
-
-
-
-
- @Override
- @Transactional
- public int pendTral(CaseApplication caseApplication) {
- List arbitrators = caseApplication.getArbitrators();
- int rows = 0;
- if (arbitrators != null && arbitrators.size() > 0) {
- List ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
- List arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
- String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
- String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
- caseApplication.setArbitratorId(idstr);
- caseApplication.setArbitratorName(arbitratorNamestr);
- caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- }
-
-
- return rows;
- }
-
- @Override
- @Transactional
- public int pendTralCheck(CaseApplication caseApplication) {
- Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
- caseApplication.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
- int rows = 0;
- //同意组庭
- if (isAgreePendTral != null && isAgreePendTral == 1) {
- CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
- if(caseApplicationselect==null){
- throw new ServiceException("案件不存在");
- }
- String arbitratorId = caseApplicationselect.getArbitratorId();
- String arbitratorName = caseApplicationselect.getArbitratorName();
- List arbitrators = caseApplication.getArbitrators();
- if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
- List ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
- List arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
- String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
- String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
- caseApplication.setArbitratorId(idstr);
- caseApplication.setArbitratorName(arbitratorNamestr);
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- }
- } else {
- List arbitrators = caseApplication.getArbitrators();
- // 仲裁员信息
- if (arbitrators != null && arbitrators.size() > 0) {
- List ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
- List arbitratorNames = arbitrators.stream().map(Arbitrator::getArbitratorName).collect(Collectors.toList());
- String idstr = ids.stream().map(Object::toString).collect(Collectors.joining(","));
- String arbitratorNamestr = arbitratorNames.stream().map(Object::toString).collect(Collectors.joining(","));
- caseApplication.setArbitratorId(idstr);
- caseApplication.setArbitratorName(arbitratorNamestr);
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- }
- }
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL, "");
- return rows;
- }
-
- @Override
- @Transactional
- public int verificationArbitrateRecord(CaseApplication caseApplication) {
- // 秘书核验裁决书,流转到待仲裁员审核仲裁文书
- caseApplication.setCaseStatus(CaseApplicationConstants.HEAD_CHECK_ARBITRATION);
- int rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.HEAD_CHECK_ARBITRATION, "");
- return rows;
-
- }
-
- /**
- * 部门长审核裁决书
- * @param caseApplication
- * @return
- */
- @Override
- @Transactional
- public AjaxResult checkArbitrateRecord(CaseApplication caseApplication) {
- int rows = 0;
- ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
- Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
- if (agreeOrNotCheck!=null&&agreeOrNotCheck.intValue() == 1) {//同意审核
- try {
- //获取当前案件的裁决书
- CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
- List caseAttachList = caseApplication2.getCaseAttachList();
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- if (caseAttach.getAnnexType() == 3) {
- String annexPath = caseAttach.getAnnexPath();
- String path = "/home/ruoyi" + annexPath;
- // System.out.println("这是查询到的裁决书路径" + path);
- // String path = "D:\\home\\新裁决书模板.docx";
- //获取文件上传地址
- EsignHttpResponse response = SaaSAPIFileUtils.getUploadUrl(path);
- String body = response.getBody();
- if (body != null) {
- JSONObject jsonObject = JSONObject.parseObject(body);
- String fileId = jsonObject.getJSONObject("data").getString("fileId");
- String fileUploadUrl = jsonObject.getJSONObject("data").getString("fileUploadUrl");
- //上传文件流
- EsignHttpResponse response1 = SaaSAPIFileUtils.uploadFile(fileUploadUrl, path);
- JSONObject jsonObject1 = JSONObject.parseObject(response1.getBody());
- if (jsonObject1.getIntValue("errCode") == 0) {
- //查看文件上传状态
- Thread.sleep(3000);
- EsignHttpResponse response2 = SaaSAPIFileUtils.getFileStatus(fileId);
- JSONObject jsonObject2 = JSONObject.parseObject(response2.getBody());
- JSONObject data = jsonObject2.getJSONObject("data");
- int fileStatus = data.getIntValue("fileStatus");
- if (fileStatus == 2 || fileStatus == 5) {
- String fileName = data.getString("fileName");
- //上传成功,获取文件签名印章位置
- SealSignRecord sealSignRecord = new SealSignRecord();
- sealSignRecord.setFileid(fileId);
- EsignHttpResponse positions = SignAward.getPositions(sealSignRecord);
- Gson gson = new Gson();
- JsonObject positionsJsonObject = gson.fromJson(positions.getBody(), JsonObject.class);
- JsonObject positionsData = positionsJsonObject.getAsJsonObject("data");
- String keywordPositions = positionsData.get("keywordPositions").toString();
- //发起签署
- sealSignRecord.setFilename(fileName);
- String arbitratorId = caseApplication2.getArbitratorId();
- if (arbitratorId != null) {
- SysUser sysUser = sysUserMapper.selectUserById(Long.valueOf(arbitratorId));
- if (sysUser == null) {
- return AjaxResult.error();
- }
- sealSignRecord.setPensonAccount(sysUser.getPhonenumber());
- sealSignRecord.setPensonName(sysUser.getNickName());
- }
-
- DeptIdentify deptIdentify = new DeptIdentify();
- deptIdentify.setIsUse(1);
- DeptIdentify deptIdentifyselect = new DeptIdentify();
- List deptIdentifysnew = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
- if (deptIdentifysnew != null && deptIdentifysnew.size() > 0) {
- deptIdentifyselect = deptIdentifysnew.get(0);
- sealSignRecord.setOrgnizeName(deptIdentifyselect.getIdentifyName());
- sealSignRecord.setOrgnizeNamePsnAccount(deptIdentifyselect.getOperPhone());
- sealSignRecord.setOrgnizeNamepsnName(deptIdentifyselect.getOperName());
- } else {
- return AjaxResult.error("没有用印时的机构名称及经办人信息");
- }
-
- //解析文件签名印章位置
- JSONArray jsonArray = JSONArray.parseArray(keywordPositions);
- for (int i = 0; i < jsonArray.size(); i++) {
- JSONObject jsonObject3 = jsonArray.getJSONObject(i);
- String keyword = jsonObject3.getString("keyword");
- if (keyword.equals("仲裁员:")) {
- //签名
- JSONArray positionsArray = jsonObject3.getJSONArray("positions");
- // 遍历 positionsArray 中的每个元素
- for (int j = 0; j < positionsArray.size(); j++) {
- JSONObject positionObj = positionsArray.getJSONObject(j);
- int pageNum = positionObj.getIntValue("pageNum");
- sealSignRecord.setPositionPagepsn(String.valueOf(pageNum));
- JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
- JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
- double positionX = coordinateObj.getDoubleValue("positionX");
- double positionY = coordinateObj.getDoubleValue("positionY");
- sealSignRecord.setPositionXpsn(positionX + 90);
- sealSignRecord.setPositionYpsn(positionY);
- }
- } else {
- //用印
- JSONArray positionsArray = jsonObject3.getJSONArray("positions");
- // 遍历 positionsArray 中的每个元素
- for (int j = 0; j < positionsArray.size(); j++) {
- JSONObject positionObj = positionsArray.getJSONObject(j);
- int pageNum = positionObj.getIntValue("pageNum");
- sealSignRecord.setPositionPageorg(String.valueOf(pageNum));
- JSONArray coordinatesArray = positionObj.getJSONArray("coordinates");
- JSONObject coordinateObj = coordinatesArray.getJSONObject(0);
- double positionX = coordinateObj.getDoubleValue("positionX");
- double positionY = coordinateObj.getDoubleValue("positionY");
- sealSignRecord.setPositionXorg(positionX + 90);
- sealSignRecord.setPositionYorg(positionY);
- }
- }
- }
- /*DeptIdentify deptIdentify1 = new DeptIdentify();
- deptIdentify1.setSealStatus(1); // 印章状态为启用
- //根据机构名称查询部门id
- SysDept sysDept = new SysDept();
- sysDept.setDeptName(sealSignRecord.getOrgnizeName());
- List sysDepts = deptMapper.selectDeptList(sysDept);
- if (sysDepts != null && sysDepts.size() > 0) {
- Long deptId = sysDepts.get(0).getDeptId();
- deptIdentify1.setDeptId(deptId);
- }
- List deptIdentifies = deptIdentifyMapper.selectDeptIdentifylistother(deptIdentify1);
- List sealIds = new ArrayList<>();
- if (deptIdentifies != null && deptIdentifies.size() > 0) {
- for (DeptIdentify identify : deptIdentifies) {
- String sealId = identify.getSealId();
- sealIds.add(sealId);
- }
- }*/
- String orgnizeName = sealSignRecord.getOrgnizeName(); //机构名称
- String orgnizeNamepsnName = sealSignRecord.getOrgnizeNamepsnName(); //机构经办人姓名
- String orgnizeNamePsnAccount = sealSignRecord.getOrgnizeNamePsnAccount(); //机构经办人联系方式
- //查询机构信息
- DeptIdentify deptIdentify1 = new DeptIdentify();
- deptIdentify1.setIdentifyName(orgnizeName);
- deptIdentify1.setOperName(orgnizeNamepsnName);
- deptIdentify1.setOperPhone(orgnizeNamePsnAccount);
- List deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify1);
- if (deptIdentifies != null && deptIdentifies.size() > 0) {
- Long id = deptIdentifies.get(0).getId();
- SealManage sealManage = new SealManage();
- sealManage.setIdentifyId(id);
- List sealIdList = new ArrayList<>();
- List selectSealList = sealManageMapper.selectSealList(sealManage);
- if (selectSealList != null && selectSealList.size() > 0) {
- for (SealManage manage : selectSealList) {
- Integer sealStatus = manage.getSealStatus();
- Integer isUse = manage.getIsUse();
- if (sealStatus == 1 && isUse ==1) {
- sealIdList.add(manage.getSealId());
- }
- }
- EsignHttpResponse response3 = SignAward.createByFile(sealSignRecord, sealIdList);
-
- JSONObject jsonObject3 = JSONObject.parseObject(response3.getBody());
- if (jsonObject3 != null) {
- if (jsonObject3.getIntValue("code") == 0) {
- //获取签署流程ID
- JSONObject data1 = jsonObject3.getJSONObject("data");
- String signFlowId = data1.getString("signFlowId");
- //保存案件id,文件id,文件名称.流程id到签署用印记录表里
- sealSignRecord.setCaseAppliId(caseApplication.getId());
- sealSignRecord.setSignFlowid(signFlowId);
- sealSignRecord.setSignFlowStatus(1);//待签名
- sealSignRecordMapper.insertSealSignRecord(sealSignRecord);
- } else {
- throw new ServiceException(jsonObject3.getString("message"));
- }
- } else {
- return AjaxResult.error();
- }
-
- }
-
-
- } else {
- return AjaxResult.error();
- }
- }
- }
- }
- break;
- }
- }
- }
- } catch (EsignDemoException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- caseApplication.setCaseStatus(CaseApplicationConstants.SIGN_ARBITRATION);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.SIGN_ARBITRATION, "");
-
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
- caseApplication.setCaseStatus(CaseApplicationConstants.HEAD_CHECK_ARBITRATION);
- String notes="";
- if(caseApplication.getArbitrateRecord()!=null&&StrUtil.isNotEmpty(caseApplication.getArbitrateRecord().getDeptorReject())){
- notes="部门长驳回仲裁文书,驳回原因:"+caseApplication.getArbitrateRecord().getDeptorReject();
- }
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.HEAD_CHECK_ARBITRATION, notes);
-
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- }
-
- return success();
- }
-
- /**
- * 仲裁员审核裁决书
- * @param caseApplication
- * @return
- */
- @Override
- @Transactional
- public AjaxResult arbitratorCheckArbitrateRecord(CaseApplication caseApplication) {
- // 同意后状态改为待部门长审核仲裁文书(CHECK_ARBITRATION = 12),拒绝改为待秘书核验仲裁文书(VERPRIF_ARBITRATION = 11)
- int rows = 0;
- Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
- if (agreeOrNotCheck.intValue() == 1) {
- caseApplication.setCaseStatus(CaseApplicationConstants.CHECK_ARBITRATION);
-
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CHECK_ARBITRATION, "");
- } else if (agreeOrNotCheck.intValue() == 2) {//拒绝审核
- ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
- if(arbitrateRecord.getId()!=null){
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
- }else {
- arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecord);
- }
- caseApplication.setCaseStatus(CaseApplicationConstants.VERPRIF_ARBITRATION);
-
- rows = caseApplicationMapper.submitCaseApplication(caseApplication);
- String notes="";
- if(caseApplication.getArbitrateRecord()!=null&&StrUtil.isNotEmpty(caseApplication.getArbitrateRecord().getArbitrateReject())){
- notes="仲裁员驳回仲裁文书,驳回原因:"+caseApplication.getArbitrateRecord().getArbitrateReject();
- }
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.VERPRIF_ARBITRATION, notes);
- }
- return success();
- }
-
-
-
- @Override
- @Transactional
- public int submitCaseApplicationCheck(List ids, Integer agreeOrNotCheck,String caseCheckReject) {
- //提交立案审查
- int rows = 0;
- for (Long id : ids) {
- String notes="";
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- caseApplication.setAgreeOrNotCheck(agreeOrNotCheck);
- if (agreeOrNotCheck == 1) {//同意审核
- caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
- rows += caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
- } else if (agreeOrNotCheck == 2) {//拒绝审核
- notes="驳回立案申请,驳回原因:"+caseCheckReject;
- caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
- rows += caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, notes);
- ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord();
- arbitrateRecordsel.setCaseAppliId(id);
- ArbitrateRecord arbitrateRecordnew = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordsel);
- if(arbitrateRecordnew!=null){
- arbitrateRecordnew.setCaseCheckReject(caseCheckReject);
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
- }else {
- arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
- arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
- }
- //发短信给申请人
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- //获取身份类型
- int identityType = affiliate.getIdentityType();
- //查询案件详细信息
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
- String caseName = "仲裁";
- String caseNum = caseApplication1.getCaseNum();
-
- if (identityType == 1) {
- request.setPhone(affiliate.getContactTelphone());
- request.setTemplateId("2018697");
- String name = affiliate.getName();
- request.setTemplateParamSet(new String[]{name, caseName, caseNum,caseCheckReject});
- 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 + "已拒绝,拒接原因:" + caseCheckReject;
- smsSendRecord.setSendContent(content);
- smsSendRecord.setCreateBy(getUsername());
- if (aBoolean) {
- smsSendRecord.setSendStatus(1);
- } else {
- smsSendRecord.setSendStatus(0);
- }
- smsRecordMapper.saveSmsSendRecord(smsSendRecord);
-
- }
-
- }
- }
- }
-
- }
- return rows;
- }
-
- @Override
- public CaseApplication selectCaseApplicationConfirm(CaseApplication caseApplication) {
- CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplicationConfirm(caseApplication);
- if (caseApplicationselect == null) {
- return caseApplicationselect;
- }
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- List caseAffiliatListeselect = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliatListeselect != null) {
-
- for (int i = 0; i < caseAffiliatListeselect.size(); i++) {
- CaseAffiliate caseAffiliateselect = caseAffiliatListeselect.get(i);
- int identityType = caseAffiliateselect.getIdentityType();
- if (identityType == 1) {
-
- caseApplicationselect.setApplicantName(caseAffiliateselect.getApplicationOrganName());
- }
- }
-
- }
- caseApplication.setAnnexType(8);
- // 查询缴费凭证
- List caseAttachList = caseAttachMapper.queryCaseAttachList(caseApplication);
- if (caseAttachList != null && caseAttachList.size() > 0) {
- for (CaseAttach caseAttach : caseAttachList) {
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- startIndex += prefix.length();
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- caseAttach.setAnnexPath(annexPath);
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- caseAttach.setAnnexName(annexNamenew);
- }
-
-
- }
- }
- caseApplicationselect.setPayOrderList(caseAttachList);
-
- return caseApplicationselect;
- }
-
- /**
- * 给被申请人发送房间号短信
- *
- * @param messageVO
- * @return
- */
- @Override
- public String sendRoomNoMessage(SendRoomNoMessageVO messageVO) {
- CaseAffiliate caseAffiliateSelect = new CaseAffiliate();
- caseAffiliateSelect.setCaseAppliId(messageVO.getId());
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliateSelect);
- if (CollectionUtil.isEmpty(caseAffiliates)) {
- return "申请人、被申请人不存在";
- }
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(messageVO.getId());
- CaseApplication caseApplicationselect = caseApplicationMapper.selectCaseApplication(caseApplication);
- String returnResult = "短信发送成功";
- // 需要申请模板,申请人,被申请人发送短信通知
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- String startFormat = "";
- String endFormat = "";
- // 创建房间短信通知
- String format = "yyyy/MM/dd HH:mm:ss"; // 目标格式
- Date startDate = messageVO.getScheduleStartTime();
- Date endDate = messageVO.getScheduleEndTime();
- SimpleDateFormat sdf = new SimpleDateFormat(format);
- if(startDate!=null) {
- startFormat = sdf.format(startDate);
- }
- if(endDate!=null) {
- endFormat = sdf.format(endDate);
- }
- // 预约会议短信模板
- request.setTemplateId("1983711");
-
-
- for (CaseAffiliate caseAffiliate : caseAffiliates) {
- request.setPhone(caseAffiliate.getContactTelphone());
- request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() + caseAffiliate.getUserId()});
- String userId = (null == caseAffiliate.getUserId() ? "" : caseAffiliate.getUserId());
- // 1983711 开庭审理预约会议短信通知 尊敬的{1}用户,您的{2}仲裁案件,开庭审理房间号为{3},会议时间为{4},请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。
- request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplicationselect.getCaseNum(), messageVO.getRoomNo() , startFormat + "-" + endFormat});
-
- Boolean aBoolean = SmsUtils.sendSms(request);
- //保存短信发送记录
- SmsSendRecord smsSendRecord = new SmsSendRecord();
- smsSendRecord.setCaseId(messageVO.getId());
- smsSendRecord.setCaseNum(caseApplicationselect.getCaseNum());
- smsSendRecord.setPhone(request.getPhone());
- smsSendRecord.setSendTime(new Date());
- String content = "尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplicationselect.getCaseNum() + "仲裁案件,开庭审理房间号为" + messageVO.getRoomNo() + "会议时间为" + startFormat + "-" + endFormat + ",请点击https://txroom.xayunmei.com/#/home, 请知晓,如非本人操作,请忽略本短信。";
- smsSendRecord.setSendContent(content);
-
- String userName;
- try {
- userName = getUsername();
- } catch (Exception e) {
- userName = "admin";
- }
- smsSendRecord.setCreateBy(userName);
- if (aBoolean) {
- smsSendRecord.setSendStatus(1);
- } else {
- smsSendRecord.setSendStatus(0);
- }
- smsRecordMapper.saveSmsSendRecord(smsSendRecord);
- }
- return returnResult;
- }
-
- @Override
- public SealSignRecord selectSignUrl(CaseApplication caseApplication) throws EsignDemoException {
- SealSignRecord sealSignRecord = new SealSignRecord();
- sealSignRecord.setCaseAppliId(caseApplication.getId());
- Gson gson = new Gson();
- List sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
- SealSignRecord sealSignRecordReslt = new SealSignRecord();
- if (sealSignRecords != null && sealSignRecords.size() > 0) {
- SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
- EsignHttpResponse signUrl = SignAward.signUrl(sealSignRecordselect);
- JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
- JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
- String url = signUrlData.get("url").getAsString();
- sealSignRecordReslt.setSignUrl(url);
- }
-
- return sealSignRecordReslt;
- }
-
- @Override
- public SealSignRecord selectSealUrl(CaseApplication caseApplication) throws EsignDemoException {
- SealSignRecord sealSignRecord = new SealSignRecord();
- sealSignRecord.setCaseAppliId(caseApplication.getId());
- Gson gson = new Gson();
- List sealSignRecords = sealSignRecordMapper.selectSealSignRecord(sealSignRecord);
- SealSignRecord sealSignRecordReslt = new SealSignRecord();
- if (sealSignRecords != null && sealSignRecords.size() > 0) {
- SealSignRecord sealSignRecordselect = sealSignRecords.get(0);
- EsignHttpResponse signUrl = SignAward.usesealUrl(sealSignRecordselect);
- JsonObject signUrlJsonObject = gson.fromJson(signUrl.getBody(), JsonObject.class);
- JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
- String url = signUrlData.get("url").getAsString();
- sealSignRecordReslt.setSealUrl(url);
- }
- return sealSignRecordReslt;
- }
-
- @Override
- @Transactional
- public AjaxResult creatTrialRecord(ArbitrateRecord arbitrateRecordselect) {
- //生成仲裁结果
- CaseApplication caseApplicationselect = new CaseApplication();
- caseApplicationselect.setId(arbitrateRecordselect.getCaseAppliId());
- CaseApplication caseApplication = caseApplicationMapper.selectCaseApplication(caseApplicationselect);
- String createBy = caseApplication.getCreateBy();
- if (createBy != null) {
- arbitrateRecordselect.setCreateBy(createBy);
- }
- //
- CaseApplication caseApplicationupdate = new CaseApplication();
- caseApplicationupdate.setId(arbitrateRecordselect.getCaseAppliId());
- caseApplicationupdate.setIsAbsence(arbitrateRecordselect.getIsAbsence());
- caseApplicationupdate.setAppliIsAbsen(arbitrateRecordselect.getAppliIsAbsen());
- caseApplicationupdate.setRespondentOpinion(arbitrateRecordselect.getRespondentOpinion());
- caseApplicationupdate.setApplicantOpinion(arbitrateRecordselect.getApplicantOpinion());
- caseApplicationupdate.setCaseFacts(arbitrateRecordselect.getCaseFacts());
- caseApplicationupdate.setCaseFocus(arbitrateRecordselect.getCaseFocus());
- caseApplicationMapper.submitCaseApplication(caseApplicationupdate);
-
- //先判断案件是否已经提交过仲裁结果
- ArbitrateRecord arbitrateRecordsele = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordselect);
- if (arbitrateRecordsele != null) {
- int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordselect);
- if (i > 0) {
- //案件日志表里添加数据
- CaseLogRecord caseLogRecord = new CaseLogRecord();
- caseLogRecord.setCaseAppliId(caseApplication.getId());
- caseLogRecord.setCaseNode(caseApplication.getCaseStatus());
- if (createBy != null) {
- caseLogRecord.setCreateBy(createBy);
- }
- caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
-
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
-
-
- }
- } else {
- //提交仲裁结果
- int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordselect);
-
- if (i > 0) {
- //案件日志表里添加数据
- CaseLogRecord caseLogRecord = new CaseLogRecord();
- caseLogRecord.setCaseAppliId(caseApplication.getId());
- caseLogRecord.setCaseNode(caseApplication.getCaseStatus());
- if (createBy != null) {
- caseLogRecord.setCreateBy(createBy);
- }
- caseLogRecordMapper.insertCaseLogRecord(caseLogRecord);
-
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.GENERATED_ARBITRATION, "");
-
- }
- }
-
- //生成庭审笔录
- try {
- Map datas = new HashMap<>();
- Long id = caseApplication.getId();
- if (id == null) {
- return null;
- }
-
- //获取仲裁记录表里的相关信息
- ArbitrateRecord arbitrateRecord = new ArbitrateRecord();
- arbitrateRecord.setCaseAppliId(id);
- ArbitrateRecord arbitrateRecord1 = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecord);
-
- //获取案件关联人信息
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(id);
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- //获取身份类型
- int identityType = affiliate.getIdentityType();
- if (identityType == 1) { //申请人
- datas.put("appName", affiliate.getName());
- datas.put("appIDNo", affiliate.getIdentityNum());
- datas.put("appAddress", affiliate.getContactAddress());
- datas.put("appAgentName", affiliate.getNameAgent());
- datas.put("appAgentIDNo", affiliate.getIdentityNumAgent());
- } else if (identityType == 2) { //被申请人
- datas.put("resName", affiliate.getName());
- datas.put("resIDNo", affiliate.getIdentityNum());
- datas.put("resAddress", affiliate.getContactAddress());
- datas.put("resAgentName", affiliate.getNameAgent());
- datas.put("resAgentIDNo", affiliate.getIdentityNumAgent());
- }
- }
- }
- String arbitratorName = caseApplication.getArbitratorName();
- datas.put("caseName", caseApplication.getCaseName());
- datas.put("caseNum", caseApplication.getCaseNum());
- datas.put("arbitratorName", arbitratorName);
- Date hearDate = caseApplication.getHearDate();
- if (hearDate != null) {
- LocalDate localDate = hearDate.toInstant()
- .atZone(ZoneId.systemDefault())
- .toLocalDate();
- datas.put("hearYear", localDate.getYear());
- datas.put("hearMonths", localDate.getMonthValue());
- datas.put("hearDay", localDate.getDayOfMonth());
- } else {
- datas.put("hearYear", null);
- datas.put("hearMonths", null);
- datas.put("hearDay", null);
- }
- datas.put("appArbitrationClaims", caseApplication.getArbitratClaims());
- datas.put("evidenDetermi", "认定为申请人证据充足");
- datas.put("factDetermi", "被申请人欠款属实");
- datas.put("caseSketch", "申请人所求通过");
- datas.put("arbitrateThink", "被申请人应按约定还款");
- datas.put("rulingFollows", "被申请人依法偿还申请人欠款");
- datas.put("legalProvisions", "仲裁法");
- LocalDate now = LocalDate.now();
- String year = Integer.toString(now.getYear());
- String month = String.format("%02d", now.getMonthValue());
- String day = String.format("%02d", now.getDayOfMonth());
- datas.put("year", year);
- datas.put("months", month);
- datas.put("day", day);
- String modalFilePath = "/data/arbitrate-document/template/仲裁裁决书模板.docx";
-// String modalFilePath = "D:/develop/仲裁裁决书模板 (2).docx";
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
-// String saveFolderPath = "D:/data/" + now.getYear() + "/" + now.getMonthValue() + "/" + now.getDayOfMonth();
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".docx";
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
- String resultFilePath = saveFolderPath + "/" + fileName;
- // 创建日期目录
- File saveFolder = new File(saveFolderPath);
- if (!saveFolder.exists()) {
- saveFolder.mkdirs();
- }
- Path sourcePath = new File(modalFilePath).toPath();
- Path destinationPath = new File(resultFilePath).toPath();
- Files.copy(sourcePath, destinationPath, StandardCopyOption.REPLACE_EXISTING);
- String docFilePath = WordUtil.getDocFilePath(datas, modalFilePath, resultFilePath);
- String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
-
-// String savePath = saveFolderPath;
-// saveName = fileName;
-
- caseApplication.setAnnexType(7);
- List caseAttachs = caseAttachMapper.queryCaseAttachList(caseApplication);
- if (caseAttachs != null && caseAttachs.size() > 0) {
- CaseAttach caseAttach = CaseAttach.builder()
- .caseAppliId(id)
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(7)
- .build();
- int i = caseAttachMapper.updateCaseAttachBycaseid(caseAttach);
-
- } else {
- //将庭审笔录保存到附件表里
- CaseAttach caseAttach = CaseAttach.builder()
- .caseAppliId(id)
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(7)
- .build();
- int i = caseAttachMapper.save(caseAttach);
-
- }
-
- //获取案件详细信息
- CaseApplication caseApplicationSelct = selectCaseApplication(caseApplication);
- return success(caseApplicationSelct);
- } catch (IOException e) {
- e.printStackTrace();
- return AjaxResult.error("生成庭审笔录异常");
- }
-
- }
-
- @Override
- @Transactional
- public AjaxResult creatTrialRecordnew(ArbitrateRecord arbitrateRecordselect) {
- //生成仲裁结果
- CaseApplication caseApplicationupdate = new CaseApplication();
- caseApplicationupdate.setId(arbitrateRecordselect.getCaseAppliId());
- caseApplicationupdate.setIsAbsence(arbitrateRecordselect.getIsAbsence());
- caseApplicationupdate.setAppliIsAbsen(arbitrateRecordselect.getAppliIsAbsen());
- caseApplicationMapper.submitCaseApplication(caseApplicationupdate);
-
- //先判断案件是否已经提交过仲裁结果
- ArbitrateRecord arbitrateRecordsele = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordselect);
- if (arbitrateRecordsele != null) {
- arbitrateRecordselect.setId(arbitrateRecordsele.getId());
- int i = arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordselect);
- } else {
- //提交仲裁结果
- int i = arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordselect);
- }
- return success();
-
- }
-
- @Override
- @Transactional
- public AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication) {
- if(CollectionUtil.isNotEmpty(caseApplication.getColumnValues())) {
- for (ColumnValue columnValue : caseApplication.getColumnValues()) {
- columnValueMapper.updateColumnValue(columnValue);
- }
- }
- return success();
- }
-
- @Override
- @Transactional
- public CaseAttach downloadCaseZipFile(CaseApplication caseApplication) {
- caseApplication.setAnnexType(12);
- CaseAttach caseAttach = new CaseAttach();
- List caseAttachs = caseAttachMapper.queryCaseAttachList( caseApplication);
- if(caseAttachs!=null&&caseAttachs.size()>0){
- caseAttach = caseAttachs.get(0);
-
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- if(startIndex!=-1) {
- startIndex += prefix.length();
-
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- caseAttach.setAnnexPath(annexPath);
- }
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- caseAttach.setAnnexName(annexNamenew);
- }
-
- }else {
- CaseApplication caseApplicationsel = new CaseApplication();
- caseApplicationsel.setId(caseApplication.getId());
- List annexTypeList = new ArrayList<>();
- annexTypeList.add(1);
- annexTypeList.add(2);
- annexTypeList.add(3);
- annexTypeList.add(6);
- annexTypeList.add(7);
- annexTypeList.add(9);
- annexTypeList.add(11);
- caseApplicationsel.setAnnexTypeList(annexTypeList);
- List caseAttachList = caseAttachMapper.queryCaseAttachList( caseApplicationsel);
- if(caseAttachList!=null&&caseAttachList.size()>0){
- List pathList = new ArrayList<>();
- for (CaseAttach caseAttach1 : caseAttachList) {
- String annexName = caseAttach1.getAnnexName();
- String annexPathsel = caseAttach1.getAnnexPath();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- if(startIndex!=-1) {
- startIndex += prefix.length();
-
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- String path = "/home/ruoyi" + annexPath;
- pathList.add(path);
- }else if(annexPathsel.contains(annexName)){
- pathList.add(annexPathsel);
- }
- }
- //将案件相关附件压缩zip文件
- if(pathList!=null&&pathList.size()>0){
- LocalDate now = LocalDate.now();
- String year = Integer.toString(now.getYear());
- String month = String.format("%02d", now.getMonthValue());
- String day = String.format("%02d", now.getDayOfMonth());
- String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
-// String saveFolderPath = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
- String fileName = UUID.randomUUID().toString().replace("-", "") + ".zip";
- File saveFolder = new File(saveFolderPath);
- if (!saveFolder.exists()) {
- saveFolder.mkdirs();
- }
- String zipFileOutPath = saveFolderPath + "/" + fileName;
- try {
-
- FileOutputStream zfous = new FileOutputStream(zipFileOutPath);
- ZipOutputStream zipFileOutstream = new ZipOutputStream(zfous);
-
- for (String pathstr : pathList) {
- FileInputStream fis1 = new FileInputStream(pathstr);
- ZipFileUtils.zipFile(pathstr, fis1, zipFileOutstream);
- }
- zipFileOutstream.close();
- zfous.close();
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- //保存压缩文件附件
- String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
-// String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
- String savePath = "/home/ruoyi/uploadPath/upload";
- caseAttach = CaseAttach.builder()
- .caseAppliId(caseApplication.getId())
- .annexName(saveName)
- .annexPath(savePath)
- .annexType(12)
- .build();
- int i = caseAttachMapper.save(caseAttach);
-
- String annexName = caseAttach.getAnnexName();
- String prefix = "/profile";
- int startIndex = annexName.indexOf(prefix);
- if(startIndex!=-1) {
- startIndex += prefix.length();
-
- String annexPath = "/uploadPath" + annexName.substring(startIndex);
- caseAttach.setAnnexPath(annexPath);
- }
- int startIndexnew = annexName.lastIndexOf("/");
- if (startIndexnew != -1) {
- String annexNamenew = annexName.substring(startIndexnew + 1);
- caseAttach.setAnnexName(annexNamenew);
- }
-
- return caseAttach;
-
- }
- }
- }
- return caseAttach;
- }
-
- @Override
- public List selectCaseApplicationListBatchByRole(CaseApplication caseApplication) {
- List caseApplicationlist = caseApplicationMapper.selectAdminCaseApplicationListBatch(caseApplication);
- if(caseApplicationlist!=null&&caseApplicationlist.size()>0){
- for(CaseApplication caseApplicationselect : caseApplicationlist){
- Integer batchNumber = caseApplicationselect.getBatchNumber();
- CaseApplication caseApplicationsel = new CaseApplication();
- caseApplicationsel.setBatchNumber(batchNumber);
- List caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
- if (caseApplications != null && caseApplications.size() > 0) {
- List caseStatuss = caseApplications.stream().map(CaseApplication::getCaseStatus).collect(Collectors.toList());
- List caseStatusNames = caseApplications.stream().map(CaseApplication::getCaseStatusName).collect(Collectors.toList());
- List caseStatussnew = caseStatuss.stream().distinct().collect(Collectors.toList());
- List caseStatusNamesnew = caseStatusNames.stream().distinct().collect(Collectors.toList());
- String caseStatusName = caseStatusNamesnew.stream().map(Object::toString).collect(Collectors.joining(","));
- caseApplicationselect.setCaseStatusName(caseStatusName);
- }
- }
- }
-
- return caseApplicationlist;
- }
-
- @Override
- @Transactional
- public int submitCaseApplicationBatch(String batchNumber) {
- int rows = 0;
- CaseApplication caseApplicationsel = new CaseApplication();
- caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
- caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
- List caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
- List ids = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
- if(caseApplications!=null&&caseApplications.size()>0){
- Map applicationMap = caseApplications.stream().collect(Collectors.toMap(CaseApplication::getId, Function.identity(), (n1, n2) -> n2));
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliateByCaseIds(ids);
- // 转换为Map>形式
- Map> caseAffiliateMap = caseAffiliates.stream().collect(Collectors.groupingBy(CaseAffiliate::getCaseAppliId));
- for (Long id : ids) {
- // 查询案件信息,做必填校验,校验不通过,提示,不能提交
- StringBuilder errorMsg = new StringBuilder();
- // 必填校验
- CaseApplication caseApplication = applicationMap.get(id);
- String caseNum = caseApplication.getCaseNum();
- // 基本字段校验
- if(caseApplication!=null) {
- for (String baseColumn : baseColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseApplication, baseColumn))){
- errorMsg.append(getColumnstr(baseColumn)).append("不能为空,");
-// throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- // 校验人员
- if(CollectionUtil.isNotEmpty(caseAffiliates)){
- List affiliateList = caseAffiliateMap.get(id);
- if(CollectionUtil.isNotEmpty(affiliateList)){
- for (CaseAffiliate caseAffiliate : affiliateList) {
- if(caseAffiliate.getIdentityType()==1){
- // 校验申请人
- for (String applicAffiliateColumn : applicAffiliateColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
- errorMsg.append(getColumnstr(applicAffiliateColumn)).append("不能为空,");
-// throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- }else {
- // 校验被申请人
- for (String applicAffiliateColumn : dectborAffiliateColumns) {
- if(StrUtil.isEmpty( ObjectFieldUtils.getValue(caseAffiliate, applicAffiliateColumn))){
- errorMsg.append(getColumnstr(applicAffiliateColumn)).append("不能为空,");
-// throw new ServiceException("必填字段未填写,请完善案件信息!");
- }
- }
- }
- }
- }
- }
- }
- if(StringUtils.isNotEmpty(errorMsg.toString())){
- throw new ServiceException("案件编号" + caseNum + errorMsg.toString()+"请完善案件信息!");
- }
-
- CaseApplication application = new CaseApplication();
- application.setId(id);
- //提交立案申请
- application.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
- rows += caseApplicationMapper.submitCaseApplication(application);
- // 新增日志
- insertCaseLog(application.getId(), CaseApplicationConstants.CASE_CHECK, "");
- }
-
- }else{
- throw new ServiceException("这个批号没有批量提交的案件");
- }
-
- return rows;
- }
-
- @Override
- @Transactional
- public int submitCaseApplicationCheckBatch(String batchNumber, Integer agreeOrNotCheck, String caseCheckReject) {
- int rows = 0;
- CaseApplication caseApplicationsel = new CaseApplication();
- caseApplicationsel.setBatchNumber(Integer.parseInt(batchNumber));
- caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_CHECK);
- List caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
- List ids = caseApplications.stream().map(CaseApplication::getId).collect(Collectors.toList());
- if(caseApplications!=null&&caseApplications.size()>0){
- for (Long id : ids) {
- String notes="";
- CaseApplication caseApplication = new CaseApplication();
- caseApplication.setId(id);
- caseApplication.setAgreeOrNotCheck(agreeOrNotCheck);
- if (agreeOrNotCheck == 1) {
- //同意审核
- caseApplication.setCaseStatus(CaseApplicationConstants.PENDING_PAYMENT);
- rows += caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.PENDING_PAYMENT, notes);
- } else if (agreeOrNotCheck == 2) {
- //拒绝审核
- notes="驳回立案申请,驳回原因:"+caseCheckReject;
- caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
- rows += caseApplicationMapper.submitCaseApplication(caseApplication);
- // 新增日志
- insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, notes);
- ArbitrateRecord arbitrateRecordsel = new ArbitrateRecord();
- arbitrateRecordsel.setCaseAppliId(id);
- ArbitrateRecord arbitrateRecordnew = arbitrateRecordMapper.selectArbitrateRecord(arbitrateRecordsel);
- if(arbitrateRecordnew!=null){
- arbitrateRecordnew.setCaseCheckReject(caseCheckReject);
- arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecordnew);
- }else {
- arbitrateRecordsel.setCaseCheckReject(caseCheckReject);
- arbitrateRecordMapper.insertArbitrateRecord(arbitrateRecordsel);
- }
- //发短信给申请人
- SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
- CaseAffiliate caseAffiliate = new CaseAffiliate();
- caseAffiliate.setCaseAppliId(caseApplication.getId());
- List caseAffiliates = caseAffiliateMapper.selectCaseAffiliate(caseAffiliate);
- if (caseAffiliates != null && caseAffiliates.size() > 0) {
- for (CaseAffiliate affiliate : caseAffiliates) {
- //获取身份类型
- int identityType = affiliate.getIdentityType();
- //查询案件详细信息
- CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
- String caseName = "仲裁";
- String caseNum = caseApplication1.getCaseNum();
-
- if (identityType == 1) {
- request.setPhone(affiliate.getContactTelphone());
- request.setTemplateId("2018697");
- String name = affiliate.getName();
- request.setTemplateParamSet(new String[]{name, caseName, caseNum,caseCheckReject});
- 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 + "已拒绝,拒接原因:" + caseCheckReject;
- smsSendRecord.setSendContent(content);
- smsSendRecord.setCreateBy(getUsername());
- if (aBoolean) {
- smsSendRecord.setSendStatus(1);
- } else {
- smsSendRecord.setSendStatus(0);
- }
- smsRecordMapper.saveSmsSendRecord(smsSendRecord);
-
- }
-
- }
- }
- }
- }
- }else{
- throw new ServiceException("这个批号没有批量审查的案件");
- }
- return rows;
- }
-
- @Override
- @Transactional
- public int pendTralCheckBatch(CaseApplication caseApplication) {
- Integer isAgreePendTral = caseApplication.getIsAgreePendTral();
- int rows = 0;
- CaseApplication caseApplicationsel = new CaseApplication();
- caseApplicationsel.setBatchNumber(caseApplication.getBatchNumber());
- caseApplicationsel.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
- List caseApplications = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplicationsel);
- if (caseApplications != null && caseApplications.size() > 0) {
- List caseNums = caseApplications.stream().map(CaseApplication::getCaseNum).collect(Collectors.toList());
- List caseNumsnew = caseNums.stream().distinct().collect(Collectors.toList());
- String caseNumsstr = caseNumsnew.stream().map(Object::toString).collect(Collectors.joining(","));
- throw new ServiceException("案件编号"+caseNumsstr+"在案件质证节点,请先进行案件质证,然后再批量组庭审核");
- }
-
-
-
- CaseApplication caseApplication1 = new CaseApplication();
- caseApplication1.setBatchNumber(caseApplication.getBatchNumber());
- caseApplication1.setCaseStatus(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL_SUBMMIT);
- List caseApplications1 = caseApplicationMapper.listCaseApplicationByBatchNumber(caseApplication1);
- if (caseApplications1 != null && caseApplications1.size() > 0) {
- for(CaseApplication caseApplicationse:caseApplications1){
- //同意组庭
- if (isAgreePendTral != null && isAgreePendTral == 1) {
-
- String arbitratorId = caseApplicationse.getArbitratorId();
- String arbitratorName = caseApplicationse.getArbitratorName();
- List arbitrators = caseApplication.getArbitrators();
- if(arbitrators != null && arbitrators.size() > 0 && StringUtils.isEmpty(arbitratorId) && StringUtils.isEmpty(arbitratorName)){
- List ids = arbitrators.stream().map(Arbitrator::getId).collect(Collectors.toList());
- List