Przeglądaj źródła

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

wangqiong123 2 lat temu
rodzic
commit
1c90f35d47

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/miniprogress/IdentityAuthentication.java Wyświetl plik

12
 
12
 
13
     /** ID */
13
     /** ID */
14
     private Long id;
14
     private Long id;
15
+    /**
16
+     * 角色id
17
+     */
18
+    private Long roleId;
15
     /** 姓名 */
19
     /** 姓名 */
16
     private String name;
20
     private String name;
17
     /** 身份证号 */
21
     /** 身份证号 */

+ 11
- 7
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/miniprogress/impl/WeChatUserServiceImpl.java Wyświetl plik

123
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
123
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
124
         SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
124
         SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
125
         // 查询角色
125
         // 查询角色
126
-        Long roleIdByName = roleMapper.selectRoleIdByName("被申请人");
127
-        if(roleIdByName==null){
128
-            return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
129
-        }
126
+        Long roleIdByName =ientityAuthentication.getRoleId();
127
+//        if(roleIdByName==null){
128
+//            return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
129
+//        }
130
         if(sysUser!=null){
130
         if(sysUser!=null){
131
             sysUser.setIdCard(ientityAuthentication.getIdentityNo());
131
             sysUser.setIdCard(ientityAuthentication.getIdentityNo());
132
             sysUser.setNickName(ientityAuthentication.getName());
132
             sysUser.setNickName(ientityAuthentication.getName());
137
             sysUserMapper.updateUser(sysUser);
137
             sysUserMapper.updateUser(sysUser);
138
             ientityAuthentication.setUserId(sysUser.getUserId());
138
             ientityAuthentication.setUserId(sysUser.getUserId());
139
             int count=0;
139
             int count=0;
140
-           if(CollectionUtil.isNotEmpty(sysUser.getRoles()) ){
140
+           if(CollectionUtil.isNotEmpty(sysUser.getRoles()) && roleIdByName!=null){
141
 
141
 
142
                for (SysRole role : sysUser.getRoles()) {
142
                for (SysRole role : sysUser.getRoles()) {
143
                    if(Objects.equals(role.getRoleId(), roleIdByName)){
143
                    if(Objects.equals(role.getRoleId(), roleIdByName)){
147
                }
147
                }
148
            }
148
            }
149
            if(CollectionUtil.isEmpty(sysUser.getRoles())||count==0){
149
            if(CollectionUtil.isEmpty(sysUser.getRoles())||count==0){
150
+               if(roleIdByName!=null) {
150
                    // 用户未关联被申请人角色,关联角色
151
                    // 用户未关联被申请人角色,关联角色
151
                    userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
152
                    userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
153
+               }
152
            }
154
            }
153
 
155
 
154
         }else {
156
         }else {
164
             if(row<1) {
166
             if(row<1) {
165
                 return AjaxResult.warn("注册失败");
167
                 return AjaxResult.warn("注册失败");
166
             }
168
             }
167
-            // 用户关联被申请人角色
168
-            userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
169
+            if(roleIdByName!=null) {
170
+                // 用户关联被申请人角色
171
+                userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
172
+            }
169
         }
173
         }
170
 
174
 
171
         ientityAuthentication.setUserId(sysUser.getUserId());
175
         ientityAuthentication.setUserId(sysUser.getUserId());

+ 4
- 5
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/mscase/impl/MsCaseApplicationServiceImpl.java Wyświetl plik

688
         }
688
         }
689
         String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
689
         String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
690
         templatePath=templatePath.replace("/profile","/uploadPath");
690
         templatePath=templatePath.replace("/profile","/uploadPath");
691
-
692
         try {
691
         try {
693
             File file = new File(templatePath);
692
             File file = new File(templatePath);
694
         } catch (Exception e) {
693
         } catch (Exception e) {
695
             throw new ServiceException("未找到模板");
694
             throw new ServiceException("未找到模板");
696
         }
695
         }
697
-
698
-        // 获取模板中的占位符key
696
+//        // 获取模板中的占位符key
699
         List<String> bookmarkList = getBookmarkByDocx(templatePath);
697
         List<String> bookmarkList = getBookmarkByDocx(templatePath);
700
         if (CollectionUtil.isEmpty(bookmarkList)) {
698
         if (CollectionUtil.isEmpty(bookmarkList)) {
701
             throw new ServiceException("请检查模板是否配置正确,未获取到占位符");
699
             throw new ServiceException("请检查模板是否配置正确,未获取到占位符");
1441
                 msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(), AnnexTypeEnum.MEDIATE_BOOK.getCode());
1439
                 msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(), AnnexTypeEnum.MEDIATE_BOOK.getCode());
1442
                 for (MsCaseAttach attach : attachList) {
1440
                 for (MsCaseAttach attach : attachList) {
1443
                     attach.setCaseAppliId(req.getId());
1441
                     attach.setCaseAppliId(req.getId());
1442
+                    msCaseAttachMapper.updateCaseAttach(attach);
1444
                 }
1443
                 }
1445
-                msCaseAttachMapper.batchSave(attachList);
1446
             }
1444
             }
1447
             Integer mediaResult = req.getMediaResult();
1445
             Integer mediaResult = req.getMediaResult();
1448
             if(mediaResult!=null){
1446
             if(mediaResult!=null){
2035
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(),AnnexTypeEnum.MEDIATE_BOOK.getCode());
2033
             msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(),AnnexTypeEnum.MEDIATE_BOOK.getCode());
2036
             for (MsCaseAttach attach : attachList) {
2034
             for (MsCaseAttach attach : attachList) {
2037
                 attach.setCaseAppliId(req.getId());
2035
                 attach.setCaseAppliId(req.getId());
2036
+                msCaseAttachMapper.updateCaseAttach(attach);
2038
             }
2037
             }
2039
-            msCaseAttachMapper.batchSave(attachList);
2038
+           // msCaseAttachMapper.batchSave(attachList);
2040
             // 修改案件状态为待送达
2039
             // 修改案件状态为待送达
2041
             Example flowExample = new Example(MsCaseFlow.class);
2040
             Example flowExample = new Example(MsCaseFlow.class);
2042
             flowExample.createCriteria().andEqualTo("caseStatusName", "待送达");
2041
             flowExample.createCriteria().andEqualTo("caseStatusName", "待送达");