Browse Source

初始化

tags/v1.1.2
wanghaoran 2 years ago
parent
commit
04c6beb4ac
100 changed files with 7112 additions and 0 deletions
  1. +40
    -0
      .gitignore
  2. +84
    -0
      pom.xml
  3. +296
    -0
      tuoheng-admin/pom.xml
  4. +21
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/AdminApplication.java
  5. +99
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/advice/CustomExceptionHandler.java
  6. +45
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/advice/CustomWrapHandler.java
  7. +29
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/common/ServiceConstant.java
  8. +91
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/common/ServiceExceptionEnum.java
  9. +80
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/AliyuncsVodConfig.java
  10. +21
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/EmbeddedServletContainerConfig.java
  11. +36
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/ExecutorConfig.java
  12. +72
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/MQConfig.java
  13. +22
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/UploadConfig.java
  14. +14
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/config/WebSocketConfig.java
  15. +62
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AliyunOssController.java
  16. +48
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AliyuncsVodController.java
  17. +37
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AnalyseController.java
  18. +39
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AnalysisDatasController.java
  19. +84
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/CloudBoxController.java
  20. +88
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/EquipmentController.java
  21. +87
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/EquipmentMountController.java
  22. +52
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/FlightDataController.java
  23. +173
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java
  24. +88
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java
  25. +85
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/LiveChannelController.java
  26. +74
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/QuestionController.java
  27. +156
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/RealTimeLocationSocket.java
  28. +76
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ReportController.java
  29. +82
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ReportPatrolController.java
  30. +100
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/StreamController.java
  31. +90
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/StreamGisController.java
  32. +80
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/TaskFileController.java
  33. +130
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ThInspectionQuestionController.java
  34. +30
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AiImageCheckout.java
  35. +57
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AiImageLog.java
  36. +56
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/CloudBox.java
  37. +112
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Equipment.java
  38. +58
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/EquipmentMount.java
  39. +86
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/FlightData.java
  40. +121
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/InspectionFile.java
  41. +67
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/InspectionQuestionItem.java
  42. +77
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/LiveChannel.java
  43. +52
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Question.java
  44. +111
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/RealTimeOverview.java
  45. +113
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Report.java
  46. +112
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ReportPatrol.java
  47. +115
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Stream.java
  48. +55
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/StreamGis.java
  49. +90
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/TaskListData.java
  50. +113
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThFlightData.java
  51. +316
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspection.java
  52. +83
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionCheck.java
  53. +158
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionFile.java
  54. +85
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionQuestion.java
  55. +85
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionQuestionItem.java
  56. +63
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThVodVideo.java
  57. +30
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Thbusiness.java
  58. +25
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/VodVideoDO.java
  59. +46
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiAnalysisResult.java
  60. +41
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiOfflineTask.java
  61. +60
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiTaskResult.java
  62. +129
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/AddThInspectionRequest.java
  63. +53
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/AnalysisQuery.java
  64. +30
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/CloudBoxQuery.java
  65. +25
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/EquipmentMountQuery.java
  66. +58
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/EquipmentQuery.java
  67. +17
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/FlightDataQuery.java
  68. +17
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/HandleImageRequest.java
  69. +28
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/LiveChannelQuery.java
  70. +57
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryInspectionRequest.java
  71. +42
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryQuestionPictureRequest.java
  72. +44
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryQuestionRequest.java
  73. +34
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionFileRequest.java
  74. +45
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionInventoryRequest.java
  75. +28
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionQuery.java
  76. +53
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/ReportRequest.java
  77. +68
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/StreamGisQuery.java
  78. +50
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/StreamQuery.java
  79. +71
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UAVKHQuestionRequest.java
  80. +15
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UpdateLiveChannel.java
  81. +28
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UploadVideoUrlRequest.java
  82. +21
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/AIInspectionVo.java
  83. +131
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/EquipmentVo.java
  84. +40
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/InspectionFileInfoVo.java
  85. +29
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionCountVo.java
  86. +69
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionDetailVo.java
  87. +53
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionFileVo.java
  88. +65
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionInventoryVo.java
  89. +17
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionTypeCountVo.java
  90. +129
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ReportInfoVo.java
  91. +21
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ReportPatrolVo.java
  92. +103
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/StreamGisVo.java
  93. +163
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/StreamInfoVo.java
  94. +63
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionFileVo.java
  95. +121
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionQuestionPictureVo.java
  96. +76
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionQuestionVo.java
  97. +42
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AiAnalyseStatusEnum.java
  98. +26
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AiAnalyseTypeEnum.java
  99. +53
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AliyunVodUploadStatusEnum.java
  100. +0
    -0
      tuoheng-admin/src/main/java/com/tuoheng/admin/enums/ChannelStatusEnum.java

+ 40
- 0
.gitignore View File

@@ -0,0 +1,40 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

/.idea
/.vscode
/.svn
tuoheng-ui
target/
HELP.md

+ 84
- 0
pom.xml View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.tuoheng</groupId>
<artifactId>tuoheng</artifactId>
<version>0.0.1-SNAPSHOT</version>
<!--父模块打包类型必须为pom-->
<packaging>pom</packaging>
<name>tuoheng</name>
<description>Demo project for Spring Boot</description>

<!-- 子模块依赖 -->
<modules>
<module>tuoheng-common</module>
<module>tuoheng-generator</module>
<module>tuoheng-system</module>
<module>tuoheng-admin</module>
<module>tuoheng-api</module>
<!-- <module>tuoheng-generator</module>-->
</modules>

<properties>
<java.version>1.8</java.version>
<!-- 表示打包时跳过mvn test -->
<maven.test.skip>true</maven.test.skip>
<!--全局配置项目版本号-->
<version>0.0.1-SNAPSHOT</version>
<spring-kafka.version>2.8.3</spring-kafka.version>
</properties>

<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- 子模块依赖 -->
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-common</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-generator</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-system</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-admin</artifactId>
<version>${version}</version>
</dependency>
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-api</artifactId>
<version>${version}</version>
</dependency>

<!-- 第三方依赖 -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.62</version>
</dependency>
</dependencies>
</dependencyManagement>

</project>

+ 296
- 0
tuoheng-admin/pom.xml View File

@@ -0,0 +1,296 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- 子模块的parent要使用顶层的父模块-->
<parent>
<artifactId>tuoheng</artifactId>
<groupId>com.tuoheng</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>tuoheng-admin</artifactId>
<packaging>jar</packaging>
<name>tuoheng-admin</name>
<description>Demo project for Spring Boot</description>



<!-- 依赖声明 -->
<dependencies>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>vod20170321</artifactId>
<version>2.16.8</version>
</dependency>
<!-- 核心模块 -->
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-system</artifactId>
</dependency>
<!-- 代码生成 -->
<dependency>
<groupId>com.tuoheng</groupId>
<artifactId>tuoheng-generator</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 引入阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.15.Final</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.9.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
<version>2.0.4.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-amqp -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>[0.4, 0.5)</version>
</dependency>

<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext-rtf</artifactId>
<version>2.1.7</version>
</dependency>

<!--阿里云视频点播-->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.10.2</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-vod</artifactId>
<version>2.15.11</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.28</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-vod</artifactId>
<version>2.15.11</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.62</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-kms</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.aliyun.vod</groupId>
<artifactId>upload</artifactId>
<version>1.4.14</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/aliyun-java-vod-upload-1.4.14.jar</systemPath>
</dependency>


</dependencies>

<profiles>
<!-- 本地开发环境 -->
<profile>
<id>local</id>
<properties>
<package.environment>local</package.environment>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<!-- 开发环境 -->
<profile>
<id>dev</id>
<properties>
<package.environment>dev</package.environment>
</properties>
</profile>
<!-- 测试环境 -->
<profile>
<id>test</id>
<properties>
<package.environment>test</package.environment>
</properties>
</profile>
<!-- 生产环境 -->
<profile>
<id>prod</id>
<properties>
<package.environment>prod</package.environment>
</properties>
</profile>
<!-- 演示环境 -->
<profile>
<id>demo</id>
<properties>
<package.environment>demo</package.environment>
</properties>
</profile>
</profiles>

<build>
<finalName>tuoheng-5gai-new</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
<include>**/*.yml</include>
</includes>
</resource>

<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<includes>
<include>**/*.docx</include>
</includes>
</resource>

<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>

<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<targetPath>WEB-INF/classes</targetPath>
<includes>
<include>application-${package.environment}.yml</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.11.RELEASE</version>
<configuration>
<finalName>${project.build.finalName}</finalName>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>

</project>

+ 21
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/AdminApplication.java View File

@@ -0,0 +1,21 @@
package com.tuoheng.admin;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableAsync
//排除原有的Multipart配置
@SpringBootApplication(scanBasePackages = {"com.tuoheng.*"}, exclude = {MultipartAutoConfiguration.class})
@MapperScan("com.tuoheng.**.mapper")
@EnableTransactionManagement
public class AdminApplication {

public static void main(String[] args) {
SpringApplication.run(AdminApplication.class, args);
}

}

+ 99
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/advice/CustomExceptionHandler.java View File

@@ -0,0 +1,99 @@
package com.tuoheng.admin.advice;

import com.tuoheng.common.common.SysExceptionEnum;
import com.tuoheng.common.exception.ServiceException;
import com.tuoheng.common.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.shiro.dao.DataAccessException;
import org.springframework.validation.BindException;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.List;
import java.util.stream.Collectors;

/**
* 自定义异常处理器
*
* @author zhu_zishuang
* @date 2021-03-12
*/
@Slf4j
@RestControllerAdvice
public class CustomExceptionHandler {
/**
* 密码校验异常
*/
@ExceptionHandler(BindException.class)
@ResponseBody
public JsonResult<Object> handleAuthenticationException(BindException e) {
BindingResult bindingResult = e.getBindingResult();
String errorMessage = "";
for (FieldError fieldError : bindingResult.getFieldErrors()) {
errorMessage += fieldError.getDefaultMessage() + "!";
}
return JsonResult.error(SysExceptionEnum.PARAMETER_EMPTY_EXCEPTION.getCode(), errorMessage);
}

/**
* 校验异常处理
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
@ResponseBody
public JsonResult<Object> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
log.warn("系统参数校验异常,异常信息:{}", e.getMessage());

JsonResult<Object> error = JsonResult.error(SysExceptionEnum.PARAMETER_EMPTY_EXCEPTION.getCode(),
SysExceptionEnum.PARAMETER_EMPTY_EXCEPTION.getMessage());

BindingResult result = e.getBindingResult();
List<FieldError> fieldErrors = result.getFieldErrors();
if (!CollectionUtils.isEmpty(fieldErrors)) {
error.setMsg(fieldErrors.stream().map(FieldError::getDefaultMessage).collect(Collectors.joining(",")));
} else {
if (!CollectionUtils.isEmpty(result.getAllErrors())) {
ObjectError currError = result.getAllErrors().get(0);
error.setMsg(currError.getObjectName() + currError.getDefaultMessage());
}
}

return error;
}

/**
* 系统业务异常处理
*/
@ExceptionHandler(ServiceException.class)
@ResponseBody
public JsonResult<Object> handleServiceException(ServiceException e) {
// 打印业务异常日志
log.warn("系统业务逻辑异常,异常状态码 {},异常信息:{}", e.code, e.getMessage());
return JsonResult.error(e.code, e.getMessage());
}

/**
* 系统数据访问异常处理
*/
@ExceptionHandler(DataAccessException.class)
@ResponseBody
public JsonResult<Object> handleDataAccessException(DataAccessException e) {
log.error("系统数据访问异常,异常信息:{}", e.getMessage());
return JsonResult.error(SysExceptionEnum.DATAACCESS_EXCEPTION.getCode(), SysExceptionEnum.DATAACCESS_EXCEPTION.getMessage());
}

/**
* 系统异常处理
*/
@ExceptionHandler(Exception.class)
@ResponseBody
public JsonResult<Object> handleException(Exception e) {
log.error("系统异常,异常信息:{}", e.getMessage());
return JsonResult.error(SysExceptionEnum.SYS_EXCEPTION.getCode(), SysExceptionEnum.SYS_EXCEPTION.getMessage());
}
}

+ 45
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/advice/CustomWrapHandler.java View File

@@ -0,0 +1,45 @@
package com.tuoheng.admin.advice;

import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.http.server.ServerHttpRequest;
import org.springframework.http.server.ServerHttpResponse;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice;

/**
* 自定义包装处理类
*
* @author zhu_zishuang
* @date 2021-03-12
*/
@Slf4j
@ControllerAdvice(basePackages = "com.tuoheng.admin.controller")
public class CustomWrapHandler<T> implements ResponseBodyAdvice<T> {

@Override
public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> converterType) {
return MappingJackson2HttpMessageConverter.class.isAssignableFrom(converterType);
}

@Override
public T beforeBodyWrite(T body, MethodParameter returnType, MediaType selectedContentType, Class<? extends HttpMessageConverter<?>> selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
/**
* 增、删、改操作返回的状态
*/
if (body.getClass().equals(OperationEnum.class)) {
log.info("接口: {} , 增删改方法!" + request.getURI());
return (T) JsonResult.success();
}

/**
* 读操作
*/
return (T) JsonResult.success(body);
}
}

+ 29
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/common/ServiceConstant.java View File

@@ -0,0 +1,29 @@
package com.tuoheng.admin.common;

/**
* 常量类
*
* @author: zhu_zishuang
* @date: 2020-04-22 14:22
*/
public final class ServiceConstant {
/**
* 构造器私有化
*/
private ServiceConstant() {
// 可抛出异常,防止通过反射实例化对象
}

/**
* 常用数值
*/
public static final Integer ZERO = 0;
public static final Integer ONE = 1;
public static final Integer TWO = 2;
public static final Integer DELETE = 0;
public static final Integer NOT_DELETE = 1;
public static final Integer STATUS_25 = 25;
public static final Integer STATUS_15 = 15;


}

+ 91
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/common/ServiceExceptionEnum.java View File

@@ -0,0 +1,91 @@
package com.tuoheng.admin.common;

import com.tuoheng.common.common.ExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
* 业务异常 枚举
*
* @author zhu_zishuang
* @date 2021-03-12
*/
@AllArgsConstructor
public enum ServiceExceptionEnum implements ExceptionInterface {

/**
* 未查询到数据
*/
GET_NO_DATA(10001, "未查到该记录!"),
/**
* 参数为空
*/
PARAMETER_IS_NULL(10002, "参数为空!"),

/**
* 获取用户ID失败
*/
GET_NO_USER_ID(10003, "获取用户ID失败!"),

/**
* websocket连接异常!
*/
WEB_SOCKET_CONNECTION_ERROR(10004, "websocket连接异常!"),

/**
* 文件不能为空!
*/
FILE_IS_EMPTY(10005, "上传文件不能为空!"),

/**
* 上传文件格式错误!
*/
FILE_FORMAT_IS_ERROR(10006, "上传文件格式错误!"),

/**
* 上传文件数据错误,请检查文件!
*/
FILE_DATA_IS_ERROR(10101, "上传文件数据错误,请检查文件!"),

/**
* 上传文件数据错误,请检查文件!
*/
FILE_DATA_TIME_IS_ERROR(10102, "上传文件数据错误,请检查文件!"),

/**
* 上传文件数据错误,请检查文件!
*/
FILE_DATA_LNG_IS_ERROR(10103, "上传文件数据错误,请检查文件!"),

/**
* 上传文件数据错误,请检查文件!
*/
FILE_DATA_LAT_IS_ERROR(10104, "上传文件数据错误,请检查文件!"),

/**
* 读取图片经纬度失败,请手动填写!
*/
IMAGE_LOCATION_IS_ERROR(11001, "读取图片经纬度失败,请手动填写!"),

/**
* 任务不存在!
*/
TASK_DOES_NOT_EXIST(11111, "巡检任务不存在,请先创建巡检任务!"),

/**
* 视频分析中,请稍后再试
*/
VIDEO_ANALYSIS_IN_PROGRESS(11112, "视频分析中,请稍后再试!"),

/**
* 只有飞行完成状态可以操作
*/
TASK_NOT_OPERATION(11113, "只有飞行完成状态可以操作!"),
;

@Getter
private final int code;

@Getter
private final String message;
}

+ 80
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/AliyuncsVodConfig.java View File

@@ -0,0 +1,80 @@
package com.tuoheng.admin.config;

import com.aliyun.teaopenapi.models.Config;
import com.aliyun.vod20170321.Client;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
* 阿里云点播服务配置类
*
* @author WangHaoran
* @since 2022-03-11
*/
@Configuration
@Slf4j
public class AliyuncsVodConfig {

/**
* 阿里云endpoint
*/
public final static String ENDPOINT = "vod.cn-shanghai.aliyuncs.com";

/**
* 账号
*/
public static String accessKeyId;

/**
* 密码
*/
public static String accessKeySecret;

/**
* 角色ARN
*/
public static String roleArn;

/**
* Bucket名称
*/
public static String bucketName;

@Value("${aliyuncsVod.accessKeyId}")
public void setAccessKeyId(String accessKeyId) {
AliyuncsVodConfig.accessKeyId = accessKeyId;
}

@Value("${aliyuncsVod.accessKeySecret}")
public void setAccessKeySecret(String accessKeySecret) {
AliyuncsVodConfig.accessKeySecret = accessKeySecret;
}

@Value("${aliyuncsVod.roleArn}")
public void setRoleArn(String roleArn) {
AliyuncsVodConfig.roleArn = roleArn;
}

@Value("${aliyuncsVod.bucketName}")
public void setBucketName(String bucketName) {
AliyuncsVodConfig.bucketName = bucketName;
}

@Bean
@Lazy
public Client vodClient() {
try {
Config config = new Config()
.setAccessKeyId(accessKeyId)
.setAccessKeySecret(accessKeySecret)
.setEndpoint(ENDPOINT);
return new Client(config);
} catch (Exception e) {
log.error("获取vodClient客户端失败", e);
}
return null;
}
}

+ 21
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/EmbeddedServletContainerConfig.java View File

@@ -0,0 +1,21 @@
package com.tuoheng.admin.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.stereotype.Component;

import java.io.File;

@Component
public class EmbeddedServletContainerConfig implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {

@Value("${server.tomcat.basedir}")
private String basedir;

@Override
public void customize(TomcatServletWebServerFactory factory) {
factory.setDocumentRoot(new File(basedir));
}

}

+ 36
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/ExecutorConfig.java View File

@@ -0,0 +1,36 @@
package com.tuoheng.admin.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;

/**
* 线程池配置
*/
@Configuration
@EnableAsync
public class ExecutorConfig {

@Bean
public Executor asyncServiceExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
//配置核心线程数
executor.setCorePoolSize(5);
//配置最大线程数
executor.setMaxPoolSize(10);
//配置队列大小
executor.setQueueCapacity(400);
//配置线程池中的线程的名称前缀
executor.setThreadNamePrefix("thread-");
// rejection-policy:当pool已经达到max size的时候,如何处理新任务
// CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
//执行初始化
executor.initialize();
return executor;
}
}

+ 72
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/MQConfig.java View File

@@ -0,0 +1,72 @@
package com.tuoheng.admin.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.config.SimpleRabbitListenerContainerFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class MQConfig {
@Bean(name = "getQueue")
public Queue getQueue() {
/**
* name: 队列名称
* durable:是否持久化
*/
return new Queue("5gaiDirectQueue", true, false, false);
}

@Bean
public RabbitTemplate rabbitTemplate(ConnectionFactory factory){
RabbitTemplate rabbitTemplate = new RabbitTemplate();
rabbitTemplate.setConnectionFactory(factory);
//解决: Caused by: org.springframework.amqp.AmqpException: No method found for class [B 异常
//消息转换器,消息转化为json, setMessageConverter(MessageConverter ),这个方法就是这次异常的解决方案,创建一个Jackson2JsonMessageConverter对象放进去
rabbitTemplate.setMessageConverter(new Jackson2JsonMessageConverter());
return rabbitTemplate;
}

@Bean
public SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory(ConnectionFactory factory){
SimpleRabbitListenerContainerFactory srlcf = new SimpleRabbitListenerContainerFactory();
srlcf.setConnectionFactory(factory);
//当消息有异常内容时(例如类型不匹配),将不再重新放入队列,直接丢弃
srlcf.setDefaultRequeueRejected(false);

//设置消息转为json
Jackson2JsonMessageConverter j2jmc = new Jackson2JsonMessageConverter();
srlcf.setMessageConverter(j2jmc);
return srlcf;
}

//发送消息时如不配置序列化方法则按照java默认序列化机制,则会造成发送编码不符合
@Bean
public MessageConverter messageConverter(){
Jackson2JsonMessageConverter j2jmc = new Jackson2JsonMessageConverter();
return j2jmc;
}


// @Bean(name = "getDirectExchange")
// public DirectExchange getDirectExchange() {
// return new DirectExchange("shuiwuDirectExchange", true, false);
// }
//
// @Bean(name = "getQueue")
// public Queue getQueue() {
// return new Queue("5gaiDirectQueue", true, false, false);
// }

// @Bean
// public Binding getDirectExchangeQueueTx(
// @Qualifier(value = "getDirectExchange") DirectExchange getDirectExchangeTx,
// @Qualifier(value = "getQueue") Queue getQueueTx) {
// return BindingBuilder.bind(getQueueTx).to(getDirectExchangeTx).with("shuiwu");
// }

}

+ 22
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/UploadConfig.java View File

@@ -0,0 +1,22 @@
package com.tuoheng.admin.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@Configuration
public class UploadConfig {
//显示声明CommonsMultipartResolver为mutipartResolver
@Bean(name = "multipartResolver")
public MultipartResolver multipartResolver() {
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
resolver.setDefaultEncoding("UTF-8");
//resolveLazily属性启用是为了推迟文件解析,以在在UploadAction中捕获文件大小异常
resolver.setResolveLazily(true);
resolver.setMaxInMemorySize(40960);
//上传文件大小 30M 30*1024*1024
resolver.setMaxUploadSize(30 * 1024 * 1024);
return resolver;
}
}

+ 14
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/config/WebSocketConfig.java View File

@@ -0,0 +1,14 @@
package com.tuoheng.admin.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class WebSocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}

}

+ 62
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AliyunOssController.java View File

@@ -0,0 +1,62 @@
package com.tuoheng.admin.controller;

import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse;
import com.tuoheng.admin.service.IAliyunOssService;
import com.tuoheng.admin.service.impl.AliyunOssServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.URL;
import java.util.List;

/**
* 阿里云对象存储OSS 前端控制器
*
* @author WangHaoran
* @since 2022-03-15
*/
@RestController
@RequestMapping("/aliyunOss")
public class AliyunOssController {

@Autowired
IAliyunOssService aliyunOssService;

/**
* 生成单个以GET方法访问的签名URL
*
* @param objectName 填写Object完整路径,例如exampleobject.txt。Object完整路径中不能包含Bucket名称。
* @return
* @throws Throwable
*/
@GetMapping("/generatePresignedUrl")
public URL generatePresignedUrl(String objectName) throws Throwable {
return aliyunOssService.generatePresignedUrl(objectName);
}

/**
* 生成多个以GET方法访问的签名URL
*
* @param objectNameList 填写Object完整路径,例如exampleobject.txt。Object完整路径中不能包含Bucket名称。
* 此处请填写多个Object完整路径,用于一次性获取多个Object的签名URL。
* @return
* @throws Throwable
*/
@GetMapping("/generatePresignedUrls")
public List<URL> generatePresignedUrls(String [] objectNameList) throws Throwable {
return aliyunOssService.generatePresignedUrls(objectNameList);
}

/**
* 获取securityToken
*
* @return
*/
@GetMapping("/getSecurityToken")
public AssumeRoleResponse.Credentials getSecurityToken() {
AssumeRoleResponse.Credentials credentials = AliyunOssServiceImpl.getSecurityToken("SessionTest");
return credentials;
}
}

+ 48
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AliyuncsVodController.java View File

@@ -0,0 +1,48 @@
package com.tuoheng.admin.controller;

import com.aliyuncs.vod.model.v20170321.CreateUploadVideoResponse;
import com.aliyuncs.vod.model.v20170321.RefreshUploadVideoResponse;
import com.tuoheng.admin.service.IAliyuncsVodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 阿里云点播服务 前端控制器
*
* @author WangHaoran
* @since 2022-03-10
*/
@RestController
@RequestMapping("/aliyuncsVod")
public class AliyuncsVodController {

@Autowired
IAliyuncsVodService aliyuncsVodService;


/**
* 获取音视频上传地址和凭证
*
* @param title
* @param fileName
* @return
*/
@GetMapping("/createUploadVideo")
public CreateUploadVideoResponse createUploadVideo(String title, String fileName) {
return aliyuncsVodService.createUploadVideo(title, fileName);
}


/**
* 刷新音/视频上传凭证
*
* @param videoId 音频或视频ID
* @return
*/
@GetMapping("/refreshUploadVideo")
public RefreshUploadVideoResponse refreshUploadVideo(String videoId) {
return aliyuncsVodService.refreshUploadVideo(videoId);
}
}

+ 37
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AnalyseController.java View File

@@ -0,0 +1,37 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tuoheng.admin.entity.domain.ThInspection;
import com.tuoheng.admin.entity.vo.AIInspectionVo;
import com.tuoheng.admin.mapper.ThInspectionMapper;
import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/analyse")
public class AnalyseController {

@Autowired
private ThInspectionMapper inspectionMapper;

/**
* 获取待分析视频地址
*
* @return
*/
@GetMapping("/getAiInspectionList")
public List<AIInspectionVo> getAiInspectionList() {
// 查询表结构
List<AIInspectionVo> inspectionList = inspectionMapper.getAIInspectionList();
return inspectionList;
}

}

+ 39
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AnalysisDatasController.java View File

@@ -0,0 +1,39 @@
package com.tuoheng.admin.controller;

import com.tuoheng.admin.entity.request.AnalysisQuery;
import com.tuoheng.admin.service.IAnalysisService;
import com.tuoheng.common.utils.JsonResult;
import com.tuoheng.system.entity.City;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
* 巡检任务管理 前端控制器
*
* @author: ww
* @date: 2021/11/4
*/
@RestController
@RequestMapping("/analysisData")
public class AnalysisDatasController {
@Autowired
private IAnalysisService iAnalysisService;
@GetMapping("/findList")
public JsonResult findList(AnalysisQuery analysisQuery) {
return iAnalysisService.findList(analysisQuery);
}
/**
* @author: ww
* @date: 2021/11/6
*/
@GetMapping("/getCityOrRiver")
public JsonResult getCityOrRiver(String cityCode,String code,Integer level) {
List list= iAnalysisService.getCityOrRiver(code,cityCode,level);
return JsonResult.success(list);
}
}

+ 84
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/CloudBoxController.java View File

@@ -0,0 +1,84 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.CloudBox;
import com.tuoheng.admin.entity.request.CloudBoxQuery;
import com.tuoheng.admin.service.ICloudBoxService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
* 云盒表 前端控制器
*
* @author WangHaoran
* @since 2021-09-01
*/
@RestController
@RequestMapping("/cloudBox")
public class CloudBoxController {
@Autowired
ICloudBoxService cloudBoxService;

/**
* 获取云盒列表(分页)
*
* @param cloudBoxQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<CloudBox> index(CloudBoxQuery cloudBoxQuery) {
return cloudBoxService.queryPage(cloudBoxQuery);
}

/**
* 获取云盒列表
*
* @param cloudBoxQuery 查询条件
* @return
*/
@GetMapping("/getList")
public List<CloudBox> getList(CloudBoxQuery cloudBoxQuery) {
return cloudBoxService.getListInfo(cloudBoxQuery);
}

/**
* 添加云盒
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody CloudBox entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
return cloudBoxService.editInfo(entity);
}

/**
* 编辑云盒
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody CloudBox entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
return cloudBoxService.editInfo(entity);
}

/**
* 删除云盒
*
* @param ids 云盒ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
cloudBoxService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}
}

+ 88
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/EquipmentController.java View File

@@ -0,0 +1,88 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Equipment;
import com.tuoheng.admin.entity.request.EquipmentQuery;
import com.tuoheng.admin.service.IEquipmentService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;


/**
* 飞行设备表 前端控制器
*
* @author WangHaoran
* @since 2021-09-03
*/
@RestController
@RequestMapping("/equipment")
public class EquipmentController {
@Autowired
IEquipmentService equipmentService;

/**
* 获取无人机列表(分页)
*
* @param equipmentQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<Equipment> index(EquipmentQuery equipmentQuery) {
return equipmentService.queryPage(equipmentQuery);
}

/**
* 获取无人机列表
*
* @param equipmentQuery 查询条件
* @return
*/
@GetMapping("/getList")
public List<Equipment> getList(EquipmentQuery equipmentQuery) {
return equipmentService.getListInfo(equipmentQuery);
}

/**
* 添加无人机
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody @Valid Equipment entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
equipmentService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑无人机
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody Equipment entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
equipmentService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 删除无人机
*
* @param ids 无人机ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
equipmentService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}

}

+ 87
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/EquipmentMountController.java View File

@@ -0,0 +1,87 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.EquipmentMount;
import com.tuoheng.admin.entity.request.EquipmentMountQuery;
import com.tuoheng.admin.service.IEquipmentMountService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* 挂载设备表 前端控制器
*
* @author WangHaoran
* @since 2021-09-06
*/
@RestController
@RequestMapping("/equipmentMount")
public class EquipmentMountController {

@Autowired
IEquipmentMountService equipmentMountService;

/**
* 获取挂载设备列表(分页)
*
* @param equipmentQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<EquipmentMount> index(EquipmentMountQuery equipmentQuery) {
return equipmentMountService.queryPage(equipmentQuery);
}

/**
* 获取挂载设备列表
*
* @param equipmentQuery 查询条件
* @return
*/
@GetMapping("/getList")
public List<EquipmentMount> getList(EquipmentMountQuery equipmentQuery) {
return equipmentMountService.getListInfo(equipmentQuery);
}

/**
* 添加挂载设备
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody EquipmentMount entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
equipmentMountService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑挂载设备
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody EquipmentMount entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
equipmentMountService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 删除挂载设备
*
* @param ids 挂载设备ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
equipmentMountService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}

}

+ 52
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/FlightDataController.java View File

@@ -0,0 +1,52 @@
package com.tuoheng.admin.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.FlightData;
import com.tuoheng.admin.entity.request.FlightDataQuery;
import com.tuoheng.admin.service.IFlightDataService;
import com.tuoheng.common.common.OperationEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.tuoheng.common.common.BaseController;

/**
* <p>
* 云盒遥测数据表 前端控制器
* </p>
*
* @author 拓恒
* @since 2021-09-18
*/
@RestController
@RequestMapping("/flightdata")
public class FlightDataController extends BaseController {

@Autowired
private IFlightDataService flightDataService;

/**
* 获取任务巡检坐标列表
*
* @param flightDataQuery 查询条件
* @return
*/
@GetMapping("/getFlightDataList")
public IPage<FlightData> getFlightDataList(FlightDataQuery flightDataQuery) {
return flightDataService.getFlightDataList(flightDataQuery);
}

/**
* 飞行遥测数据入库
*
* @param entity
* @return
*/
@PostMapping("/addCallback")
public OperationEnum addCallback(@RequestBody FlightData entity) {
flightDataService.addCallback(entity);
return OperationEnum.OPERATION_SUCCESS;
}

}

+ 173
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionController.java View File

@@ -0,0 +1,173 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.domain.FlightData;
import com.tuoheng.admin.entity.domain.RealTimeOverview;
import com.tuoheng.admin.entity.domain.ThInspection;
import com.tuoheng.admin.entity.request.QueryInspectionRequest;
import com.tuoheng.admin.entity.request.AddThInspectionRequest;
import com.tuoheng.admin.entity.request.UploadVideoUrlRequest;
import com.tuoheng.admin.service.IInspectionService;
import com.tuoheng.common.annotation.LockAction;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.exception.ServiceException;
import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.text.ParseException;
import java.util.List;

/**
* 巡检任务管理 前端控制器
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@RestController
@RequestMapping("/inspection")
public class InspectionController {
@Autowired
private IInspectionService iInspectionService;

/**
* 查询巡检任务列表
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/findList")
public Page<ThInspection> findList(QueryInspectionRequest queryInspectionRequest) {
return iInspectionService.findList(queryInspectionRequest);
}

/**
* 查询待审核巡检任务列表
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/findToCheckList")
public Page<ThInspection> findToCheckList(QueryInspectionRequest queryInspectionRequest) {
return iInspectionService.findToCheckList(queryInspectionRequest);
}

/**
* 查询待飞行 、飞行中巡检任务列表
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/findToFlyList")
public Page<ThInspection> findToFlyList(QueryInspectionRequest queryInspectionRequest) {
return iInspectionService.findToFlyList(queryInspectionRequest);
}

/**
* 查询巡检任务
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/findById")
public ThInspection findById(QueryInspectionRequest request) {
return iInspectionService.findById(request);
}

/**
* 修改巡检任务
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@PostMapping("/updateById")
public OperationEnum updateById(@RequestBody ThInspection request) {
return iInspectionService.updateById(request);
}

/**
* 新增巡检任务
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@PostMapping("/addThInspection")
public OperationEnum addThInspection(@RequestBody AddThInspectionRequest request) {
return iInspectionService.addThInspection(request);
}

/**
* 删除巡检任务
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/deleteBatch")
public OperationEnum deleteBatch(@RequestParam("idList") List<Integer> idList) {
return iInspectionService.deleteBatch(idList);
}

/**
* 审核巡检任务
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@PostMapping("/checkById")
public OperationEnum checkById(@RequestBody ThInspection request) {
return iInspectionService.checkById(request);
}

/**
* 获取飞行轨迹
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@PostMapping("/findFlightData")
public ThInspection findFlightData(@RequestBody ThInspection thInspection) {
return iInspectionService.findFlightData(thInspection);
}

/**
* 实时概况
*
* @author: zhu_zishuang
* @date: 2021/9/1
*/
@GetMapping("/getRealTimeOverview")
public List<RealTimeOverview> getRealTimeOverview() {
return iInspectionService.getRealTimeOverview();
}

/**
* 根据巡检ID查询最新一条遥测数据
*
* @author: WangHaoran
* @date: 2022/7/11
*/
@GetMapping("/getFlightDataByInspectionId")
public FlightData getFlightDataByInspectionId(@RequestParam("inspectionId") Integer inspectionId) {
return iInspectionService.getFlightDataByInspectionId(inspectionId);
}

/**
* 上传离线视频
*
* @author: WangHaoran
* @date: 2021-12-09
*/
@PostMapping("/uploadVideoUrl")
public OperationEnum uploadSrt(@RequestParam(value = "file", required = false) MultipartFile file,
@Valid @NotNull @RequestParam("inspectionId") Integer inspectionId,
@RequestParam(value = "type", required = false) Integer type,
@RequestParam(value = "videoUrl", required = false) String videoUrl,
@RequestParam(value = "note", required = false) String note) {
return iInspectionService.uploadVideoUrl(file, inspectionId, type, videoUrl, note);
}
}

+ 88
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/InspectionFileController.java View File

@@ -0,0 +1,88 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.request.HandleImageRequest;
import com.tuoheng.admin.entity.request.QuestionFileRequest;
import com.tuoheng.admin.entity.vo.QuestionDetailVo;
import com.tuoheng.admin.entity.vo.QuestionFileVo;
import com.tuoheng.admin.service.IInspectionFileService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.config.CommonConfig;
import com.tuoheng.common.utils.CommonUtils;
import com.tuoheng.common.utils.StringUtils;
import com.tuoheng.common.utils.UploadUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
* 巡检附件 前端控制器
*
* @author: WangHaoran
* @date: 2021/9/28
*/
@RestController
@RequestMapping("/inspectionFile")
public class InspectionFileController {

@Autowired
private IInspectionFileService inspectionFileService;

/**
* 查询问题清单列表
*
* @author: WangHaoran
* @date: 2021/9/28
*/
@GetMapping("/queryQuestionFileList")
public IPage<QuestionFileVo> queryQuestionFileList(QuestionFileRequest request) {
return inspectionFileService.queryQuestionFileList(request);
}

/**
* 查询问题清单 详情
*
* @author: WangHaoran
* @date: 2021/9/28
*/
@GetMapping("/queryQuestionDetail")
public QuestionDetailVo queryQuestionDetail(Integer fileId) {
return inspectionFileService.queryQuestionDetail(fileId);
}

/**
* 查询问题清单 GIS展示
*
* @author: WangHaoran
* @date: 2021/9/28
*/
@GetMapping("/queryQuestionLocationList")
public List<QuestionDetailVo> queryQuestionLocationList(Integer inspectionId) {
return inspectionFileService.queryQuestionLocationList(inspectionId);
}

// /**
// * 问题清单 处理
// *
// * @author: WangHaoran
// * @date: 2021/9/30
// */
// @PostMapping("/uploadHandleImage")
// public OperationEnum uploadHandleImage(HttpServletRequest request) {
// return inspectionFileService.uploadHandleImage(request);
// }

// /**
// * 问题清单-指派 临时接口
// * @author: WangHaoran
// * @date: 2021/10/14
// */
// @GetMapping("/assign")
// public OperationEnum assign(Integer inspectionId) {
// return inspectionFileService.assign(inspectionId);
// }

}

+ 85
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/LiveChannelController.java View File

@@ -0,0 +1,85 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.LiveChannel;
import com.tuoheng.admin.entity.request.LiveChannelQuery;
import com.tuoheng.admin.service.ILiveChannelService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* 直播通道表 前端控制器
*
* @author WangHaoran
* @since 2021-09-04
*/
@RestController
@RequestMapping("/liveChannel")
public class LiveChannelController {
@Autowired
ILiveChannelService liveChannelService;

/**
* 获取直播通道列表(分页)
*
* @param liveChannelQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<LiveChannel> index(LiveChannelQuery liveChannelQuery) {
return liveChannelService.queryPage(liveChannelQuery);
}

/**
* 获取直播通道列表
*
* @param liveChannelQuery 查询条件
* @return
*/
@GetMapping("/getList")
public List<LiveChannel> getList(LiveChannelQuery liveChannelQuery) {
return liveChannelService.getListInfo(liveChannelQuery);
}

/**
* 添加直播通道
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody LiveChannel entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
liveChannelService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑直播通道
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody LiveChannel entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
liveChannelService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 删除直播通道
*
* @param ids 无人机ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
liveChannelService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}
}

+ 74
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/QuestionController.java View File

@@ -0,0 +1,74 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Question;
import com.tuoheng.admin.entity.request.QuestionQuery;
import com.tuoheng.admin.service.IQuestionService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* 巡检问题表 前端控制器
*
* @author WangHaoran
* @since 2021-09-02
*/
@RestController
@RequestMapping("/question")
public class QuestionController {

@Autowired
IQuestionService questionService;

/**
* 获取巡检问题列表(分页)
*
* @param questionQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<Question> index(QuestionQuery questionQuery) {
return questionService.queryPage(questionQuery);
}

/**
* 添加巡检问题
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody Question entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
questionService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑巡检问题
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody Question entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
questionService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 删除巡检问题
*
* @param ids 巡检问题ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
questionService.deleteByIds(ids);
return OperationEnum.OPERATION_SUCCESS;
}

}

+ 156
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/RealTimeLocationSocket.java View File

@@ -0,0 +1,156 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.common.ServiceExceptionEnum;
import com.tuoheng.admin.entity.domain.FlightData;
import com.tuoheng.admin.mapper.FlightDataMapper;
import com.tuoheng.common.exception.ServiceException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.websocket.*;
import javax.websocket.server.PathParam;
import javax.websocket.server.ServerEndpoint;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.concurrent.CopyOnWriteArraySet;

/**
* 实时位置推送处理类
*
* @author: zhu_zishuang
* @date: 2021/9/7
*/
@ServerEndpoint(value = "/websocket")
@Component
@Slf4j
public class RealTimeLocationSocket {

/**
* 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
*/
private static int onlineCount = 0;

/**
* concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。
*/
private static CopyOnWriteArraySet<RealTimeLocationSocket> webSocketSet = new CopyOnWriteArraySet<>();

/**
* 与某个客户端的连接会话,需要通过它来给客户端发送数据
*/
private Session session;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 连接建立成功调用的方法
*/
@OnOpen
public void onOpen(Session session) {
this.session = session;
//加入set中
webSocketSet.add(this);
//在线数加1
addOnlineCount();
log.info(MessageFormat.format("有新连接加入:{0}!当前在线人数为{1}", inspectionId, getOnlineCount()));
try {
this.session.getBasicRemote().sendText("200");
} catch (IOException e) {
log.error("IO异常");
}
}

/**
* 连接关闭调用的方法
*/
@OnClose
public void onClose() {
//从set中删除
webSocketSet.remove(this);
//在线数减1
subOnlineCount();
}

public void sendMessage(FlightDataMapper flightDataMapper) throws IOException {
// 拉取最新一条经纬度信息
FlightData flightData = flightDataMapper.selectOne(new LambdaQueryWrapper<FlightData>()
.eq(FlightData::getInspectionId, this.inspectionId)
.orderByDesc(FlightData::getCreateTime)
.last("limit 1")
);
if (null == flightData) {
this.session.getBasicRemote().sendText("");
} else {
log.info("flightData---:", flightData.getLng() + " / " + flightData.getLat());
this.session.getBasicRemote().sendText(flightData.getLng() + "," + flightData.getLat());
}
}

/**
* 发生错误时调用
*/
@OnError
public void onError(Session session, Throwable error) {
log.info("websocket连接,发生错误!");
new ServiceException(ServiceExceptionEnum.WEB_SOCKET_CONNECTION_ERROR);
}

/**
* 服务端给客户端发送消息
*
* @throws IOException
*/
public void sendMessage() throws IOException {
this.session.getBasicRemote().sendText(String.format("%s,%s", 1, 2));
}

/**
* 收到客户端消息后调用的方法
*
* @param message 客户端发送过来的消息
*/
@OnMessage
public void onMessage(String message, Session session) {
log.info("来自客户端" + inspectionId + "的消息:" + message);
this.inspectionId = Integer.valueOf(message);
}

/**
* 自定义的群发消息,我们可以在其他的类中调用该方法,然后向前台推送消息
*/
public static void sendInfo(@PathParam("sname") String sname, String message) throws IOException {
for (RealTimeLocationSocket item : webSocketSet) {
try {
//这里可以设定只推送给这个sname的,为null则全部推送
item.sendMessage();
log.info(MessageFormat.format("推送消息给:{0},消息是===》{1}", item.inspectionId, message));
} catch (IOException e) {
continue;
}
}
}

public static synchronized int getOnlineCount() {
return onlineCount;
}

public static synchronized void addOnlineCount() {
RealTimeLocationSocket.onlineCount++;
}

public static synchronized void subOnlineCount() {
RealTimeLocationSocket.onlineCount--;
}

public static CopyOnWriteArraySet<RealTimeLocationSocket> getWebSocketSet() {
return webSocketSet;
}

public static void setWebSocketSet(CopyOnWriteArraySet<RealTimeLocationSocket> webSocketSet) {
RealTimeLocationSocket.webSocketSet = webSocketSet;
}
}

+ 76
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ReportController.java View File

@@ -0,0 +1,76 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Report;
import com.tuoheng.admin.entity.request.ReportRequest;
import com.tuoheng.admin.entity.vo.ReportInfoVo;
import com.tuoheng.admin.service.IReportService;
import com.tuoheng.common.common.OperationEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* 巡检报告表 前端控制器
*
* @author WangHaoran
* @since 2021-09-29
*/
@RestController
@RequestMapping("/report")
public class ReportController {

@Autowired
IReportService reportService;


/**
* 生成报告
*
* @param inspectionId 巡检ID
* @return
*/
@GetMapping("/generateReport")
public OperationEnum generateReport(Integer inspectionId) {
return reportService.generateReport(inspectionId);
}

/**
* 获取报告列表(分页)
*
* @param request 查询条件
* @return
*/
@GetMapping("/index")
public IPage<Report> index(ReportRequest request) {
return reportService.queryPage(request);
}

/**
* 报告详情
*
* @param request 查询条件
* @return
*/
@GetMapping("/detail")
public ReportInfoVo detail(ReportRequest request) {
return reportService.detail(request);
}


/**
* 导出报告word并下载
*
* @param reportId 报告ID
* @return
*/
@GetMapping(value = "/exportReportWord")
public void exportReportWord(String reportId, HttpServletRequest request, HttpServletResponse response) throws Exception{
reportService.exportReportWord(reportId, request, response);
}

}

+ 82
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ReportPatrolController.java View File

@@ -0,0 +1,82 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Report;
import com.tuoheng.admin.entity.domain.ReportPatrol;
import com.tuoheng.admin.entity.request.ReportRequest;
import com.tuoheng.admin.entity.vo.ReportInfoVo;
import com.tuoheng.admin.entity.vo.ReportPatrolVo;
import com.tuoheng.admin.service.IReportPatrolService;
import com.tuoheng.common.common.OperationEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* 巡河报告表 前端控制器
* @author ww
* @since 2021-12-9
*/
@RestController
@RequestMapping("/reportPatrol")
public class ReportPatrolController {

@Autowired
IReportPatrolService reportService;

/**
* 生成报告
* @param inspectionId 巡检ID
* @return
*/
@GetMapping("/generateReport")
public OperationEnum generateReport(Integer inspectionId) {
return reportService.generateReport(inspectionId);
}

/**
* 获取报告列表(分页)
* @param request 查询条件
* @return
*/
@GetMapping("/index")
public IPage<ReportPatrol> index(ReportRequest request) {
return reportService.queryPage(request);
}

/**
* 获取巡河报告列表(分页)
* @param request 查询条件
* @return
*/
@GetMapping("/indexNew")
public IPage<ReportPatrolVo> indexNew(ReportRequest request) {
return reportService.queryPageNew(request);
}

/**
* 报告详情
* @param request 查询条件
* @return
*/
@GetMapping("/detail")
public ReportInfoVo detail(ReportRequest request) {
return reportService.detail(request);
}


/**
* 导出报告word并下载
* @param reportId 报告ID
* @return
*/
@GetMapping(value = "/exportReportWord")
public void exportReportWord(String reportId, HttpServletRequest request, HttpServletResponse response) throws Exception{
reportService.exportReportWord(reportId, request, response);
}

}

+ 100
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/StreamController.java View File

@@ -0,0 +1,100 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Stream;
import com.tuoheng.admin.entity.request.AddThInspectionRequest;
import com.tuoheng.admin.entity.request.StreamQuery;
import com.tuoheng.admin.entity.vo.StreamInfoVo;
import com.tuoheng.admin.service.IStreamService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.config.CommonConfig;
import com.tuoheng.common.config.UploadFileConfig;
import com.tuoheng.common.utils.FileUtils;
import com.tuoheng.common.utils.StringUtils;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;
import java.io.File;
import java.util.List;

/**
* 河流表 前端控制器
*
* @author WangHaoran
* @since 2021-09-06
*/
@RestController
@RequestMapping("/stream")
public class StreamController {

@Autowired
IStreamService streamService;

/**
* 获取河流列表(分页)
*
* @param streamQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<StreamInfoVo> index(StreamQuery streamQuery) {
return streamService.queryPage(streamQuery);
}

/**
* 获取河流列表
* @param streamQuery 查询条件
* @return
*/
@GetMapping("/getList")
public List<Stream> getList(StreamQuery streamQuery) {
return streamService.getListInfo(streamQuery);
}

/**
* 添加河流
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody @Valid Stream entity) {
entity.setCreateUserName(ShiroUtils.getUserInfo().getUsername());
if (entity.getImage().contains(CommonConfig.imageURL)) {
entity.setImage(entity.getImage().replaceAll(CommonConfig.imageURL, ""));
}
streamService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑河流
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody Stream entity) {
entity.setUpdateUserName(ShiroUtils.getUserInfo().getUsername());
if (entity.getImage().contains(CommonConfig.imageURL)) {
entity.setImage(entity.getImage().replaceAll(CommonConfig.imageURL, ""));
}
streamService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}
/**
* 删除河流
*
* @param ids 河流ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
streamService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}

}

+ 90
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/StreamGisController.java View File

@@ -0,0 +1,90 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Stream;
import com.tuoheng.admin.entity.domain.StreamGis;
import com.tuoheng.admin.entity.request.StreamGisQuery;
import com.tuoheng.admin.entity.request.StreamQuery;
import com.tuoheng.admin.entity.vo.StreamGisVo;
import com.tuoheng.admin.service.IStreamGisService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.system.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
* 河流GIS表 前端控制器
*
* @author WangHaoran
* @since 2021-12-07
*/
@RestController
@RequestMapping("/streamGis")
public class StreamGisController {

@Autowired
IStreamGisService streamGisService;

/**
* 获取河流GIS列表(分页)
*
* @param streamGisQuery 查询条件
* @return
*/
@GetMapping("/index")
public IPage<StreamGisVo> index(StreamGisQuery streamGisQuery) {
return streamGisService.queryPage(streamGisQuery);
}

/**
* 获取河流GIS列表
* @param
* @return
*/
@GetMapping("/getList")
public List<StreamGisVo> getList(StreamGisQuery streamGisQuery) {
return streamGisService.getListInfo(streamGisQuery);
}

/**
* 添加河流GIS
*
* @param entity 实体对象
* @return
*/
@PostMapping("/add")
public OperationEnum add(@RequestBody StreamGis entity) {
entity.setCreateUser(ShiroUtils.getUserId());
streamGisService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 编辑河流GIS
*
* @param entity 实体对象
* @return
*/
@PutMapping("/edit")
public OperationEnum edit(@RequestBody StreamGis entity) {
entity.setUpdateUser(ShiroUtils.getUserId());
streamGisService.edit(entity);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 删除河流
*
* @param ids 河流ID
* @return
*/
@DeleteMapping("/delete/{ids}")
public OperationEnum delete(@PathVariable("ids") Integer[] ids) {
streamGisService.deleteByIds(ids);
return OperationEnum.DELETE_SUCCESS;
}

}

+ 80
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/TaskFileController.java View File

@@ -0,0 +1,80 @@
package com.tuoheng.admin.controller;

import com.tuoheng.admin.entity.domain.AiImageLog;
import com.tuoheng.admin.entity.request.UAVKHQuestionRequest;
import com.tuoheng.admin.service.IAiImageLogService;
import com.tuoheng.admin.service.IMessageService;
import com.tuoheng.common.common.OperationEnum;
import com.tuoheng.common.utils.JsonResult;
import com.tuoheng.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
* 任务附件表 前端控制器
*
* @author WangHaoran
* @since 2021-07-16
*/
@Slf4j
@RestController
@RequestMapping("/taskFile")
public class TaskFileController {

@Autowired
private IMessageService messageService;

@Autowired
private IAiImageLogService aiImageLogService;

/**
* 常规巡河问题上传
*
* @param
* @return
*/
@PostMapping("/submitUAVKHQuestion")
public OperationEnum submitUAVKHQuestion(@RequestBody UAVKHQuestionRequest uavkhQuestionRequest) {
if(StringUtils.isEmpty(uavkhQuestionRequest.getImgData())
|| StringUtils.isEmpty(uavkhQuestionRequest.getImgName())
|| StringUtils.isEmpty(uavkhQuestionRequest.getFid())){
return OperationEnum.OPERATION_ERROR;
}
//日志入库
AiImageLog aiImageLog = new AiImageLog();
BeanUtils.copyProperties(uavkhQuestionRequest, aiImageLog);
aiImageLogService.add(aiImageLog);

log.info("消息放入队列中,fid=" + uavkhQuestionRequest.getFid());
messageService.sendMessage("", "5gaiDirectQueue", uavkhQuestionRequest);
return OperationEnum.OPERATION_SUCCESS;
}

/**
* 常规巡河问题上传 巡检编码
*
* @param
* @return
*/
@PostMapping("/submitUAVKHQuestionByCode")
public OperationEnum submitUAVKHQuestionByCode(@RequestBody UAVKHQuestionRequest uavkhQuestionRequest) {
if(StringUtils.isEmpty(uavkhQuestionRequest.getImgData())
|| StringUtils.isEmpty(uavkhQuestionRequest.getImgName())
|| StringUtils.isEmpty(uavkhQuestionRequest.getFid())){
return OperationEnum.OPERATION_ERROR;
}
//日志入库
AiImageLog aiImageLog = new AiImageLog();
BeanUtils.copyProperties(uavkhQuestionRequest, aiImageLog);
aiImageLogService.add(aiImageLog);

log.info("submitUAVKHQuestionByCode,消息放入队列中,fid=" + uavkhQuestionRequest.getFid());
messageService.sendMessage("", "5gaiDirectQueue", uavkhQuestionRequest);
return OperationEnum.OPERATION_SUCCESS;
}


}

+ 130
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/controller/ThInspectionQuestionController.java View File

@@ -0,0 +1,130 @@
package com.tuoheng.admin.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.domain.ThInspectionFile;
import com.tuoheng.admin.entity.request.QueryQuestionPictureRequest;
import com.tuoheng.admin.entity.request.QueryQuestionRequest;
import com.tuoheng.admin.entity.request.QuestionInventoryRequest;
import com.tuoheng.admin.entity.vo.QuestionInventoryVo;
import com.tuoheng.admin.entity.vo.ThInspectionQuestionPictureVo;
import com.tuoheng.admin.entity.vo.ThInspectionQuestionVo;
import com.tuoheng.admin.service.IThInspectionFileService;
import com.tuoheng.common.common.OperationEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
* 巡检问题 前端控制器
*
* @author zhu_zishuang
* @date 2021/9/26
*/
@RestController
@RequestMapping("/inspectionQuestion")
public class ThInspectionQuestionController {
/**
* 巡检问题接口
*/
@Autowired
private IThInspectionFileService iThInspectionFileService;

/**
* 查询 巡检任务问题 列表
*
* @author zhu_zishuang
* @date 2021/9/1
*/
@GetMapping("/findList")
public IPage<ThInspectionQuestionVo> findList(QueryQuestionRequest request) {
return iThInspectionFileService.findList(request);
}

/**
* 查询 巡检任务问题图片 列表
*
* @author zhu_zishuang
* @date 2021/9/28
*/
@GetMapping("/findPictureList")
public Page<ThInspectionQuestionPictureVo> findPictureList(@Validated QueryQuestionPictureRequest request) {
return iThInspectionFileService.findPictureList(request);
}

/**
* 查询 巡检任务问题图片 详情
*
* @author zhu_zishuang
* @date 2021/9/28
*/
@GetMapping("/findPicture")
public ThInspectionQuestionPictureVo findPicture(Integer id) {
return iThInspectionFileService.findPicture(id);
}

/**
* 删除 巡检任务问题图片
*
* @author zhu_zishuang
* @date 2021/9/28
*/
@GetMapping("/delete")
public OperationEnum delete(Integer id) {
return iThInspectionFileService.deleteById(id);
}

/**
* 审核/修改 巡检任务问题图片
*
* @author zhu_zishuang
* @date 2021/9/28
*/
@PutMapping("/updateById")
public OperationEnum updateById(@RequestBody ThInspectionFile thInspectionFile) {
return iThInspectionFileService.updateById(thInspectionFile);
}

/**
* 生成工单
*
* @author WangHaoran
* @date 2021/11/23
*/
@GetMapping("/generateWorkOrder")
public OperationEnum generateWorkOrder(Integer inspectionId) {
return iThInspectionFileService.generateWorkOrder(inspectionId);
}

/**
* 新增 巡检任务问题图片
*
* @author zhu_zishuang
* @date 2021/9/28
*/
@PostMapping("/addInspectionFile")
public OperationEnum addInspectionFile(@RequestParam("originalImage") String originalImage,
@RequestParam("aiImage") String aiImage,
@RequestParam("questionId") Integer questionId,
@RequestParam("inspectionId") Integer inspectionId,
@RequestParam("location") String location,
@RequestParam("questionDesc") String questionDesc,
@RequestParam("status") Integer status,
@RequestParam("sourceFileId") Integer sourceFileId,
@RequestParam(value = "longitude",required = false) String longitude,
@RequestParam(value = "latitude",required = false) String latitude) {
return iThInspectionFileService.addInspectionFile(originalImage, aiImage, questionId, inspectionId, location, questionDesc, status, sourceFileId, longitude, latitude);
}

/**
* 查询问题清单
*
* @author: WangHaoran
* @date: 2021/9/28
*/
@GetMapping("/queryQuestionInventory")
public IPage<QuestionInventoryVo> queryQuestionInventory(QuestionInventoryRequest request) {
return iThInspectionFileService.queryQuestionInventory(request);
}
}

+ 30
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AiImageCheckout.java View File

@@ -0,0 +1,30 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* AI图片检验表
*
* @author WangHaoran
* @since 2021-10-14
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_ai_image_checkout")
public class AiImageCheckout extends BaseEntity {

/**
* 帧号
*/
private String fid;

/**
* 图片ID
*/
private Integer fileId;
}

+ 57
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/AiImageLog.java View File

@@ -0,0 +1,57 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* AI图片日志表
*
* @author WangHaoran
* @since 2021-10-28
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_ai_image_log")
public class AiImageLog extends BaseEntity {

/**
* 帧号
*/
private String fid;

/**
* 问题类型
*/
private String type;

/**
* 问题类型ID
*/
private Integer typeId;

/**
* 图片名称,包含.jpg后缀
*/
private String imgName;

/**
* 原始图片名称,包含.jpg后缀
*/
private String imgNameOriginal;

/**
* 时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;

}

+ 56
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/CloudBox.java View File

@@ -0,0 +1,56 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* 云盒表
*
* @author WangHaoran
* @since 2021-09-01
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_cloud_box")
public class CloudBox extends BaseEntity {

/**
* 云盒SN号
*/
private String boxSn;

/**
* 云盒名称
*/
private String boxName;

/**
* 启用状态:1已启用 2未启用
*/
private Integer status;

/**
* 排序
*/
private Integer sort;

/**
* 备注
*/
private String note;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;
}

+ 112
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Equipment.java View File

@@ -0,0 +1,112 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
* 飞行设备表
*
* @author WangHaoran
* @since 2021-09-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_equipment")
public class Equipment extends BaseEntity implements Serializable {

private static final long serialVersionUID = 1L;

/**
* 设备编号
*/
@NotBlank(message = "设备编号不能为空!")
private String code;

/**
* 设备名称
*/
@NotBlank(message = "设备名称不能为空!")
private String name;

/**
* 内置摄像头:1精灵4摄像头 2精灵4pro摄像头 3M600PRO-01 4MAVIC2
*/
private Integer camera;

/**
* 产品序号
*/
@NotBlank(message = "产品序号不能为空!")
private String productSn;

/**
* 产品等级:1微型 2轻型 3小型 4中型 5大型 6其他
*/
@NotNull(message = "产品等级不能为空!")
private Integer productLevel;

/**
* 飞控序号
*/
private String flightSn;

/**
* 动力类型:1电动 2油动 3混合
*/
@NotNull(message = "动力类型不能为空!")
private Integer powerType;

/**
* 定位精度(单位:米)
*/
@NotNull(message = "定位精度不能为空!")
private BigDecimal accuracy;

/**
* 生产厂家
*/
@NotBlank(message = "生产厂家不能为空!")
private String manufacturer;

/**
* 产品类型:1多旋翼 2固定翼 3垂直起降
*/
@NotNull(message = "产品类型不能为空!")
private Integer type;

/**
* 续航时间(单位:分钟)
*/
@NotNull(message = "续航时间不能为空!")
private Integer lifeTime;

/**
* 直播地址通道
*/
@NotNull(message = "直播通道ID不能为空!")
private Integer liveChannel;

/**
* 状态:1正常 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;
}

+ 58
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/EquipmentMount.java View File

@@ -0,0 +1,58 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;


/**
* 挂载设备表
*
* @author WangHaoran
* @since 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_equipment_mount")
public class EquipmentMount extends BaseEntity {

/**
* 设备编号
*/
private String code;

/**
* 设备名称
*/
private String name;

/**
* 类型:1高清相机 2多光谱相机 3空中喊话 4大功率照明 5双光热成像相机 6抛投钩
* 7抛投绳 8无人机喷火枪 9灭火弹抛投器 10气体采集盒 11无人机取水器 12其他
*/
private Integer type;

/**
* 备注
*/
private String note;

/**
* 状态:1在用 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

}

+ 86
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/FlightData.java View File

@@ -0,0 +1,86 @@
package com.tuoheng.admin.entity.domain;


import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* <p>
* 云盒遥测数据表
* </p>
*
* @author WangHaoran
* @since 2021-06-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_flight_data")
public class FlightData extends BaseEntity {

/**
* 云盒SN号
*/
private String boxSn;

/**
* 经度
*/
private String lng;

/**
* 纬度
*/
private String lat;

/**
* 海拔高度
*/
private String altitude;

/**
* 相对高度
*/
private String ultrasonic;

/**
* 俯仰角
*/
private String pitch;
/**
* 横滚角
*/
private String roll;

/**
* 航向角
*/
private String yaw;

/**
* 空速
*/
private String airspeed;
/**
* 地速
*/
private String velocity;

/**
* 时间戳
*/
private String timestamp;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 是否是SRT文件数据,1是
*/
private Integer isSrt;
}

+ 121
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/InspectionFile.java View File

@@ -0,0 +1,121 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* 巡检附件表
*
* @author WangHaoran
* @since 2021-06-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection_file")
public class InspectionFile extends BaseEntity {

/**
* 图片编码
*/
private String fileCode;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 附件类型:1图片 2视频
*/
private Integer fileType;

/**
* 文件名称
*/
private String fileName;

/**
* 缩略图
*/
private String fileThumbnail;

/**
* 原图
*/
private String fileOriginal;

/**
* 标记图
*/
private String fileImage;

/**
* 文件大小
*/
private Double fileSize;

/**
* 纬度(原始图片纬度)
*/
private String latitude;

/**
* 经度(原始图片经度)
*/
private String longitude;

/**
* 位置信息
*/
private String location;

/**
* 高德地图经度
*/
private String gaodeLongitude;

/**
* 高德地图纬度
*/
private String gaodeLatitude;

/**
* 高德地图地址
*/
private String gaodeAddress;

/**
* 问题类型ID
*/
private Integer questionId;

/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;

/**
* 详细描述
*/
private String questionDesc;

/**
* 审核状态:0待审核 1已审核
*/
private Integer status;

/**
* 审核人
*/
private String checkUser;

/**
* 审核时间
*/
private String checkTime;

}

+ 67
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/InspectionQuestionItem.java View File

@@ -0,0 +1,67 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 巡检问题工单子表
*
* @author WangHaoran
* @since 2021-09-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_inspection_question_item")
public class InspectionQuestionItem extends BaseEntity {

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 巡检问题工单ID
*/
private Integer inspectionQuestionId;

/**
* 巡检问题文件ID
*/
private Integer inspectionFileId;

/**
* 处理状态:0待处理 1已处理
*/
private Integer status;

/**
* 巡检问题文件ID
*/
private Integer handlerUser;

/**
* 处理后图片(多个图片逗号“,”分隔)
*/
private String handlerImage;

/**
* 处理结果
*/
private String handlerResult;

/**
* 处理完成时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date handlerTime;

}

+ 77
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/LiveChannel.java View File

@@ -0,0 +1,77 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
* 直播通道表
*
* @author WangHaoran
* @since 2021-09-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_live_channel")
public class LiveChannel extends BaseEntity {

/**
* 直播通道名称
*/
private String name;

/**
* 推流地址
*/
private String pushUrl;

/**
* 拉流地址
*/
private String pullUrl;

/**
* AI推流地址
*/
private String aipushUrl;

/**
* AI拉流地址
*/
private String aipullUrl;

/**
* 备注
*/
private String note;

/**
* 状态:1正常 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

/**
* 巡检任务Id
*/
private Integer inspectionId;

/**
* 通道id
*/
private Integer channelId;
}

+ 52
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Question.java View File

@@ -0,0 +1,52 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* 巡检问题表
*
* @author WangHaoran
* @since 2021-09-02
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_question")
public class Question extends BaseEntity {

/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 项目类型:1日常监测 2重点核查
*/
private Integer type;

/**
* 巡检内容
*/
private String content;

/**
* 排序
*/
private Integer sort;


/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

}

+ 111
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/RealTimeOverview.java View File

@@ -0,0 +1,111 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* @author: zhu_zishuang
* @date: 2021/9/7
*/
@Data
public class RealTimeOverview implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private Integer id;

/**
* 巡检任务名称
*/
private String name;

/**
* 无人机名称
*/
private String equipmentName;

/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;

/**
* 拉流地址
*/
private String pullUrl;

/**
* AI拉流地址
*/
private String aipullUrl;

/**
* 河流名称
*/
private String streamName;

/**
* 起讫位置
*/
private String location;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 省
*/
private String province;

/**
* 市
*/
private String city;

/**
* 区
*/
private String district;

/**
* 省
*/
private String street;

/**
* 村
*/
private String village;

/**
* 河流长度
*/
private String streamLength;

/**
* 备注
*/
private String note;

/**
* 轨迹集合
*/
@TableField(exist = false)
private List<ThFlightData> thFlightDataList;
}

+ 113
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Report.java View File

@@ -0,0 +1,113 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 巡检报告表
*
* @author WangHaoran
* @since 2021-09-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_report")
public class Report extends BaseEntity {

/**
* 报告编号
*/
private String reportNo;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 巡检编号
*/
private String inspectionCode;

/**
* 巡检任务名称
*/
private String inspectionName;

/**
* 巡检河流ID
*/
private Integer streamId;

/**
* 河流名称
*/
private String streamName;

/**
* 河流区划名称
*/
private String streamArea;

/**
* 河段长度
*/
private String streamLength;

/**
* 起止位置
*/
private String streamLocation;

/**
* 天气情况
*/
private String weather;

/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;

/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;

/**
* 巡检方式:1无人机 2无人船 3人工
*/
private Integer inspectionWay;

/**
* 巡检设备
*/
private String inspectionDevice;

/**
* 计划巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 飞行高度
*/
private String flightHeight;

/**
* 巡检类型 1常规巡河 2其他
*/
private Integer inspectionType;


}

+ 112
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ReportPatrol.java View File

@@ -0,0 +1,112 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 巡检报告表
*
* @author ww
* @since 2021-12-09
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_stream_report")
public class ReportPatrol extends BaseEntity {

/**
* 报告编号
*/
private String reportNo;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 巡检编号
*/
private String inspectionCode;

/**
* 巡检任务名称
*/
private String inspectionName;

/**
* 巡检河流ID
*/
private Integer streamId;

/**
* 河流名称
*/
private String streamName;

/**
* 河流区划名称
*/
private String streamArea;

/**
* 河段长度
*/
private String streamLength;

/**
* 起止位置
*/
private String streamLocation;

/**
* 天气情况
*/
private String weather;

/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;

/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;

/**
* 巡检方式:1无人机 2无人船 3人工
*/
private Integer inspectionWay;

/**
* 巡检设备
*/
private String inspectionDevice;

/**
* 计划巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 飞行高度
*/
private String flightHeight;

/**
* 巡检类型 1常规巡河 2其他
*/
private Integer inspectionType;

}

+ 115
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Stream.java View File

@@ -0,0 +1,115 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

/**
* 河流表
*
* @author WangHaoran
* @since 2021-09-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_stream")
public class Stream extends BaseEntity {

/**
* 河流编码
*/
@NotBlank(message = "河流编码不能为空!")
private String code;

/**
* 河流名称
*/
@NotBlank(message = "河流名称不能为空!")
private String name;

/**
* 省份编码
*/
@NotBlank(message = "省份编码不能为空!")
private String provinceCode;

/**
* 城市编码
*/
@NotBlank(message = "城市编码不能为空!")
private String cityCode;

/**
* 区县编码
*/
@NotBlank(message = "区县编码不能为空!")
private String districtCode;

/**
* 街道编码
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String streetCode;

/**
* 村编码
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String villageCode;

/**
* 经度
*/
@NotBlank(message = "经度不能为空!")
private String longitude;

/**
* 纬度
*/
@NotBlank(message = "纬度不能为空!")
private String latitude;

/**
* 起止位置
*/
@NotBlank(message = "起止位置不能为空!")
private String location;

/**
* 河流长度
*/
@NotBlank(message = "河流长度不能为空!")
private String length;

/**
* 备注
*/
private String note;

/**
* 状态:1正常 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

/**
* 头像url
*/
private String image;
}

+ 55
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/StreamGis.java View File

@@ -0,0 +1,55 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 河流GIS表
*
* @author WangHaoran
* @since 2021-12-07
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_stream_gis")
public class StreamGis extends BaseEntity {

/**
* 河流ID
*/
private Integer streamId;

/**
* 文件类型 1 正射影像 2 720全景
*/
private Integer fileType;

/**
* 文件地址
*/
private String fileUrl;

/**
* 采集开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date startTime;

/**
* 采集结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date endTime;


}

+ 90
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/TaskListData.java View File

@@ -0,0 +1,90 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* 任务清单数据表
*
* @author WangHaoran
* @since 2021-07-06
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_task_list_data")
public class TaskListData extends BaseEntity {

/**
* 任务唯一ID
*/
private String fguid;

/**
* 云盒SN号
*/
private String boxSn;

/**
* 任务类型,包含:常规巡河、月度考核、复飞巡查、临时保障
*/
private String taskType;

/**
* 任务名称
*/
private String taskName;

/**
* 任务起止点
*/
private String taskOrigDest;

/**
* 任务长度,单位KM
*/
private String taskLength;

/**
* 任务状态,包含:未执行、执行中、已完成
*/
private String taskState;

/**
* 所属区划
*/
private String qh;

/**
* 巡查人员
*/
private String xcry;

/**
* 开始日期
*/
private String startDate;

/**
* 完成日期
*/
private String finishDate;

/**
* 任务月份,格式:yyyyMM
*/
private String month;

/**
* 推送状态:0待推送 1推送成功 2推送失败
*/
private Integer pushStatus;

/**
* 执行状态:0未执行 1执行中 2已完成
*/
private Integer status;
}

+ 113
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThFlightData.java View File

@@ -0,0 +1,113 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* th_flight_data
* @author
*/
@Data
@EqualsAndHashCode
public class ThFlightData implements Serializable {
/**
* ID
*/
private Integer id;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 云盒SN号
*/
private String boxSn;

/**
* 经度
*/
private String lng;

/**
* 纬度
*/
private String lat;

/**
* 海拔高度
*/
private String altitude;

/**
* 相对高度
*/
private String ultrasonic;

/**
* 俯仰角
*/
private String pitch;

/**
* 横滚角
*/
private String roll;

/**
* 航向角
*/
private String yaw;

/**
* 空速
*/
private String airspeed;

/**
* 地速
*/
private String velocity;

/**
* 时间戳
*/
private String timestamp;

/**
* 添加人
*/
private Integer createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标识
*/
private Boolean mark;

private static final long serialVersionUID = 1L;
}

+ 316
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspection.java View File

@@ -0,0 +1,316 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* th_inspection
*
* @author
*/
@Data
public class ThInspection implements Serializable {
/**
* ID
*/
private Integer id;

/**
* 巡检任务编号
*/
private String code;

/**
* 巡检任务名称
*/
private String name;

/**
* 巡检任务类型 1 常规;2 日常
*/
private Integer type;

/**
* 巡检方式 1 无人机
*/
private Integer inspectionType;

/**
* 河流ID
*/
private Integer streamId;

/**
* 河流名称
*/
private String streamName;

/**
* 河流长度
*/
private String streamLength;

/**
* 起讫位置
*/
private String location;

/**
* 省
*/
private String province;

/**
* 市
*/
private String city;

/**
* 区
*/
private String district;

/**
* 街道
*/
private String street;

/**
* 村
*/
private String village;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 飞行设备
*/
private Integer equipmentId;

/**
* 推流地址
*/
private String pushUrl;

/**
* 拉流地址
*/
private String pullUrl;

/**
* AI拉流地址
*/
private String aipullUrl;

/**
* AI推流地址
*/
private String aipushUrl;

/**
* 视频上传通道名称
*/
private String chName;

/**
* 状态:1正常 2停用
*/
private Integer chStatus;

/**
* 备注
*/
private String chNote;

/**
* 通道ID
*/
private Integer channelId;

/**
* 飞行设备
*/
private String equipmentName;

/**
* 挂载设备(多选逗号","分隔)
*/
private String equipmentMountId;

/**
* 挂载设备名称(多选逗号","分隔)
*/
private String equipmentMountName;

/**
* 5G云盒ID
*/
private Integer cloudBoxId;

/**
* 挂载设备名称(多选逗号","分隔)
*/
private String boxName;

/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;

/**
* 飞手名称(多选逗号","分隔)
*/
private String flightHandName;

/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;

/**
* 执行结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionEndTime;

/**
* islive 1:实时 2:离线
*/
private Integer isLive;

/**
* 是否正摄:1是 2否
*/
private Integer isTaken;

/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;

/**
* 原视频地址
*/
private String videoUrl;

/**
* AI识别后视频地址
*/
private String aiVideoUrl;

/**
* 报告地址
*/
private String reportUrl;

/**
* 任务状态:1任务待审核 5任务待飞行 10任务飞行中 15任务飞行完成(图片待审核) 20审核未通过 25图片已审核(问题待分派) 30问题待处理 35问题处理中 40问题已处理(报告待生成) 45报告已生成
*/
private Integer status;

/**
* 算法处理状态:1待处理 2处理中 3已处理
*/
private Integer analyseStatus;

/**
* 算法分析进度
*/
private Double progressbar;

/**
* 备注
*/
private String note;

/**
* 天气
*/
private String weather;

/**
* 飞行高度(保留两位小数)
*/
private String flyHeight;

private String srtName;

/**
* 创建人
*/
private Integer createUser;

/**
* 创建人
*/
private String createUserName;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* ai分析心跳时间
*/
private Long heartbeatTime;

/**
* 有效标记
*/
private Integer mark;

private static final long serialVersionUID = 1L;

/**
* 审核记录集合
*/
private List<ThInspectionCheck> thInspectionCheckList;

/**
* 轨迹集合
*/
private List<ThFlightData> thFlightDataList;

/**
* 巡河报告 是否生成 0 未生成 1 已生成
*/
private Integer streamReportStatus;
}

+ 83
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionCheck.java View File

@@ -0,0 +1,83 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* th_inspection_check
* @author
*/
@Data
public class ThInspectionCheck implements Serializable {
/**
* ID
*/
private Integer id;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 审核人
*/
private Integer checkUser;

/**
* 审核人姓名
*/
private String checkUserName;

/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date checkTime;

/**
* 审核状态:1审核通过 2审核未通过
*/
private Integer status;

/**
* 审核备注
*/
private String note;

/**
* 创建人
*/
private Integer createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标记
*/
private Integer mark;

private static final long serialVersionUID = 1L;
}

+ 158
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionFile.java View File

@@ -0,0 +1,158 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* th_inspection_file
* @author
*/
@Data
public class ThInspectionFile implements Serializable {
/**
* ID
*/
private Integer id;

/**
* 图片编码
*/
private String fileCode;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 附件类型:1图片 2视频
*/
private Integer fileType;

/**
* 文件名称
*/
private String fileName;

/**
* 缩略图
*/
private String fileThumbnail;

/**
* 原图
*/
private String fileOriginal;

/**
* 标记图
*/
private String fileImage;

/**
* 文件大小
*/
private Double fileSize;

/**
* 纬度(原始图片纬度)
*/
private String latitude;

/**
* 经度(原始图片经度)
*/
private String longitude;

/**
* 后台上传图片的拍摄时间
*/
private Long shootTime;

/**
* 位置信息
*/
private String location;

/**
* 高德地图经度
*/
private String gaodeLongitude;

/**
* 高德地图纬度
*/
private String gaodeLatitude;

/**
* 高德地图地址
*/
private String gaodeAddress;

/**
* 问题类型ID
*/
private Integer questionId;

/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;

/**
* 详细描述
*/
private String questionDesc;

/**
* 审核状态:0待审核 1已审核
*/
private Integer status;

/**
* 审核人
*/
private Integer checkUser;

/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date checkTime;

/**
* 创建人
*/
private Integer createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标记
*/
private Integer mark;

private static final long serialVersionUID = 1L;
}

+ 85
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionQuestion.java View File

@@ -0,0 +1,85 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
* 问题工单映射实体
*
* @author zhuzishuang
* @date 2021/10/8
*/
@Data
public class ThInspectionQuestion implements Serializable {
/**
* ID
*/
@TableId(type = IdType.AUTO)
private Integer id;

/**
* 问题工单号
*/
private String code;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理
*/
private Boolean status;

/**
* 指派负责人
*/
private Integer assignUser;

/**
* 指派负责人联系方式
*/
private String assignContact;

/**
* 指派备注
*/
private String assignNote;

/**
* 指派时间
*/
private Date assignTime;

/**
* 创建人
*/
private Integer createUser;

/**
* 创建时间
*/
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
private Date updateTime;

/**
* 有效标记
*/
private Boolean mark;

private static final long serialVersionUID = 1L;
}

+ 85
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThInspectionQuestionItem.java View File

@@ -0,0 +1,85 @@
package com.tuoheng.admin.entity.domain;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
* th_inspection_question_item
* @author
*/
@Data
public class ThInspectionQuestionItem implements Serializable {
/**
* ID
*/
private Integer id;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 巡检问题工单ID
*/
private Integer inspectionQuestionId;

/**
* 巡检问题文件ID
*/
private Integer inspectionFileId;

/**
* 处理状态:0待处理 1已处理
*/
private Boolean status;

/**
* 处理人
*/
private Integer handlerUser;

/**
* 处理后图片(多个图片逗号“,”分隔)
*/
private String handlerImage;

/**
* 处理结果
*/
private String handlerResult;

/**
* 处理完成时间
*/
private Date handlerTime;

/**
* 创建人
*/
private Integer createUser;

/**
* 创建时间
*/
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
private Date updateTime;

/**
* 有效标记
*/
private Boolean mark;

private static final long serialVersionUID = 1L;
}

+ 63
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/ThVodVideo.java View File

@@ -0,0 +1,63 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
* th_vod_video
*
* @author
*/
@Data
@Accessors(chain = true)
public class ThVodVideo extends BaseEntity implements Serializable {

/**
* 消息id
*/
private String msgId;

/**
* 业务id
*/
private String bizId;

/**
* 模型id
*/
private String modId;

/**
* 原视频推流地址
*/
private String pushUrl;

/**
* Ai视频推流地址
*/
private String aiPushUrl;

/**
* 结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endTime;

/**
* 状态:1待处理,2已处理
*/
private Integer status;

/**
* 分析状态
*/
private Integer analyseStatus;
}

+ 30
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/Thbusiness.java View File

@@ -0,0 +1,30 @@
package com.tuoheng.admin.entity.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_business")
public class Thbusiness extends BaseEntity {
/**
* 消息id
*/
private String msgId;

/**
* 类型:1巡检任务
*/
private Integer type;

/**
* 类型ID(type对应类型对应的业务ID)
*/
private Integer typeId;
}

+ 25
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/domain/VodVideoDO.java View File

@@ -0,0 +1,25 @@
package com.tuoheng.admin.entity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* th_vod_video
*
* @author
*/
@Data
@Accessors(chain = true)
public class VodVideoDO extends ThVodVideo {

/**
* 消息id
*/
private Integer inspection_id;
}

+ 46
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiAnalysisResult.java View File

@@ -0,0 +1,46 @@
package com.tuoheng.admin.entity.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
* Ai分析结果
* @author chenyukun
*/
@Getter
@Setter
@Accessors(chain = true)
public class AiAnalysisResult implements Serializable {

/**
* 原图地址或原视频地址
*/
@JsonProperty("original_url")
private String originalUrl;

/**
* Ai分析图片地址或视频地址
*/
@JsonProperty("sign_url")
private String signUrl;

/**
* 分类标识
*/
@JsonProperty("category_id")
private String categoryId;

/**
* 问题描述
*/
private String description;

/**
* 时间戳
*/
private String time;
}

+ 41
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiOfflineTask.java View File

@@ -0,0 +1,41 @@
package com.tuoheng.admin.entity.dto;


import lombok.Data;

/**
* 离线分析任务下发
*/
@Data
public class AiOfflineTask {

/**
* 唯一性标识
*/
private String msg_id;

/**
* 业务标识
*/
private String biz_id;

/**
* 模型标识
*/
private String mod_id;

/**
* 素材标识
*/
private String offering_id;

/**
* 素材类型
*/
private String offering_type;

/**
* 图片存储地址
*/
private String results_base_dir;
}

+ 60
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/dto/AiTaskResult.java View File

@@ -0,0 +1,60 @@
package com.tuoheng.admin.entity.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
* @author chenyukun
*/
@Setter
@Getter
@Accessors(chain = true)
public class AiTaskResult implements Serializable {
/**
* 唯一性标识
*/
@JsonProperty("msg_id")
private String msgId;

/**
* 业务标识
*/
@JsonProperty("biz_id")
private String bizId;

/**
* 模型标识
*/
@JsonProperty("mod_id")
private String modId;

/**
* AI任务分析状态
*/
private String status;

/**
* 数据类型
*/
private String type;

/**
* AI任务错误信息
*/
private String error;

/**
* AI任务分析进度
*/
private String progressbar;

/**
* 结果
*/
private List<AiAnalysisResult> results;
}

+ 129
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/AddThInspectionRequest.java View File

@@ -0,0 +1,129 @@
package com.tuoheng.admin.entity.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
* 巡检任务 新增或修改请求参数
* @author: zhu_zishuang
* @date: 2021/9/7
*/
@Data
public class AddThInspectionRequest {
private static final long serialVersionUID = 1L;
private Integer id;

/**
* 巡检任务编号
*/
private String code;

/**
* 巡检任务名称
*/
@NotBlank(message = "巡检任务名称不能为空!")
private String name;

/**
* 巡检任务类型 1 常规;2 日常
*/
@NotNull(message = "巡检任务类型不能为空!")
private Integer type;

/**
* 巡检方式 1 无人机
*/
@NotNull(message = "巡检方式不能为空!")
private Integer inspectionType;

/**
* 河流ID
*/
@NotNull(message = "巡检河道不能为空!")
private Integer streamId;

/**
* 飞行设备
*/
@NotNull(message = "飞行设备不能为空!")
private Integer equipmentId;

/**
* 挂载设备(多选逗号","分隔)
*/
@NotBlank(message = "挂载设备不能为空!")
private String equipmentMountId;

/**
* 挂载设备名称(多选逗号","分隔)
*/
@NotBlank(message = "挂载设备名称不能为空!")
private String equipmentMountName;

/**
* 5G云盒ID
*/
@NotNull(message = "云盒不能为空!")
private Integer cloudBoxId;

/**
* 飞手(多选逗号","分隔)
*/
@NotBlank(message = "飞手不能为空!")
private String flightHand;

/**
* 飞手名称(多选逗号","分隔)
*/
@NotBlank(message = "飞手名称不能为空!")
private String flightHandName;

/**
* 计划巡检日期
*/
@NotNull(message = "计划巡检日期不能为空!")
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 是否正摄:1是 2否
*/
private Integer isTaken;

/**
* 是否倾斜摄影:1是 2否
*/
private Integer isTilt;

/**
* 视频地址
*/
private String videoUrl;

/**
* 任务状态:1任务待审核 5任务待飞行 10任务飞行中 15任务飞行完成 20审核未通过
*/
private Integer status;

/**
* 备注
*/
private String note;

/**
* 创建人
*/
private Integer createUser;

/**
* 修改人
*/
private Integer updateUser;

}

+ 53
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/AnalysisQuery.java View File

@@ -0,0 +1,53 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* @author ww
* @since 2021-11-04
*/
@Data
public class AnalysisQuery extends BaseQuery {

/**
*省级编码
*/
private String provinceCode;

/**
* 市编码
*/
private String cityCode;
/**
*区编码
*/
private String districtCode ;
/**
* 街道编码
*/
private String streetCode;
/**
* 村庄编码
*/
private String villageCode;
/**
* 月份区间
*/
private Integer mm;
/**
* 查询图标参数 1饼图 2 柱状图
*/
private Integer type;

/**
* 河流id
*/
private Integer streamId;

/**
* 显示数量
*/
private Integer limit;

}

+ 30
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/CloudBoxQuery.java View File

@@ -0,0 +1,30 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 云盒查询
*
* @author WangHaoran
* @since 2021-09-01
*/
@Data
public class CloudBoxQuery extends BaseQuery {

/**
* 云盒SN号
*/
private String boxSn;

/**
* 云盒名称
*/
private String boxName;

/**
* 启用状态:1已启用 2未启用
*/
private Integer status;

}

+ 25
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/EquipmentMountQuery.java View File

@@ -0,0 +1,25 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 飞行设备表查询
*
* @author WangHaoran
* @since 2021-09-03
*/
@Data
public class EquipmentMountQuery extends BaseQuery {

/**
* 设备名称
*/
private String name;

/**
* 类型:1摄像头 2其他
*/
private Integer type;

}

+ 58
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/EquipmentQuery.java View File

@@ -0,0 +1,58 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

import java.math.BigDecimal;


/**
* 飞行设备表查询
*
* @author WangHaoran
* @since 2021-09-03
*/
@Data
public class EquipmentQuery extends BaseQuery {

/**
* 设备名称
*/
private String name;

/**
* 动力类型:1电动 2油动 3混合
*/
private Integer powerType;

/**
* 定位精度(单位:米)
*/
private BigDecimal accuracy;

/**
* 生产厂家
*/
private String manufacturer;

/**
* 产品等级:1微型 2轻型 3小型 4中型 5大型 6其他
*/
private Integer productLevel;

/**
* 产品类型:1多旋翼 2固定翼 3垂直起降
*/
private Integer type;

/**
* 续航时间(单位:分钟)
*/
private Integer lifeTime;

/**
* 直播地址通道
*/
private Integer liveChannel;

}

+ 17
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/FlightDataQuery.java View File

@@ -0,0 +1,17 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 飞行轨迹坐标查询条件
*/
@Data
public class FlightDataQuery extends BaseQuery {

/**
* 巡检任务ID
*/
Integer inspectionId;

}

+ 17
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/HandleImageRequest.java View File

@@ -0,0 +1,17 @@
package com.tuoheng.admin.entity.request;

import lombok.Data;

@Data
public class HandleImageRequest {

/**
* 文件ID
*/
private Integer fileId;

/**
* 处理结果
*/
private String handlerResult;
}

+ 28
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/LiveChannelQuery.java View File

@@ -0,0 +1,28 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 直播通道表查询
*
* @author WangHaoran
* @since 2021-09-04
*/
@Data
public class LiveChannelQuery extends BaseQuery {
/**
* 通道名称
*/
private String name;

/**
* 推流地址(回流地址)
*/
private String pushUrl;

/**
* 拉流地址(直播地址)
*/
private String pullUrl;
}

+ 57
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryInspectionRequest.java View File

@@ -0,0 +1,57 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 查询巡检任务请求实体
*
* @author: zhu_zishuang
* @date: 2021/9/6
*/
@Data
public class QueryInspectionRequest extends BaseQuery {
private Integer id;
/**
* 任务名称
*/
private String name;

/**
* 任务状态
*/
private Integer status;

/**
* 任务编号
*/
private String code;

/**
* 河流
*/
private Integer streamId;

/**
* 巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date inspectionTime;
/**
* 用户ID
*/
private Integer userId;

/**
* 为1时,查询信息录入列表数据
*/
private Integer inputFlag;

/**
* 算法处理状态:1待处理 2处理中 3已处理
*/
private Integer analyseStatus;
}

+ 42
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryQuestionPictureRequest.java View File

@@ -0,0 +1,42 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
* 查询巡检问题图片请求参数
*
* @author: zhu_zishuang
* @date: 2021/9/26
*/
@Data
public class QueryQuestionPictureRequest extends BaseQuery {
/**
* 巡检ID
*/
@NotNull(message = "巡检ID不能为空!")
private Integer inspectionId;

/**
* 问题类型一级分类ID
*/
private Integer questionName;

/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;

/**
* 图片审核状态:0待审核 1已审核
*/
private Integer status;

/**
* 巡检内容
*/
private String content;
}

+ 44
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QueryQuestionRequest.java View File

@@ -0,0 +1,44 @@
package com.tuoheng.admin.entity.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseQuery;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 查询巡检问题请求参数
*
* @author: zhu_zishuang
* @date: 2021/9/26
*/
@Data
public class QueryQuestionRequest extends BaseQuery {
/**
* 河道名称
*/
private String streamName;

/**
* 巡检任务编号
*/
private String inspectionCode;

/**
* 巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 任务名称
*/
private String inspectionName;

/**
* 任务状态
*/
private Integer status;
}

+ 34
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionFileRequest.java View File

@@ -0,0 +1,34 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 查询问题清单列表 请求参数
*
* @author: WangHaoran
* @date: 2021/9/26
*/
@Data
public class QuestionFileRequest extends BaseQuery {

/**
* 项目名称:1河湖水面 2河湖岸线 3河湖感观水质4入河、湖异常排口
*/
private Integer name;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 图片ID
*/
private Integer fileId;

/**
* 图片图片
*/
private String fileCode;
}

+ 45
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionInventoryRequest.java View File

@@ -0,0 +1,45 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 查询问题清单 请求参数
*
* @author: WangHaoran
* @date: 2021/9/26
*/
@Data
public class QuestionInventoryRequest extends BaseQuery {

/**
* 河流名称
*/
private String streamName;

/**
* 巡检时间
*/
private String inspectionTime;

/**
* 工单编码
*/
private String code;

/**
* 巡检编码
*/
private String inspectionCode;

/**
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理
*/
private String status;

/**
* 巡检名称
*/
private String inspectionName;

}

+ 28
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/QuestionQuery.java View File

@@ -0,0 +1,28 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 巡检问题查询
*
* @author WangHaoran
* @since 2021-09-02
*/
@Data
public class QuestionQuery extends BaseQuery {
/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 项目类型:1日常监测 2重点核查
*/
private Integer type;

/**
* 巡检内容
*/
private String content;
}

+ 53
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/ReportRequest.java View File

@@ -0,0 +1,53 @@
package com.tuoheng.admin.entity.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseQuery;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 报告查询
*
* @author WangHaoran
* @since 2021-10-8
*/
@Data
public class ReportRequest extends BaseQuery {

/**
* 河流名称
*/
private String streamName;

/**
* 巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private String inspectionTime;

/**
* 报告编号
*/
private String reportNo;

/**
* 报告ID
*/
private Integer reportId;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 巡检编码
*/
private String inspectionCode;

/**
* 巡检名称
*/
private String inspectionName;
}

+ 68
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/StreamGisQuery.java View File

@@ -0,0 +1,68 @@
package com.tuoheng.admin.entity.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.common.BaseQuery;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 河流GIS查询
*
* @author WangHaoran
* @since 2021-12-07
*/
@Data
public class StreamGisQuery extends BaseQuery {

/**
* 巡检河流ID
*/
private Integer streamId;

/**
* 河道名称
*/
private String StreamName;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 文件类型 1 正射影像 2 720全景
*/
private Integer fileType;

/**
* 采集开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date startTime;

/**
* 采集结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date endTime;

}

+ 50
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/StreamQuery.java View File

@@ -0,0 +1,50 @@
package com.tuoheng.admin.entity.request;

import com.tuoheng.common.common.BaseQuery;
import lombok.Data;

/**
* 河流查询
*
* @author WangHaoran
* @since 2021-09-06
*/
@Data
public class StreamQuery extends BaseQuery {

/**
* 河流名称
*/
private String name;

/**
* 河流编码
*/
private String code;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 村编码
*/
private String villageCode;

}

+ 71
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UAVKHQuestionRequest.java View File

@@ -0,0 +1,71 @@
package com.tuoheng.admin.entity.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 常规巡河问题
*
* @author WangHaoran
* @since 2021-07-16
*/
@Data
public class UAVKHQuestionRequest implements Serializable {
private static final long serialVersionUID = 1L;

/**
* 帧号
*/
private String fid;
/**
* 问题类型
*/
private String type;

/**
* 问题类型ID
*/
private Integer typeId;

/**
* 图片Base64
*/
private String imgData;

/**
* 图片名称,包含.jpg后缀
*/
private String imgName;

/**
* 原始图片Base64
*/
private String imgDataOriginal;

/**
* 原始图片名称,包含.jpg后缀
*/
private String imgNameOriginal;

/**
* 巡检编码
*/
private String code;

/**
* 备注
*/
private String note;

/**
* 时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time;
}

+ 15
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UpdateLiveChannel.java View File

@@ -0,0 +1,15 @@
package com.tuoheng.admin.entity.request;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
public class UpdateLiveChannel {

private Integer id;

private Integer status;
}

+ 28
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/request/UploadVideoUrlRequest.java View File

@@ -0,0 +1,28 @@
package com.tuoheng.admin.entity.request;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UploadVideoUrlRequest {

/**
* 巡检ID
*/
@NotNull
private Integer inspectionId;

/**
* 视频地址
*/
@NotBlank
private String videoUrl;

/**
* 备注
*/
private String note;
}

+ 21
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/AIInspectionVo.java View File

@@ -0,0 +1,21 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

/**
* AI分析返回视图Vo
*/
@Data
public class AIInspectionVo {

/**
* 巡检任务编号
*/
private String code;

/**
* 视频URL
*/
private String videoUrl;

}

+ 131
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/EquipmentVo.java View File

@@ -0,0 +1,131 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
* 无人机信息Vo
*/
@Data
public class EquipmentVo {


/**
* 主键ID
*/
private Integer id;

/**
* 设备编号
*/
private String code;

/**
* 设备名称
*/
private String name;

/**
* 内置摄像头:1精灵4摄像头 2精灵4pro摄像头 3M600PRO-01 4MAVIC2
*/
private Integer camera;

/**
* 产品序号
*/
private String productSn;

/**
* 产品等级:1微型 2轻型 3小型 4中型 5大型 6其他
*/
private Integer productLevel;

/**
* 飞控序号
*/
private String flightSn;

/**
* 动力类型:1电动 2油动 3混合
*/
private Integer powerType;

/**
* 定位精度(单位:米)
*/
private BigDecimal accuracy;

/**
* 生产厂家
*/
private String manufacturer;

/**
* 产品类型:1多旋翼 2固定翼 3垂直起降
*/
private Integer type;

/**
* 续航时间(单位:分钟)
*/
private Integer lifeTime;

/**
* 直播地址通道ID
*/
private Integer liveChannel;

/**
* 直播地址通道名称
*/
private String liveChannelName;

/**
* 状态:1正常 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

/**
* 添加人
*/
private Integer createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标识
*/
private Integer mark;

}

+ 40
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/InspectionFileInfoVo.java View File

@@ -0,0 +1,40 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

@Data
public class InspectionFileInfoVo {

/**
* 主键
*/
private Integer id;

/**
* 标记图地址
*/
private String fileImage;

/**
* 纬度
*/
private String latitude;

/**
* 经度
*/
private String longitude;

/**
* 详细描述
*/
private String content;

private String handerName;

private String handTime;

private String handContent;

private String handImg;
}

+ 29
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionCountVo.java View File

@@ -0,0 +1,29 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

@Data
public class QuestionCountVo {

private Integer id;

/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 项目类型:1日常监测 2重点核查
*/
private Integer type;

/**
* 巡检内容
*/
private String content;

/**
* 数量
*/
private Integer totalCount;
}

+ 69
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionDetailVo.java View File

@@ -0,0 +1,69 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

@Data
public class QuestionDetailVo {


/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 位置信息
*/
private String location;

/**
* 标记图
*/
private String fileImage;

/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 项目类型:1日常监测 2重点核查
*/
private Integer type;

/**
* 巡检内容
*/
private String content;

/**
* 处理后图片(多个图片逗号“,”分隔)
*/
private String handlerImage;

/**
* 处理结果
*/
private String handlerResult;

/**
* 处理完成时间
*/
private String handlerTime;

/**
* 处理人名称
*/
private String userName;

/**
* 处理状态:0待处理 1已处理
*/
private Integer status;

}

+ 53
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionFileVo.java View File

@@ -0,0 +1,53 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

@Data
public class QuestionFileVo {

/**
* th_inspection_file表ID
*/
private Integer id;

/**
* 图片编码
*/
private String fileCode;

/**
* 标记图地址
*/
private String fileImage;

/**
* 缩略图地址
*/
private String fileThumbnail;

/**
* 纬度
*/
private String latitude;

/**
* 经度
*/
private String longitude;

/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 问题描述
*/
private String content;

/**
* 处理状态:0待处理 1已处理
*/
private Integer status;

}

+ 65
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionInventoryVo.java View File

@@ -0,0 +1,65 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

import java.util.List;

@Data
public class QuestionInventoryVo {

/**
* th_inspection_question表ID
*/
private Integer id;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 清单编码(工单编码)
*/
private String code;

/**
* 巡检河道
*/
private String streamName;

/**
* 任务名称
*/
private String inspectionName;

/**
* 巡检编码
*/
private String inspectionCode;

/**
* 巡检时间
*/
private String inspectionTime;

/**
* 发现问题数量
*/
private Integer totalCount;

/**
* 未处理问题数量
*/
private Integer todoCount;

/**
* 处理状态:1问题待指派 2问题待处理 3问题处理中 4问题已处理
*/
private Integer status;

/**
* 问题类型统计
*/
private List<QuestionTypeCountVo> typeCount;

}

+ 17
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/QuestionTypeCountVo.java View File

@@ -0,0 +1,17 @@
package com.tuoheng.admin.entity.vo;

import lombok.Data;

@Data
public class QuestionTypeCountVo {

/**
* 项目名称:1水面 2岸线 3水质 4排口
*/
private Integer name;

/**
* 数量
*/
private Integer totalCount;
}

+ 129
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ReportInfoVo.java View File

@@ -0,0 +1,129 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
* 报告信息Vo
*/
@Data
public class ReportInfoVo {

/**
* 主键ID
*/
private Integer id;

/**
* 报告编号
*/
private String reportNo;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 巡检任务名称
*/
private String inspectionName;

/**
* 巡检河流ID
*/
private Integer streamId;

/**
* 河流名称
*/
private String streamName;

/**
* 河流区划名称
*/
private String streamArea;

/**
* 河段长度
*/
private String streamLength;

/**
* 起止位置
*/
private String streamLocation;

/**
* 天气情况
*/
private String weather;

/**
* 飞手(多选逗号","分隔)
*/
private String flightHand;

/**
* 飞手姓名(多选逗号","分隔)
*/
private String flightHandName;

/**
* 巡检方式:1无人机 2无人船 3人工
*/
private Integer inspectionWay;

/**
* 巡检设备
*/
private String inspectionDevice;

/**
* 计划巡检时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 飞行高度
*/
private String flightHeight;

/**
* 巡检类型 1常规巡河 2其他
*/
private Integer inspectionType;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 问题点数量
*/
private Integer questionCount;

/**
* 巡查人数
*/
private Integer inspectionPeopleCount;

/**
* 巡检结果
*/
private List<QuestionCountVo> inspectionResult;

/**
* 问题清单
*/
private List<InspectionFileInfoVo> imageList;
}

+ 21
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ReportPatrolVo.java View File

@@ -0,0 +1,21 @@
package com.tuoheng.admin.entity.vo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.tuoheng.admin.entity.domain.ReportPatrol;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
* 巡检报告表id
*
* @author chenyukun
* @since 2022-02-24
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class ReportPatrolVo extends ReportPatrol {

private Integer patrolId;
}

+ 103
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/StreamGisVo.java View File

@@ -0,0 +1,103 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class StreamGisVo {

/**
* 河流GIS表ID
*/
private Integer id;

/**
* 河流ID
*/
private Integer streamId;

/**
* 河流名称
*/
private String streamName;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 城市名称(省市区街道拼接)
*/
private String CityArea;

/**
* 文件类型 1 正射影像 2 720全景
*/
private Integer fileType;

/**
* 文件地址
*/
private String fileUrl;

/**
* 采集开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date startTime;

/**
* 采集结束时间
*/
@DateTimeFormat(pattern = "yyyy-MM")
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
private Date endTime;

/**
* 添加人
*/
private Integer createUser;

/**
* 添加人名称
*/
private String createUserName;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

}

+ 163
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/StreamInfoVo.java View File

@@ -0,0 +1,163 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 河流信息Vo
*/
@Data
public class StreamInfoVo {
/**
* 主键
*/
private Integer id;

/**
* 河流编码
*/
private String code;

/**
* 河流名称
*/
private String name;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 村编码
*/
private String villageCode;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 起止位置
*/
private String location;

/**
* 河流长度
*/
private String length;

/**
* 备注
*/
private String note;

/**
* 状态:1正常 2停用
*/
private Integer status;

/**
* 添加人名称
*/
private String createUserName;

/**
* 更新人名称
*/
private String updateUserName;

/**
* 城市名称(省市区街道村拼接)
*/
private String cityArea;

/**
* 省份名称
*/
private String provinceName;

/**
* 城市名称
*/
private String cityName;

/**
* 区县名称
*/
private String districtName;

/**
* 街道名称
*/
private String streetName;

/**
* 村名称
*/
private String villageName;

/**
* 添加人
*/
private Integer createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private Integer updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标识
*/
private Integer mark;


/**
* 头像地址
*/
private String image;

/**
* 巡检河流数量
*/
private Integer streamGisNumber;
}

+ 63
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionFileVo.java View File

@@ -0,0 +1,63 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 巡检问题工单 映射实体
*
* @author zhuzishuang
* @date 2021/9/27
*/
@Data
public class ThInspectionFileVo implements Serializable {
private static final long serialVersionUID = 1L;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 巡检编码
*/
private String inspectionCode;

/**
* 巡检名称
*/
private String inspectionName;

/**
* 河流名称
*/
private String streamName;

/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;

/**
* 图片数量
*/
private Integer number;

/**
* 任务状态: 15 任务飞行完成(图片待审核);25 图片已审核(问题待分派)
*/
private Integer status;
}

+ 121
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionQuestionPictureVo.java View File

@@ -0,0 +1,121 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 巡检问题图片 响应实体
*
* @author zhuzishuang
* @date 2021/9/27
*/
@Data
public class ThInspectionQuestionPictureVo implements Serializable {
private static final long serialVersionUID = 1L;

/**
* 问题ID
*/
private Integer id;

/**
* 图片编码
*/
private String fileCode;

/**
* 巡检任务ID
*/
private Integer inspectionId;

/**
* 问题 二级分类ID
*/
private Integer questionId;

/**
* 问题类型:1水面 2岸线 3水质 4排口
*/
private Integer questionName;

/**
* 巡检内容(问题二级分类名称)
*/
private String content;

/**
* 图片缩略图
*/
private String fileThumbnail;

/**
* 原图
*/
private String fileOriginal;

/**
* 标记图
*/
private String fileImage;

/**
* 位置信息
*/
private String location;

/**
* 纬度(原始图片纬度)
*/
private String latitude;

/**
* 纬度(原始图片纬度)
*/
private String longitude;

/**
* 高德地图经度
*/
private String gaodeLongitude;

/**
* 高德地图纬度
*/
private String gaodeLatitude;

/**
* 图片来源:1AI 2后台 3视频
*/
private Integer source;

/**
* 图片审核状态:0待审核 1已审核
*/
private Integer status;

/**
* 审核人ID
*/
private Integer checkUser;

/**
* 审核人
*/
private String checkUserName;

/**
* 详细描述
*/
private String questionDesc;

/**
* 审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date checkTime;
}

+ 76
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/entity/vo/ThInspectionQuestionVo.java View File

@@ -0,0 +1,76 @@
package com.tuoheng.admin.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
* 巡检问题工单 映射实体
* 巡检问题 响应实体
*
* @author zhuzishuang
* @date 2021/9/27
*/
@Data
@EqualsAndHashCode
public class ThInspectionQuestionVo implements Serializable {
private static final long serialVersionUID = 1L;

/**
* 巡检ID
*/
private Integer inspectionId;

/**
* 巡检编码
*/
private String inspectionCode;

/**
* 巡检名称
*/
private String inspectionName;

/**
* 河流名称
*/
private String streamName;

/**
* 计划巡检日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date inspectionTime;

/**
* 执行开始时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date executionStartTime;

/**
* 已审核图片数量
*/
private Integer reviewedPictureNum;

/**
* 未审核图片数量
*/
private Integer unreviewedPictureNum;

/**
* 图片总数量
*/
private Integer totalPictureNum;

/**
* 任务状态: 15 任务飞行完成(图片待审核);25 图片已审核(问题待分派)
*/
private Integer status;
}

+ 42
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AiAnalyseStatusEnum.java View File

@@ -0,0 +1,42 @@
package com.tuoheng.admin.enums;

import lombok.Getter;

/**
* Ai分析状态
*/
public enum AiAnalyseStatusEnum {
UPLOADED(1,"uploaded"),

WAITING(2,"waiting"),

RUNNING(3,"running"),

SUCCESS(4,"success"),

SUCCESS_TIMEOUT(5,"success_timeout"),

FAILED(6,"failed"),

DEFAULT(0,"default");

AiAnalyseStatusEnum(int code, String description){
this.code = code;
this.description = description;
}

@Getter
private int code;

@Getter
private String description;

public static AiAnalyseStatusEnum getByDesc(String description){
for (AiAnalyseStatusEnum analyseStatusEnum : values()) {
if(analyseStatusEnum.getDescription().equals(description)){
return analyseStatusEnum;
}
}
return null;
}
}

+ 26
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AiAnalyseTypeEnum.java View File

@@ -0,0 +1,26 @@
package com.tuoheng.admin.enums;

import lombok.Getter;

/**
* Ai分析状态
* @author chenyukun
*/
public enum AiAnalyseTypeEnum {
ONLINE(1,"在线"),

OFFLINE(2,"离线"),

DEFAULT(0,"default");

AiAnalyseTypeEnum(int code, String description){
this.code = code;
this.description = description;
}

@Getter
private int code;

@Getter
private String description;
}

+ 53
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/enums/AliyunVodUploadStatusEnum.java View File

@@ -0,0 +1,53 @@
package com.tuoheng.admin.enums;

import com.tuoheng.common.exception.ServiceException;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
* https://help.aliyun.com/document_detail/56124.html
*/
public enum AliyunVodUploadStatusEnum {
UPLOADING(1,"Uploading", "上传中"),

UPLOADFAIL(2,"UploadFail", "上传失败"),

UPLOADSUCC(3,"UploadSucc", "上传完成"),

TRANSCODING(4,"Transcoding", "转码中"),

TRANSCODEFAIL(5,"TranscodeFail", "转码失败"),

CHECKING(6,"Checking","审核中"),

BLOCKED(7,"Blocked", "屏蔽"),

NORMAL(8,"Normal", "正常"),

PRODUCEFAIL(9,"ProduceFail", "合成失败"),
;

AliyunVodUploadStatusEnum(int code, String name, String description){
this.code = code;
this.name = name;
this.description = description;
}

@Getter
private int code;

@Getter
private String name;

@Getter
private String description;

public static AliyunVodUploadStatusEnum getByName(String name){
for (AliyunVodUploadStatusEnum analyseStatusEnum : values()) {
if(analyseStatusEnum.getName().equals(name)){
return analyseStatusEnum;
}
}
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "非法Vod视频上传状态");
}
}

+ 0
- 0
tuoheng-admin/src/main/java/com/tuoheng/admin/enums/ChannelStatusEnum.java View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save