|
@@ -120,9 +120,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj) {
|
|
|
+ public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
|
|
|
HashMap<Long,Long> map = new HashMap<>();
|
|
|
- List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList,isObj);
|
|
|
+ List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
|
|
|
result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
|
|
|
return map;
|
|
|
}
|
|
@@ -231,7 +231,20 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
}
|
|
|
if((param.getCameraIds() != null && param.getCameraIds().size()<=0) || (param.getUserIds() != null && param.getUserIds().size()<=0)){
|
|
|
- param.setNum("empty");
|
|
|
+ return PageInfo.PageInfoEmpty(param.getPageNum(),param.getPageSize());
|
|
|
+ }
|
|
|
+ HashMap<String, JSONObject> laserMap = new HashMap<>();
|
|
|
+ if(param.getType() == 2 && StringUtils.isNotBlank(param.getSceneName())){
|
|
|
+ laserMap = laserService.list(param.getSceneName(), 4);
|
|
|
+ param.setSceneName(null);
|
|
|
+ }
|
|
|
+ if(param.getType() == 6 && StringUtils.isNotBlank(param.getSceneName())){
|
|
|
+ laserMap = laserService.list(param.getSceneName(), 5);
|
|
|
+ param.setSceneName(null);
|
|
|
+ }
|
|
|
+ if(!laserMap.isEmpty()){
|
|
|
+ Set<String> keySet = laserMap.keySet();
|
|
|
+ param.setNumList(new ArrayList<>(keySet));
|
|
|
}
|
|
|
|
|
|
Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
@@ -240,7 +253,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
HashMap<String,SceneColdStorage> coldStorageMap = null;
|
|
|
HashMap<Long, User> userMap = null;
|
|
|
HashMap<Long, Camera> cameraMap = null;
|
|
|
- HashMap<String,JSONObject> ssSceneMap = null;
|
|
|
HashMap<String,MqSendLog> mqSendLogMap = null;
|
|
|
|
|
|
List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
@@ -252,12 +264,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
List<Long> cameraIds = records.parallelStream().map(SceneVo::getCameraId).collect(Collectors.toList());
|
|
|
cameraMap = cameraService.getByIds(cameraIds);
|
|
|
|
|
|
- if(param.getType() == 2 ){
|
|
|
- ssSceneMap = laserService.list(sceneNumList,4);
|
|
|
+ if(param.getType() == 2 && laserMap.isEmpty()){
|
|
|
+ laserMap = laserService.list(sceneNumList,4);
|
|
|
}
|
|
|
- if(param.getType() == 6){
|
|
|
- ssSceneMap = laserService.list(sceneNumList,5);
|
|
|
+ if(param.getType() == 6 && laserMap.isEmpty()){
|
|
|
+ laserMap = laserService.list(sceneNumList,5);
|
|
|
}
|
|
|
+
|
|
|
List<String> modelingNumList = page.getRecords().stream().filter(e -> e.getStatus() == 0).map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
if(!modelingNumList.isEmpty()){
|
|
|
mqSendLogMap = mqSendLogService.getByNumList(modelingNumList);
|
|
@@ -265,7 +278,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
for (SceneVo record : page.getRecords()) {
|
|
|
if(param.getType() == 2 || param.getType() == 6){
|
|
|
- JSONObject ssObj = ssSceneMap.get(record.getNum());
|
|
|
+ JSONObject ssObj = laserMap.get(record.getNum());
|
|
|
if(ssObj!=null){
|
|
|
record.setSceneName(ssObj.getString("title"));
|
|
|
record.setThumb(ssObj.getString("thumb"));
|
|
@@ -274,7 +287,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
record.setViewCount(ssObj.getInteger("viewCount"));
|
|
|
record.setStatus(toFdStatus(ssObj.getInteger("status")));
|
|
|
record.setAlgorithmTime(ssObj.getString("algorithmTime"));
|
|
|
- }else{
|
|
|
+ }else if(record.getStatus() != 0){
|
|
|
record.setStatus(-1);
|
|
|
record.setWebSite(null);
|
|
|
}
|