认证-参数收集-解决人员账号大小写不一致问题
This commit is contained in:
+21
-8
@@ -1063,10 +1063,15 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
studioList = projectLibraryBaseList.stream().map(ProjectLibraryBase::getStudioEngineerName).collect(Collectors.toList()); // studio 一个项目只有一个
|
||||
}
|
||||
|
||||
if (CollectionUtil.isEmpty(userRoleIds) && !studioList.contains(loginUser.getUsername())
|
||||
&& !homoList.contains(loginUser.getUsername())
|
||||
&& !sdtList.contains(loginUser.getUsername())
|
||||
&& !dreListOfPCM.contains(loginUser.getUsername())) {
|
||||
String loginUserName = loginUser.getUsername().toLowerCase();
|
||||
studioList = toLowerCaseOfList(studioList);
|
||||
homoList = toLowerCaseOfList(homoList);
|
||||
sdtList = toLowerCaseOfList(sdtList);
|
||||
dreListOfPCM = toLowerCaseOfList(dreListOfPCM);
|
||||
if (CollectionUtil.isEmpty(userRoleIds) && !studioList.contains(loginUserName)
|
||||
&& !homoList.contains(loginUserName)
|
||||
&& !sdtList.contains(loginUserName)
|
||||
&& !dreListOfPCM.contains(loginUserName)) {
|
||||
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
@@ -1079,7 +1084,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return userTypeList;
|
||||
}
|
||||
|
||||
if (homoList.contains(loginUser.getUsername())) {
|
||||
if (homoList.contains(loginUserName)) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("label", CollectManifestUserTypeEnum.HOMO.getName());
|
||||
@@ -1090,7 +1095,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
userTypeList.add(map);
|
||||
}
|
||||
|
||||
if (sdtList.contains(loginUser.getUsername())) {
|
||||
if (sdtList.contains(loginUserName)) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("label", CollectManifestUserTypeEnum.SDT.getName());
|
||||
@@ -1101,7 +1106,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
userTypeList.add(map);
|
||||
}
|
||||
|
||||
if (dreListOfPCM.contains(loginUser.getUsername())) {
|
||||
if (dreListOfPCM.contains(loginUserName)) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("label", CollectManifestUserTypeEnum.DRE.getName());
|
||||
@@ -1112,7 +1117,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
userTypeList.add(map);
|
||||
}
|
||||
|
||||
if (studioList.contains(loginUser.getUsername())) {
|
||||
if (studioList.contains(loginUserName)) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
map.put("label", CollectManifestUserTypeEnum.STUDIO.getName());
|
||||
@@ -1140,6 +1145,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
return userTypeList;
|
||||
}
|
||||
|
||||
private List<String> toLowerCaseOfList(List<String> list) {
|
||||
List<String> newList = list;
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
newList = list.stream().map(String::toLowerCase).collect(Collectors.toList());
|
||||
}
|
||||
return newList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> isCollectFinished(String paramsManifestId) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user