案件
This commit is contained in:
+51
@@ -1,11 +1,15 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||||
@@ -22,7 +26,41 @@ public class AdjudicationController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IAdjudicationService adjudicationService;
|
private IAdjudicationService adjudicationService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据签署流程id查询批量签名链接
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
|
||||||
|
@PostMapping("/selectBatchSignUrl")
|
||||||
|
public AjaxResult selectBatchSignUrl(@RequestBody StringIdsReq idsReq) {
|
||||||
|
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSignUrl(idsReq);
|
||||||
|
return success(sealSignRecordselect);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据签署流程id查询批量用印链接
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
|
||||||
|
@PostMapping("/selectBatchSealUrl")
|
||||||
|
public AjaxResult selectBatchSealUrl(@RequestBody StringIdsReq idsReq) {
|
||||||
|
if(CollectionUtil.isEmpty(idsReq.getIds())|| StrUtil.isEmpty(idsReq.getPsnAccount())){
|
||||||
|
return error("参数校验失败");
|
||||||
|
}
|
||||||
|
SealSignRecord sealSignRecordselect = adjudicationService.selectBatchSealUrl(idsReq);
|
||||||
|
return success(sealSignRecordselect);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据仲裁员手机号分页查询待签名/待用印的案件
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('caseManagement:list:selectSignUrl')")
|
||||||
|
@GetMapping("/pageSignAdjudicate")
|
||||||
|
public TableDataInfo pageSignAdjudicate(@RequestParam(value = "personAccount",required = false) String personAccount, @RequestParam("caseStatus") Integer caseStatus) {
|
||||||
|
startPage();
|
||||||
|
List<CaseApplication> list = adjudicationService.selectSealSigning(personAccount,caseStatus);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,6 +75,18 @@ public class AdjudicationController extends BaseController {
|
|||||||
}
|
}
|
||||||
return adjudicationService.createDocument(caseApplication);
|
return adjudicationService.createDocument(caseApplication);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 批量生成裁决书
|
||||||
|
* @param caseApplication
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/batchDocument")
|
||||||
|
public AjaxResult batchDocument(@Validated @RequestBody BatchCaseApplication caseApplication){
|
||||||
|
if (CollectionUtil.isEmpty(caseApplication.getIds())) {
|
||||||
|
return AjaxResult.error("参数校验失败");
|
||||||
|
}
|
||||||
|
return adjudicationService.batchDocument(caseApplication.getIds());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重新生成裁决书
|
* 重新生成裁决书
|
||||||
@@ -81,6 +131,7 @@ public class AdjudicationController extends BaseController {
|
|||||||
return adjudicationService.signature(caseApplication);
|
return adjudicationService.signature(caseApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归档(暂时只改案件状态)
|
* 归档(暂时只改案件状态)
|
||||||
* @param batchCaseApplication
|
* @param batchCaseApplication
|
||||||
|
|||||||
+5
@@ -14,10 +14,12 @@ import com.ruoyi.common.exception.EsignDemoException;
|
|||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.WxAppletNotifyUtils;
|
import com.ruoyi.common.utils.WxAppletNotifyUtils;
|
||||||
import com.ruoyi.util.FileUtil;
|
import com.ruoyi.util.FileUtil;
|
||||||
|
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.ReservedConferenceVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.SendRoomNoMessageVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
import com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -40,6 +42,8 @@ import java.util.List;
|
|||||||
public class CaseApplicationController extends BaseController {
|
public class CaseApplicationController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ICaseApplicationService caseApplicationService;
|
private ICaseApplicationService caseApplicationService;
|
||||||
|
@Autowired
|
||||||
|
private IAdjudicationService adjudicationService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,6 +175,7 @@ public class CaseApplicationController extends BaseController {
|
|||||||
return success(sealSignRecordselect);
|
return success(sealSignRecordselect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用印链接
|
* 查询用印链接
|
||||||
*/
|
*/
|
||||||
|
|||||||
+11
-3
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
import com.ruoyi.wisdomarbitrate.service.ICasePaymentService;
|
||||||
@@ -9,6 +11,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缴费支付
|
* 缴费支付
|
||||||
*/
|
*/
|
||||||
@@ -43,13 +48,16 @@ public class CasePaymentController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 缴费确认
|
* 缴费确认
|
||||||
* @param caseApplication
|
* @param batchCaseApplication
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
|
// @PreAuthorize("@ss.hasPermi('paymentManagement:list:payconfirm')")
|
||||||
@PutMapping("/confirm")
|
@PutMapping("/confirm")
|
||||||
public AjaxResult confirmPayment(@Validated @RequestBody CaseApplication caseApplication) {
|
public AjaxResult confirmPayment(@Validated @RequestBody BatchCaseApplication batchCaseApplication) {
|
||||||
return paymentService.confirmPayment(caseApplication);
|
if(CollectionUtil.isEmpty(batchCaseApplication.getIds())){
|
||||||
|
return AjaxResult.error("参数校验失败");
|
||||||
|
}
|
||||||
|
return paymentService.confirmPayment(batchCaseApplication.getIds());
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 缴费列表查询
|
* 缴费列表查询
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.common.utils;
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.common.utils.uuid.UUID;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@@ -14,18 +16,17 @@ import org.springframework.stereotype.Component;
|
|||||||
import javax.activation.DataHandler;
|
import javax.activation.DataHandler;
|
||||||
import javax.mail.*;
|
import javax.mail.*;
|
||||||
import javax.mail.internet.*;
|
import javax.mail.internet.*;
|
||||||
|
import javax.mail.search.*;
|
||||||
import javax.mail.util.ByteArrayDataSource;
|
import javax.mail.util.ByteArrayDataSource;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.io.File;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName EmailInUtil
|
* @ClassName EmailInUtil
|
||||||
@@ -48,10 +49,12 @@ public class EmailOutUtil {
|
|||||||
// private static String fromOut;
|
// private static String fromOut;
|
||||||
@Value("${spring.mail.host}")
|
@Value("${spring.mail.host}")
|
||||||
private String hostOut;
|
private String hostOut;
|
||||||
@Value("${spring.mail.username}")
|
// @Value("${spring.mail.username}")
|
||||||
private String usernameOut;
|
// private String usernameOut;
|
||||||
@Value("${spring.mail.password}")
|
private String usernameOut="wq18792927508@163.com";
|
||||||
private String passwordOut;
|
// @Value("${spring.mail.password}")
|
||||||
|
// private String passwordOut;
|
||||||
|
private String passwordOut= "WDFHKSEMCKVRELEA";
|
||||||
@Value("${spring.mail.port}")
|
@Value("${spring.mail.port}")
|
||||||
private Integer portOut;
|
private Integer portOut;
|
||||||
|
|
||||||
@@ -98,6 +101,7 @@ public class EmailOutUtil {
|
|||||||
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
|
String messageContent = "<html><body><p style=\"font-family: Arial, sans-serif; font-size: 18px;\">"+message+"。</p></body></html>";
|
||||||
MimeBodyPart messageBodyPart = new MimeBodyPart();
|
MimeBodyPart messageBodyPart = new MimeBodyPart();
|
||||||
messageBodyPart.setContent(messageContent, "text/html;charset=utf-8");
|
messageBodyPart.setContent(messageContent, "text/html;charset=utf-8");
|
||||||
|
messageBodyPart.setContentID(UUID.randomUUID().toString());
|
||||||
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
|
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
|
||||||
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
|
final String SSL_FACTORY = "javax.net.ssl.SSLSocketFactory";
|
||||||
//设置邮件会话参数
|
//设置邮件会话参数
|
||||||
@@ -269,4 +273,164 @@ public class EmailOutUtil {
|
|||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
public void buildReceiveConnect() throws Exception {
|
||||||
|
|
||||||
|
//POP3主机名
|
||||||
|
String host = "pop3.163.com";
|
||||||
|
//设置传输协议
|
||||||
|
String protocol = "pop3";
|
||||||
|
//用户账号
|
||||||
|
String username = "wq18792927508@163.com";
|
||||||
|
//密码或者授权码
|
||||||
|
String password = "WDFHKSEMCKVRELEA";
|
||||||
|
/*
|
||||||
|
* 获取Session
|
||||||
|
*/
|
||||||
|
Properties props = new Properties();
|
||||||
|
//协议
|
||||||
|
props.setProperty("mail.store.protocol", protocol);
|
||||||
|
//POP3主机名
|
||||||
|
props.setProperty("mail.pop3.host", host);
|
||||||
|
props.setProperty("mail.smtp.auth", "true");
|
||||||
|
props.setProperty("mail.pop3.default-encoding", "UTF-8");
|
||||||
|
Session session = Session.getDefaultInstance(props, new Authenticator() {
|
||||||
|
@Override
|
||||||
|
protected PasswordAuthentication getPasswordAuthentication() {
|
||||||
|
return new PasswordAuthentication(usernameOut, passwordOut);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
URLName urlName = new URLName(protocol, host, 110, null, username, password);
|
||||||
|
Store store = session.getStore(urlName);
|
||||||
|
store.connect(username, password);
|
||||||
|
|
||||||
|
|
||||||
|
Folder folder = store.getFolder("INBOX");
|
||||||
|
|
||||||
|
folder.open(Folder.READ_ONLY);
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 接收邮件
|
||||||
|
*/
|
||||||
|
public List<String> receiverMail() {
|
||||||
|
List<String> messageIds=new ArrayList<>();
|
||||||
|
|
||||||
|
// session.setDebug(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
//POP3主机名
|
||||||
|
String host = "pop3.163.com";
|
||||||
|
//设置传输协议
|
||||||
|
String protocol = "pop3";
|
||||||
|
//用户账号
|
||||||
|
String username = "wq18792927508@163.com";
|
||||||
|
//密码或者授权码
|
||||||
|
String password = "WDFHKSEMCKVRELEA";
|
||||||
|
/*
|
||||||
|
* 获取Session
|
||||||
|
*/
|
||||||
|
Properties props = new Properties();
|
||||||
|
//协议
|
||||||
|
props.setProperty("mail.store.protocol", protocol);
|
||||||
|
//POP3主机名
|
||||||
|
props.setProperty("mail.pop3.host", host);
|
||||||
|
props.setProperty("mail.smtp.auth", "true");
|
||||||
|
props.setProperty("mail.pop3.default-encoding", "UTF-8");
|
||||||
|
Session session = Session.getDefaultInstance(props, new Authenticator() {
|
||||||
|
@Override
|
||||||
|
protected PasswordAuthentication getPasswordAuthentication() {
|
||||||
|
return new PasswordAuthentication(usernameOut, passwordOut);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
URLName urlName = new URLName(protocol, host, 110, null, username, password);
|
||||||
|
Store store = session.getStore(urlName);
|
||||||
|
store.connect(username, password);
|
||||||
|
|
||||||
|
|
||||||
|
Folder folder = store.getFolder("INBOX");
|
||||||
|
folder.open(Folder.READ_ONLY);
|
||||||
|
SearchTerm orTerm = new SubjectTerm("退信");
|
||||||
|
// Message[] messages = folder.search(orTerm);
|
||||||
|
Date endTime= new Date();
|
||||||
|
long oneDayMillis=24*60*60*1000L;
|
||||||
|
Date startTime=new Date(endTime.getTime()-oneDayMillis);
|
||||||
|
// SearchTerm comparisonTermGe = new SentDateTerm(ComparisonTerm.GE, startTime);
|
||||||
|
// SearchTerm comparisonTermLe = new SentDateTerm(ComparisonTerm.LE, endTime);
|
||||||
|
// SearchTerm comparisonAndTerm = new AndTerm(comparisonTermGe, comparisonTermLe);
|
||||||
|
// SearchTerm searchTerm = new AndTerm(comparisonAndTerm, orTerm);
|
||||||
|
Message[] messages = folder.search(orTerm);
|
||||||
|
if (messages != null) {
|
||||||
|
|
||||||
|
Arrays.stream(messages).forEach(message -> {
|
||||||
|
String messageId="";
|
||||||
|
try {
|
||||||
|
messageId = EmailUtil.getMessageId(message,session);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
messageIds.add(messageId);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
folder.close(false);
|
||||||
|
store.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return messageIds;
|
||||||
|
}
|
||||||
|
return messageIds;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void analyseMail(Session session, Object content) throws Exception {
|
||||||
|
|
||||||
|
if (content instanceof Multipart) {
|
||||||
|
Multipart multipart = (Multipart) content;
|
||||||
|
for (int i = 0; i < multipart.getCount(); i++) {
|
||||||
|
BodyPart bodyPart = multipart.getBodyPart(i);
|
||||||
|
// if (bodyPart.isMimeType("message/rfc822")) { if(bodyPart.getContentType().startsWith("Message/Rfc822"));
|
||||||
|
// MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
|
||||||
|
// }
|
||||||
|
if(bodyPart.isMimeType("Message/Rfc822")){
|
||||||
|
MimeMessage mimeMessage = new MimeMessage(session, bodyPart.getInputStream());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static String getMessageId(Part part) throws Exception {
|
||||||
|
if (!part.isMimeType("multipart/*")) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
Multipart multipart = (Multipart) part.getContent();
|
||||||
|
for (int i = 0; i < multipart.getCount(); i++) {
|
||||||
|
BodyPart bodyPart = multipart.getBodyPart(i);
|
||||||
|
|
||||||
|
if (part.isMimeType("message/rfc822")) {
|
||||||
|
return getMessageId((Part) part.getContent());
|
||||||
|
}
|
||||||
|
InputStream inputStream = bodyPart.getInputStream();
|
||||||
|
|
||||||
|
try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream))) {
|
||||||
|
String strLine;
|
||||||
|
while ((strLine = br.readLine()) != null) {
|
||||||
|
if (strLine.startsWith("Message_Id:")) {
|
||||||
|
String[] split = strLine.split("Message_Id:");
|
||||||
|
return split.length > 1 ? split[1].trim() : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//检查退信邮件
|
||||||
|
// Folder folder = ...; //打开收件箱
|
||||||
|
// Message[] messages = folder.getMessages();
|
||||||
|
// for (Message message : messages) {
|
||||||
|
// if (message.getSubject().contains("Delivery Status Notification")) {
|
||||||
|
// System.out.println("Delivery failed for recipient: " + message.getRecipients()[0]);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StringIdsReq {
|
||||||
|
private List<String> ids;
|
||||||
|
/**
|
||||||
|
* 签署人账号(即仲裁员手机号)
|
||||||
|
*/
|
||||||
|
private String psnAccount;
|
||||||
|
/**
|
||||||
|
* 签署人id
|
||||||
|
*/
|
||||||
|
private String psnId ;
|
||||||
|
/**
|
||||||
|
* 机构账户
|
||||||
|
*/
|
||||||
|
private String orgId ;
|
||||||
|
}
|
||||||
@@ -408,4 +408,10 @@ public class CaseApplication extends BaseEntity {
|
|||||||
* 自定义字段
|
* 自定义字段
|
||||||
*/
|
*/
|
||||||
private List<ColumnValue> columnValues;
|
private List<ColumnValue> columnValues;
|
||||||
|
/**
|
||||||
|
* 待办状态,0待办,1已办
|
||||||
|
*/
|
||||||
|
private Integer pendingStatus;
|
||||||
|
/** e签宝流程id */
|
||||||
|
private String signFlowId;;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.domain;
|
package com.ruoyi.wisdomarbitrate.domain;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class SealSignRecord extends BaseEntity {
|
public class SealSignRecord extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -25,15 +31,6 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
private String orgnizeNamepsnName;
|
private String orgnizeNamepsnName;
|
||||||
|
|
||||||
String fileDownloadUrl;
|
String fileDownloadUrl;
|
||||||
|
|
||||||
public String getFileDownloadUrl() {
|
|
||||||
return fileDownloadUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileDownloadUrl(String fileDownloadUrl) {
|
|
||||||
this.fileDownloadUrl = fileDownloadUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 流程状态 */
|
/** 流程状态 */
|
||||||
private Integer signFlowStatus;
|
private Integer signFlowStatus;
|
||||||
/** 签名状态 */
|
/** 签名状态 */
|
||||||
@@ -44,171 +41,11 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
/** 签名链接 */
|
/** 签名链接 */
|
||||||
private String signUrl;
|
private String signUrl;
|
||||||
|
|
||||||
public String getSignUrl() {
|
|
||||||
return signUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSignUrl(String signUrl) {
|
|
||||||
this.signUrl = signUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSealUrl() {
|
|
||||||
return sealUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSealUrl(String sealUrl) {
|
|
||||||
this.sealUrl = sealUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 用印链接 */
|
/** 用印链接 */
|
||||||
private String sealUrl;
|
private String sealUrl;
|
||||||
|
|
||||||
private Long caseAppliId;
|
private Long caseAppliId;
|
||||||
|
|
||||||
public Long getCaseAppliId() {
|
|
||||||
return caseAppliId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCaseAppliId(Long caseAppliId) {
|
|
||||||
this.caseAppliId = caseAppliId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPsnsignStatus() {
|
|
||||||
return psnsignStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPsnsignStatus(Integer psnsignStatus) {
|
|
||||||
this.psnsignStatus = psnsignStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOrgsignStatus() {
|
|
||||||
return orgsignStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgsignStatus(Integer orgsignStatus) {
|
|
||||||
this.orgsignStatus = orgsignStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSignFlowStatus() {
|
|
||||||
return signFlowStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSignFlowStatus(Integer signFlowStatus) {
|
|
||||||
this.signFlowStatus = signFlowStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFileid() {
|
|
||||||
return fileid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFileid(String fileid) {
|
|
||||||
this.fileid = fileid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getFilename() {
|
|
||||||
return filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFilename(String filename) {
|
|
||||||
this.filename = filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSignFlowid() {
|
|
||||||
return signFlowid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSignFlowid(String signFlowid) {
|
|
||||||
this.signFlowid = signFlowid;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPensonAccount() {
|
|
||||||
return pensonAccount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPensonAccount(String pensonAccount) {
|
|
||||||
this.pensonAccount = pensonAccount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPensonName() {
|
|
||||||
return pensonName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPensonName(String pensonName) {
|
|
||||||
this.pensonName = pensonName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrgnizeName() {
|
|
||||||
return orgnizeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgnizeName(String orgnizeName) {
|
|
||||||
this.orgnizeName = orgnizeName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrgnizeNamePsnAccount() {
|
|
||||||
return orgnizeNamePsnAccount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgnizeNamePsnAccount(String orgnizeNamePsnAccount) {
|
|
||||||
this.orgnizeNamePsnAccount = orgnizeNamePsnAccount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOrgnizeNamepsnName() {
|
|
||||||
return orgnizeNamepsnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOrgnizeNamepsnName(String orgnizeNamepsnName) {
|
|
||||||
this.orgnizeNamepsnName = orgnizeNamepsnName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPositionPagepsn() {
|
|
||||||
return positionPagepsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionPagepsn(String positionPagepsn) {
|
|
||||||
this.positionPagepsn = positionPagepsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getPositionXpsn() {
|
|
||||||
return positionXpsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionXpsn(double positionXpsn) {
|
|
||||||
this.positionXpsn = positionXpsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getPositionYpsn() {
|
|
||||||
return positionYpsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionYpsn(double positionYpsn) {
|
|
||||||
this.positionYpsn = positionYpsn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getPositionPageorg() {
|
|
||||||
return positionPageorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionPageorg(String positionPageorg) {
|
|
||||||
this.positionPageorg = positionPageorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getPositionXorg() {
|
|
||||||
return positionXorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionXorg(double positionXorg) {
|
|
||||||
this.positionXorg = positionXorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public double getPositionYorg() {
|
|
||||||
return positionYorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPositionYorg(double positionYorg) {
|
|
||||||
this.positionYorg = positionYorg;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 签名位置页数 */
|
/** 签名位置页数 */
|
||||||
private String positionPagepsn;
|
private String positionPagepsn;
|
||||||
/** 签名位置x坐标 */
|
/** 签名位置x坐标 */
|
||||||
@@ -223,13 +60,5 @@ public class SealSignRecord extends BaseEntity {
|
|||||||
private double positionYorg;
|
private double positionYorg;
|
||||||
|
|
||||||
|
|
||||||
public Long getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Long id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-1
@@ -38,7 +38,7 @@ public interface CaseApplicationLogMapper {
|
|||||||
Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
|
Integer selectMaxVersionBySecret(@Param("caseAppliId")Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据案件id删除案件记录表和案件关联人日志表
|
* 删除日志
|
||||||
* @param ids
|
* @param ids
|
||||||
*/
|
*/
|
||||||
void batchDeleteLog(@Param("ids") List<Long> ids);
|
void batchDeleteLog(@Param("ids") List<Long> ids);
|
||||||
@@ -46,4 +46,11 @@ public interface CaseApplicationLogMapper {
|
|||||||
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
|
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
|
||||||
|
|
||||||
Integer batchSave(@Param("list")List<CaseApplication> caseApplications);
|
Integer batchSave(@Param("list")List<CaseApplication> caseApplications);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件id查询所有的日志id
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Long> selectLogsByCaseIds(@Param("ids")List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,29 @@ package com.ruoyi.wisdomarbitrate.mapper;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface SealSignRecordMapper {
|
public interface SealSignRecordMapper {
|
||||||
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
|
List<SealSignRecord> selectSealSignRecord(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询已签署和签署中的文件
|
||||||
|
* @param sealSignRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
|
List<SealSignRecord> selectSealSignRecordbyStat(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 差询等待签署,签署中的案件
|
||||||
|
* @param penSonAccount 签署人员
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CaseApplication> selectSealSigning(@Param("penSonAccount") String penSonAccount, @Param("caseStatus") Integer caseStatus);
|
||||||
|
|
||||||
int updataSealSignRecord(SealSignRecord sealSignRecord);
|
int updataSealSignRecord(SealSignRecord sealSignRecord);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+18
@@ -1,8 +1,10 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service;
|
package com.ruoyi.wisdomarbitrate.service;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.BatchCaseApplication;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -39,4 +41,20 @@ public interface IAdjudicationService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult batchDocument(List<Long> ids);
|
AjaxResult batchDocument(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据签署流程id查询批量签名链接
|
||||||
|
* @param idsReq
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SealSignRecord selectBatchSignUrl( StringIdsReq idsReq);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据仲裁员手机号分页查询等待签署,签署中的裁决书
|
||||||
|
* @param personAccount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<CaseApplication> selectSealSigning(String personAccount,Integer caseStatus);
|
||||||
|
|
||||||
|
SealSignRecord selectBatchSealUrl(StringIdsReq idsReq);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -135,4 +135,5 @@ public interface ICaseApplicationService {
|
|||||||
AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
|
AjaxResult editCaseApplicationDefineval(CaseApplication caseApplication);
|
||||||
|
|
||||||
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
|
CaseAttach downloadCaseZipFile(CaseApplication caseApplication);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -6,13 +6,15 @@ import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CaseConfirmPayDTO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
import com.ruoyi.wisdomarbitrate.domain.dto.CasePayDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ICasePaymentService {
|
public interface ICasePaymentService {
|
||||||
/**
|
/**
|
||||||
* 案件缴费
|
* 案件缴费
|
||||||
*/
|
*/
|
||||||
AjaxResult casePay(CasePayDTO casePayDTO);
|
AjaxResult casePay(CasePayDTO casePayDTO);
|
||||||
|
|
||||||
AjaxResult confirmPayment(CaseApplication caseApplication);
|
AjaxResult confirmPayment( List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认缴费
|
* 确认缴费
|
||||||
|
|||||||
+219
-62
@@ -5,15 +5,21 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.deepoove.poi.data.PictureRenderData;
|
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.constant.CaseApplicationConstants;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
|
import com.ruoyi.common.exception.EsignDemoException;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.*;
|
import com.ruoyi.common.utils.*;
|
||||||
import com.ruoyi.common.utils.thread.MultipleThreadListParam;
|
import com.ruoyi.common.utils.thread.MultipleThreadListParam;
|
||||||
import com.ruoyi.common.utils.thread.MultipleThreadWorkUtil;
|
import com.ruoyi.common.utils.thread.MultipleThreadWorkUtil;
|
||||||
import com.ruoyi.system.mapper.SysDictDataMapper;
|
import com.ruoyi.system.mapper.SysDictDataMapper;
|
||||||
|
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||||
@@ -24,6 +30,7 @@ import com.ruoyi.wisdomarbitrate.domain.vo.LogisticsInfoVO;
|
|||||||
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
import com.ruoyi.wisdomarbitrate.service.IAdjudicationService;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseApplicationService;
|
||||||
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
|
import com.ruoyi.wisdomarbitrate.service.ICaseLogRecordService;
|
||||||
|
import com.ruoyi.wisdomarbitrate.utils.SignAward;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.poi.ss.usermodel.Sheet;
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
@@ -57,6 +64,7 @@ import java.util.regex.Matcher;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -92,9 +100,14 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
private FatchRuleMapper fatchRuleMapper;
|
private FatchRuleMapper fatchRuleMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDictDataMapper dictDataMapper;
|
private SysDictDataMapper dictDataMapper;
|
||||||
|
@Autowired
|
||||||
|
private SealManageMapper sealManageMapper;
|
||||||
|
@Autowired
|
||||||
|
private SealSignRecordMapper sealSignRecordMapper;
|
||||||
|
|
||||||
|
|
||||||
// 仲裁反请求模板内容
|
// 仲裁反请求模板内容
|
||||||
private final String counterclaim= "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
|
private final String counterclaim = "在《2022年版仲裁规则》第十八条第(一)项规定的期限内,被申请人向秘书处提交了" +
|
||||||
"《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
|
"《仲裁反请求申请书》及证据材料。仲裁委依据《2022年版仲裁规则》第十八条的规定受理了该仲裁反请求案申请。" +
|
||||||
"仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
|
"仲裁反请求案件受理后,秘书处向被申请人发送了仲裁反请求通知书及附件,向申请人发送了仲裁反请求通知书及附件、仲裁反请求申请书及附件。";
|
||||||
// 财产保全内容
|
// 财产保全内容
|
||||||
@@ -104,36 +117,37 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《管辖异议申请书》,认为" +
|
String jurisdictionalObjection = "本案受理后,被申请人向仲裁委提交了《管辖异议申请书》,认为" +
|
||||||
",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
|
",仲裁委经审理,当庭驳回了被申请人的管辖异议申请,并告知被申请人具体的事实和理由将在裁决书中一并列明。";
|
||||||
// 线上开庭时+线上仲裁
|
// 线上开庭时+线上仲裁
|
||||||
String onLineDate="{{onLineDate}}";
|
String onLineDate = "{{onLineDate}}";
|
||||||
String onLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于"+onLineDate+"通过仲裁委智慧仲裁平台开庭审理了本案。";
|
String onLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于" + onLineDate + "通过仲裁委智慧仲裁平台开庭审理了本案。";
|
||||||
// 开庭+线下仲裁
|
// 开庭+线下仲裁
|
||||||
String offLineDate="{{offLineDate}}";
|
String offLineDate = "{{offLineDate}}";
|
||||||
String offLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于 "+offLineDate+"在仲裁委所在地开庭审理了本案。";
|
String offLine = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于 " + offLineDate + "在仲裁委所在地开庭审理了本案。";
|
||||||
//书面仲裁时
|
//书面仲裁时
|
||||||
String writtenDate="{{writtenDate}}";
|
String writtenDate = "{{writtenDate}}";
|
||||||
String written = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于"+writtenDate+"在仲裁委所在地开庭审理了本案。仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,根据《2022年版仲裁规则》第五十八条的规定对本案进行了书面审理。 ";
|
String written = "仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,于" + writtenDate + "在仲裁委所在地开庭审理了本案。仲裁庭审阅了申请人提交的仲裁申请书、证据材料后,根据《2022年版仲裁规则》第五十八条的规定对本案进行了书面审理。 ";
|
||||||
//开庭+缺席审理
|
//开庭+缺席审理
|
||||||
String absent = "申请人的特别授权委托代理人{{agentName}}"+"出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
|
String absent = "申请人的特别授权委托代理人{{agentName}}" + "出席了庭审。被申请人经依法送达开庭通知,无正当理由未出席庭审,故仲裁庭依据" +
|
||||||
"《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明,\" +\n" +
|
"《2022年版仲裁规则》第四十条第(二)项的规定,对本案进行了缺席审理。庭审中,申请人陈述了仲裁请求事项及事实与理由,出示了证据材料并进行了说明,\" +\n" +
|
||||||
" \"发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。"+"综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
|
" \"发表了意见,回答了仲裁庭的提问,并作了最后陈述。因被申请人缺席庭审,故仲裁庭无法组织调解。" + "综上,仲裁庭依据《上海仲裁委员会仲裁规则》(2022年7月1日起施行的版本)" +
|
||||||
"第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
|
"第四十条第(二)项、第五十一条的规定,缺席裁决如下:";
|
||||||
// 开庭+出席
|
// 开庭+出席
|
||||||
String attend="申请人的特别授权委托代理人{{agentName}}和被申请人本人出席了庭审。 ";
|
String attend = "申请人的特别授权委托代理人{{agentName}}和被申请人本人出席了庭审。 ";
|
||||||
// 开庭+出席+被申提供证据
|
// 开庭+出席+被申提供证据
|
||||||
String onLineAttendFile="庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;双方当事人均出示了证据材料并对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
|
String onLineAttendFile = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;双方当事人均出示了证据材料并对对方的证据材料进行了质证;双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
|
||||||
// 开庭+出席+被申未提供证据
|
// 开庭+出席+被申未提供证据
|
||||||
String onLineAttend="庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;申请人出示了证据材料,被申请人对对方的证据材料进行了质证; 双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
|
String onLineAttend = "庭审中,申请人陈述了仲裁请求事项及所依据的事实与理由,被申请人进行了答辩;申请人出示了证据材料,被申请人对对方的证据材料进行了质证; 双方当事人均回答了仲裁庭的提问,进行了辩论,并分别作了最后陈述。双方当事人在仲裁庭的主持下进行了调解,但未能达成调解协议。 ";
|
||||||
// 被申请人出席答辩意见
|
// 被申请人出席答辩意见
|
||||||
String resAttendOpinion="\n(二)被申请人的答辩意见 \n(三)当事人提供的证据材料及对方的质证意见\n" +
|
String resAttendOpinion = "\n(二)被申请人的答辩意见 \n(三)当事人提供的证据材料及对方的质证意见\n" +
|
||||||
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}\n被申请人对上述材料的质证意见为:{{respondentOpinion}}\n";
|
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}\n被申请人对上述材料的质证意见为:{{respondentOpinion}}\n";
|
||||||
// 被申请人出席+被申请人提供了资料
|
// 被申请人出席+被申请人提供了资料
|
||||||
String resFile="被申请人向仲裁庭提交了如下证据材料:\n{{resFile}}" +
|
String resFile = "被申请人向仲裁庭提交了如下证据材料:\n{{resFile}}" +
|
||||||
"申请人对上述材料的质证意见为:{{applicantOpinion}}";
|
"申请人对上述材料的质证意见为:{{applicantOpinion}}";
|
||||||
// 被申请人缺席
|
// 被申请人缺席
|
||||||
String resAbsent="(二)当事人提供的证据材料\n" +
|
String resAbsent = "(二)当事人提供的证据材料\n" +
|
||||||
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}";
|
"申请人为证明其主张的事实和理由,向仲裁庭提交了如下证据材料:\n{{applicantFile}}";
|
||||||
// 日期格式化年月日
|
// 日期格式化年月日
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult createDocument(CaseApplication caseApplicationReq) {
|
public AjaxResult createDocument(CaseApplication caseApplicationReq) {
|
||||||
@@ -161,13 +175,13 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
return AjaxResult.error("请先指定裁决书模板");
|
return AjaxResult.error("请先指定裁决书模板");
|
||||||
}
|
}
|
||||||
templatePath = templateManages.get(0).getTemOrigPath();
|
templatePath = templateManages.get(0).getTemOrigPath();
|
||||||
if(StrUtil.isEmpty(templatePath)){
|
if (StrUtil.isEmpty(templatePath)) {
|
||||||
return AjaxResult.error("未找到该模板");
|
return AjaxResult.error("未找到该模板");
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo 部署放开
|
// todo 部署放开
|
||||||
if(templatePath!=null){
|
if (templatePath != null) {
|
||||||
templatePath="/home/ruoyi/" +templatePath;
|
templatePath = "/home/ruoyi/" + templatePath;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
File file = new File(templatePath);
|
File file = new File(templatePath);
|
||||||
@@ -198,7 +212,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
|
fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
|
||||||
}
|
}
|
||||||
// 自定义字段,从columnValue值取
|
// 自定义字段,从columnValue值取
|
||||||
if (fatchRuleMap.size()>0&&fatchRuleMap.containsKey(1)) {
|
if (fatchRuleMap.size() > 0 && fatchRuleMap.containsKey(1)) {
|
||||||
// 根据案件id查询key-value表
|
// 根据案件id查询key-value表
|
||||||
List<ColumnValue> columnValueList = columnValueMapper.listByCaseId(caseApplicationReq.getId());
|
List<ColumnValue> columnValueList = columnValueMapper.listByCaseId(caseApplicationReq.getId());
|
||||||
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
||||||
@@ -206,7 +220,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 组装内置字段,在主表中查出内容
|
// 组装内置字段,在主表中查出内容
|
||||||
buildDefaultColumnValue(dictDataList,caseAffiliates,valueMap,caseApplicationById);
|
buildDefaultColumnValue(dictDataList, caseAffiliates, valueMap, caseApplicationById);
|
||||||
|
|
||||||
// 获取模板中的占位符key
|
// 获取模板中的占位符key
|
||||||
List<String> bookmarkList = getBookmarkByDocx(templatePath);
|
List<String> bookmarkList = getBookmarkByDocx(templatePath);
|
||||||
@@ -214,9 +228,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
return AjaxResult.success("请检查模板是否配置正确,未获取到占位符");
|
return AjaxResult.success("请检查模板是否配置正确,未获取到占位符");
|
||||||
}
|
}
|
||||||
// 遍历书签,给书签赋值
|
// 遍历书签,给书签赋值
|
||||||
replaceBookmark(bookmarkList,datas,valueMap);
|
replaceBookmark(bookmarkList, datas, valueMap);
|
||||||
// 根据条件替换书签
|
// 根据条件替换书签
|
||||||
conditionReplaceBookmark(caseApplicationById,datas,agentName,resName,arbitrateRecordSelect);
|
conditionReplaceBookmark(caseApplicationById, datas, agentName, resName, arbitrateRecordSelect);
|
||||||
// 裁决书生成时间
|
// 裁决书生成时间
|
||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
String year = Integer.toString(now.getYear());
|
String year = Integer.toString(now.getYear());
|
||||||
@@ -226,7 +240,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
// 裁决书编号
|
// 裁决书编号
|
||||||
datas.put("裁决书编号", equipmentNo);
|
datas.put("裁决书编号", equipmentNo);
|
||||||
// 仲裁费
|
// 仲裁费
|
||||||
datas.put("仲裁费", caseApplicationById.getFeePayable().toString());
|
datas.put("仲裁费", caseApplicationById.getFeePayable() != null ? caseApplicationById.getFeePayable().toString() : "");
|
||||||
// 案件创建时间
|
// 案件创建时间
|
||||||
Date createTime = caseApplicationById.getCreateTime();
|
Date createTime = caseApplicationById.getCreateTime();
|
||||||
// 将日期格式化为字符串
|
// 将日期格式化为字符串
|
||||||
@@ -248,7 +262,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
String saveName = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
// String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
// String saveName = "D:/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||||
// 将word中的标签替换掉,生成新的word
|
// 将word中的标签替换掉,生成新的word
|
||||||
String docFilePath = wordChangeText(templatePath,datas,saveFolderPath,fileName);
|
String docFilePath = wordChangeText(templatePath, datas, saveFolderPath, fileName);
|
||||||
|
|
||||||
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
String savePath = docFilePath.substring(0, docFilePath.indexOf("/upload/") + 8);
|
||||||
// 保存裁决书附件
|
// 保存裁决书附件
|
||||||
@@ -262,6 +276,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 将word中的标签替换掉,生成新的word
|
* 将word中的标签替换掉,生成新的word
|
||||||
|
*
|
||||||
* @param modalFilePath 裁决书模板路径
|
* @param modalFilePath 裁决书模板路径
|
||||||
* @param datas 替换标签的内容
|
* @param datas 替换标签的内容
|
||||||
* @param saveFolderPath 保存路径
|
* @param saveFolderPath 保存路径
|
||||||
@@ -269,7 +284,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private String wordChangeText(String modalFilePath, Map<String, Object> datas, String saveFolderPath,String fileName) throws IOException {
|
private String wordChangeText(String modalFilePath, Map<String, Object> datas, String saveFolderPath, String fileName) throws IOException {
|
||||||
String resultFilePath = saveFolderPath + "/" + fileName;
|
String resultFilePath = saveFolderPath + "/" + fileName;
|
||||||
// 创建日期目录
|
// 创建日期目录
|
||||||
File saveFolder = new File(saveFolderPath);
|
File saveFolder = new File(saveFolderPath);
|
||||||
@@ -291,13 +306,14 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件判断裁决书中是否需要该内容
|
* 根据条件判断裁决书中是否需要该内容
|
||||||
|
*
|
||||||
* @param caseApplicationById 案件信息
|
* @param caseApplicationById 案件信息
|
||||||
* @param datas 替换标签值
|
* @param datas 替换标签值
|
||||||
* @param agentName 代理人名称
|
* @param agentName 代理人名称
|
||||||
* @param resName 被申请人名称
|
* @param resName 被申请人名称
|
||||||
* @param arbitrateRecordSelect 仲裁记录
|
* @param arbitrateRecordSelect 仲裁记录
|
||||||
*/
|
*/
|
||||||
private void conditionReplaceBookmark(CaseApplication caseApplicationById, Map<String, Object> datas,String agentName,String resName, ArbitrateRecord arbitrateRecordSelect ) {
|
private void conditionReplaceBookmark(CaseApplication caseApplicationById, Map<String, Object> datas, String agentName, String resName, ArbitrateRecord arbitrateRecordSelect) {
|
||||||
// 如果有仲裁反请求,该字段设置值
|
// 如果有仲裁反请求,该字段设置值
|
||||||
Integer adjudicaCounter = caseApplicationById.getAdjudicaCounter();
|
Integer adjudicaCounter = caseApplicationById.getAdjudicaCounter();
|
||||||
if (adjudicaCounter != null && adjudicaCounter == 1) {
|
if (adjudicaCounter != null && adjudicaCounter == 1) {
|
||||||
@@ -344,7 +360,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
// todo 线上仲裁/线下仲裁方式未选择
|
// todo 线上仲裁/线下仲裁方式未选择
|
||||||
//线上开庭时+线上仲裁
|
//线上开庭时+线上仲裁
|
||||||
if (arbitratMethod!=null&&arbitratMethod == 1) {
|
if (arbitratMethod != null && arbitratMethod == 1) {
|
||||||
String replace = onLine.replace(onLineDate, Optional.of(hearDateStr).orElse(""));
|
String replace = onLine.replace(onLineDate, Optional.of(hearDateStr).orElse(""));
|
||||||
datas.put("线上开庭并线上仲裁", replace);
|
datas.put("线上开庭并线上仲裁", replace);
|
||||||
// 所有附件
|
// 所有附件
|
||||||
@@ -418,6 +434,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 给模板中的占位符赋值
|
* 给模板中的占位符赋值
|
||||||
|
*
|
||||||
* @param bookmarkList 书签
|
* @param bookmarkList 书签
|
||||||
* @param datas 书签赋值
|
* @param datas 书签赋值
|
||||||
* @param valueMap 案件内容
|
* @param valueMap 案件内容
|
||||||
@@ -454,6 +471,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 组装案件内置字段值,即主表和相关人员表信息
|
* 组装案件内置字段值,即主表和相关人员表信息
|
||||||
|
*
|
||||||
* @param dictDataList 内置字段
|
* @param dictDataList 内置字段
|
||||||
* @param caseAffiliates 关联人员
|
* @param caseAffiliates 关联人员
|
||||||
* @param valueMap 组装的值
|
* @param valueMap 组装的值
|
||||||
@@ -479,6 +497,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
case "被申请人住所":
|
case "被申请人住所":
|
||||||
valueMap.put(dictData.getDictLabel(), affiliate.getResidenAffili());
|
valueMap.put(dictData.getDictLabel(), affiliate.getResidenAffili());
|
||||||
break;
|
break;
|
||||||
|
case "被申请人联系地址":
|
||||||
|
valueMap.put(dictData.getDictLabel(), affiliate.getContactAddress());
|
||||||
|
break;
|
||||||
case "被申请人联系电话":
|
case "被申请人联系电话":
|
||||||
valueMap.put(dictData.getDictLabel(), affiliate.getContactTelphone());
|
valueMap.put(dictData.getDictLabel(), affiliate.getContactTelphone());
|
||||||
break;
|
break;
|
||||||
@@ -486,14 +507,12 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
valueMap.put(dictData.getDictLabel(), affiliate.getEmail());
|
valueMap.put(dictData.getDictLabel(), affiliate.getEmail());
|
||||||
break;
|
break;
|
||||||
case "被申请人性别":
|
case "被申请人性别":
|
||||||
if (dictData.getDictLabel().equals("被申请人性别")) {
|
|
||||||
String responSex = affiliate.getResponSex();
|
String responSex = affiliate.getResponSex();
|
||||||
if (responSex.equals("0")) {
|
if (responSex.equals("0")) {
|
||||||
valueMap.put(dictData.getDictLabel(), "男");
|
valueMap.put(dictData.getDictLabel(), "男");
|
||||||
} else {
|
} else {
|
||||||
valueMap.put(dictData.getDictLabel(), "女");
|
valueMap.put(dictData.getDictLabel(), "女");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "被申请人出生年月日":
|
case "被申请人出生年月日":
|
||||||
Date responBirth = affiliate.getResponBirth();
|
Date responBirth = affiliate.getResponBirth();
|
||||||
@@ -545,10 +564,10 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
|
valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
|
valueMap.put(dictData.getDictLabel(), ObjectFieldUtils.getValue(caseApplication, dictData.getDictValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,6 +577,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存裁决书附件
|
* 保存裁决书附件
|
||||||
|
*
|
||||||
* @param id 案件id
|
* @param id 案件id
|
||||||
* @param saveName 保存的文件名
|
* @param saveName 保存的文件名
|
||||||
* @param savePath 保存路径
|
* @param savePath 保存路径
|
||||||
@@ -771,7 +791,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
int startIndex = prefix.length();
|
int startIndex = prefix.length();
|
||||||
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
||||||
File file = new File(path);
|
File file = new File(path);
|
||||||
if(!file.exists()){
|
// todo 部署放开
|
||||||
|
if (!file.exists()) {
|
||||||
return AjaxResult.error("未生成裁决书");
|
return AjaxResult.error("未生成裁决书");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -798,43 +819,72 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//发送邮件
|
//申请人发送邮件
|
||||||
boolean b = sendCaseEmail(caseApplication1, appEmail, resEmail,caseAttachList);
|
boolean appEmailFlag = sendCaseEmail(caseApplication1, appEmail, caseAttachList);
|
||||||
SendMailRecord sendMailRecord = new SendMailRecord();
|
SendMailRecord sendMailRecord = new SendMailRecord();
|
||||||
sendMailRecord.setCaseId(id);
|
sendMailRecord.setCaseId(id);
|
||||||
sendMailRecord.setMailAddress(appEmail);
|
sendMailRecord.setMailAddress(appEmail);
|
||||||
sendMailRecord.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
sendMailRecord.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
||||||
|
// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||||
sendMailRecord.setMailName("签署后的裁决书");
|
sendMailRecord.setMailName("签署后的裁决书");
|
||||||
sendMailRecord.setSendTime(new Date());
|
sendMailRecord.setSendTime(new Date());
|
||||||
sendMailRecord.setCreateBy(getUsername());
|
sendMailRecord.setCreateBy(getUsername());
|
||||||
if (b) {
|
if (appEmailFlag) {
|
||||||
sendMailRecord.setSendStatus(1);
|
sendMailRecord.setSendStatus(1);
|
||||||
} else {
|
} else {
|
||||||
sendMailRecord.setSendStatus(0);
|
sendMailRecord.setSendStatus(0);
|
||||||
}
|
}
|
||||||
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
sendMailRecordMapper.saveSendMailRecord(sendMailRecord);
|
||||||
|
// 被申请人发送邮件
|
||||||
|
boolean resEmailFlag = sendCaseEmail(caseApplication1, resEmail, caseAttachList);
|
||||||
|
|
||||||
SendMailRecord sendMailRecord1 = new SendMailRecord();
|
SendMailRecord sendMailRecord1 = new SendMailRecord();
|
||||||
sendMailRecord1.setCaseId(id);
|
sendMailRecord1.setCaseId(id);
|
||||||
sendMailRecord1.setMailAddress(resEmail);
|
sendMailRecord1.setMailAddress(resEmail);
|
||||||
|
// sendMailRecord.setMailContent("您好,您的{"+caseApplication1.getCaseNum()+"}案件,审核后的裁决书在附件中请查阅");
|
||||||
sendMailRecord1.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
sendMailRecord1.setMailContent("您好,审核后的裁决书在附件中请查阅");
|
||||||
sendMailRecord1.setMailName("签署后的裁决书");
|
sendMailRecord1.setMailName("签署后的裁决书");
|
||||||
sendMailRecord1.setSendTime(new Date());
|
sendMailRecord1.setSendTime(new Date());
|
||||||
sendMailRecord1.setCreateBy(getUsername());
|
sendMailRecord1.setCreateBy(getUsername());
|
||||||
if (b) {
|
if (resEmailFlag) {
|
||||||
sendMailRecord1.setSendStatus(1);
|
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(CollectionUtil.isNotEmpty(caseAffiliates)) {
|
if (appEmailFlag||resEmailFlag) {
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
request.setTemplateId("1990362");
|
request.setTemplateId("1990362");
|
||||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
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(affiliate.getContactTelphone());
|
request.setPhone(telphone);
|
||||||
// if(affiliate.getIdentityType() == 1) {
|
// if(affiliate.getIdentityType() == 1) {
|
||||||
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
||||||
// }else {
|
// }else {
|
||||||
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
// request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
||||||
// }
|
// }
|
||||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum()});
|
request.setTemplateParamSet(new String[]{affiliate.getName(), caseApplication1.getCaseNum()});
|
||||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||||
|
|
||||||
// 保存短信发送记录
|
// 保存短信发送记录
|
||||||
@@ -850,7 +900,7 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
// }else {
|
// }else {
|
||||||
// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
// smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||||
// }
|
// }
|
||||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。");
|
smsSendRecord.setSendContent("尊敬的" + affiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达,请知晓,如非本人操作,请忽略本短信。");
|
||||||
|
|
||||||
|
|
||||||
smsSendRecord.setCreateBy(getUsername());
|
smsSendRecord.setCreateBy(getUsername());
|
||||||
@@ -866,10 +916,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
|
||||||
sendMailRecord1.setSendStatus(0);
|
|
||||||
}
|
}
|
||||||
sendMailRecordMapper.saveSendMailRecord(sendMailRecord1);
|
|
||||||
|
|
||||||
// 新增日志
|
// 新增日志
|
||||||
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_FILING, "");
|
||||||
@@ -881,10 +929,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
* 通过邮件发送裁决书文件
|
* 通过邮件发送裁决书文件
|
||||||
*
|
*
|
||||||
* @param caseApplication1
|
* @param caseApplication1
|
||||||
* @param appEmail
|
|
||||||
* @param resEmail
|
|
||||||
*/
|
*/
|
||||||
private boolean sendCaseEmail(CaseApplication caseApplication1, String appEmail, String resEmail, List<CaseAttach> caseAttachList) {
|
private boolean sendCaseEmail(CaseApplication caseApplication1, String email, List<CaseAttach> caseAttachList) {
|
||||||
List<File> fileList = new ArrayList<>();
|
List<File> fileList = new ArrayList<>();
|
||||||
File file = null;
|
File file = null;
|
||||||
if (caseAttachList != null && caseAttachList.size() > 0) {
|
if (caseAttachList != null && caseAttachList.size() > 0) {
|
||||||
@@ -894,7 +940,9 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
String prefix = "/profile/upload/";
|
String prefix = "/profile/upload/";
|
||||||
int startIndex = prefix.length();
|
int startIndex = prefix.length();
|
||||||
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
String path = caseAttach.getAnnexPath() + annexName.substring(startIndex);
|
||||||
|
// todo 部署放开
|
||||||
file = new File(path);
|
file = new File(path);
|
||||||
|
// file = new File("D:\\home\\ruoyi\\uploadPath\\upload\\2023\\09\\b10b20d66cfa44df8995c3999e3b6266.pdf");
|
||||||
fileList.add(file);
|
fileList.add(file);
|
||||||
System.out.println("文件长度==================:" + file.length());
|
System.out.println("文件长度==================:" + file.length());
|
||||||
}
|
}
|
||||||
@@ -903,9 +951,19 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
if (file != null && file.exists()) {
|
if (file != null && file.exists()) {
|
||||||
try {
|
try {
|
||||||
Boolean aBoolean = emailOutUtil.sendEmil(appEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
Boolean aBoolean = emailOutUtil.sendEmil(email, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
||||||
Boolean aBoolean1 = emailOutUtil.sendEmil(resEmail, "您好,审核后的裁决书在附件中请查阅", "签署后的裁决书", fileList, null);
|
|
||||||
if (aBoolean && aBoolean1) {
|
// 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<String> messageIds = emailOutUtil.receiverMail();
|
||||||
|
// if (aBoolean&&(CollectionUtil.isEmpty(messageIds)||!messageIds.contains(appUid))) {
|
||||||
|
// return Boolean.TRUE;
|
||||||
|
// }
|
||||||
|
if (aBoolean) {
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -1255,13 +1313,15 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
return AjaxResult.success(bookSendVO);
|
return AjaxResult.success(bookSendVO);
|
||||||
}
|
}
|
||||||
private void setExecList(List<MultipleThreadListParam> execList, List<ColumnValue> columnValueList){
|
|
||||||
if(CollectionUtil.isNotEmpty(columnValueList)){
|
private void setExecList(List<MultipleThreadListParam> execList, List<ColumnValue> columnValueList) {
|
||||||
Function<List<ColumnValue>,Integer> function= columnValueMapper::batchSave;
|
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
||||||
execList.add(new MultipleThreadListParam(function,columnValueList));
|
Function<List<ColumnValue>, Integer> function = columnValueMapper::batchSave;
|
||||||
|
execList.add(new MultipleThreadListParam(function, columnValueList));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult batchDocument(List<Long> ids) {
|
public AjaxResult batchDocument(List<Long> ids) {
|
||||||
@@ -1283,6 +1343,104 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
return AjaxResult.success();
|
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<CaseApplication> selectSealSigning(String personAccount, Integer caseStatus) {
|
||||||
|
return sealSignRecordMapper.selectSealSigning(personAccount, caseStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getNewEquipmentNo() {
|
public String getNewEquipmentNo() {
|
||||||
Object awardNum = redisCache.getCacheObject("awardNum");
|
Object awardNum = redisCache.getCacheObject("awardNum");
|
||||||
if (awardNum == null) {
|
if (awardNum == null) {
|
||||||
@@ -1311,33 +1469,34 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据裁决书模板获取所有的占位符,占位符必须是{{name}}格式
|
* 根据裁决书模板获取所有的占位符,占位符必须是{{name}}格式
|
||||||
|
*
|
||||||
* @param path
|
* @param path
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<String> getBookmarkByDocx(String path){
|
public List<String> getBookmarkByDocx(String path) {
|
||||||
XWPFDocument xwpfDocument = null;
|
XWPFDocument xwpfDocument = null;
|
||||||
try {
|
try {
|
||||||
log.error("path===="+path);
|
log.error("path====" + path);
|
||||||
FileInputStream fileInputStream = new FileInputStream(path);
|
FileInputStream fileInputStream = new FileInputStream(path);
|
||||||
log.error("fileInputStream====");
|
log.error("fileInputStream====");
|
||||||
xwpfDocument = new XWPFDocument(fileInputStream);
|
xwpfDocument = new XWPFDocument(fileInputStream);
|
||||||
log.error("xwpfDocument===="+xwpfDocument);
|
log.error("xwpfDocument====" + xwpfDocument);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if(xwpfDocument==null){
|
if (xwpfDocument == null) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
List<XWPFParagraph> paragraphs = xwpfDocument.getParagraphs();
|
List<XWPFParagraph> paragraphs = xwpfDocument.getParagraphs();
|
||||||
if(CollectionUtil.isEmpty( xwpfDocument.getParagraphs())){
|
if (CollectionUtil.isEmpty(xwpfDocument.getParagraphs())) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
String regex = "\\{\\{.*?\\}\\}"; // 定义占位符的正则表达式
|
String regex = "\\{\\{.*?\\}\\}"; // 定义占位符的正则表达式
|
||||||
Pattern pattern = Pattern.compile(regex);
|
Pattern pattern = Pattern.compile(regex);
|
||||||
List<String> bookmarkList=new ArrayList<>();
|
List<String> bookmarkList = new ArrayList<>();
|
||||||
for (XWPFParagraph paragraph : paragraphs) {
|
for (XWPFParagraph paragraph : paragraphs) {
|
||||||
String text = paragraph.getText();
|
String text = paragraph.getText();
|
||||||
if(StrUtil.isNotEmpty(text)) {
|
if (StrUtil.isNotEmpty(text)) {
|
||||||
Matcher matcher = pattern.matcher(text);
|
Matcher matcher = pattern.matcher(text);
|
||||||
|
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
@@ -1351,6 +1510,4 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+9
-11
@@ -160,11 +160,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 查询登录人身份证号
|
// 查询登录人身份证号
|
||||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||||
startPage();
|
startPage();
|
||||||
// 已办案件
|
|
||||||
if (caseApplication.getSelectCaseStatus().equals("1")) {
|
|
||||||
caseApplication.setLoginUserName(sysUser.getUserName());
|
caseApplication.setLoginUserName(sysUser.getUserName());
|
||||||
return caseApplicationMapper.selectHandledCase(caseApplication);
|
|
||||||
} else { // 待办案件
|
|
||||||
List<SysRole> roles = sysUser.getRoles();
|
List<SysRole> roles = sysUser.getRoles();
|
||||||
// 没有角色不能查看案件列表
|
// 没有角色不能查看案件列表
|
||||||
if (CollectionUtil.isEmpty(roles)) {
|
if (CollectionUtil.isEmpty(roles)) {
|
||||||
@@ -228,7 +224,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||||
// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||||
return caseApplicationMapper.selectCaseApplicationList1(caseApplication);
|
return caseApplicationMapper.selectCaseApplicationList1(caseApplication);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1083,7 +1078,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
caseApplication.setFeePayable(feePayable);
|
caseApplication.setFeePayable(feePayable);
|
||||||
caseApplication.setUpdateBy(getUsername());
|
caseApplication.setUpdateBy(getUsername());
|
||||||
Integer applicantIsWrittenHear = caseApplication.getApplicantIsWrittenHear();
|
Integer applicantIsWrittenHear = caseApplication.getApplicantIsWrittenHear();
|
||||||
if(applicantIsWrittenHear.intValue()==1){
|
if(applicantIsWrittenHear!=null&&applicantIsWrittenHear.intValue()==1){
|
||||||
//书面审理
|
//书面审理
|
||||||
caseApplication.setArbitratMethod(2);
|
caseApplication.setArbitratMethod(2);
|
||||||
}else {
|
}else {
|
||||||
@@ -1396,9 +1391,13 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public int deletecaseApplicationByIds(List<Long> ids) {
|
public int deletecaseApplicationByIds(List<Long> ids) {
|
||||||
|
// 查出所有的日志id
|
||||||
|
List<Long> logIds= caseApplicationLogMapper.selectLogsByCaseIds(ids);
|
||||||
int rows = caseApplicationMapper.batchDeletecaseApplication(ids);
|
int rows = caseApplicationMapper.batchDeletecaseApplication(ids);
|
||||||
caseAffiliateMapper.batchDeletecaseAffiliate(ids);
|
// 删除日志
|
||||||
// caseApplicationLogMapper.batchDeleteLog(ids);
|
if(CollectionUtil.isNotEmpty(logIds)) {
|
||||||
|
caseApplicationLogMapper.batchDeleteLog(logIds);
|
||||||
|
}
|
||||||
return rows;
|
return rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1674,7 +1673,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
|
ArbitrateRecord arbitrateRecord = caseApplication.getArbitrateRecord();
|
||||||
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
arbitrateRecordMapper.updataArbitrateRecord(arbitrateRecord);
|
||||||
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
Integer agreeOrNotCheck = caseApplication.getAgreeOrNotCheck();
|
||||||
if (agreeOrNotCheck.intValue() == 1) {//同意审核
|
if (agreeOrNotCheck!=null&&agreeOrNotCheck.intValue() == 1) {//同意审核
|
||||||
try {
|
try {
|
||||||
//获取当前案件的裁决书
|
//获取当前案件的裁决书
|
||||||
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
CaseApplication caseApplication2 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||||
@@ -2917,8 +2916,7 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId) {
|
public AjaxResult uploadCaseZipFile(MultipartFile file, Long templateId) {
|
||||||
AjaxResult ajaxResult = caseZipImportImpl.zipImport( file, templateId);
|
return caseZipImportImpl.zipImport( file, templateId);
|
||||||
return ajaxResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+31
-11
@@ -79,22 +79,42 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
|
|||||||
//根据案件id查询案件证据材料
|
//根据案件id查询案件证据材料
|
||||||
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
List<CaseAttach> evidenceMaterialList = caseAttachMapper.queryAnnexPathByCaseId(id);
|
||||||
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
|
if (evidenceMaterialList != null && evidenceMaterialList.size() > 0) {
|
||||||
|
// for (CaseAttach caseAttach : evidenceMaterialList) {
|
||||||
|
// //根据附件类型决定返回的路径
|
||||||
|
// Integer annexType = caseAttach.getAnnexType();
|
||||||
|
// if (annexType != 1){
|
||||||
|
// String path = caseAttach.getAnnexName();
|
||||||
|
// String prefix = "/profile";
|
||||||
|
// int startIndex = path.indexOf(prefix);
|
||||||
|
// startIndex += prefix.length();
|
||||||
|
// String extractedPath = "/uploadPath" + path.substring(startIndex);
|
||||||
|
// caseAttach.setAnnexPath(extractedPath);
|
||||||
|
// }else {
|
||||||
|
// String annexPath = caseAttach.getAnnexPath();
|
||||||
|
// String result = annexPath.replace("/home/ruoyi", "");
|
||||||
|
// caseAttach.setAnnexPath(result);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
for (CaseAttach caseAttach : evidenceMaterialList) {
|
for (CaseAttach caseAttach : evidenceMaterialList) {
|
||||||
//根据附件类型决定返回的路径
|
String annexName = caseAttach.getAnnexName();
|
||||||
Integer annexType = caseAttach.getAnnexType();
|
|
||||||
if (annexType != 1){
|
|
||||||
String path = caseAttach.getAnnexName();
|
|
||||||
String prefix = "/profile";
|
String prefix = "/profile";
|
||||||
int startIndex = path.indexOf(prefix);
|
int startIndex = annexName.indexOf(prefix);
|
||||||
|
if(startIndex!=-1) {
|
||||||
startIndex += prefix.length();
|
startIndex += prefix.length();
|
||||||
String extractedPath = "/uploadPath" + path.substring(startIndex);
|
|
||||||
caseAttach.setAnnexPath(extractedPath);
|
String annexPath = "/uploadPath" + annexName.substring(startIndex);
|
||||||
}else {
|
caseAttach.setAnnexPath(annexPath);
|
||||||
String annexPath = caseAttach.getAnnexPath();
|
|
||||||
String result = annexPath.replace("/home/ruoyi", "");
|
|
||||||
caseAttach.setAnnexPath(result);
|
|
||||||
}
|
}
|
||||||
|
int startIndexnew = annexName.lastIndexOf("/");
|
||||||
|
if (startIndexnew != -1) {
|
||||||
|
String annexNamenew = annexName.substring(startIndexnew + 1);
|
||||||
|
caseAttach.setAnnexName(annexNamenew);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
|
caseDetailVO.setEvidenceMaterialList(evidenceMaterialList);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-5
@@ -106,10 +106,12 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public AjaxResult confirmPayment(CaseApplication caseApplication) {
|
public AjaxResult confirmPayment( List<Long> ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(id);
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
|
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_CROSSEXAMI);
|
||||||
int i = caseApplicationMapper.submitCaseApplication(caseApplication);
|
caseApplicationMapper.submitCaseApplication(caseApplication);
|
||||||
if (i > 0) {
|
|
||||||
//发送短信通知
|
//发送短信通知
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
CaseAffiliate caseAffiliate = new CaseAffiliate();
|
||||||
@@ -185,7 +187,8 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.error("暂无需要确认的缴费清单");
|
|
||||||
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -248,7 +251,6 @@ public class CasePaymentServiceImpl implements ICasePaymentService {
|
|||||||
caseApplication.setId(caseId);
|
caseApplication.setId(caseId);
|
||||||
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
|
CaseApplication caseApplication1 = caseApplicationService.selectCaseApplication(caseApplication);
|
||||||
BigDecimal feePayable = caseApplication1.getFeePayable();
|
BigDecimal feePayable = caseApplication1.getFeePayable();
|
||||||
feePayable = feePayable.multiply(new BigDecimal(100));
|
|
||||||
sum = sum.add(feePayable);
|
sum = sum.add(feePayable);
|
||||||
listVO.setTotalFee(sum.intValue());
|
listVO.setTotalFee(sum.intValue());
|
||||||
caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
|
caseApplicationPay.setCaseAppName(caseApplication1.getApplicantName());
|
||||||
|
|||||||
+247
-175
@@ -25,6 +25,7 @@ import com.ruoyi.system.mapper.*;
|
|||||||
import com.ruoyi.wisdomarbitrate.domain.*;
|
import com.ruoyi.wisdomarbitrate.domain.*;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
import com.ruoyi.wisdomarbitrate.domain.vo.ColumnValue;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||||
|
import com.ruoyi.wisdomarbitrate.task.CaseZipImportTask;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.OCRUtils;
|
import com.ruoyi.wisdomarbitrate.utils.OCRUtils;
|
||||||
import com.ruoyi.wisdomarbitrate.utils.UnZipFileUtils;
|
import com.ruoyi.wisdomarbitrate.utils.UnZipFileUtils;
|
||||||
@@ -37,6 +38,8 @@ import java.io.*;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
|
import java.util.concurrent.Future;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@@ -70,8 +73,6 @@ public class CaseZipImportImpl {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysUserRoleMapper userRoleMapper;
|
private SysUserRoleMapper userRoleMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseApplicationLogMapper caseApplicationLogMapper;
|
|
||||||
@Autowired
|
|
||||||
private CaseAffiliateLogMapper caseAffiliateLogMapper;
|
private CaseAffiliateLogMapper caseAffiliateLogMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseAttachLogMapper caseAttachLogMapper;
|
private CaseAttachLogMapper caseAttachLogMapper;
|
||||||
@@ -85,11 +86,14 @@ public class CaseZipImportImpl {
|
|||||||
private ColumnValueLogMapper columnValueLogMapper;
|
private ColumnValueLogMapper columnValueLogMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CaseAffiliateMapper caseAffiliateMapper;
|
private CaseAffiliateMapper caseAffiliateMapper;
|
||||||
|
@Autowired
|
||||||
|
private CaseApplicationLogMapper caseApplicationLogMapper;
|
||||||
// 申请人角色id
|
// 申请人角色id
|
||||||
private long roleId;
|
private long roleId;
|
||||||
private Integer maxCaseNum;
|
private Integer maxCaseNum;
|
||||||
private Integer maxBatchNumber;
|
private Integer maxBatchNumber;
|
||||||
|
|
||||||
|
|
||||||
public AjaxResult zipImport(MultipartFile file, Long templateId) {
|
public AjaxResult zipImport(MultipartFile file, Long templateId) {
|
||||||
UUID uuid = UUID.randomUUID();
|
UUID uuid = UUID.randomUUID();
|
||||||
// todo
|
// todo
|
||||||
@@ -113,51 +117,14 @@ public class CaseZipImportImpl {
|
|||||||
boolean unzipSuccess = UnZipFileUtils.unZipFile(zipFile, targetPath);
|
boolean unzipSuccess = UnZipFileUtils.unZipFile(zipFile, targetPath);
|
||||||
if (!unzipSuccess) {
|
if (!unzipSuccess) {
|
||||||
// 解压失败
|
// 解压失败
|
||||||
return AjaxResult.error("解压失败");
|
throw new ServiceException("解压失败");
|
||||||
}
|
}
|
||||||
// 查询抓取规则
|
// 查询抓取规则
|
||||||
// todo 批次需要再上传压缩包时用户填写
|
// todo 批次需要再上传压缩包时用户填写
|
||||||
List<FatchRule> fatchRuleList = fatchRuleMapper.listByTemplateId(templateId);
|
List<FatchRule> fatchRuleList = fatchRuleMapper.listByTemplateId(templateId);
|
||||||
if (CollectionUtil.isEmpty(fatchRuleList)) {
|
if (CollectionUtil.isEmpty(fatchRuleList)) {
|
||||||
return error("未设置抓取规则");
|
throw new ServiceException("未设置抓取规则");
|
||||||
}
|
}
|
||||||
File directory = new File(targetPath);
|
|
||||||
// fileMap<caseId, List<File>>
|
|
||||||
Map<Long, List<File>> fileMap = findAndConvertPDF(directory);
|
|
||||||
if (fileMap == null || fileMap.size() <= 0) {
|
|
||||||
// 解压失败
|
|
||||||
return AjaxResult.error("未获取到文件");
|
|
||||||
}
|
|
||||||
Map<String, String> fatchMap = new HashMap<>();
|
|
||||||
if (CollectionUtil.isNotEmpty(fatchRuleList)) {
|
|
||||||
|
|
||||||
Map<String, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getFileName));
|
|
||||||
// 根据抓取规则循环抓取
|
|
||||||
fileMap.forEach((key, fileList) -> {
|
|
||||||
if (CollectionUtil.isNotEmpty(fileList)) {
|
|
||||||
for (File caseFile : fileList) {
|
|
||||||
if (fatchRuleMap.containsKey(caseFile.getName())) {
|
|
||||||
// 抓取内容
|
|
||||||
List<FatchRule> fatchRules = fatchRuleMap.get(caseFile.getName());
|
|
||||||
getFatchContentList(caseFile, fatchMap, fatchRules, key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
if (fatchMap.size() <= 0) {
|
|
||||||
return error("从压缩包中未抓取到内容,请检查抓取字段配置");
|
|
||||||
}
|
|
||||||
// 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
|
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
|
||||||
request.setTemplateId("1956159");
|
|
||||||
|
|
||||||
// 新增的案件
|
|
||||||
List<CaseApplication> caseApplications = new ArrayList<>();
|
|
||||||
// 从抓取规则表取字段和字典表取基本字段,字典表的字段名塞到基本表,is_default=1自定义字段塞到columnValue
|
|
||||||
// 抓取规则,0-内置字段,1-自定义字段
|
|
||||||
Map<Integer, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
|
|
||||||
// 在系统表中查询案件内置字段
|
// 在系统表中查询案件内置字段
|
||||||
SysDictData sysDictData = new SysDictData();
|
SysDictData sysDictData = new SysDictData();
|
||||||
sysDictData.setDictType("case_built_type");
|
sysDictData.setDictType("case_built_type");
|
||||||
@@ -170,25 +137,8 @@ public class CaseZipImportImpl {
|
|||||||
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
|
deptMap = deptList.stream().collect(Collectors.toMap(SysDept::getDeptName, SysDept::getDeptId, (oldV, newV) -> newV));
|
||||||
|
|
||||||
}
|
}
|
||||||
// 角色用户
|
|
||||||
List<SysUserRole> userRoleList = new ArrayList<>();
|
|
||||||
// 查询申请人角色id
|
// 查询申请人角色id
|
||||||
roleId = roleMapper.selectRoleIdByName("申请人");
|
roleId = roleMapper.selectRoleIdByName("申请人");
|
||||||
|
|
||||||
// 案件基本信息
|
|
||||||
caseApplications = new ArrayList<>();
|
|
||||||
// 自定义字段,组装columnValue表
|
|
||||||
List<ColumnValue> columnValueList = new ArrayList<>();
|
|
||||||
// 案件人员
|
|
||||||
List<CaseAffiliate> caseAffiliates = new ArrayList<>();
|
|
||||||
// 组装机构
|
|
||||||
List<SysDept> sysDepts = new ArrayList<>();
|
|
||||||
// 案件附件
|
|
||||||
List<CaseAttach> caseAttachs = new ArrayList<>();
|
|
||||||
//发送短信列表
|
|
||||||
List<SmsSendRecord> smsSendRecordList = new ArrayList<>();
|
|
||||||
// 短信记录
|
|
||||||
List<SmsUtils.SendSmsRequest> smsRequestList = new ArrayList<>();
|
|
||||||
/**
|
/**
|
||||||
* 用户表已存在的用户
|
* 用户表已存在的用户
|
||||||
*/
|
*/
|
||||||
@@ -201,17 +151,88 @@ public class CaseZipImportImpl {
|
|||||||
String currentDay = DateUtils.dateTime();
|
String currentDay = DateUtils.dateTime();
|
||||||
String caseNum = "zc" + currentDay;
|
String caseNum = "zc" + currentDay;
|
||||||
maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum, caseNum.length());
|
maxCaseNum = caseApplicationMapper.selectCaseNumLike(caseNum, caseNum.length());
|
||||||
|
// 抓取内容
|
||||||
|
Map<String, String> fatchMap = new HashMap<>();
|
||||||
|
// 从抓取规则表取字段和字典表取基本字段,字典表的字段名塞到基本表,is_default=1自定义字段塞到columnValue
|
||||||
|
// 抓取规则,0-内置字段,1-自定义字段
|
||||||
|
Map<String, List<FatchRule>> fatchRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getFileName));
|
||||||
|
|
||||||
|
File directory = new File(targetPath);
|
||||||
|
if (!directory.exists()) {
|
||||||
|
throw new ServiceException("文件不存在");
|
||||||
|
}
|
||||||
|
// 找出案件文件夹
|
||||||
|
if (!directory.isDirectory() || directory.listFiles() == null) {
|
||||||
|
throw new ServiceException("未找到文件夹");
|
||||||
|
}
|
||||||
|
File[] files = directory.listFiles();
|
||||||
|
CaseZipImportTask caseZipImportTask = new CaseZipImportTask(this, templateId, fatchRuleList, fatchMap, fatchRuleMap, userMap, dictDataList, files , deptMap,SecurityUtils.getLoginUser());
|
||||||
|
Future<List<CaseApplication>> future = ThreadPoolUtil.submit(caseZipImportTask);
|
||||||
|
try {
|
||||||
|
if(future.get()!=null){
|
||||||
|
return success("导入成功");
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (ExecutionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return error("无可导入的案件");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public CaseApplication buildCaseInfo(File file, Long templateId, List<FatchRule> fatchRuleList, Map<String, List<FatchRule>> fatchRuleMap, Map<String, String> fatchMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, Map<String, Long> deptMap,LoginUser loginUser) {
|
||||||
|
// fileMap<caseId, List<File>>
|
||||||
|
Map<String, String> fileMap = findFile(file, fatchRuleList);
|
||||||
|
if (fileMap != null && fileMap.size()> 0) {
|
||||||
|
// 根据抓取规则循环抓取
|
||||||
|
for (Map.Entry<String, List<FatchRule>> entry : fatchRuleMap.entrySet()) {
|
||||||
|
getFatchContent(fileMap, entry.getKey(), fatchMap, entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fatchMap.size() > 0) {
|
||||||
|
|
||||||
|
// 尊敬的{1},您的代理的案件已接入仲裁系统,复制访问https://miniapp-3gpama6l759911ef-1321289474.tcloudbaseapp.com/jump-mp.html 进入小程序进行认证注册。如非本人操作,请忽略本短信
|
||||||
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
|
request.setTemplateId("1956159");
|
||||||
|
|
||||||
|
// 新增的案件
|
||||||
|
// 组装案件内置字段主表内容
|
||||||
|
CaseApplication caseApplication = new CaseApplication();
|
||||||
|
caseApplication.setId(IdWorkerUtil.getId());
|
||||||
|
caseApplication.setTemplateId(templateId);
|
||||||
|
Map<Integer, List<FatchRule>> defaultRuleMap = fatchRuleList.stream().collect(Collectors.groupingBy(FatchRule::getIsDefault));
|
||||||
|
// 自定义字段,组装columnValue表
|
||||||
|
List<ColumnValue> columnValueList = new ArrayList<>();
|
||||||
|
if (defaultRuleMap.size() > 0 && defaultRuleMap.containsKey(1)) {
|
||||||
|
List<FatchRule> columnRules = defaultRuleMap.get(1);
|
||||||
|
columnRules.forEach(columnRule -> {
|
||||||
|
ColumnValue columnValue = new ColumnValue();
|
||||||
|
columnValue.setColumn(columnRule.getColumn());
|
||||||
|
columnValue.setName(columnRule.getColumnName());
|
||||||
|
columnValue.setValue(fatchMap.get(columnRule.getColumnName()));
|
||||||
|
columnValue.setIsDefault(1);
|
||||||
|
columnValue.setCaseId(caseApplication.getId());
|
||||||
|
columnValueList.add(columnValue);
|
||||||
|
});
|
||||||
|
caseApplication.setColumnValues(columnValueList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色用户
|
||||||
|
List<SysUserRole> userRoleList = new ArrayList<>();
|
||||||
|
|
||||||
|
// 组装机构
|
||||||
|
List<SysDept> sysDepts = new ArrayList<>();
|
||||||
|
// 案件附件
|
||||||
|
List<CaseAttach> caseAttachs = new ArrayList<>();
|
||||||
|
//发送短信列表
|
||||||
|
List<SmsSendRecord> smsSendRecordList = new ArrayList<>();
|
||||||
|
// 短信记录
|
||||||
|
List<SmsUtils.SendSmsRequest> smsRequestList = new ArrayList<>();
|
||||||
|
|
||||||
// 需要新增的用户
|
// 需要新增的用户
|
||||||
List<SysUser> addUsers = new ArrayList<>();
|
List<SysUser> addUsers = new ArrayList<>();
|
||||||
for (Long caseId : fileMap.keySet()) {
|
|
||||||
if (CollectionUtil.isEmpty(fileMap.get(caseId))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
CaseApplication caseApplication = new CaseApplication();
|
|
||||||
caseApplications.add(caseApplication);
|
|
||||||
caseApplication.setId(caseId);
|
|
||||||
caseApplication.setTemplateId(templateId);
|
|
||||||
|
|
||||||
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
caseApplication.setCaseStatus(CaseApplicationConstants.CASE_APPLICATION);
|
||||||
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
caseApplication.setCaseLogId(IdWorkerUtil.getId());
|
||||||
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
|
caseApplication.setUpdateSubmitStatus(UpdateSubmitStatus.UNCOMMITTED.getCode());
|
||||||
@@ -231,29 +252,15 @@ public class CaseZipImportImpl {
|
|||||||
// 设置编号
|
// 设置编号
|
||||||
String maxCaseNumStr = generateCaseNum();
|
String maxCaseNumStr = generateCaseNum();
|
||||||
caseApplication.setCaseNum(maxCaseNumStr);
|
caseApplication.setCaseNum(maxCaseNumStr);
|
||||||
caseApplication.setCreateBy(getUsername());
|
caseApplication.setCreateBy(loginUser!=null?loginUser.getUsername():"admin");
|
||||||
caseApplication.setVersion(1);
|
caseApplication.setVersion(1);
|
||||||
// 组装案件内置字段主表内容
|
// 组装案件内置字段主表内容
|
||||||
|
|
||||||
if (fatchRuleMap.size() > 0 && fatchRuleMap.containsKey(1)) {
|
|
||||||
List<FatchRule> columnRules = fatchRuleMap.get(1);
|
|
||||||
columnRules.forEach(columnRule -> {
|
|
||||||
ColumnValue columnValue = new ColumnValue();
|
|
||||||
columnValue.setColumn(columnRule.getColumn());
|
|
||||||
columnValue.setName(columnRule.getColumnName());
|
|
||||||
columnValue.setName(columnRule.getColumnName());
|
|
||||||
columnValue.setValue(fatchMap.get(columnRule.getColumnName() + Constants.PDFSTR + caseId));
|
|
||||||
columnValue.setIsDefault(1);
|
|
||||||
columnValue.setCaseId(caseId);
|
|
||||||
columnValue.setCaseAppliLogId(caseApplication.getCaseLogId());
|
|
||||||
columnValueList.add(columnValue);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
caseApplication.setColumnValues(columnValueList);
|
|
||||||
// 组装内置字段
|
// 组装内置字段
|
||||||
buildDefaultColumn(caseApplication, dictDataList, fatchMap, caseAffiliates, deptMap, sysDepts, userMap, addUsers, userRoleList, smsSendRecordList, smsRequestList);
|
buildDefaultColumn(caseApplication, dictDataList, fatchMap, deptMap, sysDepts, userMap, addUsers, userRoleList, smsSendRecordList, smsRequestList);
|
||||||
for (File caseFile : fileMap.get(caseId)) {
|
// 组装附件
|
||||||
String fileUrl = caseFile.getAbsolutePath();
|
for (Map.Entry<String, String> entry : fileMap.entrySet()) {
|
||||||
|
String fileUrl = entry.getValue();
|
||||||
if (StrUtil.isEmpty(fileUrl)) {
|
if (StrUtil.isEmpty(fileUrl)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -262,7 +269,6 @@ public class CaseZipImportImpl {
|
|||||||
|
|
||||||
CaseAttach caseAttach = new CaseAttach();
|
CaseAttach caseAttach = new CaseAttach();
|
||||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||||
caseAttach.setCaseAppliLogId(caseApplication.getCaseLogId());
|
|
||||||
caseAttach.setAnnexPath(filePath);
|
caseAttach.setAnnexPath(filePath);
|
||||||
if (StrUtil.isNotEmpty(fileUrl)) {
|
if (StrUtil.isNotEmpty(fileUrl)) {
|
||||||
String fileName = fileUrl.replace(filePath, "/profile/upload");
|
String fileName = fileUrl.replace(filePath, "/profile/upload");
|
||||||
@@ -277,82 +283,43 @@ public class CaseZipImportImpl {
|
|||||||
applyFile.setAnnexType(1);
|
applyFile.setAnnexType(1);
|
||||||
caseAttachs.add(applyFile);
|
caseAttachs.add(applyFile);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// 案件压缩包导入
|
|
||||||
caseApplication.setImportFlag(2);
|
|
||||||
// 组装短信
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
caseApplication.setCaseAttachList(caseAttachs);
|
||||||
|
// 案件压缩包导入
|
||||||
|
caseApplication.setImportFlag(2);
|
||||||
|
caseApplicationMapper.insertCaseApplication(caseApplication);
|
||||||
|
// 多线程执行
|
||||||
|
ThreadPoolUtil.execute(() -> {
|
||||||
|
caseApplicationLogMapper.insert(caseApplication);
|
||||||
// 多线程执行
|
// 多线程执行
|
||||||
List<MultipleThreadListParam> execList = new ArrayList<>();
|
|
||||||
if (CollectionUtil.isNotEmpty(addUsers)) {
|
if (CollectionUtil.isNotEmpty(addUsers)) {
|
||||||
Function<List<SysUser>, Integer> function = userMapper::batchSave;
|
userMapper.batchSave(addUsers);
|
||||||
execList.add(new MultipleThreadListParam(function, addUsers));
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(userRoleList)) {
|
if (CollectionUtil.isNotEmpty(userRoleList)) {
|
||||||
Function<List<SysUserRole>, Integer> function = userRoleMapper::batchUserRole;
|
userRoleMapper.batchUserRole(userRoleList);
|
||||||
execList.add(new MultipleThreadListParam(function, userRoleList));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(sysDepts)) {
|
if (CollectionUtil.isNotEmpty(sysDepts)) {
|
||||||
Function<List<SysDept>, Integer> function = sysDeptMapper::batchSave;
|
sysDeptMapper.batchSave(sysDepts);
|
||||||
execList.add(new MultipleThreadListParam(function, sysDepts));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(caseApplications)) {
|
if (CollectionUtil.isNotEmpty(caseApplication.getCaseAffiliates())) {
|
||||||
Function<List<CaseApplication>, Integer> function = caseApplicationMapper::batchSave;
|
caseAffiliateMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
|
||||||
execList.add(new MultipleThreadListParam(function, caseApplications));
|
caseAffiliateLogMapper.batchCaseAffiliate(caseApplication.getCaseAffiliates());
|
||||||
Function<List<CaseApplication>, Integer> functionLog = caseApplicationLogMapper::batchSave;
|
|
||||||
execList.add(new MultipleThreadListParam(functionLog, caseApplications));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(caseAffiliates)) {
|
|
||||||
Function<List<CaseAffiliate>, Integer> function = caseAffiliateMapper::batchCaseAffiliate;
|
|
||||||
execList.add(new MultipleThreadListParam(function, caseAffiliates));
|
|
||||||
Function<List<CaseAffiliate>, Integer> functionLog = caseAffiliateLogMapper::batchCaseAffiliate;
|
|
||||||
execList.add(new MultipleThreadListParam(functionLog, caseAffiliates));
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(caseAttachs)) {
|
if (CollectionUtil.isNotEmpty(caseAttachs)) {
|
||||||
Function<List<CaseAttach>, Integer> function = caseAttachMapper::batchSave;
|
caseAttachMapper.batchSave(caseAttachs);
|
||||||
execList.add(new MultipleThreadListParam(function, caseAttachs));
|
caseAttachLogMapper.batchSave(caseAttachs);
|
||||||
Function<List<CaseAttach>, Integer> functionLog = caseAttachLogMapper::batchSave;
|
|
||||||
execList.add(new MultipleThreadListParam(functionLog, caseAttachs));
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
if (CollectionUtil.isNotEmpty(columnValueList)) {
|
||||||
Function<List<ColumnValue>, Integer> function = columnValueMapper::batchSave;
|
columnValueMapper.batchSave(columnValueList);
|
||||||
execList.add(new MultipleThreadListParam(function, columnValueList));
|
columnValueLogMapper.batchSave(columnValueList);
|
||||||
Function<List<ColumnValue>, Integer> functionLog = columnValueLogMapper::batchSave;
|
|
||||||
execList.add(new MultipleThreadListParam(functionLog, columnValueList));
|
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(execList)) {
|
// 新增日志
|
||||||
MultipleThreadWorkUtil.execListFun(execList.toArray(new MultipleThreadListParam[execList.size()]));
|
CaseLogUtils.insertCaseLog(caseApplication.getId(), CaseApplicationConstants.CASE_APPLICATION, "",loginUser);
|
||||||
}
|
|
||||||
if (CollectionUtil.isNotEmpty(caseApplications)) {
|
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
||||||
List<CaseLogRecord> logRecords = new ArrayList<>();
|
|
||||||
|
|
||||||
caseApplications.forEach(caseApplication -> {
|
|
||||||
CaseLogRecord operLog = new CaseLogRecord();
|
|
||||||
// 获取当前的用户
|
|
||||||
|
|
||||||
if (loginUser != null) {
|
|
||||||
SysUser user = loginUser.getUser();
|
|
||||||
operLog.setCreateBy(user.getUserName());
|
|
||||||
operLog.setCreateNickName(user.getNickName());
|
|
||||||
operLog.setUpdateBy(user.getUserName());
|
|
||||||
} else {
|
|
||||||
operLog.setCreateBy("admin");
|
|
||||||
operLog.setCreateNickName("管理员");
|
|
||||||
operLog.setUpdateBy("admin");
|
|
||||||
}
|
|
||||||
operLog.setCaseAppliId(caseApplication.getId());
|
|
||||||
operLog.setCaseNode(CaseApplicationConstants.CASE_APPLICATION);
|
|
||||||
logRecords.add(operLog);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
// todo 发送短信
|
|
||||||
ThreadPoolUtil.execute(() -> {
|
|
||||||
CaseLogUtils.batchInsertCaseLog(logRecords);
|
|
||||||
// 发送短信
|
// 发送短信
|
||||||
if (CollectionUtil.isNotEmpty(smsRequestList)) {
|
if (CollectionUtil.isNotEmpty(smsRequestList)) {
|
||||||
Map<Long, SmsSendRecord> sendRecordMap = null;
|
Map<Long, SmsSendRecord> sendRecordMap = null;
|
||||||
@@ -374,13 +341,109 @@ public class CaseZipImportImpl {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
return caseApplication;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
);
|
/**
|
||||||
|
* 获取抓取内容
|
||||||
|
*
|
||||||
|
* @param andConvertPDF 文件路径map
|
||||||
|
* @param mapKey 文件名
|
||||||
|
* @param map 抓取内容map
|
||||||
|
* @param fatchRules 抓取规则
|
||||||
|
*/
|
||||||
|
private void getFatchContent(Map<String, String> andConvertPDF, String mapKey, Map<String, String> map, List<FatchRule> fatchRules) {
|
||||||
|
String fileURL = andConvertPDF.get(mapKey);
|
||||||
|
if (StrUtil.isEmpty(fileURL)) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
// 案件日志
|
if (fileURL.endsWith("txt")) {
|
||||||
return success("导入成功");
|
String readerFile = ReadFileUtils.readerTxtFile(fileURL);
|
||||||
|
OCRUtils.fatchRuleGetContent(readerFile, fatchRules, map);
|
||||||
|
} else if (fileURL.endsWith("doc") || fileURL.endsWith("docx")) {
|
||||||
|
// doc,docx,text识别内容
|
||||||
|
String readerFile = null;
|
||||||
|
try {
|
||||||
|
readerFile = ReadFileUtils.readWord(fileURL);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
OCRUtils.fatchRuleGetContent(readerFile, fatchRules, map);
|
||||||
|
|
||||||
|
} else if (fileURL.endsWith("pdf")) {
|
||||||
|
//获取文件的页数
|
||||||
|
int fileNumPage = getFileNumPage(fileURL);
|
||||||
|
//文件转成base64
|
||||||
|
String base64 = OCRUtils.pdfConvertBase64(fileURL);
|
||||||
|
if (base64 == null) {
|
||||||
|
throw new ServiceException("pdf转base64失败");
|
||||||
|
// return false;
|
||||||
|
}
|
||||||
|
StringBuilder ocrText = new StringBuilder(); // 创建一个StringBuilder对象
|
||||||
|
for (int i = 1; i <= fileNumPage; i++) {
|
||||||
|
//对接腾讯云接口.识别里面的数据
|
||||||
|
String text = OCRUtils.pdfIdentifyText(base64, i, fatchRules);
|
||||||
|
ocrText.append(text); // 拼接当前的字符串
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 根据抓取规则截取内容
|
||||||
|
OCRUtils.fatchRuleGetContent(ocrText.toString(), fatchRules, map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找文件
|
||||||
|
*
|
||||||
|
* @param directory
|
||||||
|
* @param fatchRuleList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String, String> findFile(File directory, List<FatchRule> fatchRuleList) {
|
||||||
|
Map<String, String> filePathMap = new HashMap<>();
|
||||||
|
if (directory.isFile()) {
|
||||||
|
String path = "";
|
||||||
|
// 如果传入的参数是一个文件
|
||||||
|
path = directory.getAbsolutePath();
|
||||||
|
filePathMap.put(directory.getName(), path);
|
||||||
|
|
||||||
|
} else if (directory.isDirectory()) {
|
||||||
|
searchAndConvertPDF(directory, filePathMap);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return filePathMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归查找文件夹
|
||||||
|
*
|
||||||
|
* @param directory
|
||||||
|
* @param filePathMap
|
||||||
|
*/
|
||||||
|
public static void searchAndConvertPDF(File directory, Map<String, String> filePathMap) {
|
||||||
|
File[] files = directory.listFiles();
|
||||||
|
|
||||||
|
if (files != null) {
|
||||||
|
for (File file : files) {
|
||||||
|
if (file.getName().contains("zip") || file.getName().contains("rar")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (file.isFile()) {
|
||||||
|
|
||||||
|
filePathMap.put(file.getName(), file.getAbsolutePath());
|
||||||
|
} else if (file.isDirectory()) {
|
||||||
|
// 如果是目录,递归查找
|
||||||
|
searchAndConvertPDF(file, filePathMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -584,13 +647,14 @@ public class CaseZipImportImpl {
|
|||||||
* @param fatchMap 抓取字段内容
|
* @param fatchMap 抓取字段内容
|
||||||
*/
|
*/
|
||||||
private void buildDefaultColumn(CaseApplication caseApplication, List<SysDictData> dictDataList, Map<String, String> fatchMap,
|
private void buildDefaultColumn(CaseApplication caseApplication, List<SysDictData> dictDataList, Map<String, String> fatchMap,
|
||||||
List<CaseAffiliate> caseAffiliates, Map<String, Long> deptMap, List<SysDept> sysDepts,
|
Map<String, Long> deptMap, List<SysDept> sysDepts,
|
||||||
Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList,
|
Map<String, SysUser> userMap, List<SysUser> addUsers, List<SysUserRole> userRoleList,
|
||||||
List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) {
|
List<SmsSendRecord> smsSendRecords, List<SmsUtils.SendSmsRequest> smsRequestList) {
|
||||||
// 组装内置字段
|
// 组装内置字段
|
||||||
if (CollectionUtil.isEmpty(dictDataList)) {
|
if (CollectionUtil.isEmpty(dictDataList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
List<CaseAffiliate> caseAffiliates = new ArrayList<>();
|
||||||
// 被申请人
|
// 被申请人
|
||||||
CaseAffiliate debtorAffiliate = new CaseAffiliate();
|
CaseAffiliate debtorAffiliate = new CaseAffiliate();
|
||||||
debtorAffiliate.setCaseAppliId(caseApplication.getId());
|
debtorAffiliate.setCaseAppliId(caseApplication.getId());
|
||||||
@@ -610,27 +674,35 @@ public class CaseZipImportImpl {
|
|||||||
buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication, smsSendRecords, smsRequestList);
|
buildAffilcateColumn(dictData, fatchMap, affiliate, deptMap, sysDepts, userMap, addUsers, userRoleList, caseApplication, smsSendRecords, smsRequestList);
|
||||||
} else if (dictData.getDictLabel().contains("合同编号")) {
|
} else if (dictData.getDictLabel().contains("合同编号")) {
|
||||||
// 合同编号
|
// 合同编号
|
||||||
String contractNumber = fatchMap.get("合同编号" + Constants.PDFSTR + caseApplication.getId());
|
String contractNumber = fatchMap.get("合同编号" );
|
||||||
if (StrUtil.isNotEmpty(contractNumber)) {
|
if (StrUtil.isNotEmpty(contractNumber)) {
|
||||||
// 提取字母和数字
|
// 提取字母和数字
|
||||||
String regx = "[^a-zA-Z0-9]";
|
String regx = "[^a-zA-Z0-9]";
|
||||||
String replaceAll = contractNumber.replaceAll(regx, "");
|
String replaceAll = contractNumber.replaceAll(regx, "");
|
||||||
caseApplication.setContractNumber(replaceAll.toUpperCase());
|
caseApplication.setContractNumber(replaceAll.toUpperCase());
|
||||||
}
|
}
|
||||||
}else if(dictData.getDictLabel().contains("案件标的")){
|
} else if (dictData.getDictLabel().contains("案件标的")) {
|
||||||
|
String caseSubjectAmount = fatchMap.get(dictData.getDictLabel());
|
||||||
|
if(StrUtil.isNotEmpty(caseSubjectAmount)) {
|
||||||
|
try {
|
||||||
|
BigDecimal bigDecimal = new BigDecimal(caseSubjectAmount);
|
||||||
|
caseApplication.setCaseSubjectAmount(bigDecimal);
|
||||||
// todo 案件标的名字要改,字典配置中也要改
|
// todo 案件标的名字要改,字典配置中也要改
|
||||||
if(null!=caseApplication.getCaseSubjectAmount()) {
|
|
||||||
//todo 暂时设置计费比率为0.01
|
//todo 暂时设置计费比率为0.01
|
||||||
BigDecimal feeRate = new BigDecimal(0.01);
|
BigDecimal feeRate = new BigDecimal(0.01);
|
||||||
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
BigDecimal feePayable = caseApplication.getCaseSubjectAmount().multiply(feeRate).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||||
caseApplication.setFeePayable(feePayable);
|
caseApplication.setFeePayable(feePayable);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -641,7 +713,7 @@ public class CaseZipImportImpl {
|
|||||||
if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
|
if (ObjectUtil.isNotEmpty(debtorAffiliate)) {
|
||||||
caseAffiliates.add(debtorAffiliate);
|
caseAffiliates.add(debtorAffiliate);
|
||||||
}
|
}
|
||||||
|
caseApplication.setCaseAffiliates(caseAffiliates);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -662,7 +734,7 @@ public class CaseZipImportImpl {
|
|||||||
// 申请人
|
// 申请人
|
||||||
switch (dictData.getDictLabel()) {
|
switch (dictData.getDictLabel()) {
|
||||||
case "申请人姓名":
|
case "申请人姓名":
|
||||||
affiliate.setName((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
affiliate.setName((fatchMap.get(dictData.getDictLabel())));
|
||||||
if (StrUtil.isNotEmpty(affiliate.getName())) {
|
if (StrUtil.isNotEmpty(affiliate.getName())) {
|
||||||
// 组装申请机构
|
// 组装申请机构
|
||||||
// 将组织机构id设为申请人名称
|
// 将组织机构id设为申请人名称
|
||||||
@@ -690,25 +762,25 @@ public class CaseZipImportImpl {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "统一社会信用代码":
|
case "统一社会信用代码":
|
||||||
affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
affiliate.setIdentityNum((fatchMap.get(dictData.getDictLabel())));
|
||||||
break;
|
break;
|
||||||
case "法定代表人":
|
case "法定代表人":
|
||||||
affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
affiliate.setCompLegalPerson(fatchMap.get(dictData.getDictLabel()));
|
||||||
break;
|
break;
|
||||||
case "法定代表人职位":
|
case "法定代表人职位":
|
||||||
affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
affiliate.setCompLegalperPost((fatchMap.get(dictData.getDictLabel())));
|
||||||
break;
|
break;
|
||||||
case "申请人住所":
|
case "申请人住所":
|
||||||
affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())));
|
affiliate.setResidenAffili((fatchMap.get(dictData.getDictLabel())));
|
||||||
break;
|
break;
|
||||||
case "申请人联系地址":
|
case "申请人联系地址":
|
||||||
affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
affiliate.setContactAddress(fatchMap.get(dictData.getDictLabel()));
|
||||||
break;
|
break;
|
||||||
case "委托代理人姓名":
|
case "委托代理人姓名":
|
||||||
affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
affiliate.setNameAgent(fatchMap.get(dictData.getDictLabel()));
|
||||||
break;
|
break;
|
||||||
case "委托代理人联系电话":
|
case "委托代理人联系电话":
|
||||||
affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()));
|
affiliate.setContactTelphoneAgent(fatchMap.get(dictData.getDictLabel()));
|
||||||
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
if (StrUtil.isNotEmpty(affiliate.getContactTelphoneAgent())) {
|
||||||
SysUser agentUser = null;
|
SysUser agentUser = null;
|
||||||
// 用户已存在
|
// 用户已存在
|
||||||
@@ -754,7 +826,7 @@ public class CaseZipImportImpl {
|
|||||||
}
|
}
|
||||||
if (addUsers != null) {
|
if (addUsers != null) {
|
||||||
SysUser finalAgentUser = agentUser;
|
SysUser finalAgentUser = agentUser;
|
||||||
if(CollectionUtil.isNotEmpty(smsRequestList)&& smsRequestList.stream().noneMatch(smsSendRecord -> smsSendRecord.getPhone().equals(finalAgentUser.getPhonenumber()))){
|
if (CollectionUtil.isNotEmpty(smsRequestList) && smsRequestList.stream().noneMatch(smsSendRecord -> smsSendRecord.getPhone().equals(finalAgentUser.getPhonenumber()))) {
|
||||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||||
request.setTemplateId("1956159");
|
request.setTemplateId("1956159");
|
||||||
request.setPhone(agentUser.getPhonenumber());
|
request.setPhone(agentUser.getPhonenumber());
|
||||||
@@ -777,10 +849,10 @@ public class CaseZipImportImpl {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "委托代理人电子邮件":
|
case "委托代理人电子邮件":
|
||||||
affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId())) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseApplication.getId()).replace("\n", "").replaceAll("\\s", "") : null);
|
affiliate.setAgentEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel())) ? fatchMap.get(dictData.getDictLabel()).replace("\n", "").replaceAll("\\s", "") : null);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
ObjectFieldUtils.setValue(caseApplication, dictData.getDictValue(), fatchMap.get(dictData.getDictLabel() ));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -813,11 +885,11 @@ public class CaseZipImportImpl {
|
|||||||
// 被申请人
|
// 被申请人
|
||||||
switch (dictData.getDictLabel()) {
|
switch (dictData.getDictLabel()) {
|
||||||
case "被申请人姓名":
|
case "被申请人姓名":
|
||||||
debtorAffiliate.setName(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
debtorAffiliate.setName(fatchMap.get(dictData.getDictLabel() ));
|
||||||
break;
|
break;
|
||||||
case "被申请人身份证号":
|
case "被申请人身份证号":
|
||||||
String identityNum = fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId);
|
String identityNum = fatchMap.get(dictData.getDictLabel() );
|
||||||
debtorAffiliate.setIdentityNum(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
debtorAffiliate.setIdentityNum(fatchMap.get(dictData.getDictLabel() ));
|
||||||
// 出生年月日,从身份证抓取
|
// 出生年月日,从身份证抓取
|
||||||
if (StrUtil.isNotEmpty(identityNum)) {
|
if (StrUtil.isNotEmpty(identityNum)) {
|
||||||
identityNum = identityNum.replace("\n", "");
|
identityNum = identityNum.replace("\n", "");
|
||||||
@@ -839,13 +911,13 @@ public class CaseZipImportImpl {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case "被申请人住所":
|
case "被申请人住所":
|
||||||
debtorAffiliate.setResidenAffili(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
debtorAffiliate.setResidenAffili(fatchMap.get(dictData.getDictLabel() ));
|
||||||
break;
|
break;
|
||||||
case "被申请人联系电话":
|
case "被申请人联系电话":
|
||||||
debtorAffiliate.setContactTelphone(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId));
|
debtorAffiliate.setContactTelphone(fatchMap.get(dictData.getDictLabel() ));
|
||||||
break;
|
break;
|
||||||
case "被申请人电子邮件":
|
case "被申请人电子邮件":
|
||||||
debtorAffiliate.setEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId)) ? fatchMap.get(dictData.getDictLabel() + Constants.PDFSTR + caseId).replace("\n", "").replaceAll("\\s", "") : null);
|
debtorAffiliate.setEmail(StrUtil.isNotEmpty(fatchMap.get(dictData.getDictLabel() )) ? fatchMap.get(dictData.getDictLabel() ).replace("\n", "").replaceAll("\\s", "") : null);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.ruoyi.wisdomarbitrate.task;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.FatchRule;
|
||||||
|
import com.ruoyi.wisdomarbitrate.service.impl.CaseZipImportImpl;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description rbd调用xfta计算任务类
|
||||||
|
* @Author mingYang
|
||||||
|
* @Date 2021/11/12 15:35
|
||||||
|
* @Version V1.0
|
||||||
|
**/
|
||||||
|
|
||||||
|
public class CaseZipImportTask implements Callable<List<CaseApplication>> {
|
||||||
|
private CaseZipImportImpl caseZipImportImpl;
|
||||||
|
private Long templateId;
|
||||||
|
private List<FatchRule> fatchRuleList;
|
||||||
|
private Map<String, String> fatchMap;
|
||||||
|
private Map<String, List<FatchRule>> fatchRuleMap;
|
||||||
|
private Map<String, SysUser> userMap;
|
||||||
|
private List<SysDictData> dictDataList;
|
||||||
|
private File[] files;
|
||||||
|
private Map<String, Long> deptMap;
|
||||||
|
private LoginUser loginUser;
|
||||||
|
|
||||||
|
public CaseZipImportTask(CaseZipImportImpl caseZipImportImpl, Long templateId, List<FatchRule> fatchRuleList, Map<String, String> fatchMap, Map<String, List<FatchRule>> fatchRuleMap, Map<String, SysUser> userMap, List<SysDictData> dictDataList, File[] files, Map<String, Long> deptMap, LoginUser loginUser) {
|
||||||
|
this.caseZipImportImpl = caseZipImportImpl;
|
||||||
|
this.templateId = templateId;
|
||||||
|
this.fatchRuleList = fatchRuleList;
|
||||||
|
this.fatchMap = fatchMap;
|
||||||
|
this.fatchRuleMap = fatchRuleMap;
|
||||||
|
this.userMap = userMap;
|
||||||
|
this.dictDataList = dictDataList;
|
||||||
|
this.files = files;
|
||||||
|
this.deptMap = deptMap;
|
||||||
|
this.loginUser = loginUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CaseApplication> call() {
|
||||||
|
List<CaseApplication> caseApplications = new ArrayList<>();
|
||||||
|
for (File file1 : files) {
|
||||||
|
if (file1.isDirectory() && file1.listFiles() != null) {
|
||||||
|
|
||||||
|
for (File file2 : file1.listFiles()) {
|
||||||
|
CaseApplication caseApplication = caseZipImportImpl.buildCaseInfo(file2, templateId, fatchRuleList, fatchRuleMap, fatchMap, userMap, dictDataList, deptMap, loginUser);
|
||||||
|
if (caseApplication != null) {
|
||||||
|
caseApplications.add(caseApplication);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return caseApplications;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -47,6 +47,30 @@ public class CaseLogUtils
|
|||||||
operLog.setNotes(notes);
|
operLog.setNotes(notes);
|
||||||
caseLogRecordMapper.insertCaseLogRecord(operLog);
|
caseLogRecordMapper.insertCaseLogRecord(operLog);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 新增案件日志
|
||||||
|
* @param caseAppliId 案件id,不能为空
|
||||||
|
* @param caseNode 案件节点,不能为空
|
||||||
|
* @param notes 备注
|
||||||
|
*/
|
||||||
|
public static void insertCaseLog(@NotNull Long caseAppliId, @NotEmpty Integer caseNode, String notes ,LoginUser loginUser ){
|
||||||
|
CaseLogRecord operLog = new CaseLogRecord();
|
||||||
|
// 获取当前的用户
|
||||||
|
if(loginUser!=null) {
|
||||||
|
SysUser sysUser = userMapper.selectUserById(loginUser.getUserId());
|
||||||
|
operLog.setCreateBy(sysUser.getUserName());
|
||||||
|
operLog.setCreateNickName(sysUser.getNickName());
|
||||||
|
operLog.setUpdateBy(sysUser.getUserName());
|
||||||
|
}else {
|
||||||
|
operLog.setCreateBy("admin");
|
||||||
|
operLog.setCreateNickName("管理员");
|
||||||
|
operLog.setUpdateBy("admin");
|
||||||
|
}
|
||||||
|
operLog.setCaseAppliId(caseAppliId);
|
||||||
|
operLog.setCaseNode(caseNode);
|
||||||
|
operLog.setNotes(notes);
|
||||||
|
caseLogRecordMapper.insertCaseLogRecord(operLog);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 批量新增案件日志
|
* 批量新增案件日志
|
||||||
* @param list
|
* @param list
|
||||||
|
|||||||
@@ -167,14 +167,14 @@ public class OCRUtils {
|
|||||||
String endContent = fatchRule.getEndContent();
|
String endContent = fatchRule.getEndContent();
|
||||||
// 开始为空结束为空
|
// 开始为空结束为空
|
||||||
if (StrUtil.isEmpty(startContent) && StrUtil.isEmpty(endContent)) {
|
if (StrUtil.isEmpty(startContent) && StrUtil.isEmpty(endContent)) {
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(text));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(text));
|
||||||
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isEmpty(endContent)) {
|
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isEmpty(endContent)) {
|
||||||
// 开始不为空结束为空
|
// 开始不为空结束为空
|
||||||
int startContIndex = StrUtil.ordinalIndexOf(text, startContent, fatchRule.getStartContentRepeatOrder());
|
int startContIndex = StrUtil.ordinalIndexOf(text, startContent, fatchRule.getStartContentRepeatOrder());
|
||||||
if (startContIndex != -1 && text.length() >= (startContIndex + startContent.length())) {
|
if (startContIndex != -1 && text.length() >= (startContIndex + startContent.length())) {
|
||||||
String substring = text.substring(startContIndex + startContent.length());
|
String substring = text.substring(startContIndex + startContent.length());
|
||||||
// 去除\n
|
// 去除\n
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (StrUtil.isEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
|
} else if (StrUtil.isEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
|
||||||
@@ -182,7 +182,7 @@ public class OCRUtils {
|
|||||||
int endContIndex = StrUtil.ordinalIndexOf(text, endContent, fatchRule.getEndContentRepeatOrder());
|
int endContIndex = StrUtil.ordinalIndexOf(text, endContent, fatchRule.getEndContentRepeatOrder());
|
||||||
if (endContIndex != -1) {
|
if (endContIndex != -1) {
|
||||||
String substring = text.substring(0, endContIndex);
|
String substring = text.substring(0, endContIndex);
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
|
||||||
}
|
}
|
||||||
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
|
} else if (StrUtil.isNotEmpty(startContent) && StrUtil.isNotEmpty(endContent)) {
|
||||||
// 开始结束不为空
|
// 开始结束不为空
|
||||||
@@ -191,7 +191,7 @@ public class OCRUtils {
|
|||||||
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + startContent.length()) && text.length() >= endIndexOf) {
|
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + startContent.length()) && text.length() >= endIndexOf) {
|
||||||
String substring = text.substring(startIndexOf + startContent.length(), endIndexOf);
|
String substring = text.substring(startIndexOf + startContent.length(), endIndexOf);
|
||||||
|
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(substring));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(substring));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ public class OCRUtils {
|
|||||||
}
|
}
|
||||||
// 开始和结束截取都为空
|
// 开始和结束截取都为空
|
||||||
if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
|
if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(text));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(text));
|
||||||
} else if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isNotEmpty(reverseEndContent)) {
|
} else if (StrUtil.isEmpty(reverseStartContent) && StrUtil.isNotEmpty(reverseEndContent)) {
|
||||||
// 开始为空,结束不为空
|
// 开始为空,结束不为空
|
||||||
// 根据截取的序号查找出位置
|
// 根据截取的序号查找出位置
|
||||||
@@ -229,7 +229,7 @@ public class OCRUtils {
|
|||||||
if (indexOf != -1) {
|
if (indexOf != -1) {
|
||||||
String substring = reverseText.substring(0, indexOf);
|
String substring = reverseText.substring(0, indexOf);
|
||||||
if (StrUtil.isNotEmpty(substring)) {
|
if (StrUtil.isNotEmpty(substring)) {
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring)));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (StrUtil.isNotEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
|
} else if (StrUtil.isNotEmpty(reverseStartContent) && StrUtil.isEmpty(reverseEndContent)) {
|
||||||
@@ -238,7 +238,7 @@ public class OCRUtils {
|
|||||||
if (indexOf != -1 && (indexOf + reverseStartContent.length() <= text.length())) {
|
if (indexOf != -1 && (indexOf + reverseStartContent.length() <= text.length())) {
|
||||||
String substring = reverseText.substring(indexOf + reverseStartContent.length());
|
String substring = reverseText.substring(indexOf + reverseStartContent.length());
|
||||||
if (StrUtil.isNotEmpty(substring)) {
|
if (StrUtil.isNotEmpty(substring)) {
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring)));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ public class OCRUtils {
|
|||||||
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + reverseStartContent.length()) && text.length() >= endIndexOf) {
|
if (startIndexOf != -1 && endIndexOf != -1 && endIndexOf >= (startIndexOf + reverseStartContent.length()) && text.length() >= endIndexOf) {
|
||||||
String substring = reverseText.substring(startIndexOf + reverseStartContent.length(), endIndexOf);
|
String substring = reverseText.substring(startIndexOf + reverseStartContent.length(), endIndexOf);
|
||||||
if (StrUtil.isNotEmpty(substring)) {
|
if (StrUtil.isNotEmpty(substring)) {
|
||||||
fatchMap.put(fatchRule.getColumnName()+Constants.PDFSTR+caseId, trimStr(StrUtil.reverse(substring)));
|
fatchMap.put(fatchRule.getColumnName(), trimStr(StrUtil.reverse(substring)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.utils;
|
package com.ruoyi.wisdomarbitrate.utils;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
@@ -11,6 +13,7 @@ import com.ruoyi.common.utils.DateUtils;
|
|||||||
import com.ruoyi.common.utils.EsignApplicaConfig;
|
import com.ruoyi.common.utils.EsignApplicaConfig;
|
||||||
import com.ruoyi.common.utils.EsignHttpHelper;
|
import com.ruoyi.common.utils.EsignHttpHelper;
|
||||||
import com.ruoyi.common.utils.SealUtil;
|
import com.ruoyi.common.utils.SealUtil;
|
||||||
|
import com.ruoyi.wisdomarbitrate.StringIdsReq;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||||
|
|
||||||
@@ -252,7 +255,7 @@ public class SignAward {
|
|||||||
/* " \"availableSealIds\": [\n" +
|
/* " \"availableSealIds\": [\n" +
|
||||||
" \"" + availableSealId + "\"\n" +
|
" \"" + availableSealId + "\"\n" +
|
||||||
" ],\n" +*/
|
" ],\n" +*/
|
||||||
" \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
|
// " \"availableSealIds\": " + new Gson().toJson(sealIdList) + ",\n" +
|
||||||
|
|
||||||
" \"signFieldPosition\": {\n" +
|
" \"signFieldPosition\": {\n" +
|
||||||
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
" \"positionPage\": \"" + positionPageorg + "\",\n" +
|
||||||
@@ -305,6 +308,50 @@ public class SignAward {
|
|||||||
//发起接口请求
|
//发起接口请求
|
||||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取批量签页面链接
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws EsignDemoException
|
||||||
|
*/
|
||||||
|
public static EsignHttpResponse batchSignUrl(StringIdsReq idsReq) throws EsignDemoException {
|
||||||
|
|
||||||
|
List<String> signFlowIds = idsReq.getIds();
|
||||||
|
String psnAccount = idsReq.getPsnAccount();
|
||||||
|
String apiaddr = "/v3/sign-flow/batch-sign-url";
|
||||||
|
JSONObject paramObj = new JSONObject();
|
||||||
|
paramObj.put("operatorId",idsReq.getPsnId());
|
||||||
|
paramObj.put("signFlowIds",signFlowIds);
|
||||||
|
paramObj.put("clientType","PC");
|
||||||
|
String jsonParm = JSON.toJSONString(paramObj);
|
||||||
|
//请求方法
|
||||||
|
EsignRequestType requestType = EsignRequestType.POST;
|
||||||
|
//生成请求签名鉴权方式的Header
|
||||||
|
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
|
||||||
|
//发起接口请求
|
||||||
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据手机号获取账户id
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @throws EsignDemoException
|
||||||
|
*/
|
||||||
|
public static EsignHttpResponse identityInfo(StringIdsReq idsReq) throws EsignDemoException {
|
||||||
|
|
||||||
|
List<String> signFlowIds = idsReq.getIds();
|
||||||
|
String psnAccount = idsReq.getPsnAccount();
|
||||||
|
String apiaddr = "/v3/persons/identity-info?psnAccount=" +psnAccount;
|
||||||
|
|
||||||
|
String jsonParm = "{}";
|
||||||
|
//请求方法
|
||||||
|
EsignRequestType requestType = EsignRequestType.GET;
|
||||||
|
//生成请求签名鉴权方式的Header
|
||||||
|
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
|
||||||
|
//发起接口请求
|
||||||
|
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取合同文件用印链接
|
* 获取合同文件用印链接
|
||||||
|
|||||||
@@ -37,7 +37,12 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||||
select c.*,s.user_id
|
select distinct (c.id),
|
||||||
|
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
|
||||||
|
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
||||||
|
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
||||||
|
c.residen_affili,appli_agent_title,
|
||||||
|
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
||||||
from case_affiliate c
|
from case_affiliate c
|
||||||
left join sys_user s on c.identity_num=s.id_card
|
left join sys_user s on c.identity_num=s.id_card
|
||||||
<where>
|
<where>
|
||||||
@@ -47,7 +52,12 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
|
<select id="selectCaseAffiliateByCaseIds" resultMap="CaseAffiliateResult">
|
||||||
select c.*,s.user_id
|
select (c.id),
|
||||||
|
c.case_appli_id, c.identity_type,c.application_organ_id,c.application_organ_name,c.name,c.identity_num,c.contact_telphone,
|
||||||
|
c.contact_address,c.work_address,c.work_telphone ,c.name_agent,c.identity_num_agent,c.contact_telphone_agent,
|
||||||
|
c.comp_legal_person,c.comp_legalper_post,c.respon_sex ,c.respon_birth,
|
||||||
|
c.residen_affili,appli_agent_title,
|
||||||
|
c.contact_address_agent,c.email, c.send_email,c.track_num,c.applicant_agent_user_id,c.agent_email,s.user_id
|
||||||
from case_affiliate c
|
from case_affiliate c
|
||||||
left join sys_user s on c.identity_num=s.id_card
|
left join sys_user s on c.identity_num=s.id_card
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
+18
-10
@@ -202,25 +202,27 @@
|
|||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
<delete id="batchDeleteLog">
|
<delete id="batchDeleteLog">
|
||||||
delete a from case_affiliate_log a
|
|
||||||
join case_application_log l on l.id=a.case_appli_log_id
|
delete from case_application_log l where l.id in
|
||||||
where l.id in (
|
|
||||||
<foreach collection="ids" item="id" separator=",">
|
<foreach collection="ids" item="id" separator=",">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
);
|
;
|
||||||
delete a from case_attach_log a
|
delete from case_affiliate_log l where l.case_appli_log_id in
|
||||||
join case_application_log l on l.id=a.case_appli_log_id
|
|
||||||
where l.id in (
|
|
||||||
<foreach collection="ids" item="id" separator=",">
|
<foreach collection="ids" item="id" separator=",">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
);
|
;
|
||||||
delete from case_application_log l where l.id in (
|
delete from case_attach_log l where l.case_appli_log_id in
|
||||||
<foreach collection="ids" item="id" separator=",">
|
<foreach collection="ids" item="id" separator=",">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
);
|
;
|
||||||
|
delete from column_value_log l where l.case_appli_log_id in
|
||||||
|
<foreach collection="ids" item="id" separator=",">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
;
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
|
||||||
@@ -278,6 +280,12 @@
|
|||||||
FROM case_application_log
|
FROM case_application_log
|
||||||
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
WHERE case_appli_id = #{caseId} and version < #{version} and update_submit_status not in ( 4, 5 ) order by version desc limit 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectLogsByCaseIds" resultType="java.lang.Long">
|
||||||
|
select id from case_application_log where case_appli_id in
|
||||||
|
<foreach collection="ids" item="item" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
+113
-202
@@ -62,21 +62,11 @@
|
|||||||
t1.loan_start_date,t1.loan_end_date,t1.claim_princi_owed,t1.claim_interest_owed,t1.claim_liquid_damag,t1.fee_payable,
|
t1.loan_start_date,t1.loan_end_date,t1.claim_princi_owed,t1.claim_interest_owed,t1.claim_liquid_damag,t1.fee_payable,
|
||||||
t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.update_by,t1.update_time,
|
t1.begin_video_date,t1.online_video_person,t1.contract_number,t1.create_by,t1.create_time,t1.update_by,t1.update_time,
|
||||||
t1.arbitrator_name,t1.name,t1.application_organ_id,t1.applicantName,t1.arbitrator_id,t1.identity_num,t1.identity_type,
|
t1.arbitrator_name,t1.name,t1.application_organ_id,t1.applicantName,t1.arbitrator_id,t1.identity_num,t1.identity_type,
|
||||||
t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus,t1.batch_number
|
t1.filearbitra_url,t1.lock_status,t1.version,t1.updateSubmitStatus,t1.batch_number,t1.pendingStatus
|
||||||
from(
|
from(
|
||||||
<trim suffixOverrides="union">
|
<trim suffixOverrides="union">
|
||||||
<!--申请人,被申请人,仲裁员,部门长,财务,代理人案件-->
|
<!--被申请人,仲裁员,部门长,财务,代理人案件-->
|
||||||
<if test="isOtherRole!=null and isOtherRole==1">
|
<if test="isOtherRole!=null and isOtherRole==1">
|
||||||
|
|
||||||
select t.id,t.caseLogId,t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
|
||||||
t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
|
||||||
t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed
|
|
||||||
,t.claim_liquid_damag,t.fee_payable ,
|
|
||||||
t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
|
|
||||||
t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
|
|
||||||
t.arbitrator_id,t.identity_num ,
|
|
||||||
t.identity_type,t.filearbitra_url,t.lock_status,t.version,t.updateSubmitStatus,t.batch_number
|
|
||||||
from(
|
|
||||||
select c.id ,'' AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
select c.id ,'' AS caseLogId,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||||
ELSE '无审理方式'
|
ELSE '无审理方式'
|
||||||
@@ -99,78 +89,42 @@
|
|||||||
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
|
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
|
||||||
as applicantName,
|
as applicantName,
|
||||||
c.arbitrator_id,ca.identity_num ,ca.identity_type,c.filearbitra_url,c.lock_status,c.version,null as
|
c.arbitrator_id,ca.identity_num ,ca.identity_type,c.filearbitra_url,c.lock_status,c.version,null as
|
||||||
updateSubmitStatus,c.batch_number
|
updateSubmitStatus,c.batch_number,0 as pendingStatus
|
||||||
from case_application c
|
from case_application c
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||||
<!--查询条件-->
|
|
||||||
<where>
|
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND c.case_status = #{caseStatus}
|
|
||||||
</if>
|
|
||||||
<if test="caseNum != null and caseNum != ''">
|
|
||||||
AND c.case_num = #{caseNum}
|
|
||||||
</if>
|
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
|
||||||
</if>
|
|
||||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
|
||||||
and c.case_status in
|
|
||||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
|
||||||
#{caseStatus}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="lockStatus != null">
|
|
||||||
AND c.lock_status = #{lockStatus}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
) t
|
|
||||||
<where>
|
<where>
|
||||||
<!--根据角色和状态过滤-->
|
<!--根据角色和状态过滤-->
|
||||||
<!--被申请人-->
|
<!--被申请人-->
|
||||||
<if test="idCard != null and idCard != ''">
|
<if test="idCard != null and idCard != ''">
|
||||||
or (t.identity_num=#{idCard} AND t.identity_type=2
|
or (ca.identity_num=#{idCard} AND ca.identity_type=2
|
||||||
<!-- and (t.case_status=4 or t.case_status=17) -->
|
and (c.case_status=4 or c.case_status=17)
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<!--仲裁员-->
|
<!--仲裁员-->
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
<!-- or ( t.identity_type=1 and
|
or ( ca.identity_type=1 and
|
||||||
t.case_status in (7,13,17,18) -->
|
c.case_status in (7,13,17,18)
|
||||||
or (t.identity_type=1
|
|
||||||
and
|
and
|
||||||
instr (t.arbitrator_id,#{userId})>0)
|
instr (c.arbitrator_id,#{userId})>0)
|
||||||
</if>
|
</if>
|
||||||
<!--申请人-->
|
|
||||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
||||||
<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
|
|
||||||
<!-- <!–暂时改为可以查询到生成裁决书之前所有的案件状态–>-->
|
|
||||||
<!-- and (t.case_status <= 10 or t.case_status=31))-->
|
|
||||||
|
|
||||||
<!-- </if>-->
|
|
||||||
<!--部门长-->
|
<!--部门长-->
|
||||||
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||||
or (t.identity_type=1)
|
or (ca.identity_type=1)
|
||||||
<!--and t.case_status in
|
|
||||||
<foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
|
||||||
#{caseStatus}
|
|
||||||
</foreach>)-->
|
|
||||||
</if>
|
</if>
|
||||||
<!--财务-->
|
<!--财务-->
|
||||||
<if test="financeStatus != null and financeStatus != ''">
|
<if test="financeStatus != null and financeStatus != ''">
|
||||||
or (t.identity_type=1
|
or (ca.identity_type=1
|
||||||
<!-- and t.case_status =#{financeStatus}-->
|
and c.case_status =#{financeStatus}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
<!--代理人-->
|
<!--代理人-->
|
||||||
<if test="agentDeptIds != null and agentDeptIds.size()>0">
|
<if test="agentDeptIds != null and agentDeptIds.size()>0">
|
||||||
or (
|
or (
|
||||||
t.application_organ_id in
|
ca.application_organ_id in
|
||||||
<foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
|
<foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
|
||||||
</foreach>
|
</foreach>
|
||||||
AND t.identity_type=1
|
AND ca.identity_type=1
|
||||||
<!-- and t.case_status in (0,9)-->
|
and c.case_status in (0,9)
|
||||||
)
|
)
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
@@ -206,30 +160,17 @@
|
|||||||
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from
|
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from
|
||||||
case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
|
case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select
|
||||||
update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
|
update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1)
|
||||||
as updateSubmitStatus,c.batch_number
|
as updateSubmitStatus,c.batch_number,0 as pendingStatus
|
||||||
from case_application c
|
from case_application c
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
|
JOIN case_affiliate ca ON ca.case_appli_id =c.id AND ca.identity_type = 1
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
<!--(c.case_status <= 10 or c.case_status=31) AND-->
|
(c.case_status <= 10 or c.case_status=31) AND
|
||||||
ca.identity_type=1
|
ca.identity_type=1
|
||||||
|
|
||||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||||
AND ca.application_organ_id = #{applicationOrganId}
|
AND ca.application_organ_id = #{applicationOrganId}
|
||||||
</if>
|
</if>
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND c.case_status = #{caseStatus}
|
|
||||||
</if>
|
|
||||||
<if test="caseNum != null and caseNum != ''">
|
|
||||||
AND c.case_num = #{caseNum}
|
|
||||||
</if>
|
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
AND ca.application_organ_id=#{nameId}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="lockStatus != null">
|
|
||||||
AND c.lock_status = #{lockStatus}
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
union
|
union
|
||||||
</if>
|
</if>
|
||||||
@@ -237,7 +178,6 @@
|
|||||||
<if test="deptIds != null and deptIds.size() > 0">
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
|
|
||||||
<!--秘书主表案件-->
|
<!--秘书主表案件-->
|
||||||
select tt.* from(
|
|
||||||
SELECT
|
SELECT
|
||||||
c.id,
|
c.id,
|
||||||
'' AS caseLogId,
|
'' AS caseLogId,
|
||||||
@@ -287,7 +227,7 @@
|
|||||||
c.filearbitra_url,
|
c.filearbitra_url,
|
||||||
c.lock_status,c.version,
|
c.lock_status,c.version,
|
||||||
null as updateSubmitStatus,
|
null as updateSubmitStatus,
|
||||||
c.batch_number
|
c.batch_number,0 as pendingStatus
|
||||||
FROM
|
FROM
|
||||||
case_application c
|
case_application c
|
||||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type = 1
|
||||||
@@ -302,40 +242,9 @@
|
|||||||
)
|
)
|
||||||
WHERE
|
WHERE
|
||||||
ca.identity_type=1
|
ca.identity_type=1
|
||||||
|
and c.case_status in (1,5,8,9,11,14,15,16,17,31)
|
||||||
<!-- and c.case_status in (1,5,8,9,11,14,15,16,17,31)-->
|
|
||||||
|
|
||||||
<!-- <if test="deptIds != null and deptIds.size() > 0">
|
|
||||||
and ca.application_organ_id in
|
|
||||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>-->
|
|
||||||
<if test="lockStatus != null">
|
|
||||||
AND c.lock_status = #{lockStatus}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
<if test="caseNum != null and caseNum != ''">
|
|
||||||
AND c.case_num = #{caseNum}
|
|
||||||
</if>
|
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
|
||||||
</if>) tt
|
|
||||||
<where>
|
|
||||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
|
||||||
and tt.case_status in
|
|
||||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
|
||||||
#{caseStatus}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND tt.case_status = #{caseStatus}
|
|
||||||
</if>
|
|
||||||
|
|
||||||
</where>
|
|
||||||
union
|
union
|
||||||
<!--秘书审核案件-->
|
<!--秘书审核案件-->
|
||||||
select tt2.* from(
|
|
||||||
SELECT
|
SELECT
|
||||||
l.case_appli_id id,
|
l.case_appli_id id,
|
||||||
l.id AS caseLogId,
|
l.id AS caseLogId,
|
||||||
@@ -382,7 +291,7 @@
|
|||||||
ca.application_organ_id ,
|
ca.application_organ_id ,
|
||||||
ca.application_organ_name AS applicantName,
|
ca.application_organ_name AS applicantName,
|
||||||
c.arbitrator_id,ca.identity_num ,ca.identity_type,
|
c.arbitrator_id,ca.identity_num ,ca.identity_type,
|
||||||
c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus,c.batch_number
|
c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus,c.batch_number,0 as pendingStatus
|
||||||
FROM
|
FROM
|
||||||
case_application c
|
case_application c
|
||||||
JOIN case_application_log l ON c.id = l.case_appli_id
|
JOIN case_application_log l ON c.id = l.case_appli_id
|
||||||
@@ -390,33 +299,7 @@
|
|||||||
AND ca.identity_type = 1
|
AND ca.identity_type = 1
|
||||||
WHERE
|
WHERE
|
||||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||||
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
|
|
||||||
<!-- and c.case_status in-->
|
|
||||||
<!-- <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">-->
|
|
||||||
<!-- #{caseStatus}-->
|
|
||||||
<!-- </foreach>-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="deptIds != null and deptIds.size() > 0">
|
|
||||||
and ca.application_organ_id in
|
|
||||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if> -->
|
|
||||||
<!-- <if test="caseStatus != null">-->
|
|
||||||
<!-- AND c.case_status = #{caseStatus}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<if test="lockStatus != null">
|
|
||||||
AND c.lock_status = #{lockStatus}
|
|
||||||
</if>
|
|
||||||
<if test="caseNum != null and caseNum != ''">
|
|
||||||
AND c.case_num = #{caseNum}
|
|
||||||
</if>
|
|
||||||
<if test="nameId != null and nameId != ''">
|
|
||||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
|
||||||
</if>
|
|
||||||
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
|
|
||||||
<!-- and c.case_status in (1,5)-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- 查询该案件的最新记录 -->
|
<!-- 查询该案件的最新记录 -->
|
||||||
AND l.version = (
|
AND l.version = (
|
||||||
SELECT
|
SELECT
|
||||||
@@ -425,26 +308,86 @@
|
|||||||
case_application_log
|
case_application_log
|
||||||
WHERE
|
WHERE
|
||||||
c.id = case_appli_id)
|
c.id = case_appli_id)
|
||||||
) tt2
|
|
||||||
|
|
||||||
<where>
|
union
|
||||||
|
|
||||||
<if test="caseStatus != null">
|
|
||||||
AND tt2.case_status = #{caseStatus}
|
|
||||||
</if>
|
</if>
|
||||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
<!-- 已办案件 -->
|
||||||
and tt2.case_status in
|
<if test="loginUserName != null and loginUserName != ''">
|
||||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
SELECT
|
||||||
#{caseStatus}
|
c.id,
|
||||||
</foreach>
|
'' AS caseLogId,
|
||||||
|
c.case_num,
|
||||||
|
c.case_subject_amount,
|
||||||
|
c.register_date,
|
||||||
|
c.arbitrat_method,
|
||||||
|
CASE
|
||||||
|
c.arbitrat_method
|
||||||
|
WHEN 1 THEN
|
||||||
|
'开庭审理'
|
||||||
|
WHEN 2 THEN
|
||||||
|
'书面审理' ELSE '无审理方式'
|
||||||
|
END arbitratMethodName,
|
||||||
|
c.case_status,
|
||||||
|
CASE
|
||||||
|
c.case_status
|
||||||
|
when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||||
|
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||||
|
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||||
|
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||||
|
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||||
|
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||||
|
when 18 then '待仲裁员审核仲裁文书'
|
||||||
|
when 31 then '待修改开庭时间' ELSE '无案件状态'
|
||||||
|
END caseStatusName,
|
||||||
|
c.hear_date,
|
||||||
|
c.arbitrat_claims,
|
||||||
|
c.loan_start_date,
|
||||||
|
c.loan_end_date,
|
||||||
|
c.claim_princi_owed,
|
||||||
|
c.claim_interest_owed,
|
||||||
|
c.claim_liquid_damag,
|
||||||
|
c.fee_payable,
|
||||||
|
c.begin_video_date,
|
||||||
|
c.online_video_person,
|
||||||
|
c.contract_number,
|
||||||
|
c.create_by,
|
||||||
|
c.create_time,
|
||||||
|
c.update_by,
|
||||||
|
c.update_time,
|
||||||
|
c.arbitrator_name,
|
||||||
|
ca.name,
|
||||||
|
ca.application_organ_id ,
|
||||||
|
ca.application_organ_name AS applicantName,
|
||||||
|
c.arbitrator_id,ca.identity_num ,ca.identity_type,
|
||||||
|
c.filearbitra_url,
|
||||||
|
c.lock_status,c.version,
|
||||||
|
null as updateSubmitStatus,
|
||||||
|
c.batch_number,1 as pendingStatus
|
||||||
|
from case_log_record r
|
||||||
|
join case_application c on r.case_appli_id=c.id and r.case_node!=c.case_status
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||||
|
WHERE
|
||||||
|
r.create_by=#{loginUserName} AND ca.identity_type=1
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</trim>
|
||||||
|
) t1
|
||||||
|
<where>
|
||||||
|
<if test="caseStatus != null">
|
||||||
|
AND t1.case_status = #{caseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="lockStatus != null">
|
||||||
|
AND t1.lock_status = #{lockStatus}
|
||||||
|
</if>
|
||||||
|
<if test="caseNum != null and caseNum != ''">
|
||||||
|
AND t1.case_num = #{caseNum}
|
||||||
|
</if>
|
||||||
|
<if test="nameId != null and nameId != ''">
|
||||||
|
AND t1.application_organ_id=#{nameId} AND t1.identity_type=1
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
</if>
|
order by t1.pendingStatus asc,t1.case_num desc
|
||||||
</trim>
|
|
||||||
) t1
|
|
||||||
|
|
||||||
order by t1.case_num desc
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -563,15 +506,6 @@
|
|||||||
and
|
and
|
||||||
instr (t.arbitrator_id,#{userId})>0)
|
instr (t.arbitrator_id,#{userId})>0)
|
||||||
</if>
|
</if>
|
||||||
<!--法律顾问秘书-->
|
|
||||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
|
||||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
|
||||||
<!-- and t.application_organ_id in-->
|
|
||||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
|
||||||
<!-- #{item}-->
|
|
||||||
<!-- </foreach> )-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!--申请人-->
|
<!--申请人-->
|
||||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||||
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
||||||
@@ -663,14 +597,6 @@
|
|||||||
and
|
and
|
||||||
instr (t.arbitrator_id,#{userId})>0)
|
instr (t.arbitrator_id,#{userId})>0)
|
||||||
</if>
|
</if>
|
||||||
<!--法律顾问-->
|
|
||||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
|
||||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
|
||||||
<!-- and t.application_organ_id in-->
|
|
||||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
|
||||||
<!-- #{item}-->
|
|
||||||
<!-- </foreach> )-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!--申请人-->
|
<!--申请人-->
|
||||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||||
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
||||||
@@ -702,37 +628,7 @@
|
|||||||
</where>
|
</where>
|
||||||
union
|
union
|
||||||
</if>
|
</if>
|
||||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
||||||
<!-- <!–申请人案件–>-->
|
|
||||||
|
|
||||||
<!-- select l.case_appli_id id ,-->
|
|
||||||
<!-- c.case_status,ca.application_organ_id,-->
|
|
||||||
<!-- c.arbitrator_id,ca.identity_num , ca.identity_type-->
|
|
||||||
<!-- from case_application c-->
|
|
||||||
<!-- JOIN case_application_log l ON c.id = l.case_appli_id-->
|
|
||||||
<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version-->
|
|
||||||
<!-- <where>-->
|
|
||||||
<!-- (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1-->
|
|
||||||
|
|
||||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
||||||
<!-- AND ca.application_organ_id = #{applicationOrganId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="caseStatus != null">-->
|
|
||||||
<!-- AND c.case_status = #{caseStatus}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="caseNum != null and caseNum != ''">-->
|
|
||||||
<!-- AND c.case_num = #{caseNum}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- <if test="nameId != null and nameId != ''">-->
|
|
||||||
<!-- AND ca.application_organ_id=#{nameId}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
|
|
||||||
<!-- <if test="lockStatus != null">-->
|
|
||||||
<!-- AND c.lock_status = #{lockStatus}-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!-- </where>-->
|
|
||||||
<!-- union-->
|
|
||||||
<!-- </if>-->
|
|
||||||
<!--秘书案件-->
|
<!--秘书案件-->
|
||||||
<if test="deptIds != null and deptIds.size() > 0">
|
<if test="deptIds != null and deptIds.size() > 0">
|
||||||
|
|
||||||
@@ -904,7 +800,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into case_application(
|
insert into case_application(
|
||||||
<if test="id != null''">id ,</if>
|
<if test="id != null">id ,</if>
|
||||||
<if test="caseName != null and caseName != ''">case_name ,</if>
|
<if test="caseName != null and caseName != ''">case_name ,</if>
|
||||||
<if test="caseNum != null and caseNum != ''">case_num,</if>
|
<if test="caseNum != null and caseNum != ''">case_num,</if>
|
||||||
<if test="caseSubjectAmount != null">case_subject_amount,</if>
|
<if test="caseSubjectAmount != null">case_subject_amount,</if>
|
||||||
@@ -938,7 +834,7 @@
|
|||||||
batch_number,
|
batch_number,
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="id != null''">#{id} ,</if>
|
<if test="id != null">#{id} ,</if>
|
||||||
<if test="caseName != null and caseName != ''">#{caseName},</if>
|
<if test="caseName != null and caseName != ''">#{caseName},</if>
|
||||||
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
<if test="caseNum != null and caseNum != ''">#{caseNum},</if>
|
||||||
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
|
<if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
|
||||||
@@ -1143,7 +1039,22 @@
|
|||||||
where id in
|
where id in
|
||||||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>;
|
||||||
|
delete from case_affiliate
|
||||||
|
where case_appli_id in
|
||||||
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>;
|
||||||
|
delete from case_attach
|
||||||
|
where case_appli_id in
|
||||||
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>;
|
||||||
|
delete from column_value
|
||||||
|
where case_id in
|
||||||
|
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>;
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
<select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||||
|
|||||||
@@ -42,10 +42,45 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
<select id="selectSealSignRecordbyStat" parameterType="SealSignRecord" resultMap="SealSignRecordResult">
|
||||||
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id
|
SELECT s.id ,s.case_appli_id ,s.file_id ,s.sign_flow_id,s.sign_flow_status
|
||||||
from seal_sign_record s
|
from seal_sign_record s join case_application c on s.case_appli_id=c.id
|
||||||
where s.sign_flow_status in (1,2)
|
where s.sign_flow_status in (1,2)
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectSealSigning" resultType="com.ruoyi.wisdomarbitrate.domain.CaseApplication">
|
||||||
|
SELECT s.sign_flow_id signFlowId,c.id id,c.case_status caseStatus,
|
||||||
|
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||||
|
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||||
|
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||||
|
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||||
|
when 12 then '待部门长审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||||
|
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||||
|
when 18 then '待仲裁员审核仲裁文书'
|
||||||
|
when 31 then '待修改开庭时间'
|
||||||
|
ELSE '无案件状态'
|
||||||
|
END caseStatusName,
|
||||||
|
c.case_subject_amount caseSubjectAmount,c.case_num caseNum,c.hear_date hearDate,
|
||||||
|
ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,
|
||||||
|
c.arbitrat_method arbitratMethod ,
|
||||||
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||||
|
ELSE '无审理方式'
|
||||||
|
END arbitratMethodName,
|
||||||
|
c.arbitrator_id arbitratorId,
|
||||||
|
c.arbitrator_name arbitratorName
|
||||||
|
from seal_sign_record s
|
||||||
|
join case_application c on s.case_appli_id=c.id
|
||||||
|
JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||||
|
<!-- where s.sign_flow_status in (0,1,2)-->
|
||||||
|
<where>
|
||||||
|
<if test="penSonAccount != null and penSonAccount!='' ">
|
||||||
|
AND s.penson_account = #{penSonAccount}
|
||||||
|
</if>
|
||||||
|
<if test="caseStatus != null and caseStatus!='' ">
|
||||||
|
AND c.case_status = #{caseStatus}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
order by c.case_num desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
<update id="updataSealSignRecord" parameterType="SealSignRecord">
|
||||||
update seal_sign_record
|
update seal_sign_record
|
||||||
|
|||||||
Reference in New Issue
Block a user