Browse Source

bug修复

18792927508 2 years ago
parent
commit
b75a892a50

+ 1
- 1
pay/src/main/java/com/ruoyi/wx/WxPayElegentTrade.java View File

391
     private CloseableHttpClient getWxHttpClient() {
391
     private CloseableHttpClient getWxHttpClient() {
392
         try {
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
             // 加载商户私钥(privateKey:私钥字符串)
395
             // 加载商户私钥(privateKey:私钥字符串)
396
             String key = FileUtil.readToStr("wxpay_private.key");
396
             String key = FileUtil.readToStr("wxpay_private.key");
397
 
397
 

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java View File

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

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/MsRequestLogService.java View File

4
 
4
 
5
 /**
5
 /**
6
  * @Classname MsRequestLogService
6
  * @Classname MsRequestLogService
7
- * @Description TODO
7
+ * @Description
8
  * @Version 1.0.0
8
  * @Version 1.0.0
9
  * @Date 2024/4/2 14:18
9
  * @Date 2024/4/2 14:18
10
  * @Created wangqiong
10
  * @Created wangqiong

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java View File

10
 
10
 
11
 /**
11
 /**
12
  * @Classname MsRequestLogServiceImpl
12
  * @Classname MsRequestLogServiceImpl
13
- * @Description TODO
13
+ * @Description
14
  * @Version 1.0.0
14
  * @Version 1.0.0
15
  * @Date 2024/4/2 14:19
15
  * @Date 2024/4/2 14:19
16
  * @Created wangqiong
16
  * @Created wangqiong

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

2
 
2
 
3
 /**
3
 /**
4
  * @Classname MsCaseAffiliateParent
4
  * @Classname MsCaseAffiliateParent
5
- * @Description TODO
5
+ * @Description
6
  * @Version 1.0.0
6
  * @Version 1.0.0
7
  * @Date 2024/3/27 16:05
7
  * @Date 2024/3/27 16:05
8
  * @Created wangqiong
8
  * @Created wangqiong

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

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

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

29
      * 被申请人姓名
29
      * 被申请人姓名
30
      */
30
      */
31
     private String respondentName;
31
     private String respondentName;
32
+    /**
33
+     * 创建者
34
+     */
35
+    private String creatBy;
32
 
36
 
33
     /**
37
     /**
34
      * 案件相关人员
38
      * 案件相关人员
95
      * 是否财务,部门长,秘书,0-否,1-是
99
      * 是否财务,部门长,秘书,0-否,1-是
96
      */
100
      */
97
     private Integer otherFlag;
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
      * 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
111
      * 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
100
      */
112
      */

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

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

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

211
             startPage();
211
             startPage();
212
             List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
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
             return list;
215
             return list;
216
         }
216
         }
217
         if(CollectionUtil.isEmpty(roles) ){
217
         if(CollectionUtil.isEmpty(roles) ){
238
 
238
 
239
         // 是否查询所有
239
         // 是否查询所有
240
         boolean isSelectAll = false;
240
         boolean isSelectAll = false;
241
+        // 是否嗲三方代理人
242
+        boolean agentFlag = false;
241
 
243
 
242
         for (SysRole role : roles) {
244
         for (SysRole role : roles) {
243
             if(StrUtil.isNotEmpty(role.getRoleName())){
245
             if(StrUtil.isNotEmpty(role.getRoleName())){
251
                 if(StrUtil.equals(role.getRoleName(),"调解员")) {
253
                 if(StrUtil.equals(role.getRoleName(),"调解员")) {
252
                     req.setMediatorId(String.valueOf(sysUser.getUserId()));
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
         if(!isSelectAll){
262
         if(!isSelectAll){
265
         // 查询案件列表
271
         // 查询案件列表
266
         List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
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
         return list;
275
         return list;
270
     }
276
     }
271
 
277
 
273
      * 设置申请人被申请人及签名按钮限
279
      * 设置申请人被申请人及签名按钮限
274
      * @param
280
      * @param
275
      * @param list
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
         if(CollectionUtil.isEmpty(list)){
285
         if(CollectionUtil.isEmpty(list)){
280
             return;
286
             return;
281
         }
287
         }
294
         }
300
         }
295
 
301
 
296
         for (MsCaseApplicationVO vo : list) {
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
                 isMediatorRole=true;
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
             if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
324
             if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
308
                         if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
331
                         if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
309
                             if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 2)) {
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
                                     vo.setAppOperatorFlag(1);
335
                                     vo.setAppOperatorFlag(1);
313
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
336
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
314
-                                    if(affiliate.getUserId().equals(loginUserId)){
337
+                                    if(affiliate.getUserId().equals(loginUser.getUserId())){
315
                                         vo.setAppOperatorFlag(1);
338
                                         vo.setAppOperatorFlag(1);
316
                                     }else {
339
                                     }else {
317
                                         vo.setAppOperatorFlag(0);
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
                                     vo.setSignFlag(1);
345
                                     vo.setSignFlag(1);
323
                                 }
346
                                 }
324
 
347
 
325
                             }
348
                             }
326
                             if (vo.getResOperatorFlag() == null && (affiliate.getRoleType() == 3 || affiliate.getRoleType() == 4)) {
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
                                     vo.setResOperatorFlag(1);
352
                                     vo.setResOperatorFlag(1);
330
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
353
                                 }else if(vo.getCaseStatusName().equals("待签名")) {
331
-                                    if(Objects.equals(affiliate.getUserId(), loginUserId)){
354
+                                    if(Objects.equals(affiliate.getUserId(), loginUser.getUserId())){
332
                                         vo.setResOperatorFlag(1);
355
                                         vo.setResOperatorFlag(1);
333
                                     }else {
356
                                     }else {
334
                                         vo.setResOperatorFlag(0);
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
                                     vo.setSignFlag(1);
362
                                     vo.setSignFlag(1);
340
                                 }
363
                                 }
341
                             }
364
                             }
402
                     if(StrUtil.contains(role.getRoleName(),"财务")
425
                     if(StrUtil.contains(role.getRoleName(),"财务")
403
                             ||StrUtil.contains(role.getRoleName(),"法律顾问")
426
                             ||StrUtil.contains(role.getRoleName(),"法律顾问")
404
                             ||StrUtil.contains(role.getRoleName(),"部门长")
427
                             ||StrUtil.contains(role.getRoleName(),"部门长")
405
-                            ||StrUtil.contains(role.getRoleName(),"调解员")
428
+//                            ||StrUtil.contains(role.getRoleName(),"调解员")
406
                     ){
429
                     ){
407
                        vo.setOtherFlag(1);
430
                        vo.setOtherFlag(1);
408
                     }
431
                     }
483
             // 查询案件列表
506
             // 查询案件列表
484
 
507
 
485
             for (SysRole role : roles) {
508
             for (SysRole role : roles) {
509
+                if (StrUtil.isEmpty(role.getRoleName())) {
510
+                    continue;
511
+                }
486
                 if(StrUtil.contains(role.getRoleName(),"财务")
512
                 if(StrUtil.contains(role.getRoleName(),"财务")
487
                         ||StrUtil.contains(role.getRoleName(),"法律顾问")
513
                         ||StrUtil.contains(role.getRoleName(),"法律顾问")
488
                         ||StrUtil.contains(role.getRoleName(),"部门长")
514
                         ||StrUtil.contains(role.getRoleName(),"部门长")
491
                     roleIds=null;
517
                     roleIds=null;
492
 
518
 
493
                 }
519
                 }
494
-                if (StrUtil.isNotEmpty(role.getRoleName())) {
520
+
495
                     if (StrUtil.equals(role.getRoleName(), "调解员")) {
521
                     if (StrUtil.equals(role.getRoleName(), "调解员")) {
496
                         req.setMediatorId(String.valueOf(sysUser.getUserId()));
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
             if(!isSelectAll){
531
             if(!isSelectAll){
503
                 req.setUserId(loginUser.getUserId());
532
                 req.setUserId(loginUser.getUserId());
504
             }
533
             }
2464
         }
2493
         }
2465
         application.setRejectReason(reason);
2494
         application.setRejectReason(reason);
2466
         if(application.getCaseFlowId()!=null && application.getCaseFlowId()==4){
2495
         if(application.getCaseFlowId()!=null && application.getCaseFlowId()==4){
2467
-            // todo 超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
2468
-            // 申请人不受理分配通知 // todo 短信异步
2496
+            //  超过五日还没有受理,给申请操作人发送不受理通知,有手机号发短信,没有手机号发邮箱
2497
+            // 申请人不受理分配通知 //  短信异步
2469
             ExecutorService executor = ThreadUtil.createThreadPool();
2498
             ExecutorService executor = ThreadUtil.createThreadPool();
2470
             CompletableFuture.runAsync(() -> {
2499
             CompletableFuture.runAsync(() -> {
2471
             String rejectReason = application.getRejectReason() == null ? "" : application.getRejectReason();
2500
             String rejectReason = application.getRejectReason() == null ? "" : application.getRejectReason();
2588
         if (CollectionUtil.isEmpty(affiliates)) {
2617
         if (CollectionUtil.isEmpty(affiliates)) {
2589
             throw new ServiceException("未找到案件人员");
2618
             throw new ServiceException("未找到案件人员");
2590
         }
2619
         }
2620
+        //  签名时取用户为申请人角色并且是申请操作人
2591
         // 申请操作人
2621
         // 申请操作人
2592
         Optional<MsCaseAffiliate> applicantAffiliateOpt = affiliates.stream().filter(affiliate -> affiliate.getOperatorFlag() == 1 && StrUtil.isNotEmpty(affiliate.getPhone()) && (affiliate.getRoleType().equals(1) || affiliate.getRoleType().equals(2))).findFirst();
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 View File

181
 
181
 
182
     @Override
182
     @Override
183
     public SealSignRecord selectSealUrl(MsSignSealDTO dto) throws EsignDemoException {
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
         Example example = new Example(MsSealSignRecord.class);
189
         Example example = new Example(MsSealSignRecord.class);
185
         Example.Criteria criteria = example.createCriteria();
190
         Example.Criteria criteria = example.createCriteria();
186
         criteria.andEqualTo("caseAppliId", dto.getCaseId());
191
         criteria.andEqualTo("caseAppliId", dto.getCaseId());
201
             JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
206
             JsonObject signUrlData = signUrlJsonObject.getAsJsonObject("data");
202
             String url = signUrlData.get("shortUrl").getAsString();
207
             String url = signUrlData.get("shortUrl").getAsString();
203
             sealSignRecordReslt.setSealUrl(url);
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
         return sealSignRecordReslt;
227
         return sealSignRecordReslt;
206
     }
228
     }
675
             JSONObject operator = jsonObjectCallback.getJSONObject("operator");
697
             JSONObject operator = jsonObjectCallback.getJSONObject("operator");
676
             JSONObject psnAccount = operator.getJSONObject("psnAccount");
698
             JSONObject psnAccount = operator.getJSONObject("psnAccount");
677
             String accountMobile = psnAccount.getString("accountMobile");
699
             String accountMobile = psnAccount.getString("accountMobile");
700
+            // 根据电话查询用户名
701
+            SysUser sysUser = sysUserMapper.selectUserByPhone(accountMobile);
678
 
702
 
679
             Example msSealSignRecordExample = new Example(MsSealSignRecord.class);
703
             Example msSealSignRecordExample = new Example(MsSealSignRecord.class);
680
             msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId);
704
             msSealSignRecordExample.createCriteria().andEqualTo("signFlowId", signFlowId);
711
                         sealSignRecordsel.setSignStatusApply(1);
735
                         sealSignRecordsel.setSignStatusApply(1);
712
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
736
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
713
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
737
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
738
+                        if(sysUser!=null){
739
+                            operLog.setCreateBy(sysUser.getUserName());
740
+                        }
714
                         operLog.setCreateNickName(pensonName);
741
                         operLog.setCreateNickName(pensonName);
715
                         operLog.setCaseStatusName(caseStatusName);
742
                         operLog.setCaseStatusName(caseStatusName);
716
                         operLog.setCaseAppliId(caseAppliId);
743
                         operLog.setCaseAppliId(caseAppliId);
752
                         sealSignRecordsel.setSignStatusResponse(1);
779
                         sealSignRecordsel.setSignStatusResponse(1);
753
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
780
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
754
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
781
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
782
+                        if(sysUser!=null){
783
+                            operLog.setCreateBy(sysUser.getUserName());
784
+                        }
755
                         operLog.setCreateNickName(pensonNameRes);
785
                         operLog.setCreateNickName(pensonNameRes);
756
                         operLog.setCaseStatusName(caseStatusName);
786
                         operLog.setCaseStatusName(caseStatusName);
757
                         operLog.setCaseAppliId(caseAppliId);
787
                         operLog.setCaseAppliId(caseAppliId);
794
                         sealSignRecordsel.setSignStatusMediator(1);
824
                         sealSignRecordsel.setSignStatusMediator(1);
795
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
825
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
796
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
826
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
827
+                        if(sysUser!=null){
828
+                            operLog.setCreateBy(sysUser.getUserName());
829
+                        }
797
                         operLog.setCreateNickName(pensonNameMedi);
830
                         operLog.setCreateNickName(pensonNameMedi);
798
                         operLog.setCaseStatusName(caseStatusName);
831
                         operLog.setCaseStatusName(caseStatusName);
799
                         operLog.setCaseAppliId(caseAppliId);
832
                         operLog.setCaseAppliId(caseAppliId);
836
                         sealSignRecordsel.setSealStatus(1);
869
                         sealSignRecordsel.setSealStatus(1);
837
                         sealSignRecordsel.setSignFlowStatus(3);
870
                         sealSignRecordsel.setSignFlowStatus(3);
838
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
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
                         // 根据流程id查找下一个流程节点
874
                         // 根据流程id查找下一个流程节点
848
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
875
                         MsCaseFlow nextFlow = caseFlowMapper.nextFlow(caseApplicationselect.getCaseFlowId());
864
                         sealSignRecordsel.setSignStatusApply(1);
891
                         sealSignRecordsel.setSignStatusApply(1);
865
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
892
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
866
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
893
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
894
+                        if(sysUser!=null){
895
+                            operLog.setCreateBy(sysUser.getUserName());
896
+                        }
867
                         operLog.setCreateNickName(pensonName);
897
                         operLog.setCreateNickName(pensonName);
868
                         operLog.setCaseStatusName(caseStatusName);
898
                         operLog.setCaseStatusName(caseStatusName);
869
                         operLog.setCaseAppliId(caseAppliId);
899
                         operLog.setCaseAppliId(caseAppliId);
891
                         sealSignRecordsel.setSignStatusResponse(1);
921
                         sealSignRecordsel.setSignStatusResponse(1);
892
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
922
                         sealSignRecordMapper.updateByPrimaryKeySelective(sealSignRecordsel);
893
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
923
                         MsCaseLogRecord operLog = new MsCaseLogRecord();
924
+                        if(sysUser!=null){
925
+                            operLog.setCreateBy(sysUser.getUserName());
926
+                        }
894
                         operLog.setCreateNickName(pensonNameRes);
927
                         operLog.setCreateNickName(pensonNameRes);
895
                         operLog.setCaseStatusName(caseStatusName);
928
                         operLog.setCaseStatusName(caseStatusName);
896
                         operLog.setCaseAppliId(caseAppliId);
929
                         operLog.setCaseAppliId(caseAppliId);

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sms/SMSTemplateService.java View File

7
 
7
 
8
 /**
8
 /**
9
  * @Classname SMSTemplateService
9
  * @Classname SMSTemplateService
10
- * @Description TODO
10
+ * @Description
11
  * @Version 1.0.0
11
  * @Version 1.0.0
12
  * @Date 2024/4/16 11:39
12
  * @Date 2024/4/16 11:39
13
  * @Created wangqiong
13
  * @Created wangqiong

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

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

+ 5
- 0
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml View File

180
 			left join ms_sys_role r on r.role_id = ur.role_id
180
 			left join ms_sys_role r on r.role_id = ur.role_id
181
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
181
 		where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
182
 	</select>
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
 	<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
188
 	<select id="selectUserByEmail" parameterType="String" resultMap="SysUserResult">
184
 		select u.*,ur.role_id
189
 		select u.*,ur.role_id
185
 			from ms_sys_user u
190
 			from ms_sys_user u

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

48
       <if test = 'req.mediatorId != null and req.userId!=null'>
48
       <if test = 'req.mediatorId != null and req.userId!=null'>
49
         AND (c.mediator_id = #{req.mediatorId} or a.user_id=#{req.userId})
49
         AND (c.mediator_id = #{req.mediatorId} or a.user_id=#{req.userId})
50
       </if>
50
       </if>
51
+
51
 <!--      admin,财务,顾问,部门长查看所有案件,申请人,被申,代理人根据userId查-->
52
 <!--      admin,财务,顾问,部门长查看所有案件,申请人,被申,代理人根据userId查-->
52
       <if test = 'req.mediatorId == null and  req.userId != null'>
53
       <if test = 'req.mediatorId == null and  req.userId != null'>
53
         AND (a.user_id=#{req.userId} )
54
         AND (a.user_id=#{req.userId} )
54
       </if>
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
       <if test='roleIds != null and roleIds.size() > 0 '>
66
       <if test='roleIds != null and roleIds.size() > 0 '>
57
         and  r.role_id in
67
         and  r.role_id in
75
       </if>
85
       </if>
76
       <!--  案件编号-->
86
       <!--  案件编号-->
77
       <if test = 'req.caseNum != null and req.caseNum != "" '>
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
       </if>
89
       </if>
80
       <!--  时间-->
90
       <!--  时间-->
81
       <if test = 'req.startTime != null and req.startTime != "" '>
91
       <if test = 'req.startTime != null and req.startTime != "" '>
113
   <select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
123
   <select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
114
     select t.* from(
124
     select t.* from(
115
     SELECT
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
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
127
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
118
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
128
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
119
     c.mediation_method mediationMethod,
129
     c.mediation_method mediationMethod,
123
     c.id
133
     c.id
124
     union
134
     union
125
     SELECT
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
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
137
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
128
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
138
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
129
     c.mediation_method mediationMethod,
139
     c.mediation_method mediationMethod,
149
       </if>
159
       </if>
150
       <!--  案件编号-->
160
       <!--  案件编号-->
151
       <if test = 'req.caseNum != null and req.caseNum != "" '>
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
       </if>
163
       </if>
154
       <!--  时间-->
164
       <!--  时间-->
155
       <if test = 'req.startTime != null and req.startTime != "" '>
165
       <if test = 'req.startTime != null and req.startTime != "" '>