|
@@ -324,8 +324,7 @@ public class SignConfigServiceImpl extends BaseServiceImpl<SignConfigMapper, Sig
|
|
|
if (signConfigVOS == null || signConfigVOS.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
|
- List<Long> roleIds = new ArrayList<>();
|
|
|
- List<String> roleNames = new ArrayList<>();
|
|
|
+ Map<Long, String> roleIdNameMap = new HashMap<>();
|
|
|
signConfigVOS.forEach(signConfigVO -> {
|
|
|
List<SignConfigRelation> relations = signConfigVO.getRelations();
|
|
|
if (relations != null && !relations.isEmpty()) {
|
|
@@ -345,24 +344,25 @@ public class SignConfigServiceImpl extends BaseServiceImpl<SignConfigMapper, Sig
|
|
|
List<SignConfigRelation> roles = collect.get(1);
|
|
|
if (roles != null && !roles.isEmpty()) {
|
|
|
roles.forEach(role -> {
|
|
|
- roleIds.add(role.getRelationId());
|
|
|
- roleNames.add(role.getRelationName());
|
|
|
+ roleIdNameMap.put(role.getRelationId(), role.getRelationName());
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- if (!roleIds.isEmpty()) {
|
|
|
- TextdictInfoVO textdictInfoVO = new TextdictInfoVO();
|
|
|
- if (vo != null) {
|
|
|
- BeanUtil.copy(vo, textdictInfoVO);
|
|
|
- }
|
|
|
- textdictInfoVO.setId(null);
|
|
|
- textdictInfoVO.setColKey(value);
|
|
|
- textdictInfoVO.setColName(colName);
|
|
|
- textdictInfoVO.setIsSystem(1);
|
|
|
- textdictInfoVO.setSigRoleId(StringUtil.join(roleIds, ","));
|
|
|
- textdictInfoVO.setSigRoleName(StringUtil.join(roleNames, ","));
|
|
|
- textdictInfoVOS.add(textdictInfoVO);
|
|
|
+ if (!roleIdNameMap.isEmpty()) {
|
|
|
+ roleIdNameMap.forEach((roleId, roleName) -> {
|
|
|
+ TextdictInfoVO textdictInfoVO = new TextdictInfoVO();
|
|
|
+ if (vo != null) {
|
|
|
+ BeanUtil.copy(vo, textdictInfoVO);
|
|
|
+ }
|
|
|
+ textdictInfoVO.setId(null);
|
|
|
+ textdictInfoVO.setColKey(value);
|
|
|
+ textdictInfoVO.setColName(colName);
|
|
|
+ textdictInfoVO.setIsSystem(1);
|
|
|
+ textdictInfoVO.setSigRoleId(roleId + "");
|
|
|
+ textdictInfoVO.setSigRoleName(roleName);
|
|
|
+ textdictInfoVOS.add(textdictInfoVO);
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
return textdictInfoVOS;
|