diff --git a/pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java b/pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java index d1dfc8c..d157c41 100644 --- a/pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java +++ b/pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java @@ -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"); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java index fb42a37..c85bcd8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/mscase/MsVideoConferenceController.java @@ -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) { diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 89ddc74..25abc34 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -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配置 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java index 8221fc1..7b973ab 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java @@ -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("查询成功"); @@ -112,7 +116,7 @@ public class BaseController */ public AjaxResult success(String message) { - return AjaxResult.success(message); + return AjaxResult .success(message); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java index 1f86de0..d56693b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java @@ -143,6 +143,7 @@ public interface SysUserMapper * @return */ SysUser selectUserByIdCard(@Param("idCard")String identityNo); + SysUser selectUserByPhone(@Param("phonenumber")String phonenumber); /** * 根据邮箱查询用户信息 * @param email diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java index 350f3f5..23c7a63 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java @@ -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 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java index f18e5b4..6711f1c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java @@ -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 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/sendrecord/SendMailRecord.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/sendrecord/SendMailRecord.java index 3b3c9aa..01832af 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/sendrecord/SendMailRecord.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/sendrecord/SendMailRecord.java @@ -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 caseAttachList; public Integer getSendStatus() { diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseAffiliateParent.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseAffiliateParent.java index 0c9943c..018e62e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseAffiliateParent.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseAffiliateParent.java @@ -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 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java index 07df6e6..81e443b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java @@ -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; } \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java index 3e29383..e3aee27 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java @@ -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-是 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java index a3a543c..7f215ca 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java @@ -50,4 +50,11 @@ public interface MsCaseAttachMapper { * @return */ int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId); + + /** + * 根据ids查询 + * @param fileIds + * @return + */ + List selectByIds(@Param("ids") List fileIds); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java index bcdf9e8..57b63ce 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java @@ -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(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java index 3d5bea1..b8e0322 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/MsCaseApplicationService.java @@ -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 roleIdList); + public void insertAfficateUser(MsCaseAffiliate affiliate, List roleIdList,boolean updateFlag); /** * 新增案件 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java index 6414647..949b509 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java @@ -211,7 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService { startPage(); List 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 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 flowNameMap,List list,Long loginUserId, List roles ) { + private void setAfflicate( Map flowNameMap,List list,LoginUser loginUser, List 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() 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 roleIdList) { + public void insertAfficateUser(MsCaseAffiliate affiliate, List 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 applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst(); // 被申请操作人 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java index 5db4cfb..e5a2801 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java @@ -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,23 +339,30 @@ public class MsSignSealServiceImpl implements MsSignSealService { if (record.getCreateTime() != null) { caseNodeTime = DateUtil.format(record.getCreateTime(), DatePattern.NORM_DATETIME_FORMATTER); } - Integer caseNode = record.getCaseNode(); - String createBy = record.getCreateBy(); - if (StrUtil.isNotEmpty(createBy)) { - contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("(").append(record.getCreateBy()).append(")").append("于").append(caseNodeTime); - } else { - contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("于").append(caseNodeTime); - } - if (StrUtil.isNotEmpty(record.getContent())) { - contentBuilder.append(record.getContent()); - } else if (caseNode.intValue() == 0) { - contentBuilder.append(record.getCaseStatusName()); + 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); + } else { + contentBuilder.append(Optional.ofNullable(record.getCreateNickName()).orElse("")).append("于").append(caseNodeTime); + } + + if (StrUtil.isNotEmpty(record.getContent())) { + contentBuilder.append(record.getContent()); + } else if (caseNode.intValue() == 0) { + contentBuilder.append(record.getCaseStatusName()); + } + if (StrUtil.isNotEmpty(record.getNotes())) { + contentBuilder.append(",").append(record.getNotes()); + } + } + record.setContent(contentBuilder.toString()); } - 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 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 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); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java index 297684c..c4e9b90 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java @@ -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(); } } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java index da6676b..8fabb7b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java @@ -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 selectSendMailRecordList(SendMailRecord sendMailRecord) { List records = sendMailRecordMapper.selectSendMailRecord(sendMailRecord); + if(CollectionUtil.isNotEmpty(records)){ + Map recordmap = records.stream().filter(record -> StrUtil.isNotEmpty(record.getFileIds())).collect(Collectors.toMap(SendMailRecord::getId, SendMailRecord::getFileIds, (k1, k2) -> k2)); + List fileIds = new ArrayList<>(recordmap.values()); + if(CollectionUtil.isNotEmpty(fileIds)){ + List caseAttaches= msCaseAttachMapper.selectByIds(fileIds); + if(CollectionUtil.isNotEmpty(caseAttaches)){ + Map attachMap = caseAttaches.stream().collect(Collectors.toMap(MsCaseAttach::getAnnexId, Function.identity(), (k1, k2) -> k2)); + for (SendMailRecord record : records) { + List 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 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 { diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java index 7aafddc..0914776 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java @@ -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 diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/impl/SMSTemplateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/impl/SMSTemplateServiceImpl.java index 18cb7d5..853adff 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/impl/SMSTemplateServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/impl/SMSTemplateServiceImpl.java @@ -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); diff --git a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java index e4320e5..0a1dc64 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java +++ b/ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/utils/FixSelectFlowDetailUtils.java @@ -163,7 +163,7 @@ public class FixSelectFlowDetailUtils { /** * 定时查询印章审核状态 */ - @Scheduled(cron = "0/30 * * * * ?") +// @Scheduled(cron = "0/30 * * * * ?") @Transactional public void searchForInstitutionalSeal() { try { diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 76a5792..b4341cd 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -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 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 @@ - AND c.case_num = #{req.caseNum} - - - - and c.create_time >= #{req.startTime} - - - and c.create_time <= #{req.endTime} + AND c.case_num like concat('%',#{req.caseNum},'%') + + + + + + + GROUP BY c.id - ) t ORDER BY t.createTime desc,t.caseNum desc + ) t + + + and t.createTime >= #{req.startTime} + + + and t.createTime <= #{req.endTime} + + + + AND t.caseFlowId = #{req.caseFlowId} + + + AND t.id = #{req.caseId} + + + + AND t.caseNum like concat('%',#{req.caseNum},'%') + + ORDER BY t.createTime desc,t.caseNum desc + select * + from ms_case_attach + where annex_id in + + #{id} + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml index db15513..1cb40b8 100644 --- a/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml @@ -21,8 +21,7 @@