lyhzzz vor 2 Jahren
Ursprung
Commit
1359d13e98

+ 2 - 0
README.md

@@ -2,3 +2,5 @@
 部署须知:
 服务器需提供 obj2gltf,unzip,unrar,ffmpeg命令支持
 
+提供/home/ubuntu/bin/PotreeConverter.sh 脚本
+

+ 0 - 5
pom.xml

@@ -46,11 +46,6 @@
             <version>3.5.1</version>
         </dependency>
 
-        <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-mongodb</artifactId>
-            <version>2.0.0-SNAPSHOT</version>
-        </dependency>
 
         <dependency>
             <groupId>org.springframework.boot</groupId>

+ 0 - 7
src/main/java/com/fdkankan/fusion/controller/CaseController.java

@@ -56,13 +56,6 @@ public class CaseController extends BaseController{
         return ResultData.ok();
     }
 
-    /**
-     * 案件关联场景的热点数据
-     */
-    @PostMapping("/hotList")
-    public ResultData hotList(@RequestBody CaseParam param){
-        return ResultData.ok( caseService.hotList(param.getCaseId()));
-    }
 
     @GetMapping("/getInfo")
     public ResultData getInfo(@RequestParam(required = false)Integer caseId){

+ 0 - 60
src/main/java/com/fdkankan/fusion/laser/entity/GeoPoint.java

@@ -1,60 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import lombok.Data;
-
-/**
- * @author Xiewj
- * @date 2021/11/9
- */
-@Data
-public class GeoPoint {
-
-    public GeoPoint() {
-    }
-
-    public GeoPoint(Double lon, Double lat) {
-        this.lon = lon;
-        this.lat = lat;
-    }
-    public GeoPoint(Double[] point) {
-        if (point != null && point.length != 0) {
-            if (point.length == 1) {
-                this.lon = point[0];
-            } else {
-                this.lon = point[0];
-                this.lat = point[1];
-            }
-        } else {
-            this.lon = 0.0D;
-            this.lat = 0.0D;
-        }
-    }
-    public double[] getCoordinates() {
-        return new double[]{this.lon, this.lat};
-    }
-
-    public void setCoordinates(double[] coordinates) {
-        if (coordinates != null && coordinates.length != 0) {
-            if (coordinates.length == 1) {
-                this.lon = coordinates[0];
-            } else {
-                this.lon = coordinates[0];
-                this.lat = coordinates[1];
-                this.alt = coordinates[2];
-            }
-        } else {
-            this.lon = 0.0D;
-            this.lat = 0.0D;
-            this.alt = 0.0D;
-        }
-    }
-    
-    /* 经度 */
-    private Double lon;
-    /* 纬度 */
-    private Double lat;
-    //高程
-    private Double alt;
-
-    private int id;
-}

+ 0 - 27
src/main/java/com/fdkankan/fusion/laser/entity/HotType.java

@@ -1,27 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-/**
- * @author Xiewj
- * @date 2021/11/30
- */
-public     enum HotType{
-    //定义枚举的值
-    TEXT(0,"text"),IMAGE(1,"image"),AUDIO(2,"audio"),VIDEO(3, "video"),WEB(4, "web");;
-
-    private int state;
-    private String info;
-
-    //构造方法(枚举的构造方法只允许private类型)
-    private HotType(int state, String info){
-        this.state = state;
-        this.info = info;
-    }
-
-    public int getState(){
-        return state;
-    }
-
-    public String getInfo(){
-        return info;
-    }
-}

+ 0 - 13
src/main/java/com/fdkankan/fusion/laser/entity/MetaPO.java

@@ -1,13 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import lombok.Data;
-
-/**
- * @author Xiewj
- * @date 2021/11/29
- */
-@Data
-public class MetaPO {
-   private String name;
-   private String url;
-}

+ 0 - 72
src/main/java/com/fdkankan/fusion/laser/entity/PoiEntity.java

@@ -1,72 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-
-import com.fdkankan.mongodb.base.BaseMongoEntity;
-import lombok.Data;
-import org.springframework.data.mongodb.core.mapping.Document;
-
-import java.util.List;
-
-
-/**
- * Created by Xiewj on 2021/7/27 0027 10:42
- * poi 热点
- */
-@Data
-@Document(collection = "t_poi")
-public class PoiEntity extends BaseMongoEntity {
-
-    /**
-     * 场景码
-     */
-    private String sceneCode;
-
-    /**
-     * 数据集id
-     */
-    private String datasetId;
-
-    /**
-     * 经纬度 暂留
-     */
-    private GeoPoint gis;
-
-    /**
-     * 坐标
-     */
-    private PointPO pos;
-
-    /**
-     * 坐标
-     */
-    private PointPO dataset_location;
-
-    /**
-     * 热点类型   'text' | 'image' | 'audio' | 'video'  | 'web'
-     */
-    private HotType type;
-
-    /**
-     * 类型id
-     */
-    private String title;
-
-    /**
-     * 类型id
-     */
-    private String poiStyleId;
-
-    /**
-     * 内容
-     */
-    private String content;
-
-    /**
-     * 内容
-     */
-    private List<MetaPO> meta;
-
-    private Double[] visualRange;
-
-
-}

+ 0 - 66
src/main/java/com/fdkankan/fusion/laser/entity/PoiHotDto.java

@@ -1,66 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import com.fdkankan.mongodb.base.BaseRequestMongo;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * Created by Xiewj on 2021/7/27 0027 10:42
- * poi 热点
- */
-@Data
-public class PoiHotDto extends BaseRequestMongo {
-
-    private String id;
-    /**
-     * 场景码
-     */
-    private String sceneCode;
-
-    /**
-     * 数据集id
-     */
-    private String datasetId;
-
-    /**
-     * 经纬度 暂留
-     */
-    private GeoPoint gis;
-
-    private PointPO dataset_location;
-
-    /**
-     * 坐标
-     */
-    private PointPO pos;
-
-    /**
-     * 热点类型   'text' | 'image' | 'audio' | 'video'  | 'web'
-     */
-    private HotType type;
-
-    /**
-     * 类型id
-     */
-    private String title;
-
-    /**
-     * 类型id
-     */
-    private PoiTypeEntity hotStyleAtom;
-
-    /**
-     * 内容
-     */
-    private String content;
-
-    /**
-     * 内容
-     */
-    private List<MetaPO> meta;
-
-    private Double[] visualRange;
-
-
-}

+ 0 - 28
src/main/java/com/fdkankan/fusion/laser/entity/PoiTypeDto.java

@@ -1,28 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import com.fdkankan.mongodb.base.BaseRequestMongo;
-import lombok.Data;
-
-/**
- * Created by Xiewj on 2021/7/26 0026 10:21
- */
-@Data
-public class PoiTypeDto extends BaseRequestMongo {
-
-    private String id;
-
-    /**
-     * 热点名
-     */
-    private String name;
-
-    /**
-     * 场景码
-     */
-    private String sceneCode;
-
-    /**
-     * 图标基础路径
-     */
-    private String icon;
-}

+ 0 - 37
src/main/java/com/fdkankan/fusion/laser/entity/PoiTypeEntity.java

@@ -1,37 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import com.fdkankan.mongodb.base.BaseMongoEntity;
-import lombok.Data;
-import lombok.experimental.Accessors;
-import org.springframework.data.mongodb.core.mapping.Document;
-
-/**
- * 初始化信息对象 t_poi_types
- *
- * @author fdkk
- * @date 2021-11-22
- */
-@Data
-@Accessors(chain = true)
-@Document("t_poi_types")
-public class PoiTypeEntity extends BaseMongoEntity {
-    /**
-     * 热点名
-     */
-    private String name;
-
-    /**
-     * 场景码
-     */
-    private String sceneCode;
-
-    /**
-     * 图标基础路径
-     */
-    private String icon;
-
-    /**
-     * 是否默认
-     */
-    private boolean isDefault;
-}

+ 0 - 22
src/main/java/com/fdkankan/fusion/laser/entity/PointPO.java

@@ -1,22 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import lombok.Data;
-
-/**
- * @author Xiewj
- * @date 2021/11/29
- */
-@Data
-public class PointPO {
-   private Double x;
-   private Double y;
-   private Double z;
-
-   public PointPO(Double x, Double y, Double z) {
-      this.x = x;
-      this.y = y;
-      this.z = z;
-   }
-   public PointPO( ) {
-   }
-}

+ 0 - 18
src/main/java/com/fdkankan/fusion/laser/entity/SearchDTO.java

@@ -1,18 +0,0 @@
-package com.fdkankan.fusion.laser.entity;
-
-import lombok.Data;
-
-/**
- * Created by xiewj 2021年12月16日10:26:44
- *
- * 多数据集剪裁参数
- * @author xiewj
- */
-@Data
-public class SearchDTO {
-
-    private String query;
-
-    private Integer size;
-
-}

+ 0 - 21
src/main/java/com/fdkankan/fusion/laser/service/PoiService.java

@@ -1,21 +0,0 @@
-package com.fdkankan.fusion.laser.service;
-
-
-import com.fdkankan.fusion.laser.entity.PoiEntity;
-import com.fdkankan.fusion.laser.entity.PoiHotDto;
-import com.fdkankan.mongodb.base.MongoPageResult;
-import com.fdkankan.mongodb.service.MongodbBaseService;
-
-import java.util.List;
-
-/**
- * Created by Xiewj on 2021/7/14 0014 14:31
- */
-public interface PoiService extends MongodbBaseService<PoiEntity> {
-
-
-    MongoPageResult<PoiEntity> ListByPage(PoiHotDto parmes);
-
-    List<PoiEntity> getHotList(List<String> numList);
-
-}

+ 0 - 39
src/main/java/com/fdkankan/fusion/laser/service/PoiServiceImpl.java

@@ -1,39 +0,0 @@
-package com.fdkankan.fusion.laser.service;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.fdkankan.fusion.laser.entity.PoiEntity;
-import com.fdkankan.fusion.laser.entity.PoiHotDto;
-import com.fdkankan.mongodb.base.MongoPageResult;
-import com.fdkankan.mongodb.service.impl.MongodbBaseServiceImpl;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.data.mongodb.core.query.Criteria;
-import org.springframework.data.mongodb.core.query.Query;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * Created by Xiewj on 2021/7/14 0014 14:31
- */
-@Slf4j
-@Service
-public class PoiServiceImpl extends MongodbBaseServiceImpl<PoiEntity> implements PoiService {
-
-
-    @Override
-    public MongoPageResult<PoiEntity> ListByPage(PoiHotDto parmes) {
-        Query query = new Query();
-        if (ObjectUtil.isNotNull(parmes.getSceneCode())) {
-            query.addCriteria(Criteria.where("sceneCode").is(parmes.getSceneCode()));
-        }
-
-        return pageQuery(parmes, query);
-    }
-
-    @Override
-    public List<PoiEntity> getHotList(List<String> numList) {
-        Query query = new Query();
-        query.addCriteria(Criteria.where("sceneCode").in(numList));
-        return find(query);
-    }
-}

+ 0 - 27
src/main/java/com/fdkankan/fusion/laser/service/PoiTypeService.java

@@ -1,27 +0,0 @@
-package com.fdkankan.fusion.laser.service;
-
-
-import com.fdkankan.fusion.laser.entity.PoiTypeDto;
-import com.fdkankan.fusion.laser.entity.PoiTypeEntity;
-import com.fdkankan.mongodb.base.MongoPageResult;
-import com.fdkankan.mongodb.service.MongodbBaseService;
-
-import java.util.List;
-
-/**
- * Created by Xiewj on 2021/11/23 0026 10:14
- */
-public interface PoiTypeService extends MongodbBaseService<PoiTypeEntity> {
-    void removeByIds(String[] ids);
-
-    void removeById(String id);
-
-    void removeBySceneCode(String sceneCode);
-
-    List<PoiTypeEntity> findBySceneCode(String sceneCode);
-
-    MongoPageResult<PoiTypeEntity> ListByPage(PoiTypeDto parmes);
-
-    PoiTypeEntity findByIsDefault();
-
-}

+ 0 - 63
src/main/java/com/fdkankan/fusion/laser/service/PoiTypeServiceImpl.java

@@ -1,63 +0,0 @@
-package com.fdkankan.fusion.laser.service;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.fdkankan.fusion.laser.entity.PoiTypeDto;
-import com.fdkankan.fusion.laser.entity.PoiTypeEntity;
-import com.fdkankan.mongodb.base.MongoPageResult;
-import com.fdkankan.mongodb.service.impl.MongodbBaseServiceImpl;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.data.mongodb.core.query.Criteria;
-import org.springframework.data.mongodb.core.query.Query;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-
-/**
- * Created by Xiewj on 2021/11/23 0026 10:14
- */
-@Slf4j
-@Service
-public class PoiTypeServiceImpl extends MongodbBaseServiceImpl<PoiTypeEntity> implements PoiTypeService {
-    @Override
-    public void removeByIds(String[] ids) {
-        for (String id : ids) {
-            deleteById(id);
-        }
-    }
-
-    @Override
-    public void removeById(String id) {
-        deleteById(id);
-    }
-
-    @Override
-    public void removeBySceneCode(String sceneCode) {
-        Query query = new Query(Criteria.where("sceneCode").is(sceneCode));
-        delete(query);
-    }
-
-    @Override
-    public List<PoiTypeEntity> findBySceneCode(String sceneCode) {
-        Query query = new Query(Criteria.where("sceneCode").is(sceneCode));
-        return find(query);
-    }
-
-    @Override
-    public MongoPageResult<PoiTypeEntity> ListByPage(PoiTypeDto parmes) {
-        Query query = new Query();
-        Criteria sceneCode = null;
-        if (ObjectUtil.isNotNull(parmes.getSceneCode())) {
-            sceneCode = Criteria.where("sceneCode").in("DEFAULT", parmes.getSceneCode());
-        }
-        query.addCriteria(sceneCode);
-        parmes.setSortBy("createTime");
-        return pageQuery(parmes, query);
-    }
-
-    @Override
-    public PoiTypeEntity findByIsDefault() {
-        Query query = new Query(Criteria.where("isDefault").is(true));
-        return findOne(query);
-    }
-}

+ 0 - 2
src/main/java/com/fdkankan/fusion/service/ICaseService.java

@@ -30,7 +30,5 @@ public interface ICaseService extends IService<CaseEntity> {
 
     List<SceneVo> sceneList(CaseParam param, String token);
 
-    List<HotVo> hotList(Integer caseId);
-
     List<CaseEntity> getByIds(List<Integer> caseIdIds);
 }

+ 0 - 16
src/main/java/com/fdkankan/fusion/service/impl/CaseServiceImpl.java

@@ -41,8 +41,6 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
     @Autowired
     ICaseNumService caseNumService;
     @Autowired
-    FdHotService fdHotService;
-    @Autowired
     IModelService modelService;
     @Autowired
     IFusionNumService fusionNumService;
@@ -194,20 +192,6 @@ public class CaseServiceImpl extends ServiceImpl<ICaseMapper, CaseEntity> implem
     }
 
 
-    @Override
-    public List<HotVo> hotList(Integer caseId) {
-        HashMap<Integer, List<String>> typeMap = caseNumService.getTypeMap(caseId);
-        List<HotVo> listAll = new ArrayList<>();
-        for (Integer type : typeMap.keySet()) {
-            List<String> numList = typeMap.get(type);
-            if(numList ==null || numList.size() <=0){
-                continue;
-            }
-            List<HotVo> hotList = fdHotService.getHotList(numList, type);
-            listAll.addAll(hotList);
-        }
-        return listAll;
-    }
 
     @Override
     public List<CaseEntity> getByIds(List<Integer> caseIdIds) {

+ 0 - 106
src/main/java/com/fdkankan/fusion/service/impl/FdHotService.java

@@ -1,106 +0,0 @@
-package com.fdkankan.fusion.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.fdkankan.fusion.common.FilePath;
-import com.fdkankan.fusion.common.util.UploadToOssUtil;
-import com.fdkankan.fusion.laser.entity.PoiEntity;
-import com.fdkankan.fusion.laser.entity.PoiHotDto;
-import com.fdkankan.fusion.laser.entity.PoiTypeEntity;
-import com.fdkankan.fusion.laser.service.PoiService;
-import com.fdkankan.fusion.laser.service.PoiTypeService;
-import com.fdkankan.fusion.response.HotVo;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-@Service
-public class FdHotService {
-
-
-
-    @Autowired
-    UploadToOssUtil uploadToOssUtil;
-
-    @Autowired
-    PoiService poiService;
-    @Autowired
-    private PoiTypeService poiTypeService;
-    /**
-     * 获取四维热点数据 to oss
-     * @return
-     */
-    public List<HotVo> getHotList(List<String> numList, Integer type){
-        if(type == 2){
-            return getLaserHot(numList);
-        }
-        List<HotVo> list = new ArrayList<>();
-        for (String num : numList) {
-            String ossPath = String.format(FilePath.hotPath, num);
-            if(!uploadToOssUtil.existKey(ossPath)){
-                continue;
-            }
-            String hotString = uploadToOssUtil.getObjectContent("4dkankan",ossPath );
-            if(StringUtils.isEmpty(hotString)){
-                continue;
-            }
-            JSONArray array = JSONObject.parseArray(hotString);
-            for (Object obj : array) {
-
-                JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(obj));
-                HotVo hotVo = new HotVo();
-                hotVo.setId(jsonObject.getString("sid"));
-                hotVo.setTitle(jsonObject.getString("title"));
-                hotVo.setNum(num);
-                hotVo.setContent(jsonObject.getString("content"));
-                hotVo.setNumType(type);
-                hotVo.setType(jsonObject.getString("type"));
-                String icon = StringUtils.isEmpty(jsonObject.getString("icon") ) ? FilePath.hotIconDefaultPath : jsonObject.getString("icon");
-                hotVo.setIcon(icon);
-                list.add(hotVo);
-            }
-        }
-
-        return list;
-    }
-
-
-    /**
-     * 获取机关热点数据
-     */
-    private List<HotVo> getLaserHot(List<String> numList){
-        List<HotVo> voList = new ArrayList<>();
-
-        List<PoiEntity> list = poiService.getHotList(numList);
-         List<PoiHotDto> poiHotDtoList = list.stream().map(a -> {
-            PoiHotDto dto = new PoiHotDto();
-            BeanUtil.copyProperties(a, dto);
-            PoiTypeEntity poiType = poiTypeService.findById(a.getPoiStyleId());
-            if (ObjectUtil.isNotNull(poiType)) {
-                dto.setHotStyleAtom(poiType);
-            }
-            return dto;
-        }).collect(Collectors.toList());
-
-        for (PoiHotDto poiHotDto : poiHotDtoList) {
-            HotVo hotVo = new HotVo();
-            hotVo.setId(poiHotDto.getId());
-            hotVo.setTitle(poiHotDto.getTitle());
-            hotVo.setNum(poiHotDto.getSceneCode());
-            hotVo.setContent(poiHotDto.getContent());
-            hotVo.setNumType(2);
-            hotVo.setType(poiHotDto.getType().name());
-            String icon = poiHotDto.getHotStyleAtom() == null ? FilePath.hotIconDefaultPath : poiHotDto.getHotStyleAtom().getIcon();
-            hotVo.setIcon(icon);
-            voList.add(hotVo);
-        }
-         return voList;
-    }
-
-}

+ 0 - 3
src/main/resources/application-dev.yaml

@@ -27,9 +27,6 @@ spring:
         max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
     lettuce:
       shutdown-timeout: 0ms
-  data:
-    mongodb:
-      uri: mongodb://4dage:1234@120.25.146.52:27017/laser
 
 local:
   obj_path: /home/fusion/model/%s

+ 0 - 3
src/main/resources/application-local.yaml

@@ -27,9 +27,6 @@ spring:
         max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
     lettuce:
       shutdown-timeout: 0ms
-  data:
-    mongodb:
-      uri: mongodb://4dage:1234@120.25.146.52:27017/laser
 
 local:
   obj_path: D:\fusion\model\%s

+ 0 - 3
src/main/resources/application-test.yaml

@@ -27,9 +27,6 @@ spring:
         max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
     lettuce:
       shutdown-timeout: 0ms
-  data:
-    mongodb:
-      uri: mongodb://4dage:1234@120.25.146.52:27017/laser
 
 local:
   obj_path: /home/fusion/model/%s