Просмотр исходного кода

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

wangqiong123 2 лет назад
Родитель
Сommit
1c90f35d47

+ 4
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/miniprogress/IdentityAuthentication.java Просмотреть файл

@@ -12,6 +12,10 @@ public class IdentityAuthentication   extends BaseEntity {
12 12
 
13 13
     /** ID */
14 14
     private Long id;
15
+    /**
16
+     * 角色id
17
+     */
18
+    private Long roleId;
15 19
     /** 姓名 */
16 20
     private String name;
17 21
     /** 身份证号 */

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

@@ -123,10 +123,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
123 123
         // 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
124 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 130
         if(sysUser!=null){
131 131
             sysUser.setIdCard(ientityAuthentication.getIdentityNo());
132 132
             sysUser.setNickName(ientityAuthentication.getName());
@@ -137,7 +137,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
137 137
             sysUserMapper.updateUser(sysUser);
138 138
             ientityAuthentication.setUserId(sysUser.getUserId());
139 139
             int count=0;
140
-           if(CollectionUtil.isNotEmpty(sysUser.getRoles()) ){
140
+           if(CollectionUtil.isNotEmpty(sysUser.getRoles()) && roleIdByName!=null){
141 141
 
142 142
                for (SysRole role : sysUser.getRoles()) {
143 143
                    if(Objects.equals(role.getRoleId(), roleIdByName)){
@@ -147,8 +147,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
147 147
                }
148 148
            }
149 149
            if(CollectionUtil.isEmpty(sysUser.getRoles())||count==0){
150
+               if(roleIdByName!=null) {
150 151
                    // 用户未关联被申请人角色,关联角色
151 152
                    userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
153
+               }
152 154
            }
153 155
 
154 156
         }else {
@@ -164,8 +166,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
164 166
             if(row<1) {
165 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 175
         ientityAuthentication.setUserId(sysUser.getUserId());

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

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