1.1.4发版 #165
@@ -391,7 +391,7 @@ public class WxPayElegentTrade implements ElegentTrade {
|
||||
private CloseableHttpClient getWxHttpClient() {
|
||||
try {
|
||||
//这里对秘钥进行加密使用的完全是官网上的代码
|
||||
//TODO 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
|
||||
// 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
|
||||
// 加载商户私钥(privateKey:私钥字符串)
|
||||
String key = FileUtil.readToStr("wxpay_private.key");
|
||||
|
||||
|
||||
+9
-1
@@ -71,6 +71,7 @@ public class MsVideoConferenceController extends BaseController {
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String suffix = getFileExtension(fileName);
|
||||
if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
|
||||
@@ -110,7 +111,7 @@ public class MsVideoConferenceController extends BaseController {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("annexId", caseAttach.getAnnexId());
|
||||
ajax.put("annexType", annexType);
|
||||
// ajax.put("url", url);
|
||||
ajax.put("onlyOfficeFileId", caseAttach.getOnlyOfficeFileId());
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
@@ -174,6 +175,13 @@ public class MsVideoConferenceController extends BaseController {
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 腾讯云短信回调
|
||||
* @param body
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/smsRollBack")
|
||||
public AjaxResult smsRollBack( @RequestBody String body, HttpServletRequest request) {
|
||||
|
||||
@@ -72,7 +72,7 @@ spring:
|
||||
host: 121.40.189.20
|
||||
# 端口,默认为6379
|
||||
port: 6389
|
||||
# 数据库索引,测试环境1,正式环境0
|
||||
# TODO 数据库索引,测试环境1,正式环境0
|
||||
database: 1
|
||||
# 密码
|
||||
password:
|
||||
@@ -131,8 +131,8 @@ mybatis:
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
@@ -166,7 +166,8 @@ elegent:
|
||||
alipay:
|
||||
appId: 2021003141676135
|
||||
callback:
|
||||
domain: http://121.40.189.20:9001/
|
||||
# TODO
|
||||
domain: http://121.40.189.20:7001/
|
||||
watch: true
|
||||
cycle: 10
|
||||
identityAuthentication:
|
||||
@@ -187,14 +188,15 @@ imConfig:
|
||||
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
# 腾讯云密钥
|
||||
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
# 调解机构代码配置
|
||||
# TODO 调解机构代码配置
|
||||
organizeConfig:
|
||||
# creditCode
|
||||
creditCode: 910000058386410047
|
||||
# 引入仲裁系统url配置
|
||||
creditCode: 910000870060480009
|
||||
# TODO 引入仲裁系统url配置
|
||||
arbitrateConfig:
|
||||
url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication
|
||||
# 回调通知
|
||||
smsURL: http://121.40.189.20:9001/callArbitrateCaseApplication/sendSms
|
||||
# TODO 回调通知
|
||||
signSealCallbackConfig:
|
||||
url: http://121.40.189.20:7001/mssignSeal/signSeaalCaseApplicaCallback
|
||||
# onlyOffice系统url配置
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.springframework.web.bind.WebDataBinder;
|
||||
import org.springframework.web.bind.annotation.InitBinder;
|
||||
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -83,6 +84,9 @@ public class BaseController
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected TableDataInfo getDataTable(List<?> list)
|
||||
{
|
||||
if(list == null){
|
||||
list=new ArrayList<>();
|
||||
}
|
||||
TableDataInfo rspData = new TableDataInfo();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
|
||||
@@ -143,6 +143,7 @@ public interface SysUserMapper
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
||||
SysUser selectUserByPhone(@Param("phonenumber")String phonenumber);
|
||||
/**
|
||||
* 根据邮箱查询用户信息
|
||||
* @param email
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.ruoyi.system.domain.entity.log.MsRequestLog;
|
||||
|
||||
/**
|
||||
* @Classname MsRequestLogService
|
||||
* @Description TODO
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/2 14:18
|
||||
* @Created wangqiong
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Classname MsRequestLogServiceImpl
|
||||
* @Description TODO
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/2 14:19
|
||||
* @Created wangqiong
|
||||
|
||||
+4
-1
@@ -1,11 +1,13 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SendMailRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -49,6 +51,7 @@ public class SendMailRecord extends BaseEntity {
|
||||
|
||||
/** 邮件发件人地址 */
|
||||
private String mailFromAddress;
|
||||
private List<MsCaseAttach> caseAttachList;
|
||||
|
||||
|
||||
public Integer getSendStatus() {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
|
||||
|
||||
/**
|
||||
* @Classname MsCaseAffiliateParent
|
||||
* @Description TODO
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/3/27 16:05
|
||||
* @Created wangqiong
|
||||
|
||||
+4
-1
@@ -115,6 +115,10 @@ public class MsCaseApplicationReq {
|
||||
* 申请人邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 角色类别
|
||||
*/
|
||||
@@ -127,6 +131,5 @@ public class MsCaseApplicationReq {
|
||||
/**
|
||||
* 是否需要用印,0-不需要,1-需要
|
||||
*/
|
||||
// todo 等会放开
|
||||
private Integer sealFlag=1;
|
||||
}
|
||||
+12
@@ -29,6 +29,10 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
||||
* 被申请人姓名
|
||||
*/
|
||||
private String respondentName;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String creatBy;
|
||||
|
||||
/**
|
||||
* 案件相关人员
|
||||
@@ -95,6 +99,14 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
||||
* 是否财务,部门长,秘书,0-否,1-是
|
||||
*/
|
||||
private Integer otherFlag;
|
||||
/**
|
||||
* 第三方代理人,0-否,1-是
|
||||
*/
|
||||
private Integer agentFlag;
|
||||
/**
|
||||
* 调解员,0-否,1-是
|
||||
*/
|
||||
private Integer mediatorFlag;
|
||||
/**
|
||||
* 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
|
||||
*/
|
||||
|
||||
+7
@@ -50,4 +50,11 @@ public interface MsCaseAttachMapper {
|
||||
* @return
|
||||
*/
|
||||
int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
|
||||
|
||||
/**
|
||||
* 根据ids查询
|
||||
* @param fileIds
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAttach> selectByIds(@Param("ids") List<String> fileIds);
|
||||
}
|
||||
|
||||
-1
@@ -232,7 +232,6 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
|
||||
@Override
|
||||
public AjaxResult selectPCEIDtokenStatus(String eidToken) {
|
||||
// todo 送达时需要判断是否有pdf版的调解书,没有则不送达,签名完后下载pdf时不删除之前的doc调解书,上传调解书时,pdf的需要将类型设为13,异步发送短信邮件时将登录用户传参过来
|
||||
// todo E证通审核过后将PC端的机器id在YML文件中改掉
|
||||
JSONObject objJSON = null;
|
||||
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||
|
||||
+5
-3
@@ -57,15 +57,17 @@ public interface MsCaseApplicationService {
|
||||
* @param affiliate
|
||||
* @param groupOrder 组别
|
||||
* @param operatorCount 操作人数量
|
||||
* @param updateFlag 是否修改案件
|
||||
*/
|
||||
public int setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder,int operatorCount);
|
||||
public int setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder,int operatorCount,boolean updateFlag);
|
||||
/**
|
||||
* 新增案件相关人员信息
|
||||
* @param affiliate 相关人员信息
|
||||
* @param roleId 角色id
|
||||
* @param roleIdList 角色id
|
||||
* @param updateFlag 是否修改案件
|
||||
|
||||
*/
|
||||
public void insertAfficateUser(MsCaseAffiliate affiliate, List<Long> roleIdList);
|
||||
public void insertAfficateUser(MsCaseAffiliate affiliate, List<Long> roleIdList,boolean updateFlag);
|
||||
|
||||
/**
|
||||
* 新增案件
|
||||
|
||||
+87
-34
@@ -211,7 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
startPage();
|
||||
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
|
||||
// 设置申请人被申请人及签名按钮限
|
||||
setAfflicate(new HashMap<>(),list,loginUser.getUserId(),roles);
|
||||
setAfflicate(new HashMap<>(),list,loginUser,roles,false);
|
||||
return list;
|
||||
}
|
||||
if(CollectionUtil.isEmpty(roles) ){
|
||||
@@ -238,6 +238,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
|
||||
// 是否查询所有
|
||||
boolean isSelectAll = false;
|
||||
// 是否嗲三方代理人
|
||||
boolean agentFlag = false;
|
||||
|
||||
for (SysRole role : roles) {
|
||||
if(StrUtil.isNotEmpty(role.getRoleName())){
|
||||
@@ -251,6 +253,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(StrUtil.equals(role.getRoleName(),"调解员")) {
|
||||
req.setMediatorId(String.valueOf(sysUser.getUserId()));
|
||||
}
|
||||
if(StrUtil.contains(role.getRoleName(),"代理")) {
|
||||
req.setCreateBy(String.valueOf(sysUser.getUserName()));
|
||||
agentFlag=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isSelectAll){
|
||||
@@ -265,7 +271,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
// 查询案件列表
|
||||
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
|
||||
// 设置申请人被申请人及签名按钮限
|
||||
setAfflicate(flowNameMap,list,loginUser.getUserId(),roles);
|
||||
setAfflicate(flowNameMap,list,loginUser,roles,agentFlag);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -273,9 +279,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
* 设置申请人被申请人及签名按钮限
|
||||
* @param
|
||||
* @param list
|
||||
* @param loginUserId 当前登录用户id
|
||||
* @param loginUser 当前登录用户
|
||||
*/
|
||||
private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
|
||||
private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,LoginUser loginUser, List<SysRole> roles , boolean agentFlag) {
|
||||
if(CollectionUtil.isEmpty(list)){
|
||||
return;
|
||||
}
|
||||
@@ -294,8 +300,26 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
|
||||
for (MsCaseApplicationVO vo : list) {
|
||||
if(vo.getMediatorId()!=null&&vo.getMediatorId().equals(loginUserId)){
|
||||
if(vo.getMediatorId()!=null&&vo.getMediatorId().equals(loginUser.getUserId())){
|
||||
isMediatorRole=true;
|
||||
vo.setMediatorFlag(1);
|
||||
}else {
|
||||
vo.setMediatorFlag(0);
|
||||
}
|
||||
// 第三方代理人标志
|
||||
if(StrUtil.isNotEmpty(vo.getCreatBy())){
|
||||
if(StrUtil.isEmpty(loginUser.getUsername())){
|
||||
vo.setAgentFlag(0);
|
||||
}else {
|
||||
// todo 如果案件流程id变了需要改
|
||||
if(StrUtil.equals(loginUser.getUsername(),vo.getCreatBy()) && agentFlag && vo.getCaseFlowId()!=null && mediatorSort!=null && vo.getCaseFlowId()<mediatorSort){
|
||||
vo.setAgentFlag(1);
|
||||
}else {
|
||||
vo.setAgentFlag(0);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
vo.setAgentFlag(0);
|
||||
}
|
||||
// 设置申请人和被申请人
|
||||
if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
|
||||
@@ -308,34 +332,34 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
|
||||
if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 2)) {
|
||||
// 申请人操作人
|
||||
if(affiliate.getUserId().equals(loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
|
||||
if(affiliate.getUserId().equals(loginUser.getUserId()) &&!vo.getCaseStatusName().equals("待签名")){
|
||||
vo.setAppOperatorFlag(1);
|
||||
}else if(vo.getCaseStatusName().equals("待签名")) {
|
||||
if(affiliate.getUserId().equals(loginUserId)){
|
||||
if(affiliate.getUserId().equals(loginUser.getUserId())){
|
||||
vo.setAppOperatorFlag(1);
|
||||
}else {
|
||||
vo.setAppOperatorFlag(0);
|
||||
}
|
||||
}
|
||||
// 签收按钮权限
|
||||
if(affiliate.getUserId().equals(loginUserId) &&vo.getCaseStatusName().equals("待申请人签收")){
|
||||
if(affiliate.getUserId().equals(loginUser.getUserId()) &&vo.getCaseStatusName().equals("待申请人签收")){
|
||||
vo.setSignFlag(1);
|
||||
}
|
||||
|
||||
}
|
||||
if (vo.getResOperatorFlag() == null && (affiliate.getRoleType() == 3 || affiliate.getRoleType() == 4)) {
|
||||
// 被申请人操作人
|
||||
if(Objects.equals(affiliate.getUserId(), loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
|
||||
if(Objects.equals(affiliate.getUserId(), loginUser.getUserId()) &&!vo.getCaseStatusName().equals("待签名")){
|
||||
vo.setResOperatorFlag(1);
|
||||
}else if(vo.getCaseStatusName().equals("待签名")) {
|
||||
if(Objects.equals(affiliate.getUserId(), loginUserId)){
|
||||
if(Objects.equals(affiliate.getUserId(), loginUser.getUserId())){
|
||||
vo.setResOperatorFlag(1);
|
||||
}else {
|
||||
vo.setResOperatorFlag(0);
|
||||
}
|
||||
}
|
||||
// 签收按钮权限
|
||||
if(affiliate.getUserId().equals(loginUserId) &&vo.getCaseStatusName().equals("待被申请人签收")){
|
||||
if(affiliate.getUserId().equals(loginUser.getUserId()) &&vo.getCaseStatusName().equals("待被申请人签收")){
|
||||
vo.setSignFlag(1);
|
||||
}
|
||||
}
|
||||
@@ -402,7 +426,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(StrUtil.contains(role.getRoleName(),"财务")
|
||||
||StrUtil.contains(role.getRoleName(),"法律顾问")
|
||||
||StrUtil.contains(role.getRoleName(),"部门长")
|
||||
||StrUtil.contains(role.getRoleName(),"调解员")
|
||||
// ||StrUtil.contains(role.getRoleName(),"调解员")
|
||||
){
|
||||
vo.setOtherFlag(1);
|
||||
}
|
||||
@@ -483,6 +507,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
// 查询案件列表
|
||||
|
||||
for (SysRole role : roles) {
|
||||
if (StrUtil.isEmpty(role.getRoleName())) {
|
||||
continue;
|
||||
}
|
||||
if(StrUtil.contains(role.getRoleName(),"财务")
|
||||
||StrUtil.contains(role.getRoleName(),"法律顾问")
|
||||
||StrUtil.contains(role.getRoleName(),"部门长")
|
||||
@@ -491,14 +518,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
roleIds=null;
|
||||
|
||||
}
|
||||
if (StrUtil.isNotEmpty(role.getRoleName())) {
|
||||
|
||||
if (StrUtil.equals(role.getRoleName(), "调解员")) {
|
||||
req.setMediatorId(String.valueOf(sysUser.getUserId()));
|
||||
|
||||
}
|
||||
if(StrUtil.contains(role.getRoleName(),"代理")) {
|
||||
req.setCreateBy(String.valueOf(sysUser.getUserName()));
|
||||
}
|
||||
|
||||
}
|
||||
// 如果多个角色中有财务,顾问,部门长,则调解员查询所有
|
||||
// 如果多个角色中有财务,顾问,部门长查询所有
|
||||
if(!isSelectAll){
|
||||
req.setUserId(loginUser.getUserId());
|
||||
}
|
||||
@@ -701,17 +731,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(CollectionUtil.isNotEmpty(applicant)){
|
||||
for (int i = 0; i < applicant.size(); i++) {
|
||||
// 申请人
|
||||
appOperatorCount= setCaseAfflicate(caseApplication, applicant.get(i).getApplicant(),i,appOperatorCount);
|
||||
appOperatorCount= setCaseAfflicate(caseApplication, applicant.get(i).getApplicant(),i,appOperatorCount,false);
|
||||
// 申请人代理人
|
||||
appOperatorCount=setCaseAfflicate(caseApplication, applicant.get(i).getApplicantAgent(),i,appOperatorCount);
|
||||
appOperatorCount=setCaseAfflicate(caseApplication, applicant.get(i).getApplicantAgent(),i,appOperatorCount,false);
|
||||
}
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(res)){
|
||||
for (int i = 0; i < res.size(); i++) {
|
||||
// 申请人
|
||||
resOperatorCount= setCaseAfflicate(caseApplication, res.get(i).getRes(),i,resOperatorCount);
|
||||
resOperatorCount= setCaseAfflicate(caseApplication, res.get(i).getRes(),i,resOperatorCount,false);
|
||||
// 申请人代理人
|
||||
resOperatorCount= setCaseAfflicate(caseApplication, res.get(i).getResAgent(),i,resOperatorCount);
|
||||
resOperatorCount= setCaseAfflicate(caseApplication, res.get(i).getResAgent(),i,resOperatorCount,false);
|
||||
}
|
||||
}
|
||||
if (appOperatorCount < 1 && resOperatorCount < 1) {
|
||||
@@ -769,9 +799,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
* 设置案件相关信息
|
||||
* @param caseApplication
|
||||
* @param affiliate
|
||||
* @param groupOrder 组别
|
||||
* @param operatorCount 操作人数量
|
||||
* @param updateFlag 是否修改案件
|
||||
*/
|
||||
@Transactional
|
||||
public int setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder,int operatorCount) {
|
||||
public int setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder,int operatorCount,boolean updateFlag) {
|
||||
if(affiliate==null){
|
||||
return operatorCount;
|
||||
}
|
||||
@@ -793,8 +826,6 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
affiliate.setCaseAppliId(caseApplication.getId());
|
||||
List<Long> roleIdList = new ArrayList<>();
|
||||
// Long roleId = null;
|
||||
|
||||
switch (affiliate.getRoleType()) {
|
||||
case 1:
|
||||
roleIdList.add((Long) applicantObj);
|
||||
@@ -827,19 +858,28 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
// 如果是申请人,则和用户表关联
|
||||
if (affiliate.getOrganizeFlag() == 0) {
|
||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList);
|
||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag);
|
||||
} else {
|
||||
// 申请机构
|
||||
if (affiliate.getRoleType() == 1 || affiliate.getRoleType()==3) {
|
||||
affiliate.setOperatorFlag(0);
|
||||
// 申请人,从缓存中判断部门是否存在
|
||||
// Object deptCache = redisCache.getCacheObject(CacheConstants.DEPT_KEY + affiliate.getName());
|
||||
SysDept dept = sysDeptMapper.selectDeptByName(affiliate.getName());
|
||||
SysDept dept = null;
|
||||
if(!updateFlag) {
|
||||
// 新增则根据部门名称查
|
||||
dept = sysDeptMapper.selectDeptByName(affiliate.getName());
|
||||
}else {
|
||||
if(affiliate.getApplicantDeptId()!=null){
|
||||
// 修改根据部门id查
|
||||
dept = sysDeptMapper.selectDeptById(affiliate.getApplicantDeptId());
|
||||
}else {
|
||||
dept = sysDeptMapper.selectDeptByName(affiliate.getName());
|
||||
}
|
||||
}
|
||||
if (dept==null) {
|
||||
// 不存在该部门,新增
|
||||
dept = new SysDept();
|
||||
@@ -872,7 +912,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
affiliate.setApplicantDeptId(dept.getDeptId());
|
||||
} else {
|
||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList);
|
||||
caseApplicationService.insertAfficateUser(affiliate, roleIdList, updateFlag);
|
||||
}
|
||||
}
|
||||
// 保存人员
|
||||
@@ -887,15 +927,27 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
* 新增案件相关人员信息
|
||||
* @param affiliate 相关人员信息
|
||||
* @param roleIdList 角色id
|
||||
* @param updateFlag 是否修改案件
|
||||
|
||||
*/
|
||||
@Transactional
|
||||
public void insertAfficateUser(MsCaseAffiliate affiliate, List<Long> roleIdList) {
|
||||
public void insertAfficateUser(MsCaseAffiliate affiliate, List<Long> roleIdList,boolean updateFlag) {
|
||||
|
||||
if(StrUtil.isEmpty(affiliate.getEmail())){
|
||||
return;
|
||||
}
|
||||
SysUser user = sysUserMapper.selectUserByEmail(affiliate.getEmail());
|
||||
SysUser user=null;
|
||||
if(!updateFlag) {
|
||||
// 新增案件则根据邮箱查用户
|
||||
user = sysUserMapper.selectUserByEmail(affiliate.getEmail());
|
||||
}else {
|
||||
// 修改案件则根据userId查用户
|
||||
if(affiliate.getUserId()!=null) {
|
||||
user = sysUserMapper.selectUserById(affiliate.getUserId());
|
||||
}else {
|
||||
user = sysUserMapper.selectUserByEmail(affiliate.getEmail());
|
||||
}
|
||||
}
|
||||
// 判断该用户是否存在
|
||||
if(user==null){
|
||||
// 不存在,则新增
|
||||
@@ -1079,17 +1131,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(CollectionUtil.isNotEmpty(applicant)){
|
||||
for (int i = 0; i < applicant.size(); i++) {
|
||||
// 申请人
|
||||
appOperatorCount=setCaseAfflicate(caseApplication, applicant.get(i).getApplicant(),i,appOperatorCount);
|
||||
appOperatorCount=setCaseAfflicate(caseApplication, applicant.get(i).getApplicant(),i,appOperatorCount,true);
|
||||
// 申请人代理人
|
||||
appOperatorCount= setCaseAfflicate(caseApplication, applicant.get(i).getApplicantAgent(),i,appOperatorCount);
|
||||
appOperatorCount= setCaseAfflicate(caseApplication, applicant.get(i).getApplicantAgent(),i,appOperatorCount,true);
|
||||
}
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(res)){
|
||||
for (int i = 0; i < res.size(); i++) {
|
||||
// 申请人
|
||||
resOperatorCount=setCaseAfflicate(caseApplication, res.get(i).getRes(),i,resOperatorCount);
|
||||
resOperatorCount=setCaseAfflicate(caseApplication, res.get(i).getRes(),i,resOperatorCount,true);
|
||||
// 申请人代理人
|
||||
resOperatorCount=setCaseAfflicate(caseApplication, res.get(i).getResAgent(),i,resOperatorCount);
|
||||
resOperatorCount=setCaseAfflicate(caseApplication, res.get(i).getResAgent(),i,resOperatorCount,true);
|
||||
}
|
||||
}
|
||||
if (appOperatorCount < 1 && resOperatorCount < 1) {
|
||||
@@ -2442,8 +2494,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
application.setRejectReason(reason);
|
||||
if(application.getCaseFlowId()!=null && application.getCaseFlowId()==4){
|
||||
// todo 超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
|
||||
// 申请人不受理分配通知 // todo 短信异步
|
||||
// 超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
|
||||
// 申请人不受理分配通知 // 短信异步
|
||||
ExecutorService executor = ThreadUtil.createThreadPool();
|
||||
CompletableFuture.runAsync(() -> {
|
||||
String rejectReason = application.getRejectReason() == null ? "" : application.getRejectReason();
|
||||
@@ -2566,6 +2618,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if (CollectionUtil.isEmpty(affiliates)) {
|
||||
throw new ServiceException("未找到案件人员");
|
||||
}
|
||||
// 签名时取用户为申请人角色并且是申请操作人
|
||||
// 申请操作人
|
||||
Optional<MsCaseAffiliate> applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
|
||||
// 被申请操作人
|
||||
|
||||
+53
-139
@@ -77,6 +77,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.google.common.io.Files.getFileExtension;
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||
|
||||
@Slf4j
|
||||
@@ -180,6 +181,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
@Override
|
||||
public SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException {
|
||||
MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(dto.getCaseId());
|
||||
if(application == null){
|
||||
throw new ServiceException("未找到当前案件");
|
||||
}
|
||||
|
||||
Example example = new Example(MsSealSignRecord.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
criteria.andEqualTo("caseAppliId", dto.getCaseId());
|
||||
@@ -200,6 +206,23 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
|
||||
String url = signUrlData.get("shortUrl").getAsString();
|
||||
sealSignRecordReslt.setSealUrl(url);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(StrUtil.isEmpty(SecurityUtils.getUsername())){
|
||||
throw new ServiceException("未获取到当前登录用户");
|
||||
}
|
||||
SysUser sysUser = sysUserMapper.selectUserByUserName(SecurityUtils.getUsername());
|
||||
if(sysUser==null){
|
||||
throw new ServiceException("未获取到当前登录用户");
|
||||
}
|
||||
// 新增用印日志
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
operLog.setCreateNickName(sysUser.getNickName());
|
||||
operLog.setCaseStatusName(application.getCaseStatusName());
|
||||
operLog.setCaseAppliId(application.getId());
|
||||
operLog.setCaseNode(application.getCaseFlowId());
|
||||
operLog.setCreateTime(new Date());
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
|
||||
}
|
||||
return sealSignRecordReslt;
|
||||
}
|
||||
@@ -316,7 +339,12 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if (record.getCreateTime() != null) {
|
||||
caseNodeTime = DateUtil.format(record.getCreateTime(), DatePattern.NORM_DATETIME_FORMATTER);
|
||||
}
|
||||
|
||||
Integer caseNode = record.getCaseNode();
|
||||
if(caseNode!=null) {
|
||||
if(caseNode.equals(17)){
|
||||
contentBuilder.append("调解案件于").append(caseNodeTime).append("结束");
|
||||
}else {
|
||||
String createBy = record.getCreateBy();
|
||||
if (StrUtil.isNotEmpty(createBy)) {
|
||||
contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime);
|
||||
@@ -332,7 +360,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
if (StrUtil.isNotEmpty(record.getNotes())) {
|
||||
contentBuilder.append(",").append(record.getNotes());
|
||||
}
|
||||
}
|
||||
record.setContent(contentBuilder.toString());
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
@@ -667,11 +697,15 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
JSONObject operator = jsonObjectCallback.getJSONObject("operator");
|
||||
JSONObject psnAccount = operator.getJSONObject("psnAccount");
|
||||
String accountMobile = psnAccount.getString("accountMobile");
|
||||
// 根据电话查询用户名
|
||||
SysUser sysUser = sysUserMapper.selectUserByPhone(accountMobile);
|
||||
|
||||
Example msSealSignRecordExample = new Example(MsSealSignRecord.class);
|
||||
msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId);
|
||||
MsSealSignRecord sealSignRecordsel = sealSignRecordMapper.selectOneByExample(msSealSignRecordExample);
|
||||
|
||||
if(sealSignRecordsel==null){
|
||||
return error("未找到签署流程");
|
||||
}
|
||||
String pensonAccountApply = sealSignRecordsel.getPensonAccount();
|
||||
String orgnNamePsnAcc = sealSignRecordsel.getOrgnNamePsnAcc();
|
||||
String pensonAccountRes = sealSignRecordsel.getPensonAccountRes();
|
||||
@@ -701,6 +735,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sealSignRecordsel.setSignStatusApply(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(sysUser!=null){
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
}
|
||||
operLog.setCreateNickName(pensonName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
@@ -742,6 +779,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sealSignRecordsel.setSignStatusResponse(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(sysUser!=null){
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
}
|
||||
operLog.setCreateNickName(pensonNameRes);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
@@ -784,6 +824,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sealSignRecordsel.setSignStatusMediator(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(sysUser!=null){
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
}
|
||||
operLog.setCreateNickName(pensonNameMedi);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
@@ -826,13 +869,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sealSignRecordsel.setSealStatus(1);
|
||||
sealSignRecordsel.setSignFlowStatus(3);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
operLog.setCreateNickName(orgnNamePsnName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
operLog.setCaseNode(caseNode);
|
||||
operLog.setCreateTime(dateOperate);
|
||||
caseLogRecordMapper.insert(operLog);
|
||||
|
||||
|
||||
// 根据流程id查找下一个流程节点
|
||||
MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
|
||||
@@ -854,6 +891,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sealSignRecordsel.setSignStatusApply(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(sysUser!=null){
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
}
|
||||
operLog.setCreateNickName(pensonName);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
@@ -874,77 +914,16 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
//下载审核完成的调解书
|
||||
msSignSealService.downloadMediationBook(caseApplicationselect, signFlowId, gson, caseAppliId);
|
||||
// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
// if (filesArray != null && filesArray.size() > 0) {
|
||||
// JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
// String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
// LocalDate now = LocalDate.now();
|
||||
// String year = Integer.toString(now.getYear());
|
||||
// String month = String.format("%02d", now.getMonthValue());
|
||||
// String day = String.format("%02d", now.getDayOfMonth());
|
||||
// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
// String saveName = fileName;
|
||||
// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
//
|
||||
// // 创建日期目录
|
||||
// File saveFolder = new File(saveFolderPath);
|
||||
// if (!saveFolder.exists()) {
|
||||
// saveFolder.mkdirs();
|
||||
// }
|
||||
// String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
// File resultFilePathFile = new File(resultFilePath);
|
||||
// if (!resultFilePathFile.exists()) {
|
||||
// resultFilePathFile.createNewFile();
|
||||
// }
|
||||
//
|
||||
// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
// if (downLoadFile) {
|
||||
// // 先删除已经存在的调解书
|
||||
// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
||||
// List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||
// if(CollectionUtil.isNotEmpty(existAttach)){
|
||||
// // 对接北明,同步案件状态,删除
|
||||
// for (MsCaseAttach msCaseAttach : existAttach) {
|
||||
// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
||||
// continue;
|
||||
// }
|
||||
// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||
// MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
// caseAttach.setCaseAppliId(caseAppliId);
|
||||
// caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||
// caseAttach.setAnnexPath(savePath);
|
||||
// caseAttach.setAnnexName(saveName);
|
||||
// caseAttachMapper.save(caseAttach);
|
||||
// // 对接北明,调用上传附件接口
|
||||
// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
||||
// String templatePath = "/home/ruoyi" + savePath;
|
||||
// File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
||||
// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
||||
// // 更新附件表
|
||||
// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
||||
// caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
||||
// msCaseAttachMapper.updateCaseAttachBycaseid(caseAttach);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
} else if (StringUtils.isNotEmpty(accountMobile) && accountMobile.equals(pensonAccountRes)) {
|
||||
//被申请人签名
|
||||
sealSignRecordsel.setSignStatusResponse(1);
|
||||
sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
|
||||
MsCaseLogRecord operLog = new MsCaseLogRecord();
|
||||
if(sysUser!=null){
|
||||
operLog.setCreateBy(sysUser.getUserName());
|
||||
}
|
||||
operLog.setCreateNickName(pensonNameRes);
|
||||
operLog.setCaseStatusName(caseStatusName);
|
||||
operLog.setCaseAppliId(caseAppliId);
|
||||
@@ -965,71 +944,6 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
|
||||
//下载审核完成的调解书
|
||||
msSignSealService.downloadMediationBook(caseApplicationselect, signFlowId, gson, caseAppliId);
|
||||
// EsignHttpResponse fileDownload = SaaSAPIFileUtils.fileDownloadUrl(signFlowId);
|
||||
// JsonObject fileDownloadJsonObject = gson.fromJson(fileDownload.getBody(), JsonObject.class);
|
||||
// JsonObject fileDownloadData = fileDownloadJsonObject.getAsJsonObject("data");
|
||||
// JsonArray filesArray = fileDownloadData.get("files").getAsJsonArray();
|
||||
// if (filesArray != null && filesArray.size() > 0) {
|
||||
// JsonObject fileObject = (JsonObject) filesArray.get(0);
|
||||
// String fileDownloadUrl = fileObject.get("downloadUrl").toString();
|
||||
// LocalDate now = LocalDate.now();
|
||||
// String year = Integer.toString(now.getYear());
|
||||
// String month = String.format("%02d", now.getMonthValue());
|
||||
// String day = String.format("%02d", now.getDayOfMonth());
|
||||
// String saveFolderPath = "/home/ruoyi/uploadPath/upload/" + year + "/" + month + "/" + day;
|
||||
// String fileName = UUID.randomUUID().toString().replace("-", "") + ".pdf";
|
||||
// String saveName = fileName;
|
||||
// String savePath = "/profile/upload/" + year + "/" + month + "/" + day + "/" + fileName;
|
||||
//
|
||||
// // 创建日期目录
|
||||
// File saveFolder = new File(saveFolderPath);
|
||||
// if (!saveFolder.exists()) {
|
||||
// saveFolder.mkdirs();
|
||||
// }
|
||||
// String resultFilePath = saveFolderPath + "/" + fileName;
|
||||
// File resultFilePathFile = new File(resultFilePath);
|
||||
// if (!resultFilePathFile.exists()) {
|
||||
// resultFilePathFile.createNewFile();
|
||||
// }
|
||||
//
|
||||
// String fileDownloadUrlnew = fileDownloadUrl.substring(1, fileDownloadUrl.length() - 1);
|
||||
// boolean downLoadFile = FileTransformation.downLoadFileByUrl(fileDownloadUrlnew, resultFilePath);
|
||||
// if (downLoadFile) {
|
||||
// // 先删除已经存在的调解书
|
||||
// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource())){
|
||||
// List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||
// if(CollectionUtil.isNotEmpty(existAttach)){
|
||||
// // 对接北明,同步案件状态,删除
|
||||
// for (MsCaseAttach msCaseAttach : existAttach) {
|
||||
// if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
|
||||
// continue;
|
||||
// }
|
||||
// beiMingInterfaceService.deleteAttachmentInfo(caseApplicationselect.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAppliId, AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||
// MsCaseAttach caseAttach = new MsCaseAttach();
|
||||
// caseAttach.setCaseAppliId(caseAppliId);
|
||||
// caseAttach.setAnnexType(7);
|
||||
// caseAttach.setAnnexPath(savePath);
|
||||
// caseAttach.setAnnexName(saveName);
|
||||
//
|
||||
// // 对接北明,调用上传附件接口
|
||||
//
|
||||
// if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
|
||||
// String templatePath = "/home/ruoyi" + savePath;
|
||||
// File file = new File(templatePath.replace("/profile", "/uploadPath"));
|
||||
// MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
|
||||
// // 更新附件表
|
||||
// if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
|
||||
// caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
||||
// }
|
||||
// }
|
||||
// caseAttachMapper.save(caseAttach);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1244,7 +1158,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sendMailRecord.setSendTime(new Date());
|
||||
sendMailRecord.setMailSubject("签署后的调解书");
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
sendMailRecord.setFileIds(fileId != null ? fileId.toString() : null);
|
||||
sendMailRecord.setFileIds(fileId != null ? fileId.toString() : "");
|
||||
// sendMailRecord.setCreateBy(SecurityUtils.getUsername());
|
||||
sendMailRecord.setCreateTime(new Date());
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
|
||||
+10
@@ -3,6 +3,8 @@ package com.ruoyi.wisdomarbitrate.service.mscase.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
@@ -108,6 +110,9 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
BeiMingInterfaceService beiMingInterfaceService;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
// 仲裁短信回调
|
||||
@Value("${arbitrateConfig.smsURL}")
|
||||
private String smsURL;
|
||||
|
||||
/**
|
||||
视频回调
|
||||
@@ -173,6 +178,11 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
smsSendRecord.setReason(description != null ? description.toString() : null);
|
||||
}
|
||||
smsRecordMapper.updateStatus(smsSendRecord);
|
||||
}else {
|
||||
// 查找仲裁系统,调用仲裁系统短信接口
|
||||
HttpResponse httpResponse = HttpRequest.post(smsURL)
|
||||
.body(JSONUtil.toJsonStr(jsonObject))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+38
-4
@@ -1,5 +1,8 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.sendrecord.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.EmailOutUtil;
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
|
||||
@@ -14,10 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
@@ -28,6 +30,31 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
@Override
|
||||
public List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord) {
|
||||
List<SendMailRecord> records = sendMailRecordMapper.selectSendMailRecord(sendMailRecord);
|
||||
if(CollectionUtil.isNotEmpty(records)){
|
||||
Map<Long, String> recordmap = records.stream().filter(record -> StrUtil.isNotEmpty(record.getFileIds())).collect(Collectors.toMap(SendMailRecord::getId, SendMailRecord::getFileIds, (k1, k2) -> k2));
|
||||
List<String> fileIds = new ArrayList<>(recordmap.values());
|
||||
if(CollectionUtil.isNotEmpty(fileIds)){
|
||||
List<MsCaseAttach> caseAttaches= msCaseAttachMapper.selectByIds(fileIds);
|
||||
if(CollectionUtil.isNotEmpty(caseAttaches)){
|
||||
Map<Long, MsCaseAttach> attachMap = caseAttaches.stream().collect(Collectors.toMap(MsCaseAttach::getAnnexId, Function.identity(), (k1, k2) -> k2));
|
||||
for (SendMailRecord record : records) {
|
||||
List<MsCaseAttach> msCaseAttaches = new ArrayList<>();
|
||||
if(recordmap.containsKey(record.getId())){
|
||||
String fileIdStr = recordmap.get(record.getId());
|
||||
if(ObjectUtil.isNotNull(fileIdStr) ) {
|
||||
String[] splitFileId = fileIdStr.split(",");
|
||||
for (String fileId : splitFileId) {
|
||||
if (ObjectUtil.isNotNull(fileId) && attachMap.containsKey(Long.parseLong(fileId))) {
|
||||
msCaseAttaches.add(attachMap.get(Long.parseLong(fileId)));
|
||||
}
|
||||
}
|
||||
record.setCaseAttachList(msCaseAttaches);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
@@ -50,6 +77,13 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
msSendMailHistoryRecord.setId(null);
|
||||
msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
|
||||
sendMailRecord.setUpdateTime(new Date());
|
||||
if(CollectionUtil.isNotEmpty(sendMailRecord.getCaseAttachList())){
|
||||
List<Long> fileIdList = sendMailRecord.getCaseAttachList().stream().map(MsCaseAttach::getAnnexId).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(fileIdList)){
|
||||
String fileIdStr = StrUtil.join(",", fileIdList);
|
||||
sendMailRecord.setFileIds(fileIdStr);
|
||||
}
|
||||
}
|
||||
sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
|
||||
return AjaxResult.success("编辑成功");
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* @Classname SMSTemplateService
|
||||
* @Description TODO
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/16 11:39
|
||||
* @Created wangqiong
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Classname SMSTemplateServiceImpl
|
||||
* @Description TODO
|
||||
* @Description
|
||||
* @Version 1.0.0
|
||||
* @Date 2024/4/16 11:40
|
||||
* @Created wangqiong
|
||||
@@ -68,7 +68,7 @@ public class SMSTemplateServiceImpl implements SMSTemplateService {
|
||||
for (MsSmsTemplateParam templateParam : template.getTemplateParams()) {
|
||||
templateParam.setSmsTemplateId(template.getId());
|
||||
}
|
||||
// todo 先删除
|
||||
// 先删除
|
||||
Example paramExam = new Example(MsSmsTemplateParam.class);
|
||||
paramExam.createCriteria().andEqualTo("smsTemplateId", template.getId());
|
||||
templateParamMapper.deleteByExample(paramExam);
|
||||
|
||||
+1
-1
@@ -163,7 +163,7 @@ public class FixSelectFlowDetailUtils {
|
||||
/**
|
||||
* 定时查询印章审核状态
|
||||
*/
|
||||
@Scheduled(cron = "0/30 * * * * ?")
|
||||
// @Scheduled(cron = "0/30 * * * * ?")
|
||||
@Transactional
|
||||
public void searchForInstitutionalSeal() {
|
||||
try {
|
||||
|
||||
@@ -180,6 +180,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join ms_sys_role r on r.role_id = ur.role_id
|
||||
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
|
||||
</select>
|
||||
<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
|
||||
select u.*
|
||||
from ms_sys_user u
|
||||
where u.phonenumber = #{phonenumber} order by u.create_time limit 1
|
||||
</select>
|
||||
<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
|
||||
select u.*,ur.role_id
|
||||
from ms_sys_user u
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@
|
||||
</select>
|
||||
<select id="selectByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate">
|
||||
select c.id caseAppliId,r.role_id roleId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
|
||||
u.email,u.user_name userName,
|
||||
u.email,u.user_name userName,a.applicant_dept_id applicantDeptId,
|
||||
(case when a.user_id is null then d.dept_name else u.nick_name end) name,
|
||||
(case when a.user_id is null then d.home else u.home end) home,
|
||||
(case when a.user_id is null then d.address else u.address end) address,
|
||||
|
||||
+45
-21
@@ -40,18 +40,29 @@
|
||||
JOIN ms_case_affiliate a ON c.id = a.case_appli_id
|
||||
LEFT JOIN ms_sys_user u ON u.user_id = a.user_id
|
||||
LEFT JOIN ms_sys_user u1 ON u1.user_id = c.mediator_id
|
||||
LEFT JOIN ms_sys_user_role ur ON u.user_id = ur.user_id or u1.user_id = ur.user_id
|
||||
LEFT JOIN ms_sys_role r ON r.role_id = ur.role_id or r.role_id = ur.role_id
|
||||
LEFT JOIN ms_sys_user u2 ON u2.user_name = c.create_by
|
||||
LEFT JOIN ms_sys_user_role ur ON u.user_id = ur.user_id OR u1.user_id = ur.user_id or u2.user_id = ur.user_id
|
||||
LEFT JOIN ms_sys_role r ON r.role_id = ur.role_id
|
||||
LEFT JOIN ms_sys_dept d ON d.dept_id = a.applicant_dept_id
|
||||
<where>
|
||||
<!-- 调解员角色和申请人,被申,代理人-->
|
||||
<if test = 'req.mediatorId != null and req.userId!=null'>
|
||||
AND (c.mediator_id = #{req.mediatorId} or a.user_id=#{req.userId})
|
||||
</if>
|
||||
|
||||
<!-- admin,财务,顾问,部门长查看所有案件,申请人,被申,代理人根据userId查-->
|
||||
<if test = 'req.mediatorId == null and req.userId != null'>
|
||||
AND (a.user_id=#{req.userId} )
|
||||
</if>
|
||||
<!-- 第三方代理人,调解员-->
|
||||
<if test = 'req.createBy != null and req.mediatorId == null '>
|
||||
or (c.create_by = #{req.createBy})
|
||||
</if>
|
||||
|
||||
|
||||
<if test = 'req.createBy != null and req.mediatorId != null '>
|
||||
or (c.create_by = #{req.createBy} or c.mediator_id = #{req.mediatorId})
|
||||
</if>
|
||||
<!-- 根据角色查询-->
|
||||
<if test='roleIds != null and roleIds.size() > 0 '>
|
||||
and r.role_id in
|
||||
@@ -75,15 +86,9 @@
|
||||
</if>
|
||||
<!-- 案件编号-->
|
||||
<if test = 'req.caseNum != null and req.caseNum != "" '>
|
||||
AND c.case_num = #{req.caseNum}
|
||||
</if>
|
||||
<!-- 时间-->
|
||||
<if test = 'req.startTime != null and req.startTime != "" '>
|
||||
and c.create_time >= #{req.startTime}
|
||||
</if>
|
||||
<if test = 'req.endTime != null and req.endTime != "" '>
|
||||
and c.create_time <= #{req.endTime}
|
||||
AND c.case_num like concat('%',#{req.caseNum},'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</sql>
|
||||
@@ -113,7 +118,7 @@
|
||||
<select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
|
||||
select t.* from(
|
||||
SELECT
|
||||
c.id,c.seal_flag sealFlag,c.mediator_id mediatorId,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,0 AS pendingStatus,
|
||||
c.id,c.create_by creatBy,c.seal_flag sealFlag,c.mediator_id mediatorId,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,0 AS pendingStatus,
|
||||
c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
|
||||
u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
|
||||
c.mediation_method mediationMethod,
|
||||
@@ -123,7 +128,7 @@
|
||||
c.id
|
||||
union
|
||||
SELECT
|
||||
c.id,c.seal_flag sealFlag,c.mediator_id mediatorId,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,1 AS pendingStatus,
|
||||
c.id,c.create_by creatBy,c.seal_flag sealFlag,c.mediator_id mediatorId,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,1 AS pendingStatus,
|
||||
c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
|
||||
u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
|
||||
c.mediation_method mediationMethod,
|
||||
@@ -149,20 +154,39 @@
|
||||
</if>
|
||||
<!-- 案件编号-->
|
||||
<if test = 'req.caseNum != null and req.caseNum != "" '>
|
||||
AND c.case_num = #{req.caseNum}
|
||||
</if>
|
||||
<!-- 时间-->
|
||||
<if test = 'req.startTime != null and req.startTime != "" '>
|
||||
and c.create_time >= #{req.startTime}
|
||||
</if>
|
||||
<if test = 'req.endTime != null and req.endTime != "" '>
|
||||
and c.create_time <= #{req.endTime}
|
||||
AND c.case_num like concat('%',#{req.caseNum},'%')
|
||||
</if>
|
||||
<!-- <!– 时间–>-->
|
||||
<!-- <if test = 'req.startTime != null and req.startTime != "" '>-->
|
||||
<!-- and c.create_time >= #{req.startTime}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test = 'req.endTime != null and req.endTime != "" '>-->
|
||||
<!-- and c.create_time <= #{req.endTime}-->
|
||||
<!-- </if>-->
|
||||
|
||||
</where>
|
||||
GROUP BY
|
||||
c.id
|
||||
) t ORDER BY t.createTime desc,t.caseNum desc
|
||||
) t <where>
|
||||
<!-- 时间-->
|
||||
<if test = 'req.startTime != null and req.startTime != "" '>
|
||||
and t.createTime >= #{req.startTime}
|
||||
</if>
|
||||
<if test = 'req.endTime != null and req.endTime != "" '>
|
||||
and t.createTime <= #{req.endTime}
|
||||
</if>
|
||||
<!-- 案件状态id条件-->
|
||||
<if test = 'req.caseFlowId != null'>
|
||||
AND t.caseFlowId = #{req.caseFlowId}
|
||||
</if>
|
||||
<if test = 'req.caseId != null'>
|
||||
AND t.id = #{req.caseId}
|
||||
</if>
|
||||
<!-- 案件编号-->
|
||||
<if test = 'req.caseNum != null and req.caseNum != "" '>
|
||||
AND t.caseNum like concat('%',#{req.caseNum},'%')
|
||||
</if>
|
||||
</where> ORDER BY t.createTime desc,t.caseNum desc
|
||||
|
||||
</select>
|
||||
<select id="countCasePerson" resultType="java.lang.Long">
|
||||
|
||||
+8
-1
@@ -157,5 +157,12 @@
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectByIds" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-2
@@ -21,8 +21,7 @@
|
||||
|
||||
<select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord"
|
||||
resultMap="SendMailRecordResult">
|
||||
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
||||
s.update_by ,s.update_time , s.send_status ,s.file_ids ,s.mail_subject ,s.mail_from_address ,c.case_num
|
||||
SELECT s.* ,c.case_num
|
||||
from ms_send_mail_record s left join ms_case_application c
|
||||
on s.case_id = c.id
|
||||
<where>
|
||||
@@ -67,6 +66,7 @@
|
||||
<if test="updateTime != null ">,update_time=#{updateTime}</if>
|
||||
<if test="sendTime != null ">,send_time=#{sendTime}</if>
|
||||
<if test="sendStatus != null ">,send_status=#{sendStatus}</if>
|
||||
<if test="fileIds != null and fileIds != ''">,file_ids=#{fileIds}</if>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="querySendMailRecordById" resultMap="SendMailRecordResult">
|
||||
|
||||
Reference in New Issue
Block a user