Преглед изворни кода

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

wangqiong123 пре 2 година
родитељ
комит
f87943e9f5

+ 15
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/miniprogress/WeChatUserController.java Прегледај датотеку

@@ -5,7 +5,9 @@ import com.ruoyi.common.annotation.Anonymous;
5 5
 import com.ruoyi.common.core.controller.BaseController;
6 6
 import com.ruoyi.common.core.domain.AjaxResult;
7 7
 import com.ruoyi.common.core.domain.entity.SysRole;
8
+import com.ruoyi.common.core.domain.entity.SysUser;
8 9
 import com.ruoyi.system.mapper.SysRoleMapper;
10
+import com.ruoyi.system.mapper.SysUserMapper;
9 11
 import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
10 12
 import com.ruoyi.wisdomarbitrate.domain.vo.miniprogress.WeChatUserVO;
11 13
 import com.ruoyi.wisdomarbitrate.service.miniprogress.WeChatUserService;
@@ -26,6 +28,8 @@ public class WeChatUserController extends BaseController {
26 28
     private WeChatUserService weChatUserService;
27 29
     @Autowired
28 30
     private SysRoleMapper roleMapper;
31
+    @Autowired
32
+    private SysUserMapper userMapper;
29 33
     /**
30 34
      * 小程序端获取手机验证码
31 35
      * @param userVO
@@ -67,5 +71,16 @@ public class WeChatUserController extends BaseController {
67 71
         logger.info("调用小程序注册==="+ientityAuthentication.toString());
68 72
         return weChatUserService.registerUser(ientityAuthentication);
69 73
     }
74
+    @Anonymous
75
+    @GetMapping("/verifyUserName")
76
+    public AjaxResult verifyUserName(@RequestParam("userName") String userName)
77
+    {
78
+        SysUser sysUser = userMapper.checkUserNameUnique(userName);
79
+        if(sysUser==null){
80
+            return AjaxResult.success();
81
+        }else {
82
+            return AjaxResult.error("用户名已存在!");
83
+        }
84
+    }
70 85
 
71 86
 }

+ 2
- 1
ruoyi-admin/src/main/resources/application-druid.yml Прегледај датотеку

@@ -6,7 +6,8 @@ spring:
6 6
         druid:
7 7
             # 主库数据源
8 8
             master:
9
-                url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
9
+#                url: jdbc:mysql://121.40.189.20:3306/mediation_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
10
+                url: jdbc:mysql://121.40.189.20:3306/mediation_system_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=true&serverTimezone=Asia/Shanghai&useSSL=false
10 11
                 username: root
11 12
                 password: YMzc157#
12 13
             # 从库数据源

+ 7
- 4
ruoyi-admin/src/main/resources/application.yml Прегледај датотеку

@@ -17,8 +17,8 @@ ruoyi:
17 17
 
18 18
 # 开发环境配置
19 19
 server:
20
-  # 服务器的HTTP端口,默认为8080
21
-  port: 6001
20
+  # 测试环境6001,开发环境7001
21
+  port: 7001
22 22
   servlet:
23 23
     # 应用的访问路径
24 24
     context-path: /
@@ -131,8 +131,8 @@ mybatis:
131 131
   mapperLocations: classpath*:mapper/**/*Mapper.xml
132 132
   # 加载全局的配置文件
133 133
   configLocation: classpath:mybatis/mybatis-config.xml
134
-  configuration:
135
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
134
+#  configuration:
135
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
136 136
 # PageHelper分页插件
137 137
 pagehelper:
138 138
   helperDialect: mysql
@@ -188,6 +188,9 @@ imConfig:
188 188
 organizeConfig:
189 189
   # creditCode
190 190
   creditCode: 910000058386410047
191
+#  引入仲裁系统url配置
192
+arbitrateConfig:
193
+  url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication
191 194
 #jodconverter:
192 195
 #  local:
193 196
 #    host: 121.40.189.20

+ 1
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/entity/mscase/MsCaseApplication.java Прегледај датотеку

@@ -99,7 +99,7 @@ public class MsCaseApplication {
99 99
     private String payType;
100 100
 
101 101
     /**
102
-     * 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁
102
+     * 调解结果,1达成调解,2未达成调解,3未达成调解但不再争议,4未达成调解但同意引入仲裁,5-达成和解
103 103
      */
104 104
     @Column(name = "media_result")
105 105
     private Integer mediaResult;

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/vo/mscase/MsCaseApplicationVO.java Прегледај датотеку

@@ -73,6 +73,10 @@ public class MsCaseApplicationVO extends MsCaseApplication {
73 73
      * 缴费拒绝原因
74 74
      */
75 75
     private String reason;
76
+    /**
77
+     * 签名按钮显示,0-显示,1-不显示
78
+     */
79
+    private Integer signButtonFlag;
76 80
 
77 81
 
78 82
 }

+ 2
- 2
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseApplicationMapper.java Прегледај датотеку

@@ -34,7 +34,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
34 34
      * @param caseStatusNames
35 35
      * @return
36 36
      */
37
-    @Select("<script> select t.* from (select c.id,c.room_id roomId,c.mediation_method mediationMethod," +
37
+    @Select("<script> select t.* from (select c.media_result mediaResult,c.id,c.room_id roomId,c.mediation_method mediationMethod," +
38 38
             "   CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
39 39
             +
40 40
             "0 AS pendingStatus,c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,c.case_subject_amount caseSubjectAmount," +
@@ -80,7 +80,7 @@ public interface MsCaseApplicationMapper extends Mapper<MsCaseApplication> {
80 80
             "<if test=\"req.endTime != null and req.endTime != ''\">" +
81 81
             "and c.create_time &lt;= #{req.endTime}</if>" +
82 82
             "        </where> " +
83
-            "union  select c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
83
+            "union  select c.media_result mediaResult,c.id id,c.room_id roomId,c.mediation_method mediationMethod,"
84 84
             +
85 85
             "   CASE c.mediation_method when 1 then '线上调解' when 2 then '线下调解' ELSE '' END mediationMethodName,"
86 86
             +

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/mscase/MsCaseAttachMapper.java Прегледај датотеку

@@ -42,4 +42,11 @@ public interface MsCaseAttachMapper {
42 42
      * @param ids
43 43
      */
44 44
     void batchDelete(@Param("ids")List<Long> ids);
45
+
46
+    /**
47
+     * 根据附件名查找数量
48
+     * @param fileName
49
+     * @return
50
+     */
51
+    int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
45 52
 }

+ 26
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Прегледај датотеку

@@ -88,6 +88,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
88 88
      */
89 89
     @Value("${organizeConfig.creditCode}")
90 90
     private long creditCode;
91
+
92
+    @Value("${arbitrateConfig.url}")
93
+    private String arbitrateUrl;
91 94
     @Autowired
92 95
     MsCaseApplicationService caseApplicationService;
93 96
     @Autowired
@@ -185,6 +188,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
185 188
         }
186 189
     //    Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
187 190
         List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
191
+        // 是否调解员
192
+        boolean isMediatorRole=false;
188 193
         // 如果是申请人,可以看见申请人为自己(即自然人)或者委托代理人为自己的案件(即机构)
189 194
         for (SysRole role : roles) {
190 195
             if(StrUtil.isNotEmpty(role.getRoleName())){
@@ -209,6 +214,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
209 214
                     break;
210 215
                 }
211 216
                 if(StrUtil.equals(role.getRoleName(),"调解员")) {
217
+                    isMediatorRole=true;
212 218
                     req.setMediatorId(String.valueOf(sysUser.getUserId()));
213 219
                     break;
214 220
                 }
@@ -220,7 +226,21 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
220 226
         }
221 227
         startPage();
222 228
         // 查询案件列表
223
-        return  msCaseApplicationMapper.list(req, caseStatusNames);
229
+        List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseStatusNames);
230
+        if (CollectionUtil.isNotEmpty(list)) {
231
+        // 判断调解员签名按钮权限,0-显示,1-不显示
232
+            for (MsCaseApplicationVO vo : list) {
233
+                if (isMediatorRole && vo.getMediaResult()!=null && vo.getMediaResult()==5) {
234
+                    // 是调解员并且是和解协议,不显示
235
+                    vo.setSignButtonFlag(1);
236
+
237
+                }else {
238
+                    vo.setSignButtonFlag(0);
239
+                }
240
+            }
241
+
242
+        }
243
+        return list;
224 244
     }
225 245
 
226 246
     @Override
@@ -1317,7 +1337,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1317 1337
             sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线上调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
1318 1338
         }else {
1319 1339
             // 线下调解 2077966 尊敬的用户,您的{1}案件,线下调解日期已确定为{2},请知晓,如非本人操作,请忽略本短信。
1320
-            smsFlag = SmsUtils.sendSms(application.getId(), "2075447", phone, new String[]{application.getCaseNum(),application.getHearDate()});
1340
+            smsFlag = SmsUtils.sendSms(application.getId(), "2077966", phone, new String[]{application.getCaseNum(),application.getHearDate()});
1321 1341
             sendContent = "尊敬的用户,您的" + application.getCaseNum() + "的案件,线下调解日期已确定为"+application.getHearDate()+",请知晓,如非本人操作,请忽略本短信。";
1322 1342
 
1323 1343
         }
@@ -1824,7 +1844,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
1824 1844
                     String paramsbody = JSONUtil.toJsonStr(caseApplicationVO);
1825 1845
                     long timestamp = System.currentTimeMillis();
1826 1846
                     String signStr = SignCheckUtils.getSign(paramsbody, accessSec, timestamp);
1827
-                    String urlstr = "http://localhost:8001/callArbitrateCaseApplication/generateCaseApplication";
1847
+                    String urlstr = arbitrateUrl;
1828 1848
                     HttpResponse httpResponse = (HttpResponse) HttpRequest.post(urlstr)
1829 1849
                             .header("timestampstr", String.valueOf(timestamp))
1830 1850
                             .header("signstr", signStr)
@@ -2027,6 +2047,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
2027 2047
                                                 if(caseFlow != null){
2028 2048
                                                     application.setCaseFlowId(caseFlow.getId());
2029 2049
                                                     application.setCaseStatusName(caseFlow.getCaseStatusName());
2050
+                                                    // 新增日志
2051
+                                                    CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
2052
+
2030 2053
                                                 }
2031 2054
 
2032 2055
                                                 application.setMediaResult(mediaResult);

+ 8
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Прегледај датотеку

@@ -538,7 +538,14 @@ public class MsSignSealServiceImpl implements MsSignSealService {
538 538
             }
539 539
 
540 540
         }
541
-        datas.put("finishCasenode", recordsNew);
541
+        if(caseLogRecordsin!=null&&caseLogRecordsin.size()>0){
542
+            datas.put("finishCasenode", recordsNew);
543
+        }else {
544
+            MsCaseLogRecordVO msCaseLogRecordVO1 = new MsCaseLogRecordVO();
545
+            msCaseLogRecordVO1.setContent("结束");
546
+            recordsNew.add(msCaseLogRecordVO1);
547
+            datas.put("finishCasenode", recordsNew);
548
+        }
542 549
         datas.put("inCasenode", caseLogRecordsin);
543 550
         datas.put("nextCasenode", caseLogRecordsnext);
544 551
         return success(datas);

+ 17
- 12
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java Прегледај датотеку

@@ -53,8 +53,7 @@ import java.util.Map;
53 53
 import java.util.stream.Collectors;
54 54
 
55 55
 import static com.ruoyi.common.core.domain.AjaxResult.success;
56
-import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
57
-import static com.ruoyi.common.utils.file.FileUploadUtils.getPathFileName;
56
+import static com.ruoyi.common.utils.file.FileUploadUtils.*;
58 57
 
59 58
 /**
60 59
  * @author wangqiong
@@ -454,23 +453,29 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
454 453
             String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
455 454
             fileName = fileName.replace("/", "");
456 455
             fileName=fileId+fileName;
457
-                String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
456
+            String annexName=System.currentTimeMillis()+fileName;
457
+            String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), annexName).getAbsolutePath();
458 458
                 staticAndMksDir = Paths.get(absPath).toFile().toString();
459 459
             long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
460 460
             if(downloadFile>0) {
461
+
461 462
                 Example example = new Example(MsCaseApplication.class);
462 463
                 example.createCriteria().andEqualTo("roomId", roomId);
463 464
                 MsCaseApplication caseApplication = caseApplicationMapper.selectOneByExample(example);
464 465
                 if(caseApplication != null) {
465
-                    String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
466
-                    // 存入数据库
467
-                    MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
468
-                            .annexName(fileName)
469
-                            .annexPath(annexName)
470
-                            .annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
471
-                            .build();
472
-                    caseAttachMapper.save(caseAttach);
473
-                    return annexName;
466
+                    // 根据文件名称查询附件,如果该视频已存在则不存入数据库
467
+                    int count= caseAttachMapper.countByfileName(fileName,caseApplication.getId());
468
+                    if(count<1) {
469
+                         annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), annexName);
470
+                        // 存入数据库
471
+                        MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
472
+                                .annexName(fileName)
473
+                                .annexPath(annexName)
474
+                                .annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
475
+                                .build();
476
+                        caseAttachMapper.save(caseAttach);
477
+                        return annexName;
478
+                    }
474 479
                 }
475 480
             }
476 481
         }

+ 3
- 0
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAttachMapper.xml Прегледај датотеку

@@ -104,6 +104,9 @@
104 104
             </if>
105 105
         </where>
106 106
     </select>
107
+    <select id="countByfileName" resultType="java.lang.Integer">
108
+        select count(1) from ms_case_attach where case_appli_id=#{caseAppliId} and annex_name=#{annexName}
109
+    </select>
107 110
 
108 111
     <update id="updateCaseAttach" parameterType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach">
109 112
         update ms_case_attach