|
@@ -105,6 +105,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
IJySceneUploadService jySceneUploadService;
|
|
IJySceneUploadService jySceneUploadService;
|
|
@Autowired
|
|
@Autowired
|
|
ICaseNumService caseNumService;
|
|
ICaseNumService caseNumService;
|
|
|
|
+ @Autowired
|
|
|
|
+ ICaseService caseService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -329,9 +331,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
List<String> openNums = null;
|
|
List<String> openNums = null;
|
|
List<String> authNumList = null;
|
|
List<String> authNumList = null;
|
|
|
|
+ List<String> openAuthNumList = null;
|
|
HashMap<String,JySceneUserAuth> authHashMap = new HashMap<>();
|
|
HashMap<String,JySceneUserAuth> authHashMap = new HashMap<>();
|
|
HashMap<String,JySceneUserAuth> openHashMap = new HashMap<>();
|
|
HashMap<String,JySceneUserAuth> openHashMap = new HashMap<>();
|
|
if(param.getSceneType() == 1){
|
|
if(param.getSceneType() == 1){
|
|
|
|
+ param.setNotUserId(jyUser.getUserId());
|
|
//List<String> openNums = jySceneAuthService.getOpenNumList();
|
|
//List<String> openNums = jySceneAuthService.getOpenNumList();
|
|
openNums = jySceneAuthService.getNumListByPlatform(param.getPlatformId(),1);
|
|
openNums = jySceneAuthService.getNumListByPlatform(param.getPlatformId(),1);
|
|
if(!openNums.isEmpty()){
|
|
if(!openNums.isEmpty()){
|
|
@@ -342,13 +346,23 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
jySceneUserAuths.stream().filter(e ->e.getNum() != null && e.getAuthType() == 0).forEach( e-> authHashMap.put(e.getNum(),e));
|
|
jySceneUserAuths.stream().filter(e ->e.getNum() != null && e.getAuthType() == 0).forEach( e-> authHashMap.put(e.getNum(),e));
|
|
jySceneUserAuths.stream().filter(e ->e.getNum() != null && e.getAuthType() == 1).forEach( e-> openHashMap.put(e.getNum(),e));
|
|
jySceneUserAuths.stream().filter(e ->e.getNum() != null && e.getAuthType() == 1).forEach( e-> openHashMap.put(e.getNum(),e));
|
|
|
|
|
|
|
|
+ List<String> allAuthNum = new ArrayList<>();
|
|
|
|
+ allAuthNum.addAll(authHashMap.keySet());
|
|
|
|
+ allAuthNum.addAll(openHashMap.keySet());
|
|
|
|
+ HashMap<String, JySceneAuth> authMap = jySceneAuthService.getByNumList(allAuthNum);
|
|
|
|
+
|
|
if(!authHashMap.isEmpty()){
|
|
if(!authHashMap.isEmpty()){
|
|
- List<String> finalOpenNums = openNums;
|
|
|
|
- authNumList = authHashMap.keySet().stream().filter(e -> !finalOpenNums.contains(e)).collect(Collectors.toList());
|
|
|
|
|
|
+ authNumList = authHashMap.keySet().stream().filter(e -> authMap.get(e)!=null && authMap.get(e).getAuthType() == 0).collect(Collectors.toList());
|
|
if(!authNumList.isEmpty()){
|
|
if(!authNumList.isEmpty()){
|
|
param.getAuthNumList().addAll(authNumList);
|
|
param.getAuthNumList().addAll(authNumList);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(!openHashMap.isEmpty()){
|
|
|
|
+ openAuthNumList = openHashMap.keySet().stream().filter(e -> authMap.get(e)!=null && authMap.get(e).getAuthType() == 1).collect(Collectors.toList());
|
|
|
|
+ if(!openAuthNumList.isEmpty()){
|
|
|
|
+ param.getAuthNumList().addAll(openAuthNumList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
List<JyUserShare> jyUserShares = jyUserShareService.getByJyUserId(jyUser.getId());
|
|
List<JyUserShare> jyUserShares = jyUserShareService.getByJyUserId(jyUser.getId());
|
|
List<Integer> mainUserIds = jyUserShares.stream().map(JyUserShare::getMainJyUserId).collect(Collectors.toList());
|
|
List<Integer> mainUserIds = jyUserShares.stream().map(JyUserShare::getMainJyUserId).collect(Collectors.toList());
|
|
@@ -436,7 +450,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
} else if(param.getAuthNumList().contains(record.getNum())) {
|
|
} else if(param.getAuthNumList().contains(record.getNum())) {
|
|
|
|
|
|
JySceneUserAuth jySceneUserAuth = null;
|
|
JySceneUserAuth jySceneUserAuth = null;
|
|
- if(openNums != null && openNums.contains(record.getNum())){
|
|
|
|
|
|
+ if(openAuthNumList != null && openAuthNumList.contains(record.getNum())){
|
|
jySceneUserAuth = openHashMap.get(record.getNum());
|
|
jySceneUserAuth = openHashMap.get(record.getNum());
|
|
}
|
|
}
|
|
if(authNumList != null && authNumList.contains(record.getNum())){
|
|
if(authNumList != null && authNumList.contains(record.getNum())){
|
|
@@ -499,9 +513,16 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
JyUser jyUser = jyUserService.getBySysId(byId.getId());
|
|
JyUser jyUser = jyUserService.getBySysId(byId.getId());
|
|
LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
|
|
if(byId.getRoleId() != 1L ){
|
|
if(byId.getRoleId() != 1L ){
|
|
|
|
+ Integer loginPlatformId = jyUserPlatformService.getLoginPlatformId();
|
|
|
|
+
|
|
if(jyUser == null){
|
|
if(jyUser == null){
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|
|
|
|
+ List<String> openNums = jySceneAuthService.getNumListByPlatform(loginPlatformId,1);
|
|
|
|
+ if(!openNums.isEmpty()){
|
|
|
|
+ return 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
if(byId.getRoleId() !=45L && byId.getRoleId() != 48L){
|
|
if(byId.getRoleId() !=45L && byId.getRoleId() != 48L){
|
|
wrapper.eq(ScenePlus::getUserId,jyUser.getUserId());
|
|
wrapper.eq(ScenePlus::getUserId,jyUser.getUserId());
|
|
}
|
|
}
|
|
@@ -551,6 +572,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
if(jyUser == null){
|
|
if(jyUser == null){
|
|
throw new BusinessException(ResultCode.USER_NOT_EXIST);
|
|
throw new BusinessException(ResultCode.USER_NOT_EXIST);
|
|
}
|
|
}
|
|
|
|
+ caseService.checkNumInCase(param.getNum());
|
|
|
|
+
|
|
JySceneUpload jySceneUpload = jySceneUploadService.getByNum(param.getNum());
|
|
JySceneUpload jySceneUpload = jySceneUploadService.getByNum(param.getNum());
|
|
if(jySceneUpload == null){
|
|
if(jySceneUpload == null){
|
|
jySceneUpload = new JySceneUpload();
|
|
jySceneUpload = new JySceneUpload();
|