|
@@ -11,6 +11,8 @@ import com.fdkankan.ucenter.common.PageInfo;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.common.util.FileUtils;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.ucenter.common.OssPath;
|
|
import com.fdkankan.ucenter.common.OssPath;
|
|
|
|
+import com.fdkankan.ucenter.constant.CameraConstant;
|
|
|
|
+import com.fdkankan.ucenter.constant.CameraTypelEnum;
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
import com.fdkankan.ucenter.entity.*;
|
|
import com.fdkankan.ucenter.entity.*;
|
|
import com.fdkankan.ucenter.httpClient.service.LaserService;
|
|
import com.fdkankan.ucenter.httpClient.service.LaserService;
|
|
@@ -108,12 +110,15 @@ public class AppSceneService {
|
|
Page<AppSceneVo> page = scenePlusMapper.pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
Page<AppSceneVo> page = scenePlusMapper.pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
List<String> numList = page.getRecords().stream().map(AppSceneVo::getNum).collect(Collectors.toList());
|
|
List<String> numList = page.getRecords().stream().map(AppSceneVo::getNum).collect(Collectors.toList());
|
|
|
|
|
|
- HashMap<String, JSONObject> ssSceneMap = new HashMap<>();
|
|
|
|
- if(param.getCameraType() == 10 ){ //深时
|
|
|
|
- ssSceneMap = laserService.list(numList,4);
|
|
|
|
|
|
+
|
|
|
|
+ CameraTypelEnum cameraTypelEnum = CameraTypelEnum.getByCameraType(param.getCameraType());
|
|
|
|
+ if(cameraTypelEnum == null){
|
|
|
|
+ throw new BusinessException(CameraConstant.FAILURE_CODE_6028, CameraConstant.FAILURE_MSG_6028);
|
|
}
|
|
}
|
|
- if( param.getCameraType() == 11){ //深光
|
|
|
|
- ssSceneMap = laserService.list(numList,5);
|
|
|
|
|
|
+
|
|
|
|
+ HashMap<String, JSONObject> ssSceneMap = new HashMap<>();
|
|
|
|
+ if(cameraTypelEnum.getLaser() ){ //深时
|
|
|
|
+ ssSceneMap = laserService.list(numList,cameraTypelEnum.getSceneSource().get(0));
|
|
}
|
|
}
|
|
|
|
|
|
// Set<Long> cameraIdSet = page.getRecords().stream().map(AppSceneVo::getCameraId).collect(Collectors.toSet());
|
|
// Set<Long> cameraIdSet = page.getRecords().stream().map(AppSceneVo::getCameraId).collect(Collectors.toSet());
|
|
@@ -124,7 +129,7 @@ public class AppSceneService {
|
|
//相机登录 sceneSourceType 取值皆为0
|
|
//相机登录 sceneSourceType 取值皆为0
|
|
|
|
|
|
for (AppSceneVo record : page.getRecords()) {
|
|
for (AppSceneVo record : page.getRecords()) {
|
|
- if(param.getCameraType() == 10 || param.getCameraType() == 11){ //深时
|
|
|
|
|
|
+ if(cameraTypelEnum.getLaser()){ //深时
|
|
JSONObject ssObj = ssSceneMap.get(record.getNum());
|
|
JSONObject ssObj = ssSceneMap.get(record.getNum());
|
|
if(ssObj!=null){
|
|
if(ssObj!=null){
|
|
record.setSceneName(ssObj.getString("title"));
|
|
record.setSceneName(ssObj.getString("title"));
|