|
@@ -4,6 +4,7 @@ import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.fastjson.JSONPObject;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.fusion.common.FilePath;
|
|
|
import com.fdkankan.fusion.common.ResultCode;
|
|
@@ -106,11 +107,26 @@ public class SceneService implements ISceneService {
|
|
|
List<String> userNames = byDeptIds.stream().map(TmUser::getUserName).collect(Collectors.toList());
|
|
|
param.setUserNames(userNames);
|
|
|
}
|
|
|
+ if((param.getType() == 2 || param.getType() == 5) && StringUtils.isNotBlank(param.getSceneName())){
|
|
|
+ List<JSONObject> laserList = scenePlusService.getLaserSceneByName(param.getSceneName());
|
|
|
+ List<String > numList = new ArrayList<>();
|
|
|
+ for (JSONObject jsonObject : laserList) {
|
|
|
+ numList.add(jsonObject.getString("scene_code"));
|
|
|
+ }
|
|
|
+ if(!numList.isEmpty()){
|
|
|
+ param.setNumList(numList);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
Page<SceneVo> sceneVoPage = scenePlusService.pageList(new Page<>(param.getPageNum(), param.getPageSize()), param);
|
|
|
|
|
|
-// List<String> laserNumList = sceneVoPage.getRecords().stream().filter(e-> e.getType() == 2 || e.getType() == 4)
|
|
|
-// .map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
+ HashMap<String,JSONObject> laserMap = new HashMap<>();
|
|
|
+ if(param.getType() == 2 || param.getType() == 5){
|
|
|
+ List<String> laserNumList = sceneVoPage.getRecords().stream().filter(e-> e.getSceneSource() == 4 || e.getSceneSource() == 5)
|
|
|
+ .map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
+ List<JSONObject> laserList = scenePlusService.getLaserScene(laserNumList);
|
|
|
+ laserList.forEach(e->laserMap.put(e.getString("scene_code"),e));
|
|
|
+ }
|
|
|
|
|
|
List<String> modelingScene = sceneVoPage.getRecords().stream().filter(e -> e.getStatus() == 0).map(SceneVo::getNum).collect(Collectors.toList());
|
|
|
HashMap<String,Boolean> modelingMap = mqSendLogService.getMapByNumList(modelingScene);
|
|
@@ -127,74 +143,21 @@ public class SceneService implements ISceneService {
|
|
|
sceneVo.setStatus(5);
|
|
|
}
|
|
|
sceneVo.setPayStatus(1);
|
|
|
+
|
|
|
+ sceneVo.setStatus(setLaserStatus(sceneVo.getStatus(),sceneVo.getPayStatus()));
|
|
|
+ if(param.getType() == 2 || param.getType() == 5){ //
|
|
|
+ JSONObject jsonObject = laserMap.get(sceneVo.getNum());
|
|
|
+ if(jsonObject != null){
|
|
|
+ sceneVo.setTitle(jsonObject.getString("title"));
|
|
|
+ }
|
|
|
+ }
|
|
|
sceneVo.setSceneName(sceneVo.getTitle());
|
|
|
sceneVo.setName(sceneVo.getTitle());
|
|
|
- sceneVo.setStatus(setLaserStatus(sceneVo.getStatus(),sceneVo.getPayStatus()));
|
|
|
-
|
|
|
+ sceneVo.setType(param.getType());
|
|
|
}
|
|
|
|
|
|
return PageInfo.PageInfo(sceneVoPage);
|
|
|
}
|
|
|
-// List<SceneVo> sceneVoList = new ArrayList<>();
|
|
|
-// long total = 0;
|
|
|
-// if(param.getType() == 0 || param.getType() == 1 || param.getType() == 4 || param.getType() == 6){ //看看,看见 ,深时obj
|
|
|
-// //获取四维(看看,看见)场景数据
|
|
|
-// FdkkResponse fdkkResponse = fdKKClient.sceneList(param);
|
|
|
-// if(fdkkResponse.getCode() !=0){
|
|
|
-// throw new BusinessException(fdkkResponse.getCode(),fdkkResponse.getMsg());
|
|
|
-// }
|
|
|
-// PageInfo pageInfo = JSONObject.parseObject(JSONObject.toJSONString(fdkkResponse.getData()), PageInfo.class);
|
|
|
-// total = pageInfo.getTotal();
|
|
|
-// JSONArray list = JSONArray.parseArray(JSONObject.toJSONString( pageInfo.getList()));
|
|
|
-// sceneVoList = overSceneVo(list,param.getType());
|
|
|
-//
|
|
|
-// }
|
|
|
-// if(param.getType() == 2 || param.getType() == 5){ //深时
|
|
|
-// //获取激光(深时)场景数据
|
|
|
-// LaserSceneParam laserSceneParam = new LaserSceneParam();
|
|
|
-// laserSceneParam.setPageNum(param.getPageNum());
|
|
|
-// laserSceneParam.setPageSize(param.getPageSize());
|
|
|
-// laserSceneParam.setStatus(param.getStatus());
|
|
|
-// laserSceneParam.setSnCodes(param.getSnCodes());
|
|
|
-// if(param.getType() == 5){
|
|
|
-// laserSceneParam.setSceneSource(5);
|
|
|
-// }
|
|
|
-// if(StringUtils.isNotBlank(param.getSceneName())){
|
|
|
-// laserSceneParam.setTitle(param.getSceneName());
|
|
|
-// }
|
|
|
-// if(param.getNumList() != null && param.getNumList().size() >0){
|
|
|
-// laserSceneParam.setSceneCodes(param.getNumList());
|
|
|
-// }
|
|
|
-// FdkkResponse fdkkResponse = laserClient.sceneList(laserSceneParam);
|
|
|
-// if(fdkkResponse.getCode() !=200){
|
|
|
-// throw new BusinessException(fdkkResponse.getCode(),fdkkResponse.getMsg());
|
|
|
-// }
|
|
|
-// JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(fdkkResponse.getData()));
|
|
|
-// JSONArray list = jsonObject.getJSONArray("list");
|
|
|
-// total =jsonObject.getLong("total");
|
|
|
-// for (Object o : list) {
|
|
|
-// String res = JSONObject.toJSONString(o);
|
|
|
-// SceneVo vo = JSONObject.parseObject(res,SceneVo.class);
|
|
|
-// if( StringUtils.isEmpty(vo.getPhone())){
|
|
|
-// vo.setBind(false);
|
|
|
-// }
|
|
|
-// if(vo.getStatus() == 4){ //4生成OBJ中设置为计算中
|
|
|
-// vo.setStatus(0);
|
|
|
-// }
|
|
|
-// vo.setType(param.getType());
|
|
|
-// sceneVoList.add(vo);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// Set<String> snCodes = sceneVoList.stream().map(SceneVo::getSnCode).collect(Collectors.toSet());
|
|
|
-
|
|
|
-//
|
|
|
-
|
|
|
-// }
|
|
|
-// Page<SceneVo> voPage = new Page<>(param.getPageNum(),param.getPageSize());
|
|
|
-// voPage.setRecords(sceneVoList);
|
|
|
-// voPage.setTotal(total);
|
|
|
-// return PageInfo.PageInfo(voPage);
|
|
|
- // }
|
|
|
|
|
|
/**
|
|
|
* 四维看看返回数据格式转换
|