فهرست منبع

Merge remote-tracking branch 'origin/test-1.7.0-20240403' into dev-1.7.0-20240401

# Conflicts:
#	720yun_fd_manage/gis_application/src/main/resources/application-locSit.yml
#	720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/WorkIdDto.java
#	720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/entity/WorkEntity.java
#	720yun_fd_manage/gis_service/src/main/java/com/gis/service/WorkService.java
#	720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java
#	720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java
dengsixing 1 سال پیش
والد
کامیت
9076d6f2e7
70فایلهای تغییر یافته به همراه3871 افزوده شده و 528 حذف شده
  1. 7 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/constant/ConfigConstant.java
  2. 107 103
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/constant/RabbitConfig.java
  3. 40 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/BaseStrEntity.java
  4. 11 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/DoSliceDTO.java
  5. 54 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/RelicsSceneInitQueueDTO.java
  6. 62 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/ScenePanoEntity.java
  7. 57 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/SceneQueueDTO.java
  8. 79 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/WorkEntity.java
  9. 65 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/DoSliceListener.java
  10. 62 62
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/Fd720Listener.java
  11. 59 59
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/Fd720Listener_2.java
  12. 520 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/SceneListener.java
  13. 17 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/IBaseStrMapper.java
  14. 14 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/ScenePanoMapper.java
  15. 42 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/WorkMapper.java
  16. 81 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mq/RabbitMqProducerUtil.java
  17. 52 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/IBaseService.java
  18. 53 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/IBaseStrService.java
  19. 18 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/ScenePanoService.java
  20. 16 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/WorkService.java
  21. 21 6
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/FodderServiceImpl.java
  22. 185 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/IBaseServiceImpl.java
  23. 196 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/IBaseStrServiceImpl.java
  24. 45 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/ScenePanoServiceImpl.java
  25. 78 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/WorkServiceImpl.java
  26. 55 3
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/FileUtils.java
  27. 286 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/JwtUtil.java
  28. 197 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/QrCodeUtils.java
  29. 14 2
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/RandomUtils.java
  30. 226 0
      720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/SnowFlakeUUidUtils.java
  31. 3 0
      720yun_fd_consumer/gis_consumer/src/main/resources/application-dev.yml
  32. 71 0
      720yun_fd_consumer/gis_consumer/src/main/resources/application-loc-site.yml
  33. 3 0
      720yun_fd_consumer/gis_consumer/src/main/resources/application-loc.yml
  34. 24 11
      720yun_fd_consumer/gis_consumer/src/main/resources/application-pro.yml
  35. 22 11
      720yun_fd_consumer/gis_consumer/src/main/resources/application-sit.yml
  36. 3 0
      720yun_fd_consumer/gis_consumer/src/main/resources/application.yml
  37. 105 0
      720yun_fd_consumer/gis_consumer/src/main/resources/data/someData.json
  38. 24 0
      720yun_fd_consumer/gis_consumer/src/main/resources/data/someDataSceneData.json
  39. 78 0
      720yun_fd_consumer/gis_consumer/src/main/resources/data/tour.xml
  40. 7 3
      720yun_fd_consumer/gis_consumer_oss/pom.xml
  41. 47 5
      720yun_fd_consumer/gis_consumer_oss/src/main/java/com/gis/oss/util/AliYunOssUtil.java
  42. 11 6
      720yun_fd_consumer/pom.xml
  43. 1 1
      720yun_fd_consumer/run.sh
  44. 17 44
      720yun_fd_manage/gis_application/src/main/resources/application-locSit.yml
  45. 21 11
      720yun_fd_manage/gis_application/src/main/resources/application-pro.yml
  46. 18 10
      720yun_fd_manage/gis_application/src/main/resources/application-sit.yml
  47. 17 10
      720yun_fd_manage/gis_application/src/main/resources/data/tour.xml
  48. 140 140
      720yun_fd_manage/gis_common/src/main/java/com/gis/common/config/RabbitConfig.java
  49. 6 0
      720yun_fd_manage/gis_common/src/main/java/com/gis/common/httpclient/FdkkClient.java
  50. 81 0
      720yun_fd_manage/gis_common/src/main/java/com/gis/common/mq/RabbitMqProducerUtil.java
  51. 4 0
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/AgePageDto.java
  52. 11 0
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/DoSliceDTO.java
  53. 10 2
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/WorkIdDto.java
  54. 63 0
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/entity/ScenePanoEntity.java
  55. 19 1
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/entity/WorkEntity.java
  56. 22 0
      720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/vo/WorkIdVO.java
  57. 14 0
      720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/ScenePanoMapper.java
  58. 4 1
      720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/WorkMapper.java
  59. 12 2
      720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/provider/WorkProvider.java
  60. 16 0
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/ScenePanoService.java
  61. 4 0
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/WorkService.java
  62. 12 7
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java
  63. 41 0
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/ScenePanoServiceImpl.java
  64. 117 6
      720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java
  65. 2 0
      720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/BaseController.java
  66. 14 7
      720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/TestController.java
  67. 50 4
      720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/WebController.java
  68. 32 1
      720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/WorkController.java
  69. 5 9
      720yun_fd_manage/pom.xml
  70. 1 1
      720yun_fd_manage/run.sh

+ 7 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/constant/ConfigConstant.java

@@ -38,5 +38,12 @@ public class ConfigConstant {
     @Value("${oss.domain}")
     public  String ossDomain;
 
+    /*********************** 其他参数 ***********************/
 
+    @Value("${domain.4dkk}")
+    public  String domain4dKK;
+
+    /**redis token前缀*/
+    @Value("${redis.token.prefix}")
+    public  String redisTokenPrefix;
 }

+ 107 - 103
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/constant/RabbitConfig.java

@@ -1,103 +1,107 @@
-package com.gis.constant;
-
-import org.springframework.amqp.core.*;
-import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
-import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
-import org.springframework.amqp.rabbit.connection.ConnectionFactory;
-import org.springframework.amqp.rabbit.core.RabbitTemplate;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-
-/**
- * 即时队列
- */
-
-@Configuration
-public class RabbitConfig {
-
-    @Value("${spring.rabbitmq.address}")
-    private String address;
-
-    @Value("${spring.rabbitmq.username}")
-    private String username;
-
-    @Value("${spring.rabbitmq.password}")
-    private String password;
-
-
-
-
-    /** 全景图队列*/
-    public static final String PANO_QUEUE = "720FdQueue";
-
-    /** 全景图交换机*/
-    public static final String PANO_EXCHANGE = "720FdExchange";
-
-    /** 全景图交换机路由*/
-    public static final String PANO_QUEUE_ROUTING = "720FdQueueRouting";
-
-
-
-
-
-
-    /**
-     * 全景图模型队列
-     */
-    @Bean
-    public Queue panoQueue() {
-        return new Queue(PANO_QUEUE);
-    }
-
-    /**
-     * 全景图交换机
-     */
-    @Bean
-    public Exchange panoExchange(){
-        return new DirectExchange(PANO_EXCHANGE, true, false);
-    }
-
-
-    /**
-     * 全景图队列绑定交换机
-     */
-    @Bean
-    public Binding panoQueueExchange(Queue panoQueue, Exchange panoExchange){
-        return BindingBuilder.bind(panoQueue).to(panoExchange).with(PANO_QUEUE_ROUTING).noargs();
-    }
-
-
-    /**
-     * 以下三个方法是配置集群
-     * @return
-     */
-    @Bean
-    public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() {
-        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
-        factory.setConnectionFactory(connectionFactory());
-        factory.setPrefetchCount(1);
-        return factory;
-    }
-
-    @Bean
-    public ConnectionFactory connectionFactory() {
-        CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
-        connectionFactory.setAddresses(address);
-        connectionFactory.setUsername(username);
-        connectionFactory.setPassword(password);
-        connectionFactory.setVirtualHost("/");
-        connectionFactory.setPublisherConfirms(true);
-        return connectionFactory;
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public RabbitTemplate rabbitTemplate() {
-        return new RabbitTemplate(connectionFactory());
-    }
-
-
-}
+//package com.gis.constant;
+//
+//import org.springframework.amqp.core.*;
+//import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
+//import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
+//import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+//import org.springframework.amqp.rabbit.core.RabbitTemplate;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Scope;
+//
+///**
+// * 即时队列
+// */
+//
+//@Configuration
+//public class RabbitConfig {
+//
+//    @Value("${spring.rabbitmq.address}")
+//    private String address;
+//
+//    @Value("${spring.rabbitmq.username}")
+//    private String username;
+//
+//    @Value("${spring.rabbitmq.password}")
+//    private String password;
+//
+//
+//
+//
+//    /** 全景图队列*/
+//    public static final String PANO_QUEUE = "720FdQueue";
+//
+//    /** 全景图交换机*/
+//    public static final String PANO_EXCHANGE = "720FdExchange";
+//
+//    /** 全景图交换机路由*/
+//    public static final String PANO_QUEUE_ROUTING = "720FdQueueRouting";
+//
+//
+//    public static final String PANO_SCENE_QUEUE = "PanoSceneQueue";
+//    public static final String PANO_SCENE_QUEUE_EXCHANGE = "PanoSceneQueueExchange";
+//
+//
+//
+//    /**
+//     * 全景图模型队列
+//     */
+//    @Bean
+//    public Queue panoQueue() {
+//        return new Queue(PANO_QUEUE);
+//    }
+//
+//    /**
+//     * 全景图交换机
+//     */
+//    @Bean
+//    public Exchange panoExchange(){
+//        return new DirectExchange(PANO_EXCHANGE, true, false);
+//    }
+//
+//
+//
+//
+//
+//    /**
+//     * 全景图队列绑定交换机
+//     */
+//    @Bean
+//    public Binding panoQueueExchange(Queue panoQueue, Exchange panoExchange){
+//        return BindingBuilder.bind(panoQueue).to(panoExchange).with(PANO_QUEUE_ROUTING).noargs();
+//    }
+//
+//
+//    /**
+//     * 以下三个方法是配置集群
+//     * @return
+//     */
+//    @Bean
+//    public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() {
+//        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
+//        factory.setConnectionFactory(connectionFactory());
+//        factory.setPrefetchCount(1);
+//        return factory;
+//    }
+//
+//    @Bean
+//    public ConnectionFactory connectionFactory() {
+//        CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
+//        connectionFactory.setAddresses(address);
+//        connectionFactory.setUsername(username);
+//        connectionFactory.setPassword(password);
+//        connectionFactory.setVirtualHost("/");
+//        connectionFactory.setPublisherConfirms(true);
+//        return connectionFactory;
+//    }
+//
+//    @Bean
+//    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+//    public RabbitTemplate rabbitTemplate() {
+//        return new RabbitTemplate(connectionFactory());
+//    }
+//
+//
+//}

+ 40 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/BaseStrEntity.java

@@ -0,0 +1,40 @@
+package com.gis.entity;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.*;
+import java.util.Date;
+
+@Data
+@MappedSuperclass
+public abstract class BaseStrEntity {
+
+    @Id
+    @Column(name = "id")
+    @ApiModelProperty(value = "对象ID")
+    private String id;
+
+    @ApiModelProperty(value = "创建时间")
+    @Temporal(TemporalType.TIMESTAMP)
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @ApiModelProperty(value = "修改时间")
+    @Temporal(TemporalType.TIMESTAMP)
+    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 用来批量操作的
+     * 0代表未删除 , 1代表已经删除,默认写0
+     * 需要使用对象类型
+     */
+    @JsonIgnore
+    @JSONField(serialize = false)
+    private Integer isDelete;
+
+
+}

+ 11 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/DoSliceDTO.java

@@ -0,0 +1,11 @@
+package com.gis.entity;
+import lombok.Data;
+
+/**
+ * @author Xiewj
+ * @date 2024/4/7
+ */
+@Data
+public class DoSliceDTO {
+    private Long id;
+}

+ 54 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/RelicsSceneInitQueueDTO.java

@@ -0,0 +1,54 @@
+package com.gis.entity;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * @author Xiewj
+ * @date 2024/4/3
+ */
+@Data
+public class RelicsSceneInitQueueDTO {
+
+    private String sceneCode;
+
+    @ApiModelProperty(value = "判断是否为slam场景,深光和深时 以前的场景都是4" +
+            "typedef enum SceneLocation {\n" +
+            "    Scene_Location_Slam  = 0, //slam\n" +
+            "    Scene_Location_SFM 1 ,   //sfm\n" +
+            "    Scene_Location_SFMAI  2,     //SFM + AI\n" +
+            "    Scene_Location_MutiFloor 3 ,    //多楼层\n" +
+            "    Scene_Location_PointCloud 4,    //点云\n" +
+            "    Scene_Location_SLAMPoint 5,    //slam实时拍\n" +
+            "    Scene_Location_SLAMPointAndSFMAI  6   //slam实时拍+站点\n" +
+            "} SceneLocation;")
+    private Integer location;
+
+    @ApiModelProperty(value = "场景来源:相机拍摄10以内表示,1表示八目,2双目,3转台,4 激光 5深光  其他来源10以上,11:一键换装,12:123看房,13文通虚拟场景")
+    private Integer sceneSource;
+
+    @ApiModelProperty(value = "计算完成时间")
+    private Date algorithmTime;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    private String phoneNum;
+
+    private Integer userId;
+
+    private String snCode;
+
+    //0-计算中 1-计算成功  -1-计算失败
+    private int status;
+
+    private String sceneName;
+
+
+    @ApiModelProperty(value = "点位数量")
+    private Integer shootCount;
+
+}

+ 62 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/ScenePanoEntity.java

@@ -0,0 +1,62 @@
+package com.gis.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Table;
+import java.io.Serializable;
+
+/**
+ * 四维看看场景全景图表
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+@Data
+@ApiModel("四维看看场景全景图表")
+@Table(name = "tb_scene_pano")
+public class ScenePanoEntity extends BaseEntity implements Serializable  {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("wordid")
+    private String workId;
+
+    @ApiModelProperty("名称")
+    private String name;
+
+    @ApiModelProperty("服务器存放地址")
+    private String filePath;
+
+    @ApiModelProperty("oss存放地址")
+    private String ossPath;
+
+    @ApiModelProperty("状态")
+    private Integer status;
+
+    @ApiModelProperty("封面图")
+    private String icon;
+
+    @ApiModelProperty("文件名")
+    private String fileName;
+
+    @ApiModelProperty("场景码")
+    private String sceneCode;
+
+    @ApiModelProperty("文件大小,单位MB")
+    private String fileSize;
+
+    @ApiModelProperty("预览图(全景图使用)")
+    private String previewIcon;
+
+    @ApiModelProperty("tour.xml")
+    private String tour;
+
+    @ApiModelProperty("四维看看场景码")
+    private String num;
+
+    private String visid;
+    private String uuid;
+
+}

+ 57 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/SceneQueueDTO.java

@@ -0,0 +1,57 @@
+package com.gis.entity;
+
+import com.amazonaws.services.dynamodbv2.xspec.S;
+import com.alibaba.fastjson.JSONObject;
+import com.google.gson.JsonObject;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+import lombok.Data;
+
+/**
+ * @author Xiewj
+ * @date 2024/4/3
+ */
+@Data
+public class SceneQueueDTO {
+
+    private String sceneCode;
+
+    @ApiModelProperty(value = "判断是否为slam场景,深光和深时 以前的场景都是4" +
+            "typedef enum SceneLocation {\n" +
+            "    Scene_Location_Slam  = 0, //slam\n" +
+            "    Scene_Location_SFM 1 ,   //sfm\n" +
+            "    Scene_Location_SFMAI  2,     //SFM + AI\n" +
+            "    Scene_Location_MutiFloor 3 ,    //多楼层\n" +
+            "    Scene_Location_PointCloud 4,    //点云\n" +
+            "    Scene_Location_SLAMPoint 5,    //slam实时拍\n" +
+            "    Scene_Location_SLAMPointAndSFMAI  6   //slam实时拍+站点\n" +
+            "} SceneLocation;")
+    private Integer location;
+
+
+    @ApiModelProperty(value = "场景来源:相机拍摄10以内表示,1表示八目,2双目,3转台,4 激光 5深光  其他来源10以上,11:一键换装,12:123看房,13文通虚拟场景")
+    private Integer sceneSource;
+
+    @ApiModelProperty(value = "计算完成时间")
+    private Date algorithmTime;
+    private Date createTime;
+
+    private String phoneNum;
+    private Integer userId;
+    private String snCode;
+
+    //0-计算中 1-计算成功  -1-计算失败
+    private int status;
+
+    private String sceneName;
+
+    private String pwd;
+
+    @ApiModelProperty(value = "点位数量")
+    private Integer shootCount;
+
+    private JsonObject gps;
+
+}

+ 79 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/entity/WorkEntity.java

@@ -0,0 +1,79 @@
+package com.gis.entity;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 作品表
+ */
+@Data
+@Entity
+@Table(name = "tb_work")
+public class WorkEntity extends BaseStrEntity implements Serializable {
+
+    private static final long serialVersionUID = 6827754544317282072L;
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "简介")
+    private String description;
+
+    @ApiModelProperty(value = "状态, 0:默认不显示, 1:显示")
+    private Integer status;
+
+    @ApiModelProperty(value = "创建人")
+    private String userId;
+
+    @ApiModelProperty(value = "封面图")
+    private String icon;
+
+    @ApiModelProperty(value = "访问量")
+    private Integer visit;
+
+    @JSONField(serialize = false)
+    @ApiModelProperty(value = "作品密码, 默认0:不需要密码")
+    private String password;
+
+
+    @ApiModelProperty(value = "二维码")
+    private String qrCode;
+
+    @ApiModelProperty(value = "分享地址(二维码扫描后地址)")
+    private String share;
+
+    @ApiModelProperty(value = "是否有密码,0:没有, 1:有")
+    private Integer isPassword;
+
+    /** 用来关联删除素材时使用*/
+    @ApiModelProperty(value = "场景码")
+    private String sceneCodes;
+
+    @ApiModelProperty(value = "作品类型:pano:全是全景图 | 4dkk: 全是四维看看 : mix:混合(pano+4dkk), 通过sceneCodes判断")
+    private String type;
+
+    //计算状态
+    @ApiModelProperty(value = "计算状态:0-计算中 1-计算成功  -1-计算失败")
+    private Integer calcStatus;
+
+    @ApiModelProperty(value = "四维看看场景码")
+    private String num;
+
+    @ApiModelProperty(value = "相机编码")
+    private String snCode;
+
+
+    private Integer location;
+
+
+    @ApiModelProperty(value = "场景来源:相机拍摄10以内表示,1表示八目,2双目,3转台,4 激光 5深光  其他来源10以上,11:一键换装,12:123看房,13文通虚拟场景")
+    private Integer sceneSource;
+
+    @ApiModelProperty(value = "计算完成时间")
+    private Date algorithmTime;
+}

+ 65 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/DoSliceListener.java

@@ -0,0 +1,65 @@
+package com.gis.listener;
+
+import com.alibaba.fastjson.JSONObject;
+import com.gis.entity.DoSliceDTO;
+import com.gis.service.FodderService;
+import com.rabbitmq.client.Channel;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.MDC;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+/**
+ * 消息监听器
+ *
+ * @author Xiewj
+ * @version 1.0
+ * @since 2023/08/07
+ */
+@Component
+@Slf4j
+public class DoSliceListener {
+    @Autowired
+    FodderService fodderService;
+
+    /**
+     * 全景场景初始化方法
+     *
+     * @param channel
+     * @param message
+     * @throws Exception the io exception  这里异常需要处理
+     */
+    @RabbitListener(
+            queuesToDeclare = @Queue("${queue.do-slice-queue}"),concurrency = "2"
+    )
+    public void doSliceQueue(Channel channel, Message message) throws IOException {
+        if (ObjectUtils.isEmpty(message.getBody())) {
+            log.error("消息内容为空,退出构建,当前服务器id:{}" );
+            return;
+        }
+        String traceId = System.currentTimeMillis()+"";
+        MDC.put("TRACE_ID", traceId);
+        long deliveryTag = message.getMessageProperties().getDeliveryTag();
+        try {
+            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+            String messageId = message.getMessageProperties().getMessageId();
+            log.info("场景doSliceQueue开始,id:{},deliveryTag:{},消息体:{}", messageId,deliveryTag,msg);
+            DoSliceDTO dto = JSONObject.parseObject(msg, DoSliceDTO.class);
+            fodderService.doSlice(dto.getId(), traceId);
+            channel.basicAck(deliveryTag, false);
+        }catch (Exception e){
+            e.printStackTrace();
+            channel.basicAck(deliveryTag, false);
+            log.error("场景doSliceQueue报错{}",e.getMessage());
+        }
+
+    }
+}

+ 62 - 62
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/Fd720Listener.java

@@ -1,62 +1,62 @@
-package com.gis.listener;
-
-import com.gis.constant.RabbitConfig;
-import com.gis.service.FodderService;
-import lombok.extern.slf4j.Slf4j;
-import org.slf4j.MDC;
-import org.springframework.amqp.rabbit.annotation.RabbitHandler;
-import org.springframework.amqp.rabbit.annotation.RabbitListener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-
-/**
- * Created by owen on 2021/1/12 0012 10:05
- */
-@Slf4j
-@Component
-@RabbitListener(queues = RabbitConfig.PANO_QUEUE,concurrency="1") // 指定监听队列
-public class Fd720Listener {
-
-
-
-
-    @Autowired
-    FodderService fodderService;
-
-
-    // 链路id
-    static String traceId;
-
-
-    @RabbitHandler
-    public void getMessage(Long param)  {
-        traceId = System.currentTimeMillis()+"";
-        MDC.put("TRACE_ID", traceId);
-
-        log.info("监听消息_1_start: {}, uuid: {}", param, traceId);
-        try {
-            Thread.sleep(300);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        fodderService.doSlice(param, traceId);
-
-
-        log.info("监听消息_1_end: {}, uuid: {}", param, traceId);
-    }
-
-
-
-
-
-
-
-
-
-
-
-
-
-}
+//package com.gis.listener;
+//
+//import com.gis.constant.RabbitConfig;
+//import com.gis.service.FodderService;
+//import lombok.extern.slf4j.Slf4j;
+//import org.slf4j.MDC;
+//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
+//import org.springframework.amqp.rabbit.annotation.RabbitListener;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Component;
+//
+//
+///**
+// * Created by owen on 2021/1/12 0012 10:05
+// */
+//@Slf4j
+//@Component
+//@RabbitListener(queues = RabbitConfig.PANO_QUEUE,concurrency="1") // 指定监听队列
+//public class Fd720Listener {
+//
+//
+//
+//
+//    @Autowired
+//    FodderService fodderService;
+//
+//
+//    // 链路id
+//    static String traceId;
+//
+//
+//    @RabbitHandler
+//    public void getMessage(Long param)  {
+//        traceId = System.currentTimeMillis()+"";
+//        MDC.put("TRACE_ID", traceId);
+//
+//        log.info("监听消息_1_start: {}, uuid: {}", param, traceId);
+//        try {
+//            Thread.sleep(300);
+//        } catch (InterruptedException e) {
+//            e.printStackTrace();
+//        }
+//
+//        fodderService.doSlice(param, traceId);
+//
+//
+//        log.info("监听消息_1_end: {}, uuid: {}", param, traceId);
+//    }
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//}

+ 59 - 59
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/Fd720Listener_2.java

@@ -1,59 +1,59 @@
-package com.gis.listener;
-
-import com.gis.constant.RabbitConfig;
-import com.gis.service.FodderService;
-import lombok.extern.slf4j.Slf4j;
-import org.slf4j.MDC;
-import org.springframework.amqp.rabbit.annotation.RabbitHandler;
-import org.springframework.amqp.rabbit.annotation.RabbitListener;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-
-/**
- * Created by owen on 2021/12/24 0012 10:05
- *
- * 开启两个线程监听
- */
-@Slf4j
-@Component
-@RabbitListener(queues = RabbitConfig.PANO_QUEUE) // 指定监听队列
-public class Fd720Listener_2 {
-
-
-    @Autowired
-    FodderService fodderService;
-
-
-    // 链路id
-    static String traceId;
-
-
-    @RabbitHandler
-    public void getMessage(Long param)  {
-        traceId = System.currentTimeMillis()+"";
-        MDC.put("TRACE_ID", traceId);
-
-        log.info("监听消息_2_start: {}, uuid: {}", param, traceId);
-        try {
-            Thread.sleep(300);
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        fodderService.doSlice(param, traceId);
-
-
-        log.info("监听消息_2_end: {}, uuid: {}", param, traceId);
-    }
-
-
-
-
-
-
-
-
-
-
-}
+//package com.gis.listener;
+//
+//import com.gis.constant.RabbitConfig;
+//import com.gis.service.FodderService;
+//import lombok.extern.slf4j.Slf4j;
+//import org.slf4j.MDC;
+//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
+//import org.springframework.amqp.rabbit.annotation.RabbitListener;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Component;
+//
+//
+///**
+// * Created by owen on 2021/12/24 0012 10:05
+// *
+// * 开启两个线程监听
+// */
+//@Slf4j
+//@Component
+//@RabbitListener(queues = RabbitConfig.PANO_QUEUE) // 指定监听队列
+//public class Fd720Listener_2 {
+//
+//
+//    @Autowired
+//    FodderService fodderService;
+//
+//
+//    // 链路id
+//    static String traceId;
+//
+//
+//    @RabbitHandler
+//    public void getMessage(Long param)  {
+//        traceId = System.currentTimeMillis()+"";
+//        MDC.put("TRACE_ID", traceId);
+//
+//        log.info("监听消息_2_start: {}, uuid: {}", param, traceId);
+//        try {
+//            Thread.sleep(300);
+//        } catch (InterruptedException e) {
+//            e.printStackTrace();
+//        }
+//
+//        fodderService.doSlice(param, traceId);
+//
+//
+//        log.info("监听消息_2_end: {}, uuid: {}", param, traceId);
+//    }
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//
+//}

+ 520 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/listener/SceneListener.java

@@ -0,0 +1,520 @@
+package com.gis.listener;
+
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.gis.constant.CmdConstant;
+import com.gis.constant.ConfigConstant;
+import com.gis.entity.RelicsSceneInitQueueDTO;
+import com.gis.entity.ScenePanoEntity;
+import com.gis.entity.SceneQueueDTO;
+import com.gis.entity.WorkEntity;
+import com.gis.exception.BaseRuntimeException;
+import com.gis.mq.RabbitMqProducerUtil;
+import com.gis.oss.util.AliYunOssUtil;
+import com.gis.oss.util.FileAndOssUtil;
+import com.gis.service.ScenePanoService;
+import com.gis.service.WorkService;
+import com.gis.util.CmdUtils;
+import com.gis.util.FileUtils;
+import com.gis.util.QrCodeUtils;
+import com.gis.util.RandomUtils;
+import com.rabbitmq.client.Channel;
+import lombok.extern.slf4j.Slf4j;
+import org.slf4j.MDC;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.Queue;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 消息监听器
+ *
+ * @author Xiewj
+ * @version 1.0
+ * @since 2023/08/07
+ */
+@Component
+@Slf4j
+public class SceneListener {
+
+    @Autowired
+    AliYunOssUtil aliyunOssUtil;
+    @Autowired
+    ConfigConstant configConstant;
+    @Autowired
+    FileAndOssUtil fileAndOssUtil;
+    @Autowired
+    WorkService workService;
+    @Autowired
+    QrCodeUtils qrCodeUtils;
+    @Autowired
+    ScenePanoService scenePanoService;
+    @Autowired
+    RabbitMqProducerUtil rabbitMqProducerUtil;
+    @Value("${queue.relics-init-queue}")
+    String relicsInitQueue;
+    /**
+     * 全景场景初始化方法
+     *
+     * @param channel
+     * @param message
+     * @throws Exception the io exception  这里异常需要处理
+     */
+    @RabbitListener(
+            queuesToDeclare = @Queue("${queue.scene-queue}"),concurrency = "1"
+    )
+    public void sceneQueue(Channel channel, Message message) throws IOException {
+            if (ObjectUtils.isEmpty(message.getBody())) {
+                log.error("消息内容为空,退出构建,当前服务器id:{}" );
+                return;
+            }
+        String traceId = System.currentTimeMillis()+"";
+        MDC.put("TRACE_ID", traceId);
+
+        long deliveryTag = message.getMessageProperties().getDeliveryTag();
+        try {
+            String msg = new String(message.getBody(), StandardCharsets.UTF_8);
+            String messageId = message.getMessageProperties().getMessageId();
+            log.info("场景sceneQueue开始,id:{},deliveryTag:{},消息体:{}", messageId,deliveryTag,msg);
+            SceneQueueDTO param = JSONObject.parseObject(msg, SceneQueueDTO.class);
+            if (ObjectUtil.isEmpty(param.getSceneCode())) {
+                log.error("参数列表错误(缺少),格式不匹配,{}",param);
+                channel.basicAck(deliveryTag, false);
+            }
+            WorkEntity workEntity=workService.findByNum(param.getSceneCode());
+            if (ObjectUtil.isEmpty(workEntity)&&param.getStatus()==0){
+                //初始化创建work表数据
+                workService.entityAdd(param);
+                sendStartMq(param);
+                channel.basicAck(deliveryTag, false);
+            }if (ObjectUtil.isNotEmpty(workEntity)&&param.getStatus()!=1){
+                //修改状态
+                workEntity.setCalcStatus(param.getStatus());
+                if (ObjectUtil.isNotEmpty(param.getPwd())&&ObjectUtil.isEmpty(workEntity.getPassword())){
+                    workEntity.setPassword(param.getPwd());
+                    workEntity.setIsPassword(1);
+                }
+                workService.update(workEntity);
+                sendStartMq(param);
+                channel.basicAck(deliveryTag, false);
+            }else if (ObjectUtil.isNotEmpty(param.getSceneCode())&&param.getStatus()==1){
+                //计算完成处理
+                //1,下载场景的全景图 默认 。scene_view_data/panorama/目录下的全景图图片
+                workEntity.setAlgorithmTime(param.getAlgorithmTime());
+                workEntity.setCalcStatus(0);
+                if (ObjectUtil.isNotEmpty(param.getSceneSource())){
+                    workEntity.setSceneSource(param.getSceneSource());
+                }
+                if (ObjectUtil.isNotEmpty(param.getPwd())&&ObjectUtil.isEmpty(workEntity.getPassword())){
+                    workEntity.setPassword(param.getPwd());
+                    workEntity.setIsPassword(1);
+                }
+                workService.update(workEntity);
+                //清理旧数据
+                List<ScenePanoEntity> list = scenePanoService.findByWorkId(workEntity.getId());
+                for (ScenePanoEntity scenePanoEntity : list) {
+                    scenePanoEntity.setIsDelete(1);
+                    scenePanoEntity.setUpdateTime(new Date());
+                    scenePanoService.update(scenePanoEntity);
+                }
+
+                String visionUrl = "http://4dkk.4dage.com/scene_view_data/"+param.getSceneCode()+"/images/vision.txt";
+                HttpResponse execute = HttpRequest.get(visionUrl+"?m="+System.currentTimeMillis()).execute();
+                JSONArray sweepLocations = new JSONArray();
+                if (execute.getStatus()==200){
+                    log.info("vision.txt存在: {}");
+                    JSONObject visJson = JSONObject.parseObject(execute.body());
+                    if(visJson.containsKey("sweepLocations")){
+                          sweepLocations = visJson.getJSONArray("sweepLocations");
+                    }
+                }
+
+                //2,使用krpano工具生成全景图数据
+                List<Map<String,Object>> scenes=new ArrayList<>();
+                for (int i = 0; i < sweepLocations.size(); i++) {
+                    JSONObject jsonObject = sweepLocations.getJSONObject(i);
+                    String uuid = jsonObject.getString("uuid");
+                    String id = jsonObject.getString("id");
+                    String ossKey="scene_view_data/"+param.getSceneCode()+"/images/panoramas/"+uuid+".jpg";
+                    Map<String,Object> scene=new HashMap<>();
+                    ScenePanoEntity scenePanoEntity = this.doSlice(traceId ,ossKey, param.getSceneCode(), workEntity.getId(),uuid+".jpg",uuid,id);
+                    //  "icon": "https://ossxiaoan.4dage.com/720yun_fd_manage/fd720_8nRkFlzpp/vtour/panos/fd720_8nRkFlzpp.tiles/thumb.jpg",
+                    //   "sceneCode": "fd720_8nRkFlzpp",
+                    // "sceneTitle": "0",
+                    //  "category": 1,
+                    //   "type": "pano",
+                    //  "id": "s_xId8vevp",
+                    scene.put("icon", scenePanoEntity.getIcon());
+                    scene.put("sceneCode", scenePanoEntity.getSceneCode());
+                    scene.put("sceneTitle", id);
+                    scene.put("category", 1);
+                    scene.put("type", "pano");
+                    //id生成规则是 s_ 拼接,随机8位字符串,字母加数字组合,有大小写
+                    String customId = generateCustomId();
+                    scene.put("id", customId);
+                    scenes.add(scene);
+                    if (i==0){
+                        workEntity.setIcon(scenePanoEntity.getIcon());
+                        workService.update(workEntity);
+                    }
+
+                }
+
+                log.info("场景切图完成组装json");
+                //3,修改json文件,并创建work作品表数据,增加作品类型为相机拍摄全景图
+                JSONObject someDataToJson= this.editSomeData(workEntity,scenes);
+
+
+                // 更新跟目录tour.xml 2022-09-15
+                this.updateTour(someDataToJson, workEntity.getId());
+
+                workEntity.setCalcStatus(1);
+                workService.update(workEntity);
+                sendEndMq(param);
+                channel.basicAck(deliveryTag, false);
+            }
+
+
+        }catch (Exception e){
+            e.printStackTrace();
+            channel.basicAck(deliveryTag, false);
+            log.error("场景sceneQueue报错{}",e.getMessage());
+        }
+    }
+    private void sendStartMq(SceneQueueDTO param) {
+            RelicsSceneInitQueueDTO relicsSceneInitQueueDTO = new RelicsSceneInitQueueDTO();
+            relicsSceneInitQueueDTO.setSceneCode(param.getSceneCode());
+            relicsSceneInitQueueDTO.setLocation(param.getLocation());
+            relicsSceneInitQueueDTO.setCreateTime(param.getCreateTime());
+            relicsSceneInitQueueDTO.setPhoneNum(param.getPhoneNum());
+            relicsSceneInitQueueDTO.setUserId(param.getUserId());
+            relicsSceneInitQueueDTO.setSnCode(param.getSnCode());
+            relicsSceneInitQueueDTO.setStatus(param.getStatus());
+            relicsSceneInitQueueDTO.setSceneName(param.getSceneName());
+            relicsSceneInitQueueDTO.setShootCount(param.getShootCount());
+            relicsSceneInitQueueDTO.setSceneSource(param.getSceneSource());
+            rabbitMqProducerUtil.sendByWorkQueue(relicsInitQueue, relicsSceneInitQueueDTO);
+    }
+    private void sendEndMq(SceneQueueDTO param) {
+            RelicsSceneInitQueueDTO relicsSceneInitQueueDTO = new RelicsSceneInitQueueDTO();
+            relicsSceneInitQueueDTO.setSceneCode(param.getSceneCode());
+            relicsSceneInitQueueDTO.setLocation(param.getLocation());
+            relicsSceneInitQueueDTO.setAlgorithmTime(param.getAlgorithmTime());
+            relicsSceneInitQueueDTO.setCreateTime(param.getCreateTime());
+            relicsSceneInitQueueDTO.setPhoneNum(param.getPhoneNum());
+            relicsSceneInitQueueDTO.setUserId(param.getUserId());
+            relicsSceneInitQueueDTO.setSnCode(param.getSnCode());
+            relicsSceneInitQueueDTO.setStatus(param.getStatus());
+            relicsSceneInitQueueDTO.setSceneName(param.getSceneName());
+            relicsSceneInitQueueDTO.setShootCount(param.getShootCount());
+            relicsSceneInitQueueDTO.setSceneSource(param.getSceneSource());
+            rabbitMqProducerUtil.sendByWorkQueue(relicsInitQueue, relicsSceneInitQueueDTO);
+    }
+
+    private static final String CHARACTERS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+
+    public static String generateRandomId() {
+        Random random = new Random();
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < 8; i++) {
+            int index = random.nextInt(CHARACTERS.length());
+            sb.append(CHARACTERS.charAt(index));
+        }
+        return sb.toString();
+    }
+
+    public static String generateCustomId() {
+        return "s_" + generateRandomId();
+    }
+    private ScenePanoEntity doSlice(String traceId, String item, String num, String workId, String imgName, String uuid, String id){
+        ScenePanoEntity entity=scenePanoService.findByWorkIdAndName(workId,imgName);
+        String sceneCode ="";
+        String newName = "";
+        String filePath = "";
+        if (ObjectUtil.isEmpty(entity)) {
+            //未生成
+            sceneCode = RandomUtils.getSceneCode("fd720_");
+            newName = sceneCode + ".jpg";
+            filePath = configConstant.serverBasePath + sceneCode+ "/" + newName;
+            aliyunOssUtil.downloadFile("4dkankan",item,filePath );
+            entity = new ScenePanoEntity();
+            entity.setFilePath(filePath);
+            entity.setFileName(FileUtil.getName(filePath));
+            entity.setSceneCode(sceneCode);
+            entity.setNum(num);
+            entity.setOssPath(item);
+            entity.setName(imgName);
+            entity.setWorkId(workId);
+            entity.setVisid(id);
+            entity.setUuid(uuid);
+            long size = FileUtil.size(new File(filePath));
+            size = size / 1024;
+            log.info("fileSize: " + size);
+            entity.setFileSize(size + "");
+
+            scenePanoService.save(entity);
+        }else {
+            entity.setStatus(0);
+
+            filePath = entity.getFilePath();
+            sceneCode = entity.getSceneCode();
+            boolean exist = FileUtil.exist(filePath);
+            if (exist){
+                FileUtil.del(filePath);
+            }
+            if (filePath.endsWith(".jpg")){
+                String parent = FileUtil.getParent(filePath, 1);
+                FileUtil.del(parent);
+            }
+
+
+            log.info("生成过,重新下载");
+            aliyunOssUtil.downloadFile("4dkankan",item,filePath );
+            log.info("下载完成重新切图");
+            long size = FileUtil.size(new File(filePath));
+            size = size / 1024;
+            log.info("fileSize: " + size);
+            entity.setFileSize(size + "");
+            scenePanoService.update(entity);
+
+        }
+
+
+        log.info("切图流程开始 : " + filePath);
+        long start = System.currentTimeMillis();
+
+        String cmd = CmdConstant.PANO_KRPANO + filePath;
+        // 超时处理机制
+        final ExecutorService exec = Executors.newFixedThreadPool(1);
+        Callable<String> call = new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                MDC.put("TRACE_ID", traceId);
+                CmdUtils.callLine(cmd, 200);
+                long end = System.currentTimeMillis();
+                log.info("切图完成耗时: {} s" ,(end-start)/1000);
+                return "执行完成";
+            }
+        };
+        // 超时回调
+        Future<String> future = exec.submit(call);
+        try {
+            String obj = future.get(20, TimeUnit.MINUTES); //任务处理超时时间设为 3分钟
+            entity.setStatus(3);
+            String tourXmlScene = this.getTourXmlScene(sceneCode);
+            entity.setTour(tourXmlScene);
+            // 上传切图
+            this.uploadOss(sceneCode);
+            String ossUrl = configConstant.ossDomain + configConstant.ossBasePath + sceneCode+"/vtour/panos/"+sceneCode+".tiles/thumb.jpg";
+            log.info("切图预览图ossUrl: {}",ossUrl);
+            entity.setIcon(ossUrl);
+            log.info("任务成功返回: " + obj);
+
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+            entity.setStatus(2);
+            StringWriter trace=new StringWriter();
+            log.error(trace.toString());
+            log.error("异常了 InterruptedException");
+        } catch (ExecutionException | BaseRuntimeException e) {
+            e.printStackTrace();
+            StringWriter trace=new StringWriter();
+            e.printStackTrace(new PrintWriter(trace));
+            log.error("超时了 1");
+            // 异常日志要打印,不然不会出现在日志文件中,只会出现在控制台
+            log.error(trace.toString());
+            entity.setStatus(2);
+            future.cancel(true);
+        } catch (TimeoutException e) {
+            e.printStackTrace();
+            StringWriter trace=new StringWriter();
+            e.printStackTrace(new PrintWriter(trace));
+            log.error("超时了 2");
+            log.error(trace.toString());
+            entity.setStatus(2);
+            future.cancel(true);
+        } finally {
+            scenePanoService.update(entity);
+            log.info("切图流程, 更新数据库完成 : ");
+        }
+        log.info("切图流程结束 : ");
+        return entity;
+    }
+
+    /**
+     * 更新 tour.xml
+     * @param someDataToJson
+     * @param id
+     */
+    private void updateTour(JSONObject someDataToJson, String id) {
+        long startTime = System.currentTimeMillis();
+        String scenes = someDataToJson.getString("scenes");
+        BaseRuntimeException.isBlank(scenes, null, "someData的场景码参数未空");
+        List<ScenePanoEntity> list = scenePanoService.findByWorkId(id);
+
+        // 读取tour.xml模板
+        String baseTour = getBaseTour();
+        StringBuilder builder = new StringBuilder();
+        builder.append(baseTour).append("\r\n");
+        for (ScenePanoEntity entity : list) {
+            String tour = entity.getTour();
+            builder.append(tour).append("\r\n");
+        }
+
+        // 添加结束标签
+        builder.append("</krpano>");
+
+        String tourPath = configConstant.serverBasePath + id + "/tour.xml";
+        FileUtil.writeUtf8String(builder.toString(), tourPath);
+        log.info("作品tour.xml写入完成");
+
+        String ossKeyPath = configConstant.ossBasePath + id + "/tour.xml";
+        fileAndOssUtil.upload(tourPath, ossKeyPath);
+        log.info("tour.xml上传完成 : {}", ossKeyPath);
+    }
+
+    private String getBaseTour(){
+        String baseTourPath = configConstant.serverBasePath + "baseData/tour.xml";
+        String s = FileUtil.readString(baseTourPath, "utf-8");
+        // 结束标签置空, 方便操作
+        s = s.replace("</krpano>", "");
+        return s;
+    }
+
+    // 获取切图后的tour.xml
+    private String getTourXmlScene(String code) {
+        log.info("处理tour.xml");
+        String tourPath = configConstant.serverBasePath + code + "/vtour/tour.xml";
+        log.info("tourPath: {}", tourPath);
+        BaseRuntimeException.isTrue(!FileUtil.isFile(tourPath), null, code + "_tour.xml文件不存在");
+
+        String tour = FileUtil.readUtf8String(tourPath);
+        tour = this.extractSceneTag(tour);
+        String trim = StrUtil.trim(tour);
+        // log.info("trim: {}", trim);
+        BaseRuntimeException.isTrue(StrUtil.isAllBlank(trim), null, code + "_tour.xml文件不存在");
+
+        // 2022-09-15 加入相对路径
+        String basePath = "%CURRENTXML%../" + code + "/vtour/panos/";
+        trim = trim.replaceAll("panos/", basePath);
+
+        return trim;
+    }
+    public static String extractSceneTag(String xmlString) {
+        Pattern pattern = Pattern.compile("<scene.*?</scene>", Pattern.DOTALL);
+        Matcher matcher = pattern.matcher(xmlString);
+
+        if (matcher.find()) {
+            return matcher.group();
+        }
+
+        return "";
+    }
+    private void uploadOss(String sceneCode) {
+        long start = System.currentTimeMillis();
+        String filePath = "/mnt/720yun_fd_manage_data/" + sceneCode;
+        String ossKey = "/720yun_fd_manage/" + sceneCode;
+        fileAndOssUtil.uploadBySh(filePath, ossKey);
+        long end = System.currentTimeMillis();
+        log.info("切图上传完成, 耗时:{} s" , (end-start)/1000 );
+    }
+
+
+    private JSONObject editSomeData(WorkEntity workEntity, List<Map<String, Object>> scenes){
+        // 如基someData作出修改,记得把代码里的someData 跟服务器里的someData都修改
+        String baseSomeDataPath = configConstant.serverBasePath + "baseData/someData.json";
+        String baseSomeDataSceneDataPath = configConstant.serverBasePath + "baseData/someDataSceneData.json";
+        log.info("服务器base someData.json path: {}", baseSomeDataPath);
+        // someData.json 内容
+        String content = null;
+        if (FileUtil.isFile(baseSomeDataPath)) {
+            log.info("使用服务器someData.json");
+            content = FileUtil.readUtf8String(baseSomeDataPath);
+        } else {
+            // 获取文件内容
+            log.info("创建someData.json");
+            content = FileUtils.getResourceContent("data/someData.json");
+            FileUtil.writeUtf8String(content, baseSomeDataPath);
+        }
+        String someDataSceneDatContent = null;
+        if (FileUtil.isFile(baseSomeDataSceneDataPath)) {
+            log.info("使用服务器SomeDataSceneData.json");
+            someDataSceneDatContent = FileUtil.readUtf8String(baseSomeDataSceneDataPath);
+        } else {
+            // 获取文件内容
+            log.info("创建SomeDataSceneData.json");
+            someDataSceneDatContent = FileUtils.getResourceContent("data/someDataSceneData.json");
+            FileUtil.writeUtf8String(someDataSceneDatContent, baseSomeDataSceneDataPath);
+        }
+
+
+        JSONObject jsonObject = JSONObject.parseObject(content);
+        jsonObject.put("id", workEntity.getId() + "");
+
+
+        // 创建二维码、二维码url
+        String shareUrl = configConstant.domain4dKK + "/panorama/showMobile.html?id=" + workEntity.getId();
+        String qrCode = qrCodeUtils.generateLogoQrCode(shareUrl, configConstant.serverBasePath, configConstant.ossBasePath, configConstant.ossDomain, workEntity.getId());
+        jsonObject.put("share", shareUrl);
+        jsonObject.put("qrCode", qrCode);
+        jsonObject.put("icon",workEntity.getIcon());
+        jsonObject.put("name",workEntity.getName());
+        if (ObjectUtil.isNotEmpty(workEntity.getPassword())){
+            jsonObject.put("password", workEntity.getPassword());
+        }
+
+        String ossKeyPath = configConstant.ossBasePath + workEntity.getId() + "/someData.json";
+        workEntity.setQrCode(qrCode);
+        workEntity.setShare(shareUrl);
+        workService.update(workEntity);
+
+        JSONArray scenesJson = new JSONArray();
+        for (Map<String, Object> scene : scenes) {
+            JSONObject SomeDataSceneDataJsonObject = JSONObject.parseObject(someDataSceneDatContent);
+            SomeDataSceneDataJsonObject.putAll(scene);
+            scenesJson.add(JSON.toJSON(SomeDataSceneDataJsonObject));
+        }
+        jsonObject.remove("scenes");
+        jsonObject.put("scenes",JSON.toJSON(scenesJson));
+
+        try {
+            fileAndOssUtil.upload(jsonObject.toJSONString().getBytes(), ossKeyPath);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        String ossUrl = configConstant.ossDomain + ossKeyPath;
+        log.info("ossSomeData:{}", ossUrl);
+        return jsonObject;
+    }
+
+
+    public static void main(String[] args) {
+        List<String> list=new ArrayList<>();
+        list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/0.jpg");
+        list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/1.jpg");
+        list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/3.jpg");
+        list.add("scene_view_data/KJ-t-QPqp92mGf1c/images/pan/high/4.jpg");
+        //循环只打印文件是偶数的图片
+
+    }
+}

+ 17 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/IBaseStrMapper.java

@@ -0,0 +1,17 @@
+package com.gis.mapper;
+
+import com.gis.entity.BaseStrEntity;
+import tk.mybatis.mapper.common.BaseMapper;
+import tk.mybatis.mapper.common.ConditionMapper;
+import tk.mybatis.mapper.common.IdsMapper;
+import tk.mybatis.mapper.common.special.InsertListMapper;
+
+import java.io.Serializable;
+
+/**
+ * Created by owen on 2020/2/18 0018 11:27
+ */
+
+public interface IBaseStrMapper<T extends BaseStrEntity, ID extends Serializable> extends BaseMapper<T>,
+        ConditionMapper<T>, IdsMapper<T>, InsertListMapper<T> {
+}

+ 14 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/ScenePanoMapper.java

@@ -0,0 +1,14 @@
+package com.gis.mapper;
+
+import com.gis.entity.ScenePanoEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* 四维看看场景全景图表 Mapper
+*
+* @author Xiewj
+* @since 2024-04-03 18:01
+*/
+@Mapper
+public interface ScenePanoMapper extends IBaseMapper<ScenePanoEntity,Long> {
+}

+ 42 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mapper/WorkMapper.java

@@ -0,0 +1,42 @@
+package com.gis.mapper;
+
+
+import com.gis.entity.WorkEntity;
+import org.apache.ibatis.annotations.*;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+
+@Component
+@Mapper
+public interface WorkMapper extends IBaseStrMapper<WorkEntity, String> {
+
+
+    @Update("UPDATE tb_work SET visit= visit + 1 where id = #{id}")
+    void addVisit(String id);
+
+    @Select("select id, name, scene_codes from tb_work where is_delete = 0 and user_id = #{userId} and scene_codes like #{sceneCode}")
+    List<WorkEntity> likeSceneCode(String sceneCode, String userId);
+    /**
+     * for update 锁表更新完,才能进行更新,需要开启事务
+     * 并发量大作会出现脏数据
+     *
+     * @param id
+     * @return
+     */
+    @Select("select id, name, scene_codes, user_id from tb_work where is_delete = 0 and id = #{id} for update")
+    WorkEntity findByIdForUpdate(String id);
+
+    /***
+     * 2022-3-18
+     * 真删除无效时数据
+     * @param now
+     */
+    @Delete("delete from tb_work where is_delete=0 and status=0 and DATE_FORMAT( create_time, '%Y%m' ) <= DATE_FORMAT(#{now} , '%Y%m' )")
+    void delByTime(String now);
+
+
+    @Select("select id from tb_work where is_delete=0 and status=#{status}")
+    List<String> getIdByStatus(int status);
+}

+ 81 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/mq/RabbitMqProducerUtil.java

@@ -0,0 +1,81 @@
+package com.gis.mq;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rabbitmq.client.AMQP.Queue.DeclareOk;
+import com.rabbitmq.client.Channel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.amqp.rabbit.connection.CorrelationData;
+import org.springframework.amqp.rabbit.core.ChannelCallback;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.UUID;
+
+/**
+ * <p>
+ * TODO
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2022/4/19
+ **/
+@Component
+public class RabbitMqProducerUtil {
+
+    private Logger log = LoggerFactory.getLogger(this.getClass().getName());
+
+
+    @Autowired
+    private RabbitTemplate rabbitTemplate;
+
+    /**
+     * 工作队列模式发送消息
+     * @param queue 队列名
+     * @param content 载荷
+     */
+    public void sendByWorkQueue(String queue, Object content){
+        String messageId = UUID.randomUUID().toString();
+        String jsonObject = JSONObject.toJSONString(content);
+        log.info("开始发送Mq消息,messageId:{},消息队列:{},消息内容:{}",messageId, queue,jsonObject);
+        rabbitTemplate.convertAndSend(queue, jsonObject, message -> {
+            message.getMessageProperties().setMessageId(messageId);
+            return message;
+        }, new CorrelationData(messageId));
+    }
+
+    /**
+     * 工作队列模式发送带优先级消息
+     * @param queue 队列名
+     * @param content 载荷
+     * @param priority 优先级,正整数,值越大优先级越高,当值大于队列设置的最大优先级时,效果等同于最大优先级
+     */
+    public void sendByWorkQueue(String queue, Object content, Integer priority){
+        String messageId = UUID.randomUUID().toString();
+        String jsonObject = JSONObject.toJSONString(content);
+        log.info("开始发送Mq消息,messageId:{},消息队列:{},消息内容:{}",messageId, queue, jsonObject);
+        rabbitTemplate.convertAndSend(queue, content, message -> {
+            message.getMessageProperties().setMessageId(messageId);
+            message.getMessageProperties().setPriority(priority);
+            return message;
+        }, new CorrelationData(messageId));
+    }
+
+    /**
+     * 获取队列未被消费的消息数量
+     * @return
+     */
+    public int getMessageCount(String queueName) {
+        DeclareOk declareOk = rabbitTemplate.execute(new ChannelCallback<DeclareOk>() {
+            public DeclareOk doInRabbit(Channel channel) throws Exception {
+                return channel.queueDeclarePassive(queueName);
+            }
+        });
+
+        return declareOk.getMessageCount();
+    }
+
+
+
+}

+ 52 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/IBaseService.java

@@ -0,0 +1,52 @@
+package com.gis.service;
+
+import com.github.pagehelper.PageInfo;
+import tk.mybatis.mapper.entity.Condition;
+
+import java.io.Serializable;
+import java.util.List;
+
+public interface IBaseService<T, ID extends Serializable> {
+
+    public abstract T findById(ID id);
+
+    public abstract T findOne(T entity);
+
+    public abstract List<T> findByIds(String ids);
+
+    public abstract long count();
+
+    public abstract boolean exists(ID id);
+
+    public abstract int save(T entity);
+
+    public abstract int update(T entity);
+
+    public abstract int updateAll(T entity);
+
+    public abstract int deleteById(ID id);
+
+    public abstract int deleteByIds(String ids);
+
+    public abstract int delete(T entity);
+
+    public abstract List<T> findAll(Condition condition, String orderBy);
+
+    public abstract List<T> findAll(Condition condition);
+
+    public abstract List<T> findAll();
+
+    public abstract PageInfo<T> findAll(int pageNum, int pageSize);
+
+    public abstract PageInfo<T> findAll(int pageNum, int pageSize, String orderBy);
+
+    public abstract PageInfo<T> findAll(Condition condition, int pageNum, int pageSize);
+
+    public abstract PageInfo<T> findAll(Condition condition, int pageNum, int pageSize, String orderBy);
+
+
+    public abstract String getUserNameForToken();
+
+
+
+}

+ 53 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/IBaseStrService.java

@@ -0,0 +1,53 @@
+package com.gis.service;
+
+import com.github.pagehelper.PageInfo;
+import tk.mybatis.mapper.entity.Condition;
+
+import java.io.Serializable;
+import java.util.List;
+
+public interface IBaseStrService<T, ID extends Serializable> {
+
+    public abstract T findById(ID id);
+
+    public abstract T findOne(T entity);
+
+    public abstract List<T> findByIds(String ids);
+
+    public abstract long count();
+
+    public abstract boolean exists(ID id);
+
+    public abstract int save(T entity);
+    public abstract int save2(T entity);
+
+    public abstract int update(T entity);
+
+    public abstract int updateAll(T entity);
+
+    public abstract int deleteById(ID id);
+
+    public abstract int deleteByIds(String ids);
+
+    public abstract int delete(T entity);
+
+    public abstract List<T> findAll(Condition condition, String orderBy);
+
+    public abstract List<T> findAll(Condition condition);
+
+    public abstract List<T> findAll();
+
+    public abstract PageInfo<T> findAll(int pageNum, int pageSize);
+
+    public abstract PageInfo<T> findAll(int pageNum, int pageSize, String orderBy);
+
+    public abstract PageInfo<T> findAll(Condition condition, int pageNum, int pageSize);
+
+    public abstract PageInfo<T> findAll(Condition condition, int pageNum, int pageSize, String orderBy);
+
+
+    public abstract String getUserNameForToken();
+
+
+
+}

+ 18 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/ScenePanoService.java

@@ -0,0 +1,18 @@
+package com.gis.service;
+
+
+import com.gis.entity.ScenePanoEntity;
+
+import java.util.List;
+
+/**
+ * 四维看看场景全景图表 服务类接口
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+public interface ScenePanoService extends IBaseService<ScenePanoEntity,Long> {
+
+    ScenePanoEntity findByWorkIdAndName(String workId, String imgName);
+    List<ScenePanoEntity> findByWorkId(String workId);
+}

+ 16 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/WorkService.java

@@ -0,0 +1,16 @@
+package com.gis.service;
+
+
+import com.gis.entity.SceneQueueDTO;
+import com.gis.entity.WorkEntity;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:14
+ */
+public interface WorkService extends IBaseService<WorkEntity, String>{
+
+    WorkEntity entityAdd(SceneQueueDTO sceneQueueDTO);
+    WorkEntity findByNum(String num);
+
+}

+ 21 - 6
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -2,6 +2,7 @@ package com.gis.service.impl;
 
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.StrUtil;
+import cn.hutool.core.util.XmlUtil;
 import com.gis.constant.CmdConstant;
 import com.gis.constant.ConfigConstant;
 import com.gis.entity.FodderEntity;
@@ -10,15 +11,19 @@ import com.gis.mapper.FodderMapper;
 import com.gis.oss.util.FileAndOssUtil;
 import com.gis.service.FodderService;
 import com.gis.util.CmdUtils;
+import com.gis.util.FileUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.io.File;
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.Date;
 import java.util.concurrent.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * Created by owen on 2022/7/27 0027 16:55
@@ -41,11 +46,9 @@ public class FodderServiceImpl implements FodderService {
         log.info("处理tour.xml");
         String tourPath = configConstant.serverBasePath + code + "/vtour/tour.xml";
         log.info("tourPath: {}", tourPath);
-        BaseRuntimeException.isTrue(!FileUtil.isFile(tourPath), null, code + "_tour.xml文件不存在");
-
-        String tour = FileUtil.readString(tourPath, "utf-8");
-        tour = StrUtil.subAfter(tour, "</action>", true);
-        tour = StrUtil.subBefore(tour, "</krpano>", true);
+        BaseRuntimeException.isTrue(!FileUtils.checkFileExtend(tourPath, 10), null, code + "_tour.xml文件不存在");
+        String tour = FileUtil.readUtf8String(tourPath);
+        tour = this.extractSceneTag(tour);
         String trim = StrUtil.trim(tour);
         // log.info("trim: {}", trim);
         BaseRuntimeException.isTrue(StrUtil.isAllBlank(trim), null, code + "_tour.xml文件不存在");
@@ -56,7 +59,16 @@ public class FodderServiceImpl implements FodderService {
 
         return trim;
     }
+    public static String extractSceneTag(String xmlString) {
+        Pattern pattern = Pattern.compile("<scene.*?</scene>", Pattern.DOTALL);
+        Matcher matcher = pattern.matcher(xmlString);
+
+        if (matcher.find()) {
+            return matcher.group();
+        }
 
+        return "";
+    }
     // 上传切图到oss
 //    private void uploadOss(String sceneCode) {
 //        String cmd = CmdConstant.OSSUTIL_UPLOAD_DIR;
@@ -97,7 +109,10 @@ public class FodderServiceImpl implements FodderService {
         String panoPath = entity.getFilePath();
         String sceneCode = entity.getSceneCode();
         String cmd = CmdConstant.PANO_KRPANO + panoPath;
-
+        if (panoPath.endsWith(".jpg")){
+            String parent = FileUtil.getParent(panoPath, 1);
+            FileUtil.del(parent+ File.separator + "vtour");
+        }
 
         // 超时处理机制
         final ExecutorService exec = Executors.newFixedThreadPool(1);

+ 185 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/IBaseServiceImpl.java

@@ -0,0 +1,185 @@
+package com.gis.service.impl;
+
+import com.gis.constant.ConfigConstant;
+import com.gis.entity.BaseEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.service.IBaseService;
+import com.gis.util.JwtUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+import tk.mybatis.mapper.entity.Condition;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
+import java.lang.reflect.ParameterizedType;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by owen on 2020/2/18 0018 11:22
+ */
+@Transactional
+public abstract class IBaseServiceImpl<T extends BaseEntity, ID extends Serializable> implements IBaseService<T, ID> {
+
+    @Autowired
+    public ConfigConstant configConstant;
+
+    @Autowired
+    protected HttpServletRequest request;
+
+    public abstract IBaseMapper<T, ID> getBaseMapper();
+
+    private Class<T> entityClass;
+
+    public IBaseServiceImpl(){
+        ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();
+        entityClass = (Class<T>) pt.getActualTypeArguments()[0];
+    }
+
+    @Override
+    public T findById(ID id){
+        Condition condition = new Condition(entityClass);
+        condition.createCriteria().andEqualTo("id", id);
+        condition.and().andEqualTo("isDelete", 0);
+        List<T> ts = getBaseMapper().selectByCondition(condition);
+        if (ts != null && ts.size() > 0){
+            return ts.get(0);
+        }else{
+            return null;
+        }
+    }
+
+    @Override
+    public T findOne(T entity){
+        entity.setIsDelete(0);
+        return getBaseMapper().selectOne(entity);
+    }
+
+    @Override
+    public List<T> findAll(){
+        Condition condition = new Condition(entityClass);
+        condition.createCriteria().andEqualTo("isDelete", 0);
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    /**
+     * 根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
+     *
+     * @param ids 如 "1,2,3,4"
+     * @return
+     */
+    @Override
+    public List<T> findByIds(String ids){
+        return getBaseMapper().selectByIds(ids);
+    }
+
+    @Override
+    public long count(){
+        List<T> all = this.findAll();
+        if (all != null && all.size() > 0){
+            return all.size();
+        }
+        return 0;
+    }
+
+    @Override
+    public boolean exists(ID id){
+        return getBaseMapper().existsWithPrimaryKey(id);
+    }
+
+    @Override
+    public int save(T entity) {
+        //migration之后要删掉判断
+            entity.setCreateTime(new Date());
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().insertSelective(entity);
+    }
+
+    @Override
+    public int update(T entity) {
+        //migration之后要删掉判断
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().updateByPrimaryKeySelective(entity);
+    }
+
+    @Override
+    public int updateAll(T entity) {
+        //migration之后要删掉判断
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().updateByPrimaryKey(entity);
+    }
+
+    @Override
+    public int deleteById(ID id) {
+        return getBaseMapper().deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public int deleteByIds(String ids){
+        return getBaseMapper().deleteByIds(ids);
+    }
+
+    @Override
+    public int delete(T entity){
+        return getBaseMapper().delete(entity);
+    }
+
+    public List<T> findAll(Condition condition){
+        condition.and().andEqualTo("isDelete", 0);
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    public List<T> findAll(Condition condition, String orderBy){
+        condition.and().andEqualTo("isDelete", 0);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    public PageInfo<T> findAll(int pageNum, int pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        return new PageInfo<>(this.findAll());
+    }
+
+    public PageInfo<T> findAll(int pageNum, int pageSize, String orderBy){
+        PageHelper.startPage(pageNum, pageSize);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return new PageInfo<>(this.findAll());
+    }
+
+    public PageInfo<T> findAll(Condition condition, int pageNum, int pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        return new PageInfo<>(this.findAll(condition));
+    }
+
+    public PageInfo<T> findAll(Condition condition, int pageNum, int pageSize, String orderBy){
+        PageHelper.startPage(pageNum, pageSize);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return new PageInfo<>(this.findAll(condition));
+    }
+
+
+
+
+    public String getUserNameForToken(){
+        /** 获取header token */
+        String token = request.getHeader("token");
+        if (org.apache.commons.lang3.StringUtils.isNotBlank(token)){
+            return JwtUtil.getUsername(token);
+        }
+        return null;
+    }
+
+    public String getToken(){
+        /** 获取header token */
+        return request.getHeader("token");
+    }
+}

+ 196 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/IBaseStrServiceImpl.java

@@ -0,0 +1,196 @@
+package com.gis.service.impl;
+
+import cn.hutool.core.util.StrUtil;
+import com.gis.constant.ConfigConstant;
+import com.gis.entity.BaseStrEntity;
+import com.gis.mapper.IBaseStrMapper;
+import com.gis.service.IBaseStrService;
+import com.gis.util.JwtUtil;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
+import tk.mybatis.mapper.entity.Condition;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
+import java.lang.reflect.ParameterizedType;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by owen on 2020/2/18 0018 11:22
+ */
+@Transactional
+public abstract class IBaseStrServiceImpl<T extends BaseStrEntity, ID extends Serializable> implements IBaseStrService<T, ID> {
+
+    @Autowired
+    public ConfigConstant configConstant;
+
+    @Autowired
+    protected HttpServletRequest request;
+
+    public abstract IBaseStrMapper<T, ID> getBaseMapper();
+
+    private Class<T> entityClass;
+
+    public IBaseStrServiceImpl(){
+        ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();
+        entityClass = (Class<T>) pt.getActualTypeArguments()[0];
+    }
+
+    @Override
+    public T findById(ID id){
+        Condition condition = new Condition(entityClass);
+        condition.createCriteria().andEqualTo("id", id);
+        condition.and().andEqualTo("isDelete", 0);
+        List<T> ts = getBaseMapper().selectByCondition(condition);
+        if (ts != null && ts.size() > 0){
+            return ts.get(0);
+        }else{
+            return null;
+        }
+    }
+
+    @Override
+    public T findOne(T entity){
+        entity.setIsDelete(0);
+        return getBaseMapper().selectOne(entity);
+    }
+
+    @Override
+    public List<T> findAll(){
+        Condition condition = new Condition(entityClass);
+        condition.createCriteria().andEqualTo("isDelete", 0);
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    /**
+     * 根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
+     *
+     * @param ids 如 "1,2,3,4"
+     * @return
+     */
+    @Override
+    public List<T> findByIds(String ids){
+        return getBaseMapper().selectByIds(ids);
+    }
+
+    @Override
+    public long count(){
+        List<T> all = this.findAll();
+        if (all != null && all.size() > 0){
+            return all.size();
+        }
+        return 0;
+    }
+
+    @Override
+    public boolean exists(ID id){
+        return getBaseMapper().existsWithPrimaryKey(id);
+    }
+
+    @Override
+    public int save(T entity) {
+        //migration之后要删掉判断
+            entity.setCreateTime(new Date());
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().insertSelective(entity);
+    }
+    public int save2(T entity) {
+        //migration之后要删掉判断
+        return getBaseMapper().insertSelective(entity);
+    }
+    @Override
+    public int update(T entity) {
+        //migration之后要删掉判断
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().updateByPrimaryKeySelective(entity);
+    }
+
+    @Override
+    public int updateAll(T entity) {
+        //migration之后要删掉判断
+            entity.setUpdateTime(new Date());
+        return getBaseMapper().updateByPrimaryKey(entity);
+    }
+
+    @Override
+    public int deleteById(ID id) {
+        return getBaseMapper().deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public int deleteByIds(String ids){
+        return getBaseMapper().deleteByIds(ids);
+    }
+
+    @Override
+    public int delete(T entity){
+        return getBaseMapper().delete(entity);
+    }
+
+    public List<T> findAll(Condition condition){
+        condition.and().andEqualTo("isDelete", 0);
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    public List<T> findAll(Condition condition, String orderBy){
+        condition.and().andEqualTo("isDelete", 0);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return getBaseMapper().selectByCondition(condition);
+    }
+
+    public PageInfo<T> findAll(int pageNum, int pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        return new PageInfo<>(this.findAll());
+    }
+
+    public PageInfo<T> findAll(int pageNum, int pageSize, String orderBy){
+        PageHelper.startPage(pageNum, pageSize);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return new PageInfo<>(this.findAll());
+    }
+
+    public PageInfo<T> findAll(Condition condition, int pageNum, int pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        return new PageInfo<>(this.findAll(condition));
+    }
+
+    public PageInfo<T> findAll(Condition condition, int pageNum, int pageSize, String orderBy){
+        PageHelper.startPage(pageNum, pageSize);
+        if (!StringUtils.isEmpty(orderBy)){
+            PageHelper.orderBy(orderBy);
+        }
+        return new PageInfo<>(this.findAll(condition));
+    }
+
+
+
+
+    public String getUserNameForToken(){
+        /** 获取header token */
+        String token = request.getHeader("token");
+        if (org.apache.commons.lang3.StringUtils.isNotBlank(token)){
+            return JwtUtil.getUsername(token);
+        }
+        return null;
+    }
+
+    public String getToken(){
+        /** 获取header token */
+        return request.getHeader("token");
+    }
+
+    public Integer getIsAdmin(){
+        if (StrUtil.isBlank(getToken())){
+            return null;
+        }
+        return JwtUtil.getIsAdmin(getToken());
+    }
+}

+ 45 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/ScenePanoServiceImpl.java

@@ -0,0 +1,45 @@
+package com.gis.service.impl;
+
+import com.gis.entity.ScenePanoEntity;
+import com.gis.mapper.IBaseMapper;
+import com.gis.mapper.ScenePanoMapper;
+import com.gis.service.ScenePanoService;
+import com.gis.service.impl.IBaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 四维看看场景全景图表 服务实现类
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+@Service
+public class ScenePanoServiceImpl extends IBaseServiceImpl<ScenePanoEntity, Long> implements ScenePanoService {
+    @Autowired
+
+    private ScenePanoMapper scenePanoMapper;
+    @Override
+    public IBaseMapper<ScenePanoEntity, Long> getBaseMapper() {
+        return this.scenePanoMapper;
+    }
+
+    @Override
+    public ScenePanoEntity findByWorkIdAndName(String workId, String imgName) {
+        ScenePanoEntity one=new ScenePanoEntity();
+        one.setWorkId(workId);
+        one.setName(imgName);
+        one.setIsDelete(0);
+        return getBaseMapper().selectOne(one);
+    }
+
+    @Override
+    public List<ScenePanoEntity> findByWorkId(String workId) {
+        ScenePanoEntity one=new ScenePanoEntity();
+        one.setWorkId(workId);
+        one.setIsDelete(0);
+        return getBaseMapper().select(one);
+    }
+}

+ 78 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -0,0 +1,78 @@
+package com.gis.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.gis.constant.ConfigConstant;
+import com.gis.entity.SceneQueueDTO;
+import com.gis.entity.WorkEntity;
+import com.gis.mapper.IBaseStrMapper;
+import com.gis.mapper.WorkMapper;
+import com.gis.oss.util.FileAndOssUtil;
+import com.gis.service.WorkService;
+import com.gis.util.QrCodeUtils;
+import com.gis.util.SnowFlakeUUidUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+
+
+/**
+ * Created by owen on 2020/3/11 0011 16:16
+ */
+@Slf4j
+@Service
+public class WorkServiceImpl extends IBaseStrServiceImpl<WorkEntity, String> implements WorkService {
+    @Autowired
+    ConfigConstant configConstant;
+
+    @Autowired
+    private WorkMapper entityMapper;
+    @Autowired
+    FileAndOssUtil fileAndOssUtil;
+    @Autowired
+    QrCodeUtils qrCodeUtils;
+
+    @Override
+    public WorkEntity findByNum(String num) {
+        WorkEntity one=new WorkEntity();
+        one.setNum(num);
+        return getBaseMapper().selectOne(one);
+    }
+
+    @Override
+    public WorkEntity entityAdd(SceneQueueDTO sceneQueueDTO) {
+
+        WorkEntity entity = new WorkEntity();
+        entity.setId(SnowFlakeUUidUtils.getUuid("WK"));
+        entity.setUserId(sceneQueueDTO.getPhoneNum());
+        entity.setStatus(1);
+        Date date = new Date();
+        entity.setCreateTime(date);
+        entity.setUpdateTime(date);
+        entity.setCalcStatus(sceneQueueDTO.getStatus());
+        entity.setNum(sceneQueueDTO.getSceneCode());
+        entity.setType("pro");
+        entity.setName(sceneQueueDTO.getSceneName());
+        entity.setSnCode(sceneQueueDTO.getSnCode());
+        entity.setLocation(sceneQueueDTO.getLocation());
+        entity.setSceneSource(sceneQueueDTO.getSceneSource());
+        if (ObjectUtil.isNotEmpty(sceneQueueDTO.getPwd())){
+            entity.setPassword(sceneQueueDTO.getPwd());
+            entity.setIsPassword(1);
+        }
+        entity.setCreateTime(sceneQueueDTO.getCreateTime());
+        entity.setUpdateTime(sceneQueueDTO.getCreateTime());
+        this.save2(entity);
+        String id = entity.getId();
+        log.info("创建对象完成: {}", id);
+
+        return entity;
+    }
+
+    @Override
+    public IBaseStrMapper<WorkEntity, String> getBaseMapper() {
+        return this.entityMapper;
+    }
+
+}

+ 55 - 3
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/FileUtils.java

@@ -4,11 +4,12 @@ import cn.hutool.core.io.FileUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.junit.Test;
+import org.springframework.core.io.ClassPathResource;
 import org.springframework.stereotype.Component;
 
-import java.io.File;
-import java.io.IOException;
+import java.io.*;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -75,5 +76,56 @@ public class FileUtils {
         }
     }
 
+    // jar包运行,只能用文件流的形式获取文件
+    public static InputStream getResource(String path){
+        ClassPathResource classPathResource = new ClassPathResource(path);
+        InputStream inputStream = null;
+        try {
+            inputStream = classPathResource.getInputStream();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return inputStream;
+    }
+    /**
+     * 读取资源文内容
+     * @param resourcePath : data/someData.json
+     * @return
+     */
+    public static String getResourceContent(String resourcePath){
+        InputStream resource = FileUtils.getResource(resourcePath);
+        StringBuilder sb = new StringBuilder();
+        String line;
+        String str = null ;
+        BufferedReader br = new BufferedReader(new InputStreamReader(resource));
+        while (true) {
+            try {
+                if ((line = br.readLine()) == null) break;
+                sb.append(line);
+                str = sb.toString();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return str;
+    }
 
-}
+    public static boolean checkFileExtend(final String file,int count){
+        int i=0;
+        while (i<=count){
+            final boolean exist = FileUtil.exist(file);
+            log.info("文件={},第-{}-次检测,检测结果={}",file,i,exist);
+            if (!exist&&i==count){
+                return false;
+            }else if (exist){
+                return true;
+            }
+            i++;
+            try {
+                Thread.sleep(5000);
+            } catch (final InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        }
+        return false;
+    }}

+ 286 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/JwtUtil.java

@@ -0,0 +1,286 @@
+package com.gis.util;
+
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.interfaces.Claim;
+import com.auth0.jwt.interfaces.DecodedJWT;
+import com.gis.exception.BaseRuntimeException;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.JwtBuilder;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import lombok.extern.log4j.Log4j2;
+import org.junit.Test;
+import org.springframework.util.Assert;
+
+import java.util.*;
+
+@Log4j2
+public class JwtUtil {
+
+    //生成签名的时候使用的秘钥secret
+    private static final String SECRET = "XX#$%()(#*!()!KL<><MQLMNQNQJQK&sdfkjsdrow32234545fdf>?N<:{LWPW";
+
+    /**
+     * 用户登录成功后生成Jwt
+     * 使用Hs256算法  私匙使用用户密码
+     *
+     * @param ttlMillis jwt过期时间
+     * @param userName  用户名
+     * @return
+     */
+    public static String createJWT(long ttlMillis, String userName) {
+        //指定签名的时候使用的签名算法,也就是header那部分,jjwt已经将这部分内容封装好了。
+        SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
+
+        //生成JWT的时间
+        long nowMillis = System.currentTimeMillis();
+        Date now = new Date(nowMillis);
+
+        //创建payload的私有声明(根据特定的业务需要添加,如果要拿这个做验证,一般是需要和jwt的接收方提前沟通好验证方式的)
+        Map<String, Object> claims = new HashMap<String, Object>();
+        claims.put("userName", userName);
+
+        //下面就是在为payload添加各种标准声明和私有声明了
+        //这里其实就是new一个JwtBuilder,设置jwt的body
+        JwtBuilder builder = Jwts.builder()
+                //如果有私有声明,一定要先设置这个自己创建的私有的声明,这个是给builder的claim赋值,一旦写在标准的声明赋值之后,就是覆盖了那些标准的声明的
+                .setClaims(claims)
+                //设置jti(JWT ID):是JWT的唯一标识,根据业务需要,这个可以设置为一个不重复的值,主要用来作为一次性token,从而回避重放攻击。
+                .setId(UUID.randomUUID().toString())
+                //iat: jwt的签发时间
+                .setIssuedAt(now)
+                //代表这个JWT的主体,即它的所有人,这个是一个json格式的字符串,可以存放什么userid,roldid之类的,作为什么用户的唯一标志。
+                .setSubject(userName)
+                //设置签名使用的签名算法和签名使用的秘钥
+                .signWith(signatureAlgorithm, SECRET);
+
+        if (ttlMillis >= 0) {
+            long expMillis = nowMillis + ttlMillis;
+            Date exp = new Date(expMillis);
+            //设置过期时间
+            builder.setExpiration(exp);
+        }/*else{
+            //设置过期时间半小时
+            DateTime expDate = new DateTime().plusMinutes(30);
+            builder.setExpiration(expDate.toDate());
+        }*/
+        return builder.compact();
+    }
+
+
+    /**
+     * Token的解密
+     *
+     * @param token 加密后的token
+     * @return
+     */
+    public static Claims parseJWT(String token) {
+        //得到DefaultJwtParser
+        Claims claims = Jwts.parser()
+                //设置签名的秘钥
+                .setSigningKey(SECRET)
+                //设置需要解析的jwt
+                .parseClaimsJws(token).getBody();
+        return claims;
+    }
+
+    public static String getTokenStringValueByKey(String token, String key) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim value = jwt.getClaim(key);
+
+        if (value == null) {
+            log.error("token key is null");
+            throw new BaseRuntimeException(5001, "token invalid");
+        }
+        return value.asString();
+    }
+
+
+    /**
+     * 是否超级管理员
+     */
+    public static Integer getIsAdmin(String token) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim id = jwt.getClaim("isAdmin");
+        Assert.notNull(id, "token id is null ");
+        return id.asInt()==null ? 0:1;
+    }
+
+
+    /**
+     * 校验token
+     * 在这里可以使用官方的校验,我这里校验的是token中携带的密码于数据库一致的话就校验通过
+     *
+     * @param token
+     * @param userName
+     * @return
+     */
+    public static Boolean isVerify(String token, String userName) {
+
+        //得到DefaultJwtParser
+        Claims claims = Jwts.parser()
+                //设置签名的秘钥
+                .setSigningKey(SECRET)
+                //设置需要解析的jwt
+                .parseClaimsJws(token).getBody();
+
+        return claims.get("userName").equals(userName);
+    }
+
+    /**
+     * 获得token中的信息无需secret解密也能获得
+     *
+     * @return token中包含的用户名
+     */
+    public static String getUsername(String token) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim userName = jwt.getClaim("userName");
+        Assert.notNull(userName, "token userName is null ");
+        return userName.asString();
+    }
+
+
+    public static List getUserRole(String token) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim role = jwt.getClaim("role");
+        Assert.notNull(role, "token role is null ");
+        return role.as(List.class);
+    }
+
+
+    public static String createJWT(long ttlMillis, Map<String, Object> paramMap) {
+        //指定签名的时候使用的签名算法,也就是header那部分,jjwt已经将这部分内容封装好了。
+        SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
+
+        String userName = paramMap.get("userName").toString();
+
+        //生成JWT的时间
+        long nowMillis = System.currentTimeMillis();
+        Date now = new Date(nowMillis);
+
+        //创建payload的私有声明(根据特定的业务需要添加,如果要拿这个做验证,一般是需要和jwt的接收方提前沟通好验证方式的)
+        Map<String, Object> claims = new HashMap<String, Object>();
+        claims.put("userName", userName);
+        claims.put("id", paramMap.get("id"));
+        claims.put("role", paramMap.get("role"));
+        claims.put("manager", paramMap.get("manager"));
+
+        //下面就是在为payload添加各种标准声明和私有声明了
+        //这里其实就是new一个JwtBuilder,设置jwt的body
+        JwtBuilder builder = Jwts.builder()
+                //如果有私有声明,一定要先设置这个自己创建的私有的声明,这个是给builder的claim赋值,一旦写在标准的声明赋值之后,就是覆盖了那些标准的声明的
+                .setClaims(claims)
+                //设置jti(JWT ID):是JWT的唯一标识,根据业务需要,这个可以设置为一个不重复的值,主要用来作为一次性token,从而回避重放攻击。
+                .setId(UUID.randomUUID().toString())
+                //iat: jwt的签发时间
+                .setIssuedAt(now)
+                //代表这个JWT的主体,即它的所有人,这个是一个json格式的字符串,可以存放什么userid,roldid之类的,作为什么用户的唯一标志。
+                .setSubject(userName)
+                //设置签名使用的签名算法和签名使用的秘钥
+                .signWith(signatureAlgorithm, SECRET);
+
+        if (ttlMillis >= 0) {
+            long expMillis = nowMillis + ttlMillis;
+            Date exp = new Date(expMillis);
+            //设置过期时间
+            builder.setExpiration(exp);
+        }/*else{
+            //设置过期时间半小时
+            DateTime expDate = new DateTime().plusMinutes(30);
+            builder.setExpiration(expDate.toDate());
+        }*/
+        return builder.compact();
+    }
+
+    /**
+     * 获取用户id
+     */
+    public static Long getUserId(String token) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim id = jwt.getClaim("id");
+        Assert.notNull(id, "token id is null ");
+        return id.asLong();
+    }
+
+
+    /**
+     * 管理者 ,0:是, 1:否
+     */
+    public static Boolean getUserManager(String token) {
+        DecodedJWT jwt = JWT.decode(token);
+        Claim id = jwt.getClaim("manager");
+        Assert.notNull(id, "token manager is null ");
+        Integer integer = id.asInt();
+        return integer == 0;
+    }
+
+    public static void main(String[] args) {
+        long nowMillis = System.currentTimeMillis();
+        System.out.println(nowMillis);
+        Date exp = new Date(nowMillis);
+        System.out.println(exp);
+    }
+
+    public static void test2() {
+        String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOlsiYWRtaW4iLCJyb290Il0sImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiaWF0IjoxNTgzODA5MzkzLCJqdGkiOiJkNjZiZTFkYi00MTQ0LTQxMTYtYTNlNi01ZDBjNjhlNTI3ODAifQ.-4AdsVP2RwmPS2grtO4aC8ov9PwkilzaGdThGetBJok";
+        System.out.println(getUserRole(token));
+
+    }
+
+    public static void test3() {
+        HashMap<String, Object> map = new HashMap<>();
+
+        ArrayList<Object> list = new ArrayList<>();
+        list.add("admin");
+        list.add("root");
+
+        map.put("userName", "admin");
+        map.put("id", Long.valueOf("1"));
+        map.put("role", list);
+
+        String token = createJWT(-1, map);
+        System.out.println(token);
+
+        Boolean isVerify = isVerify(token, "admin");
+        System.out.println(isVerify);
+
+    }
+
+    private static void testList() {
+        ArrayList<Object> list = new ArrayList<>();
+        list.add("admin");
+        list.add("root");
+    }
+
+    /**
+     * 检查token是否有效
+     */
+    @Test
+    public void testCheckToken(){
+        String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMzExMjMxMTE3OCIsInVzZXJOYW1lIjoiMTMxMTIzMTExNzgiLCJpYXQiOjE2MTM2MjAzNjcsImp0aSI6IjMyYTAwZDNiLTE2ODctNDUzNi04NmIwLWY4OTMzODQzNzNjMiJ9.5sV47Yf0HU4m6u77jmCziR3KhAGfiL5aUKxo57MImTI";
+        String username = getUsername(token);
+        Long userId = getUserId(token);
+        System.out.println(username);
+        System.out.println("id: " + userId );
+    }
+
+
+    @Test
+    public void testIsVerify(){
+        String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMzExMjMxMTE3OCIsInVzZXJOYW1lIjoiMTMxMTIzMTExNzgiLCJpYXQiOjE2MTM2MjAzNjcsImp0aSI6IjMyYTAwZDNiLTE2ODctNDUzNi04NmIwLWY4OTMzODQzNzNjMiJ9.5sV47Yf0HU4m6u77jmCziR3KhAGfiL5aUKxo57MImTI";
+       String userName = "13112311178";
+        Boolean verify = isVerify(token, userName);
+        System.out.println(verify);
+    }
+
+
+    /**
+     * 解析出来是一个对象
+     */
+    @Test
+    public void testParseJWT(){
+        String token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsInJvbGUiOlsiYWRtaW4iLCJyb290Il0sImlkIjoxLCJ1c2VyTmFtZSI6ImFkbWluIiwiaWF0IjoxNTgzODA5MzkzLCJqdGkiOiJkNjZiZTFkYi00MTQ0LTQxMTYtYTNlNi01ZDBjNjhlNTI3ODAifQ.-4AdsVP2RwmPS2grtO4aC8ov9PwkilzaGdThGetBJok";
+        System.out.println(parseJWT(token));
+    }
+
+}

+ 197 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/QrCodeUtils.java

@@ -0,0 +1,197 @@
+package com.gis.util;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.img.ImgUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.http.HttpUtil;
+import com.gis.constant.ConfigConstant;
+import com.gis.oss.util.FileAndOssUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.iherus.codegen.qrcode.SimpleQrcodeGenerator;
+import org.junit.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Created by owen on 2020/12/17 0017 16:49
+ *
+ * 二维码
+ */
+@Component
+@Slf4j
+public class QrCodeUtils {
+
+    @Autowired
+    FileAndOssUtil fileAndOssUtil;
+    @Autowired
+    ConfigConstant configConstant;
+
+    @Test
+    public void test(){
+        try {
+            new SimpleQrcodeGenerator().generate("http://ossxiaoan.4dage.com/cms_zhen/image/20201218_142627638.png?123").toFile("F:\\test\\ngin\\cms_wuhu_gov_data\\qrCode\\3.jpg");
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 创建普通二维码
+     */
+    @Test
+    public  void generateQrCode(){
+        String url = "www.baidu.com";
+        String savePath = "E:\\cache\\";
+        // 保存地址
+        String time = DateUtil.format(new Date(), "yyyyMMdd_HHmmssSSS") + ".jpg";
+        String dirType = "qrCode/";
+        savePath = savePath + dirType;
+
+        // 创建目录
+        if (!FileUtil.isDirectory(savePath)) {
+            FileUtil.mkdir(savePath);
+        }
+        savePath = savePath + time;
+        log.info("savePath: {}", savePath);
+        // 创建二维码tpt
+        try {
+            new SimpleQrcodeGenerator().generate(url).toFile(savePath);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+    /**
+     * 附带logo小图标二维码
+     */
+    public String generateLogoQrCode(String url, String serverBasePath, String ossBasePath, String ossDomain, String id){
+        // 保存地址
+        String savePath = serverBasePath + id;
+
+        String logoPath = serverBasePath + "img/kankan_icon.png";
+        if (!FileUtil.isFile(logoPath)) {
+            InputStream resource = FileUtils.getResource("img/kankan_icon.png");
+            FileUtil.writeFromStream(resource, logoPath);
+            log.info("logo写入完成");
+        }
+        log.info("logoPath: {}", logoPath);
+
+        // 创建目录
+        if (!FileUtil.isDirectory(savePath)) {
+            FileUtil.mkdir(savePath);
+        }
+        savePath = savePath + "/qrCode.jpg";
+//        log.info("savePath: {}", savePath);
+        // 创建二维码tpt
+        try {
+            new SimpleQrcodeGenerator().setLogo(logoPath).generate(url).toFile(savePath);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        // 二维码上传oss
+        String ossPath = ossBasePath + id + "/qrCode.jpg";
+        fileAndOssUtil.upload(savePath, ossPath);
+        String ossUrl = ossDomain + ossPath;
+        log.info("ossUrl: {}", ossUrl);
+
+        // 删除服务器临时文件
+
+        return ossUrl;
+    }
+
+
+    /**
+     * 自定义logo小图标二维码
+     * @param url 二维码内容url
+     * @param serverBasePath
+     * @param ossBasePath
+     * @param ossDomain
+     * @param id 目录
+     * @param logoPath 小logo图片地址
+     * @return
+     */
+    public String diyLogoQrCode(String url, String serverBasePath, String ossBasePath, String ossDomain, String id, String logoPath){
+
+        String savePath = serverBasePath + id;
+
+        // 创建目录
+        if (!FileUtil.isDirectory(savePath)) {
+            FileUtil.mkdir(savePath);
+        }
+        savePath = savePath + "/qrCode.jpg";
+//        log.info("savePath: {}", savePath);
+        // 创建二维码tpt
+        try {
+            new SimpleQrcodeGenerator().setLogo(logoPath).generate(url).toFile(savePath);
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+        // 二维码上传oss
+        String ossPath = ossBasePath + id + "/qrCode.jpg";
+        fileAndOssUtil.upload(savePath, ossPath);
+        String ossUrl = ossDomain + ossPath;
+        log.info("ossUrl: {}", ossUrl);
+
+        return ossUrl;
+    }
+    /**
+     * 附带logo小图标二维码
+     */
+    public String generateLogoQrCodeBase64(String logo,String text){
+        String serverBasePath=configConstant.serverBasePath;
+
+        String savePath =  serverBasePath +File.separator+"gerQrcode"+File.separator+ IdUtil.getSnowflakeNextId()+File.separator;
+        // 创建目录
+        if (!FileUtil.isDirectory(savePath)) {
+            FileUtil.mkdir(savePath);
+        }
+        String logoPath = serverBasePath + "img/kankan_icon.png";
+        if (StrUtil.isNotEmpty(logo)){
+            File file = HttpUtil.downloadFileFromUrl(logo, savePath);
+                 logoPath=file.getPath();
+                log.info("diy_logoPath{}",logoPath);
+
+        }else {
+             if (!FileUtil.isFile(logoPath)) {
+                InputStream resource = FileUtils.getResource("img/kankan_icon.png");
+                FileUtil.writeFromStream(resource, logoPath);
+                log.info("logo写入完成");
+            }
+        }
+        log.info("logoPath: {}", logoPath);
+        BufferedImage test = new SimpleQrcodeGenerator().setLogo(logoPath).generate(text).getImage();
+        System.out.println(test);
+        String png = ImgUtil.toBase64(test, "jpg");
+        png = "data:image/jpg;base64," + png;
+        if (StrUtil.isNotEmpty(logo)&&!logoPath.contains("kankan_icon.png")){
+            boolean del = FileUtil.del(savePath);
+            log.info("删除logo:{}",del);
+        }
+        return png;
+    }
+    /**
+     * 附带logo小图标二维码
+     */
+    public static void main(String[] args) {
+        String logoPath = "C:\\Users\\4DAGE\\Downloads\\img"+File.separator+ IdUtil.getSnowflakeNextId()+File.separator;
+        String logo="https://ossxiaoan.4dage.com/720yun_fd_manage/fd720_gxqoc32gt/vtour/panos/fd720_gxqoc32gt.tiles/thumb.jpg";
+        if (StrUtil.isNotEmpty(logo)) {
+            if (!FileUtil.isDirectory(logoPath)) {
+                FileUtil.mkdir(logoPath);
+            }
+            File file = HttpUtil.downloadFileFromUrl(logo, logoPath);
+            System.out.println(file.getPath());
+        }
+    }
+
+
+ }

+ 14 - 2
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/RandomUtils.java

@@ -11,13 +11,13 @@ import org.springframework.stereotype.Component;
 @Component
 public class RandomUtils {
 
-    public static String randowString(int length){
+    public static String randomString(int length){
         String baseString = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
         return RandomUtil.randomString(baseString, length);
     }
 
     public static void main(String[] args) {
-        System.out.println(randowString(9));
+        System.out.println(randomString(9));
     }
 
     /**
@@ -25,7 +25,19 @@ public class RandomUtils {
      * preStr: 8位id前缀
      * @return
      */
+    public static String getUuid(){
+        return SnowFlakeUUidUtils.generaUUid(null, null, "pano");
 
+    }
+
+    /**
+     * 场景码
+     * @return
+     */
+    public static String getSceneCode(String prefix){
+        String sceneCode = RandomUtils.randomString(9);
+        return  prefix +sceneCode;
+    }
 
     private static String randowInt(int length){
         String baseString = "0123456789";

+ 226 - 0
720yun_fd_consumer/gis_consumer/src/main/java/com/gis/util/SnowFlakeUUidUtils.java

@@ -0,0 +1,226 @@
+package com.gis.util;
+
+import lombok.extern.log4j.Log4j2;
+import org.apache.commons.lang3.StringUtils;
+
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * 2 * @Author: Abner
+ * 3 * @Date: 2020/12/9 16:07
+ * 4
+ */
+@Log4j2
+public class SnowFlakeUUidUtils {
+
+    // 时间起始标记点,作为基准,一般取系统的最近时间(一旦确定不能变动)
+    //起始标记点
+    private final static long twepoch = 1288834974657L;
+    // 机器标识位数
+    private final static long workerIdBits = 5L;
+    // 数据中心标识位数
+    private final static long datacenterIdBits = 5L;
+    // 机器ID最大值
+    private final static long maxWorkerId = -1L ^ (-1L << workerIdBits);
+    // 数据中心ID最大值
+    private final static long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
+    // 毫秒内自增位
+    private final static long sequenceBits = 12L;
+    // 机器ID偏左移12位
+    private final static long workerIdShift = sequenceBits;
+    // 数据中心ID左移17位
+    private final static long datacenterIdShift = sequenceBits + workerIdBits;
+    // 时间毫秒左移22位
+    private final static long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
+
+    private final static long sequenceMask = -1L ^ (-1L << sequenceBits);
+
+    private final static Lock myLock = new ReentrantLock();
+    /* 上次生产id时间戳 */
+    private static long lastTimestamp = -1L;
+    // 0,并发控制
+    private long sequence = 0L;
+
+    private final long workerId;
+    // 数据标识id部分
+    private final long datacenterId;
+
+    private static volatile SnowFlakeUUidUtils snowFlakeUUidUtils;
+
+
+    private static SnowFlakeUUidUtils getSingleInstance(Long workerId, Long datacenterId){
+        if(null == snowFlakeUUidUtils){
+            synchronized (SnowFlakeUUidUtils.class){
+                if(null == snowFlakeUUidUtils){
+                    if(null != workerId && null != datacenterId){
+                        snowFlakeUUidUtils = new SnowFlakeUUidUtils(workerId , datacenterId);
+                    }else{
+                        snowFlakeUUidUtils = new SnowFlakeUUidUtils();
+                    }
+                }
+            }
+        }
+        return snowFlakeUUidUtils;
+    }
+
+    /**
+     * @param workerId 自定义的应用所在的服务器的机器ID,使用默认读取本机则无需传,传个NULL即可
+     * @param datacenterId 自定义的应用所在的服务器的数据中心ID,使用默认读取本机则无需传,传个NULL即可
+     * @param preStr 自定义的ID前缀
+     * **/
+    public static String generaUUid(Long workerId, Long datacenterId , String preStr){
+        StringBuilder resultId = new StringBuilder();
+        SnowFlakeUUidUtils snowFlakeUUidUtils = getSingleInstance(workerId , datacenterId);
+        if(StringUtils.isNotBlank(preStr)){
+            return resultId.append(preStr).append(snowFlakeUUidUtils.nextId()).toString();
+        }else{
+            return resultId.append(snowFlakeUUidUtils.nextId()).toString();
+        }
+    }
+
+    public SnowFlakeUUidUtils(){
+        this.datacenterId = getDatacenterId(maxDatacenterId);
+        this.workerId = getMaxWorkerId(datacenterId, maxWorkerId);
+    }
+    /**
+     * @param workerId
+     *            工作机器ID
+     * @param datacenterId
+     *            序列号
+     */
+    public SnowFlakeUUidUtils(long workerId, long datacenterId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
+        }
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
+            throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
+        }
+        this.workerId = workerId;
+        this.datacenterId = datacenterId;
+    }
+    /**
+     * 获取下一个ID
+     * 线程安全
+     * @return NULL 抢锁失败,需要重新调用
+     *         数字串 抢锁成功,则生成20位的数字串
+     */
+    public  Long nextId() {
+        try {
+
+            if(myLock.tryLock(700 , TimeUnit.MILLISECONDS)){
+                try {
+                    long timestamp = timeGen();
+                    if (timestamp < lastTimestamp) {
+                        throw new RuntimeException(String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+                    }
+
+                    if (lastTimestamp == timestamp) {
+                        // 当前毫秒内,则+1
+                        sequence = (sequence + 1) & sequenceMask;
+                        if (sequence == 0) {
+                            // 当前毫秒内计数满了,则等待下一秒
+                            timestamp = tilNextMillis(lastTimestamp);
+                        }
+                    } else {
+                        sequence = 0L;
+                    }
+                    lastTimestamp = timestamp;
+                    // ID偏移组合生成最终的ID,并返回ID
+                    Long nextId = ((timestamp - twepoch) << timestampLeftShift)
+                            | (datacenterId << datacenterIdShift)
+                            | (workerId << workerIdShift) | sequence;
+
+                    return nextId;
+                }catch (Exception e){
+                    log.info("生成UUID抢锁失败:{}" , e);
+                }finally {
+                    myLock.unlock();
+                }
+            }else{
+                return null;
+            }
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        return null;
+
+    }
+
+    private long tilNextMillis(final long lastTimestamp) {
+        long timestamp = this.timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = this.timeGen();
+        }
+        return timestamp;
+    }
+
+    private long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+    /**
+     * <p>
+     * 获取 maxWorkerId
+     * </p>
+     */
+    protected static long getMaxWorkerId(long datacenterId, long maxWorkerId) {
+        StringBuffer mpid = new StringBuffer();
+        mpid.append(datacenterId);
+        String name = ManagementFactory.getRuntimeMXBean().getName();
+        if (!name.isEmpty()) {
+            /*
+             * GET jvmPid
+             */
+            mpid.append(name.split("@")[0]);
+        }
+        /*
+         * MAC + PID 的 hashcode 获取16个低位
+         */
+        return (mpid.toString().hashCode() & 0xffff) % (maxWorkerId + 1);
+    }
+
+    /**
+     *
+     * @param prefix 前缀
+     * @return
+     */
+    public static String getUuid(String prefix){
+        String s = prefix.toUpperCase();
+        return generaUUid(null, null, s);
+
+    }
+
+    /**
+     * <p>
+     * 数据标识id部分
+     * </p>
+     */
+    protected static long getDatacenterId(long maxDatacenterId) {
+        long id = 0L;
+        try {
+            InetAddress ip = InetAddress.getLocalHost();
+            NetworkInterface network = NetworkInterface.getByInetAddress(ip);
+            if (network == null) {
+                id = 1L;
+            } else {
+                byte[] mac = network.getHardwareAddress();
+                id = ((0x000000FF & (long) mac[mac.length - 1])
+                        | (0x0000FF00 & (((long) mac[mac.length - 2]) << 8))) >> 6;
+                id = id % (maxDatacenterId + 1);
+            }
+        } catch (Exception e) {
+            System.out.println(" getDatacenterId: " + e.getMessage());
+        }
+        return id;
+    }
+
+    public static void main(String[] args) {
+        System.out.println(SnowFlakeUUidUtils.generaUUid(null, null, null));
+    }
+
+}

+ 3 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/application-dev.yml

@@ -54,3 +54,6 @@ spring:
         virtual-host: /
 tlog:
     enable-invoke-time-print: true
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice

+ 71 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/application-loc-site.yml

@@ -0,0 +1,71 @@
+logging:
+    config: classpath:logback-spring.xml
+    fdkk:
+        level: INFO
+        maxHistory: 180
+    level:
+        com:
+            gis: info
+    path: E:/javaProject/${project.name}_log
+oss:
+    bucket: oss-xiaoan
+    domain: https://ossxiaoan.4dage.com/
+    file:
+        path: 720yun_fd_manage/
+    key: LTAI5tJwboCj3r4vUNkSmbyX
+    point: http://oss-cn-shenzhen-internal.aliyuncs.com
+    secrecy: meDy7VYAWbg8kZCKsoUZcIYQxigWOy
+    type: oss
+server:
+    file:
+        path: i:\test\ngin\${project.name}_data\
+spring:
+    datasource:
+        driver-class-name: com.mysql.cj.jdbc.Driver
+        druid:
+            initial-size: 5
+            max-active: 20
+            max-evictable-idle-time-millis: 90000
+            max-wait: 60000
+            min-evictable-idle-time-millis: 30000
+            min-idle: 10
+            password: JK123456%JIK
+            stat-view-servlet:
+                enabled: true
+            test-on-borrow: false
+            test-on-return: false
+            test-while-idle: true
+            time-between-eviction-runs-millis: 60000
+            url: jdbc:mysql://120.25.146.52:13306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            username: root
+            validation-query: SELECT 1 FROM DUAL
+            web-stat-filter:
+                enabled: true
+        type: com.alibaba.druid.pool.DruidDataSource
+    rabbitmq:
+        host: 120.24.144.164
+        port: 5672
+        username: admin
+        password: adminv41234
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 1
+                max-concurrency: 2
+                acknowledge-mode: manual #开启消费者手动确认
+                # retry:
+                #   enabled: true           # 开启消费者出现异常情况下,进行重试消费,默认false
+                #   max-attempts: 5         # 最大重试次数,默认为3
+                #   max-interval: 10000   # 重试最大间隔时间
+                #   initial-interval: 2000  # 重试初始间隔时间
+                #   multiplier: 2 # 间隔时间乘子,间隔时间*乘子=下一次的间隔时间,最大不能超过设置的最大间隔时间
+        #开启消息投递确认机制
+        publisher-confirm-type: correlated
+tlog:
+    enable-invoke-time-print: true
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice
+domain:
+    4dkk: https://test.4dkankan.com

+ 3 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/application-loc.yml

@@ -54,3 +54,6 @@ spring:
         virtual-host: /
 tlog:
     enable-invoke-time-print: true
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice

+ 24 - 11
720yun_fd_consumer/gis_consumer/src/main/resources/application-pro.yml

@@ -1,3 +1,5 @@
+domain:
+    4dkk: https://www.4dkankan.com
 logging:
     config: classpath:logback-spring.xml
     fdkk:
@@ -29,29 +31,35 @@ spring:
             max-wait: 60000
             min-evictable-idle-time-millis: 30000
             min-idle: 10
-            password: 4dkk2020cuikuan%
+            password: JK20220120&JIK
             stat-view-servlet:
                 enabled: true
             test-on-borrow: false
             test-on-return: false
             test-while-idle: true
             time-between-eviction-runs-millis: 60000
-            url: jdbc:mysql://172.18.157.42:3306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
-            username: root
+            url: jdbc:mysql://172.18.157.42:13306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            username: laser
             validation-query: SELECT 1 FROM DUAL
             web-stat-filter:
                 enabled: true
         type: com.alibaba.druid.pool.DruidDataSource
     rabbitmq:
-        address: 172.18.157.42:5672
-        connection-timeout: 15000
-        password: guest
-        publisher-confirms: true
-        publisher-returns: true
-        template:
-            mandatory: true
+        host: 172.18.157.42
+        port: 5672
         username: guest
-        virtual-host: /
+        password: guest
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 5
+                max-concurrency: 10
+                acknowledge-mode: manual #开启消费者手动确认
+            direct:
+                acknowledge-mode: manual #开启消费者手动确认
+        #开启消息投递确认机制
+        publisher-confirm-type: correlated
     redis:
         database: 0
         host: r-wz9owsphxqwi4ztqlf.redis.rds.aliyuncs.com
@@ -66,3 +74,8 @@ spring:
         timeout: 3000ms
 tlog:
     enable-invoke-time-print: true
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice
+    relics-init-queue: relics-init-queue
+    relics-update-name-queue: relics-update-name-queue

+ 22 - 11
720yun_fd_consumer/gis_consumer/src/main/resources/application-sit.yml

@@ -1,3 +1,5 @@
+domain:
+    4dkk: https://test.4dkankan.com
 logging:
     config: classpath:logback-spring.xml
     fdkk:
@@ -29,28 +31,37 @@ spring:
             max-wait: 60000
             min-evictable-idle-time-millis: 30000
             min-idle: 10
-            password: 4dkk2020test%
+            password: JK123456%JIK
             stat-view-servlet:
                 enabled: true
             test-on-borrow: false
             test-on-return: false
             test-while-idle: true
             time-between-eviction-runs-millis: 60000
-            url: jdbc:mysql://127.0.0.1:3306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            url: jdbc:mysql://127.0.0.1:13306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
             username: root
             validation-query: SELECT 1 FROM DUAL
             web-stat-filter:
                 enabled: true
         type: com.alibaba.druid.pool.DruidDataSource
     rabbitmq:
-        address: 127.0.0.1:5672
-        connection-timeout: 15000
-        password: 4dagecui2019$
-        publisher-confirms: true
-        publisher-returns: true
-        template:
-            mandatory: true
-        username: guest
-        virtual-host: /
+        host: 172.18.156.39
+        port: 5672
+        username: admin
+        password: adminv41234
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 1
+                max-concurrency: 2
+                acknowledge-mode: manual #开启消费者手动确认
+        #开启消息投递确认机制
+        publisher-confirm-type: correlated
 tlog:
     enable-invoke-time-print: true
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice
+    relics-init-queue: relics-init-queue
+    relics-update-name-queue: relics-update-name-queue

+ 3 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/application.yml

@@ -23,3 +23,6 @@ spring:
             enabled: true
             max-file-size: 256MB
             max-request-size: 256MB
+redis:
+    token:
+        prefix: token#

+ 105 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/data/someData.json

@@ -0,0 +1,105 @@
+{
+  "isPassword": 0,
+  "password": "",
+  "ossSomeData": "",
+  "icon": "",
+  "description": "",
+  "updateTime": "",
+  "sceneIndex": "",
+  "catalogRoot": [
+    {
+      "id": 100,
+      "name": "一级分组",
+      "children": [
+        1
+      ]
+    }
+  ],
+  "firstScene": "",
+  "userId": "",
+  "isLogo": 1,
+  "appIcon": "",
+  "qrCode": "",
+  "createTime": "",
+  "catalogs": [
+    {
+      "id": 1,
+      "name": "默认二级分组"
+    }
+  ],
+  "isRemind": 1,
+  "name": "",
+  "pcIcon": "",
+  "scenes": [
+                    {
+                        "customMask": {
+                            "sky": {
+                                "fodderId": "",
+                                "icon": "",
+                                "scale": 1,
+                                "antidistorted": true,
+                                "isShow": false
+                            },
+                            "earth": {
+                                "fodderId": "",
+                                "icon": "",
+                                "scale": 1,
+                                "antidistorted": true,
+                                "isShow": false
+                            }
+                        },
+                        "initVisual": {
+                            "vlookat": 0,
+                            "hlookat": 0,
+                            "vlookatmin": -90,
+                            "vlookatmax": 90
+                        }
+                    }
+                ],
+  "isAuto": 1,
+  "logo": "",
+  "logoChange": false,
+  "share": "",
+  "id": "",
+  "remindTime": 1,
+  "status": 0,
+  "isShowOpeningAnimation": true,
+  "openingAnimationType": "小行星开场",
+  "backgroundMusic": {
+    "id": "",
+    "name": "",
+    "ossPath": ""
+  },
+
+  "customButton": [
+    {
+      "type": "电话",
+      "name": "电话",
+      "value": "",
+      "openMethod": "弹出层打开",
+      "isShow": false
+    },
+    {
+      "type": "链接",
+      "name": "链接",
+      "value": "",
+      "openMethod": "弹出层打开",
+      "isShow": false
+    }
+  ],
+
+
+
+  "coverPc":"",
+  "coverPcLoc":"",
+  "coverMo":"",
+  "coverSelect":"",
+
+  "explanation": {
+    "audioId": "",
+    "audioName": "",
+    "audioUrl": "",
+    "openByDefault": true,
+    "repeat": true
+  }
+}

+ 24 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/data/someDataSceneData.json

@@ -0,0 +1,24 @@
+{
+                        "customMask": {
+                            "sky": {
+                                "fodderId": "",
+                                "icon": "",
+                                "scale": 1,
+                                "antidistorted": true,
+                                "isShow": true
+                            },
+                            "earth": {
+                                "fodderId": "",
+                                "icon": "",
+                                "scale": 1,
+                                "antidistorted": true,
+                                "isShow": false
+                            }
+                        },
+                        "initVisual": {
+                            "vlookat": 0,
+                            "hlookat": 0,
+                            "vlookatmin": -90,
+                            "vlookatmax": 90
+                        }
+}

+ 78 - 0
720yun_fd_consumer/gis_consumer/src/main/resources/data/tour.xml

@@ -0,0 +1,78 @@
+<krpano version="1.21" title="Virtual Tour">
+
+    <include url="%SWFPATH%/skin/vtourskin.xml" />
+
+    <!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
+    <skin_settings maps="false"
+                   maps_type="google"
+                   maps_bing_api_key=""
+                   maps_google_api_key=""
+                   maps_zoombuttons="false"
+                   maps_loadonfirstuse="true"
+                   gyro="true"
+                   gyro_keeplookingdirection="false"
+                   webvr="true"
+                   webvr_keeplookingdirection="true"
+                   webvr_prev_next_hotspots="true"
+                   autotour="false"
+                   littleplanetintro="false"
+                   followmousecontrol="false"
+                   title="true"
+                   thumbs="true"
+                   thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
+                   thumbs_opened="false"
+                   thumbs_text="false"
+                   thumbs_dragging="true"
+                   thumbs_onhoverscrolling="false"
+                   thumbs_scrollbuttons="false"
+                   thumbs_scrollindicator="false"
+                   thumbs_loop="false"
+                   tooltips_buttons="false"
+                   tooltips_thumbs="false"
+                   tooltips_hotspots="false"
+                   tooltips_mapspots="false"
+                   deeplinking="false"
+                   loadscene_flags="MERGE"
+                   loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"
+                   loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"
+                   loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"
+                   loadingtext="loading..."
+                   layout_width="100%"
+                   layout_maxwidth="814"
+                   controlbar_width="-24"
+                   controlbar_height="40"
+                   controlbar_offset="20"
+                   controlbar_offset_closed="-40"
+                   controlbar_overlap.no-fractionalscaling="10"
+                   controlbar_overlap.fractionalscaling="0"
+                   design_skin_images="vtourskin.png"
+                   design_bgcolor="0x2D3E50"
+                   design_bgalpha="0.8"
+                   design_bgborder="0"
+                   design_bgroundedge="1"
+                   design_bgshadow="0 4 10 0x000000 0.3"
+                   design_thumbborder_bgborder="3 0xFFFFFF 1.0"
+                   design_thumbborder_padding="2"
+                   design_thumbborder_bgroundedge="0"
+                   design_text_css="color:#FFFFFF; font-family:Arial;"
+                   design_text_shadow="1"
+    />
+
+    <!--
+        For an alternative skin design either change the <skin_settings> values
+        from above or optionally include one of the predefined designs from below.
+    -->
+    <!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
+    <!-- <include url="skin/vtourskin_design_glass.xml"       /> -->
+    <!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
+    <!-- <include url="skin/vtourskin_design_117.xml"         /> -->
+    <!-- <include url="skin/vtourskin_design_117round.xml"    /> -->
+    <!-- <include url="skin/vtourskin_design_black.xml"       /> -->
+    <!-- startup action - load the first scene -->
+    <action name="startup" autorun="onstart">
+        if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
+        loadscene(get(startscene), null, MERGE);
+        if(startactions !== null, startactions() );
+    </action>
+
+</krpano>

+ 7 - 3
720yun_fd_consumer/gis_consumer_oss/pom.xml

@@ -186,10 +186,14 @@
 
         <!--rabbit MQ-->
         <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-amqp</artifactId>
+            <groupId>com.fdkankan</groupId>
+            <artifactId>4dkankan-utils-rabbitmq</artifactId>
+            <version>3.0.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.iherus</groupId>
+            <artifactId>qrext4j</artifactId>
         </dependency>
-
 
 
     </dependencies>

+ 47 - 5
720yun_fd_consumer/gis_consumer_oss/src/main/java/com/gis/oss/util/AliYunOssUtil.java

@@ -1,6 +1,8 @@
 package com.gis.oss.util;
 
+import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.RuntimeUtil;
+import com.alibaba.fastjson.JSON;
 import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.model.*;
 import com.gis.oss.command.CmdConstant;
@@ -8,15 +10,14 @@ import com.gis.oss.command.CmdUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
 
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 阿里云oss工具类
@@ -146,7 +147,48 @@ public class AliYunOssUtil {
         log.info("批量上传阿里云完毕:" + new Date().toString());
     }
 
-
+    public List<String> getFileFolder(String bucket, String keyName) {
+        log.info("获取文件夹bucket-{},路径{}",bucket,keyName);
+        OSSClient ossClient = init();
+        List<String> keyList = new ArrayList<>();
+        try {
+            boolean flag = true;
+            String nextMaker = null;
+            ListObjectsRequest listObjectsRequest = new ListObjectsRequest(bucket);
+            //指定下一级文件
+            listObjectsRequest.setPrefix(keyName);
+            //设置分页的页容量
+            listObjectsRequest.setMaxKeys(200);
+            do {
+                //获取下一页的起始点,它的下一项
+                listObjectsRequest.setMarker(nextMaker);
+                ObjectListing objectListing = ossClient.listObjects(listObjectsRequest);
+                List<String> collect = objectListing.getObjectSummaries().parallelStream()
+                        .map(OSSObjectSummary::getKey).collect(Collectors.toList());
+                if (!CollectionUtils.isEmpty(collect)) {
+                    keyList.addAll(collect);
+                }
+                nextMaker = objectListing.getNextMarker();
+                //全部执行完后,为false
+                flag = objectListing.isTruncated();
+            } while (flag);
+        } catch (Exception e) {
+            log.error("获取文件列表失败,path=" + keyName, e);
+            e.printStackTrace();
+        }
+        log.info("获取文件夹集合={}", JSON.toJSONString(keyList));
+        return keyList;
+    }
+    public ObjectMetadata downloadFile(String bucket, String pathKey, String file) {
+        OSSClient ossClient = init();
+        GetObjectRequest request = new GetObjectRequest(bucket, pathKey);
+        log.info("下载开始:下载bucket={},下载pathKey={},下载filePath={}", bucket, pathKey, file);
+        File downloadFile = new File(file);
+        if (!FileUtil.exist(downloadFile.getParent())){
+            FileUtil.mkdir(downloadFile.getParent());
+        }
+        return ossClient.getObject(request, downloadFile);
+    }
     /**
      * 可以删除目录
      *

+ 11 - 6
720yun_fd_consumer/pom.xml

@@ -29,7 +29,7 @@
         <gis.version>1.0.0</gis.version>
         <fastjson.version>1.2.83</fastjson.version>
         <druid.version>1.1.14</druid.version>
-        <hutool.version>5.3.3</hutool.version>
+        <hutool.version>5.8.22</hutool.version>
         <lombok.version>1.18.2</lombok.version>
         <lang3.version>3.7</lang3.version>
         <mysql.version>8.0.15</mysql.version>
@@ -44,6 +44,8 @@
         <pagehelper.version>1.2.5</pagehelper.version>
         <knife4j.version>3.0.3</knife4j.version>
         <junit.version>4.12</junit.version>
+        <qrext4j.version>1.3.1</qrext4j.version>
+
     </properties>
 
 
@@ -96,12 +98,11 @@
 
             <!--rabbit MQ-->
             <dependency>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-starter-amqp</artifactId>
-                <version>${spring.boot.version}</version>
+                <groupId>com.fdkankan</groupId>
+                <artifactId>4dkankan-utils-rabbitmq</artifactId>
+                <version>3.0.0-SNAPSHOT</version>
             </dependency>
 
-
             <!-- lombok -->
             <dependency>
                 <groupId>org.projectlombok</groupId>
@@ -220,7 +221,11 @@
                 <version>${junit.version}</version>
             </dependency>
 
-
+            <dependency>
+                <groupId>org.iherus</groupId>
+                <artifactId>qrext4j</artifactId>
+                <version>${qrext4j.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 1 - 1
720yun_fd_consumer/run.sh

@@ -14,7 +14,7 @@ startApp(){
     	echo "程序已经在运行了"
     else
     	echo "执行 start 方法"
-    	nohup java -jar -XX:MetaspaceSize=1500m -XX:MaxMetaspaceSize=1500m -Xms4072m -Xmx4072m -Xmn1024m -Xss1m -XX:SurvivorRatio=8 ./$APP_NAME --spring.profiles.active=$APP_EVN --server.port=$APP_PORT > logs.log 2>error.log &  # 说明pid为空
+    	nohup java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5530 -jar -XX:MetaspaceSize=1500m -XX:MaxMetaspaceSize=1500m -Xms4072m -Xmx4072m -Xmn1024m -Xss1m -XX:SurvivorRatio=8 ./$APP_NAME --spring.profiles.active=$APP_EVN --server.port=$APP_PORT > logs.log 2>error.log &  # 说明pid为空
 	echo Start Success!
 fi
 }

+ 17 - 44
720yun_fd_manage/gis_application/src/main/resources/application-locSit.yml

@@ -33,29 +33,33 @@ spring:
             max-wait: 60000
             min-evictable-idle-time-millis: 30000
             min-idle: 10
-            password: 4dkk2020test%
+            password: JK123456%JIK
             stat-view-servlet:
                 enabled: true
             test-on-borrow: false
             test-on-return: false
             test-while-idle: true
             time-between-eviction-runs-millis: 60000
-            url: jdbc:mysql://120.25.146.52:3306/${project.name}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            url: jdbc:mysql://120.25.146.52:13306/${project.name}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
             username: root
             validation-query: SELECT 1 FROM DUAL
             web-stat-filter:
                 enabled: true
         type: com.alibaba.druid.pool.DruidDataSource
     rabbitmq:
-        address: 120.25.146.52:5672
-        connection-timeout: 15000
-        password: guest
+        host: 120.24.144.164
+        port: 5672
+        username: admin
+        password: adminv41234
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 1
+                max-concurrency: 2
+                acknowledge-mode: manual #开启消费者手动确认
+        #开启消息投递确认机制
         publisher-confirm-type: correlated
-        publisher-returns: true
-        template:
-            mandatory: true
-        username: guest
-        virtual-host: /
     redis:
         database: 0
         host: 120.24.144.164
@@ -88,37 +92,6 @@ forest:
     log-response-content: true # 打开/关闭Forest响应内容日志(默认为 false)
     base-address-scheme: https
     base-address-host: test.4dkankan.com
-# MyBatis配置
-mybatis-plus:
-    configuration:
-        log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
-        map-underscore-to-camel-case: true
-        cache-enabled: false
-        call-setters-on-nulls: true
-        jdbc-type-for-null: 'null'
-    global-config:
-        db-config:
-            db-type: mysql
-            field-strategy: not_null
-            id-type: auto
-            logic-delete-value: 1 # 逻辑已删除值(默认为 1)
-            logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
-            table-underline: true
-    mapper-locations: classpath*:mapper/**/*Mapper.xml
-    typeAliasesPackage: com.gis.**.domain
-
-swagger:
-    # 是否开启swagger
-    enabled: true
-    # 请求前缀
-    pathMapping: /
-    production: false
-    description: ${swagger.title}
-    package: com.gis.web.controller
-    title: 全景看看-${spring.profiles.active}
-    version: 1.3.0
-knife4j:
-    # 开启增强配置
-    enable: true
-    # 开启生产环境屏蔽
-    production: false
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice

+ 21 - 11
720yun_fd_manage/gis_application/src/main/resources/application-pro.yml

@@ -38,29 +38,35 @@ spring:
             max-wait: 60000
             min-evictable-idle-time-millis: 30000
             min-idle: 10
-            password: 4dkk2020cuikuan%
+            password: JK20220120&JIK
             stat-view-servlet:
                 enabled: true
             test-on-borrow: false
             test-on-return: false
             test-while-idle: true
             time-between-eviction-runs-millis: 60000
-            url: jdbc:mysql://172.18.157.42:3306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
-            username: root
+            url: jdbc:mysql://172.18.157.42:13306/720yun_fd_manage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            username: laser
             validation-query: SELECT 1 FROM DUAL
             web-stat-filter:
                 enabled: true
         type: com.alibaba.druid.pool.DruidDataSource
     rabbitmq:
-        address: 172.18.157.42:5672
-        connection-timeout: 15000
+        host: 172.18.157.42
+        port: 5672
+        username: guest
         password: guest
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 5
+                max-concurrency: 10
+                acknowledge-mode: manual #开启消费者手动确认
+            direct:
+                acknowledge-mode: manual #开启消费者手动确认
+        #开启消息投递确认机制
         publisher-confirm-type: correlated
-        publisher-returns: true
-        template:
-            mandatory: true
-        username: guest
-        virtual-host: /
     redis:
         database: 0
         host: r-wz9owsphxqwi4ztqlf.redis.rds.aliyuncs.com
@@ -92,4 +98,8 @@ forest:
     log-response-status: true # 打开/关闭Forest响应状态日志(默认为 true)
     log-response-content: true # 打开/关闭Forest响应内容日志(默认为 false)
     base-address-scheme: https
-    base-address-host: www.4dkankan.com
+    base-address-host: www.4dkankan.com
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice
+    relics-update-name-queue: relics-update-name-queue

+ 18 - 10
720yun_fd_manage/gis_application/src/main/resources/application-sit.yml

@@ -33,29 +33,33 @@ spring:
             max-wait: 60000
             min-evictable-idle-time-millis: 30000
             min-idle: 10
-            password: 4dkk2020test%
+            password: JK123456%JIK
             stat-view-servlet:
                 enabled: true
             test-on-borrow: false
             test-on-return: false
             test-while-idle: true
             time-between-eviction-runs-millis: 60000
-            url: jdbc:mysql://127.0.0.1:3306/${project.name}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
+            url: jdbc:mysql://127.0.0.1:13306/${project.name}?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
             username: root
             validation-query: SELECT 1 FROM DUAL
             web-stat-filter:
                 enabled: true
         type: com.alibaba.druid.pool.DruidDataSource
     rabbitmq:
-        address: 127.0.0.1:5672
-        connection-timeout: 15000
-        password: 4dagecui2019$
+        host: 172.18.156.39
+        port: 5672
+        username: admin
+        password: adminv41234
+        virtual-host: 4dkankan
+        connection-timeout: 0
+        listener:
+            simple:
+                prefetch: 1
+                max-concurrency: 2
+                acknowledge-mode: manual #开启消费者手动确认
+        #开启消息投递确认机制
         publisher-confirm-type: correlated
-        publisher-returns: true
-        template:
-            mandatory: true
-        username: guest
-        virtual-host: /
     redis:
         database: 0
         host: 172.18.156.39
@@ -88,3 +92,7 @@ forest:
     log-response-content: true # 打开/关闭Forest响应内容日志(默认为 false)
     base-address-scheme: https
     base-address-host: test.4dkankan.com
+queue:
+    scene-queue: queue-pano-scene
+    do-slice-queue: queue-do-slice
+    relics-update-name-queue: relics-update-name-queue

+ 17 - 10
720yun_fd_manage/gis_application/src/main/resources/data/tour.xml

@@ -1,4 +1,4 @@
-<krpano version="1.19" title="Virtual Tour">
+<krpano version="1.21" title="Virtual Tour">
 
     <include url="%SWFPATH%/skin/vtourskin.xml" />
 
@@ -8,11 +8,15 @@
                    maps_bing_api_key=""
                    maps_google_api_key=""
                    maps_zoombuttons="false"
+                   maps_loadonfirstuse="true"
                    gyro="true"
+                   gyro_keeplookingdirection="false"
                    webvr="true"
-                   webvr_gyro_keeplookingdirection="false"
+                   webvr_keeplookingdirection="true"
                    webvr_prev_next_hotspots="true"
+                   autotour="false"
                    littleplanetintro="false"
+                   followmousecontrol="false"
                    title="true"
                    thumbs="true"
                    thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"
@@ -54,8 +58,16 @@
                    design_text_shadow="1"
     />
 
-
-
+    <!--
+        For an alternative skin design either change the <skin_settings> values
+        from above or optionally include one of the predefined designs from below.
+    -->
+    <!-- <include url="skin/vtourskin_design_flat_light.xml"  /> -->
+    <!-- <include url="skin/vtourskin_design_glass.xml"       /> -->
+    <!-- <include url="skin/vtourskin_design_ultra_light.xml" /> -->
+    <!-- <include url="skin/vtourskin_design_117.xml"         /> -->
+    <!-- <include url="skin/vtourskin_design_117round.xml"    /> -->
+    <!-- <include url="skin/vtourskin_design_black.xml"       /> -->
     <!-- startup action - load the first scene -->
     <action name="startup" autorun="onstart">
         if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
@@ -63,9 +75,4 @@
         if(startactions !== null, startactions() );
     </action>
 
-
-
-
-
-
-</krpano>
+</krpano>

+ 140 - 140
720yun_fd_manage/gis_common/src/main/java/com/gis/common/config/RabbitConfig.java

@@ -1,140 +1,140 @@
-package com.gis.common.config;
-
-import org.springframework.amqp.core.*;
-import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
-import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
-import org.springframework.amqp.rabbit.connection.ConnectionFactory;
-import org.springframework.amqp.rabbit.core.RabbitTemplate;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Scope;
-
-/**
- * 即时队列
- */
-
-@Configuration
-public class RabbitConfig {
-
-
-    @Value("${spring.rabbitmq.address}")
-    private String address;
-
-    @Value("${spring.rabbitmq.username}")
-    private String username;
-
-    @Value("${spring.rabbitmq.password}")
-    private String password;
-
-
-
-    /** 全景图队列*/
-    public static final String PANO_QUEUE = "720FdQueue";
-
-    /** 全景图交换机*/
-    public static final String PANO_EXCHANGE = "720FdExchange";
-
-    /** 全景图交换机路由*/
-    public static final String PANO_QUEUE_ROUTING = "720FdQueueRouting";
-
-
-    /** 全景图队列*/
-    public static final String TEST_QUEUE = "testOwenQueue";
-
-    /** 全景图交换机*/
-    public static final String TEST_EXCHANGE = "testOwenExchange";
-
-    /** 全景图交换机路由*/
-    public static final String TEST_QUEUE_ROUTING = "testOwenQueueRouting";
-
-
-
-
-
-
-    /**
-     * 全景图模型队列
-     */
-    @Bean
-    public Queue panoQueue() {
-        return new Queue(PANO_QUEUE);
-    }
-
-    /**
-     * 全景图交换机
-     */
-    @Bean
-    public Exchange panoExchange(){
-        return new DirectExchange(PANO_EXCHANGE, true, false);
-    }
-
-
-    /**
-     * 全景图队列绑定交换机
-     */
-    @Bean
-    public Binding panoQueueExchange(Queue panoQueue, Exchange panoExchange){
-        return BindingBuilder.bind(panoQueue).to(panoExchange).with(PANO_QUEUE_ROUTING).noargs();
-    }
-
-
-    /**
-     * 全景图模型队列
-     */
-    @Bean
-    public Queue testQueue() {
-        return new Queue(TEST_QUEUE);
-    }
-
-    /**
-     * 全景图交换机
-     */
-    @Bean
-    public Exchange testExchange(){
-        return new DirectExchange(TEST_EXCHANGE, true, false);
-    }
-
-
-    /**
-     * 全景图队列绑定交换机
-     */
-    @Bean
-    public Binding testQueueExchange(Queue testQueue, Exchange testExchange){
-        return BindingBuilder.bind(testQueue).to(testExchange).with(TEST_QUEUE_ROUTING).noargs();
-    }
-
-
-    /**
-     * 以下三个方法是配置集群
-     * @return
-     */
-    @Bean
-    public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() {
-        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
-        factory.setConnectionFactory(connectionFactory());
-        factory.setPrefetchCount(1);
-        return factory;
-    }
-
-    @Bean
-    public ConnectionFactory connectionFactory() {
-        CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
-        connectionFactory.setAddresses(address);
-        connectionFactory.setUsername(username);
-        connectionFactory.setPassword(password);
-        connectionFactory.setVirtualHost("/");
-        connectionFactory.setPublisherConfirms(true);
-        return connectionFactory;
-    }
-
-    @Bean
-    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
-    public RabbitTemplate rabbitTemplate() {
-        return new RabbitTemplate(connectionFactory());
-    }
-
-
-
-}
+//package com.gis.common.config;
+//
+//import org.springframework.amqp.core.*;
+//import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
+//import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
+//import org.springframework.amqp.rabbit.connection.ConnectionFactory;
+//import org.springframework.amqp.rabbit.core.RabbitTemplate;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.Scope;
+//
+///**
+// * 即时队列
+// */
+//
+//@Configuration
+//public class RabbitConfig {
+//
+//
+//    @Value("${spring.rabbitmq.address}")
+//    private String address;
+//
+//    @Value("${spring.rabbitmq.username}")
+//    private String username;
+//
+//    @Value("${spring.rabbitmq.password}")
+//    private String password;
+//
+//
+//
+//    /** 全景图队列*/
+//    public static final String PANO_QUEUE = "720FdQueue";
+//
+//    /** 全景图交换机*/
+//    public static final String PANO_EXCHANGE = "720FdExchange";
+//
+//    /** 全景图交换机路由*/
+//    public static final String PANO_QUEUE_ROUTING = "720FdQueueRouting";
+//
+//
+//    /** 全景图队列*/
+//    public static final String TEST_QUEUE = "testOwenQueue";
+//
+//    /** 全景图交换机*/
+//    public static final String TEST_EXCHANGE = "testOwenExchange";
+//
+//    /** 全景图交换机路由*/
+//    public static final String TEST_QUEUE_ROUTING = "testOwenQueueRouting";
+//
+//
+//
+//
+//
+//
+//    /**
+//     * 全景图模型队列
+//     */
+//    @Bean
+//    public Queue panoQueue() {
+//        return new Queue(PANO_QUEUE);
+//    }
+//
+//    /**
+//     * 全景图交换机
+//     */
+//    @Bean
+//    public Exchange panoExchange(){
+//        return new DirectExchange(PANO_EXCHANGE, true, false);
+//    }
+//
+//
+//    /**
+//     * 全景图队列绑定交换机
+//     */
+//    @Bean
+//    public Binding panoQueueExchange(Queue panoQueue, Exchange panoExchange){
+//        return BindingBuilder.bind(panoQueue).to(panoExchange).with(PANO_QUEUE_ROUTING).noargs();
+//    }
+//
+//
+//    /**
+//     * 全景图模型队列
+//     */
+//    @Bean
+//    public Queue testQueue() {
+//        return new Queue(TEST_QUEUE);
+//    }
+//
+//    /**
+//     * 全景图交换机
+//     */
+//    @Bean
+//    public Exchange testExchange(){
+//        return new DirectExchange(TEST_EXCHANGE, true, false);
+//    }
+//
+//
+//    /**
+//     * 全景图队列绑定交换机
+//     */
+//    @Bean
+//    public Binding testQueueExchange(Queue testQueue, Exchange testExchange){
+//        return BindingBuilder.bind(testQueue).to(testExchange).with(TEST_QUEUE_ROUTING).noargs();
+//    }
+//
+//
+//    /**
+//     * 以下三个方法是配置集群
+//     * @return
+//     */
+//    @Bean
+//    public SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory() {
+//        SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
+//        factory.setConnectionFactory(connectionFactory());
+//        factory.setPrefetchCount(1);
+//        return factory;
+//    }
+//
+//    @Bean
+//    public ConnectionFactory connectionFactory() {
+//        CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
+//        connectionFactory.setAddresses(address);
+//        connectionFactory.setUsername(username);
+//        connectionFactory.setPassword(password);
+//        connectionFactory.setVirtualHost("/");
+//        connectionFactory.setPublisherConfirms(true);
+//        return connectionFactory;
+//    }
+//
+//    @Bean
+//    @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+//    public RabbitTemplate rabbitTemplate() {
+//        return new RabbitTemplate(connectionFactory());
+//    }
+//
+//
+//
+//}

+ 6 - 0
720yun_fd_manage/gis_common/src/main/java/com/gis/common/httpclient/FdkkClient.java

@@ -1,7 +1,9 @@
 package com.gis.common.httpclient;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.dtflys.forest.annotation.Get;
+import com.dtflys.forest.annotation.Header;
 import com.dtflys.forest.annotation.Var;
 import com.dtflys.forest.extensions.DownloadFile;
 import com.gis.common.util.Result;
@@ -18,5 +20,9 @@ public interface FdkkClient {
     **/
     @Get("/service/manage/inner/getServiceUpTip?type=2")
     Result getServiceUpTip();
+    @Get(value = "/api/laser/getSnCodeByPhone?phone={phone}&sceneSource={sceneSource}")
+    JSONObject getCameraListByPhone(@Var("phone") String phone, @Var("sceneSource") Integer sceneSource);
+    @Get(value = "/api/laser/getSnCodeByPhone?sceneSource={sceneSource}")
+    JSONObject getCameraListByToken(@Header("token") String token, @Var("sceneSource") String sceneSource);
 
 }

+ 81 - 0
720yun_fd_manage/gis_common/src/main/java/com/gis/common/mq/RabbitMqProducerUtil.java

@@ -0,0 +1,81 @@
+package com.gis.common.mq;
+
+import com.alibaba.fastjson.JSONObject;
+import com.rabbitmq.client.AMQP.Queue.DeclareOk;
+import com.rabbitmq.client.Channel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.amqp.rabbit.connection.CorrelationData;
+import org.springframework.amqp.rabbit.core.ChannelCallback;
+import org.springframework.amqp.rabbit.core.RabbitTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.UUID;
+
+/**
+ * <p>
+ * TODO
+ * </p>
+ *
+ * @author dengsixing
+ * @since 2022/4/19
+ **/
+@Component
+public class RabbitMqProducerUtil {
+
+    private Logger log = LoggerFactory.getLogger(this.getClass().getName());
+
+
+    @Autowired
+    private RabbitTemplate rabbitTemplate;
+
+    /**
+     * 工作队列模式发送消息
+     * @param queue 队列名
+     * @param content 载荷
+     */
+    public void sendByWorkQueue(String queue, Object content){
+        String messageId = UUID.randomUUID().toString();
+        String jsonObject = JSONObject.toJSONString(content);
+        log.info("开始发送Mq消息,messageId:{},消息队列:{},消息内容:{}",messageId, queue,jsonObject);
+        rabbitTemplate.convertAndSend(queue, jsonObject, message -> {
+            message.getMessageProperties().setMessageId(messageId);
+            return message;
+        }, new CorrelationData(messageId));
+    }
+
+    /**
+     * 工作队列模式发送带优先级消息
+     * @param queue 队列名
+     * @param content 载荷
+     * @param priority 优先级,正整数,值越大优先级越高,当值大于队列设置的最大优先级时,效果等同于最大优先级
+     */
+    public void sendByWorkQueue(String queue, Object content, Integer priority){
+        String messageId = UUID.randomUUID().toString();
+        String jsonObject = JSONObject.toJSONString(content);
+        log.info("开始发送Mq消息,messageId:{},消息队列:{},消息内容:{}",messageId, queue, jsonObject);
+        rabbitTemplate.convertAndSend(queue, content, message -> {
+            message.getMessageProperties().setMessageId(messageId);
+            message.getMessageProperties().setPriority(priority);
+            return message;
+        }, new CorrelationData(messageId));
+    }
+
+    /**
+     * 获取队列未被消费的消息数量
+     * @return
+     */
+    public int getMessageCount(String queueName) {
+        DeclareOk declareOk = rabbitTemplate.execute(new ChannelCallback<DeclareOk>() {
+            public DeclareOk doInRabbit(Channel channel) throws Exception {
+                return channel.queueDeclarePassive(queueName);
+            }
+        });
+
+        return declareOk.getMessageCount();
+    }
+
+
+
+}

+ 4 - 0
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/AgePageDto.java

@@ -3,6 +3,8 @@ package com.gis.domain.dto;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * Created by owen on 2022/10/31 0031 18:31
  * 四维看看后端使用
@@ -23,6 +25,8 @@ public class AgePageDto extends PageDateDto {
     @ApiModelProperty(value = "排序字段:time:创建日期(默认) | visit:浏览量")
     private String orderBy;
 
+    private List<String> snCodes;
+
 
 
 }

+ 11 - 0
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/DoSliceDTO.java

@@ -0,0 +1,11 @@
+package com.gis.domain.dto;
+import lombok.Data;
+
+/**
+ * @author Xiewj
+ * @date 2024/4/7
+ */
+@Data
+public class DoSliceDTO {
+    private Long id;
+}

+ 10 - 2
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/dto/WorkIdDto.java

@@ -1,13 +1,21 @@
 package com.gis.domain.dto;
 
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 
+/**
+ * Created by Xiewj on  2024年4月18日14:09:13
+ */
 @Data
 public class WorkIdDto {
 
-    @NotBlank(message = "workId不能为空")
-    private String workId;
+    @NotBlank(message = "id不能为空")
+    @ApiModelProperty(value = "id" ,required = true)
+    private String id;
+
+
+
 
 }

+ 63 - 0
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/entity/ScenePanoEntity.java

@@ -0,0 +1,63 @@
+package com.gis.domain.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+import javax.persistence.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 四维看看场景全景图表
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+@Data
+@ApiModel("四维看看场景全景图表")
+@Table(name = "tb_scene_pano")
+public class ScenePanoEntity extends BaseEntity implements Serializable  {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("wordid")
+    private String workId;
+
+    @ApiModelProperty("名称")
+    private String name;
+
+    @ApiModelProperty("服务器存放地址")
+    private String filePath;
+
+    @ApiModelProperty("oss存放地址")
+    private String ossPath;
+
+    @ApiModelProperty("状态")
+    private Integer status;
+
+    @ApiModelProperty("封面图")
+    private String icon;
+
+    @ApiModelProperty("文件名")
+    private String fileName;
+
+    @ApiModelProperty("场景码")
+    private String sceneCode;
+
+    @ApiModelProperty("文件大小,单位MB")
+    private String fileSize;
+
+    @ApiModelProperty("预览图(全景图使用)")
+    private String previewIcon;
+
+    @ApiModelProperty("tour.xml")
+    private String tour;
+
+    @ApiModelProperty("四维看看场景码")
+    private String num;
+
+    @ApiModelProperty("vision-id")
+    private String visid;
+    @ApiModelProperty("vision-uuid")
+    private String uuid;
+}

+ 19 - 1
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/entity/WorkEntity.java

@@ -9,6 +9,7 @@ import lombok.Data;
 import javax.persistence.Entity;
 import javax.persistence.Table;
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * 作品表
@@ -54,18 +55,35 @@ public class WorkEntity extends BaseStrEntity implements Serializable {
     @ApiModelProperty(value = "场景码")
     private String sceneCodes;
 
-    @ApiModelProperty(value = "作品类型:pano:全是全景图 | 4dkk: 全是四维看看 : mix:混合(pano+4dkk), 通过sceneCodes判断")
+    @ApiModelProperty(value = "作品类型:pano:全是全景图 | 4dkk: 全是四维看看 : mix:混合(pano+4dkk), 通过sceneCodes判断 | pro 四维看看直接拍摄生成")
     private String type;
 
     @ApiModelProperty(value = "简介")
     private String description;
+    //计算状态
+    @ApiModelProperty(value = "计算状态:0-计算中 1-计算成功  -1-计算失败")
+    private Integer calcStatus;
+
+    @ApiModelProperty(value = "四维看看场景码")
+    private String num;
 
     @ApiModelProperty(value = "名称")
     private String name;
+    @ApiModelProperty(value = "相机编码")
+    private String snCode;
 
     @ApiModelProperty(value = "封面图")
     private String icon;
 
     @ApiModelProperty(value = " 0/1 进入全景图自动巡游开关 默认1")
     private Integer isAuto;
+
+    private Integer location;
+
+
+    @ApiModelProperty(value = "场景来源:相机拍摄10以内表示,1表示八目,2双目,3转台,4 激光 5深光  其他来源10以上,11:一键换装,12:123看房,13文通虚拟场景")
+    private Integer sceneSource;
+
+    @ApiModelProperty(value = "计算完成时间")
+    private Date algorithmTime;
 }

+ 22 - 0
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/vo/WorkIdVO.java

@@ -0,0 +1,22 @@
+package com.gis.domain.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * Created by Xiewj on  2024年4月18日14:09:13
+ */
+@Data
+public class WorkIdVO {
+
+    @ApiModelProperty(value = "id" ,required = true)
+    private String id;
+
+    @ApiModelProperty(value = "四维看看场景码")
+    private String num;
+    //计算状态
+    @ApiModelProperty(value = "计算状态:0-计算中 1-计算成功  -1-计算失败")
+    private Integer calcStatus;
+}

+ 14 - 0
720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/ScenePanoMapper.java

@@ -0,0 +1,14 @@
+package com.gis.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+import com.gis.domain.entity.ScenePanoEntity;
+
+/**
+* 四维看看场景全景图表 Mapper
+*
+* @author Xiewj
+* @since 2024-04-03 18:01
+*/
+@Mapper
+public interface ScenePanoMapper extends IBaseMapper<ScenePanoEntity,Long> {
+}

+ 4 - 1
720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/WorkMapper.java

@@ -36,7 +36,7 @@ public interface WorkMapper extends BaseMapper<WorkEntity> {
      * @param id
      * @return
      */
-    @Select("select id, name, scene_codes, user_id from tb_work where is_delete = 0 and id = #{id} for update")
+    @Select("select id, name, scene_codes, user_id, type, sn_code , num from tb_work where is_delete = 0 and id = #{id} for update")
     WorkEntity findByIdForUpdate(String id);
 
 
@@ -54,4 +54,7 @@ public interface WorkMapper extends BaseMapper<WorkEntity> {
 
     @SelectProvider(type = BaseProvider.class, method = "selectSql")
     List<ReportWorkVo> groupByTypeSql(String format);
+
+    @Select("select * from tb_work where is_delete=0 and (id =#{id} or num =#{id})")
+    WorkEntity findByIdOrNum(String id);
 }

+ 12 - 2
720yun_fd_manage/gis_mapper/src/main/java/com/gis/mapper/provider/WorkProvider.java

@@ -1,5 +1,6 @@
 package com.gis.mapper.provider;
 
+import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.StrUtil;
 import com.gis.common.util.RegexUtil;
 import com.gis.domain.dto.AgePageDto;
@@ -8,6 +9,8 @@ import lombok.extern.log4j.Log4j2;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 
+import java.util.List;
+
 /**
  * Created by owen on 2021/1/8 0008 16:50
  */
@@ -15,8 +18,7 @@ import org.apache.commons.lang3.StringUtils;
 public class WorkProvider {
 
     public String search(AgePageDto param, String userId){
-        StringBuffer sql = new StringBuffer("select * from tb_work where is_delete = 0 and status > 0");
-
+        StringBuffer sql = new StringBuffer("select * from tb_work where is_delete = 0");
         if(StrUtil.isNotBlank(userId)){
             sql.append(" and ( user_id = '").append(RegexUtil.escapeChar(userId)).append("' )");
         }
@@ -43,6 +45,14 @@ public class WorkProvider {
             sql.append(" and create_time between '").append(startTime).append("' and '").append(endTime).append("'");
         }
 
+        List<String> snCodes = param.getSnCodes();
+        if (ArrayUtil.isNotEmpty(snCodes)){
+//            sql.append(" and (  sn_code in (").append(StringUtils.join(snCodes, ",")).append(") )");
+            sql.append(" and (  sn_code in ('").append(StringUtils.join(snCodes, "','")).append("') )");
+        }else {
+            sql.append(" and status > 0 and location is null");
+        }
+
 
         String orderBy = param.getOrderBy();
         orderBy = "visit".equals(orderBy) ? "visit" : "create_time";

+ 16 - 0
720yun_fd_manage/gis_service/src/main/java/com/gis/service/ScenePanoService.java

@@ -0,0 +1,16 @@
+package com.gis.service;
+
+import com.gis.domain.entity.ScenePanoEntity;
+
+import java.util.List;
+
+/**
+ * 四维看看场景全景图表 服务类接口
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+public interface ScenePanoService extends IBaseService<ScenePanoEntity,Long> {
+    ScenePanoEntity findByWorkIdAndName(String workId, String imgName);
+    List<ScenePanoEntity> findByWorkId(String workId);
+}

+ 4 - 0
720yun_fd_manage/gis_service/src/main/java/com/gis/service/WorkService.java

@@ -61,4 +61,8 @@ public interface WorkService extends IService<WorkEntity> {
     Result<WorkEntity> addWork(WorkAddDto workAddDto);
 
     Result<WorkEntity> editWork(WordAllDto workAddDto);
+
+    Result<WorkEntity> searchSceneWorkList(AgePageDto param);
+
+    WorkEntity findByIdOrNum(String id);
 }

+ 12 - 7
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -13,6 +13,7 @@ import com.gis.common.constant.CmdConstant;
 import com.gis.common.constant.ConfigConstant;
 import com.gis.common.constant.ErrorEnum;
 import com.gis.common.exception.BaseRuntimeException;
+import com.gis.common.mq.RabbitMqProducerUtil;
 import com.gis.common.util.*;
 import com.gis.domain.dto.*;
 import com.gis.domain.entity.*;
@@ -33,6 +34,7 @@ import org.junit.Test;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
@@ -55,10 +57,7 @@ public class FodderServiceImpl extends ServiceImpl<FodderMapper,FodderEntity> im
     FodderMapper entityMapper;
 
     @Autowired
-    RabbitTemplate rabbitTemplate;
-
-    @Autowired
-    RabbitConfig rabbitConfig;
+    RabbitMqProducerUtil rabbitMqProducer;
 
     @Autowired
     ConfigConstant configConstant;
@@ -86,6 +85,8 @@ public class FodderServiceImpl extends ServiceImpl<FodderMapper,FodderEntity> im
 
     @Autowired
     UserRequest userRequest;
+    @Value("${queue.do-slice-queue}")
+    String doSliceQueue;
 
     // 用户最大空间3G
     static int MAX_SIZE = 1024 * 1024 * 3;
@@ -225,7 +226,9 @@ public class FodderServiceImpl extends ServiceImpl<FodderMapper,FodderEntity> im
             if (type.equals("pano")) {
                 log.info("准备发送消息: " + entity.getId());
                 //发消息到mq
-                rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, entity.getId());
+                Map<String,Object> map=new HashMap<>();
+                map.put("id", entity.getId());
+                rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
                 log.info("发送消息到队列完成: " + entity.getId());
             }
             long end = System.currentTimeMillis();
@@ -587,7 +590,7 @@ public class FodderServiceImpl extends ServiceImpl<FodderMapper,FodderEntity> im
         wrapper.orderByAsc(DirEntity::getCreateTime);
 
         List<DirEntity> dirs = dirService.list(wrapper);
-        
+
         // 转换实体数据
         List<FodderEntity> list = new ArrayList<>();
         FodderEntity entity = null;
@@ -730,7 +733,9 @@ public class FodderServiceImpl extends ServiceImpl<FodderMapper,FodderEntity> im
         List<FodderEntity> fodderEntities = list(wrapper);
         log.info("重新入队数量{}",fodderEntities.size());
         for (FodderEntity fodderEntity : fodderEntities) {
-            rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, fodderEntity.getId());
+            Map<String,Object> map=new HashMap<>();
+            map.put("id",  fodderEntity.getId());
+            rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
         }
     }
 }

+ 41 - 0
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/ScenePanoServiceImpl.java

@@ -0,0 +1,41 @@
+package com.gis.service.impl;
+
+import com.gis.mapper.IBaseMapper;
+import com.gis.service.ScenePanoService;
+import com.gis.domain.entity.ScenePanoEntity;
+import com.gis.mapper.ScenePanoMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 四维看看场景全景图表 服务实现类
+ *
+ * @author Xiewj
+ * @since 2024-04-03 18:01
+ */
+@Service
+public class ScenePanoServiceImpl extends IBaseServiceImpl<ScenePanoEntity, Long> implements ScenePanoService {
+    @Autowired
+
+    private ScenePanoMapper scenePanoMapper;
+    @Override
+    public IBaseMapper<ScenePanoEntity, Long> getBaseMapper() {
+        return this.scenePanoMapper;
+    }
+    @Override
+    public ScenePanoEntity findByWorkIdAndName(String workId, String imgName) {
+        ScenePanoEntity one=new ScenePanoEntity();
+        one.setWorkId(workId);
+        one.setName(imgName);
+        return getBaseMapper().selectOne(one);
+    }
+
+    @Override
+    public List<ScenePanoEntity> findByWorkId(String workId) {
+        ScenePanoEntity one=new ScenePanoEntity();
+        one.setWorkId(workId);
+        return getBaseMapper().select(one);
+    }
+}

+ 117 - 6
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/WorkServiceImpl.java

@@ -4,7 +4,6 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
-import cn.hutool.http.HttpUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -16,11 +15,17 @@ import com.gis.common.constant.ConfigConstant;
 import com.gis.common.constant.ErrorEnum;
 import com.gis.common.constant.RedisConstant;
 import com.gis.common.constant.SomeDataConstant;
+import com.gis.common.constant.*;
 import com.gis.common.exception.BaseRuntimeException;
 import com.gis.common.httpclient.FdkkClient;
+import com.gis.common.mq.RabbitMqProducerUtil;
 import com.gis.common.util.*;
 import com.gis.domain.dto.*;
 import com.gis.domain.entity.*;
+import com.gis.domain.entity.FodderEntity;
+import com.gis.domain.entity.ScenePanoEntity;
+import com.gis.domain.entity.WorkEntity;
+import com.gis.domain.entity.WorkHotsFodderEntity;
 import com.gis.domain.vo.ReportWorkVo;
 import com.gis.mapper.*;
 import com.gis.oss.util.FileAndOssUtil;
@@ -28,6 +33,10 @@ import com.gis.oss.util.FileUtils;
 import com.gis.oss.util.QrCodeUtils;
 import com.gis.service.*;
 import com.gis.util.UserRequest;
+import com.gis.service.FodderService;
+import com.gis.service.ScenePanoService;
+import com.gis.service.WorkHotsFodderService;
+import com.gis.service.WorkService;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
@@ -37,6 +46,7 @@ import org.apache.http.util.EntityUtils;
 import org.junit.Test;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
@@ -102,6 +112,17 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
     WorkCustomButtonService workCustomButtonService;
     @Autowired
     UserRequest userRequest;
+    @Resource
+    ScenePanoService scenePanoService;
+    @Autowired
+    RabbitMqProducerUtil rabbitMqProducer;
+    @Value("${queue.relics-update-name-queue}")
+    String relicsUpdateNameQueue;
+    @Override
+    public IBaseStrMapper<WorkEntity, String> getBaseMapper() {
+        return this.entityMapper;
+    }
+
 
     @Override
     public Result search(AgePageDto param, boolean isAdmin) {
@@ -430,9 +451,23 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
         } catch (InterruptedException e) {
             e.printStackTrace();
         }
-        String userNameForToken = userRequest.getUserNameForToken();
-        if (!userNameForToken.equals(entity.getUserId())) {
+        String userNameForToken = getUserNameForToken();
+        if (!userNameForToken.equals(entity.getUserId())&&ObjectUtil.isEmpty(entity.getNum())) {
             return Result.failure(ErrorEnum.FAILURE_SYS_3011.code(), "当前无操作权限");
+        } else if (ObjectUtil.isNotEmpty(entity.getType())&&entity.getType().equalsIgnoreCase("pro")){
+            JSONObject cameraList =fdkkClient.getCameraListByToken(getToken(),"3,4,5");
+            List<String> snCodes = new ArrayList<>();
+            if (cameraList.getInteger("code") == 0) {
+                JSONArray data = cameraList.getJSONObject("data").getJSONArray("snCodes");
+                for (Object datum : data) {
+                    snCodes.add(String.valueOf(datum));
+                }
+                if (!snCodes.contains(entity.getSnCode())) {
+                    return Result.failure(ErrorEnum.FAILURE_SYS_3011.code(), "当前无操作权限");
+                }
+            } else {
+                return Result.failure("获取四维用户激光数据失败");
+            }
         }
 
         // 更新作品信息
@@ -450,7 +485,13 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
         DateUtils.spendTime(startTime, "someData更新oss完成");
 
         // 更新跟目录tour.xml 2022-09-15
-        updateTour(someDataToJson, id);
+        if (ObjectUtil.isNotEmpty(entity.getType())&&entity.getType().equalsIgnoreCase("pro")){
+            updateProTour(someDataToJson, id);
+        }else {
+            updateTour(someDataToJson, id);
+        }
+
+
         DateUtils.spendTime(startTime, "tour更新oss完成");
 
         return Result.success();
@@ -494,6 +535,42 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
         DateUtils.spendTime(startTime, "tour上传oss");
     }
 
+    /**
+     * 更新 tour.xml
+     * @param someDataToJson
+     * @param id
+     */
+    private void updateProTour(JSONObject someDataToJson, String id) {
+        long startTime = System.currentTimeMillis();
+        String scenes = someDataToJson.getString("scenes");
+        BaseRuntimeException.isBlank(scenes, null, "someData的场景码参数未空");
+        List<ScenePanoEntity> listPano = scenePanoService.findByWorkId(id);
+        List<FodderEntity> list = fodderService.batchBySceneCodes(getSceneCodesList(scenes));
+
+        // 读取tour.xml模板
+        String baseTour = getBaseTour();
+        StringBuilder builder = new StringBuilder();
+        builder.append(baseTour).append("\r\n");
+        for (FodderEntity entity : list) {
+            String tour = entity.getTour();
+            builder.append(tour).append("\r\n");
+        }
+        for (ScenePanoEntity entity : listPano) {
+            String tour = entity.getTour();
+            builder.append(tour).append("\r\n");
+        }
+
+        // 添加结束标签
+        builder.append("</krpano>");
+
+        String tourPath = configConstant.serverBasePath + id + "/tour.xml";
+        FileUtil.writeUtf8String(builder.toString(), tourPath);
+        log.info("作品tour.xml写入完成");
+
+        String ossKeyPath = configConstant.ossBasePath + id + "/tour.xml";
+        fileAndOssUtil.upload(tourPath, ossKeyPath);
+        log.info("tour.xml上传完成 : {}", ossKeyPath);
+    }
 
     private String getBaseTour(){
         String baseTourPath = configConstant.serverBasePath + "baseData/tour.xml";
@@ -509,6 +586,13 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
      */
     private boolean editEntity(JSONObject someDataJson, WorkEntity entity) {
         entity.setName(someDataJson.getString("name"));
+        if (ObjectUtil.isNotNull(entity.getNum())){
+            Map<String,Object> map=new HashMap<>();
+            map.put("sceneCode", entity.getNum());
+            map.put("sceneName", entity.getName());
+            rabbitMqProducer.sendByWorkQueue(relicsUpdateNameQueue,map);
+         }
+
         entity.setIcon(someDataJson.getString("icon"));
         entity.setShare(someDataJson.getString("share"));
         entity.setQrCode(someDataJson.getString("qrCode"));
@@ -562,8 +646,10 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
 
         entity.setSceneCodes(sceneCodes);
         // 2022-12-19 作品类型
-        String type = getTypeBySceneCodes(sceneCodes);
-        entity.setType(type);
+        if (ObjectUtil.isNotEmpty(entity.getType())&&!entity.getType().equalsIgnoreCase("pro")){
+            String type = getTypeBySceneCodes(sceneCodes);
+            entity.setType(type);
+        }
         // 更新logoQrCode
         Boolean logoChange = someDataJson.getBoolean("logoChange");
         String logoUrl = someDataJson.getString("logo");
@@ -1239,4 +1325,29 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper,WorkEntity> implemen
         }
         return null;
     }
+
+    @Override
+    public Result<WorkEntity> searchSceneWorkList(AgePageDto param) {
+        String token = getToken();
+        JSONObject cameraList =fdkkClient.getCameraListByToken(token,"3,4,5");
+        List<String> snCodes = new ArrayList<>();
+        if (cameraList.getInteger("code") == 0) {
+            JSONArray data = cameraList.getJSONObject("data").getJSONArray("snCodes");
+            for (Object datum : data) {
+                snCodes.add(String.valueOf(datum));
+            }
+        } else {
+            return Result.failure("获取四维用户激光数据失败");
+        }
+        startPage(param);
+        param.setSnCodes(snCodes);
+        List<WorkEntity> search = entityMapper.search(param, "");
+
+        return Result.success(new PageInfo<>(search));
+    }
+
+    @Override
+    public WorkEntity findByIdOrNum(String id) {
+        return entityMapper.findByIdOrNum(id);
+    }
 }

+ 2 - 0
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/BaseController.java

@@ -32,6 +32,8 @@ public class BaseController {
 
     public String getUserNameForToken(){
         /** 获取header token */
+        if (request.getHeader("token") == null) return null;
+        /** 获取header token */
         String token = request.getHeader("token");
         if (org.apache.commons.lang3.StringUtils.isNotBlank(token)){
             return JwtUtil.getUsername(token);

+ 14 - 7
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/TestController.java

@@ -2,8 +2,9 @@ package com.gis.web.controller;
 
 import cn.hutool.core.io.FileUtil;
 import com.gis.common.constant.ConfigConstant;
-import com.gis.common.config.RabbitConfig;
+import com.gis.common.mq.RabbitMqProducerUtil;
 import com.gis.common.util.Result;
+import com.gis.domain.dto.DoSliceDTO;
 import com.gis.domain.dto.TestShDto;
 import com.gis.domain.entity.WorkEntity;
 import com.gis.oss.util.AliYunOssUtil;
@@ -19,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.junit.Test;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -28,7 +30,9 @@ import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.*;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -68,8 +72,10 @@ public class TestController extends BaseController {
 
     @Autowired
     WorkService workService;
-
-
+    @Autowired
+    RabbitMqProducerUtil rabbitMqProducer;
+    @Value("${queue.do-slice-queue}")
+    String doSliceQueue;
 
 
     /**
@@ -165,11 +171,12 @@ public class TestController extends BaseController {
     @GetMapping("testSendMq")
     @ApiOperation(value = "rabbitMQ发送", position = 1)
     public Result testSendMq(){
-        String param = "owen" + new Date();
-        log.info("MQ param: " + param);
         //发消息到mq
-        rabbitTemplate.convertAndSend(RabbitConfig.TEST_EXCHANGE, RabbitConfig.TEST_QUEUE_ROUTING, param);
-        return Result.success(param);
+        DoSliceDTO doSliceDTO = new DoSliceDTO();
+        doSliceDTO.setId(1L);
+        Map<String, Object> map = new HashMap<>();
+        rabbitMqProducer.sendByWorkQueue(doSliceQueue,map);
+        return Result.success(doSliceDTO);
     }
 
 

+ 50 - 4
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/WebController.java

@@ -1,14 +1,21 @@
 package com.gis.web.controller;
 
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.gis.common.constant.ConfigConstant;
 import com.gis.common.constant.ErrorEnum;
 import com.gis.common.constant.MsgCode;
 import com.gis.common.constant.RedisConstant;
+import com.gis.common.httpclient.FdkkClient;
 import com.gis.common.util.RedisUtil;
 import com.gis.common.util.Result;
+import com.gis.domain.dto.WorkIdDto;
 import com.gis.domain.dto.WorkPwdDto;
 import com.gis.domain.entity.WorkEntity;
+import com.gis.domain.vo.WorkIdVO;
 import com.gis.service.FodderService;
 import com.gis.service.WorkService;
 import com.github.pagehelper.PageHelper;
@@ -19,7 +26,10 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 
@@ -51,11 +61,13 @@ public class WebController extends BaseController {
     RedisUtil redisUtil;
 
 
+    @Resource
+    FdkkClient fdkkClient;
 
     /** 每次浏览作品都需要调用次接口。 浏览量只统计预览跟正式发布的数据 */
     @ApiOperation(value = "检查作品是否可用", notes = "true:可用, false:不可用, visit有值表示要添加浏览量")
     @GetMapping("checkWork/{workId}")
-    public Result checkWork(@PathVariable String workId, String visit) {
+    public Result checkWork(@PathVariable String workId, String visit,String val) {
         log.info("作品id: {}", workId);
         boolean flag = false;
 
@@ -65,6 +77,9 @@ public class WebController extends BaseController {
             }
             flag = true;
             log.info("检查走缓存: {}", workId);
+            WorkEntity entity= (WorkEntity) redisUtil.get(RedisConstant.WORK_ID+workId);
+            Result FAILURE_SYS_3011 = checkWkByUser(entity);
+            if (FAILURE_SYS_3011 != null) return FAILURE_SYS_3011;
             return Result.success(flag);
         }
 
@@ -76,14 +91,38 @@ public class WebController extends BaseController {
             if (visit != null) {
                 workService.addVisit(workId);
             }
-            redisUtil.set(RedisConstant.WORK_ID+workId, entity, 30, TimeUnit.SECONDS);
-
+            redisUtil.set(RedisConstant.WORK_ID + workId, entity, 30, TimeUnit.SECONDS);
+            if (val.equalsIgnoreCase("1")) {
+                Result FAILURE_SYS_3011 = checkWkByUser(entity);
+                if (FAILURE_SYS_3011 != null) return FAILURE_SYS_3011;
+            }
         } else {
             log.warn("作品不存在");
         }
         return Result.success(flag);
     }
 
+    private Result checkWkByUser(WorkEntity entity) {
+        String userNameForToken = getUserNameForToken();
+        if (userNameForToken!=null && !userNameForToken.equals(entity.getUserId())&&ObjectUtil.isEmpty(entity.getNum())) {
+            return Result.failure(ErrorEnum.FAILURE_SYS_3011.code(), "当前无操作权限");
+        } else if (ObjectUtil.isNotEmpty(entity.getType())&& entity.getType().equalsIgnoreCase("pro")){
+            JSONObject cameraList =fdkkClient.getCameraListByToken(getToken(),"3,4,5");
+            List<String> snCodes = new ArrayList<>();
+            if (cameraList.getInteger("code") == 0) {
+                JSONArray data = cameraList.getJSONObject("data").getJSONArray("snCodes");
+                for (Object datum : data) {
+                    snCodes.add(String.valueOf(datum));
+                }
+                if (!snCodes.contains(entity.getSnCode())) {
+                    return Result.failure(ErrorEnum.FAILURE_SYS_3011.code(), "当前无操作权限");
+                }
+            } else {
+                return Result.failure("获取四维用户激光数据失败");
+            }
+        }
+        return null;
+    }
 
 
     @ApiOperation("检验密码")
@@ -125,5 +164,12 @@ public class WebController extends BaseController {
     }
 
 
-
+    @ApiOperation(value = "混合查下场景码或者作品id" , position = 4)
+    @PostMapping("getIdInfo")
+    public Result getIdInfo(@RequestBody WorkIdDto workIdDto) {
+        WorkEntity workEntity=workService.findByIdOrNum(workIdDto.getId());
+        WorkIdVO workIdVO=new WorkIdVO();
+        BeanUtil.copyProperties(workEntity,workIdVO);
+        return Result.success(workIdVO);
+    }
 }

+ 32 - 1
720yun_fd_manage/gis_web/src/main/java/com/gis/web/controller/WorkController.java

@@ -1,9 +1,13 @@
 package com.gis.web.controller;
 
 
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.gis.common.constant.ErrorEnum;
 import com.gis.common.constant.MsgCode;
 import com.gis.common.constant.RedisConstant;
+import com.gis.common.httpclient.FdkkClient;
 import com.gis.common.util.RedisUtil;
 import com.gis.common.util.Result;
 import com.gis.domain.dto.*;
@@ -20,7 +24,10 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.annotation.Resource;
 import javax.validation.Valid;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 
@@ -48,6 +55,8 @@ public class WorkController extends BaseController {
     RedisUtil redisUtil;
 
 
+    @Resource
+    FdkkClient fdkkClient;
 
     @ApiOperation(value = "列表", position = 1)
     @PostMapping("list")
@@ -55,6 +64,12 @@ public class WorkController extends BaseController {
         return workService.search(param, false);
     }
 
+    @ApiOperation(value = "四维看看相机拍摄坐标列表", position = 1)
+    @PostMapping("sceneWorkList")
+    public Result<WorkEntity> sceneWorkList(@RequestBody AgePageDto param) {
+        return workService.searchSceneWorkList(param);
+    }
+
 
     /**
      * 创建一个基础someData.json
@@ -163,10 +178,26 @@ public class WorkController extends BaseController {
         String userId = getUserNameForToken();
         log.info("userId: {}", userId);
 
-        if (!userId.equals(entity.getUserId())) {
+
+        if (!userId.equals(entity.getUserId())&&ObjectUtil.isNotEmpty(entity.getType())&&!entity.getType().equalsIgnoreCase("pro")) {
             return Result.failure(MsgCode.e3005, "当前无操作权限");
+        } else if (ObjectUtil.isNotEmpty(entity.getType())&&entity.getType().equalsIgnoreCase("pro")){
+            JSONObject cameraList =fdkkClient.getCameraListByToken(getToken(),"3,4,5");
+            List<String> snCodes = new ArrayList<>();
+            if (cameraList.getInteger("code") == 0) {
+                JSONArray data = cameraList.getJSONObject("data").getJSONArray("snCodes");
+                for (Object datum : data) {
+                    snCodes.add(String.valueOf(datum));
+                }
+                if (!snCodes.contains(entity.getSnCode())) {
+                    return Result.failure(ErrorEnum.FAILURE_SYS_3011.code(), "当前无操作权限");
+                }
+            } else {
+                return Result.failure("获取四维用户激光数据失败");
+            }
         }
 
+
         redisUtil.set(RedisConstant.WORK_ID + workId, entity, 30, TimeUnit.SECONDS);
 
         return Result.success();

+ 5 - 9
720yun_fd_manage/pom.xml

@@ -150,15 +150,6 @@
                 <version>${spring.boot.version}</version>
             </dependency>
 
-
-            <!--rabbit MQ-->
-            <dependency>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-starter-amqp</artifactId>
-                <version>${spring.boot.version}</version>
-            </dependency>
-
-
             <!-- lombok -->
             <dependency>
                 <groupId>org.projectlombok</groupId>
@@ -313,6 +304,11 @@
                 <artifactId>qrext4j</artifactId>
                 <version>${qrext4j.version}</version>
             </dependency>
+            <dependency>
+                <groupId>com.fdkankan</groupId>
+                <artifactId>4dkankan-utils-rabbitmq</artifactId>
+                <version>3.0.0-SNAPSHOT</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 1 - 1
720yun_fd_manage/run.sh

@@ -14,7 +14,7 @@ startApp(){
     	echo "程序已经在运行了"
     else
     	echo "执行 start 方法"
-    	nohup java -jar -Xmx3072M -Xms512M ./$APP_NAME --spring.profiles.active=$APP_EVN --server.port=$APP_PORT > logs.log 2>error.log &  # 说明pid为空
+    	nohup java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5531 -jar -Xmx3072M -Xms512M ./$APP_NAME --spring.profiles.active=$APP_EVN --server.port=$APP_PORT > logs.log 2>error.log &  # 说明pid为空
 	echo Start Success!
 fi
 }