1、使用静态配置配置摄像头截图路径及回调url
2、调通websocket消息发送local模式及rabbitmq模式
3、修改文档系统删除文档时id选择错误的bug,会删错文档
4、移除framework中的build,加快构建速度
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | |
| | | </dependencies> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | <dependency> |
| | | <groupId>org.springframework.kafka</groupId> |
| | | <artifactId>spring-kafka</artifactId> |
| | | <optional>true</optional> |
| | | <!-- <optional>true</optional>--> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.amqp</groupId> |
| | | <artifactId>spring-rabbit</artifactId> |
| | | <optional>true</optional> |
| | | <!-- <optional>true</optional>--> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.rocketmq</groupId> |
| | | <artifactId>rocketmq-spring-boot-starter</artifactId> |
| | | <optional>true</optional> |
| | | <!-- <optional>true</optional>--> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
| | |
| | | <groupId>io.github.mouzt</groupId> |
| | | <artifactId>bizlog-sdk</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | <!-- <descriptors>--> |
| | | <!-- <descriptor>src/main/resources/assembly.xml</descriptor>--> |
| | | <!-- </descriptors>--> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
| | |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-common-mq</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.kafka</groupId> |
| | | <artifactId>spring-kafka</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.amqp</groupId> |
| | | <artifactId>spring-rabbit</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.rocketmq</groupId> |
| | | <artifactId>rocketmq-spring-boot-starter</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.kafka</groupId>--> |
| | | <!-- <artifactId>spring-kafka</artifactId>--> |
| | | <!-- <optional>true</optional>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.amqp</groupId>--> |
| | | <!-- <artifactId>spring-rabbit</artifactId>--> |
| | | <!-- <optional>true</optional>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.apache.rocketmq</groupId>--> |
| | | <!-- <artifactId>rocketmq-spring-boot-starter</artifactId>--> |
| | | <!-- <optional>true</optional>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- 业务组件 --> |
| | | <dependency> |
| | |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-assembly-plugin</artifactId> |
| | | <version>3.3.0</version> |
| | | <executions> |
| | | <execution> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>single</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | <configuration> |
| | | <descriptorRefs> |
| | | <descriptorRef>jar-with-dependencies</descriptorRef> |
| | | </descriptorRefs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | |
| | | </project> |
| | |
| | | <artifactId>jna</artifactId> |
| | | <version>1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.amqp</groupId> |
| | | <artifactId>spring-rabbit</artifactId> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.amqp</groupId>--> |
| | | <!-- <artifactId>spring-rabbit</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | package com.iailab.module.data.mq.consumer; |
| | | |
| | | import org.springframework.amqp.core.ExchangeTypes; |
| | | import org.springframework.amqp.rabbit.annotation.*; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | * @createTime 2024年11月05日 |
| | | */ |
| | | @Component |
| | | @RabbitListener( |
| | | bindings = @QueueBinding( |
| | | value = @Queue( |
| | | // 在 Queue 的名字上,使用 UUID 生成其后缀。这样,启动的 Consumer 的 Queue 不同,以达到广播消费的目的 |
| | | name = ImageMessage.DAHUA_ROUTING_KEY, |
| | | // Consumer 关闭时,该队列就可以被自动删除了 |
| | | autoDelete = "true" |
| | | ), |
| | | exchange = @Exchange( |
| | | name = ImageMessage.EXCHANGE, |
| | | type = ExchangeTypes.TOPIC, |
| | | declare = "false", |
| | | autoDelete = "true" |
| | | ) |
| | | ) |
| | | ) |
| | | @RabbitListener( |
| | | bindings = @QueueBinding( |
| | | value = @Queue( |
| | | // 在 Queue 的名字上,使用 UUID 生成其后缀。这样,启动的 Consumer 的 Queue 不同,以达到广播消费的目的 |
| | | name = ImageMessage.HIKVISION_ROUTING_KEY, |
| | | // Consumer 关闭时,该队列就可以被自动删除了 |
| | | autoDelete = "true" |
| | | ), |
| | | exchange = @Exchange( |
| | | name = ImageMessage.EXCHANGE, |
| | | type = ExchangeTypes.TOPIC, |
| | | declare = "false", |
| | | autoDelete = "true" |
| | | ) |
| | | ) |
| | | ) |
| | | @RabbitListener(queues = ImageMessage.DAHUA_ROUTING_KEY) |
| | | @RabbitListener(queues = ImageMessage.HIKVISION_ROUTING_KEY) |
| | | public class ImageConsumer { |
| | | |
| | | // @RabbitHandler |
| | | public void process(ImageMessage imageMessage) throws InterruptedException { |
| | | System.out.println("1111111111111111111111111"); |
| | | System.out.println("测试消费摄像头截图RabbitMQ消息----------------------"); |
| | | Thread.sleep(5000); |
| | | System.out.println(imageMessage.toString()); |
| | | System.out.println(new Date()); |
| | |
| | | @Data |
| | | public class ImageMessage implements Serializable { |
| | | |
| | | //暂时取消queue,使用routing自动生成 |
| | | // public static final String QUEUE = "topic.image"; |
| | | |
| | | public static final String EXCHANGE = "imageExchange"; |
| | | public static final String EXCHANGE = "data-server-image-exchange"; |
| | | |
| | | public static final String ROUTING_KEY = RoutingConstant.Iailab_Data_Image; |
| | | |
| | |
| | | import com.sun.jna.ptr.IntByReference; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import java.awt.*; |
| | | import java.io.File; |
| | |
| | | public class DHCapturePictureClient { |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback"; |
| | | // private String url = "http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback"; |
| | | // @Value("${video.dahua.callback.url}") |
| | | // public String url; |
| | | |
| | | // 登陆句柄 |
| | | public static NetSDKLib netsdk = NetSDKLib.NETSDK_INSTANCE; |
| | |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("strFileName", strFileName); |
| | | params.put("cmdSerial", cmdSerial); |
| | | HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); |
| | | HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); |
| | | } |
| | | return true; |
| | | } catch (Exception ex) { |
| | |
| | | import com.sun.jna.Pointer; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.ByteArrayInputStream; |
| | |
| | | * @createTime 2024年03月06日 |
| | | */ |
| | | public class DHCaptureReceiveCB implements NetSDKLib.fSnapRev { |
| | | |
| | | @Value("${dahua.callback.url}") |
| | | public String url; |
| | | |
| | | @Override |
| | | public void invoke(NetSDKLib.LLong lLoginID, Pointer pBuf, int revLen, int encodeType, int cmdSerial, Pointer dwUser) { |
| | |
| | | Map<String, String> params = new HashMap<>(); |
| | | params.put("strFileName", strFileName); |
| | | params.put("cmdSerial", Integer.valueOf(cmdSerial).toString()); |
| | | HttpRequest.doPost(url, JSON.toJSONString(params), "utf-8", ""); |
| | | HttpRequest.doPost(DHConfiguration.staticUrl, JSON.toJSONString(params), "utf-8", ""); |
| | | |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.iailab.module.data.video.dahua; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | |
| | | @Configuration |
| | | public class DHConfiguration { |
| | | |
| | | @Value("${video.dahua.path.capturePath}") |
| | | public String capturePath; |
| | | |
| | | @Value("${video.dahua.path.modelPath}") |
| | | public String modelPath; |
| | | |
| | | @Value("${video.dahua.callback.url}") |
| | | public String url; |
| | | |
| | | public static String staticCapturePath; |
| | | |
| | | public static String staticModelPath; |
| | | |
| | | public static String staticUrl; |
| | | |
| | | @PostConstruct |
| | | public void initUrl() { |
| | | staticCapturePath = this.capturePath; |
| | | staticModelPath = this.modelPath; |
| | | staticUrl = this.url; |
| | | } |
| | | } |
| | |
| | | |
| | | private static DHSavePath instance = new DHSavePath(); |
| | | |
| | | public final static String capturePath = "D:/irs/Capture/"; |
| | | |
| | | public final static String modelPath = "D:/irs/Model/"; |
| | | |
| | | public static DHSavePath getSavePath() { |
| | | return instance; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public String getSaveCapturePath(String channel, Date curDate) { |
| | | File path1 = new File(capturePath); |
| | | File path1 = new File(DHConfiguration.staticCapturePath); |
| | | if (!path1.exists()) { |
| | | path1.mkdir(); |
| | | } |
| | | |
| | | File path2 = new File(capturePath + ToolKits.getDay() + "/" + channel + "/"); |
| | | File path2 = new File(DHConfiguration.staticCapturePath + ToolKits.getDay() + "/" + channel + "/"); |
| | | if (!path2.exists()) { |
| | | path2.mkdirs(); |
| | | } |
| | |
| | | // path1.mkdir(); |
| | | // } |
| | | |
| | | File path2 = new File(modelPath + ToolKits.getDay() + "/" + cameraCode + "/"); |
| | | File path2 = new File(DHConfiguration.staticModelPath + ToolKits.getDay() + "/" + cameraCode + "/"); |
| | | // if (!path2.exists()) { |
| | | // path2.mkdirs(); |
| | | // } |
| | |
| | | import com.iailab.framework.web.core.util.WebFrameworkUtils; |
| | | import com.iailab.module.data.mq.consumer.ImageMessage; |
| | | import com.iailab.module.data.video.controller.admin.camera.vo.CameraPageReqVO; |
| | | import com.iailab.module.data.video.dahua.DHConfiguration; |
| | | import com.iailab.module.data.video.dahua.DHSavePath; |
| | | import com.iailab.module.data.video.dao.CameraDao; |
| | | import com.iailab.module.data.video.dao.ImageDao; |
| | |
| | | CameraDTO devCamera = getByCode(params.get("cmdSerial")); |
| | | String strFileName = params.get("strFileName"); |
| | | String imagePath = strFileName.replace("\\", "/"); |
| | | String imageUrl = imagePath.replace(DHSavePath.capturePath, ""); |
| | | String imageUrl = imagePath.replace(DHConfiguration.staticCapturePath, ""); |
| | | ImageEntity image = new ImageEntity(); |
| | | image.setCameraId(devCamera.getId()); |
| | | image.setImagePath(imagePath); |
| | |
| | | imageMessage.setCreateTime(createTime); |
| | | imageMessage.setImageDTO(BeanUtils.toBean(image, ImageDTO.class)); |
| | | rabbitTemplate.convertAndSend(ImageMessage.EXCHANGE, ImageMessage.DAHUA_ROUTING_KEY, imageMessage); |
| | | rabbitTemplate.convertAndSend(ImageMessage.EXCHANGE, ImageMessage.HIKVISION_ROUTING_KEY, imageMessage); |
| | | } |
| | | |
| | | } |
| | |
| | | iems: |
| | | upload-dir: D:/DLUT/upload/ |
| | | |
| | | video: |
| | | dahua: |
| | | path: |
| | | capturePath: D:/irs/Capture/ |
| | |
| | | iems: |
| | | upload-dir: D:/DLUT/upload/ |
| | | |
| | | video: |
| | | dahua: |
| | | path: |
| | | capturePath: D:/irs/Capture/ |
| | | modelPath: D:/irs/Model/ |
| | | callback: |
| | | url: http://localhost:48080/admin-api/data/video/camera/DHCaptureCallback |
| | | |
| | |
| | | </dependency> |
| | | |
| | | <!-- 消息队列相关 --> |
| | | <dependency> |
| | | <groupId>com.iailab</groupId> |
| | | <artifactId>iailab-common-mq</artifactId> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.iailab</groupId>--> |
| | | <!-- <artifactId>iailab-common-mq</artifactId>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- Test 测试相关 --> |
| | | <dependency> |
| | |
| | | spring: |
| | | # RabbitMQ 配置项,对应 RabbitProperties 配置类 |
| | | rabbitmq: |
| | | host: 172.16.8.100 # RabbitMQ 服务的地址 |
| | | host: 172.16.8.200 # RabbitMQ 服务的地址 |
| | | port: 5672 # RabbitMQ 服务的端口 |
| | | username: guest # RabbitMQ 服务的账号 |
| | | password: guest # RabbitMQ 服务的密码 |
| | | username: admin # RabbitMQ 服务的账号 |
| | | password: admin123 # RabbitMQ 服务的密码 |
| | | # Kafka 配置项,对应 KafkaProperties 配置类 |
| | | kafka: |
| | | bootstrap-servers: 172.16.8.100:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔 |
| | |
| | | |
| | | logging: |
| | | file: |
| | | name: @log.path@/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | name: D:/DLUT/IailabPlat/webapp/infra/logs/${spring.application.name}.log # 日志文件名,全路径 |
| | | |
| | | --- #################### 接口文档配置 #################### |
| | | |
| | |
| | | job: |
| | | executor: |
| | | appname: ${spring.application.name} # 执行器 AppName |
| | | logpath: @log.path@/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 |
| | | logpath: D:/DLUT/IailabPlat/webapp/infra/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径 |
| | | accessToken: default_token # 执行器通讯TOKEN |
| | | |
| | | --- #################### 平台相关配置 #################### |
| | |
| | | websocket: |
| | | enable: true # websocket的开关 |
| | | path: /infra/ws # 路径 |
| | | sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq |
| | | sender-type: rabbitmq # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq |
| | | sender-rocketmq: |
| | | topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic |
| | | consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group |