Bläddra i källkod

Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev

wangqiong123 2 år sedan
förälder
incheckning
b6d27fa7e1

+ 1
- 1
pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java Visa fil

@@ -391,7 +391,7 @@ public class WxPayElegentTrade implements ElegentTrade {
391 391
     private CloseableHttpClient getWxHttpClient() {
392 392
         try {
393 393
             //这里对秘钥进行加密使用的完全是官网上的代码
394
-            //TODO 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
394
+            // 参考官网代码 https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_6_2.shtml
395 395
             // 加载商户私钥(privateKey:私钥字符串)
396 396
             String key = FileUtil.readToStr("wxpay_private.key");
397 397
 

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java Visa fil

@@ -143,6 +143,7 @@ public interface SysUserMapper
143 143
      * @return
144 144
      */
145 145
     SysUser selectUserByIdCard(@Param("idCard")String identityNo);
146
+    SysUser selectUserByPhone(@Param("phonenumber")String phonenumber);
146 147
     /**
147 148
      * 根据邮箱查询用户信息
148 149
      * @param email

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java Visa fil

@@ -4,7 +4,7 @@ import com.ruoyi.system.domain.entity.log.MsRequestLog;
4 4
 
5 5
 /**
6 6
  * @Classname MsRequestLogService
7
- * @Description TODO
7
+ * @Description
8 8
  * @Version 1.0.0
9 9
  * @Date 2024/4/2 14:18
10 10
  * @Created wangqiong

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java Visa fil

@@ -10,7 +10,7 @@ import org.springframework.transaction.annotation.Transactional;
10 10
 
11 11
 /**
12 12
  * @Classname MsRequestLogServiceImpl
13
- * @Description TODO
13
+ * @Description
14 14
  * @Version 1.0.0
15 15
  * @Date 2024/4/2 14:19
16 16
  * @Created wangqiong

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseAffiliateParent.java Visa fil

@@ -2,7 +2,7 @@ package com.ruoyi.wisdomarbitrate.domain.vo.mscase;
2 2
 
3 3
 /**
4 4
  * @Classname MsCaseAffiliateParent
5
- * @Description TODO
5
+ * @Description
6 6
  * @Version 1.0.0
7 7
  * @Date 2024/3/27 16:05
8 8
  * @Created wangqiong

+ 4
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationReq.java Visa fil

@@ -115,6 +115,10 @@ public class MsCaseApplicationReq {
115 115
      * 申请人邮箱
116 116
      */
117 117
     private String email;
118
+    /**
119
+     * 创建人
120
+     */
121
+    private String createBy;
118 122
     /**
119 123
      * 角色类别
120 124
      */
@@ -127,6 +131,5 @@ public class MsCaseApplicationReq {
127 131
     /**
128 132
      * 是否需要用印,0-不需要,1-需要
129 133
      */
130
-    // todo 等会放开
131 134
     private Integer sealFlag=1;
132 135
 }

+ 12
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java Visa fil

@@ -29,6 +29,10 @@ public class MsCaseApplicationVO extends MsCaseApplication {
29 29
      * 被申请人姓名
30 30
      */
31 31
     private String respondentName;
32
+    /**
33
+     * 创建者
34
+     */
35
+    private String creatBy;
32 36
 
33 37
     /**
34 38
      * 案件相关人员
@@ -95,6 +99,14 @@ public class MsCaseApplicationVO extends MsCaseApplication {
95 99
      * 是否财务,部门长,秘书,0-否,1-是
96 100
      */
97 101
     private Integer otherFlag;
102
+    /**
103
+     * 第三方代理人,0-否,1-是
104
+     */
105
+    private Integer agentFlag;
106
+    /**
107
+     * 调解员,0-否,1-是
108
+     */
109
+    private Integer mediatorFlag;
98 110
     /**
99 111
      * 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
100 112
      */

+ 0
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/IdentityAuthenticationServiceImpl.java Visa fil

@@ -232,7 +232,6 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
232 232
 
233 233
     @Override
234 234
     public AjaxResult selectPCEIDtokenStatus(String eidToken) {
235
-        // todo 送达时需要判断是否有pdf版的调解书,没有则不送达,签名完后下载pdf时不删除之前的doc调解书,上传调解书时,pdf的需要将类型设为13,异步发送短信邮件时将登录用户传参过来
236 235
         // todo E证通审核过后将PC端的机器id在YML文件中改掉
237 236
         JSONObject objJSON = null;
238 237
         IdentityAuthentication authentication = new IdentityAuthentication();

+ 47
- 17
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Visa fil

@@ -211,7 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
211 211
             startPage();
212 212
             List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
213 213
             // 设置申请人被申请人及签名按钮限
214
-            setAfflicate(new HashMap<>(),list,loginUser.getUserId(),roles);
214
+            setAfflicate(new HashMap<>(),list,loginUser,roles,false);
215 215
             return list;
216 216
         }
217 217
         if(CollectionUtil.isEmpty(roles) ){
@@ -238,6 +238,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
238 238
 
239 239
         // 是否查询所有
240 240
         boolean isSelectAll = false;
241
+        // 是否嗲三方代理人
242
+        boolean agentFlag = false;
241 243
 
242 244
         for (SysRole role : roles) {
243 245
             if(StrUtil.isNotEmpty(role.getRoleName())){
@@ -251,6 +253,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
251 253
                 if(StrUtil.equals(role.getRoleName(),"调解员")) {
252 254
                     req.setMediatorId(String.valueOf(sysUser.getUserId()));
253 255
                 }
256
+                if(StrUtil.contains(role.getRoleName(),"代理")) {
257
+                    req.setCreateBy(String.valueOf(sysUser.getUserName()));
258
+                    agentFlag=true;
259
+                }
254 260
             }
255 261
         }
256 262
         if(!isSelectAll){
@@ -265,7 +271,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
265 271
         // 查询案件列表
266 272
         List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
267 273
         // 设置申请人被申请人及签名按钮限
268
-        setAfflicate(flowNameMap,list,loginUser.getUserId(),roles);
274
+        setAfflicate(flowNameMap,list,loginUser,roles,agentFlag);
269 275
         return list;
270 276
     }
271 277
 
@@ -273,9 +279,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
273 279
      * 设置申请人被申请人及签名按钮限
274 280
      * @param
275 281
      * @param list
276
-     * @param loginUserId 当前登录用户id
282
+     * @param loginUser 当前登录用户
277 283
      */
278
-    private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
284
+    private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,LoginUser loginUser, List<SysRole> roles , boolean agentFlag) {
279 285
         if(CollectionUtil.isEmpty(list)){
280 286
             return;
281 287
         }
@@ -294,8 +300,25 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
294 300
         }
295 301
 
296 302
         for (MsCaseApplicationVO vo : list) {
297
-            if(vo.getMediatorId()!=null&&vo.getMediatorId().equals(loginUserId)){
303
+            if(vo.getMediatorId()!=null&&vo.getMediatorId().equals(loginUser.getUserId())){
298 304
                 isMediatorRole=true;
305
+                vo.setMediatorFlag(1);
306
+            }else {
307
+                vo.setMediatorFlag(0);
308
+            }
309
+            // 第三方代理人标志
310
+            if(StrUtil.isNotEmpty(vo.getCreatBy())){
311
+                if(StrUtil.isEmpty(loginUser.getUsername())){
312
+                    vo.setAgentFlag(0);
313
+                }else {
314
+                    if(StrUtil.equals(loginUser.getUsername(),vo.getCreatBy()) && agentFlag){
315
+                        vo.setAgentFlag(1);
316
+                    }else {
317
+                        vo.setAgentFlag(0);
318
+                    }
319
+                }
320
+            }else {
321
+                vo.setAgentFlag(0);
299 322
             }
300 323
             // 设置申请人和被申请人
301 324
             if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
@@ -308,34 +331,34 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
308 331
                         if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
309 332
                             if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 2)) {
310 333
                                 // 申请人操作人
311
-                                if(affiliate.getUserId().equals(loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
334
+                                if(affiliate.getUserId().equals(loginUser.getUserId()) &&!vo.getCaseStatusName().equals("待签名")){
312 335
                                     vo.setAppOperatorFlag(1);
313 336
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
314
-                                    if(affiliate.getUserId().equals(loginUserId)){
337
+                                    if(affiliate.getUserId().equals(loginUser.getUserId())){
315 338
                                         vo.setAppOperatorFlag(1);
316 339
                                     }else {
317 340
                                         vo.setAppOperatorFlag(0);
318 341
                                     }
319 342
                                 }
320 343
                                 // 签收按钮权限
321
-                                if(affiliate.getUserId().equals(loginUserId) &&vo.getCaseStatusName().equals("待申请人签收")){
344
+                                if(affiliate.getUserId().equals(loginUser.getUserId()) &&vo.getCaseStatusName().equals("待申请人签收")){
322 345
                                     vo.setSignFlag(1);
323 346
                                 }
324 347
 
325 348
                             }
326 349
                             if (vo.getResOperatorFlag() == null && (affiliate.getRoleType() == 3 || affiliate.getRoleType() == 4)) {
327 350
                                 // 被申请人操作人
328
-                                if(Objects.equals(affiliate.getUserId(), loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
351
+                                if(Objects.equals(affiliate.getUserId(), loginUser.getUserId()) &&!vo.getCaseStatusName().equals("待签名")){
329 352
                                     vo.setResOperatorFlag(1);
330 353
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
331
-                                    if(Objects.equals(affiliate.getUserId(), loginUserId)){
354
+                                    if(Objects.equals(affiliate.getUserId(), loginUser.getUserId())){
332 355
                                         vo.setResOperatorFlag(1);
333 356
                                     }else {
334 357
                                         vo.setResOperatorFlag(0);
335 358
                                     }
336 359
                                 }
337 360
                                 // 签收按钮权限
338
-                                if(affiliate.getUserId().equals(loginUserId) &&vo.getCaseStatusName().equals("待被申请人签收")){
361
+                                if(affiliate.getUserId().equals(loginUser.getUserId()) &&vo.getCaseStatusName().equals("待被申请人签收")){
339 362
                                     vo.setSignFlag(1);
340 363
                                 }
341 364
                             }
@@ -402,7 +425,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
402 425
                     if(StrUtil.contains(role.getRoleName(),"财务")
403 426
                             ||StrUtil.contains(role.getRoleName(),"法律顾问")
404 427
                             ||StrUtil.contains(role.getRoleName(),"部门长")
405
-                            ||StrUtil.contains(role.getRoleName(),"调解员")
428
+//                            ||StrUtil.contains(role.getRoleName(),"调解员")
406 429
                     ){
407 430
                        vo.setOtherFlag(1);
408 431
                     }
@@ -483,6 +506,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
483 506
             // 查询案件列表
484 507
 
485 508
             for (SysRole role : roles) {
509
+                if (StrUtil.isEmpty(role.getRoleName())) {
510
+                    continue;
511
+                }
486 512
                 if(StrUtil.contains(role.getRoleName(),"财务")
487 513
                         ||StrUtil.contains(role.getRoleName(),"法律顾问")
488 514
                         ||StrUtil.contains(role.getRoleName(),"部门长")
@@ -491,14 +517,17 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
491 517
                     roleIds=null;
492 518
 
493 519
                 }
494
-                if (StrUtil.isNotEmpty(role.getRoleName())) {
520
+
495 521
                     if (StrUtil.equals(role.getRoleName(), "调解员")) {
496 522
                         req.setMediatorId(String.valueOf(sysUser.getUserId()));
497 523
 
498 524
                     }
499
-                }
525
+                    if(StrUtil.contains(role.getRoleName(),"代理")) {
526
+                        req.setCreateBy(String.valueOf(sysUser.getUserName()));
527
+                    }
528
+
500 529
             }
501
-            // 如果多个角色中有财务,顾问,部门长,则调解员查询所有
530
+            // 如果多个角色中有财务,顾问,部门长查询所有
502 531
             if(!isSelectAll){
503 532
                 req.setUserId(loginUser.getUserId());
504 533
             }
@@ -2464,8 +2493,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2464 2493
         }
2465 2494
         application.setRejectReason(reason);
2466 2495
         if(application.getCaseFlowId()!=null && application.getCaseFlowId()==4){
2467
-            // todo 超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
2468
-            // 申请人不受理分配通知 // todo 短信异步
2496
+            //  超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
2497
+            // 申请人不受理分配通知 //  短信异步
2469 2498
             ExecutorService executor = ThreadUtil.createThreadPool();
2470 2499
             CompletableFuture.runAsync(() -> {
2471 2500
             String rejectReason = application.getRejectReason() == null ? "" : application.getRejectReason();
@@ -2588,6 +2617,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2588 2617
         if (CollectionUtil.isEmpty(affiliates)) {
2589 2618
             throw new ServiceException("未找到案件人员");
2590 2619
         }
2620
+        //  签名时取用户为申请人角色并且是申请操作人
2591 2621
         // 申请操作人
2592 2622
         Optional<MsCaseAffiliate> applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
2593 2623
         // 被申请操作人

+ 40
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Visa fil

@@ -181,6 +181,11 @@ public class MsSignSealServiceImpl implements MsSignSealService {
181 181
 
182 182
     @Override
183 183
     public SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException {
184
+        MsCaseApplication application = msCaseApplicationMapper.selectByPrimaryKey(dto.getCaseId());
185
+        if(application == null){
186
+            throw new ServiceException("未找到当前案件");
187
+        }
188
+
184 189
         Example example = new Example(MsSealSignRecord.class);
185 190
         Example.Criteria criteria = example.createCriteria();
186 191
         criteria.andEqualTo("caseAppliId", dto.getCaseId());
@@ -201,6 +206,23 @@ public class MsSignSealServiceImpl implements MsSignSealService {
201 206
             JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
202 207
             String url = signUrlData.get("shortUrl").getAsString();
203 208
             sealSignRecordReslt.setSealUrl(url);
209
+            MsCaseLogRecord operLog = new MsCaseLogRecord();
210
+            if(StrUtil.isEmpty(SecurityUtils.getUsername())){
211
+                throw new ServiceException("未获取到当前登录用户");
212
+            }
213
+            SysUser sysUser = sysUserMapper.selectUserByUserName(SecurityUtils.getUsername());
214
+            if(sysUser==null){
215
+                throw new ServiceException("未获取到当前登录用户");
216
+            }
217
+            // 新增用印日志
218
+            operLog.setCreateBy(sysUser.getUserName());
219
+            operLog.setCreateNickName(sysUser.getNickName());
220
+            operLog.setCaseStatusName(application.getCaseStatusName());
221
+            operLog.setCaseAppliId(application.getId());
222
+            operLog.setCaseNode(application.getCaseFlowId());
223
+            operLog.setCreateTime(new Date());
224
+            caseLogRecordMapper.insert(operLog);
225
+
204 226
         }
205 227
         return sealSignRecordReslt;
206 228
     }
@@ -675,6 +697,8 @@ public class MsSignSealServiceImpl implements MsSignSealService {
675 697
             JSONObject operator = jsonObjectCallback.getJSONObject("operator");
676 698
             JSONObject psnAccount = operator.getJSONObject("psnAccount");
677 699
             String accountMobile = psnAccount.getString("accountMobile");
700
+            // 根据电话查询用户名
701
+            SysUser sysUser = sysUserMapper.selectUserByPhone(accountMobile);
678 702
 
679 703
             Example msSealSignRecordExample = new Example(MsSealSignRecord.class);
680 704
             msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId);
@@ -711,6 +735,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
711 735
                         sealSignRecordsel.setSignStatusApply(1);
712 736
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
713 737
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
738
+                        if(sysUser!=null){
739
+                            operLog.setCreateBy(sysUser.getUserName());
740
+                        }
714 741
                         operLog.setCreateNickName(pensonName);
715 742
                         operLog.setCaseStatusName(caseStatusName);
716 743
                         operLog.setCaseAppliId(caseAppliId);
@@ -752,6 +779,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
752 779
                         sealSignRecordsel.setSignStatusResponse(1);
753 780
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
754 781
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
782
+                        if(sysUser!=null){
783
+                            operLog.setCreateBy(sysUser.getUserName());
784
+                        }
755 785
                         operLog.setCreateNickName(pensonNameRes);
756 786
                         operLog.setCaseStatusName(caseStatusName);
757 787
                         operLog.setCaseAppliId(caseAppliId);
@@ -794,6 +824,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
794 824
                         sealSignRecordsel.setSignStatusMediator(1);
795 825
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
796 826
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
827
+                        if(sysUser!=null){
828
+                            operLog.setCreateBy(sysUser.getUserName());
829
+                        }
797 830
                         operLog.setCreateNickName(pensonNameMedi);
798 831
                         operLog.setCaseStatusName(caseStatusName);
799 832
                         operLog.setCaseAppliId(caseAppliId);
@@ -836,13 +869,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
836 869
                         sealSignRecordsel.setSealStatus(1);
837 870
                         sealSignRecordsel.setSignFlowStatus(3);
838 871
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
839
-                        MsCaseLogRecord operLog = new MsCaseLogRecord();
840
-                        operLog.setCreateNickName(orgnNamePsnName);
841
-                        operLog.setCaseStatusName(caseStatusName);
842
-                        operLog.setCaseAppliId(caseAppliId);
843
-                        operLog.setCaseNode(caseNode);
844
-                        operLog.setCreateTime(dateOperate);
845
-                        caseLogRecordMapper.insert(operLog);
872
+
846 873
 
847 874
                         // 根据流程id查找下一个流程节点
848 875
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
@@ -864,6 +891,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
864 891
                         sealSignRecordsel.setSignStatusApply(1);
865 892
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
866 893
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
894
+                        if(sysUser!=null){
895
+                            operLog.setCreateBy(sysUser.getUserName());
896
+                        }
867 897
                         operLog.setCreateNickName(pensonName);
868 898
                         operLog.setCaseStatusName(caseStatusName);
869 899
                         operLog.setCaseAppliId(caseAppliId);
@@ -891,6 +921,9 @@ public class MsSignSealServiceImpl implements MsSignSealService {
891 921
                         sealSignRecordsel.setSignStatusResponse(1);
892 922
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
893 923
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
924
+                        if(sysUser!=null){
925
+                            operLog.setCreateBy(sysUser.getUserName());
926
+                        }
894 927
                         operLog.setCreateNickName(pensonNameRes);
895 928
                         operLog.setCaseStatusName(caseStatusName);
896 929
                         operLog.setCaseAppliId(caseAppliId);

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java Visa fil

@@ -7,7 +7,7 @@ import java.util.List;
7 7
 
8 8
 /**
9 9
  * @Classname SMSTemplateService
10
- * @Description TODO
10
+ * @Description
11 11
  * @Version 1.0.0
12 12
  * @Date 2024/4/16 11:39
13 13
  * @Created wangqiong

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/impl/SMSTemplateServiceImpl.java Visa fil

@@ -17,7 +17,7 @@ import java.util.stream.Collectors;
17 17
 
18 18
 /**
19 19
  * @Classname SMSTemplateServiceImpl
20
- * @Description TODO
20
+ * @Description
21 21
  * @Version 1.0.0
22 22
  * @Date 2024/4/16 11:40
23 23
  * @Created wangqiong
@@ -68,7 +68,7 @@ public class SMSTemplateServiceImpl implements SMSTemplateService {
68 68
             for (MsSmsTemplateParam templateParam : template.getTemplateParams()) {
69 69
                 templateParam.setSmsTemplateId(template.getId());
70 70
             }
71
-            // todo 先删除
71
+            //  先删除
72 72
             Example paramExam = new Example(MsSmsTemplateParam.class);
73 73
             paramExam.createCriteria().andEqualTo("smsTemplateId", template.getId());
74 74
             templateParamMapper.deleteByExample(paramExam);

+ 5
- 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml Visa fil

@@ -180,6 +180,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
180 180
 			left join ms_sys_role r on r.role_id = ur.role_id
181 181
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
182 182
 	</select>
183
+    <select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
184
+        select u.*
185
+        from ms_sys_user u
186
+        where u.phonenumber = #{phonenumber}  order by u.create_time limit 1
187
+    </select>
183 188
 	<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
184 189
 		select u.*,ur.role_id
185 190
 			from ms_sys_user u

+ 14
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseApplicationMapper.xml Visa fil

@@ -48,10 +48,20 @@
48 48
       <if test = 'req.mediatorId != null and req.userId!=null'>
49 49
         AND (c.mediator_id = #{req.mediatorId} or a.user_id=#{req.userId})
50 50
       </if>
51
+
51 52
 <!--      admin,财务,顾问,部门长查看所有案件,申请人,被申,代理人根据userId查-->
52 53
       <if test = 'req.mediatorId == null and  req.userId != null'>
53 54
         AND (a.user_id=#{req.userId} )
54 55
       </if>
56
+<!--      第三方代理人,调解员-->
57
+      <if test = 'req.createBy != null and req.mediatorId == null '>
58
+        or (c.create_by = #{req.createBy})
59
+      </if>
60
+
61
+
62
+      <if test = 'req.createBy != null and req.mediatorId != null '>
63
+        or (c.create_by = #{req.createBy} or c.mediator_id = #{req.mediatorId})
64
+      </if>
55 65
 <!--        根据角色查询-->
56 66
       <if test='roleIds != null and roleIds.size() > 0 '>
57 67
         and  r.role_id in
@@ -75,7 +85,7 @@
75 85
       </if>
76 86
       <!--  案件编号-->
77 87
       <if test = 'req.caseNum != null and req.caseNum != "" '>
78
-        AND c.case_num = #{req.caseNum}
88
+        AND c.case_num like  concat('%',#{req.caseNum},'%')
79 89
       </if>
80 90
       <!--  时间-->
81 91
       <if test = 'req.startTime != null and req.startTime != "" '>
@@ -113,7 +123,7 @@
113 123
   <select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
114 124
     select t.* from(
115 125
     SELECT
116
-    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,
126
+    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,
117 127
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
118 128
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
119 129
     c.mediation_method mediationMethod,
@@ -123,7 +133,7 @@
123 133
     c.id
124 134
     union
125 135
     SELECT
126
-    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,
136
+    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,
127 137
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
128 138
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
129 139
     c.mediation_method mediationMethod,
@@ -149,7 +159,7 @@
149 159
       </if>
150 160
       <!--  案件编号-->
151 161
       <if test = 'req.caseNum != null and req.caseNum != "" '>
152
-        AND c.case_num = #{req.caseNum}
162
+        AND c.case_num like  concat('%',#{req.caseNum},'%')
153 163
       </if>
154 164
       <!--  时间-->
155 165
       <if test = 'req.startTime != null and req.startTime != "" '>