bug修复

This commit is contained in:
18792927508
2024-02-22 10:18:22 +08:00
parent 8d61792ec6
commit dc26290e28
3 changed files with 19 additions and 12 deletions
@@ -12,6 +12,10 @@ public class IdentityAuthentication extends BaseEntity {
/** ID */
private Long id;
/**
* 角色id
*/
private Long roleId;
/** 姓名 */
private String name;
/** 身份证号 */
@@ -123,10 +123,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
// 查询角色
Long roleIdByName = roleMapper.selectRoleIdByName("被申请人");
if(roleIdByName==null){
return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
}
Long roleIdByName =ientityAuthentication.getRoleId();
// if(roleIdByName==null){
// return AjaxResult.warn("被申请人角色不存在,请联系系统管理员新增角色");
// }
if(sysUser!=null){
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
sysUser.setNickName(ientityAuthentication.getName());
@@ -137,7 +137,7 @@ public class WeChatUserServiceImpl implements WeChatUserService {
sysUserMapper.updateUser(sysUser);
ientityAuthentication.setUserId(sysUser.getUserId());
int count=0;
if(CollectionUtil.isNotEmpty(sysUser.getRoles()) ){
if(CollectionUtil.isNotEmpty(sysUser.getRoles()) && roleIdByName!=null){
for (SysRole role : sysUser.getRoles()) {
if(Objects.equals(role.getRoleId(), roleIdByName)){
@@ -147,8 +147,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
}
}
if(CollectionUtil.isEmpty(sysUser.getRoles())||count==0){
if(roleIdByName!=null) {
// 用户未关联被申请人角色,关联角色
userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
}
}
}else {
@@ -164,8 +166,10 @@ public class WeChatUserServiceImpl implements WeChatUserService {
if(row<1) {
return AjaxResult.warn("注册失败");
}
// 用户关联被申请人角色
userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
if(roleIdByName!=null) {
// 用户关联被申请人角色
userRoleMapper.insertUserRole(sysUser.getUserId(), roleIdByName);
}
}
ientityAuthentication.setUserId(sysUser.getUserId());
@@ -688,14 +688,12 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
}
String templatePath = "/home/ruoyi" + templateManage.getTemOrigPath();
templatePath=templatePath.replace("/profile","/uploadPath");
try {
File file = new File(templatePath);
} catch (Exception e) {
throw new ServiceException("未找到模板");
}
// 获取模板中的占位符key
// // 获取模板中的占位符key
List<String> bookmarkList = getBookmarkByDocx(templatePath);
if (CollectionUtil.isEmpty(bookmarkList)) {
throw new ServiceException("请检查模板是否配置正确,未获取到占位符");
@@ -1441,8 +1439,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(), AnnexTypeEnum.MEDIATE_BOOK.getCode());
for (MsCaseAttach attach : attachList) {
attach.setCaseAppliId(req.getId());
msCaseAttachMapper.updateCaseAttach(attach);
}
msCaseAttachMapper.batchSave(attachList);
}
Integer mediaResult = req.getMediaResult();
if(mediaResult!=null){
@@ -2035,8 +2033,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(req.getId(),AnnexTypeEnum.MEDIATE_BOOK.getCode());
for (MsCaseAttach attach : attachList) {
attach.setCaseAppliId(req.getId());
msCaseAttachMapper.updateCaseAttach(attach);
}
msCaseAttachMapper.batchSave(attachList);
// msCaseAttachMapper.batchSave(attachList);
// 修改案件状态为待送达
Example flowExample = new Example(MsCaseFlow.class);
flowExample.createCriteria().andEqualTo("caseStatusName", "待送达");