18792927508 2 лет назад
Родитель
Сommit
666090fbe3
21 измененных файлов: 311 добавлений и 118 удалений
  1. 15
    2
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
  2. 2
    1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestApiController.java
  3. 2
    2
      ruoyi-admin/src/main/resources/application-druid.yml
  4. 8
    3
      ruoyi-admin/src/main/resources/application.yml
  5. 1
    1
      ruoyi-common/pom.xml
  6. 37
    0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
  7. 1
    7
      ruoyi-common/src/main/java/com/ruoyi/common/utils/PdfUtils.java
  8. 14
    9
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
  9. 16
    16
      ruoyi-system/pom.xml
  10. 2
    1
      ruoyi-system/src/main/java/com/ruoyi/system/service/BeiMingInterface.java
  11. 3
    3
      ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java
  12. 3
    2
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BeiMingInterfaceService.java
  13. 3
    0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java
  14. 3
    10
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
  15. 1
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/WeChatUserServiceImpl.java
  16. 81
    24
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java
  17. 31
    31
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java
  18. 57
    0
      ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java
  19. 15
    0
      ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
  20. 14
    4
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAffiliateMapper.xml
  21. 2
    2
      ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseApplicationMapper.xml

+ 15
- 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java Просмотреть файл

5
 import com.ruoyi.common.constant.Constants;
5
 import com.ruoyi.common.constant.Constants;
6
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.core.domain.entity.SysMenu;
7
 import com.ruoyi.common.core.domain.entity.SysMenu;
8
+import com.ruoyi.common.core.domain.entity.SysRole;
8
 import com.ruoyi.common.core.domain.entity.SysUser;
9
 import com.ruoyi.common.core.domain.entity.SysUser;
9
 import com.ruoyi.common.core.domain.model.LoginBody;
10
 import com.ruoyi.common.core.domain.model.LoginBody;
10
 import com.ruoyi.common.utils.SecurityUtils;
11
 import com.ruoyi.common.utils.SecurityUtils;
12
+import com.ruoyi.common.utils.StringUtils;
11
 import com.ruoyi.framework.web.service.SysLoginService;
13
 import com.ruoyi.framework.web.service.SysLoginService;
12
 import com.ruoyi.framework.web.service.SysPermissionService;
14
 import com.ruoyi.framework.web.service.SysPermissionService;
13
 import com.ruoyi.framework.web.service.TokenService;
15
 import com.ruoyi.framework.web.service.TokenService;
22
 import org.springframework.web.bind.annotation.RequestBody;
24
 import org.springframework.web.bind.annotation.RequestBody;
23
 import org.springframework.web.bind.annotation.RestController;
25
 import org.springframework.web.bind.annotation.RestController;
24
 
26
 
27
+import java.util.Arrays;
28
+import java.util.HashSet;
25
 import java.util.List;
29
 import java.util.List;
26
 import java.util.Set;
30
 import java.util.Set;
27
 
31
 
83
     public AjaxResult getInfo() {
87
     public AjaxResult getInfo() {
84
         SysUser user = SecurityUtils.getLoginUser().getUser();
88
         SysUser user = SecurityUtils.getLoginUser().getUser();
85
         // 角色集合
89
         // 角色集合
86
-        Set<String> roles = permissionService.getRolePermission(user);
90
+        List<SysRole> roles = permissionService.getRolePermission(user);
91
+        Set<String> permsSet = new HashSet<>();
92
+        for (SysRole perm : roles)
93
+        {
94
+            if (StringUtils.isNotNull(perm))
95
+            {
96
+                permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
97
+            }
98
+        }
99
+        user.setRoles(roles);
87
         // 权限集合
100
         // 权限集合
88
         Set<String> permissions = permissionService.getMenuPermission(user);
101
         Set<String> permissions = permissionService.getMenuPermission(user);
89
         //查询用户角色关联的案件状态
102
         //查询用户角色关联的案件状态
90
-        Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(roles);
103
+        Set<Integer> caseStatus = caseFlowService.getCaseStatusIdByRoleKey(permsSet);
91
         AjaxResult ajax = AjaxResult.success();
104
         AjaxResult ajax = AjaxResult.success();
92
         ajax.put("user", user);
105
         ajax.put("user", user);
93
         ajax.put("roles", roles);
106
         ajax.put("roles", roles);

+ 2
- 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestApiController.java Просмотреть файл

5
 import com.ruoyi.common.annotation.Anonymous;
5
 import com.ruoyi.common.annotation.Anonymous;
6
 import com.ruoyi.common.core.domain.AjaxResult;
6
 import com.ruoyi.common.core.domain.AjaxResult;
7
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
7
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
8
+import com.ruoyi.common.enums.DocumentTypeEnum;
8
 import com.ruoyi.common.enums.PushCaseStatusEnum;
9
 import com.ruoyi.common.enums.PushCaseStatusEnum;
9
 import com.ruoyi.system.service.impl.BeiMingInterfaceService;
10
 import com.ruoyi.system.service.impl.BeiMingInterfaceService;
10
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
11
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
62
     public AjaxResult testfile() {
63
     public AjaxResult testfile() {
63
 //        File file = new File("D:/WorkDoc/TJ/File/证据1.png");
64
 //        File file = new File("D:/WorkDoc/TJ/File/证据1.png");
64
         File file = new File("D:/WorkDoc/TJ/File/证据3.png");
65
         File file = new File("D:/WorkDoc/TJ/File/证据3.png");
65
-            MsCaseFileInfo jsonObject1 = beiMingInterfaceService.pushAttachmentInfo("BWT_MEDIATION", "86251b190e3a40f3942v215d1762c663", file, "BWT_MEDIATION", "zc2024032700012", AttachmentOperateTypeEnum.ADD);
66
+            MsCaseFileInfo jsonObject1 = beiMingInterfaceService.pushAttachmentInfo("BWT_MEDIATION", "86251b190e3a40f3942v215d1762c663", file, "BWT_MEDIATION", "zc2024032700012", AttachmentOperateTypeEnum.ADD, DocumentTypeEnum.EVEDENT_AGREEMENT);
66
         System.out.println("fanhui:" + jsonObject1.toString());
67
         System.out.println("fanhui:" + jsonObject1.toString());
67
         return AjaxResult.success();
68
         return AjaxResult.success();
68
     }
69
     }

+ 2
- 2
ruoyi-admin/src/main/resources/application-druid.yml Просмотреть файл

6
         druid:
6
         druid:
7
             # 主库数据源
7
             # 主库数据源
8
             master:
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
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
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
11
                 username: root
11
                 username: root
12
                 password: YMzc157#
12
                 password: YMzc157#
13
             # 从库数据源
13
             # 从库数据源

+ 8
- 3
ruoyi-admin/src/main/resources/application.yml Просмотреть файл

18
 # 开发环境配置
18
 # 开发环境配置
19
 server:
19
 server:
20
   # 测试环境6001,开发环境7001
20
   # 测试环境6001,开发环境7001
21
-  port: 7001
21
+  port: 6001
22
   servlet:
22
   servlet:
23
     # 应用的访问路径
23
     # 应用的访问路径
24
     context-path: /
24
     context-path: /
72
     host: 121.40.189.20
72
     host: 121.40.189.20
73
     # 端口,默认为6379
73
     # 端口,默认为6379
74
     port: 6389
74
     port: 6389
75
-    # 数据库索引
76
-    database: 0
75
+    # 数据库索引,测试环境1,正式环境0
76
+    database: 1
77
     # 密码
77
     # 密码
78
     password:
78
     password:
79
     # 连接超时时间
79
     # 连接超时时间
198
 onlyOfficeConfig:
198
 onlyOfficeConfig:
199
   #  url: http://172.16.0.254:9090/files/upload
199
   #  url: http://172.16.0.254:9090/files/upload
200
   url: http://121.40.189.20:9090/files/upload
200
   url: http://121.40.189.20:9090/files/upload
201
+#  北明
202
+BMConfig:
203
+  userName: BWT_MEDIATION
204
+  password: 86251b190e3a40f3942v215d1762c663
205
+  syncSource: BWT_MEDIATION
201
     #jodconverter:
206
     #jodconverter:
202
     #  local:
207
     #  local:
203
     #    host: 121.40.189.20
208
     #    host: 121.40.189.20

+ 1
- 1
ruoyi-common/pom.xml Просмотреть файл

200
         <dependency>
200
         <dependency>
201
             <groupId>com.tencentcloudapi</groupId>
201
             <groupId>com.tencentcloudapi</groupId>
202
             <artifactId>tencentcloud-sdk-java</artifactId>
202
             <artifactId>tencentcloud-sdk-java</artifactId>
203
-            <version>3.1.876</version>
203
+            <version>3.1.962</version>
204
         </dependency>
204
         </dependency>
205
 
205
 
206
         <dependency>
206
         <dependency>

+ 37
- 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java Просмотреть файл

64
      * 法定代表人
64
      * 法定代表人
65
      */
65
      */
66
     private String compLegalPerson;
66
     private String compLegalPerson;
67
+    /**
68
+     * 住所
69
+     */
70
+    private String home;
71
+    /**
72
+     * 联系地址
73
+     */
74
+    private String address;
75
+    /**
76
+     *
77
+     * 国籍,0-国内,1-国外
78
+     */
79
+    private Integer nationality;
80
+
81
+    public String getAddress() {
82
+        return address;
83
+    }
84
+
85
+    public void setAddress(String address) {
86
+        this.address = address;
87
+    }
88
+
89
+    public Integer getNationality() {
90
+        return nationality;
91
+    }
92
+
93
+    public String getHome() {
94
+        return home;
95
+    }
96
+
97
+    public void setHome(String home) {
98
+        this.home = home;
99
+    }
100
+
101
+    public void setNationality(Integer nationality) {
102
+        this.nationality = nationality;
103
+    }
67
 
104
 
68
     public String getCode() {
105
     public String getCode() {
69
         return code;
106
         return code;

+ 1
- 7
ruoyi-common/src/main/java/com/ruoyi/common/utils/PdfUtils.java Просмотреть файл

4
 import com.documents4j.api.IConverter;
4
 import com.documents4j.api.IConverter;
5
 import com.documents4j.job.LocalConverter;
5
 import com.documents4j.job.LocalConverter;
6
 import com.itextpdf.text.Document;
6
 import com.itextpdf.text.Document;
7
-import com.itextpdf.text.Font;
8
 import com.itextpdf.text.PageSize;
7
 import com.itextpdf.text.PageSize;
9
-import com.itextpdf.text.pdf.BaseFont;
10
 import com.itextpdf.text.pdf.PdfWriter;
8
 import com.itextpdf.text.pdf.PdfWriter;
11
 import com.itextpdf.tool.xml.XMLWorkerFontProvider;
9
 import com.itextpdf.tool.xml.XMLWorkerFontProvider;
12
 import com.itextpdf.tool.xml.XMLWorkerHelper;
10
 import com.itextpdf.tool.xml.XMLWorkerHelper;
13
-import com.ruoyi.common.config.RuoYiConfig;
14
-import com.tencentcloudapi.teo.v20220901.models.CC;
15
 import lombok.extern.slf4j.Slf4j;
11
 import lombok.extern.slf4j.Slf4j;
16
 
12
 
17
 import java.io.*;
13
 import java.io.*;
18
 import java.nio.charset.Charset;
14
 import java.nio.charset.Charset;
19
 import java.nio.file.Files;
15
 import java.nio.file.Files;
20
 
16
 
21
-import static cn.hutool.core.util.ClassLoaderUtil.getClassLoader;
22
-
23
 /**
17
 /**
24
  * @author wangqiong
18
  * @author wangqiong
25
  * @description pdf转换工具类
19
  * @description pdf转换工具类
44
             document.setMarginMirroring(false);
38
             document.setMarginMirroring(false);
45
             document.open();
39
             document.open();
46
             // 解决PDF中文不显示
40
             // 解决PDF中文不显示
47
-            String fontPath = "/D:/simsun.ttf"; //字体文件路径
41
+            String fontPath = "/home/ruoyi/uploadPath/songfont/simsun.ttf"; //字体文件路径
48
             XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
42
             XMLWorkerFontProvider provider = new XMLWorkerFontProvider(XMLWorkerFontProvider.DONTLOOKFORFONTS);
49
             provider.register(fontPath);//注册字体
43
             provider.register(fontPath);//注册字体
50
             log.error("注册字体");
44
             log.error("注册字体");

+ 14
- 9
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java Просмотреть файл

1
 package com.ruoyi.framework.web.service;
1
 package com.ruoyi.framework.web.service;
2
 
2
 
3
-import java.util.HashSet;
4
-import java.util.List;
5
-import java.util.Set;
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.stereotype.Component;
8
-import org.springframework.util.CollectionUtils;
9
 import com.ruoyi.common.core.domain.entity.SysRole;
3
 import com.ruoyi.common.core.domain.entity.SysRole;
10
 import com.ruoyi.common.core.domain.entity.SysUser;
4
 import com.ruoyi.common.core.domain.entity.SysUser;
11
 import com.ruoyi.system.service.ISysMenuService;
5
 import com.ruoyi.system.service.ISysMenuService;
12
 import com.ruoyi.system.service.ISysRoleService;
6
 import com.ruoyi.system.service.ISysRoleService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Component;
9
+import org.springframework.util.CollectionUtils;
10
+
11
+import java.util.ArrayList;
12
+import java.util.HashSet;
13
+import java.util.List;
14
+import java.util.Set;
13
 
15
 
14
 /**
16
 /**
15
  * 用户权限处理
17
  * 用户权限处理
31
      * @param user 用户信息
33
      * @param user 用户信息
32
      * @return 角色权限信息
34
      * @return 角色权限信息
33
      */
35
      */
34
-    public Set<String> getRolePermission(SysUser user)
36
+    public List<SysRole>  getRolePermission(SysUser user)
35
     {
37
     {
36
-        Set<String> roles = new HashSet<String>();
38
+        List<SysRole> roles = new ArrayList<>();
37
         // 管理员拥有所有权限
39
         // 管理员拥有所有权限
38
         if (user.isAdmin())
40
         if (user.isAdmin())
39
         {
41
         {
40
-            roles.add("admin");
42
+            SysRole sysRole = new SysRole();
43
+            sysRole.setRoleId(1L);
44
+            sysRole.setRoleKey("admin");
45
+            roles.add(sysRole);
41
         }
46
         }
42
         else
47
         else
43
         {
48
         {

+ 16
- 16
ruoyi-system/pom.xml Просмотреть файл

45
             <version>2.1.5</version>
45
             <version>2.1.5</version>
46
         </dependency>
46
         </dependency>
47
     </dependencies>
47
     </dependencies>
48
-    <build>
49
-        <plugins>
50
-            <plugin>
51
-                <groupId>org.springframework.boot</groupId>
52
-                <artifactId>spring-boot-maven-plugin</artifactId>
53
-                <configuration>
54
-                    <excludes>
55
-                        <exclude>
56
-                            <groupId>org.projectlombok</groupId>
57
-                            <artifactId>lombok</artifactId>
58
-                        </exclude>
59
-                    </excludes>
60
-                </configuration>
61
-            </plugin>
62
-        </plugins>
63
-    </build>
48
+<!--    <build>-->
49
+<!--        <plugins>-->
50
+<!--            <plugin>-->
51
+<!--                <groupId>org.springframework.boot</groupId>-->
52
+<!--                <artifactId>spring-boot-maven-plugin</artifactId>-->
53
+<!--                <configuration>-->
54
+<!--                    <excludes>-->
55
+<!--                        <exclude>-->
56
+<!--                            <groupId>org.projectlombok</groupId>-->
57
+<!--                            <artifactId>lombok</artifactId>-->
58
+<!--                        </exclude>-->
59
+<!--                    </excludes>-->
60
+<!--                </configuration>-->
61
+<!--            </plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><configuration><source>9</source><target>9</target></configuration></plugin>-->
62
+<!--        </plugins>-->
63
+<!--    </build>-->
64
 </project>
64
 </project>

+ 2
- 1
ruoyi-system/src/main/java/com/ruoyi/system/service/BeiMingInterface.java Просмотреть файл

2
 
2
 
3
 import com.alibaba.fastjson.JSONObject;
3
 import com.alibaba.fastjson.JSONObject;
4
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
4
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
5
+import com.ruoyi.common.enums.DocumentTypeEnum;
5
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
6
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
6
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseStatusInfo;
7
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseStatusInfo;
7
 
8
 
70
      * @param caseNo     案件编号
71
      * @param caseNo     案件编号
71
      * @return
72
      * @return
72
      */
73
      */
73
-    MsCaseFileInfo pushAttachmentInfo(String username, String password, File file, String syncSource, String caseNo, AttachmentOperateTypeEnum operateTypeEnum);
74
+    MsCaseFileInfo pushAttachmentInfo(String username, String password, File file, String syncSource, String caseNo, AttachmentOperateTypeEnum operateTypeEnum, DocumentTypeEnum documentTypeEnum);
74
 
75
 
75
     /**
76
     /**
76
      * 删除附件
77
      * 删除附件

+ 3
- 3
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java Просмотреть файл

1
 package com.ruoyi.system.service;
1
 package com.ruoyi.system.service;
2
 
2
 
3
-import java.util.List;
4
-import java.util.Set;
5
 import com.ruoyi.common.core.domain.entity.SysRole;
3
 import com.ruoyi.common.core.domain.entity.SysRole;
6
 import com.ruoyi.system.domain.SysUserRole;
4
 import com.ruoyi.system.domain.SysUserRole;
7
 
5
 
6
+import java.util.List;
7
+
8
 /**
8
 /**
9
  * 角色业务层
9
  * 角色业务层
10
  * 
10
  * 
34
      * @param userId 用户ID
34
      * @param userId 用户ID
35
      * @return 权限列表
35
      * @return 权限列表
36
      */
36
      */
37
-    public Set<String> selectRolePermissionByUserId(Long userId);
37
+    public List<SysRole>  selectRolePermissionByUserId(Long userId);
38
 
38
 
39
     /**
39
     /**
40
      * 查询所有角色
40
      * 查询所有角色

+ 3
- 2
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BeiMingInterfaceService.java Просмотреть файл

5
 import com.fasterxml.jackson.databind.ObjectMapper;
5
 import com.fasterxml.jackson.databind.ObjectMapper;
6
 import com.fasterxml.jackson.databind.node.ObjectNode;
6
 import com.fasterxml.jackson.databind.node.ObjectNode;
7
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
7
 import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
8
+import com.ruoyi.common.enums.DocumentTypeEnum;
8
 import com.ruoyi.common.exception.ServiceException;
9
 import com.ruoyi.common.exception.ServiceException;
9
 import com.ruoyi.system.domain.entity.log.MsRequestLog;
10
 import com.ruoyi.system.domain.entity.log.MsRequestLog;
10
 import com.ruoyi.system.service.BeiMingInterface;
11
 import com.ruoyi.system.service.BeiMingInterface;
335
      */
336
      */
336
     @Transactional
337
     @Transactional
337
     @Override
338
     @Override
338
-    public MsCaseFileInfo pushAttachmentInfo(String username, String password, File file,  String syncSource, String caseNo,AttachmentOperateTypeEnum operateTypeEnum) {
339
+    public MsCaseFileInfo pushAttachmentInfo(String username, String password, File file, String syncSource, String caseNo, AttachmentOperateTypeEnum operateTypeEnum, DocumentTypeEnum documentTypeEnum) {
339
         JSONObject result = new JSONObject();
340
         JSONObject result = new JSONObject();
340
         MsCaseFileInfo fileInfo=null;
341
         MsCaseFileInfo fileInfo=null;
341
         //1.获取token
342
         //1.获取token
354
                         System.out.println("fileId====:" + fileId);
355
                         System.out.println("fileId====:" + fileId);
355
                         if (fileId != null) {
356
                         if (fileId != null) {
356
                             //3.同步附件更新信息
357
                             //3.同步附件更新信息
357
-                             fileInfo = MsCaseFileInfo.builder().fileId(fileId).fileName(file.getName()).abutmentId(fileId).abutmentCaseId(caseNo).documentSubject("EVEDENT").documentType("EVEDENT_METERIAL").build();
358
+                             fileInfo = MsCaseFileInfo.builder().fileId(fileId).fileName(file.getName()).abutmentId(fileId).abutmentCaseId(caseNo).documentSubject("EVEDENT").documentType(documentTypeEnum.getCode()).build();
358
                             result = syncAttachmentInfo(token, username, operateTypeEnum.getCode(), caseNo, fileInfo);
359
                             result = syncAttachmentInfo(token, username, operateTypeEnum.getCode(), caseNo, fileInfo);
359
                             // 更新到附件表将fileId
360
                             // 更新到附件表将fileId
360
 //                            result = syncAttachmentInfo(token, username, AttachmentOperateTypeEnum.UPD.getCode(), caseNo, fileInfo);
361
 //                            result = syncAttachmentInfo(token, username, AttachmentOperateTypeEnum.UPD.getCode(), caseNo, fileInfo);

+ 3
- 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MsRequestLogServiceImpl.java Просмотреть файл

5
 import com.ruoyi.system.service.MsRequestLogService;
5
 import com.ruoyi.system.service.MsRequestLogService;
6
 import org.springframework.beans.factory.annotation.Autowired;
6
 import org.springframework.beans.factory.annotation.Autowired;
7
 import org.springframework.stereotype.Service;
7
 import org.springframework.stereotype.Service;
8
+import org.springframework.transaction.annotation.Propagation;
9
+import org.springframework.transaction.annotation.Transactional;
8
 
10
 
9
 /**
11
 /**
10
  * @Classname MsRequestLogServiceImpl
12
  * @Classname MsRequestLogServiceImpl
17
 public class MsRequestLogServiceImpl implements MsRequestLogService {
19
 public class MsRequestLogServiceImpl implements MsRequestLogService {
18
     @Autowired
20
     @Autowired
19
     private MsRequestLogMapper logMapper;
21
     private MsRequestLogMapper logMapper;
22
+    @Transactional(propagation = Propagation.REQUIRES_NEW)
20
     @Override
23
     @Override
21
     public void insert(MsRequestLog requestLog) {
24
     public void insert(MsRequestLog requestLog) {
22
         logMapper.insert(requestLog);
25
         logMapper.insert(requestLog);

+ 3
- 10
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java Просмотреть файл

93
      * @return 权限列表
93
      * @return 权限列表
94
      */
94
      */
95
     @Override
95
     @Override
96
-    public Set<String> selectRolePermissionByUserId(Long userId)
96
+    public  List<SysRole> selectRolePermissionByUserId(Long userId)
97
     {
97
     {
98
         List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
98
         List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId);
99
-        Set<String> permsSet = new HashSet<>();
100
-        for (SysRole perm : perms)
101
-        {
102
-            if (StringUtils.isNotNull(perm))
103
-            {
104
-                permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
105
-            }
106
-        }
107
-        return permsSet;
99
+
100
+        return perms;
108
     }
101
     }
109
 
102
 
110
     /**
103
     /**

+ 1
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/WeChatUserServiceImpl.java Просмотреть файл

107
         }else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
107
         }else if(!codeCache.equals(ientityAuthentication.getVerifyCode())){
108
             return AjaxResult.warn("验证码校验失败");
108
             return AjaxResult.warn("验证码校验失败");
109
         }
109
         }
110
+        // 根据用户名或者邮箱或者手机号查询系统用户表中是否存在该用户
110
         SysUser sysUserName=sysUserMapper.checkUserNameUnique(ientityAuthentication.getUserName());
111
         SysUser sysUserName=sysUserMapper.checkUserNameUnique(ientityAuthentication.getUserName());
111
         if(sysUserName!=null){
112
         if(sysUserName!=null){
112
             return AjaxResult.warn("账号已存在");
113
             return AjaxResult.warn("账号已存在");

+ 81
- 24
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Просмотреть файл

259
         if(CollectionUtil.isEmpty(list)){
259
         if(CollectionUtil.isEmpty(list)){
260
             return;
260
             return;
261
         }
261
         }
262
+        isMediatorRole=false;
262
         // 查询申请人和被申请人
263
         // 查询申请人和被申请人
263
         List<Long> caseIds = list.stream().map(MsCaseApplicationVO::getId).collect(Collectors.toList());
264
         List<Long> caseIds = list.stream().map(MsCaseApplicationVO::getId).collect(Collectors.toList());
264
 
265
 
271
         }
272
         }
272
 
273
 
273
         for (MsCaseApplicationVO vo : list) {
274
         for (MsCaseApplicationVO vo : list) {
275
+            if(vo.getMediatorId()!=null&&vo.getMediatorId()==loginUserId){
276
+                isMediatorRole=true;
277
+            }
274
             // 设置申请人和被申请人
278
             // 设置申请人和被申请人
275
             if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
279
             if(affiliateMap!=null && affiliateMap.containsKey(vo.getId())){
276
                 List<MsCaseAffiliate> affiliates = affiliateMap.get(vo.getId());
280
                 List<MsCaseAffiliate> affiliates = affiliateMap.get(vo.getId());
291
 
295
 
292
                         }
296
                         }
293
                     }
297
                     }
294
-                    if(StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("申请人")
295
-                    && affiliate.getRoleType()!=null && affiliate.getRoleType()==1){
296
-                        applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
298
+                    if(vo.getOrganizeFlag()==null || vo.getOrganizeFlag()!=1) {
299
+                        if (StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("申请人")
300
+                                && affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getName())) {
301
+                            applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
302
+                        }
303
+                    }else {
304
+                        // 组织机构
305
+                        if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())) {
306
+                            applicantName.append(affiliate.getApplicantOrgName()).append(Constants.CN_SPLIT_COMMA);
307
+                        }
297
                     }
308
                     }
298
                     if(StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人")
309
                     if(StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人")
299
-                            && affiliate.getRoleType()!=null && affiliate.getRoleType()==3){
310
+                            && affiliate.getRoleType()!=null && affiliate.getRoleType()==3&&StrUtil.isNotEmpty(affiliate.getName())){
300
                         respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
311
                         respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
301
                     }
312
                     }
302
 
313
 
585
         if (caseApplication.getId() == null) {
596
         if (caseApplication.getId() == null) {
586
             caseApplication.setId(IdWorkerUtil.getId());
597
             caseApplication.setId(IdWorkerUtil.getId());
587
         }
598
         }
599
+        if(caseApplication.getOrganizeFlag()==null){
600
+            caseApplication.setOrganizeFlag(0);
601
+        }
588
         caseApplication.setCaseStatusName(caseFlow.getCaseStatusName());
602
         caseApplication.setCaseStatusName(caseFlow.getCaseStatusName());
589
         caseApplication.setCaseFlowId(caseFlow.getId());
603
         caseApplication.setCaseFlowId(caseFlow.getId());
590
         caseApplication.setCreateTime(new Date());
604
         caseApplication.setCreateTime(new Date());
680
      */
694
      */
681
     @Transactional
695
     @Transactional
682
     public void setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder) {
696
     public void setCaseAfflicate(MsCaseApplicationVO caseApplication, MsCaseAffiliate affiliate,int groupOrder) {
683
-        if(affiliate==null || StrUtil.isEmpty(affiliate.getEmail()) || StrUtil.isEmpty(affiliate.getName())){
697
+        boolean b = caseApplication.getOrganizeFlag() != 1 && affiliate.getRoleType() == 1 && StrUtil.isEmpty(affiliate.getEmail());
698
+        if(affiliate==null ||b|| StrUtil.isEmpty(affiliate.getName())){
684
             return;
699
             return;
685
         }
700
         }
686
         affiliate.setGroupOrder(groupOrder);
701
         affiliate.setGroupOrder(groupOrder);
739
         } else {
754
         } else {
740
             // 申请机构
755
             // 申请机构
741
             if (affiliate.getRoleType() == 1) {
756
             if (affiliate.getRoleType() == 1) {
757
+                affiliate.setOperatorFlag(0);
742
                 // 申请人,从缓存中判断部门是否存在
758
                 // 申请人,从缓存中判断部门是否存在
743
                 Object deptCache = redisCache.getCacheObject(CacheConstants.DEPT_KEY + affiliate.getName());
759
                 Object deptCache = redisCache.getCacheObject(CacheConstants.DEPT_KEY + affiliate.getName());
744
                 if (ObjectUtil.isEmpty(deptCache)) {
760
                 if (ObjectUtil.isEmpty(deptCache)) {
751
                     dept.setStatus("0");
767
                     dept.setStatus("0");
752
                     dept.setDelFlag("0");
768
                     dept.setDelFlag("0");
753
                     dept.setCode(affiliate.getCode());
769
                     dept.setCode(affiliate.getCode());
770
+                    dept.setHome(affiliate.getHome());
771
+                    dept.setAddress(affiliate.getAddress());
754
                     dept.setCompLegalPerson(affiliate.getCompLegalPerson());
772
                     dept.setCompLegalPerson(affiliate.getCompLegalPerson());
755
                     dept.setCreateBy(getUsername());
773
                     dept.setCreateBy(getUsername());
756
-                    dept.setUpdateBy(getUsername());
774
+                    dept.setCreateTime(new Date());
775
+                    dept.setNationality(affiliate.getNationality());
757
                     sysDeptMapper.insertDept(dept);
776
                     sysDeptMapper.insertDept(dept);
758
                     // 更新缓存
777
                     // 更新缓存
759
                     redisCache.setCacheObject(CacheConstants.DEPT_KEY + dept.getDeptName(), dept.getDeptId());
778
                     redisCache.setCacheObject(CacheConstants.DEPT_KEY + dept.getDeptName(), dept.getDeptId());
779
+                }else {
780
+                    // 更新部门
781
+                    SysDept dept = new SysDept();
782
+                    dept.setDeptId((Long) deptCache);
783
+                    dept.setCode(affiliate.getCode());
784
+                    dept.setCompLegalPerson(affiliate.getCompLegalPerson());
785
+                    dept.setUpdateBy(getUsername());
786
+                    dept.setUpdateTime(new Date());
787
+                    dept.setNationality(affiliate.getNationality());
788
+                    dept.setHome(affiliate.getHome());
789
+                    dept.setAddress(affiliate.getAddress());
790
+                    sysDeptMapper.updateDept(dept);
760
                 }
791
                 }
761
                 affiliate.setApplicantDeptId(redisCache.getCacheObject(CacheConstants.DEPT_KEY + affiliate.getName()));
792
                 affiliate.setApplicantDeptId(redisCache.getCacheObject(CacheConstants.DEPT_KEY + affiliate.getName()));
762
             } else {
793
             } else {
779
         if(StrUtil.isEmpty(affiliate.getEmail())){
810
         if(StrUtil.isEmpty(affiliate.getEmail())){
780
             return;
811
             return;
781
         }
812
         }
782
-        Object userEmailCache = redisCache.getCacheObject(CacheConstants.USER_EMAIL_KEY + affiliate.getEmail());
813
+       // Object userEmailCache = redisCache.getCacheObject(CacheConstants.USER_EMAIL_KEY + affiliate.getEmail());
783
         SysUser user=null;
814
         SysUser user=null;
784
-        if(ObjectUtil.isEmpty(userEmailCache)){
815
+      //  if(ObjectUtil.isEmpty(userEmailCache)){
785
              user = sysUserMapper.selectUserByUserName(affiliate.getEmail());
816
              user = sysUserMapper.selectUserByUserName(affiliate.getEmail());
786
-        }else {
787
-            user=(SysUser)userEmailCache;
788
-        }
817
+       // }else {
818
+       //     user=(SysUser)userEmailCache;
819
+      //  }
789
 
820
 
790
 
821
 
791
         // 判断该用户是否存在
822
         // 判断该用户是否存在
951
         if (msCaseAffiliateVO==null) {
982
         if (msCaseAffiliateVO==null) {
952
             return AjaxResult.error("案件相关人员未填写");
983
             return AjaxResult.error("案件相关人员未填写");
953
         }
984
         }
985
+        if(caseApplication.getOrganizeFlag()==null){
986
+            caseApplication.setOrganizeFlag(0);
987
+        }
954
         // 计算仲裁费用
988
         // 计算仲裁费用
955
         caseApplication.setCaseSubjectAmount(new BigDecimal("30000"));
989
         caseApplication.setCaseSubjectAmount(new BigDecimal("30000"));
956
         setFeePayableMethod(caseApplication);
990
         setFeePayableMethod(caseApplication);
1507
                 }
1541
                 }
1508
                 String templatePath = "/home/ruoyi" + caseAttach.getAnnexPath();
1542
                 String templatePath = "/home/ruoyi" + caseAttach.getAnnexPath();
1509
                 File file = new File(templatePath.replace("/profile", "/uploadPath"));
1543
                 File file = new File(templatePath.replace("/profile", "/uploadPath"));
1510
-                MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplication.getCaseNum(),AttachmentOperateTypeEnum.ADD);
1544
+                MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplication.getCaseNum(),AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_METERIAL);
1511
                 // 更新附件表
1545
                 // 更新附件表
1512
                 if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
1546
                 if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
1513
                     caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
1547
                     caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
1905
 //                selectedMediatorIds = selectedMediators.stream().map(MsCaseMediator::getMediatorId).collect(Collectors.toList());
1939
 //                selectedMediatorIds = selectedMediators.stream().map(MsCaseMediator::getMediatorId).collect(Collectors.toList());
1906
 //            }
1940
 //            }
1907
             for (MsCaseAffiliate affiliate : affiliates) {
1941
             for (MsCaseAffiliate affiliate : affiliates) {
1908
-                if(affiliate.getUserId().equals(loginUser.getUser().getUserId())){
1942
+                if(affiliate.getUserId()!=null && affiliate.getUserId().equals(loginUser.getUser().getUserId())){
1909
                     if( affiliate.getRoleType()==null){
1943
                     if( affiliate.getRoleType()==null){
1910
                         continue;
1944
                         continue;
1911
                     }
1945
                     }
1971
             return AjaxResult.error("未找到案件相关人员");
2005
             return AjaxResult.error("未找到案件相关人员");
1972
         }
2006
         }
1973
         for (MsCaseAffiliate affiliate : affiliates) {
2007
         for (MsCaseAffiliate affiliate : affiliates) {
1974
-            if(affiliate.getUserId().equals(user.getUserId())){
2008
+            if((affiliate.getUserId()!=null && affiliate.getUserId().equals(user.getUserId()))){
1975
                 if( affiliate.getRoleType()==null){
2009
                 if( affiliate.getRoleType()==null){
1976
                     continue;
2010
                     continue;
1977
                 }
2011
                 }
2370
     public SysUser getUserInfo() {
2404
     public SysUser getUserInfo() {
2371
         SysUser sysUser =new SysUser();
2405
         SysUser sysUser =new SysUser();
2372
 
2406
 
2373
-        if(StrUtil.isNotEmpty(SecurityUtils.getUsername())){
2374
-             sysUser = sysUserMapper.selectUserByUserName(getUsername());
2407
+        if(SecurityUtils.getUserId()!=null){
2408
+             sysUser = sysUserMapper.selectUserById(SecurityUtils.getUserId());
2375
 
2409
 
2376
         }
2410
         }
2377
         return sysUser;
2411
         return sysUser;
2671
 
2705
 
2672
                                                         //发送签名链接短信,尊敬的{1}用户,您的{2}调解案件,签名链接{3},请点击链接签名,如非本人操作,请忽略本短信
2706
                                                         //发送签名链接短信,尊敬的{1}用户,您的{2}调解案件,签名链接{3},请点击链接签名,如非本人操作,请忽略本短信
2673
                                                         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
2707
                                                         SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
2674
-                                                        request.setTemplateId("2115975");
2708
+                                                        request.setTemplateId("2116857");
2675
                                                         // todo
2709
                                                         // todo
2676
                                                         // 申请人发送短信
2710
                                                         // 申请人发送短信
2677
                                                         request.setPhone(applicantAffiliateOpt.get().getPhone());
2711
                                                         request.setPhone(applicantAffiliateOpt.get().getPhone());
2698
                                                         String urlResponnew = urlRespon.substring(urlRespon.lastIndexOf("/") + 1);
2732
                                                         String urlResponnew = urlRespon.substring(urlRespon.lastIndexOf("/") + 1);
2699
 
2733
 
2700
                                                         SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
2734
                                                         SmsUtils.SendSmsRequest request1 = new SmsUtils.SendSmsRequest();
2701
-                                                        request1.setTemplateId("2115975");
2735
+                                                        request1.setTemplateId("2116857");
2702
                                                         request1.setPhone(resAffiliateOpt.get().getPhone());
2736
                                                         request1.setPhone(resAffiliateOpt.get().getPhone());
2703
                                                         request1.setTemplateParamSet(new String[]{resAffiliateOpt.get().getName(), application.getCaseNum(), urlResponnew});
2737
                                                         request1.setTemplateParamSet(new String[]{resAffiliateOpt.get().getName(), application.getCaseNum(), urlResponnew});
2704
                                                         Boolean aBoolean1 = SmsUtils.sendSms(request1);
2738
                                                         Boolean aBoolean1 = SmsUtils.sendSms(request1);
2722
                                                         String urlResponnewMedi = urlResponMedi.substring(urlResponMedi.lastIndexOf("/") + 1);
2756
                                                         String urlResponnewMedi = urlResponMedi.substring(urlResponMedi.lastIndexOf("/") + 1);
2723
 
2757
 
2724
                                                         SmsUtils.SendSmsRequest requestMedi = new SmsUtils.SendSmsRequest();
2758
                                                         SmsUtils.SendSmsRequest requestMedi = new SmsUtils.SendSmsRequest();
2725
-                                                        requestMedi.setTemplateId("2115975");
2759
+                                                        requestMedi.setTemplateId("2116857");
2726
                                                         requestMedi.setPhone(sealSignRecord.getPensonAccountMedi());
2760
                                                         requestMedi.setPhone(sealSignRecord.getPensonAccountMedi());
2727
                                                         requestMedi.setTemplateParamSet(new String[]{sealSignRecord.getPensonNameMedi(), application.getCaseNum(), urlResponnewMedi});
2761
                                                         requestMedi.setTemplateParamSet(new String[]{sealSignRecord.getPensonNameMedi(), application.getCaseNum(), urlResponnewMedi});
2728
                                                         Boolean aBooleanMedi = SmsUtils.sendSms(requestMedi);
2762
                                                         Boolean aBooleanMedi = SmsUtils.sendSms(requestMedi);
3104
                 for (MsCaseAttach msCaseAttach : msCaseAttaches) {
3138
                 for (MsCaseAttach msCaseAttach : msCaseAttaches) {
3105
                     String templatePath = "/home/ruoyi" + msCaseAttach.getAnnexPath();
3139
                     String templatePath = "/home/ruoyi" + msCaseAttach.getAnnexPath();
3106
                     File file = new File(templatePath.replace("/profile", "/uploadPath"));
3140
                     File file = new File(templatePath.replace("/profile", "/uploadPath"));
3107
-                    MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, application.getCaseNum(),AttachmentOperateTypeEnum.ADD);
3141
+                    MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, application.getCaseNum(),AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
3108
                     // 更新附件表
3142
                     // 更新附件表
3109
                     if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
3143
                     if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
3110
                         msCaseAttach.setOtherSysFileId(caseFileInfo.getFileId());
3144
                         msCaseAttach.setOtherSysFileId(caseFileInfo.getFileId());
3363
                                 .build();
3397
                                 .build();
3364
 
3398
 
3365
                 }
3399
                 }
3400
+                //保存到附件表里,先删除之前的在保存
3401
+                msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
3402
+                msCaseAttachMapper.save(caseAttach);
3366
             }
3403
             }
3367
 
3404
 
3368
         }else {
3405
         }else {
3372
                     .annexPath(resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX))
3409
                     .annexPath(resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX))
3373
                     .annexType(annexType)
3410
                     .annexType(annexType)
3374
                     .build();
3411
                     .build();
3375
-        }
3376
-        //保存到附件表里,先删除之前的在保存
3377
-        if(caseAttach != null) {
3378
-           msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
3412
+            // 查找已经存在的附件
3413
+            List<MsCaseAttach> existAttach = msCaseAttachMapper.listCaseAttachByCaseIdAndType(application.getId(), annexType);
3414
+            if(CollectionUtil.isNotEmpty(existAttach)){
3415
+                // todo 对接北明,同步案件状态,删除
3416
+                for (MsCaseAttach msCaseAttach : existAttach) {
3417
+                    if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
3418
+                        continue;
3419
+                    }
3420
+                    beiMingInterfaceService.deleteAttachmentInfo(application.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
3421
+                }
3422
+            }
3423
+            msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
3424
+            if(StrUtil.isEmpty(application.getCaseSource())) {
3425
+                // 北明推送
3426
+                String path = "/home/ruoyi" + caseAttach.getAnnexPath();
3427
+                File file = new File(path.replace("/profile", "/uploadPath"));
3428
+                MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, application.getCaseNum(), AttachmentOperateTypeEnum.ADD, DocumentTypeEnum.EVEDENT_APPLY_BOOK);
3429
+
3430
+                // 更新附件表
3431
+                if (caseFileInfo != null && StrUtil.isNotEmpty(caseFileInfo.getFileId())) {
3432
+                    caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
3433
+                }
3434
+            }
3379
             msCaseAttachMapper.save(caseAttach);
3435
             msCaseAttachMapper.save(caseAttach);
3380
         }
3436
         }
3437
+
3381
     }
3438
     }
3382
 
3439
 
3383
     /**
3440
     /**

+ 31
- 31
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsSignSealServiceImpl.java Просмотреть файл

15
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
15
 import com.ruoyi.common.core.domain.entity.EsignHttpResponse;
16
 import com.ruoyi.common.core.domain.entity.SysRole;
16
 import com.ruoyi.common.core.domain.entity.SysRole;
17
 import com.ruoyi.common.core.domain.entity.SysUser;
17
 import com.ruoyi.common.core.domain.entity.SysUser;
18
-import com.ruoyi.common.enums.AnnexTypeEnum;
19
-import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
20
-import com.ruoyi.common.enums.PushCaseStatusEnum;
21
-import com.ruoyi.common.enums.YesOrNoEnum;
18
+import com.ruoyi.common.enums.*;
22
 import com.ruoyi.common.exception.EsignDemoException;
19
 import com.ruoyi.common.exception.EsignDemoException;
23
 import com.ruoyi.common.exception.ServiceException;
20
 import com.ruoyi.common.exception.ServiceException;
24
 import com.ruoyi.common.utils.EmailOutUtil;
21
 import com.ruoyi.common.utils.EmailOutUtil;
27
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
24
 import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
28
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
25
 import com.ruoyi.system.domain.entity.flow.MsCaseFlow;
29
 import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
26
 import com.ruoyi.system.domain.vo.flow.MsCaseFlowVO;
27
+import com.ruoyi.system.mapper.SysRoleMapper;
30
 import com.ruoyi.system.mapper.SysUserMapper;
28
 import com.ruoyi.system.mapper.SysUserMapper;
31
 import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
29
 import com.ruoyi.system.mapper.flow.MsCaseFlowMapper;
32
 import com.ruoyi.system.service.impl.BeiMingInterfaceService;
30
 import com.ruoyi.system.service.impl.BeiMingInterfaceService;
110
 
108
 
111
     @Autowired
109
     @Autowired
112
     private SendMailRecordMapper sendMailRecordMapper;
110
     private SendMailRecordMapper sendMailRecordMapper;
111
+    @Autowired
112
+    private SysRoleMapper roleMapper;
113
     // 北明配置
113
     // 北明配置
114
     @Value("${BMConfig.userName}")
114
     @Value("${BMConfig.userName}")
115
     private String BMUserName;
115
     private String BMUserName;
550
         if(CollectionUtil.isEmpty(affiliates)){
550
         if(CollectionUtil.isEmpty(affiliates)){
551
             return AjaxResult.error("未找到案件相关人员");
551
             return AjaxResult.error("未找到案件相关人员");
552
         }
552
         }
553
+        SysUser user = sysUserMapper.selectUserById(SecurityUtils.getLoginUser().getUser().getUserId());
554
+        List<SysRole> roles = user.getRoles();
555
+        if(CollectionUtil.isEmpty(roles)){
556
+            return AjaxResult.error("该用户未绑定角色");
557
+        }
558
+        long mediatorCount = roles.stream().filter(sysRole -> sysRole.getRoleName().equals("调解员")).count();
553
         List<MsCaseAffiliate> operatorList = affiliates.stream().filter(msCaseAffiliate -> msCaseAffiliate.getOperatorFlag() != null
559
         List<MsCaseAffiliate> operatorList = affiliates.stream().filter(msCaseAffiliate -> msCaseAffiliate.getOperatorFlag() != null
554
                 && msCaseAffiliate.getOperatorFlag() == 1
560
                 && msCaseAffiliate.getOperatorFlag() == 1
555
                 && StrUtil.isNotEmpty(msCaseAffiliate.getPhone())).collect(Collectors.toList());
561
                 && StrUtil.isNotEmpty(msCaseAffiliate.getPhone())).collect(Collectors.toList());
556
         Optional<MsCaseAffiliate> appOpt =null;
562
         Optional<MsCaseAffiliate> appOpt =null;
557
         Optional<MsCaseAffiliate> resOpt =null;
563
         Optional<MsCaseAffiliate> resOpt =null;
558
         if(CollectionUtil.isNotEmpty(operatorList)){
564
         if(CollectionUtil.isNotEmpty(operatorList)){
559
-           appOpt = operatorList.stream().filter(msCaseAffiliate -> msCaseAffiliate.getRoleType() != null
565
+           appOpt = operatorList.stream().filter(msCaseAffiliate -> msCaseAffiliate.getRoleType() != null && msCaseAffiliate.getUserId()!=null
560
                             && (msCaseAffiliate.getRoleType() == 1 || msCaseAffiliate.getRoleType() == 2))
566
                             && (msCaseAffiliate.getRoleType() == 1 || msCaseAffiliate.getRoleType() == 2))
561
                     .findFirst();
567
                     .findFirst();
562
-            resOpt = operatorList.stream().filter(msCaseAffiliate -> msCaseAffiliate.getRoleType() != null
568
+            resOpt = operatorList.stream().filter(msCaseAffiliate -> msCaseAffiliate.getRoleType() != null&& msCaseAffiliate.getUserId()!=null
563
                             && (msCaseAffiliate.getRoleType() == 3 || msCaseAffiliate.getRoleType() == 4))
569
                             && (msCaseAffiliate.getRoleType() == 3 || msCaseAffiliate.getRoleType() == 4))
564
                     .findFirst();
570
                     .findFirst();
565
         }
571
         }
566
-
572
+        if(appOpt==null || !appOpt.isPresent()){
573
+            return AjaxResult.error("未找到案件申请操作人");
574
+        }
575
+        if(resOpt==null || !resOpt.isPresent()){
576
+            return AjaxResult.error("未找到案件被申请操作人");
577
+        }
567
         MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
578
         MsCaseApplication caseApplication = msCaseApplicationMapper.selectByPrimaryKey(caseId);
568
         Integer organizeFlag = caseApplication.getOrganizeFlag();
579
         Integer organizeFlag = caseApplication.getOrganizeFlag();
569
-        SysUser user = new SysUser();
570
         Long userId = SecurityUtils.getUserId();
580
         Long userId = SecurityUtils.getUserId();
571
-        user.setUserId(userId);
572
-        List<SysUser> listSysUser = userMapper.selectUserList(user);
573
-        List<SysRole> allSysRole = new ArrayList<>();
574
-        for(SysUser sysUser :listSysUser){
575
-            List<SysRole> roles = sysUser.getRoles();
576
-            allSysRole.addAll(roles);
577
-        }
578
-        List<String> roleNames = allSysRole.stream().map(SysRole::getRoleName).collect(Collectors.toList());
579
-        if(roleNames.contains("申请人")){
580
-            if(appOpt==null || !appOpt.isPresent()){
581
-                return AjaxResult.error("未找到案件申请操作人");
582
-            }
581
+
582
+        if(appOpt.get().getUserId()!=null && appOpt.get().getUserId().equals(userId)){
583
+            // 申请人链接
583
             SealSignRecord sealSignRecordres = new SealSignRecord();
584
             SealSignRecord sealSignRecordres = new SealSignRecord();
584
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
585
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
585
             mssealSignRecord.setCaseAppliId(caseId);
586
             mssealSignRecord.setCaseAppliId(caseId);
605
             }
606
             }
606
 
607
 
607
 
608
 
608
-        }else if(roleNames.contains("被申请人")){
609
-            if(resOpt==null || !resOpt.isPresent()){
610
-                return AjaxResult.error("未找到案件申请操作人");
611
-            }
609
+        }
610
+        if(resOpt.get().getUserId()!=null && resOpt.get().getUserId().equals(userId)){
611
+
612
             SealSignRecord sealSignRecordres = new SealSignRecord();
612
             SealSignRecord sealSignRecordres = new SealSignRecord();
613
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
613
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
614
             mssealSignRecord.setCaseAppliId(caseId);
614
             mssealSignRecord.setCaseAppliId(caseId);
630
             }else {
630
             }else {
631
                 return AjaxResult.error();
631
                 return AjaxResult.error();
632
             }
632
             }
633
-        }else if(roleNames.contains("调解员")){
633
+        }
634
+        if(mediatorCount>0){
634
             SealSignRecord sealSignRecordres = new SealSignRecord();
635
             SealSignRecord sealSignRecordres = new SealSignRecord();
635
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
636
             MsSealSignRecord mssealSignRecord = new MsSealSignRecord();
636
             mssealSignRecord.setCaseAppliId(caseId);
637
             mssealSignRecord.setCaseAppliId(caseId);
859
                                 if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
860
                                 if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
860
                                         String templatePath = "/home/ruoyi" + savePath;
861
                                         String templatePath = "/home/ruoyi" + savePath;
861
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
862
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
862
-                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD);
863
+                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD, DocumentTypeEnum.EVEDENT_AGREEMENT);
863
                                     // 更新附件表
864
                                     // 更新附件表
864
                                     if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
865
                                     if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
865
                                         caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
866
                                         caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
954
                                     if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
955
                                     if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
955
                                         String templatePath = "/home/ruoyi" + savePath;
956
                                         String templatePath = "/home/ruoyi" + savePath;
956
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
957
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
957
-                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD);
958
+                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
958
                                         // 更新附件表
959
                                         // 更新附件表
959
                                         if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
960
                                         if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
960
                                             caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
961
                                             caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
1041
                                     caseAttach.setAnnexType(7);
1042
                                     caseAttach.setAnnexType(7);
1042
                                     caseAttach.setAnnexPath(savePath);
1043
                                     caseAttach.setAnnexPath(savePath);
1043
                                     caseAttach.setAnnexName(saveName);
1044
                                     caseAttach.setAnnexName(saveName);
1044
-                                    caseAttachMapper.save(caseAttach);
1045
+
1045
                                     // todo 对接北明,调用上传附件接口
1046
                                     // todo 对接北明,调用上传附件接口
1046
 
1047
 
1047
                                     if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
1048
                                     if(StrUtil.isEmpty(caseApplicationselect.getCaseSource()) ) {
1048
                                         String templatePath = "/home/ruoyi" + savePath;
1049
                                         String templatePath = "/home/ruoyi" + savePath;
1049
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
1050
                                         File file = new File(templatePath.replace("/profile", "/uploadPath"));
1050
-                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD);
1051
-
1051
+                                        MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplicationselect.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_AGREEMENT);
1052
                                         // 更新附件表
1052
                                         // 更新附件表
1053
                                         if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
1053
                                         if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
1054
                                             caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
1054
                                             caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
1055
-                                            msCaseAttachMapper.updateCaseAttachBycaseid(caseAttach);
1056
                                         }
1055
                                         }
1057
                                     }
1056
                                     }
1057
+                                    caseAttachMapper.save(caseAttach);
1058
                                 }
1058
                                 }
1059
 
1059
 
1060
                             }
1060
                             }

+ 57
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/VideoConferenceServiceImpl.java Просмотреть файл

1
 package com.ruoyi.wisdomarbitrate.service.mscase.impl;
1
 package com.ruoyi.wisdomarbitrate.service.mscase.impl;
2
 
2
 
3
 import cn.hutool.core.collection.CollectionUtil;
3
 import cn.hutool.core.collection.CollectionUtil;
4
+import cn.hutool.core.io.FileUtil;
5
+import cn.hutool.core.util.StrUtil;
4
 import cn.hutool.http.HttpUtil;
6
 import cn.hutool.http.HttpUtil;
5
 import com.alibaba.fastjson.JSON;
7
 import com.alibaba.fastjson.JSON;
6
 import com.alibaba.fastjson.JSONObject;
8
 import com.alibaba.fastjson.JSONObject;
9
 import com.ruoyi.common.core.domain.entity.SysRole;
11
 import com.ruoyi.common.core.domain.entity.SysRole;
10
 import com.ruoyi.common.core.domain.entity.SysUser;
12
 import com.ruoyi.common.core.domain.entity.SysUser;
11
 import com.ruoyi.common.enums.AnnexTypeEnum;
13
 import com.ruoyi.common.enums.AnnexTypeEnum;
14
+import com.ruoyi.common.enums.AttachmentOperateTypeEnum;
15
+import com.ruoyi.common.enums.DocumentTypeEnum;
12
 import com.ruoyi.common.exception.ServiceException;
16
 import com.ruoyi.common.exception.ServiceException;
13
 import com.ruoyi.common.utils.PdfUtils;
17
 import com.ruoyi.common.utils.PdfUtils;
14
 import com.ruoyi.common.utils.SecurityUtils;
18
 import com.ruoyi.common.utils.SecurityUtils;
15
 import com.ruoyi.system.mapper.SysRoleMapper;
19
 import com.ruoyi.system.mapper.SysRoleMapper;
16
 import com.ruoyi.system.mapper.SysUserMapper;
20
 import com.ruoyi.system.mapper.SysUserMapper;
21
+import com.ruoyi.system.service.impl.BeiMingInterfaceService;
17
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.ReservedConference;
22
 import com.ruoyi.wisdomarbitrate.domain.dto.mscase.ReservedConference;
18
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
23
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseApplication;
19
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
24
 import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
20
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
25
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO;
26
+import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseFileInfo;
21
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsReservedConferenceVO;
27
 import com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsReservedConferenceVO;
22
 import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
28
 import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseApplicationMapper;
23
 import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
29
 import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
39
 
45
 
40
 import javax.crypto.Mac;
46
 import javax.crypto.Mac;
41
 import javax.crypto.spec.SecretKeySpec;
47
 import javax.crypto.spec.SecretKeySpec;
48
+import java.io.File;
42
 import java.io.IOException;
49
 import java.io.IOException;
43
 import java.nio.file.Paths;
50
 import java.nio.file.Paths;
44
 import java.util.*;
51
 import java.util.*;
78
     private ReservedConferenceMapper reservedConferenceMapper;
85
     private ReservedConferenceMapper reservedConferenceMapper;
79
     @Autowired
86
     @Autowired
80
     private SysUserMapper sysUserMapper;
87
     private SysUserMapper sysUserMapper;
88
+    // 北明配置
89
+    @Value("${BMConfig.userName}")
90
+    private String BMUserName;
91
+    @Value("${BMConfig.password}")
92
+    private String BMPassword;
93
+    @Value("${BMConfig.syncSource}")
94
+    private String BMSyncSource;
95
+    @Autowired
96
+    BeiMingInterfaceService beiMingInterfaceService;
81
 
97
 
82
     /**
98
     /**
83
         视频回调
99
         视频回调
399
     @Transactional
415
     @Transactional
400
     @Override
416
     @Override
401
     public AjaxResult htmlToPDF(MsReservedConferenceVO reservedConferenceVO) {
417
     public AjaxResult htmlToPDF(MsReservedConferenceVO reservedConferenceVO) {
418
+        // 查询案件
419
+        MsCaseApplication caseApplication = caseApplicationMapper.selectByPrimaryKey(reservedConferenceVO.getCaseId());
420
+        if(caseApplication==null){
421
+            return AjaxResult.error("案件不存在");
422
+        }
402
         String currentFileName = System.currentTimeMillis() + ".pdf";
423
         String currentFileName = System.currentTimeMillis() + ".pdf";
403
         String fileName = null;
424
         String fileName = null;
404
         try {
425
         try {
413
         // 绑定案件
434
         // 绑定案件
414
         if(convertFlag){
435
         if(convertFlag){
415
             // 删除之前的庭审笔录
436
             // 删除之前的庭审笔录
437
+            if(StrUtil.isEmpty(caseApplication.getCaseSource())){
438
+                List<MsCaseAttach> existAttach = caseAttachMapper.listCaseAttachByCaseIdAndType(reservedConferenceVO.getCaseId(), AnnexTypeEnum.MEDIATE.getCode());
439
+                if(CollectionUtil.isNotEmpty(existAttach)){
440
+                    // todo 对接北明,同步案件状态,删除
441
+                    for (MsCaseAttach msCaseAttach : existAttach) {
442
+                        if(StrUtil.isEmpty(msCaseAttach.getOtherSysFileId())||StrUtil.isEmpty(msCaseAttach.getAnnexPath())){
443
+                            continue;
444
+                        }
445
+                        beiMingInterfaceService.deleteAttachmentInfo(caseApplication.getCaseNum(), msCaseAttach.getOtherSysFileId(), FileUtil.getName(msCaseAttach.getAnnexPath()));
446
+                    }
447
+                }
448
+            }
416
             caseAttachMapper.deleteCaseAttachByCasedIdAndType(reservedConferenceVO.getCaseId(),AnnexTypeEnum.MEDIATE.getCode());
449
             caseAttachMapper.deleteCaseAttachByCasedIdAndType(reservedConferenceVO.getCaseId(),AnnexTypeEnum.MEDIATE.getCode());
417
             MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
450
             MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(reservedConferenceVO.getCaseId())
418
                     .annexName(currentFileName)
451
                     .annexName(currentFileName)
419
                     .annexPath(fileName)
452
                     .annexPath(fileName)
420
                     .annexType(AnnexTypeEnum.MEDIATE.getCode())
453
                     .annexType(AnnexTypeEnum.MEDIATE.getCode())
421
                     .build();
454
                     .build();
455
+            // todo 对接北明,调用上传附件接口
456
+
457
+            if(StrUtil.isEmpty(caseApplication.getCaseSource()) ) {
458
+                String templatePath = "/home/ruoyi" + caseAttach.getAnnexPath();
459
+                File file = new File(templatePath.replace("/profile", "/uploadPath"));
460
+                MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplication.getCaseNum(), AttachmentOperateTypeEnum.ADD,DocumentTypeEnum.EVEDENT_MEDIATION_RECORD);
461
+                // 更新附件表
462
+                if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
463
+                    caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
464
+                }
465
+            }
422
             caseAttachMapper.save(caseAttach);
466
             caseAttachMapper.save(caseAttach);
423
             return AjaxResult.success();
467
             return AjaxResult.success();
424
         }else {
468
         }else {
460
                                 .annexPath(annexName)
504
                                 .annexPath(annexName)
461
                                 .annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
505
                                 .annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
462
                                 .build();
506
                                 .build();
507
+                        // todo 对接北明,调用上传附件接口
508
+
509
+                        if(StrUtil.isEmpty(caseApplication.getCaseSource()) ) {
510
+                            String templatePath = "/home/ruoyi" + caseAttach.getAnnexPath();
511
+                            File file = new File(templatePath.replace("/profile", "/uploadPath"));
512
+                            MsCaseFileInfo caseFileInfo = beiMingInterfaceService.pushAttachmentInfo(BMUserName, BMPassword, file, BMSyncSource, caseApplication.getCaseNum(), AttachmentOperateTypeEnum.ADD, DocumentTypeEnum.EVEDENT_MEDIATION_VIDEO);
513
+
514
+                            // 更新附件表
515
+                            if(caseFileInfo!=null && StrUtil.isNotEmpty(caseFileInfo.getFileId())){
516
+                                caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
517
+                            }
518
+                        }
463
                         caseAttachMapper.save(caseAttach);
519
                         caseAttachMapper.save(caseAttach);
520
+
464
                         return annexName;
521
                         return annexName;
465
                     }
522
                     }
466
                 }
523
                 }

+ 15
- 0
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml Просмотреть файл

115
  			<if test="createBy != null and createBy != ''">create_by,</if>
115
  			<if test="createBy != null and createBy != ''">create_by,</if>
116
  			<if test="code != null and code != ''">code,</if>
116
  			<if test="code != null and code != ''">code,</if>
117
  			<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person,</if>
117
  			<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person,</if>
118
+ 			<if test="home != null and home != ''">home,</if>
119
+ 			<if test="address != null and address != ''">address,</if>
120
+			<if test="nationality != null ">nationality,</if>
118
  			create_time
121
  			create_time
119
  		)values(
122
  		)values(
120
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
123
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
130
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
133
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
131
 		   <if test="code != null and code != ''">#{code},</if>
134
 		   <if test="code != null and code != ''">#{code},</if>
132
 		   <if test="compLegalPerson != null and compLegalPerson != ''">#{compLegalPerson},</if>
135
 		   <if test="compLegalPerson != null and compLegalPerson != ''">#{compLegalPerson},</if>
136
+		   <if test="home != null and home != ''">#{home},</if>
137
+		   <if test="address != null and address != ''">#{address},</if>
138
+			<if test="nationality != null ">#{nationality},</if>
133
  			sysdate()
139
  			sysdate()
134
  		);
140
  		);
135
 	</insert>
141
 	</insert>
148
 		create_by,
154
 		create_by,
149
 		code,
155
 		code,
150
 		comp_legal_person,
156
 		comp_legal_person,
157
+		nationality,
158
+		home,
159
+		address,
151
 		create_time
160
 		create_time
152
 		)values
161
 		)values
153
 		<foreach item="item" index="index" collection="list" separator=",">
162
 		<foreach item="item" index="index" collection="list" separator=",">
165
 		#{item.createBy},
174
 		#{item.createBy},
166
 		#{item.code},
175
 		#{item.code},
167
 		#{item.compLegalPerson},
176
 		#{item.compLegalPerson},
177
+		#{item.nationality},
178
+		#{item.home},
179
+		#{item.address},
168
 		sysdate()
180
 		sysdate()
169
 		)
181
 		)
170
 		</foreach>;
182
 		</foreach>;
186
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
198
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
187
  			<if test="code != null and code != ''">code = #{code},</if>
199
  			<if test="code != null and code != ''">code = #{code},</if>
188
  			<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person = #{compLegalPerson},</if>
200
  			<if test="compLegalPerson != null and compLegalPerson != ''">comp_legal_person = #{compLegalPerson},</if>
201
+ 			<if test="home != null and home != ''">home = #{home},</if>
202
+ 			<if test="address != null and address != ''">address = #{address},</if>
203
+ 			<if test="nationality != null ">nationality = #{nationality},</if>
189
  			update_time = sysdate()
204
  			update_time = sysdate()
190
  		</set>
205
  		</set>
191
  		where dept_id = #{deptId}
206
  		where dept_id = #{deptId}

+ 14
- 4
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseAffiliateMapper.xml Просмотреть файл

39
     group by a.case_appli_id
39
     group by a.case_appli_id
40
   </select>
40
   </select>
41
     <select id="selectByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate">
41
     <select id="selectByCaseId" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate">
42
-        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.nick_name name,u.id_card idCard,u.phonenumber phone,
43
-            u.email,u.home,u.address,u.sex,u.nationality,u.id_type idType,u.birth,a.user_id userId
42
+        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
43
+            u.email,
44
+               (case when a.user_id is null then d.dept_name else u.nick_name end)  name,
45
+               (case when a.user_id is null then d.home else u.home end) home,
46
+               (case when a.user_id is null then d.address else u.address end) address,
47
+               (case when a.user_id is null then d.nationality else u.nationality end) nationality,
48
+                u.sex,u.id_type idType,u.birth,a.user_id userId,c.organize_flag organizeFlag,c.case_source caseSource,d.dept_name applicantOrgName
44
         FROM
49
         FROM
45
             ms_case_application c
50
             ms_case_application c
46
                 JOIN ms_case_affiliate a ON a.case_appli_id=#{id} and c.id = a.case_appli_id
51
                 JOIN ms_case_affiliate a ON a.case_appli_id=#{id} and c.id = a.case_appli_id
52
         GROUP BY a.id
57
         GROUP BY a.id
53
     </select>
58
     </select>
54
     <select id="selectUserRoleByCaseIds" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate">
59
     <select id="selectUserRoleByCaseIds" resultType="com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAffiliate">
55
-        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.nick_name name,u.id_card idCard,u.phonenumber phone,
56
-               u.email,u.home,u.address,u.sex,u.nationality,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId
60
+        select c.id caseAppliId,a.id,a.role_type roleType,a.group_order groupOrder,a.operator_flag operatorFlag,d.code,d.comp_legal_person compLegalPerson,u.id_card idCard,u.phonenumber phone,
61
+               u.email,
62
+        (case when a.user_id is null then d.dept_name else u.nick_name end)  name,
63
+        (case when a.user_id is null then d.home else u.home end) home,
64
+        (case when a.user_id is null then d.address else u.address end) address,
65
+        (case when a.user_id is null then d.nationality else u.nationality end) nationality,
66
+        u.sex,u.id_type idType,u.birth,r.role_name roleName,d.dept_name applicantOrgName,a.user_id userId,a.applicant_dept_id applicantDeptId,c.organize_flag organizeFlag,c.case_source caseSource
57
         FROM
67
         FROM
58
             ms_case_application c
68
             ms_case_application c
59
                 JOIN ms_case_affiliate a ON  c.id = a.case_appli_id
69
                 JOIN ms_case_affiliate a ON  c.id = a.case_appli_id

+ 2
- 2
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/mscase/MsCaseApplicationMapper.xml Просмотреть файл

110
   <select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
110
   <select id="list" resultType="com.ruoyi.wisdomarbitrate.domain.vo.mscase.MsCaseApplicationVO">
111
     select t.* from(
111
     select t.* from(
112
     SELECT
112
     SELECT
113
-    c.id,c.media_result mediaResult,c.room_id roomId,0 AS pendingStatus,
113
+    c.id,c.organize_flag organizeFlag,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,0 AS pendingStatus,
114
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
114
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
115
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
115
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
116
     c.mediation_method mediationMethod,
116
     c.mediation_method mediationMethod,
120
     c.id
120
     c.id
121
     union
121
     union
122
     SELECT
122
     SELECT
123
-    c.id,c.media_result mediaResult,c.room_id roomId,1 AS pendingStatus,
123
+    c.id,c.organize_flag organizeFlag,c.case_source caseSource,c.media_result mediaResult,c.room_id roomId,1 AS pendingStatus,
124
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
124
     c.case_flow_id caseFlowId,c.batch_number batchNumber,c.case_num caseNum,
125
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
125
     u1.nick_name mediatorName,c.hear_date hearDate,c.case_status_name caseStatusName,c.create_time createTime,
126
     c.mediation_method mediationMethod,
126
     c.mediation_method mediationMethod,