|
@@ -21,7 +21,9 @@ import com.fdkankan.ucenter.common.OssPath;
|
|
import com.fdkankan.ucenter.common.PageInfo;
|
|
import com.fdkankan.ucenter.common.PageInfo;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
|
+import com.fdkankan.ucenter.common.SceneSourceUtil;
|
|
import com.fdkankan.ucenter.common.constants.ResultCodeMsg;
|
|
import com.fdkankan.ucenter.common.constants.ResultCodeMsg;
|
|
|
|
+import com.fdkankan.ucenter.config.UcenterConfig;
|
|
import com.fdkankan.ucenter.config.ThreadPoolConfig;
|
|
import com.fdkankan.ucenter.config.ThreadPoolConfig;
|
|
import com.fdkankan.ucenter.constant.CameraConstant;
|
|
import com.fdkankan.ucenter.constant.CameraConstant;
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
@@ -49,7 +51,6 @@ import org.joda.time.DateTime;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.util.ObjectUtils;
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
@@ -146,6 +147,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
SceneNumVo sceneNumVoE57 = fdkkLaserService.getLaserSceneNumByUser(token,57);
|
|
SceneNumVo sceneNumVoE57 = fdkkLaserService.getLaserSceneNumByUser(token,57);
|
|
SceneNumVo sceneNumVoE57Obj = getSceneNumVoByObjType(Arrays.asList(57), user.getId());
|
|
SceneNumVo sceneNumVoE57Obj = getSceneNumVoByObjType(Arrays.asList(57), user.getId());
|
|
|
|
+
|
|
|
|
+ SceneNumVo sceneNumVoSX = fdkkLaserService.getLaserSceneNumByUser(token,7);
|
|
|
|
+
|
|
HashMap<String, SceneNumVo> hashMap = new HashMap<>();
|
|
HashMap<String, SceneNumVo> hashMap = new HashMap<>();
|
|
hashMap.put("kk",sceneNumVoKk);
|
|
hashMap.put("kk",sceneNumVoKk);
|
|
hashMap.put("kJ",sceneNumVoKj);
|
|
hashMap.put("kJ",sceneNumVoKj);
|
|
@@ -155,6 +159,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
hashMap.put("SG_OBJ",sceneNumVoSGObj);
|
|
hashMap.put("SG_OBJ",sceneNumVoSGObj);
|
|
hashMap.put("e57",sceneNumVoE57);
|
|
hashMap.put("e57",sceneNumVoE57);
|
|
hashMap.put("e57_OBJ",sceneNumVoE57Obj);
|
|
hashMap.put("e57_OBJ",sceneNumVoE57Obj);
|
|
|
|
+ hashMap.put("sx",sceneNumVoSX);
|
|
return hashMap;
|
|
return hashMap;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -510,6 +515,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
return PageInfo.PageInfo(sceneList);
|
|
return PageInfo.PageInfo(sceneList);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ UcenterConfig ucenterConfig;
|
|
@Override
|
|
@Override
|
|
public JSONObject newList(SceneParam param, String username) {
|
|
public JSONObject newList(SceneParam param, String username) {
|
|
param.setSourceList(getSceneSource(param.getSceneSource()));
|
|
param.setSourceList(getSceneSource(param.getSceneSource()));
|
|
@@ -517,8 +524,20 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
User user = userService.getByUserName(username);
|
|
User user = userService.getByUserName(username);
|
|
param.setUserId(user.getId());
|
|
param.setUserId(user.getId());
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if(!param.getSceneSource().contains("4") || !param.getSceneSource().contains("5")){
|
|
|
|
+ param.setIsObj(0);
|
|
|
|
+ }
|
|
Page<SceneVo> sceneVoPage = getBaseMapper().pageListAndFolder(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
Page<SceneVo> sceneVoPage = getBaseMapper().pageListAndFolder(new Page<>(param.getPageNum(),param.getPageSize()),param);
|
|
|
|
+ for (SceneVo record : sceneVoPage.getRecords()) {
|
|
|
|
+ if(param.getIsObj()== 0 && SceneSourceUtil.isLaser(record.getSceneSource())){
|
|
|
|
+ if(ucenterConfig.getActive().contains("prod")){
|
|
|
|
+ record.setWebSite(ucenterConfig.getBasePath() +"/index.html?m="+record.getNum());
|
|
|
|
+ }else {
|
|
|
|
+ record.setWebSite(ucenterConfig.getBasePath() +"/uat/index.html?m="+record.getNum());
|
|
|
|
+ }
|
|
|
|
+ record.setSceneName(record.getLaserTitle());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
List<SceneVo> folderList = sceneVoPage.getRecords().parallelStream().filter(entity -> entity.getIsFolder() == 1).collect(Collectors.toList());
|
|
List<SceneVo> folderList = sceneVoPage.getRecords().parallelStream().filter(entity -> entity.getIsFolder() == 1).collect(Collectors.toList());
|
|
Long totalSceneNum = sceneVoPage.getTotal();
|
|
Long totalSceneNum = sceneVoPage.getTotal();
|
|
@@ -542,7 +561,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
//设置协作者信息
|
|
//设置协作者信息
|
|
if(sceneVoPage.getRecords().size() >0){
|
|
if(sceneVoPage.getRecords().size() >0){
|
|
List<String> numList = sceneVoPage.getRecords().parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
List<String> numList = sceneVoPage.getRecords().parallelStream().map(SceneVo::getNum).collect(Collectors.toList());
|
|
- HashMap<String,List<User>> cooMap = sceneCooperationService.getByNumList(numList,"mesh");
|
|
|
|
|
|
+ HashMap<String,List<User>> cooMap = sceneCooperationService.getByNumList(numList, param.getIsObj() ==1 ?"mesh":"laser");
|
|
for (SceneVo vo : sceneVoPage.getRecords()) {
|
|
for (SceneVo vo : sceneVoPage.getRecords()) {
|
|
if (StringUtils.isNotBlank(vo.getNum())) {
|
|
if (StringUtils.isNotBlank(vo.getNum())) {
|
|
List<User> userVos = cooMap.get(vo.getNum());
|
|
List<User> userVos = cooMap.get(vo.getNum());
|
|
@@ -579,7 +598,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
folderList.addAll(sceneList);
|
|
folderList.addAll(sceneList);
|
|
}
|
|
}
|
|
sceneVoPage.setRecords(folderList);
|
|
sceneVoPage.setRecords(folderList);
|
|
- if(param.getFolderId() == null && param.getIsObj() == null ){
|
|
|
|
|
|
+ if(param.getFolderId() == null && param.getIsObj() == 0 ){
|
|
List<String> sourceList = param.getSourceList();
|
|
List<String> sourceList = param.getSourceList();
|
|
if(param.getUserId()!= null){
|
|
if(param.getUserId()!= null){
|
|
totalSceneNum = this.getCountByUserId(param.getUserId(),sourceList);
|
|
totalSceneNum = this.getCountByUserId(param.getUserId(),sourceList);
|
|
@@ -588,7 +607,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
}else if(param.getFolderId() != null ){
|
|
}else if(param.getFolderId() != null ){
|
|
totalSceneNum = folderSceneService.getCountByFolderAndSon(param.getFolderId());
|
|
totalSceneNum = folderSceneService.getCountByFolderAndSon(param.getFolderId());
|
|
- }else if(param.getIsObj() != null && param.getIsObj() ==1){
|
|
|
|
|
|
+ }else if(param.getIsObj() == 1){
|
|
if(param.getUserId()!= null){
|
|
if(param.getUserId()!= null){
|
|
totalSceneNum = this.getCountByLaserAndIsObj(param.getUserId(),Integer.valueOf(param.getSceneSource()));
|
|
totalSceneNum = this.getCountByLaserAndIsObj(param.getUserId(),Integer.valueOf(param.getSceneSource()));
|
|
}
|
|
}
|
|
@@ -809,7 +828,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
oldEditScene.setFloorPlanPng(oldEditScene.getFloorPlanPng() == null ? null : oldEditScene.getFloorPlanPng().replace(oldNum, scenePro.getNum()));
|
|
oldEditScene.setFloorPlanPng(oldEditScene.getFloorPlanPng() == null ? null : oldEditScene.getFloorPlanPng().replace(oldNum, scenePro.getNum()));
|
|
sceneProEditService.save(oldEditScene);
|
|
sceneProEditService.save(oldEditScene);
|
|
|
|
|
|
- if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5) { //深时复制
|
|
|
|
|
|
+ if(SceneSourceUtil.isLaser(scenePro.getSceneSource())) { //深时复制
|
|
laserService.copy(oldNum,newNum,newDataSource,true);
|
|
laserService.copy(oldNum,newNum,newDataSource,true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -840,7 +859,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
String targetVoice = String.format(SceneResourcePath.voicePath, scenePro.getNum());
|
|
String targetVoice = String.format(SceneResourcePath.voicePath, scenePro.getNum());
|
|
this.copyOssAndNas(oldNum,scenePro.getNum(),sourceVoice,targetVoice);
|
|
this.copyOssAndNas(oldNum,scenePro.getNum(),sourceVoice,targetVoice);
|
|
|
|
|
|
- if(scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5){ //深时复制
|
|
|
|
|
|
+ if(SceneSourceUtil.isLaser(scenePro.getSceneSource())){ //深时复制
|
|
laserService.copy(oldNum,newNum,newDataSource,false);
|
|
laserService.copy(oldNum,newNum,newDataSource,false);
|
|
}
|
|
}
|
|
scenePro.setStatus(-2);
|
|
scenePro.setStatus(-2);
|
|
@@ -902,7 +921,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
for (ScenePro scenePro : proList) {
|
|
for (ScenePro scenePro : proList) {
|
|
cameraMap.merge(scenePro.getCameraId(), scenePro.getSpace(), Long::sum);
|
|
cameraMap.merge(scenePro.getCameraId(), scenePro.getSpace(), Long::sum);
|
|
sceneDelLogService.saveLog(scenePro.getNum(),userId);
|
|
sceneDelLogService.saveLog(scenePro.getNum(),userId);
|
|
- if(StringUtils.isBlank(platform) && (scenePro.getSceneSource() == 4 || scenePro.getSceneSource() == 5 || scenePro.getSceneSource() == 57)){
|
|
|
|
|
|
+ if(StringUtils.isBlank(platform) && (SceneSourceUtil.isLaser(scenePro.getSceneSource()))){
|
|
laserService.delete(scenePro.getNum());
|
|
laserService.delete(scenePro.getNum());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -921,7 +940,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
}
|
|
}
|
|
sceneDelLogService.saveLog(scenePlus.getNum(),userId);
|
|
sceneDelLogService.saveLog(scenePlus.getNum(),userId);
|
|
- if(StringUtils.isBlank(platform) && ( scenePlus.getSceneSource() == 4 || scenePlus.getSceneSource() == 5|| scenePlus.getSceneSource() == 57)){
|
|
|
|
|
|
+ if(StringUtils.isBlank(platform) && ( SceneSourceUtil.isLaser(scenePlus.getSceneSource()))){
|
|
laserService.delete(scenePlus.getNum());
|
|
laserService.delete(scenePlus.getNum());
|
|
}
|
|
}
|
|
}
|
|
}
|