Browse Source

新建video-image模块

zhongwei
段飞宇 1 year ago
parent
commit
b39447c854
  1. 1
      hzims-service-api/pom.xml
  2. 20
      hzims-service-api/video-image-api/pom.xml
  3. 29
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfig.java
  4. 680
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfigExample.java
  5. 60
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfo.java
  6. 391
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfoExample.java
  7. 105
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePoint.java
  8. 34
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePointRelateInfo.java
  9. 32
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/Constants.java
  10. 43
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/ConvertUtils.java
  11. 12
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImageInfoVo.java
  12. 15
      hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImagePointVo.java
  13. 1
      hzims-service/pom.xml
  14. 64
      hzims-service/video-image/pom.xml
  15. 29
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/VideoImageApplication.java
  16. 259
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoController.java
  17. 122
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoSetController.java
  18. 235
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImageConfigController.java
  19. 178
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImageInfoController.java
  20. 629
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImagePointController.java
  21. 64
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/MonitorPoint.java
  22. 44
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/PointLeafNode.java
  23. 73
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/PointTreeNode.java
  24. 48
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationHikSecret.java
  25. 114
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationHikVideo.java
  26. 57
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationVideoSet.java
  27. 49
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/Video.java
  28. 46
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/CommandEnum.java
  29. 35
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/VideoEnum.java
  30. 51
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/VideoType.java
  31. 106
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/manager/HikVideoManager.java
  32. 114
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/manager/MonitorPointManager.java
  33. 34
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageConfigMapper.java
  34. 298
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageConfigMapper.xml
  35. 63
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageInfoMapper.java
  36. 342
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageInfoMapper.xml
  37. 24
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImagePointMapper.java
  38. 68
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImagePointMapper.xml
  39. 24
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/MonitorPointMapper.java
  40. 76
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/MonitorPointMapper.xml
  41. 36
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikSecretMapper.java
  42. 196
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikSecretMapper.xml
  43. 26
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikVideoMapper.java
  44. 135
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikVideoMapper.xml
  45. 39
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationVideoSetMapper.java
  46. 223
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationVideoSetMapper.xml
  47. 463
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationHikSecretExample.java
  48. 974
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationHikVideoExample.java
  49. 41
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationVideoSetEx.java
  50. 513
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationVideoSetExample.java
  51. 62
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/VideoSearchCondition.java
  52. 37
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IHikVideoService.java
  53. 32
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IHikVideoSetService.java
  54. 31
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IMonitorPointService.java
  55. 24
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImageConfigService.java
  56. 32
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImageInfoService.java
  57. 33
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImagePointService.java
  58. 22
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/VideoBaseService.java
  59. 239
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/HikVideoServiceImpl.java
  60. 128
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/HikVideoSetServiceImpl.java
  61. 119
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImageConfigServiceImpl.java
  62. 280
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImageInfoServiceImpl.java
  63. 169
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImagePointServiceImpl.java
  64. 219
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/MonitorPointServiceImpl.java
  65. 95
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/ArtemisPostUtils.java
  66. 12
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Childable.java
  67. 8
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Constants.java
  68. 5
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Markable.java
  69. 66
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/PointTreeCache.java
  70. 39
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/SessionUtil.java
  71. 51
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Stack.java
  72. 85
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Tree.java
  73. 43
      hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/TreeNode.java
  74. 30
      hzims-service/video-image/src/main/resources/application-dev.yml
  75. 28
      hzims-service/video-image/src/main/resources/application-prod.yml
  76. 13
      hzims-service/video-image/src/main/resources/application.yml

1
hzims-service-api/pom.xml

@ -30,6 +30,7 @@
<module>base-info-api</module>
<module>digital-twin-display-api</module>
<module>dam-safety-api</module>
<module>video-image-api</module>
</modules>
<dependencies>

20
hzims-service-api/video-image-api/pom.xml

@ -0,0 +1,20 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-service-api</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>video-image-api</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

29
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfig.java

@ -0,0 +1,29 @@
package com.hnac.hzims.videoimage.entity;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@Data
public class ImageConfig {
private Long id;
private String stcd;
private String name;
@ApiParam(value="配置参数中的type有两种:0 代表常量数据, 1代表热点数据")
private String type;
private String realid;//旧版本的实时数据id
private String deviceCode;//分析模型code 获取实时数据
private Integer dataSource;
private String code;//属性编码
private String value;
private String unit;
}

680
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfigExample.java

@ -0,0 +1,680 @@
package com.hnac.hzims.videoimage.entity;
import java.util.ArrayList;
import java.util.List;
public class ImageConfigExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ImageConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("ID is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("ID is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andStcdIsNull() {
addCriterion("STCD is null");
return (Criteria) this;
}
public Criteria andStcdIsNotNull() {
addCriterion("STCD is not null");
return (Criteria) this;
}
public Criteria andStcdEqualTo(String value) {
addCriterion("STCD =", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotEqualTo(String value) {
addCriterion("STCD <>", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdGreaterThan(String value) {
addCriterion("STCD >", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdGreaterThanOrEqualTo(String value) {
addCriterion("STCD >=", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLessThan(String value) {
addCriterion("STCD <", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLessThanOrEqualTo(String value) {
addCriterion("STCD <=", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLike(String value) {
addCriterion("STCD like", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotLike(String value) {
addCriterion("STCD not like", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdIn(List<String> values) {
addCriterion("STCD in", values, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotIn(List<String> values) {
addCriterion("STCD not in", values, "stcd");
return (Criteria) this;
}
public Criteria andStcdBetween(String value1, String value2) {
addCriterion("STCD between", value1, value2, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotBetween(String value1, String value2) {
addCriterion("STCD not between", value1, value2, "stcd");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("NAME is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("NAME is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("NAME =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("NAME <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("NAME >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("NAME >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("NAME <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("NAME <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("NAME like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("NAME not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("NAME in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("NAME not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("NAME between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("NAME not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("TYPE is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("TYPE is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(String value) {
addCriterion("TYPE =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(String value) {
addCriterion("TYPE <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(String value) {
addCriterion("TYPE >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(String value) {
addCriterion("TYPE >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(String value) {
addCriterion("TYPE <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(String value) {
addCriterion("TYPE <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLike(String value) {
addCriterion("TYPE like", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotLike(String value) {
addCriterion("TYPE not like", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<String> values) {
addCriterion("TYPE in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<String> values) {
addCriterion("TYPE not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(String value1, String value2) {
addCriterion("TYPE between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(String value1, String value2) {
addCriterion("TYPE not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andRealidIsNull() {
addCriterion("REALID is null");
return (Criteria) this;
}
public Criteria andRealidIsNotNull() {
addCriterion("REALID is not null");
return (Criteria) this;
}
public Criteria andRealidEqualTo(String value) {
addCriterion("REALID =", value, "realid");
return (Criteria) this;
}
public Criteria andRealidNotEqualTo(String value) {
addCriterion("REALID <>", value, "realid");
return (Criteria) this;
}
public Criteria andRealidGreaterThan(String value) {
addCriterion("REALID >", value, "realid");
return (Criteria) this;
}
public Criteria andRealidGreaterThanOrEqualTo(String value) {
addCriterion("REALID >=", value, "realid");
return (Criteria) this;
}
public Criteria andRealidLessThan(String value) {
addCriterion("REALID <", value, "realid");
return (Criteria) this;
}
public Criteria andRealidLessThanOrEqualTo(String value) {
addCriterion("REALID <=", value, "realid");
return (Criteria) this;
}
public Criteria andRealidLike(String value) {
addCriterion("REALID like", value, "realid");
return (Criteria) this;
}
public Criteria andRealidNotLike(String value) {
addCriterion("REALID not like", value, "realid");
return (Criteria) this;
}
public Criteria andRealidIn(List<String> values) {
addCriterion("REALID in", values, "realid");
return (Criteria) this;
}
public Criteria andRealidNotIn(List<String> values) {
addCriterion("REALID not in", values, "realid");
return (Criteria) this;
}
public Criteria andRealidBetween(String value1, String value2) {
addCriterion("REALID between", value1, value2, "realid");
return (Criteria) this;
}
public Criteria andRealidNotBetween(String value1, String value2) {
addCriterion("REALID not between", value1, value2, "realid");
return (Criteria) this;
}
public Criteria andValueIsNull() {
addCriterion("VALUE is null");
return (Criteria) this;
}
public Criteria andValueIsNotNull() {
addCriterion("VALUE is not null");
return (Criteria) this;
}
public Criteria andValueEqualTo(String value) {
addCriterion("VALUE =", value, "value");
return (Criteria) this;
}
public Criteria andValueNotEqualTo(String value) {
addCriterion("VALUE <>", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThan(String value) {
addCriterion("VALUE >", value, "value");
return (Criteria) this;
}
public Criteria andValueGreaterThanOrEqualTo(String value) {
addCriterion("VALUE >=", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThan(String value) {
addCriterion("VALUE <", value, "value");
return (Criteria) this;
}
public Criteria andValueLessThanOrEqualTo(String value) {
addCriterion("VALUE <=", value, "value");
return (Criteria) this;
}
public Criteria andValueLike(String value) {
addCriterion("VALUE like", value, "value");
return (Criteria) this;
}
public Criteria andValueNotLike(String value) {
addCriterion("VALUE not like", value, "value");
return (Criteria) this;
}
public Criteria andValueIn(List<String> values) {
addCriterion("VALUE in", values, "value");
return (Criteria) this;
}
public Criteria andValueNotIn(List<String> values) {
addCriterion("VALUE not in", values, "value");
return (Criteria) this;
}
public Criteria andValueBetween(String value1, String value2) {
addCriterion("VALUE between", value1, value2, "value");
return (Criteria) this;
}
public Criteria andValueNotBetween(String value1, String value2) {
addCriterion("VALUE not between", value1, value2, "value");
return (Criteria) this;
}
public Criteria andUnitIsNull() {
addCriterion("UNIT is null");
return (Criteria) this;
}
public Criteria andUnitIsNotNull() {
addCriterion("UNIT is not null");
return (Criteria) this;
}
public Criteria andUnitEqualTo(String value) {
addCriterion("UNIT =", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotEqualTo(String value) {
addCriterion("UNIT <>", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThan(String value) {
addCriterion("UNIT >", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThanOrEqualTo(String value) {
addCriterion("UNIT >=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThan(String value) {
addCriterion("UNIT <", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThanOrEqualTo(String value) {
addCriterion("UNIT <=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLike(String value) {
addCriterion("UNIT like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotLike(String value) {
addCriterion("UNIT not like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitIn(List<String> values) {
addCriterion("UNIT in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitNotIn(List<String> values) {
addCriterion("UNIT not in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitBetween(String value1, String value2) {
addCriterion("UNIT between", value1, value2, "unit");
return (Criteria) this;
}
public Criteria andUnitNotBetween(String value1, String value2) {
addCriterion("UNIT not between", value1, value2, "unit");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

60
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfo.java

@ -0,0 +1,60 @@
package com.hnac.hzims.videoimage.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
public class ImageInfo {
private Long id;
private String stcd;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date time;
private String data;
private String manualpath;
public String getManualpath() {
return manualpath;
}
public void setManualpath(String manualpath) {
this.manualpath = manualpath;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStcd() {
return stcd;
}
public void setStcd(String stcd) {
this.stcd = stcd == null ? null : stcd.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}

391
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfoExample.java

@ -0,0 +1,391 @@
package com.hnac.hzims.videoimage.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ImageInfoExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ImageInfoExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("ID is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("ID is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("ID =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("ID <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("ID >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("ID >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("ID <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("ID <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("ID in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("ID not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("ID between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("ID not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andStcdIsNull() {
addCriterion("STCD is null");
return (Criteria) this;
}
public Criteria andStcdIsNotNull() {
addCriterion("STCD is not null");
return (Criteria) this;
}
public Criteria andStcdEqualTo(String value) {
addCriterion("STCD =", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotEqualTo(String value) {
addCriterion("STCD <>", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdGreaterThan(String value) {
addCriterion("STCD >", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdGreaterThanOrEqualTo(String value) {
addCriterion("STCD >=", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLessThan(String value) {
addCriterion("STCD <", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLessThanOrEqualTo(String value) {
addCriterion("STCD <=", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdLike(String value) {
addCriterion("STCD like", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotLike(String value) {
addCriterion("STCD not like", value, "stcd");
return (Criteria) this;
}
public Criteria andStcdIn(List<String> values) {
addCriterion("STCD in", values, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotIn(List<String> values) {
addCriterion("STCD not in", values, "stcd");
return (Criteria) this;
}
public Criteria andStcdBetween(String value1, String value2) {
addCriterion("STCD between", value1, value2, "stcd");
return (Criteria) this;
}
public Criteria andStcdNotBetween(String value1, String value2) {
addCriterion("STCD not between", value1, value2, "stcd");
return (Criteria) this;
}
public Criteria andTimeIsNull() {
addCriterion("TIME is null");
return (Criteria) this;
}
public Criteria andTimeIsNotNull() {
addCriterion("TIME is not null");
return (Criteria) this;
}
public Criteria andTimeEqualTo(Date value) {
addCriterion("TIME =", value, "time");
return (Criteria) this;
}
public Criteria andTimeNotEqualTo(Date value) {
addCriterion("TIME <>", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThan(Date value) {
addCriterion("TIME >", value, "time");
return (Criteria) this;
}
public Criteria andTimeGreaterThanOrEqualTo(Date value) {
addCriterion("TIME >=", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThan(Date value) {
addCriterion("TIME <", value, "time");
return (Criteria) this;
}
public Criteria andTimeLessThanOrEqualTo(Date value) {
addCriterion("TIME <=", value, "time");
return (Criteria) this;
}
public Criteria andTimeIn(List<Date> values) {
addCriterion("TIME in", values, "time");
return (Criteria) this;
}
public Criteria andTimeNotIn(List<Date> values) {
addCriterion("TIME not in", values, "time");
return (Criteria) this;
}
public Criteria andTimeBetween(Date value1, Date value2) {
addCriterion("TIME between", value1, value2, "time");
return (Criteria) this;
}
public Criteria andTimeNotBetween(Date value1, Date value2) {
addCriterion("TIME not between", value1, value2, "time");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

105
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePoint.java

@ -0,0 +1,105 @@
package com.hnac.hzims.videoimage.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.core.mp.base.BaseEntity;
import java.math.BigDecimal;
@TableName("image_point")
public class ImagePoint extends BaseEntity {
private String stcd;
private Integer pno;
private String stnm;
private Double lgtd;
private Double ltid;
private String address;
private String remark;
private String defaultimagepath;
private Integer open;
public String getStcd() {
return stcd;
}
public void setStcd(String stcd) {
this.stcd = stcd == null ? null : stcd.trim();
}
public Integer getOpen() {
return open;
}
public void setOpen(Integer open) {
this.open = open;
}
public Integer getPno() {
return pno;
}
public void setPno(Integer pno) {
this.pno = pno;
}
public String getStnm() {
return stnm;
}
public void setStnm(String stnm) {
this.stnm = stnm == null ? null : stnm.trim();
}
public Double getLgtd() {
return lgtd;
}
public void setLgtd(Double lgtd) {
if(lgtd!=null){
lgtd = new BigDecimal(lgtd).setScale(6,BigDecimal.ROUND_CEILING).doubleValue();
}
this.lgtd = lgtd;
}
public Double getLtid() {
return ltid;
}
public void setLtid(Double ltid) {
if(ltid!=null){
ltid = new BigDecimal(ltid).setScale(6,BigDecimal.ROUND_CEILING).doubleValue();
}
this.ltid = ltid;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public String getDefaultimagepath() {
return defaultimagepath;
}
public void setDefaultimagepath(String defaultimagepath) {
this.defaultimagepath = defaultimagepath == null ? null : defaultimagepath.trim();
}
}

34
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePointRelateInfo.java

@ -0,0 +1,34 @@
package com.hnac.hzims.videoimage.entity;
import java.util.List;
public class ImagePointRelateInfo extends ImagePoint{
//属性配置
private List<ImageConfig> imageConfigs;
//最新快照图片,只有一张
private ImageInfo newestImageInfo;
public List<ImageConfig> getImageConfigs() {
return imageConfigs;
}
public void setImageConfigs(List<ImageConfig> imageConfigs) {
this.imageConfigs = imageConfigs;
}
public ImageInfo getNewestImageInfo() {
return newestImageInfo;
}
public void setNewestImageInfo(ImageInfo newestImageInfo) {
this.newestImageInfo = newestImageInfo;
}
}

32
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/Constants.java

@ -0,0 +1,32 @@
package com.hnac.hzims.videoimage.util;
public class Constants {
//传入空对象
public static final int ERROR_CODE_EMPTY_OBJ = -1000;
//定义测站设备编码重复
public static final int ERROR_CODE_DUPLICATE_STCB = -100;
//定义测站设备名称重复
public static final int ERROR_CODE_DUPLICATE_STNM = -101;
//定义逻辑删除
public static final Boolean DELETED = true;
//定义逻辑删除
public static final Boolean NOT_DELETED = false;
//定义没有找到删除的记录
public static final int ERROR_CODE_DELETE_ITEM_NOT_FOUND = -102;
//定义给同一个设备配置属性名称重复
public static final int ERROR_CODE_DUPLICATE_DEVICE_ATTRIBUTE = -103;
//定义配置属性数据无效
public static final int ERROR_CODE_LACK_NECESSARY_DATA = -104;
//定义测站属性数据类型
public static final String CONSTANT_TYPE = "0";
public static final String REAL_DATA_TYPE = "1";
//定义更新测站设备不存在
public static final int ERROR_CODE_UPDATE_DEVICE_NOT_EXIST = -105;
//未传递时间参数
public static final int ERROR_CODE_NO_TIME = -106;
//已经存在同一个时刻的手动上传图片
public static final int ERROR_CODE_DUPLICATE_MANUAL_TIME = -107;
}

43
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/ConvertUtils.java

@ -0,0 +1,43 @@
package com.hnac.hzims.videoimage.util;
public class ConvertUtils {
public static String errorCodeToMsg(int errorCode) {
String msg = "";
switch (errorCode) {
case Constants.ERROR_CODE_EMPTY_OBJ:
msg = "空对象操作";
break;
case Constants.ERROR_CODE_DUPLICATE_STCB:
msg = "设备编号重复";
break;
case Constants.ERROR_CODE_DUPLICATE_STNM:
msg = "设备名称重复";
break;
case Constants.ERROR_CODE_DELETE_ITEM_NOT_FOUND:
msg = "删除记录没有找到";
break;
case Constants.ERROR_CODE_DUPLICATE_DEVICE_ATTRIBUTE:
msg = "配置属性名称重复";
break;
case Constants.ERROR_CODE_LACK_NECESSARY_DATA:
msg = "缺少必要数据";
break;
case Constants.ERROR_CODE_UPDATE_DEVICE_NOT_EXIST:
msg = "更新测站设备不存在";
break;
case Constants.ERROR_CODE_NO_TIME:
msg = "请传入时间参数";
break;
case Constants.ERROR_CODE_DUPLICATE_MANUAL_TIME:
msg = "已经存在当前时刻的手动上传图片";
break;
default:
msg = "未知错误";
break;
}
return msg;
}
}

12
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImageInfoVo.java

@ -0,0 +1,12 @@
package com.hnac.hzims.videoimage.vo;
import lombok.Data;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageInfo;
import java.util.List;
@Data
public class ImageInfoVo extends ImageInfo {
List<ImageConfig> list;
}

15
hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImagePointVo.java

@ -0,0 +1,15 @@
package com.hnac.hzims.videoimage.vo;
import com.hnac.hzims.videoimage.entity.ImagePoint;
public class ImagePointVo extends ImagePoint {
private String deptName;
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}

1
hzims-service/pom.xml

@ -30,6 +30,7 @@
<module>base-info</module>
<module>digital-twin-display</module>
<module>dam-safety</module>
<module>video-image</module>
</modules>
<dependencies>

64
hzims-service/video-image/pom.xml

@ -0,0 +1,64 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-service</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>video-image</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-swagger</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-all</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-auto</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>video-image-api</artifactId>
<version>${hzims.project.version}</version>
</dependency>
<dependency>
<groupId>com.hikvision.ga</groupId>
<artifactId>artemis-http-client</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>com.hnac.hzinfo.data</groupId>
<artifactId>hzinfo-data-sdk</artifactId>
</dependency>
</dependencies>
</project>

29
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/VideoImageApplication.java

@ -0,0 +1,29 @@
package com.hnac.hzims.videoimage;
import org.mybatis.spring.annotation.MapperScan;
import org.springblade.core.cloud.feign.EnableBladeFeign;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableBladeFeign(basePackages = {"org.springblade","com.hnac"})
@SpringCloudApplication
@MapperScan("com.hnac.hzims.**.mapper.**")
@EnableScheduling
@ComponentScan(basePackages = {"com.hnac.hzims.*"})
public class VideoImageApplication extends SpringBootServletInitializer {
public final static String APP_NAME = "video-image";
public static void main(String[] args) {
// System.setProperty("nacos.standalone", "true");
BladeApplication.run(APP_NAME, VideoImageApplication.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return BladeApplication.createSpringApplicationBuilder(builder, APP_NAME, VideoImageApplication.class);
}
}

259
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoController.java

@ -0,0 +1,259 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationHikVideo;
import com.hnac.hzims.videoimage.entity.Video;
import com.hnac.hzims.videoimage.enums.CommandEnum;
import com.hnac.hzims.videoimage.manager.HikVideoManager;
import com.hnac.hzims.videoimage.service.IHikVideoService;
import com.hnac.hzims.videoimage.utils.SessionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
@RestController
@Api(value = "视频-海康视频接口", tags = "视频-海康视频接口")
@RequestMapping({"/videoImage/hikVideo"})
public class HikVideoController {
@Autowired
IHikVideoService hikVideoService;
@Autowired
HikVideoManager hikVideoManager;
public HikVideoController() {
}
@ApiOperation("删除站点下ID匹配的海康视频数据")
@RequestMapping(
value = {"/remove"},
method = {RequestMethod.DELETE}
)
public R deleteById( Long id) {
return R.data(this.hikVideoManager.deleteById(SessionUtil.getExistDeptId(), id));
}
@RequestMapping(value = "save",method = {RequestMethod.POST})
@ApiOperation("在当前站点下新增一条海康数据")
public R insert(@RequestBody SysStationHikVideo sysStationHikVideo) {
sysStationHikVideo.setIsDeleted(0);
this.hikVideoManager.insert(SessionUtil.getExistDeptId(), sysStationHikVideo);
return R.data(sysStationHikVideo);
}
@RequestMapping(value = "update",method = {RequestMethod.POST})
@ApiOperation("在当前站点下更新一条海康数据")
public R update(@RequestBody SysStationHikVideo sysStationHikVideo) {
this.hikVideoManager.update(SessionUtil.getExistDeptId(), sysStationHikVideo);
return R.data(sysStationHikVideo);
}
@RequestMapping(value = {"/{pointId}/list/page"}, method = {RequestMethod.GET})
@ApiOperation("获取当前站点下, 指定监测点及其子节点下的所有海康视频列表")
public R searchList(@ApiParam(value = "监测点ID",required = false) @PathVariable long pointId,
@ApiParam("是否启用") @RequestParam(required = false) Integer inUse,
@ApiParam("搜索文本") @RequestParam(required = false) String content, @ModelAttribute Query query) {
IPage<Video> pageList = this.hikVideoManager.searchList(SessionUtil.getExistDeptId(), pointId, inUse, content, Condition.getPage(query));
return R.data(pageList);
}
@RequestMapping(
value = {"/pageList"},
method = {RequestMethod.GET}
)
@ApiOperation("获取当前站点下所有视频列表")
public R getPageList(@ApiParam("名称") @RequestParam(value = "name",required = false) String name,
@ModelAttribute Query query,HttpServletRequest request) {
String deptId =request.getHeader("dept-id") ;
if(deptId == null || "".equals(deptId)){
deptId =AuthUtil.getDeptId();
}
IPage<SysStationHikVideo> res = this.hikVideoService.getPageList(deptId, name, Condition.getPage(query));
return R.data(res);
}
@ApiOperation("获取ID匹配的唯一的海康记录,默认获取子码流")
@RequestMapping(
value = {"/app/{id}"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getById(@PathVariable Long id,@ApiParam(value = "码流 0主码流 1子码流",required = false) int streamType) {
return R.data(this.hikVideoManager.getById(AuthUtil.getTenantId(), id, streamType));
}
@ApiOperation("获取所有码流")
@RequestMapping(
value = {"/getAllStream/{id}"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getMainStream(@PathVariable String id,
@ApiParam(value = "码流 0主码流 1子码流",required = false) String streamType) {
return R.data(this.hikVideoManager.getByIdEx(AuthUtil.getTenantId(), id, streamType));
}
@ApiOperation("获取所有的视频的列表")
@RequestMapping(
value = {"/getAllList"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getAllList(@ApiParam(value = "机构ID") @RequestParam(value = "deptId",required = false) String deptId, HttpServletRequest request) {
deptId=getDeptId(deptId,request);
return R.data(this.hikVideoManager.getAllList(deptId));
}
String getDeptId(String deptId,HttpServletRequest request){
if (deptId == null || "".equals(deptId)) {
deptId = request.getHeader("dept-id");
if(deptId==null || "".equals(deptId)) {
deptId = SessionUtil.getExistDeptId();
}
}
return deptId;
}
@ApiOperation("获取所有的hls和rtmp视频的列表")
@RequestMapping(
value = {"/app/getAllList"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getAllHlsList(@ApiParam(value = "机构ID",required = false)
@RequestParam(value = "deptId",required = false) String deptId,HttpServletRequest request) {
deptId=getDeptId(deptId,request);
return R.data(this.hikVideoManager.getAllHlsList(deptId));
}
@ApiOperation("判断是否是hls流播放")
@RequestMapping(
value = {"/app/isHls"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R isHls(@ApiParam(value = "机构ID",required = false) @RequestParam(value = "deptId",required = false) String deptId) {
if (deptId == null || "".equals(deptId)) {
deptId = SessionUtil.getExistDeptId();
}
return R.data(this.hikVideoManager.isHls(deptId));
}
@ApiOperation("更新最后播放时间")
@RequestMapping(
value = {"/app/upDataLastTime"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R upDataLastTime(@ApiParam(value = "监测点ID",required = true) long id) {
return R.data(this.hikVideoManager.upDataLastTime(id));
}
@ApiOperation("云台控制接口")
@RequestMapping(
value = {"/controlCamera"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R controlCamera(@ApiParam(value = "监测点ID",required = true) String cameraIndexCode,
@ApiParam(value = "开始或停止操作 0-开始 1-停止",required = true) int action,
@ApiParam(value = "控制命令",required = true) String command,
@ApiParam(value = "控制时间",required = false) Integer time) {
if (time == null || time == 0) {
time = 1;
}
Integer finalTime = time;
return R.data(this.hikVideoManager.controlCamera(cameraIndexCode, action, command, finalTime));
}
@ApiOperation("获取所有控制指令接口")
@RequestMapping(
value = {"/getAllCommand"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getAllCommand() {
Map<String, String> resp = new HashMap();
resp.put(CommandEnum.LEFT.getDesc(), CommandEnum.LEFT.getCode());
resp.put(CommandEnum.RIGHT.getDesc(), CommandEnum.RIGHT.getCode());
resp.put(CommandEnum.UP.getDesc(), CommandEnum.UP.getCode());
resp.put(CommandEnum.DOWN.getDesc(), CommandEnum.DOWN.getCode());
resp.put(CommandEnum.ZOOM_IN.getDesc(), CommandEnum.ZOOM_IN.getCode());
resp.put(CommandEnum.ZOOM_OUT.getDesc(), CommandEnum.ZOOM_OUT.getCode());
resp.put(CommandEnum.LEFT_UP.getDesc(), CommandEnum.LEFT_UP.getCode());
resp.put(CommandEnum.LEFT_DOWN.getDesc(), CommandEnum.LEFT_DOWN.getCode());
resp.put(CommandEnum.RIGHT_UP.getDesc(), CommandEnum.RIGHT_UP.getCode());
resp.put(CommandEnum.RIGHT_DOWN.getDesc(), CommandEnum.RIGHT_DOWN.getCode());
resp.put(CommandEnum.FOCUS_FAR.getDesc(), CommandEnum.FOCUS_FAR.getCode());
resp.put(CommandEnum.IRIS_ENLARGE.getDesc(), CommandEnum.IRIS_ENLARGE.getCode());
resp.put(CommandEnum.IRIS_REDUCE.getDesc(), CommandEnum.IRIS_REDUCE.getCode());
return R.data(resp);
}
// @ApiOperation("获取站点窗口视频历史配置")
// @RequestMapping(
// value = {"/getHistoryConfiguration"},
// method = {RequestMethod.GET, RequestMethod.POST}
// )
// public R getHistoryConfiguration(@ApiParam(value = "机构ID",required = false) @RequestParam(value = "deptId",required = false) String deptId) {
//
// String userAccount= AuthUtil.getUserAccount();
// deptId = deptId != null && !deptId.isEmpty() ? deptId : SessionUtil.getExistDeptId();
//
// return R.data(this.hikVideoManager.getHistoryConfiguration(deptId, userAccount));
//
// }
// @ApiOperation("保存站点窗口视频历史配置")
// @RequestMapping(
// value = {"/setHistoryConfiguration"},
// method = {RequestMethod.GET, RequestMethod.POST}
// )
// public R setHistoryConfiguration(String configuration,
// @ApiParam(value = "机构ID",required = false) @RequestParam(value = "deptId",required = false) String deptId) {
//
// String userAccount=AuthUtil.getUserAccount();
// String finalStationId = deptId != null && !deptId.isEmpty() ? deptId : SessionUtil.getExistDeptId();
//
// this.hikVideoManager.setHistoryConfiguration(finalStationId, userAccount, configuration);
// return R.data(true);
//
// }
private IllegalArgumentException exception(Long id) {
return new IllegalArgumentException(this.formatErroMessage(id));
}
private String formatErroMessage(Long id) {
return String.format("ID为%d的海康视频记录不存在", id);
}
}

122
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoSetController.java

@ -0,0 +1,122 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.controller;
import com.hnac.hzims.videoimage.entity.SysStationVideoSet;
import com.hnac.hzims.videoimage.service.IHikVideoSetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@RestController
@Api(value = "视频-视频配置接口", tags = "视频-视频配置接口")
@RequestMapping({"/videoImage/hikVideoSet"})
public class HikVideoSetController {
@Autowired
IHikVideoSetService hikVideoSetService;
public HikVideoSetController() {
}
@RequestMapping(
method = {RequestMethod.POST}
)
@ApiOperation("新增站点视频配置")
public R insert(@RequestBody SysStationVideoSet sysStationVideoSet) {
return R.data(this.hikVideoSetService.insert(sysStationVideoSet));
}
@RequestMapping(
method = {RequestMethod.PUT}
)
@ApiOperation("修改站点视频配置信息")
public R update(@RequestBody SysStationVideoSet sysStationVideoSet) {
return R.data(this.hikVideoSetService.update(sysStationVideoSet));
}
@ApiOperation("删除ID匹配的站点视频配置")
@RequestMapping(
value = {"/{id}"},
method = {RequestMethod.DELETE}
)
public R deleteById(@PathVariable Integer id) {
return R.data(this.hikVideoSetService.deleteById(id));
}
@RequestMapping(
value = {"/list/page"},
method = {RequestMethod.GET}
)
@ApiOperation("获取所有站点视频配置,传站点ID获取指定站点的配置,不传默认获取所有站点")
public R getPageList(@ApiParam("租户ID") @RequestParam(value = "tenantId",required = false) String tenantId,
@ModelAttribute Query query) {
if(StringUtils.isBlank(tenantId)) {
tenantId = AuthUtil.getTenantId();
}
Map res = this.hikVideoSetService.getPageList(tenantId, Condition.getPage(query));
return R.data(res);
}
@ApiOperation("根据ID获取站点视频配置")
@RequestMapping(
value = {"/get/{id}"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getById(@PathVariable Integer id) {
return R.data(this.hikVideoSetService.getById(id));
}
@ApiOperation("根据站点ID获取视频配置")
@RequestMapping(
value = {"/getByTenantId"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getByTenantId(@ApiParam("租户ID") @RequestParam(value = "tenantId",required = false) String tenantId) {
if(StringUtils.isBlank(tenantId)) {
tenantId = AuthUtil.getTenantId();
}
String res= this.hikVideoSetService.getByTenantId(tenantId);
return R.data(res);
}
@ApiOperation("获取所有的ISC平台配置")
@RequestMapping(
value = {"/getAllIscConfig"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getAllIscConfig() {
String tenantId = AuthUtil.getTenantId();
return R.data(this.hikVideoSetService.getAllIscConfig(tenantId));
}
@ApiOperation("获取字典表配置")
@RequestMapping(
value = {"/getDictConfig"},
method = {RequestMethod.GET, RequestMethod.POST}
)
public R getDictConfig() {
return R.data(this.hikVideoSetService.getDictConfig());
}
}

235
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImageConfigController.java

@ -0,0 +1,235 @@
package com.hnac.hzims.videoimage.controller;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import com.hnac.hzims.videoimage.service.ImageConfigService;
import com.hnac.hzims.videoimage.util.ConvertUtils;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeInstanceFieldVO;
import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import com.hnac.hzinfo.sdk.analyse.AnalyseDataSearchClient;
import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.real.RealDataSearchClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.*;
@RestController
@RequestMapping("/videoImage/imageConfig")
@Api(value = "图片墙配置接口", tags = "图片墙配置接口")
public class ImageConfigController {
private static Logger logger = LoggerFactory.getLogger(ImageConfigController.class);
@Autowired
ImageConfigService imageConfigService;
@Autowired
RealDataSearchClient realDataSearchClient;
@Autowired
AnalyseDataSearchClient analyseDataSearchClient;
private Map<String,String> dealRealDataMap(List<FieldsData> list){
Map<String,String> data=new HashMap<>();
for (FieldsData fieldsData:list){
data.put(fieldsData.getSignage(),fieldsData.getValue());
}
return data;
}
@RequestMapping(value="/getRealFiled", method = {RequestMethod.GET})
@ApiOperation(notes ="根据id获取实时数据", value = "根据id获取实时数据")
public R getRealFiled(String deviceCode){
Result<List<AnalyzeInstanceFieldVO>> list=analyseDataSearchClient.getInstanceFieldByAnalyseCode(deviceCode,1,"");
List<AnalyzeInstanceFieldVO> vos=list.getData();
return R.data(vos);
}
/**
*
* <p>Title: getRealDataById</p>
* <p>Description: 根据站点id和点id获取实时数据</p>
* @param deviceCodes 设备编码集合
* @return 实时数据集合
*/
@RequestMapping(value="/getRealDataById", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据id获取实时数据", value = "根据id获取实时数据")
public R getRealDataById(@RequestParam String[] deviceCodes) {
Map<String, Map<String,String>> dataMap = new HashMap<>();
try {
for(int i = 0; i < deviceCodes.length; i++){
String deviceCode=deviceCodes[i];
//获取实时值
RealDataSearchPO po=new RealDataSearchPO();
po.setAnalyzeCode(deviceCode);
Result<List<FieldsData>> res=realDataSearchClient.getRealDataByDeviceCode(po);
dataMap.put(deviceCode, dealRealDataMap(res.getData()));
}
// TODO: 对于dataMap 中的各个realId 对应的实时数据,做拼接处理,增加数据名和单位
//查询出所有的配置记录
Map<String, String> imageConfigContent = new HashMap<String, String>();
ImageConfigExample example = new ImageConfigExample();
List<ImageConfig> imageConfigs = imageConfigService.selectByExample(example);
//通过realId 逐条对比,将对应的value 拼接对应的数据名称 和 单位
Set<String> set = dataMap.keySet();
Iterator<String> iterator = set.iterator();
while (iterator.hasNext()) {
String key = iterator.next();
for(ImageConfig ic: imageConfigs) {
String value = dataMap.get(key).get(ic.getCode());
if (null != key && key.equals(ic.getRealid())) {
String name = ic.getName();
String unit = ic.getUnit();
//重新组装数据,以realId 作为key, 配置项数据 作为value 的map 集合方式返回给前端
String content = name + ": " + Double.valueOf(value) + unit;
imageConfigContent.put(key, content);
}
}
}
return R.data(imageConfigContent);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: addImageConfig</p>
* <p>Description:添加站点属性配置 </p>
* @param imageConfig 属性配置信息
* @return 操作结果
*/
@RequestMapping(value="/addImageConfig", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="添加测站设备配置", value = "添加测站设备配置")
public R addImageConfig(@ModelAttribute ImageConfig imageConfig){
try {
int status = imageConfigService.addImageConfig(imageConfig);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: deleteImageConfig</p>
* <p>Description: 删除站点设备属性配置</p>
* @param id 属性配置id
* @return 操作结果
*/
@RequestMapping(value="/deleteImageConfig", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="删除测站设备配置", value = "删除测站设备配置")
public R deleteImageConfig(@RequestParam Long id){
try {
int status = imageConfigService.deleteImageConfig(id);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: updateImageConfig</p>
* <p>Description: 更新属性配置</p>
* @param imageConfig 属性数据
* @return 操作结果
*/
@RequestMapping(value="/updateImageConfig", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="更新测站设备配置", value = "更新测站设备配置")
public R updateImageConfig(@ModelAttribute ImageConfig imageConfig){
try {
int status = imageConfigService.updateImageConfig(imageConfig);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: queryImageConfig</p>
* <p>Description:查询站点设备属性配置 </p>
* @param id 属性配置id
* @return 属性数据结构信息
*/
@RequestMapping(value="/queryImageConfig", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="查询测站设备配置", value = "查询测站设备配置")
public R queryImageConfig(@RequestParam Long id){
try {
ImageConfig imageConfig = imageConfigService.selectImageConfig(id);
return R.data(imageConfig);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: getConfigsByStcd</p>
* <p>Description: 根据测站编码stcd获取其所有配置属性</p>
* @param stcd 测站设备编码
* @return 配置属性集合
*/
@RequestMapping(value="/getConfigsByStcd", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据测站编码stcd获取其所有配置属性", value = "根据测站编码stcd获取其所有配置属性")
public R getConfigsByStcd(@RequestParam String stcd) {
try {
ImageConfigExample example = new ImageConfigExample();
ImageConfigExample.Criteria criteria = example.createCriteria();
criteria.andStcdEqualTo(stcd);
List<ImageConfig> imageConfigs = imageConfigService.selectByExample(example);
return R.data(imageConfigs);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
}

178
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImageInfoController.java

@ -0,0 +1,178 @@
package com.hnac.hzims.videoimage.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import com.hnac.hzims.videoimage.entity.ImageInfo;
import com.hnac.hzims.videoimage.service.ImageInfoService;
import com.hnac.hzims.videoimage.util.ConvertUtils;
import com.hnac.hzims.videoimage.vo.ImageInfoVo;
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 java.util.List;
/**
*
* 图片数据放在公共库不进行切库处理因此查询操作不需要加@ChangeHZDataSource
*
*/
@RestController
@RequestMapping("/videoImage/imageInfo")
@Api(value = "图片墙图片数据接口", tags = "图片墙图片数据接口")
public class ImageInfoController {
@Autowired
private ImageInfoService imageInfoService;
@RequestMapping(value="/addImage", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="上传图片", value = "上传图片")
public R addImage(@RequestParam("data") MultipartFile file, HttpServletRequest request) throws Exception {
try {
Object path = imageInfoService.addImage(file);
if (path!=null) {
return R.data(path);
} else {
return R.fail(500,"操作失败");
}
}catch (Exception e) {
return R.fail(500,"操作失败");
}
}
@RequestMapping(value="/addImageInfo", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="手动添加图片", value = "手动添加图片")
public R addImageInfo(@ModelAttribute ImageInfo imageInfo){
try {
int status = imageInfoService.addImageInfo(imageInfo);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
}catch (Exception e) {
return R.fail(500,"操作失败");
}
}
@RequestMapping(value="/deleteImageInfo", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="删除手动添加的图片", value = "删除手动添加的图片")
public R deleteImageInfo(@RequestParam long Id){
try {
int status = imageInfoService.deleteImageInfo(Id);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
}catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: selectNewestImageByDevId</p>
* <p>Description: 根据测站编码stcd获取最新图片信息</p>
* @param stcds 测站设备编码
* @return 图片信息集合
*/
@RequestMapping(value="/selectNewestImageByDevId", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据测站编码stcd获取最新图片信息", value = "根据测站编码stcd获取最新图片信息")
public R selectNewestImageByDevId( String[] stcds) {
try {
List<ImageInfo> imageInfos = imageInfoService.selectNewestImageByDevId(stcds);
return R.data(imageInfos);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: selectImagesByDevIdAndTime</p>
* <p>Description:根据测站编码stcd和时间范围获取图片信息 </p>
* @param stcd 测站设备编码
* @param startTime 开始时间
* @param endTime 结束时间
* @return 图片数据集合
*/
@RequestMapping(value="/selectImagesByDevIdAndTime", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据测站编码stcd和时间范围获取图片信息", value = "根据测站编码stcd和时间范围获取图片信息")
public R selectImagesByDevIdAndTime(@RequestParam String stcd,
@ApiParam(value="查询开始时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="startTime") String startTime,
@ApiParam(value="查询结束时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="endTime") String endTime) {
try {
List<ImageInfo> imageInfos = imageInfoService.selectImagesByDevIdAndTime(stcd,
startTime, endTime);
return R.data(imageInfos);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
@RequestMapping(value="/pageQueryImagesByDevIdAndTime", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据测站编码stcd和时间范围分页获取图片信息", value = "根据测站编码stcd和时间范围分页获取图片信息")
public R pageQueryImagesByDevIdAndTime(String stcd,
@ApiParam(value="查询开始时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="startTime") String startTime,
@ApiParam(value="查询结束时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="endTime") String endTime,
Query query) {
try {
IPage<ImageInfoVo> imageInfos = imageInfoService.pageQueryImagesByDevIdAndTime(stcd,
startTime, endTime, Condition.getPage(query));
return R.data(imageInfos);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
@RequestMapping(value="/pageQueryManualImagesByDevIdAndTime", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据测站编码stcd和时间范围分页获取手动上传图片信息", value = "根据测站编码stcd和时间范围分页获取手动上传图片信息")
public R pageQueryManualImagesByDevIdAndTime(String stcd,
@ApiParam(value="查询开始时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="startTime") String startTime,
@ApiParam(value="查询结束时间字符串,格式为yyyy-MM-dd HH:mm:ss") @RequestParam(required=true, value="endTime") String endTime,
Query query) {
try {
IPage<ImageInfoVo> imageInfos = imageInfoService.pageQueryManualImagesByDevIdAndTime(stcd,
startTime, endTime, Condition.getPage(query));
return R.data(imageInfos);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
}

629
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/ImagePointController.java

@ -0,0 +1,629 @@
package com.hnac.hzims.videoimage.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO;
import com.hnac.hzinfo.sdk.core.response.Result;
import com.hnac.hzinfo.sdk.real.RealDataSearchClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import com.hnac.hzims.videoimage.entity.*;
import com.hnac.hzims.videoimage.service.ImageConfigService;
import com.hnac.hzims.videoimage.service.ImageInfoService;
import com.hnac.hzims.videoimage.service.ImagePointService;
import com.hnac.hzims.videoimage.util.Constants;
import com.hnac.hzims.videoimage.util.ConvertUtils;
import com.hnac.hzims.videoimage.vo.ImagePointVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.*;
@RestController
@RequestMapping("/videoImage/imagePoint")
@Api(value = "图片墙数据点接口", tags = "图片墙数据点接口")
public class ImagePointController {
private static Logger logger = LoggerFactory.getLogger(ImagePointController.class);
@Autowired
ImagePointService imagePointService;
@Autowired
ImageConfigService imageConfigService;
// @Autowired
// private RealDataSearchClient realDataSearchClient;
@Autowired
ImageInfoService imageInfoService;
@Autowired
RealDataSearchClient realDataSearchClient;
// @Autowired
// IHz3000RealDataClient hz3000RealDataClient;
/**
*
* <p>Title: addImagePoint</p>
* <p>Description:添加测站设备信息 </p>
* @param imagePoint 测站设备数据结构
* @return 操作结果
*/
@RequestMapping(value="/addImagePoint", method = {RequestMethod.POST})
@ApiOperation(notes ="添加测站", value = "添加测站")
public R addImagePoint(@RequestBody ImagePoint imagePoint){
try {
Long userId=AuthUtil.getUserId();
imagePoint.setCreateUser(userId);
imagePoint.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
imagePoint.setCreateTime(new Date());
imagePoint.setUpdateTime(new Date());
imagePoint.setUpdateUser(userId);
imagePoint.setIsDeleted(0);
int count = imagePointService.addImagePoint(imagePoint);
if (count == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(count);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: deleteImagePoint</p>
* <p>Description: 删除测站设备信息逻辑删除物理数据库中保留</p>
* @param id 测站设备id
* @return 操作结果
*/
@RequestMapping(value="/deleteImagePoint", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="删除测站", value = "删除测站")
public R deleteImagePoint(@RequestParam Long id){
try {
int status = imagePointService.deleteImagePoint(id);
if (status == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(status);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: updateImagePoint</p>
* <p>Description: 更新测站设备信息</p>
* @param imagePoint 测站数据结果
* @return 操作结果
*/
@RequestMapping(value="/updateImagePoint", method = {RequestMethod.POST})
@ApiOperation(notes ="更新测站", value = "更新测站")
public R updateImagePoint(@RequestBody ImagePoint imagePoint){
try {
imagePoint.setUpdateTime(new Date());
imagePoint.setUpdateUser(AuthUtil.getUserId());
int count = imagePointService.updateImagePoint(imagePoint);
if (count == 1) {
return R.data("操作成功");
} else {
String msg = ConvertUtils.errorCodeToMsg(count);
return R.fail(500,msg);
}
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: queryImagePoint</p>
* <p>Description: 查询测站设备</p>
* @param stcd 测站设备编码
* @return 测站设备信息
*/
@RequestMapping(value="/queryImagePoint", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="查询测站", value = "查询测站")
public R queryImagePoint(@RequestParam String stcd){
try {
ImagePoint imagePoint = imagePointService.selectImagePoint(stcd);
return R.data(imagePoint);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: queryAllImagePoint</p>
* <p>Description:查询所有测站设备信息 </p>
* @return 测站设备信息集合
*/
@RequestMapping(value="/queryAllImagePoint", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="查询所有测站", value = "查询所有测站")
public R queryAllImagePoint(){
try {
List<ImagePoint> imagePoints = imagePointService.selelctAllImagePoint();
return R.data(imagePoints);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: getRealDataByDeviceCods</p>
* <p>Description: 获取点的实时数据信息</p>
* @param deviceCodes 点id
* @return 点id和对应实时数据映射集合
*/
//15133048833073742754: {value: 0, time: "2000-01-01 00:00:00", point: "", q: 1}
//根据realId集合获取实时数据
public Map<String, Map<String,String>> getRealDataByDeviceCods(String[] deviceCodes) {
Map<String, Map<String,String>> dataMap = new HashMap<>();
try{
for(int i = 0; i < deviceCodes.length; i++){
String deviceCode=deviceCodes[i];
//获取实时值
RealDataSearchPO po=new RealDataSearchPO();
po.setAnalyzeCode(deviceCode);
Result<List<FieldsData>> res=realDataSearchClient.getRealDataByDeviceCode(po);
logger.info("=================res"+res);
dataMap.put(deviceCode, dealRealDataMap(res.getData()));
}
} catch (Exception e) {
}
return dataMap;
}
private Map<String,String> dealRealDataMap(List<FieldsData> list){
Map<String,String> data=new HashMap<>();
for (FieldsData fieldsData:list){
data.put(fieldsData.getSignage(),fieldsData.getValue());
}
return data;
}
/**
*
* <p>Title: queryImagePointRelateInfo</p>
* <p>Description: 分页查询当前站中的所有测站设备图文实时数据</p>
* @param deptId 机构id
* @param query 分页参数
* @return
*/
// TODO: 后续stationId 改为从session 中获取
@RequestMapping(value="/queryImagePointRelateInfo", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="分页查询当前站中的所有测站设备图文实时数据", value = "分页查询当前站中的所有测站设备图文实时数据")
public R queryImagePointRelateInfo(@RequestParam(required=false, value = "deptId")String deptId,HttpServletRequest request,
Query query){
ArrayList<ImagePointRelateInfo> imagePointRelateInfoList = new ArrayList<>();
try {
List<String> queryDeptIds = new ArrayList<>();
//http://175.6.40.67:8092/hznet/sys/user/wkStationList?userId=admin
logger.debug("queryImagePointRelateInfo deptId is " + deptId);
// 根据和前端约定,修改参数:
//1、第一次加载前端传当前站点ID
if(!StringUtils.isBlank(deptId)){
queryDeptIds.add(deptId);
} else {
//前端不传deptId的情况,后台自动从session中获取
String sessionDeptId =request.getHeader("dept-id");
if(StringUtils.isBlank(sessionDeptId)) {
sessionDeptId = AuthUtil.getDeptId();
}
logger.debug("queryImagePointRelateInfo sessionDeptId is " + sessionDeptId);
queryDeptIds.add(sessionDeptId);
}
// 查出站集合下面的所有设备集合(站和设备,一对多)
List<String> stcdList = new ArrayList<>();
// 分页查询只要对站下面的设备返回结果分页即可
List<ImagePointVo> imagePoints = null;
IPage<ImagePointVo> imagePointsModel = imagePointService.pageQueryImagePonit(queryDeptIds, null, null, Condition.getPage(query));
//整理出站点下的设备集合
if (null != imagePointsModel) {
imagePoints = imagePointsModel.getRecords();
}
if(imagePoints==null || imagePoints.isEmpty()){
return R.data(null);
}
for(ImagePointVo imagePoint : imagePoints) {
stcdList.add(imagePoint.getStcd());
}
//logger.debug("queryImagePointRelateInfo stcdList=" +stcdList);
// 根据编码stcds 查询出所有符合条件的属性记录集合,对于属性中的热点数据,需要实时获取
ImageConfigExample configExample = new ImageConfigExample();
ImageConfigExample.Criteria configCri = configExample.createCriteria();
// stcdList 不为空才作为条件查询
if (null != stcdList && stcdList.size() > 0){
configCri.andStcdIn(stcdList);
// 根据前面的设备集合,查询所有的属性集合 (设备和属性,一对多)
List<ImageConfig> imageConfigs = imageConfigService.selectByExample(configExample);
// TODO: 根据stcd查询其对应的deptId, 还是的一个站一个站地循环查实时数据
// ArrayList<ImagePoint> pointsForOneStation = new ArrayList<>();
// ArrayList<String> ycIdList = new ArrayList<>();
ArrayList<String> deviceList = new ArrayList<>();
// for(String sid : queryDeptIds){
// for (ImagePoint imagePoint : imagePoints){
// //找到某个站下的所有设备stcd
// if (sid.equals(imagePoint.getCreateDept())){
// pointsForOneStation.add(imagePoint);
// }
// }
// for(ImagePoint imagePoint : pointsForOneStation){
for(ImagePoint imagePoint : imagePoints){
//再根据设备找设备下的所有属性集合config下的实时数据
for(ImageConfig ic: imageConfigs) {
String type = ic.getType();
String stcd = ic.getStcd();
if (Constants.REAL_DATA_TYPE.equals(type) &&
stcd.equals(imagePoint.getStcd())) {
//统一收集realId, 随后一次查询
String deviceCode = ic.getDeviceCode();
logger.debug(" deviceCode is "+ deviceCode );
// String realId = ic.getRealid();
if(deviceCode!=null && !"".equals(deviceCode)) {
deviceList.add(deviceCode);
}
// if(realId!=null && !"".equals(realId)) {
// ycIdList.add(realId);
// }
}
}
}
//使用realId集成,查询所有需要查询设备的各个实时数据集成,填充数据结构中的value
// String[] ycIds = ycIdList.toArray(new String[ycIdList.size()]);
String[] deviceCodes = deviceList.toArray(new String[deviceList.size()]);
logger.debug(" deviceCodes size is "+( deviceCodes==null ? null: deviceCodes.length));
Map<String, Map<String,String>> realDataByCodes = getRealDataByDeviceCods(deviceCodes);
// Map<String, Data> realDataByIds =null;
// if(!ycIdList.isEmpty()) {
// realDataByIds = hz3000RealDataClient.getRealDataById(ycIds, "0");
// }
// logger.debug("realDataByCodes data for sid=" + sid +" realDataByCodes size is "+( realDataByCodes==null ? null: realDataByCodes.size()));
for(ImageConfig ic: imageConfigs) {
String type = ic.getType();
if (Constants.REAL_DATA_TYPE.equals(type)) {
String deviceCode = ic.getDeviceCode();
// String realId = ic.getRealid();
//查到实时数据先存储到对应的数据结构内存,不存数据库
if (deviceCode!=null && null != realDataByCodes &&
null!= realDataByCodes.get(deviceCode)){
String value = realDataByCodes.get(deviceCode).get(ic.getCode());
ic.setValue(value);
}
// if(realId!=null && realDataByIds!=null && null!= realDataByIds.get(deviceCode)){
// double value = realDataByIds.get(realId).getValue();
// BigDecimal dd=new BigDecimal(value);
// ic.setValue(dd.setScale(3,BigDecimal.ROUND_HALF_UP).toString());
// } else {
// logger.error("queryImagePointRelateInfo realData is null ,please check the redis config");
// }
}
}
//下一个站之前先清空数据
// pointsForOneStation.clear();
deviceList.clear();
// ycIdList.clear();
// }
// 根据stcds 查询设备的最新图片信息
String[] stcds =stcdList.toArray(new String[stcdList.size()]);
List<ImageInfo> imageInfos = imageInfoService.selectNewestImageByDevId(stcds);
//根据stcd来组装各条数据
for(ImagePoint imagePoint: imagePoints) {
String stcd = imagePoint.getStcd();
ImagePointRelateInfo imagePointRelateInfo = new ImagePointRelateInfo();
imagePointRelateInfo.setCreateDept(imagePoint.getCreateDept());
imagePointRelateInfo.setStcd(imagePoint.getStcd());
imagePointRelateInfo.setAddress(imagePoint.getAddress());
imagePointRelateInfo.setCreateTime(imagePoint.getCreateTime());
imagePointRelateInfo.setLgtd(imagePoint.getLgtd());
imagePointRelateInfo.setLtid(imagePoint.getLtid());
imagePointRelateInfo.setRemark(imagePoint.getRemark());
imagePointRelateInfo.setStnm(imagePoint.getStnm());
imagePointRelateInfo.setPno(imagePoint.getPno());
imagePointRelateInfo.setDefaultimagepath(imagePoint.getDefaultimagepath());
ArrayList<ImageConfig> imageConfigList = new ArrayList<>();
for(ImageConfig imageConfig: imageConfigs) {
//刷选绑定stcd关联
if (stcd.equals(imageConfig.getStcd())) {
imageConfigList.add(imageConfig);
}
}
// 设置属性配置集合
imagePointRelateInfo.setImageConfigs(imageConfigList);
int index=0;
int imageInfosCount = imageInfos.size();
for(ImageInfo imageInfo: imageInfos) {
//判断年月日时相同
if(!checkSameHour(imageInfo)){
imageInfo.setData(null);
}
// 将最新图片设置到对应的stcd
if (stcd.equals(imageInfo.getStcd())) {
imagePointRelateInfo.setNewestImageInfo(imageInfo);
break;
}
//记录是否能找到最新图片,找不到的话需要查询上传的默认图片路径
index++;
}
logger.debug("imageInfosCount="+imageInfosCount+" index="+index + " stcd="+stcd);
if (imageInfosCount == index){
logger.debug("use default image to show");
//使用上传的默认图片地址构造一个最新图片对象
ImageInfo defaultImage = new ImageInfo();
defaultImage.setData(imagePoint.getDefaultimagepath());
defaultImage.setStcd(imagePoint.getStcd());
imagePointRelateInfo.setNewestImageInfo(defaultImage);
}
//将数据组装好后放入列表集合中
imagePointRelateInfoList.add(imagePointRelateInfo);
}
}
IPage<ImagePointRelateInfo> imagePointRelateInfos = new Page(imagePointsModel.getCurrent(),imagePointsModel.getSize());
imagePointRelateInfos.setRecords(imagePointRelateInfoList);
imagePointRelateInfos.setPages(imagePointsModel.getPages());
imagePointRelateInfos.setTotal(imagePointsModel.getTotal());
return R.data(imagePointRelateInfos);
} catch (Exception e) {
// e.printStackTrace();
return R.fail(500,"操作失败");
}
}
private boolean checkSameHour(ImageInfo imageInfo){
if(imageInfo!=null && imageInfo.getTime()!=null){
Date now=new Date();
Date old=imageInfo.getTime();
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH");
String nowStr=sdf.format(now);
String oldStr=sdf.format(old);
if(nowStr.equals(oldStr)){
return true;
}
}
return false;
}
/**
*
* <p>Title: pageQueryImagePoint</p>
* <p>Description:分页查询所有测站设备信息 </p>
* @param deptId 站点id
* @param stcd 测站设备编码
* @param stnm 测站设备名称
* @param query 分页参数
* @return
*/
@RequestMapping(value="/pageQueryImagePoint", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="分页查询所有测站", value = "分页查询所有测站")
public R pageQueryImagePoint(@ApiParam(value = "deptId,精确匹配") @RequestParam(required=false, value = "deptId")String deptId,
@ApiParam(value = "测站设备编码,精确匹配") @RequestParam(required=false, value = "stcd") String stcd,
@ApiParam(value = "测站设备名称,模糊匹配") @RequestParam(required=false, value = "stnm")String stnm,
Query query,HttpServletRequest request){
try {
List<String> deptIds = new ArrayList<>();
// 根据和前端约定,修改参数:
//1、第一次加载前端传当前站点ID
//2、前端查询站点下拉框中增加全部传为 ALL
if(!StringUtils.isBlank(deptId)){
deptIds.add(deptId);
} else {
//前端不传deptId的情况,后台自动从session中获取
String sessionDeptId =request.getHeader("dept-id");
if(StringUtils.isBlank(sessionDeptId)) {
sessionDeptId = AuthUtil.getDeptId();
}
deptIds.add(sessionDeptId);
}
logger.debug("queryImagePointRelateInfo sessionDeptId is " + deptId);
IPage<ImagePointVo> imagePoints = imagePointService.pageQueryImagePonit(deptIds, stcd, stnm, Condition.getPage(query));
return R.data(imagePoints);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
/**
*
* <p>Title: pageQueryImagePointOrderBy</p>
* <p>Description:分根据排序要求页查询所有测站设备信息 </p>
* @param request
* @param deptId 机构id
* @param stcd 测站设备编码
* @param stnm 测站设备名称
* @param query 分页参数
* @param orderByField 排序参数
* @return
*/
@RequestMapping(value="/pageQueryImagePointOrderBy", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="根据排序要求分页查询所有测站", value = "根据排序要求分页查询所有测站")
public R pageQueryImagePointOrderBy(HttpServletRequest request,
@ApiParam(value = "机构id,精确匹配") @RequestParam(required=false, value = "deptId")String deptId,
@ApiParam(value = "测站设备编码,精确匹配") @RequestParam(required=false, value = "stcd") String stcd,
@ApiParam(value = "测站设备名称,模糊匹配") @RequestParam(required=false, value = "stnm")String stnm,
Query query,
@ApiParam(value = "排序参数,只能传入stationName, stcd, stnm, pno 几个字段与 ASC升序 DESC降序 的排列组合,如果字段中有中文,需要将其转为gbk编码排序" +
"例如按照设备编码升序排序,stcd ASC, 按照设备名称降序排序,CONVERT(stnm USING gbk) DESC")
@RequestParam(required=false, value = "orderByField")String orderByField){
try {
// TODO: deptId 参数要改为列表,如果前端传入为空,则后台默认从session中获取userId,然后调用接口获取账号下的deptIds
List<String> queryDeptIds = new ArrayList<>();
logger.debug("queryImagePointRelateInfo deptId is " + deptId);
// 根据和前端约定,修改参数:
//1、第一次加载前端传当前站点ID
//2、前端查询站点下拉框中增加全部传为 ALL
if(!StringUtils.isBlank(deptId)){
queryDeptIds.add(deptId);
} else {
//前端不传deptId的情况,后台自动从session中获取
String sessionDeptId =request.getHeader("dept-id");
if(StringUtils.isBlank(sessionDeptId)) {
sessionDeptId = AuthUtil.getDeptId();
}
logger.debug("queryImagePointRelateInfo sessionDeptId is " + sessionDeptId);
queryDeptIds.add(sessionDeptId);
}
IPage<ImagePointVo> imagePoints = imagePointService.pageQueryImagePonitOrderBy(queryDeptIds, stcd, stnm, Condition.getPage(query), orderByField);
return R.data(imagePoints);
} catch (Exception e) {
return R.fail(500,"操作失败");
}
}
@RequestMapping(value="/getNewestImageForStation", method = {RequestMethod.POST, RequestMethod.GET})
@ApiOperation(notes ="获取站点下所有设备中最新采集的图片", value = "获取站点下所有设备中最新采集的图片")
public R getNewestImageForStation(HttpServletRequest request,
@ApiParam(value = "机构id,精确匹配") @RequestParam(required=false, value = "deptId")String deptId){
try {
List<String> queryDeptIds = new ArrayList<>();
logger.debug("getNewestImageForStation deptId is " + deptId);
// 根据和前端约定,修改参数:
//1、第一次加载前端传当前站点ID
//2、前端查询站点下拉框中增加全部传为 ALL
if(!StringUtils.isBlank(deptId)){
queryDeptIds.add(deptId);
} else {
//前端不传deptId的情况,后台自动从session中获取
String sessionDeptId =request.getHeader("dept-id");
if(StringUtils.isBlank(sessionDeptId)) {
sessionDeptId = AuthUtil.getDeptId();
}
logger.debug("getNewestImageForStation sessionDeptId is " + sessionDeptId);
queryDeptIds.add(sessionDeptId);
}
LambdaQueryWrapper<ImagePoint> exp=new LambdaQueryWrapper();
exp.in(ImagePoint::getCreateDept,queryDeptIds);
List<ImagePoint> imagePoints = imagePointService.selectByExample(exp);
List<String> stcds = new ArrayList<>();
for(ImagePoint imagePoint: imagePoints){
String stcd = imagePoint.getStcd();
stcds.add(stcd);
}
String[] stcdStrs = stcds.toArray(new String[stcds.size()]);
int len = (null==stcdStrs)?0:stcdStrs.length;
logger.debug("getNewestImageForStation stcdStrs length="+ len);
//如果没有查到任何设备就不要查询,因为查询接口会查所有设备,然后根据stcds过滤,没有则不过滤
ImageInfo newestImageInfoForAllDevice = null;
if (len>0){
List<ImageInfo> imageInfos = imageInfoService.selectNewestImageByDevId(stcdStrs);
if (null!=imageInfos && imageInfos.size()>0){
int index = 0;
for(ImageInfo imageInfo: imageInfos){
//将每次获取的第一个都赋值给最新图片变量,随后遍历比较时间如果有时间新的,则替换最新图片
if (index == 0){
newestImageInfoForAllDevice = imageInfo;
}
Date time = imageInfo.getTime();
Date newestImageTime = newestImageInfoForAllDevice.getTime();
if (time.after(newestImageTime)){
newestImageInfoForAllDevice = imageInfo;
}
index++;
}
}else {
logger.debug("getNewestImageForStation 没有查询到图片");
}
}
return R.data(newestImageInfoForAllDevice);
}catch (Exception e) {
return R.fail(500,"操作失败");
}
}
}

64
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/MonitorPoint.java

@ -0,0 +1,64 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
public class MonitorPoint {
private Long id;
private String name;
private Long parentId;
private String deptId;
private String remark;
public MonitorPoint() {
}
public MonitorPoint(Long id, String name, Long parentId, String remark) {
this.id = id;
this.name = name;
this.parentId = parentId;
this.remark = remark;
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Long getParentId() {
return this.parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
this.deptId = deptId;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}

44
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/PointLeafNode.java

@ -0,0 +1,44 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
import com.hnac.hzims.videoimage.enums.VideoType;
import com.hnac.hzims.videoimage.utils.TreeNode;
public class PointLeafNode extends TreeNode {
private Long pointId;
private VideoType type;
public PointLeafNode() {
}
@Override
public boolean isLeaf() {
return true;
}
public Long getPointId() {
return this.pointId;
}
public void setPointId(Long pointId) {
this.pointId = pointId;
}
public VideoType getType() {
return this.type;
}
public void setType(VideoType type) {
this.type = type;
}
@Override
public String toString() {
return "PointLeafNode [isLeaf()=" + this.isLeaf() + ", getPointId()=" + this.getPointId() + ", getType()=" + this.getType() + ", getId()=" + this.getId() + ", getName()=" + this.getName() + "]";
}
}

73
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/PointTreeNode.java

@ -0,0 +1,73 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
import com.hnac.hzims.videoimage.enums.VideoType;
import com.hnac.hzims.videoimage.utils.Childable;
import com.hnac.hzims.videoimage.utils.Markable;
import com.hnac.hzims.videoimage.utils.TreeNode;
import java.util.*;
public class PointTreeNode extends TreeNode implements Childable<PointTreeNode>, Markable {
private List<PointTreeNode> children;
private List<PointLeafNode> leaves;
public PointTreeNode(List<PointTreeNode> children) {
this.children = children;
}
public PointTreeNode() {
}
public Map<VideoType, List<Long>> map() {
assert Objects.nonNull(this.children);
Map<VideoType, List<Long>> map = new EnumMap(VideoType.class);
Iterator var2 = this.children.iterator();
while(var2.hasNext()) {
PointTreeNode node = (PointTreeNode)var2.next();
if (Objects.nonNull(node.getLeaves()) && !node.getLeaves().isEmpty()) {
node.getLeaves().stream().filter(Objects::nonNull).forEach((leaf) -> {
VideoType type = leaf.getType();
map.putIfAbsent(type, new ArrayList());
((List)map.get(type)).add(leaf.getId());
});
}
}
return map;
}
@Override
public boolean isLeaf() {
return false;
}
@Override
public Long getUniqueMark() {
return super.getId();
}
@Override
public List<PointTreeNode> getChildren() {
return this.children;
}
public void setChildren(List<PointTreeNode> children) {
this.children = children;
}
public List<PointLeafNode> getLeaves() {
return this.leaves;
}
public void setLeaves(List<PointLeafNode> leaves) {
this.leaves = leaves;
}
}

48
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationHikSecret.java

@ -0,0 +1,48 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
public class SysStationHikSecret {
private Integer id;
private String host;
private String appkey;
private String appsecret;
public SysStationHikSecret() {
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public String getAppkey() {
return this.appkey;
}
public void setAppkey(String appkey) {
this.appkey = appkey;
}
public String getAppsecret() {
return this.appsecret;
}
public void setAppsecret(String appsecret) {
this.appsecret = appsecret;
}
}

114
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationHikVideo.java

@ -0,0 +1,114 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnac.hzims.videoimage.enums.VideoType;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
@TableName("sys_station_hikvideo")
public class SysStationHikVideo extends Video {
private String addressType;
private String livesourceaddress;
private String address;
private String pointCode;
@DateTimeFormat(
pattern = "yyyy-MM-dd hh:mm:ss"
)
@JsonFormat(
pattern = "yyyy-MM-dd HH:mm:ss",
timezone = "GMT+8"
)
private Date lastRequesttime;
private Byte isControl;
private Byte isHikvideo;
private BigDecimal nlgtd;
private BigDecimal nlttd;
public SysStationHikVideo() {
}
public BigDecimal getNlgtd() {
return nlgtd;
}
public void setNlgtd(BigDecimal nlgtd) {
this.nlgtd = nlgtd;
}
public BigDecimal getNlttd() {
return nlttd;
}
public void setNlttd(BigDecimal nlttd) {
this.nlttd = nlttd;
}
public String getAddressType() {
return this.addressType;
}
public void setAddressType(String addressType) {
this.addressType = addressType;
}
public String getLivesourceaddress() {
return this.livesourceaddress;
}
public void setLivesourceaddress(String livesourceaddress) {
this.livesourceaddress = livesourceaddress;
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPointCode() {
return this.pointCode;
}
public void setPointCode(String pointCode) {
this.pointCode = pointCode;
}
public Date getLastRequesttime() {
return this.lastRequesttime;
}
public void setLastRequesttime(Date lastRequesttime) {
this.lastRequesttime = lastRequesttime;
}
public Byte getIsControl() {
return this.isControl;
}
public void setIsControl(Byte isControl) {
this.isControl = isControl;
}
public Byte getIsHikvideo() {
return isHikvideo;
}
public void setIsHikvideo(Byte isHikvideo) {
this.isHikvideo = isHikvideo;
}
@Override
public VideoType getVideoType() {
return VideoType.HIK_VIDEO;
}
}

57
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/SysStationVideoSet.java

@ -0,0 +1,57 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
public class SysStationVideoSet {
private Integer id;
private String tenantId;
private Integer videoId;
private String videoValue;
private Integer isrId;
public SysStationVideoSet() {
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public Integer getVideoId() {
return this.videoId;
}
public void setVideoId(Integer videoId) {
this.videoId = videoId;
}
public String getVideoValue() {
return this.videoValue;
}
public void setVideoValue(String videoValue) {
this.videoValue = videoValue;
}
public Integer getIsrId() {
return this.isrId;
}
public void setIsrId(Integer isrId) {
this.isrId = isrId;
}
}

49
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/entity/Video.java

@ -0,0 +1,49 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.entity;
import com.hnac.hzims.videoimage.enums.VideoType;
import org.springblade.core.mp.base.BaseEntity;
public abstract class Video extends BaseEntity {
private String name;
private Long pointId;
private Integer inUse;
public Video() {
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Long getPointId() {
return this.pointId;
}
public void setPointId(Long pointId) {
this.pointId = pointId;
}
public Integer getInUse() {
return this.inUse;
}
public void setInUse(Integer inUse) {
this.inUse = inUse;
}
public abstract VideoType getVideoType();
@Override
public String toString() {
return "Video [getId()=" + this.getId() + ", getName()=" + this.getName() + ", getPointId()=" + this.getPointId() + ", getInUse()=" + this.getInUse() + ", getVideoType()=" + this.getVideoType() + "]";
}
}

46
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/CommandEnum.java

@ -0,0 +1,46 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.enums;
public enum CommandEnum {
LEFT("LEFT", "左转"),
RIGHT("RIGHT", "右转"),
UP("UP", "上转"),
DOWN("DOWN", "下转"),
ZOOM_IN("ZOOM_IN", "焦距变大"),
ZOOM_OUT("ZOOM_OUT", "焦距变小"),
LEFT_UP("RIGHT", "左上"),
LEFT_DOWN("LEFT_DOWN", "左下"),
RIGHT_UP("RIGHT_UP ", "右上"),
RIGHT_DOWN("RIGHT_DOWN", "右下"),
FOCUS_FAR("FOCUS_FAR", "焦点后移"),
IRIS_ENLARGE("IRIS_ENLARGE", "光圈扩大"),
IRIS_REDUCE("IRIS_REDUCE ", "光圈缩小");
private String code;
private String desc;
private CommandEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc() {
return this.desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

35
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/VideoEnum.java

@ -0,0 +1,35 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.enums;
public enum VideoEnum {
ISC("isc", "ISC平台视频"),
EZVIZ("ezviz", "萤石云");
private String code;
private String desc;
private VideoEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc() {
return this.desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}

51
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/enums/VideoType.java

@ -0,0 +1,51 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.enums;
import com.hnac.hzims.videoimage.service.IHikVideoService;
import com.hnac.hzims.videoimage.service.VideoBaseService;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public enum VideoType {
// DIRECT_LINK("direct", "链接", IDirectLinkVideoService.class),
// CLOUD("cloud", "萤石云", ICloudVideoService.class),
HIK_VIDEO("hikvideo", "萤石云", IHikVideoService.class);
private final String code;
private final String description;
private final Class<? extends VideoBaseService> serviceClass;
private static final Map<String, VideoType> DICT = (Map)Stream.of(values()).collect(Collectors.toMap(Object::toString, (type) -> {
return type;
}));
public static Optional<VideoType> fromString(String code) {
return Optional.ofNullable(DICT.get(code));
}
private VideoType(String code, String description, Class<? extends VideoBaseService> serviceClass) {
this.code = code;
this.description = description;
this.serviceClass = serviceClass;
}
public String getDescription() {
return this.description;
}
public Class<? extends VideoBaseService> getServiceClass() {
return this.serviceClass;
}
@Override
public String toString() {
return this.code;
}
}

106
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/manager/HikVideoManager.java

@ -0,0 +1,106 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.manager;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationHikVideo;
import com.hnac.hzims.videoimage.entity.Video;
import com.hnac.hzims.videoimage.enums.VideoType;
import com.hnac.hzims.videoimage.search.VideoSearchCondition;
import com.hnac.hzims.videoimage.service.IHikVideoService;
import com.hnac.hzims.videoimage.utils.PointTreeCache;
import org.springblade.core.secure.utils.AuthUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
@Component
public class HikVideoManager {
@Autowired
IHikVideoService hikVideoService;
@Autowired
MonitorPointManager pointManager;
public HikVideoManager() {
}
public boolean deleteById(String deptId, long id) {
if (hikVideoService.deleteById(id)) {
PointTreeCache.clearCache(deptId);
}
return true;
}
public SysStationHikVideo insert(String deptId, SysStationHikVideo sysStationHikvideo) {
if (sysStationHikvideo.getCreateDept() == null) {
sysStationHikvideo.setCreateDept(Long.valueOf(deptId));
}
sysStationHikvideo.setCreateTime(new Date());
sysStationHikvideo.setCreateUser(AuthUtil.getUserId());
sysStationHikvideo.setUpdateUser(AuthUtil.getUserId());
sysStationHikvideo.setUpdateTime(new Date());
hikVideoService.insert(sysStationHikvideo);
PointTreeCache.clearCache(deptId);
return sysStationHikvideo;
}
public SysStationHikVideo update(String deptId, SysStationHikVideo sysStationHikvideo) {
if (sysStationHikvideo.getCreateDept() == null) {
sysStationHikvideo.setCreateDept(Long.valueOf(deptId));
}
sysStationHikvideo.setUpdateUser(AuthUtil.getUserId());
sysStationHikvideo.setUpdateTime(new Date());
hikVideoService.update(sysStationHikvideo);
PointTreeCache.clearCache(deptId);
return sysStationHikvideo;
}
public IPage<Video> searchList(String deptId, long pointId, Integer inUse, String content, IPage pageParam) {
VideoSearchCondition condition = new VideoSearchCondition(VideoType.HIK_VIDEO, deptId, pointId, inUse, content);
return this.pointManager.searchList(condition, pageParam);
}
public SysStationHikVideo getById(String tenantId, Long id, int streamType) {
return hikVideoService.getById(tenantId, id, streamType);
}
public List<SysStationHikVideo> getByIdEx(String tenantId, String id, String streamType) {
return hikVideoService.getByIdEx(tenantId, id, streamType);
}
public List getAllList(String deptId) {
return hikVideoService.getAllList(deptId);
}
public boolean isHls(String deptId) {
return hikVideoService.isHls(deptId);
}
public boolean upDataLastTime(long id) {
return hikVideoService.upDataLastTime(id);
}
public List getAllHlsList(String deptId) {
return hikVideoService.getAllHlsList(deptId);
}
public String controlCamera(String cameraIndexCode, int action, String command, int time) {
return hikVideoService.controlCamera(cameraIndexCode, action, command, time);
}
// public boolean setHistoryConfiguration(String deptId, String userAccount, String configuration) {
// return hikVideoService.setHistoryConfiguration(deptId, userAccount, configuration);
// }
// public String getHistoryConfiguration(String deptId, String userAccount) {
// return hikVideoService.getHistoryConfiguration(deptId, userAccount);
// }
}

114
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/manager/MonitorPointManager.java

@ -0,0 +1,114 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.manager;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.MonitorPoint;
import com.hnac.hzims.videoimage.entity.PointTreeNode;
import com.hnac.hzims.videoimage.entity.Video;
import com.hnac.hzims.videoimage.search.VideoSearchCondition;
import com.hnac.hzims.videoimage.service.IMonitorPointService;
import com.hnac.hzims.videoimage.utils.PointTreeCache;
import com.hnac.hzims.videoimage.utils.Tree;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;
@Component
public class MonitorPointManager {
@Autowired
private IMonitorPointService pointService;
public MonitorPointManager() {
}
public IPage<Video> searchList(VideoSearchCondition condition, IPage<Video> page) {
Objects.requireNonNull(condition);
condition.addAll(this.getVideoIds(condition));
return this.pointService.searchList(condition, page);
}
private List<Long> getVideoIds(VideoSearchCondition condition) {
List<PointTreeNode> subTree = this.getChildrenNodes(condition.getDeptId(), condition.getPointId());
return (List)(new PointTreeNode(subTree)).map().get(condition.getVideoType());
}
private List<PointTreeNode> getChildrenNodes(String stationId, long id) {
List<Tree<PointTreeNode>> trees = this.getTrees(stationId);
List<PointTreeNode> nodes = new ArrayList();
Iterator var6 = trees.iterator();
while(var6.hasNext()) {
Tree<PointTreeNode> tree = (Tree)var6.next();
nodes.addAll(tree.subTreeNodeList(id));
}
return nodes;
}
public MonitorPoint insert(String stationId, MonitorPoint point) {
Objects.requireNonNull(stationId);
this.insertToDB(stationId, point);
PointTreeCache.clearCache(stationId);
return point;
}
private void insertToDB(String deptId, MonitorPoint point) {
assert Objects.nonNull(point);
point.setDeptId(deptId);
this.pointService.insert(point);
}
public Optional<MonitorPoint> update(String stationId, MonitorPoint point) {
Objects.requireNonNull(stationId);
Optional<MonitorPoint> result = this.updateDB(stationId, point);
result.ifPresent((unUse) -> {
PointTreeCache.clearCache(stationId);
});
return result;
}
private Optional<MonitorPoint> updateDB(String deptId, MonitorPoint point) {
assert Objects.nonNull(point);
point.setDeptId(deptId);
return this.pointService.update(point);
}
public boolean deleteById(String stationId, long id) {
List<PointTreeNode> waitDelete = this.getChildrenNodes(stationId, id);
if (this.pointService.delete(waitDelete)) {
PointTreeCache.clearCache(stationId);
}
return true;
}
public Optional<MonitorPoint> getById(String stationId, long id) {
return this.pointService.getById(stationId, id);
}
public List<PointTreeNode> getPointRootNode(String stationId) {
List<Tree<PointTreeNode>> trees = this.getTrees(stationId);
return Objects.nonNull(trees) ? (List)trees.stream().map((tree) -> {
return (PointTreeNode)tree.getRoot();
}).collect(Collectors.toList()) : null;
}
private List<Tree<PointTreeNode>> getTrees(String stationId) {
List<Tree<PointTreeNode>> trees = PointTreeCache.getFromCache(stationId);
if (Objects.isNull(trees)) {
trees = PointTreeCache.addAndGet(stationId, () -> {
return this.pointService.getPointRootNode(stationId);
});
}
return trees;
}
}

34
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageConfigMapper.java

@ -0,0 +1,34 @@
package com.hnac.hzims.videoimage.mapper;
import org.apache.ibatis.annotations.Param;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import java.util.List;
public interface ImageConfigMapper {
int countByExample(ImageConfigExample example);
int deleteByExample(ImageConfigExample example);
int deleteByPrimaryKey(Long id);
int insert(ImageConfig record);
int insertSelective(ImageConfig record);
List<ImageConfig> selectByExample(ImageConfigExample example);
ImageConfig selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ImageConfig record, @Param("example") ImageConfigExample example);
int updateByExample(@Param("record") ImageConfig record, @Param("example") ImageConfigExample example);
int updateByPrimaryKeySelective(ImageConfig record);
int updateByPrimaryKey(ImageConfig record);
//插入多条记录
int insertImageConfigs(List<ImageConfig> record);
}

298
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageConfigMapper.xml

@ -0,0 +1,298 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.ImageConfigMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.ImageConfig" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="STCD" property="stcd" jdbcType="CHAR" />
<result column="NAME" property="name" jdbcType="VARCHAR" />
<result column="TYPE" property="type" jdbcType="CHAR" />
<result column="REALID" property="realid" jdbcType="VARCHAR" />
<result column="VALUE" property="value" jdbcType="VARCHAR" />
<result column="UNIT" property="unit" jdbcType="VARCHAR" />
<result column="DEVICE_CODE" property="deviceCode" jdbcType="VARCHAR" />
<result column="CODE" property="code" jdbcType="VARCHAR" />
<result column="DATA_SOURCE" property="dataSource" javaType="INTEGER"/>
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
ID, STCD, NAME, TYPE, REALID, VALUE, UNIT,DEVICE_CODE,CODE,DATA_SOURCE
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hnac.hzims.videoimage.entity.ImageConfigExample" >
select
<if test="distinct" >
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from image_config
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from image_config
where ID = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hnac.hzims.videoimage.entity.ImageConfigExample" >
delete from image_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hnac.hzims.videoimage.entity.ImageConfig" >
insert into image_config (ID, STCD, NAME, TYPE,
REALID, VALUE, UNIT,DEVICE_CODE,CODE,DATA_SOURCE
)
values (#{id,jdbcType=BIGINT}, #{stcd,jdbcType=CHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=CHAR},
#{realid,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{deviceCode,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},#{dataSource,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.hnac.hzims.videoimage.entity.ImageConfig" >
insert into image_config
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="stcd != null" >
STCD,
</if>
<if test="name != null" >
NAME,
</if>
<if test="type != null" >
TYPE,
</if>
<if test="realid != null" >
REALID,
</if>
<if test="value != null" >
VALUE,
</if>
<if test="unit != null" >
UNIT,
</if>
<if test="deviceCode != null" >
DEVICE_CODE,
</if>
<if test="code != null" >
CODE,
</if>
<if test="dataSource!=null">
DATA_SOURCE
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="stcd != null" >
#{stcd,jdbcType=CHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=CHAR},
</if>
<if test="realid != null" >
#{realid,jdbcType=VARCHAR},
</if>
<if test="value != null" >
#{value,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
#{unit,jdbcType=VARCHAR},
</if>
<if test="deviceCode != null" >
#{deviceCode,jdbcType=VARCHAR},
</if>
<if test="code != null" >
#{code,jdbcType=VARCHAR},
</if>
<if test="dataSource!=null">
#{dataSource,jdbcType=INTEGER}
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hnac.hzims.videoimage.entity.ImageConfigExample" resultType="java.lang.Integer" >
select count(*) from image_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update image_config
<set >
<if test="record.id != null" >
ID = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.stcd != null" >
STCD = #{record.stcd,jdbcType=CHAR},
</if>
<if test="record.name != null" >
NAME = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null" >
TYPE = #{record.type,jdbcType=CHAR},
</if>
<if test="record.realid != null" >
REALID = #{record.realid,jdbcType=VARCHAR},
</if>
<if test="record.value != null" >
VALUE = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.unit != null" >
UNIT = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.deviceCode != null" >
DEVICE_CODE = #{record.deviceCode,jdbcType=VARCHAR},
</if>
<if test="record.code != null" >
CODE = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.dataSource!=null">
DATA_SOURCE = #{record.dataSource,jdbcType=INTEGER}
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update image_config
set ID = #{record.id,jdbcType=BIGINT},
STCD = #{record.stcd,jdbcType=CHAR},
NAME = #{record.name,jdbcType=VARCHAR},
TYPE = #{record.type,jdbcType=CHAR},
REALID = #{record.realid,jdbcType=VARCHAR},
VALUE = #{record.value,jdbcType=VARCHAR},
UNIT = #{record.unit,jdbcType=VARCHAR},
DEVICE_CODE = #{record.deviceCode,jdbcType=VARCHAR},
CODE = #{record.code,jdbcType=VARCHAR},
DATA_SOURCE = #{record.dataSource,jdbcType=INTEGER}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hnac.hzims.videoimage.entity.ImageConfig" >
update image_config
<set >
<if test="stcd != null" >
STCD = #{stcd,jdbcType=CHAR},
</if>
<if test="name != null" >
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null" >
TYPE = #{type,jdbcType=CHAR},
</if>
<if test="realid != null" >
REALID = #{realid,jdbcType=VARCHAR},
</if>
<if test="value != null" >
VALUE = #{value,jdbcType=VARCHAR},
</if>
<if test="unit != null" >
UNIT = #{unit,jdbcType=VARCHAR},
</if>
<if test="deviceCode != null" >
DEVICE_CODE = #{deviceCode,jdbcType=VARCHAR},
</if>
<if test="code != null" >
CODE = #{code,jdbcType=VARCHAR},
</if>
<if test="dataSource!=null">
DATA_SOURCE = #{dataSource,jdbcType=INTEGER}
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hnac.hzims.videoimage.entity.ImageConfig" >
update image_config
set STCD = #{stcd,jdbcType=CHAR},
NAME = #{name,jdbcType=VARCHAR},
TYPE = #{type,jdbcType=CHAR},
REALID = #{realid,jdbcType=VARCHAR},
VALUE = #{value,jdbcType=VARCHAR},
UNIT = #{unit,jdbcType=VARCHAR},
DEVICE_CODE = #{deviceCode,jdbcType=VARCHAR},
CODE = #{code,jdbcType=VARCHAR},
DATA_SOURCE = #{dataSource,jdbcType=INTEGER}
where ID = #{id,jdbcType=BIGINT}
</update>
<insert id="insertImageConfigs" parameterType="java.util.ArrayList">
insert into `image_config`(stcd,name,type,realid,value,unit,DEVICE_CODE,CODE,DATA_SOURCE) values
<foreach collection="list" index="item" separator="," item="item">
(#{item.stcd},#{item.name},#{item.type},#{item.realid},#{item.value},
#{item.unit},#{item.deviceCode},#{item.code},#{item.dataSource})
</foreach>
</insert>
</mapper>

63
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageInfoMapper.java

@ -0,0 +1,63 @@
package com.hnac.hzims.videoimage.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import com.hnac.hzims.videoimage.entity.ImageInfo;
import com.hnac.hzims.videoimage.entity.ImageInfoExample;
import java.util.List;
public interface ImageInfoMapper {
int countByExample(ImageInfoExample example);
int deleteByExample(ImageInfoExample example);
int deleteByPrimaryKey(Long id);
int insert(ImageInfo record);
int insertSelective(ImageInfo record);
List<ImageInfo> selectByExampleWithBLOBs(ImageInfoExample example);
List<ImageInfo> selectByExample(ImageInfoExample example);
ImageInfo selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ImageInfo record, @Param("example") ImageInfoExample example);
int updateByExampleWithBLOBs(@Param("record") ImageInfo record, @Param("example") ImageInfoExample example);
int updateByExample(@Param("record") ImageInfo record, @Param("example") ImageInfoExample example);
int updateByPrimaryKeySelective(ImageInfo record);
int updateByPrimaryKeyWithBLOBs(ImageInfo record);
int updateByPrimaryKey(ImageInfo record);
//根据设备stcds查询各个设备最新图片信息
List<ImageInfo> selectNewestImageByDevId(String[] stcds);
//根据设备编码和起始时间查询某个设备的图片信息集合
List<ImageInfo> selectImagesByDevIdAndTime(@Param("stcd") String stcd,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
IPage<ImageInfo> pageQueryImagesByDevIdAndTime(@Param("stcd") String stcd,
@Param("startTime") String startTime,
@Param("endTime") String endTime,
IPage<ImageInfo> page);
//手动插入数据
int insertManualImageInfo(ImageInfo record);
//查询某个设备某个时刻是否有手动上传的图片
List<ImageInfo> selectImageInfoByStcdAndTime(@Param("stcd") String stcd,
@Param("time") String time);
IPage<ImageInfo> pageQueryManualImagesByDevIdAndTime(@Param("stcd") String stcd,
@Param("startTime") String startTime,
@Param("endTime") String endTime,
IPage<ImageInfo> page);
}

342
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImageInfoMapper.xml

@ -0,0 +1,342 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.ImageInfoMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.ImageInfo" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="STCD" property="stcd" jdbcType="CHAR" />
<result column="TIME" property="time" jdbcType="TIMESTAMP" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.hnac.hzims.videoimage.entity.ImageInfo" extends="BaseResultMap" >
<result column="DATA" property="data" jdbcType="LONGVARBINARY" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
ID, STCD, TIME
</sql>
<sql id="Blob_Column_List" >
DATA
</sql>
<select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.hnac.hzims.videoimage.entity.ImageInfoExample" >
select
<if test="distinct" >
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from image_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hnac.hzims.videoimage.entity.ImageInfoExample" >
select
<if test="distinct" >
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from image_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from image_info
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from image_info
where ID = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.hnac.hzims.videoimage.entity.ImageInfoExample" >
delete from image_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
insert into image_info (ID, STCD, TIME,
DATA)
values (#{id,jdbcType=BIGINT}, #{stcd,jdbcType=CHAR}, #{time,jdbcType=TIMESTAMP},
#{data,jdbcType=LONGVARBINARY})
</insert>
<insert id="insertSelective" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
insert into image_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="stcd != null" >
STCD,
</if>
<if test="time != null" >
TIME,
</if>
<if test="data != null" >
DATA,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="stcd != null" >
#{stcd,jdbcType=CHAR},
</if>
<if test="time != null" >
#{time,jdbcType=TIMESTAMP},
</if>
<if test="data != null" >
#{data,jdbcType=LONGVARBINARY},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hnac.hzims.videoimage.entity.ImageInfoExample" resultType="java.lang.Integer" >
select count(*) from image_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update image_info
<set >
<if test="record.id != null" >
ID = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.stcd != null" >
STCD = #{record.stcd,jdbcType=CHAR},
</if>
<if test="record.time != null" >
TIME = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.data != null" >
DATA = #{record.data,jdbcType=LONGVARBINARY},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map" >
update image_info
set ID = #{record.id,jdbcType=BIGINT},
STCD = #{record.stcd,jdbcType=CHAR},
TIME = #{record.time,jdbcType=TIMESTAMP},
DATA = #{record.data,jdbcType=LONGVARBINARY}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update image_info
set ID = #{record.id,jdbcType=BIGINT},
STCD = #{record.stcd,jdbcType=CHAR},
TIME = #{record.time,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
update image_info
<set >
<if test="stcd != null" >
STCD = #{stcd,jdbcType=CHAR},
</if>
<if test="time != null" >
TIME = #{time,jdbcType=TIMESTAMP},
</if>
<if test="data != null" >
DATA = #{data,jdbcType=LONGVARBINARY},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
update image_info
set STCD = #{stcd,jdbcType=CHAR},
TIME = #{time,jdbcType=TIMESTAMP},
DATA = #{data,jdbcType=LONGVARBINARY}
where ID = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
update image_info
set STCD = #{stcd,jdbcType=CHAR},
TIME = #{time,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
<select id="selectNewestImageByDevId" resultType="com.hnac.hzims.videoimage.entity.ImageInfo">
select a.* from image_info as a,
(select stcd, max(b.time) as time from image_info as b where data is not null group by b.stcd) as b
where a.stcd=b.stcd and a.time = b.time
<if test="array != null and array.length>0">
and b.stcd in
<foreach collection="array" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<select id="selectImagesByDevIdAndTime" resultType="com.hnac.hzims.videoimage.entity.ImageInfo">
SELECT * FROM image_info t
<where>
<if test="stcd != null and stcd != ''">
t.stcd = #{stcd}
</if>
<if test="startTime != null and startTime != ''">
and t.time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and t.time &lt; #{endTime}
</if>
</where>
ORDER BY t.time DESC
</select>
<select id="pageQueryImagesByDevIdAndTime" resultType="com.hnac.hzims.videoimage.entity.ImageInfo">
SELECT * FROM image_info t
<where>
data IS NOT NULL
<if test="stcd != null and stcd != ''">
and t.stcd = #{stcd}
</if>
<if test="startTime != null and startTime != ''">
and t.time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and t.time &lt; #{endTime}
</if>
</where>
ORDER BY t.time DESC
</select>
<select id="pageQueryManualImagesByDevIdAndTime" resultType="com.hnac.hzims.videoimage.entity.ImageInfo">
SELECT id, stcd, time, manualpath FROM image_info t
<where>
manualpath IS NOT NULL
<if test="stcd != null and stcd != ''">
and t.stcd = #{stcd}
</if>
<if test="startTime != null and startTime != ''">
and t.time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and t.time &lt; #{endTime}
</if>
</where>
ORDER BY t.time DESC
</select>
<insert id="insertManualImageInfo" parameterType="com.hnac.hzims.videoimage.entity.ImageInfo" >
insert into image_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="stcd != null" >
STCD,
</if>
<if test="time != null" >
TIME,
</if>
<if test="manualpath != null" >
MANUALPATH,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="stcd != null" >
#{stcd,jdbcType=CHAR},
</if>
<if test="time != null" >
#{time,jdbcType=TIMESTAMP},
</if>
<if test="manualpath != null" >
#{manualpath,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectImageInfoByStcdAndTime" resultType="com.hnac.hzims.videoimage.entity.ImageInfo">
SELECT * FROM image_info t
<where>
<if test="stcd != null and stcd != ''">
t.stcd = #{stcd}
</if>
<if test="time != null and time != ''">
and t.time = #{time}
</if>
</where>
</select>
</mapper>

24
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImagePointMapper.java

@ -0,0 +1,24 @@
package com.hnac.hzims.videoimage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import com.hnac.hzims.videoimage.entity.ImagePoint;
import com.hnac.hzims.videoimage.vo.ImagePointVo;
import java.util.List;
public interface ImagePointMapper extends BaseMapper<ImagePoint> {
// int countByExample(ImagePointExample example);
IPage<ImagePointVo> pageQueryImagePoint(@Param("deptIds") List<String> deptIds,
@Param("stcd") String stcd,
@Param("stnm") String stnm,
IPage page);
IPage<ImagePointVo> pageQueryImagePointOrderBy(@Param("deptIds") List<String> deptIds,
@Param("stcd") String stcd,
@Param("stnm") String stnm,
IPage page,
@Param("orderByField") String orderByField);
}

68
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/ImagePointMapper.xml

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.ImagePointMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.ImagePoint" >
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="STCD" property="stcd" jdbcType="CHAR" />
<result column="PNO" property="pno" jdbcType="INTEGER" />
<result column="STNM" property="stnm" jdbcType="VARCHAR" />
<result column="LGTD" property="lgtd" jdbcType="DOUBLE" />
<result column="LTID" property="ltid" jdbcType="DOUBLE" />
<result column="ADDRESS" property="address" jdbcType="VARCHAR" />
<result column="REMARK" property="remark" jdbcType="VARCHAR" />
<result column="DEFAULTIMAGEPATH" property="defaultimagepath" jdbcType="VARCHAR" />
<result column="OPEN" property="open" jdbcType="INTEGER"/>
</resultMap>
<select id="pageQueryImagePoint" resultType="com.hnac.hzims.videoimage.vo.ImagePointVo">
SELECT id,CREATE_DEPT as createDept, pno, stcd, stnm, lgtd, ltid, address, create_time as createTime, remark,defaultimagepath,open from
`image_point`
<where>
is_deleted = 0
<if test="deptIds != null and deptIds.size()>0">
<foreach collection="deptIds" index="index" item="deptId">
and CREATE_DEPT like concat('',#{deptId},'%')
</foreach>
</if>
<if test="stcd != null and stcd != ''">
and stcd = #{stcd}
</if>
<if test="stnm != null and stnm != ''">
and stnm like concat('%',#{stnm},'%')
</if>
</where>
ORDER BY pno, stcd, stnm ASC
</select>
<select id="pageQueryImagePointOrderBy" resultType="com.hnac.hzims.videoimage.vo.ImagePointVo">
SELECT id,CREATE_DEPT as createDept, pno, stcd, stnm, lgtd, ltid, address, create_time as createTime, remark,defaultimagepath, deptName,open from
(
SELECT * FROM `image_point`
)
as c
<where>
1=1
<if test="deptIds != null and deptIds.size()>0">
<foreach collection="deptIds" index="index" item="item" >
and c.CREATE_DEPT like concat('%',#{item},'%')
</foreach>
</if>
<if test="stcd != null and stcd != ''">
and c.stcd = #{stcd}
</if>
<if test="stnm != null and stnm != ''">
and c.stnm like concat('%',#{stnm},'%')
</if>
</where>
<if test="orderByField != null and orderByField != ''">
ORDER BY ${orderByField}
</if>
</select>
</mapper>

24
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/MonitorPointMapper.java

@ -0,0 +1,24 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.mapper;
import com.hnac.hzims.videoimage.entity.MonitorPoint;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface MonitorPointMapper {
void insert(MonitorPoint var1);
int update(MonitorPoint var1);
MonitorPoint getById(@Param("stationId") String var1, @Param("id") long var2);
void delete(@Param("idList") Collection<Long> var1);
List<MonitorPoint> selectPointList(String var1);
}

76
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/MonitorPointMapper.xml

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.MonitorPointMapper">
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.MonitorPoint">
<id property="id" column="ID" jdbcType="BIGINT"/>
<result property="name" column="NAME" jdbcType="VARCHAR"/>
<result property="parentId" column="PID" jdbcType="BIGINT"/>
<result property="deptId" column="DEPT_ID" jdbcType="VARCHAR"/>
<result property="remark" column="REMARK" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
ID, NAME, PID, STATION_ID, REMARK
</sql>
<insert id="insert" parameterType="com.hnac.hzims.videoimage.entity.MonitorPoint"
keyProperty="id" useGeneratedKeys="true">
INSERT INTO EN_VIDEO_POINT (
NAME,
PID,
DEPT_ID,
REMARK
) VALUES (
#{name, jdbcType=VARCHAR},
#{parentId, jdbcType=BIGINT},
#{stationId, jdbcType=VARCHAR},
#{remark, jdbcType=VARCHAR}
)
</insert>
<update id="update" parameterType="com.hnac.hzims.videoimage.entity.MonitorPoint">
UPDATE EN_VIDEO_POINT
SET NAME = #{name, jdbcType=VARCHAR},
REMARK = #{remark, jdbcType=VARCHAR}
WHERE
ID = #{id, jdbcType=BIGINT}
AND DEPT_ID = #{stationId, jdbcType=VARCHAR}
</update>
<select id="getById" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM EN_VIDEO_POINT
WHERE
ID = #{id, jdbcType=BIGINT}
AND DEPT_ID = #{stationId, jdbcType=VARCHAR}
</select>
<delete id="delete">
DELETE FROM EN_VIDEO_POINT
<where>
<choose>
<when test="idList != null and !idList.isEmpty()">
AND ID IN (
<foreach collection="idList" item="id" separator=",">
#{id}
</foreach>
)
</when>
<otherwise>
AND 1 = 2
</otherwise>
</choose>
</where>
</delete>
<select id="selectPointList" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM EN_VIDEO_POINT
WHERE
DEPT_ID = #{stationId, jdbcType=VARCHAR}
</select>
</mapper>

36
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikSecretMapper.java

@ -0,0 +1,36 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.mapper;
import com.hnac.hzims.videoimage.entity.SysStationHikSecret;
import com.hnac.hzims.videoimage.search.SysStationHikSecretExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysStationHikSecretMapper {
int countByExample(SysStationHikSecretExample var1);
int deleteByExample(SysStationHikSecretExample var1);
int deleteByPrimaryKey(Integer var1);
int insert(SysStationHikSecret var1);
int insertSelective(SysStationHikSecret var1);
List<SysStationHikSecret> selectByExample(SysStationHikSecretExample var1);
SysStationHikSecret selectByPrimaryKey(Integer var1);
int updateByExampleSelective(@Param("record") SysStationHikSecret var1, @Param("example") SysStationHikSecretExample var2);
int updateByExample(@Param("record") SysStationHikSecret var1, @Param("example") SysStationHikSecretExample var2);
int updateByPrimaryKeySelective(SysStationHikSecret var1);
int updateByPrimaryKey(SysStationHikSecret var1);
}

196
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikSecretMapper.xml

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.SysStationHikSecretMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.SysStationHikSecret" >
<id column="ID" property="id" jdbcType="INTEGER" />
<result column="HOST" property="host" jdbcType="VARCHAR" />
<result column="APPKEY" property="appkey" jdbcType="VARCHAR" />
<result column="APPSECRET" property="appsecret" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
ID, HOST, APPKEY, APPSECRET
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hnac.hzims.videoimage.search.SysStationHikSecretExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from sys_station_hiksecret
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from sys_station_hiksecret
where ID = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from sys_station_hiksecret
where ID = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.hnac.hzims.videoimage.search.SysStationHikSecretExample" >
delete from sys_station_hiksecret
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hnac.hzims.videoimage.entity.SysStationHikSecret" >
insert into sys_station_hiksecret (ID, HOST, APPKEY,
APPSECRET)
values (#{id,jdbcType=INTEGER}, #{host,jdbcType=VARCHAR}, #{appkey,jdbcType=VARCHAR},
#{appsecret,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.hnac.hzims.videoimage.entity.SysStationHikSecret" >
insert into sys_station_hiksecret
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="host != null" >
HOST,
</if>
<if test="appkey != null" >
APPKEY,
</if>
<if test="appsecret != null" >
APPSECRET,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="host != null" >
#{host,jdbcType=VARCHAR},
</if>
<if test="appkey != null" >
#{appkey,jdbcType=VARCHAR},
</if>
<if test="appsecret != null" >
#{appsecret,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hnac.hzims.videoimage.search.SysStationHikSecretExample" resultType="java.lang.Integer" >
select count(*) from sys_station_hiksecret
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update sys_station_hiksecret
<set >
<if test="record.id != null" >
ID = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.host != null" >
HOST = #{record.host,jdbcType=VARCHAR},
</if>
<if test="record.appkey != null" >
APPKEY = #{record.appkey,jdbcType=VARCHAR},
</if>
<if test="record.appsecret != null" >
APPSECRET = #{record.appsecret,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update sys_station_hiksecret
set ID = #{record.id,jdbcType=INTEGER},
HOST = #{record.host,jdbcType=VARCHAR},
APPKEY = #{record.appkey,jdbcType=VARCHAR},
APPSECRET = #{record.appsecret,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hnac.hzims.videoimage.entity.SysStationHikSecret" >
update sys_station_hiksecret
<set >
<if test="host != null" >
HOST = #{host,jdbcType=VARCHAR},
</if>
<if test="appkey != null" >
APPKEY = #{appkey,jdbcType=VARCHAR},
</if>
<if test="appsecret != null" >
APPSECRET = #{appsecret,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.hnac.hzims.videoimage.entity.SysStationHikSecret" >
update sys_station_hiksecret
set HOST = #{host,jdbcType=VARCHAR},
APPKEY = #{appkey,jdbcType=VARCHAR},
APPSECRET = #{appsecret,jdbcType=VARCHAR}
where ID = #{id,jdbcType=INTEGER}
</update>
</mapper>

26
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikVideoMapper.java

@ -0,0 +1,26 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.videoimage.entity.PointLeafNode;
import com.hnac.hzims.videoimage.entity.SysStationHikVideo;
import com.hnac.hzims.videoimage.search.SysStationHikVideoExample;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface SysStationHikVideoMapper extends BaseMapper<SysStationHikVideo> {
int countByExample(SysStationHikVideoExample var1);
int upDataLastTime(@Param("id") long var1, @Param("date") Date var3);
List<PointLeafNode> getVideoList(@Param("pointIdList") List<Long> var1);
int clearBindingRelation(@Param("videoList") List<Long> var1);
}

135
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationHikVideoMapper.xml

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.SysStationHikVideoMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.SysStationHikVideo" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="NAME" property="name" jdbcType="VARCHAR" />
<result column="ADDRESS_TYPE" property="addressType" jdbcType="VARCHAR" />
<result column="LIVESOURCEADDRESS" property="livesourceaddress" jdbcType="VARCHAR" />
<result column="ADDRESS" property="address" jdbcType="VARCHAR" />
<result column="POINT_CODE" property="pointCode" jdbcType="VARCHAR" />
<result column="LAST_REQUESTTIME" property="lastRequesttime" jdbcType="TIMESTAMP" />
<result column="POINT_ID" property="pointId" jdbcType="BIGINT" />
<result column="IN_USE" property="inUse" jdbcType="TINYINT" />
<result column="IS_CONTROL" property="isControl" jdbcType="TINYINT" />
<result column="IS_HIKVIDEO" property="isHikvideo" jdbcType="TINYINT" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
ID, NAME, ADDRESS_TYPE, LIVESOURCEADDRESS, ADDRESS, POINT_CODE, LAST_REQUESTTIME,
STATION_ID, POINT_ID, IN_USE, IS_CONTROL, IS_HIKVIDEO
</sql>
<select id="countByExample" parameterType="com.hnac.hzims.videoimage.search.SysStationHikVideoExample" resultType="java.lang.Integer" >
select count(*) from sys_station_hikvideo
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="upDataLastTime">
update sys_station_hikvideo
set LAST_REQUESTTIME = #{date,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
<select id="getVideoList" resultType="com.hnac.hzims.videoimage.entity.PointLeafNode">
SELECT
ID, NAME, POINT_ID, IN_USE
FROM
sys_station_hikvideo
<where>
<choose>
<when test="pointIdList != null and !pointIdList.isEmpty()">
AND POINT_ID IN (
<foreach collection="pointIdList" item="pointId" separator=",">
#{pointId}
</foreach>
)
</when>
<otherwise>
AND 1 = 2
</otherwise>
</choose>
</where>
</select>
<update id="clearBindingRelation">
UPDATE sys_station_hikvideo
SET POINT_ID = null
<where>
<choose>
<when test="videoList != null and !videoList.isEmpty()">
AND ID IN (
<foreach collection="videoList" item="videoId" separator=",">
#{videoId}
</foreach>
)
</when>
<otherwise>
AND 1 = 2
</otherwise>
</choose>
</where>
</update>
</mapper>

39
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationVideoSetMapper.java

@ -0,0 +1,39 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationVideoSet;
import com.hnac.hzims.videoimage.search.SysStationVideoSetExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SysStationVideoSetMapper {
int countByExample(SysStationVideoSetExample var1);
int deleteByExample(SysStationVideoSetExample var1);
int deleteByPrimaryKey(Integer var1);
int insert(SysStationVideoSet var1);
int insertSelective(SysStationVideoSet var1);
List<SysStationVideoSet> selectByExample(SysStationVideoSetExample var1);
SysStationVideoSet selectByPrimaryKey(Integer var1);
int updateByExampleSelective(@Param("record") SysStationVideoSet var1, @Param("example") SysStationVideoSetExample var2);
int updateByExample(@Param("record") SysStationVideoSet var1, @Param("example") SysStationVideoSetExample var2);
int updateByPrimaryKeySelective(SysStationVideoSet var1);
int updateByPrimaryKey(SysStationVideoSet var1);
IPage<SysStationVideoSet> getPageList(@Param("tenantId") String var1, IPage<SysStationVideoSet> var2);
}

223
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/mapper/SysStationVideoSetMapper.xml

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.hnac.hzims.videoimage.mapper.SysStationVideoSetMapper" >
<resultMap id="BaseResultMap" type="com.hnac.hzims.videoimage.entity.SysStationVideoSet" >
<id column="ID" property="id" jdbcType="INTEGER" />
<result column="TENANT_ID" property="tenantId" jdbcType="VARCHAR" />
<result column="VIDEO_ID" property="videoId" jdbcType="INTEGER" />
<result column="VIDEO_VALUE" property="videoValue" jdbcType="VARCHAR" />
<result column="ISR_ID" property="isrId" jdbcType="INTEGER" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<foreach collection="criteria.criteria" item="criterion" >
<choose >
<when test="criterion.noValue" >
and ${criterion.condition}
</when>
<when test="criterion.singleValue" >
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue" >
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue" >
and ${criterion.condition}
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
ID, TENANT_ID, VIDEO_ID, VIDEO_VALUE, ISR_ID
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.hnac.hzims.videoimage.search.SysStationVideoSetExample" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from sys_station_video_set
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="getPageList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_station_video_set
where 1=1
<if test="tenantId!=null and tenantId!=''">
and TENANT_ID =#{tenantId}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from sys_station_video_set
where ID = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from sys_station_video_set
where ID = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.hnac.hzims.videoimage.search.SysStationVideoSetExample" >
delete from sys_station_video_set
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.hnac.hzims.videoimage.entity.SysStationVideoSet" >
insert into sys_station_video_set (ID, TENANT_ID, VIDEO_ID,
VIDEO_VALUE, ISR_ID)
values (#{id,jdbcType=INTEGER}, #{tenantId,jdbcType=VARCHAR}, #{videoId,jdbcType=INTEGER},
#{videoValue,jdbcType=VARCHAR}, #{isrId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.hnac.hzims.videoimage.entity.SysStationVideoSet" >
insert into sys_station_video_set
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="tenantId != null" >
TENANT_ID,
</if>
<if test="videoId != null" >
VIDEO_ID,
</if>
<if test="videoValue != null" >
VIDEO_VALUE,
</if>
<if test="isrId != null" >
ISR_ID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="tenantId != null" >
#{tenantId,jdbcType=VARCHAR},
</if>
<if test="videoId != null" >
#{videoId,jdbcType=INTEGER},
</if>
<if test="videoValue != null" >
#{videoValue,jdbcType=VARCHAR},
</if>
<if test="isrId != null" >
#{isrId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.hnac.hzims.videoimage.search.SysStationVideoSetExample" resultType="java.lang.Integer" >
select count(*) from sys_station_video_set
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update sys_station_video_set
<set >
<if test="record.id != null" >
ID = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.tenantId != null" >
TENANT_ID = #{record.tenantId,jdbcType=VARCHAR},
</if>
<if test="record.videoId != null" >
VIDEO_ID = #{record.videoId,jdbcType=INTEGER},
</if>
<if test="record.videoValue != null" >
VIDEO_VALUE = #{record.videoValue,jdbcType=VARCHAR},
</if>
<if test="record.isrId != null" >
ISR_ID = #{record.isrId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update sys_station_video_set
set ID = #{record.id,jdbcType=INTEGER},
TENANT_ID = #{record.tenantId,jdbcType=VARCHAR},
VIDEO_ID = #{record.videoId,jdbcType=INTEGER},
VIDEO_VALUE = #{record.videoValue,jdbcType=VARCHAR},
ISR_ID = #{record.isrId,jdbcType=INTEGER}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.hnac.hzims.videoimage.entity.SysStationVideoSet" >
update sys_station_video_set
<set >
<if test="tenantId != null" >
TENANT_ID = #{tenantId,jdbcType=VARCHAR},
</if>
<if test="videoId != null" >
VIDEO_ID = #{videoId,jdbcType=INTEGER},
</if>
<if test="videoValue != null" >
VIDEO_VALUE = #{videoValue,jdbcType=VARCHAR},
</if>
<if test="isrId != null" >
ISR_ID = #{isrId,jdbcType=INTEGER},
</if>
</set>
where ID = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.hnac.hzims.videoimage.entity.SysStationVideoSet" >
update sys_station_video_set
set TENANT_ID = #{tenantId,jdbcType=VARCHAR},
VIDEO_ID = #{videoId,jdbcType=INTEGER},
VIDEO_VALUE = #{videoValue,jdbcType=VARCHAR},
ISR_ID = #{isrId,jdbcType=INTEGER}
where ID = #{id,jdbcType=INTEGER}
</update>
</mapper>

463
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationHikSecretExample.java

@ -0,0 +1,463 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.search;
import java.util.ArrayList;
import java.util.List;
public class SysStationHikSecretExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria = new ArrayList();
public SysStationHikSecretExample() {
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return this.orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return this.distinct;
}
public List<Criteria> getOredCriteria() {
return this.oredCriteria;
}
public void or(Criteria criteria) {
this.oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = this.createCriteriaInternal();
this.oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = this.createCriteriaInternal();
if (this.oredCriteria.size() == 0) {
this.oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
this.oredCriteria.clear();
this.orderByClause = null;
this.distinct = false;
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return this.condition;
}
public Object getValue() {
return this.value;
}
public Object getSecondValue() {
return this.secondValue;
}
public boolean isNoValue() {
return this.noValue;
}
public boolean isSingleValue() {
return this.singleValue;
}
public boolean isBetweenValue() {
return this.betweenValue;
}
public boolean isListValue() {
return this.listValue;
}
public String getTypeHandler() {
return this.typeHandler;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, (String)null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String)null);
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria = new ArrayList();
protected GeneratedCriteria() {
}
public boolean isValid() {
return this.criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return this.criteria;
}
public List<Criterion> getCriteria() {
return this.criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
} else {
this.criteria.add(new Criterion(condition));
}
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
} else {
this.criteria.add(new Criterion(condition, value));
}
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 != null && value2 != null) {
this.criteria.add(new Criterion(condition, value1, value2));
} else {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
}
public Criteria andIdIsNull() {
this.addCriterion("ID is null");
return (Criteria)this;
}
public Criteria andIdIsNotNull() {
this.addCriterion("ID is not null");
return (Criteria)this;
}
public Criteria andIdEqualTo(Integer value) {
this.addCriterion("ID =", value, "id");
return (Criteria)this;
}
public Criteria andIdNotEqualTo(Integer value) {
this.addCriterion("ID <>", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThan(Integer value) {
this.addCriterion("ID >", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
this.addCriterion("ID >=", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThan(Integer value) {
this.addCriterion("ID <", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
this.addCriterion("ID <=", value, "id");
return (Criteria)this;
}
public Criteria andIdIn(List<Integer> values) {
this.addCriterion("ID in", values, "id");
return (Criteria)this;
}
public Criteria andIdNotIn(List<Integer> values) {
this.addCriterion("ID not in", values, "id");
return (Criteria)this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
this.addCriterion("ID between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
this.addCriterion("ID not between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andHostIsNull() {
this.addCriterion("HOST is null");
return (Criteria)this;
}
public Criteria andHostIsNotNull() {
this.addCriterion("HOST is not null");
return (Criteria)this;
}
public Criteria andHostEqualTo(String value) {
this.addCriterion("HOST =", value, "host");
return (Criteria)this;
}
public Criteria andHostNotEqualTo(String value) {
this.addCriterion("HOST <>", value, "host");
return (Criteria)this;
}
public Criteria andHostGreaterThan(String value) {
this.addCriterion("HOST >", value, "host");
return (Criteria)this;
}
public Criteria andHostGreaterThanOrEqualTo(String value) {
this.addCriterion("HOST >=", value, "host");
return (Criteria)this;
}
public Criteria andHostLessThan(String value) {
this.addCriterion("HOST <", value, "host");
return (Criteria)this;
}
public Criteria andHostLessThanOrEqualTo(String value) {
this.addCriterion("HOST <=", value, "host");
return (Criteria)this;
}
public Criteria andHostLike(String value) {
this.addCriterion("HOST like", value, "host");
return (Criteria)this;
}
public Criteria andHostNotLike(String value) {
this.addCriterion("HOST not like", value, "host");
return (Criteria)this;
}
public Criteria andHostIn(List<String> values) {
this.addCriterion("HOST in", values, "host");
return (Criteria)this;
}
public Criteria andHostNotIn(List<String> values) {
this.addCriterion("HOST not in", values, "host");
return (Criteria)this;
}
public Criteria andHostBetween(String value1, String value2) {
this.addCriterion("HOST between", value1, value2, "host");
return (Criteria)this;
}
public Criteria andHostNotBetween(String value1, String value2) {
this.addCriterion("HOST not between", value1, value2, "host");
return (Criteria)this;
}
public Criteria andAppkeyIsNull() {
this.addCriterion("APPKEY is null");
return (Criteria)this;
}
public Criteria andAppkeyIsNotNull() {
this.addCriterion("APPKEY is not null");
return (Criteria)this;
}
public Criteria andAppkeyEqualTo(String value) {
this.addCriterion("APPKEY =", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyNotEqualTo(String value) {
this.addCriterion("APPKEY <>", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyGreaterThan(String value) {
this.addCriterion("APPKEY >", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyGreaterThanOrEqualTo(String value) {
this.addCriterion("APPKEY >=", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyLessThan(String value) {
this.addCriterion("APPKEY <", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyLessThanOrEqualTo(String value) {
this.addCriterion("APPKEY <=", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyLike(String value) {
this.addCriterion("APPKEY like", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyNotLike(String value) {
this.addCriterion("APPKEY not like", value, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyIn(List<String> values) {
this.addCriterion("APPKEY in", values, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyNotIn(List<String> values) {
this.addCriterion("APPKEY not in", values, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyBetween(String value1, String value2) {
this.addCriterion("APPKEY between", value1, value2, "appkey");
return (Criteria)this;
}
public Criteria andAppkeyNotBetween(String value1, String value2) {
this.addCriterion("APPKEY not between", value1, value2, "appkey");
return (Criteria)this;
}
public Criteria andAppsecretIsNull() {
this.addCriterion("APPSECRET is null");
return (Criteria)this;
}
public Criteria andAppsecretIsNotNull() {
this.addCriterion("APPSECRET is not null");
return (Criteria)this;
}
public Criteria andAppsecretEqualTo(String value) {
this.addCriterion("APPSECRET =", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretNotEqualTo(String value) {
this.addCriterion("APPSECRET <>", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretGreaterThan(String value) {
this.addCriterion("APPSECRET >", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretGreaterThanOrEqualTo(String value) {
this.addCriterion("APPSECRET >=", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretLessThan(String value) {
this.addCriterion("APPSECRET <", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretLessThanOrEqualTo(String value) {
this.addCriterion("APPSECRET <=", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretLike(String value) {
this.addCriterion("APPSECRET like", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretNotLike(String value) {
this.addCriterion("APPSECRET not like", value, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretIn(List<String> values) {
this.addCriterion("APPSECRET in", values, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretNotIn(List<String> values) {
this.addCriterion("APPSECRET not in", values, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretBetween(String value1, String value2) {
this.addCriterion("APPSECRET between", value1, value2, "appsecret");
return (Criteria)this;
}
public Criteria andAppsecretNotBetween(String value1, String value2) {
this.addCriterion("APPSECRET not between", value1, value2, "appsecret");
return (Criteria)this;
}
}
}

974
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationHikVideoExample.java

@ -0,0 +1,974 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.search;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysStationHikVideoExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria = new ArrayList();
public SysStationHikVideoExample() {
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return this.orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return this.distinct;
}
public List<Criteria> getOredCriteria() {
return this.oredCriteria;
}
public void or(Criteria criteria) {
this.oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = this.createCriteriaInternal();
this.oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = this.createCriteriaInternal();
if (this.oredCriteria.size() == 0) {
this.oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
this.oredCriteria.clear();
this.orderByClause = null;
this.distinct = false;
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return this.condition;
}
public Object getValue() {
return this.value;
}
public Object getSecondValue() {
return this.secondValue;
}
public boolean isNoValue() {
return this.noValue;
}
public boolean isSingleValue() {
return this.singleValue;
}
public boolean isBetweenValue() {
return this.betweenValue;
}
public boolean isListValue() {
return this.listValue;
}
public String getTypeHandler() {
return this.typeHandler;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, (String)null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String)null);
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria = new ArrayList();
protected GeneratedCriteria() {
}
public boolean isValid() {
return this.criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return this.criteria;
}
public List<Criterion> getCriteria() {
return this.criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
} else {
this.criteria.add(new Criterion(condition));
}
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
} else {
this.criteria.add(new Criterion(condition, value));
}
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 != null && value2 != null) {
this.criteria.add(new Criterion(condition, value1, value2));
} else {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
}
public Criteria andIdIsNull() {
this.addCriterion("ID is null");
return (Criteria)this;
}
public Criteria andIdIsNotNull() {
this.addCriterion("ID is not null");
return (Criteria)this;
}
public Criteria andIdEqualTo(Long value) {
this.addCriterion("ID =", value, "id");
return (Criteria)this;
}
public Criteria andIdNotEqualTo(Long value) {
this.addCriterion("ID <>", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThan(Long value) {
this.addCriterion("ID >", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
this.addCriterion("ID >=", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThan(Long value) {
this.addCriterion("ID <", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
this.addCriterion("ID <=", value, "id");
return (Criteria)this;
}
public Criteria andIdIn(List<Long> values) {
this.addCriterion("ID in", values, "id");
return (Criteria)this;
}
public Criteria andIdNotIn(List<Long> values) {
this.addCriterion("ID not in", values, "id");
return (Criteria)this;
}
public Criteria andIdBetween(Long value1, Long value2) {
this.addCriterion("ID between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
this.addCriterion("ID not between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andNameIsNull() {
this.addCriterion("NAME is null");
return (Criteria)this;
}
public Criteria andNameIsNotNull() {
this.addCriterion("NAME is not null");
return (Criteria)this;
}
public Criteria andNameEqualTo(String value) {
this.addCriterion("NAME =", value, "name");
return (Criteria)this;
}
public Criteria andNameNotEqualTo(String value) {
this.addCriterion("NAME <>", value, "name");
return (Criteria)this;
}
public Criteria andNameGreaterThan(String value) {
this.addCriterion("NAME >", value, "name");
return (Criteria)this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
this.addCriterion("NAME >=", value, "name");
return (Criteria)this;
}
public Criteria andNameLessThan(String value) {
this.addCriterion("NAME <", value, "name");
return (Criteria)this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
this.addCriterion("NAME <=", value, "name");
return (Criteria)this;
}
public Criteria andNameLike(String value) {
this.addCriterion("NAME like", value, "name");
return (Criteria)this;
}
public Criteria andNameNotLike(String value) {
this.addCriterion("NAME not like", value, "name");
return (Criteria)this;
}
public Criteria andNameIn(List<String> values) {
this.addCriterion("NAME in", values, "name");
return (Criteria)this;
}
public Criteria andNameNotIn(List<String> values) {
this.addCriterion("NAME not in", values, "name");
return (Criteria)this;
}
public Criteria andNameBetween(String value1, String value2) {
this.addCriterion("NAME between", value1, value2, "name");
return (Criteria)this;
}
public Criteria andNameNotBetween(String value1, String value2) {
this.addCriterion("NAME not between", value1, value2, "name");
return (Criteria)this;
}
public Criteria andAddressTypeIsNull() {
this.addCriterion("ADDRESS_TYPE is null");
return (Criteria)this;
}
public Criteria andAddressTypeIsNotNull() {
this.addCriterion("ADDRESS_TYPE is not null");
return (Criteria)this;
}
public Criteria andAddressTypeEqualTo(String value) {
this.addCriterion("ADDRESS_TYPE =", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeNotEqualTo(String value) {
this.addCriterion("ADDRESS_TYPE <>", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeGreaterThan(String value) {
this.addCriterion("ADDRESS_TYPE >", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeGreaterThanOrEqualTo(String value) {
this.addCriterion("ADDRESS_TYPE >=", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeLessThan(String value) {
this.addCriterion("ADDRESS_TYPE <", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeLessThanOrEqualTo(String value) {
this.addCriterion("ADDRESS_TYPE <=", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeLike(String value) {
this.addCriterion("ADDRESS_TYPE like", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeNotLike(String value) {
this.addCriterion("ADDRESS_TYPE not like", value, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeIn(List<String> values) {
this.addCriterion("ADDRESS_TYPE in", values, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeNotIn(List<String> values) {
this.addCriterion("ADDRESS_TYPE not in", values, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeBetween(String value1, String value2) {
this.addCriterion("ADDRESS_TYPE between", value1, value2, "addressType");
return (Criteria)this;
}
public Criteria andAddressTypeNotBetween(String value1, String value2) {
this.addCriterion("ADDRESS_TYPE not between", value1, value2, "addressType");
return (Criteria)this;
}
public Criteria andLivesourceaddressIsNull() {
this.addCriterion("LIVESOURCEADDRESS is null");
return (Criteria)this;
}
public Criteria andLivesourceaddressIsNotNull() {
this.addCriterion("LIVESOURCEADDRESS is not null");
return (Criteria)this;
}
public Criteria andLivesourceaddressEqualTo(String value) {
this.addCriterion("LIVESOURCEADDRESS =", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressNotEqualTo(String value) {
this.addCriterion("LIVESOURCEADDRESS <>", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressGreaterThan(String value) {
this.addCriterion("LIVESOURCEADDRESS >", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressGreaterThanOrEqualTo(String value) {
this.addCriterion("LIVESOURCEADDRESS >=", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressLessThan(String value) {
this.addCriterion("LIVESOURCEADDRESS <", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressLessThanOrEqualTo(String value) {
this.addCriterion("LIVESOURCEADDRESS <=", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressLike(String value) {
this.addCriterion("LIVESOURCEADDRESS like", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressNotLike(String value) {
this.addCriterion("LIVESOURCEADDRESS not like", value, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressIn(List<String> values) {
this.addCriterion("LIVESOURCEADDRESS in", values, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressNotIn(List<String> values) {
this.addCriterion("LIVESOURCEADDRESS not in", values, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressBetween(String value1, String value2) {
this.addCriterion("LIVESOURCEADDRESS between", value1, value2, "livesourceaddress");
return (Criteria)this;
}
public Criteria andLivesourceaddressNotBetween(String value1, String value2) {
this.addCriterion("LIVESOURCEADDRESS not between", value1, value2, "livesourceaddress");
return (Criteria)this;
}
public Criteria andAddressIsNull() {
this.addCriterion("ADDRESS is null");
return (Criteria)this;
}
public Criteria andAddressIsNotNull() {
this.addCriterion("ADDRESS is not null");
return (Criteria)this;
}
public Criteria andAddressEqualTo(String value) {
this.addCriterion("ADDRESS =", value, "address");
return (Criteria)this;
}
public Criteria andAddressNotEqualTo(String value) {
this.addCriterion("ADDRESS <>", value, "address");
return (Criteria)this;
}
public Criteria andAddressGreaterThan(String value) {
this.addCriterion("ADDRESS >", value, "address");
return (Criteria)this;
}
public Criteria andAddressGreaterThanOrEqualTo(String value) {
this.addCriterion("ADDRESS >=", value, "address");
return (Criteria)this;
}
public Criteria andAddressLessThan(String value) {
this.addCriterion("ADDRESS <", value, "address");
return (Criteria)this;
}
public Criteria andAddressLessThanOrEqualTo(String value) {
this.addCriterion("ADDRESS <=", value, "address");
return (Criteria)this;
}
public Criteria andAddressLike(String value) {
this.addCriterion("ADDRESS like", value, "address");
return (Criteria)this;
}
public Criteria andAddressNotLike(String value) {
this.addCriterion("ADDRESS not like", value, "address");
return (Criteria)this;
}
public Criteria andAddressIn(List<String> values) {
this.addCriterion("ADDRESS in", values, "address");
return (Criteria)this;
}
public Criteria andAddressNotIn(List<String> values) {
this.addCriterion("ADDRESS not in", values, "address");
return (Criteria)this;
}
public Criteria andAddressBetween(String value1, String value2) {
this.addCriterion("ADDRESS between", value1, value2, "address");
return (Criteria)this;
}
public Criteria andAddressNotBetween(String value1, String value2) {
this.addCriterion("ADDRESS not between", value1, value2, "address");
return (Criteria)this;
}
public Criteria andPointCodeIsNull() {
this.addCriterion("POINT_CODE is null");
return (Criteria)this;
}
public Criteria andPointCodeIsNotNull() {
this.addCriterion("POINT_CODE is not null");
return (Criteria)this;
}
public Criteria andPointCodeEqualTo(String value) {
this.addCriterion("POINT_CODE =", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeNotEqualTo(String value) {
this.addCriterion("POINT_CODE <>", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeGreaterThan(String value) {
this.addCriterion("POINT_CODE >", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeGreaterThanOrEqualTo(String value) {
this.addCriterion("POINT_CODE >=", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeLessThan(String value) {
this.addCriterion("POINT_CODE <", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeLessThanOrEqualTo(String value) {
this.addCriterion("POINT_CODE <=", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeLike(String value) {
this.addCriterion("POINT_CODE like", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeNotLike(String value) {
this.addCriterion("POINT_CODE not like", value, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeIn(List<String> values) {
this.addCriterion("POINT_CODE in", values, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeNotIn(List<String> values) {
this.addCriterion("POINT_CODE not in", values, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeBetween(String value1, String value2) {
this.addCriterion("POINT_CODE between", value1, value2, "pointCode");
return (Criteria)this;
}
public Criteria andPointCodeNotBetween(String value1, String value2) {
this.addCriterion("POINT_CODE not between", value1, value2, "pointCode");
return (Criteria)this;
}
public Criteria andLastRequesttimeIsNull() {
this.addCriterion("LAST_REQUESTTIME is null");
return (Criteria)this;
}
public Criteria andLastRequesttimeIsNotNull() {
this.addCriterion("LAST_REQUESTTIME is not null");
return (Criteria)this;
}
public Criteria andLastRequesttimeEqualTo(Date value) {
this.addCriterion("LAST_REQUESTTIME =", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeNotEqualTo(Date value) {
this.addCriterion("LAST_REQUESTTIME <>", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeGreaterThan(Date value) {
this.addCriterion("LAST_REQUESTTIME >", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeGreaterThanOrEqualTo(Date value) {
this.addCriterion("LAST_REQUESTTIME >=", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeLessThan(Date value) {
this.addCriterion("LAST_REQUESTTIME <", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeLessThanOrEqualTo(Date value) {
this.addCriterion("LAST_REQUESTTIME <=", value, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeIn(List<Date> values) {
this.addCriterion("LAST_REQUESTTIME in", values, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeNotIn(List<Date> values) {
this.addCriterion("LAST_REQUESTTIME not in", values, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeBetween(Date value1, Date value2) {
this.addCriterion("LAST_REQUESTTIME between", value1, value2, "lastRequesttime");
return (Criteria)this;
}
public Criteria andLastRequesttimeNotBetween(Date value1, Date value2) {
this.addCriterion("LAST_REQUESTTIME not between", value1, value2, "lastRequesttime");
return (Criteria)this;
}
public Criteria anddeptIdIsNull() {
this.addCriterion("DEPT_ID is null");
return (Criteria)this;
}
public Criteria anddeptIdIsNotNull() {
this.addCriterion("DEPT_ID is not null");
return (Criteria)this;
}
public Criteria anddeptIdEqualTo(String value) {
this.addCriterion("DEPT_ID =", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdNotEqualTo(String value) {
this.addCriterion("DEPT_ID <>", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdGreaterThan(String value) {
this.addCriterion("DEPT_ID >", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdGreaterThanOrEqualTo(String value) {
this.addCriterion("DEPT_ID >=", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdLessThan(String value) {
this.addCriterion("DEPT_ID <", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdLessThanOrEqualTo(String value) {
this.addCriterion("DEPT_ID <=", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdLike(String value) {
this.addCriterion("DEPT_ID like", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdNotLike(String value) {
this.addCriterion("DEPT_ID not like", value, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdIn(List<String> values) {
this.addCriterion("DEPT_ID in", values, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdNotIn(List<String> values) {
this.addCriterion("DEPT_ID not in", values, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdBetween(String value1, String value2) {
this.addCriterion("DEPT_ID between", value1, value2, "deptId");
return (Criteria)this;
}
public Criteria anddeptIdNotBetween(String value1, String value2) {
this.addCriterion("DEPT_ID not between", value1, value2, "deptId");
return (Criteria)this;
}
public Criteria andPointIdIsNull() {
this.addCriterion("POINT_ID is null");
return (Criteria)this;
}
public Criteria andPointIdIsNotNull() {
this.addCriterion("POINT_ID is not null");
return (Criteria)this;
}
public Criteria andPointIdEqualTo(Long value) {
this.addCriterion("POINT_ID =", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdNotEqualTo(Long value) {
this.addCriterion("POINT_ID <>", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdGreaterThan(Long value) {
this.addCriterion("POINT_ID >", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdGreaterThanOrEqualTo(Long value) {
this.addCriterion("POINT_ID >=", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdLessThan(Long value) {
this.addCriterion("POINT_ID <", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdLessThanOrEqualTo(Long value) {
this.addCriterion("POINT_ID <=", value, "pointId");
return (Criteria)this;
}
public Criteria andPointIdIn(List<Long> values) {
this.addCriterion("POINT_ID in", values, "pointId");
return (Criteria)this;
}
public Criteria andPointIdNotIn(List<Long> values) {
this.addCriterion("POINT_ID not in", values, "pointId");
return (Criteria)this;
}
public Criteria andPointIdBetween(Long value1, Long value2) {
this.addCriterion("POINT_ID between", value1, value2, "pointId");
return (Criteria)this;
}
public Criteria andPointIdNotBetween(Long value1, Long value2) {
this.addCriterion("POINT_ID not between", value1, value2, "pointId");
return (Criteria)this;
}
public Criteria andInUseIsNull() {
this.addCriterion("IN_USE is null");
return (Criteria)this;
}
public Criteria andInUseIsNotNull() {
this.addCriterion("IN_USE is not null");
return (Criteria)this;
}
public Criteria andInUseEqualTo(Byte value) {
this.addCriterion("IN_USE =", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseNotEqualTo(Byte value) {
this.addCriterion("IN_USE <>", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseGreaterThan(Byte value) {
this.addCriterion("IN_USE >", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseGreaterThanOrEqualTo(Byte value) {
this.addCriterion("IN_USE >=", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseLessThan(Byte value) {
this.addCriterion("IN_USE <", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseLessThanOrEqualTo(Byte value) {
this.addCriterion("IN_USE <=", value, "inUse");
return (Criteria)this;
}
public Criteria andInUseIn(List<Byte> values) {
this.addCriterion("IN_USE in", values, "inUse");
return (Criteria)this;
}
public Criteria andInUseNotIn(List<Byte> values) {
this.addCriterion("IN_USE not in", values, "inUse");
return (Criteria)this;
}
public Criteria andInUseBetween(Byte value1, Byte value2) {
this.addCriterion("IN_USE between", value1, value2, "inUse");
return (Criteria)this;
}
public Criteria andInUseNotBetween(Byte value1, Byte value2) {
this.addCriterion("IN_USE not between", value1, value2, "inUse");
return (Criteria)this;
}
public Criteria andIsControlIsNull() {
this.addCriterion("IS_CONTROL is null");
return (Criteria)this;
}
public Criteria andIsControlIsNotNull() {
this.addCriterion("IS_CONTROL is not null");
return (Criteria)this;
}
public Criteria andIsControlEqualTo(Byte value) {
this.addCriterion("IS_CONTROL =", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlNotEqualTo(Byte value) {
this.addCriterion("IS_CONTROL <>", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlGreaterThan(Byte value) {
this.addCriterion("IS_CONTROL >", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlGreaterThanOrEqualTo(Byte value) {
this.addCriterion("IS_CONTROL >=", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlLessThan(Byte value) {
this.addCriterion("IS_CONTROL <", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlLessThanOrEqualTo(Byte value) {
this.addCriterion("IS_CONTROL <=", value, "isControl");
return (Criteria)this;
}
public Criteria andIsControlIn(List<Byte> values) {
this.addCriterion("IS_CONTROL in", values, "isControl");
return (Criteria)this;
}
public Criteria andIsControlNotIn(List<Byte> values) {
this.addCriterion("IS_CONTROL not in", values, "isControl");
return (Criteria)this;
}
public Criteria andIsControlBetween(Byte value1, Byte value2) {
this.addCriterion("IS_CONTROL between", value1, value2, "isControl");
return (Criteria)this;
}
public Criteria andIsControlNotBetween(Byte value1, Byte value2) {
this.addCriterion("IS_CONTROL not between", value1, value2, "isControl");
return (Criteria)this;
}
public Criteria andIsHikvideoIsNull() {
this.addCriterion("IS_HIKVIDEO is null");
return (Criteria)this;
}
public Criteria andIsHikvideoIsNotNull() {
this.addCriterion("IS_HIKVIDEO is not null");
return (Criteria)this;
}
public Criteria andIsHikvideoEqualTo(Byte value) {
this.addCriterion("IS_HIKVIDEO =", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoNotEqualTo(Byte value) {
this.addCriterion("IS_HIKVIDEO <>", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoGreaterThan(Byte value) {
this.addCriterion("IS_HIKVIDEO >", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoGreaterThanOrEqualTo(Byte value) {
this.addCriterion("IS_HIKVIDEO >=", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoLessThan(Byte value) {
this.addCriterion("IS_HIKVIDEO <", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoLessThanOrEqualTo(Byte value) {
this.addCriterion("IS_HIKVIDEO <=", value, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoIn(List<Byte> values) {
this.addCriterion("IS_HIKVIDEO in", values, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoNotIn(List<Byte> values) {
this.addCriterion("IS_HIKVIDEO not in", values, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoBetween(Byte value1, Byte value2) {
this.addCriterion("IS_HIKVIDEO between", value1, value2, "isHikvideo");
return (Criteria)this;
}
public Criteria andIsHikvideoNotBetween(Byte value1, Byte value2) {
this.addCriterion("IS_HIKVIDEO not between", value1, value2, "isHikvideo");
return (Criteria)this;
}
}
}

41
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationVideoSetEx.java

@ -0,0 +1,41 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.search;
import com.hnac.hzims.videoimage.entity.SysStationVideoSet;
public class SysStationVideoSetEx {
private SysStationVideoSet sysStationVideoSet;
private String iscAdress;
private String videoName;
public SysStationVideoSetEx() {
}
public SysStationVideoSet getSysStationVideoSet() {
return this.sysStationVideoSet;
}
public void setSysStationVideoSet(SysStationVideoSet sysStationVideoSet) {
this.sysStationVideoSet = sysStationVideoSet;
}
public String getIscAdress() {
return this.iscAdress;
}
public void setIscAdress(String iscAdress) {
this.iscAdress = iscAdress;
}
public String getVideoName() {
return this.videoName;
}
public void setVideoName(String videoName) {
this.videoName = videoName;
}
}

513
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/SysStationVideoSetExample.java

@ -0,0 +1,513 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.search;
import java.util.ArrayList;
import java.util.List;
public class SysStationVideoSetExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria = new ArrayList();
public SysStationVideoSetExample() {
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return this.orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return this.distinct;
}
public List<Criteria> getOredCriteria() {
return this.oredCriteria;
}
public void or(Criteria criteria) {
this.oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = this.createCriteriaInternal();
this.oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = this.createCriteriaInternal();
if (this.oredCriteria.size() == 0) {
this.oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
this.oredCriteria.clear();
this.orderByClause = null;
this.distinct = false;
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return this.condition;
}
public Object getValue() {
return this.value;
}
public Object getSecondValue() {
return this.secondValue;
}
public boolean isNoValue() {
return this.noValue;
}
public boolean isSingleValue() {
return this.singleValue;
}
public boolean isBetweenValue() {
return this.betweenValue;
}
public boolean isListValue() {
return this.listValue;
}
public String getTypeHandler() {
return this.typeHandler;
}
protected Criterion(String condition) {
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, (String)null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, (String)null);
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
}
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria = new ArrayList();
protected GeneratedCriteria() {
}
public boolean isValid() {
return this.criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return this.criteria;
}
public List<Criterion> getCriteria() {
return this.criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
} else {
this.criteria.add(new Criterion(condition));
}
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
} else {
this.criteria.add(new Criterion(condition, value));
}
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 != null && value2 != null) {
this.criteria.add(new Criterion(condition, value1, value2));
} else {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
}
public Criteria andIdIsNull() {
this.addCriterion("ID is null");
return (Criteria)this;
}
public Criteria andIdIsNotNull() {
this.addCriterion("ID is not null");
return (Criteria)this;
}
public Criteria andIdEqualTo(Integer value) {
this.addCriterion("ID =", value, "id");
return (Criteria)this;
}
public Criteria andIdNotEqualTo(Integer value) {
this.addCriterion("ID <>", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThan(Integer value) {
this.addCriterion("ID >", value, "id");
return (Criteria)this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
this.addCriterion("ID >=", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThan(Integer value) {
this.addCriterion("ID <", value, "id");
return (Criteria)this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
this.addCriterion("ID <=", value, "id");
return (Criteria)this;
}
public Criteria andIdIn(List<Integer> values) {
this.addCriterion("ID in", values, "id");
return (Criteria)this;
}
public Criteria andIdNotIn(List<Integer> values) {
this.addCriterion("ID not in", values, "id");
return (Criteria)this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
this.addCriterion("ID between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
this.addCriterion("ID not between", value1, value2, "id");
return (Criteria)this;
}
public Criteria andTenantIdIsNull() {
this.addCriterion("TENANT_ID is null");
return (Criteria)this;
}
public Criteria andTenantIdIsNotNull() {
this.addCriterion("TENANT_ID is not null");
return (Criteria)this;
}
public Criteria andTenantIdEqualTo(String value) {
this.addCriterion("TENANT_ID =", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdNotEqualTo(String value) {
this.addCriterion("TENANT_ID <>", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdGreaterThan(String value) {
this.addCriterion("TENANT_ID >", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdGreaterThanOrEqualTo(String value) {
this.addCriterion("TENANT_ID >=", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdLessThan(String value) {
this.addCriterion("TENANT_ID <", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdLessThanOrEqualTo(String value) {
this.addCriterion("TENANT_ID <=", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdLike(String value) {
this.addCriterion("TENANT_ID like", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdNotLike(String value) {
this.addCriterion("TENANT_ID not like", value, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdIn(List<String> values) {
this.addCriterion("TENANT_ID in", values, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdNotIn(List<String> values) {
this.addCriterion("TENANT_ID not in", values, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdBetween(String value1, String value2) {
this.addCriterion("TENANT_ID between", value1, value2, "tenantId");
return (Criteria)this;
}
public Criteria andTenantIdNotBetween(String value1, String value2) {
this.addCriterion("TENANT_ID not between", value1, value2, "tenantId");
return (Criteria)this;
}
public Criteria andVideoIdIsNull() {
this.addCriterion("VIDEO_ID is null");
return (Criteria)this;
}
public Criteria andVideoIdIsNotNull() {
this.addCriterion("VIDEO_ID is not null");
return (Criteria)this;
}
public Criteria andVideoIdEqualTo(Integer value) {
this.addCriterion("VIDEO_ID =", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdNotEqualTo(Integer value) {
this.addCriterion("VIDEO_ID <>", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdGreaterThan(Integer value) {
this.addCriterion("VIDEO_ID >", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdGreaterThanOrEqualTo(Integer value) {
this.addCriterion("VIDEO_ID >=", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdLessThan(Integer value) {
this.addCriterion("VIDEO_ID <", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdLessThanOrEqualTo(Integer value) {
this.addCriterion("VIDEO_ID <=", value, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdIn(List<Integer> values) {
this.addCriterion("VIDEO_ID in", values, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdNotIn(List<Integer> values) {
this.addCriterion("VIDEO_ID not in", values, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdBetween(Integer value1, Integer value2) {
this.addCriterion("VIDEO_ID between", value1, value2, "videoId");
return (Criteria)this;
}
public Criteria andVideoIdNotBetween(Integer value1, Integer value2) {
this.addCriterion("VIDEO_ID not between", value1, value2, "videoId");
return (Criteria)this;
}
public Criteria andVideoValueIsNull() {
this.addCriterion("VIDEO_VALUE is null");
return (Criteria)this;
}
public Criteria andVideoValueIsNotNull() {
this.addCriterion("VIDEO_VALUE is not null");
return (Criteria)this;
}
public Criteria andVideoValueEqualTo(String value) {
this.addCriterion("VIDEO_VALUE =", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueNotEqualTo(String value) {
this.addCriterion("VIDEO_VALUE <>", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueGreaterThan(String value) {
this.addCriterion("VIDEO_VALUE >", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueGreaterThanOrEqualTo(String value) {
this.addCriterion("VIDEO_VALUE >=", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueLessThan(String value) {
this.addCriterion("VIDEO_VALUE <", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueLessThanOrEqualTo(String value) {
this.addCriterion("VIDEO_VALUE <=", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueLike(String value) {
this.addCriterion("VIDEO_VALUE like", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueNotLike(String value) {
this.addCriterion("VIDEO_VALUE not like", value, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueIn(List<String> values) {
this.addCriterion("VIDEO_VALUE in", values, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueNotIn(List<String> values) {
this.addCriterion("VIDEO_VALUE not in", values, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueBetween(String value1, String value2) {
this.addCriterion("VIDEO_VALUE between", value1, value2, "videoValue");
return (Criteria)this;
}
public Criteria andVideoValueNotBetween(String value1, String value2) {
this.addCriterion("VIDEO_VALUE not between", value1, value2, "videoValue");
return (Criteria)this;
}
public Criteria andIsrIdIsNull() {
this.addCriterion("ISR_ID is null");
return (Criteria)this;
}
public Criteria andIsrIdIsNotNull() {
this.addCriterion("ISR_ID is not null");
return (Criteria)this;
}
public Criteria andIsrIdEqualTo(Integer value) {
this.addCriterion("ISR_ID =", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdNotEqualTo(Integer value) {
this.addCriterion("ISR_ID <>", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdGreaterThan(Integer value) {
this.addCriterion("ISR_ID >", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdGreaterThanOrEqualTo(Integer value) {
this.addCriterion("ISR_ID >=", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdLessThan(Integer value) {
this.addCriterion("ISR_ID <", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdLessThanOrEqualTo(Integer value) {
this.addCriterion("ISR_ID <=", value, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdIn(List<Integer> values) {
this.addCriterion("ISR_ID in", values, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdNotIn(List<Integer> values) {
this.addCriterion("ISR_ID not in", values, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdBetween(Integer value1, Integer value2) {
this.addCriterion("ISR_ID between", value1, value2, "isrId");
return (Criteria)this;
}
public Criteria andIsrIdNotBetween(Integer value1, Integer value2) {
this.addCriterion("ISR_ID not between", value1, value2, "isrId");
return (Criteria)this;
}
}
}

62
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/search/VideoSearchCondition.java

@ -0,0 +1,62 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.search;
import com.hnac.hzims.videoimage.enums.VideoType;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class VideoSearchCondition {
private final VideoType videoType;
private final String deptId;
private final long pointId;
private final Integer inUse;
private final String content;
private final List<Long> videoIdList = new ArrayList();
public VideoSearchCondition(VideoType videoType, String deptId, long pointId, Integer inUse, String content) {
this.videoType = (VideoType)Objects.requireNonNull(videoType);
this.deptId = deptId;
this.pointId = pointId;
this.inUse = inUse;
this.content = content;
}
public VideoType getVideoType() {
return this.videoType;
}
public String getDeptId() {
return this.deptId;
}
public long getPointId() {
return this.pointId;
}
public Integer getInUse() {
return this.inUse;
}
public String getContent() {
return this.content;
}
public List<Long> getVideoIdList() {
return this.videoIdList;
}
public void addAll(List<Long> videoIdList) {
if (Objects.nonNull(videoIdList)) {
this.videoIdList.addAll(videoIdList);
}
}
}

37
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IHikVideoService.java

@ -0,0 +1,37 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationHikVideo;
import java.util.List;
public interface IHikVideoService extends VideoBaseService {
SysStationHikVideo insert(SysStationHikVideo var1);
SysStationHikVideo update(SysStationHikVideo var1);
SysStationHikVideo getById(String var1, Long var2, int var3);
List<SysStationHikVideo> getByIdEx(String var1, String var2, String var3);
List getAllList(String var1);
boolean isHls(String var1);
boolean upDataLastTime(long var1);
IPage<SysStationHikVideo> getPageList(String var1, String var2, IPage var3);
List getAllHlsList(String var1);
String controlCamera(String var1, int var2, String var3, int var4);
// boolean setHistoryConfiguration(String var1, String var2, String var3);
// String getHistoryConfiguration(String var1, String var2);
}

32
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IHikVideoSetService.java

@ -0,0 +1,32 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationHikSecret;
import com.hnac.hzims.videoimage.entity.SysStationVideoSet;
import java.util.List;
import java.util.Map;
public interface IHikVideoSetService {
SysStationVideoSet insert(SysStationVideoSet var1);
SysStationVideoSet update(SysStationVideoSet var1);
Map getPageList(String var1, IPage var2);
SysStationVideoSet getById(Integer var1);
boolean deleteById(Integer var1);
String getByTenantId(String var1);
List<SysStationHikSecret> getAllIscConfig(String var1);
Map getDictConfig();
}

31
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/IMonitorPointService.java

@ -0,0 +1,31 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.MonitorPoint;
import com.hnac.hzims.videoimage.entity.PointTreeNode;
import com.hnac.hzims.videoimage.entity.Video;
import com.hnac.hzims.videoimage.search.VideoSearchCondition;
import com.hnac.hzims.videoimage.utils.Tree;
import java.util.List;
import java.util.Optional;
public interface IMonitorPointService {
IPage<Video> searchList(VideoSearchCondition var1, IPage<Video> var2);
MonitorPoint insert(MonitorPoint var1);
Optional<MonitorPoint> update(MonitorPoint var1);
Optional<MonitorPoint> getById(String var1, long var2);
boolean delete(List<PointTreeNode> var1);
List<Tree<PointTreeNode>> getPointRootNode(String var1);
}

24
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImageConfigService.java

@ -0,0 +1,24 @@
package com.hnac.hzims.videoimage.service;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import java.util.List;
public interface ImageConfigService {
public int addImageConfig(ImageConfig imageConfig);
public int deleteImageConfig(Long id);
public int updateImageConfig(ImageConfig imageConfig);
public ImageConfig selectImageConfig(Long id);
//查询配置集成
public List<ImageConfig> selectByExample(ImageConfigExample example);
//一次添加多条数据
public int addImageConfigs(List<ImageConfig> imageConfigs);
}

32
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImageInfoService.java

@ -0,0 +1,32 @@
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.ImageInfo;
import com.hnac.hzims.videoimage.vo.ImageInfoVo;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
public interface ImageInfoService {
String addImage(MultipartFile file);
// 根据设备编码集合查询对应设备的最新图片信息集合
public List<ImageInfo> selectNewestImageByDevId(String[] stcds);
//根据设备编码和时间范围,查询某个设备一段时间的图片集合
public List<ImageInfo> selectImagesByDevIdAndTime(String stcd,
String startTime, String endTime);
IPage<ImageInfoVo> pageQueryImagesByDevIdAndTime(String stcd, String startTime, String endTime,
IPage<ImageInfo> page);
public int addImageInfo(ImageInfo imageInfo);
IPage<ImageInfoVo> pageQueryManualImagesByDevIdAndTime(String stcd,
String startTime, String endTime, IPage<ImageInfo> page);
public int deleteImageInfo(long id);
}

33
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/ImagePointService.java

@ -0,0 +1,33 @@
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.ImagePoint;
import com.hnac.hzims.videoimage.vo.ImagePointVo;
import java.util.List;
public interface ImagePointService {
public int addImagePoint(ImagePoint imagePoint);
public int deleteImagePoint(Long id);
public int updateImagePoint(ImagePoint imagePoint);
public ImagePoint selectImagePoint(String stcd);
public List<ImagePoint> selectByExample(LambdaQueryWrapper<ImagePoint> exp);
public List<ImagePoint> selelctAllImagePoint();
IPage<ImagePointVo> pageQueryImagePonit(List<String> stationIds, String stcd, String stnm,
IPage<ImagePoint> page);
public IPage<ImagePointVo> pageQueryImagePonitOrderBy(List<String> stationIds,
String stcd,
String stnm,
IPage page,
String orderByField);
}

22
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/VideoBaseService.java

@ -0,0 +1,22 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.PointLeafNode;
import com.hnac.hzims.videoimage.entity.Video;
import java.util.List;
public interface VideoBaseService {
void clearBindingRelation(List<Long> var1);
List<PointLeafNode> getVideoList(List<Long> var1);
boolean deleteById(long var1);
IPage<? extends Video> searchList(List<Long> var1, Integer var2, String var3, IPage var4);
}

239
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/HikVideoServiceImpl.java

@ -0,0 +1,239 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.*;
import com.hnac.hzims.videoimage.enums.VideoType;
import com.hnac.hzims.videoimage.mapper.SysStationHikSecretMapper;
import com.hnac.hzims.videoimage.mapper.SysStationHikVideoMapper;
import com.hnac.hzims.videoimage.mapper.SysStationVideoSetMapper;
import com.hnac.hzims.videoimage.search.SysStationHikSecretExample;
import com.hnac.hzims.videoimage.search.SysStationVideoSetExample;
import com.hnac.hzims.videoimage.service.IHikVideoService;
import com.hnac.hzims.videoimage.utils.ArtemisPostUtils;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
@Service
public class HikVideoServiceImpl extends BaseServiceImpl<SysStationHikVideoMapper,SysStationHikVideo> implements IHikVideoService {
@Resource
SysStationHikVideoMapper sysStationHikVideoMapper;
@Resource
SysStationHikSecretMapper sysStationHikSecretMapper;
// @Resource
// SysStationHikRecordMapper sysStationHikRecordMapper;
@Resource
SysStationVideoSetMapper sysStationVideoSetMapper;
@Override
public SysStationHikVideo insert(SysStationHikVideo hikVideo) {
Objects.requireNonNull(hikVideo);
if (hikVideo.getId() == null) {
hikVideo.setPointId(-1L);
hikVideo.setInUse(1);
this.sysStationHikVideoMapper.insert(hikVideo);
} else {
this.sysStationHikVideoMapper.updateById(hikVideo);
}
return hikVideo;
}
@Override
public SysStationHikVideo update(SysStationHikVideo hikVideo) {
Objects.requireNonNull(hikVideo);
this.sysStationHikVideoMapper.updateById(hikVideo);
return hikVideo;
}
@Override
public List<SysStationHikVideo> getByIdEx(String tenantId, String sid, String streamTypes) {
String[] ids = sid.split(",");
String[] streamType = streamTypes.split(",");
List<SysStationHikVideo> list = new ArrayList();
for(int i = 0; i < ids.length; ++i) {
SysStationHikVideo sysStationHikvideo = this.sysStationHikVideoMapper.selectById(Long.valueOf(ids[i]));
new Date();
if (sysStationHikvideo.getIsHikvideo() != null && sysStationHikvideo.getIsHikvideo() == 1) {
String host = "";
String appKey = "";
String appSecret = "";
SysStationHikSecret sysStationHiksecret = this.getSecret(tenantId);
host = sysStationHiksecret.getHost();
appKey = sysStationHiksecret.getAppkey();
appSecret = sysStationHiksecret.getAppsecret();
try {
sysStationHikvideo.setLivesourceaddress(ArtemisPostUtils.getCameraPreviewURL(host, appKey, appSecret, sysStationHikvideo.getPointCode(), sysStationHikvideo.getAddressType(), Integer.valueOf(streamType[i])));
} catch (Exception var15) {
sysStationHikvideo.setLivesourceaddress((String)null);
}
sysStationHikvideo.setLastRequesttime(new Date());
this.sysStationHikVideoMapper.updateById(sysStationHikvideo);
}
list.add(sysStationHikvideo);
}
return list;
}
@Override
public SysStationHikVideo getById(String tenantId, Long id, int streamType) {
SysStationHikVideo sysStationHikvideo = this.sysStationHikVideoMapper.selectById(id);
if (sysStationHikvideo.getIsHikvideo() != null && sysStationHikvideo.getIsHikvideo() == 1) {
String host = "";
String appKey = "";
String appSecret = "";
SysStationHikSecret sysStationHiksecret = this.getSecret(tenantId);
host = sysStationHiksecret.getHost();
appKey = sysStationHiksecret.getAppkey();
appSecret = sysStationHiksecret.getAppsecret();
try {
sysStationHikvideo.setLivesourceaddress(ArtemisPostUtils.getCameraPreviewURL(host, appKey, appSecret,
sysStationHikvideo.getPointCode(), sysStationHikvideo.getAddressType(), streamType));
} catch (Exception var11) {
sysStationHikvideo.setLivesourceaddress(null);
}
sysStationHikvideo.setLastRequesttime(new Date());
this.sysStationHikVideoMapper.updateById(sysStationHikvideo);
}
return sysStationHikvideo;
}
@Override
public List getAllList(String deptId) {
LambdaQueryWrapper<SysStationHikVideo> wrapper=new LambdaQueryWrapper();
wrapper.like(SysStationHikVideo::getCreateDept,deptId);
List<SysStationHikVideo> sysStationHikvideos = this.sysStationHikVideoMapper.selectList(wrapper);
return sysStationHikvideos;
}
@Override
public boolean isHls(String stationId) {
List<SysStationHikVideo> sysStationHikvideos = this.getAllHlsList(stationId);
return sysStationHikvideos != null && sysStationHikvideos.size() > 0;
}
@Override
public boolean upDataLastTime(long id) {
return this.sysStationHikVideoMapper.upDataLastTime(id, new Date()) > 0;
}
@Override
public IPage<SysStationHikVideo> getPageList(String deptId, String name, IPage pageParam) {
LambdaQueryWrapper<SysStationHikVideo> wrapper=new LambdaQueryWrapper();
wrapper.like(SysStationHikVideo::getCreateDept,deptId);
if(StringUtils.isNotBlank(name)) {
wrapper.like(SysStationHikVideo::getName, name);
}
IPage<SysStationHikVideo> records = this.sysStationHikVideoMapper.selectPage(pageParam,wrapper);
return records;
}
@Override
public List getAllHlsList(String deptId) {
LambdaQueryWrapper<SysStationHikVideo> wrapper=new LambdaQueryWrapper();
wrapper.like(SysStationHikVideo::getCreateDept,deptId);
wrapper.eq(SysStationHikVideo::getIsHikvideo,1);
List<SysStationHikVideo> sysStationHikvideos = this.sysStationHikVideoMapper.selectList(wrapper);
return sysStationHikvideos;
}
@Override
public String controlCamera(String cameraIndexCode, int action, String command, int time) {
String host = "";
String appKey = "";
String appSecret = "";
SysStationHikSecretExample sysStationHiksecretExample = new SysStationHikSecretExample();
sysStationHiksecretExample.createCriteria();
try {
SysStationHikSecret sysStationHiksecret = (SysStationHikSecret)this.sysStationHikSecretMapper.selectByExample(sysStationHiksecretExample).get(0);
host = sysStationHiksecret.getHost();
appKey = sysStationHiksecret.getAppkey();
appSecret = sysStationHiksecret.getAppsecret();
} catch (Exception var10) {
host = "42.192.39.246:443";
appKey = "21111042";
appSecret = "QXRevZ2AQeXtmlYZT6Rf";
}
return ArtemisPostUtils.controlCameraByCameraIndexCode(host, appKey, appSecret, cameraIndexCode, action, command, time);
}
@Override
public void clearBindingRelation(List<Long> videoList) {
this.sysStationHikVideoMapper.clearBindingRelation(videoList);
}
@Override
public List<PointLeafNode> getVideoList(List<Long> pointIdList) {
List<PointLeafNode> list = this.sysStationHikVideoMapper.getVideoList(pointIdList);
Iterator var3 = list.iterator();
while(var3.hasNext()) {
PointLeafNode node = (PointLeafNode)var3.next();
node.setType(VideoType.HIK_VIDEO);
}
return list;
}
@Override
public boolean deleteById(long id) {
return this.sysStationHikVideoMapper.deleteById(id) > 0;
}
@Override
public IPage<SysStationHikVideo> searchList(List<Long> videoIdList, Integer inUse, String name, IPage pageParam) {
LambdaQueryWrapper<SysStationHikVideo> wrapper=new LambdaQueryWrapper();
wrapper.in(SysStationHikVideo::getId,videoIdList);
wrapper.eq(SysStationHikVideo::getInUse,inUse);
wrapper.like(SysStationHikVideo::getName,name);
return this.sysStationHikVideoMapper.selectPage(pageParam,wrapper);
}
// @Override
// public boolean setHistoryConfiguration(String deptId, String userAccount, String configuration) {
// SysStationHikRecordExample example = new SysStationHikRecordExample();
// example.createCriteria().anddeptIdLike(deptId+"%").andUseridEqualTo(userAccount);
// this.sysStationHikRecordMapper.deleteByExample(example);
// SysStationHikRecord record = new SysStationHikRecord();
// record.setDeptId(deptId);
// record.setUserid(userAccount);
// record.setRecord(configuration);
// this.sysStationHikRecordMapper.insert(record);
// return true;
// }
// @Override
// public String getHistoryConfiguration(String deptId, String userAccount) {
// SysStationHikRecordExample example = new SysStationHikRecordExample();
// example.createCriteria().anddeptIdLike(deptId+"%").andUseridEqualTo(userAccount);
// List<SysStationHikRecord> list = this.sysStationHikRecordMapper.selectByExample(example);
// return list.size() > 0 ? ((SysStationHikRecord)list.get(0)).getRecord() : null;
// }
public SysStationHikSecret getSecret(String tenantId) {
SysStationVideoSetExample sysStationVideoSetExample = new SysStationVideoSetExample();
sysStationVideoSetExample.createCriteria().andTenantIdEqualTo(tenantId);
List<SysStationVideoSet> list = this.sysStationVideoSetMapper.selectByExample(sysStationVideoSetExample);
return list != null && list.size() != 0 ? this.sysStationHikSecretMapper.selectByPrimaryKey(((SysStationVideoSet)list.get(0)).getIsrId()) : this.sysStationHikSecretMapper.selectByPrimaryKey(0);
}
}

128
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/HikVideoSetServiceImpl.java

@ -0,0 +1,128 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.videoimage.entity.SysStationHikSecret;
import com.hnac.hzims.videoimage.entity.SysStationVideoSet;
import com.hnac.hzims.videoimage.enums.VideoEnum;
import com.hnac.hzims.videoimage.mapper.SysStationHikSecretMapper;
import com.hnac.hzims.videoimage.mapper.SysStationVideoSetMapper;
import com.hnac.hzims.videoimage.search.SysStationHikSecretExample;
import com.hnac.hzims.videoimage.search.SysStationVideoSetEx;
import com.hnac.hzims.videoimage.search.SysStationVideoSetExample;
import com.hnac.hzims.videoimage.service.IHikVideoSetService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
@Service
public class HikVideoSetServiceImpl implements IHikVideoSetService {
@Resource
SysStationVideoSetMapper sysStationVideoSetMapper;
@Resource
SysStationHikSecretMapper sysStationHikSecretMapper;
@Override
public SysStationVideoSet insert(SysStationVideoSet sysStationVideoSet) {
SysStationVideoSetExample sysStationVideoSetExample = new SysStationVideoSetExample();
sysStationVideoSetExample.createCriteria().andTenantIdEqualTo(sysStationVideoSet.getTenantId());
List<SysStationVideoSet> list = this.sysStationVideoSetMapper.selectByExample(sysStationVideoSetExample);
if (list != null && list.size() != 0) {
throw new RuntimeException("站点视频配置重复!");
} else {
this.sysStationVideoSetMapper.insert(sysStationVideoSet);
return sysStationVideoSet;
}
}
@Override
public SysStationVideoSet update(SysStationVideoSet sysStationVideoSet) {
this.sysStationVideoSetMapper.updateByPrimaryKey(sysStationVideoSet);
return sysStationVideoSet;
}
@Override
public Map getPageList(String tenantId, IPage page) {
Map<String, Object> resp = new HashMap();
List<SysStationVideoSetEx> list=new ArrayList<>();
IPage<SysStationVideoSet> records = this.sysStationVideoSetMapper.getPageList(tenantId, page);
Iterator var6 = records.getRecords().iterator();
while(var6.hasNext()) {
SysStationVideoSet sysStationVideoSet = (SysStationVideoSet)var6.next();
SysStationVideoSetEx sysStationVideoSetEx = new SysStationVideoSetEx();
sysStationVideoSetEx.setSysStationVideoSet(sysStationVideoSet);
Integer iscId = sysStationVideoSet.getIsrId();
if (iscId != null) {
sysStationVideoSetEx.setIscAdress(this.sysStationHikSecretMapper.selectByPrimaryKey(iscId).getHost());
}
sysStationVideoSetEx.setVideoName(sysStationVideoSet.getVideoValue().equals(VideoEnum.EZVIZ.getCode()) ? VideoEnum.EZVIZ.getDesc() : VideoEnum.ISC.getDesc());
list.add(sysStationVideoSetEx);
}
if (records != null) {
resp.put("records", list);
resp.put("current", page.getCurrent());
resp.put("pages", records.getPages());
resp.put("size", page.getSize());
resp.put("total", records.getPages());
}
return resp;
}
@Override
public SysStationVideoSet getById(Integer id) {
return this.sysStationVideoSetMapper.selectByPrimaryKey(id);
}
@Override
public boolean deleteById(Integer id) {
this.sysStationVideoSetMapper.deleteByPrimaryKey(id);
return true;
}
@Override
public String getByTenantId(String tenantId) {
SysStationVideoSetExample sysStationVideoSetExample = new SysStationVideoSetExample();
sysStationVideoSetExample.createCriteria().andTenantIdEqualTo(tenantId);
List<SysStationVideoSet> list = this.sysStationVideoSetMapper.selectByExample(sysStationVideoSetExample);
if (list != null && !list.isEmpty()) {
SysStationVideoSet sysStationVideoSet = (SysStationVideoSet)list.get(0);
return sysStationVideoSet.getVideoValue() != null && sysStationVideoSet.getVideoValue() != "" ? sysStationVideoSet.getVideoValue() : "ezviz";
} else {
return "ezviz";
}
}
@Override
public List<SysStationHikSecret> getAllIscConfig(String tenantId) {
SysStationHikSecretExample sysStationHiksecretExample = new SysStationHikSecretExample();
SysStationVideoSetExample sysStationVideoSetExample = new SysStationVideoSetExample();
sysStationVideoSetExample.createCriteria().andTenantIdEqualTo(tenantId);
List<SysStationVideoSet> list = this.sysStationVideoSetMapper.selectByExample(sysStationVideoSetExample);
if (list != null && !list.isEmpty()) {
SysStationVideoSet set=list.get(0);
sysStationHiksecretExample.createCriteria().andIdEqualTo(set.getIsrId());
}
return this.sysStationHikSecretMapper.selectByExample(sysStationHiksecretExample);
}
@Override
public Map getDictConfig() {
Map resp = new HashMap();
resp.put(VideoEnum.ISC.getDesc(), VideoEnum.ISC.getCode());
resp.put(VideoEnum.EZVIZ.getDesc(), VideoEnum.EZVIZ.getCode());
return resp;
}
}

119
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImageConfigServiceImpl.java

@ -0,0 +1,119 @@
package com.hnac.hzims.videoimage.service.impl;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import com.hnac.hzims.videoimage.mapper.ImageConfigMapper;
import com.hnac.hzims.videoimage.service.ImageConfigService;
import com.hnac.hzims.videoimage.util.Constants;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class ImageConfigServiceImpl implements ImageConfigService {
private static Logger logger = LoggerFactory.getLogger(ImageConfigServiceImpl.class);
@Resource
ImageConfigMapper imageConfigMapper;
@Override
public int addImageConfig(ImageConfig imageConfig) {
// 判断同一个设备stcd的是否有同名称属性
if (null != imageConfig) {
String stcd = imageConfig.getStcd();
String name = imageConfig.getName();
if (!StringUtils.isBlank(stcd) && !StringUtils.isBlank(name)) {
ImageConfigExample example = new ImageConfigExample();
ImageConfigExample.Criteria criteria = example.createCriteria();
criteria.andStcdEqualTo(stcd);
criteria.andNameEqualTo(name);
List<ImageConfig> imageConfigs = imageConfigMapper.selectByExample(example);
if (null != imageConfigs && imageConfigs.size() > 0) {
logger.error("======addImageConfig ERROR_CODE_DUPLICATE_DEVICE_ATTRIBUTE");
return Constants.ERROR_CODE_DUPLICATE_DEVICE_ATTRIBUTE;
} else {
return imageConfigMapper.insertSelective(imageConfig);
}
}else {
logger.error("======addImageConfig ERROR_CODE_LACK_NECESSARY_DATA");
return Constants.ERROR_CODE_LACK_NECESSARY_DATA;
}
} else {
logger.error("======addImageConfig ERROR_CODE_EMPTY_OBJ");
return Constants.ERROR_CODE_EMPTY_OBJ;
}
}
@Override
public int deleteImageConfig(Long id) {
return imageConfigMapper.deleteByPrimaryKey(id);
}
@Override
public int updateImageConfig(ImageConfig imageConfig) {
// 判断同一个设备stcd的是否有同名称属性
if (null != imageConfig) {
Long id = imageConfig.getId();
String stcd = imageConfig.getStcd();
String name = imageConfig.getName();
if (null == id) {
return Constants.ERROR_CODE_UPDATE_DEVICE_NOT_EXIST;
}else {
ImageConfig ic = imageConfigMapper.selectByPrimaryKey(id);
if (null == ic) {
return Constants.ERROR_CODE_UPDATE_DEVICE_NOT_EXIST;
}
}
//如果根据stcd 和 name 查询到的记录id 和传入id相等,可更新,否则不可更新,属性重复错误
if (!StringUtils.isBlank(stcd) && !StringUtils.isBlank(name)) {
ImageConfigExample example = new ImageConfigExample();
ImageConfigExample.Criteria criteria = example.createCriteria();
criteria.andStcdEqualTo(stcd);
criteria.andNameEqualTo(name);
List<ImageConfig> imageConfigs = imageConfigMapper.selectByExample(example);
for(ImageConfig iConfig : imageConfigs) {
Long existId = iConfig.getId();
if (!existId.equals(id)) {
return Constants.ERROR_CODE_DUPLICATE_DEVICE_ATTRIBUTE;
}
}
// 经过检查,放心更新
return imageConfigMapper.updateByPrimaryKeySelective(imageConfig);
}else {
//也许根据id 来更新某个unit 字段,这个不应该阻止,前端最好保证所有数据字段都传过来。
return imageConfigMapper.updateByPrimaryKeySelective(imageConfig);
}
} else {
logger.error("updateImageConfig ERROR_CODE_EMPTY_OBJ");
return Constants.ERROR_CODE_EMPTY_OBJ;
}
}
@Override
public ImageConfig selectImageConfig(Long id) {
return imageConfigMapper.selectByPrimaryKey(id);
}
@Override
public List<ImageConfig> selectByExample(ImageConfigExample example) {
return imageConfigMapper.selectByExample(example);
}
@Override
public int addImageConfigs(List<ImageConfig> imageConfigs) {
return imageConfigMapper.insertImageConfigs(imageConfigs);
}
}

280
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImageInfoServiceImpl.java

@ -0,0 +1,280 @@
package com.hnac.hzims.videoimage.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyzeDataConditionPO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO;
import com.hnac.hzinfo.sdk.analyse.AnalyseDataSearchClient;
import com.hnac.hzinfo.sdk.core.response.Result;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.tool.utils.BeanUtil;
import com.hnac.hzims.videoimage.entity.ImageConfig;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import com.hnac.hzims.videoimage.entity.ImageInfo;
import com.hnac.hzims.videoimage.entity.ImagePoint;
import com.hnac.hzims.videoimage.mapper.ImageInfoMapper;
import com.hnac.hzims.videoimage.service.ImageConfigService;
import com.hnac.hzims.videoimage.service.ImageInfoService;
import com.hnac.hzims.videoimage.service.ImagePointService;
import com.hnac.hzims.videoimage.util.Constants;
import com.hnac.hzims.videoimage.vo.ImageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
@Service
public class ImageInfoServiceImpl implements ImageInfoService {
@Autowired
private ImageInfoMapper imageInfoMapper;
@Value("${file.upload.path}")
private String fileUploadPath;
@Override
public String addImage(MultipartFile file) {
String dirName = UUIDNoSeparation();
File uploadPath = new File(fileUploadPath, "imageInfo");
uploadPath = new File(uploadPath, dirName);
try {
if(!uploadPath.exists()){
uploadPath.mkdirs();
}
saveFile(file, uploadPath);
return File.separator+"imageInfo"+File.separator+dirName+File.separator+file.getOriginalFilename();
}catch (IOException e){
return "";
}
}
/**
* 保存文件,如果后期有要求需要处理重名情况
*
* @param file 待保存的文件
* @param uploadPath 上传的路径
* @throws IOException
*/
private void saveFile(MultipartFile file, File uploadPath) throws IOException {
String originalName = file.getOriginalFilename();
File path = new File(uploadPath, originalName);
if(!path.exists()){
path.createNewFile();
}
FileUtils.copyInputStreamToFile(file.getInputStream(), path);
}
/**
* 生成uuid不带横杠的
*
* @return
*/
private String UUIDNoSeparation() {
return UUID.randomUUID().toString().replace("-", "");
}
@Override
public List<ImageInfo> selectNewestImageByDevId(String[] stcds) {
// 根据设备ID集合查询
return imageInfoMapper.selectNewestImageByDevId(stcds);
}
@Override
public List<ImageInfo> selectImagesByDevIdAndTime(String stcd, String startTime, String endTime) {
return imageInfoMapper.selectImagesByDevIdAndTime(stcd, startTime, endTime);
}
@Override
public int addImageInfo(ImageInfo imageInfo) {
//判断是否有时间重复的
if (null != imageInfo){
Date time = imageInfo.getTime();
if (null == time){
return Constants.ERROR_CODE_NO_TIME;
}
String stcd = imageInfo.getStcd();
String timeStr = time.toString();
List<ImageInfo> imageInfos = imageInfoMapper.selectImageInfoByStcdAndTime(stcd, timeStr);
for(ImageInfo image: imageInfos){
String manualPath = image.getManualpath();
//如果存在同时刻已经手动上传的图片,返回报错
if (!StringUtils.isBlank(manualPath)){
return Constants.ERROR_CODE_DUPLICATE_MANUAL_TIME;
}
}
return imageInfoMapper.insertManualImageInfo(imageInfo);
}else {
return Constants.ERROR_CODE_EMPTY_OBJ;
}
}
@Override
public int deleteImageInfo(long id) {
return imageInfoMapper.deleteByPrimaryKey(id);
}
@Autowired
ImagePointService imagePointService;
@Autowired
ImageConfigService imageConfigService;
@Override
public IPage<ImageInfoVo> pageQueryManualImagesByDevIdAndTime(String stcd, String startTime, String endTime,
IPage<ImageInfo> page) {
//
// IPage<ImageInfo> respList = imageInfoMapper.pageQueryManualImagesByDevIdAndTime(stcd, startTime, endTime, page);
return getImageInfoVo(stcd, startTime, endTime, page,true);
}
@Override
public IPage<ImageInfoVo> pageQueryImagesByDevIdAndTime(String stcd, String startTime, String endTime,
IPage<ImageInfo> page) {
// IPage<ImageInfo> respList = imageInfoMapper.pageQueryImagesByDevIdAndTime(stcd, startTime, endTime, page);
return getImageInfoVo(stcd, startTime, endTime, page,false);
}
private IPage<ImageInfoVo> getImageInfoVo(String stcd, String startTime, String endTime,
IPage<ImageInfo> page,boolean manual){
IPage<ImageInfo> respList=null;
if(manual){
respList = imageInfoMapper.pageQueryManualImagesByDevIdAndTime(stcd, startTime, endTime, page);
}else{
respList = imageInfoMapper.pageQueryImagesByDevIdAndTime(stcd, startTime, endTime, page);
}
if(respList!=null && respList.getRecords()!=null && !respList.getRecords().isEmpty()) {
//查询站点
ImagePoint imagePoint=imagePointService.selectImagePoint(stcd);
//查询属性
ImageConfigExample example=new ImageConfigExample();
example.createCriteria().andStcdEqualTo(stcd);
List<ImageConfig> imageConfigs =imageConfigService.selectByExample(example);
boolean flag=imagePoint.getOpen()!=null && imagePoint.getOpen() == 1;
IPage<ImageInfoVo> resultPage=new Page<>(respList.getCurrent(),respList.getSize());
resultPage.setPages(respList.getPages());
resultPage.setTotal(respList.getTotal());
List<ImageInfoVo> list=new ArrayList<>();
for (ImageInfo imageInfo : respList.getRecords()) {
ImageInfoVo vo= BeanUtil.copy(imageInfo,ImageInfoVo.class);
if(flag){//开启历史查询
List<ImageConfig> datas=getImageHistory(imageConfigs,imageInfo.getTime());
vo.setList(datas);
}
list.add(vo);
}
resultPage.setRecords(list);
return resultPage;
}
return null;
}
@Autowired
AnalyseDataSearchClient analyseDataSearchClient;
private List<ImageConfig> getImageHistory(List<ImageConfig> imageConfigs,Date time){
for(ImageConfig imageConfig:imageConfigs){
if (Constants.REAL_DATA_TYPE.equals(imageConfig.getType())) {
String deviceCode=imageConfig.getDeviceCode();
String col=imageConfig.getCode();
Map<String,Date> dates=getDate(time);
String val=getData(deviceCode,dates.get("start"),dates.get("end"),col);
if(val!=null) {
imageConfig.setValue(val);
}else {
imageConfig.setValue("-");
}
}
}
return imageConfigs;
}
private static Map<String,Date> getDate(Date time){
SimpleDateFormat hSdf=new SimpleDateFormat("yyyy-MM-dd HH");
Map<String,Date> dateMap=new HashMap<>();
Calendar cal=Calendar.getInstance();
cal.setTime(time);
cal.add(Calendar.HOUR, 1);
Date endDate=cal.getTime();
String st=hSdf.format(time);
String et=hSdf.format(endDate);
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date start= null;
Date end= null;
try {
start = sdf.parse(st+":00:00");
end = sdf.parse(et+":00:00");
} catch (ParseException e) {
throw new RuntimeException(e);
}
dateMap.put("start",start);
dateMap.put("end",end);
return dateMap;
}
// public static void main(String[] args) {
// System.out.println(getDate(new Date()));
// }
private String getData(String deviceCode,Date begin,Date endSt,String col){
AnalyseCodeByAnalyseDataPO po=new AnalyseCodeByAnalyseDataPO();
po.setDeviceCode(deviceCode);
LocalDateTime start = LocalDateTime.ofInstant(begin.toInstant(), ZoneId.systemDefault());
LocalDateTime end = LocalDateTime.ofInstant(endSt.toInstant(), ZoneId.systemDefault());
List<AnalyzeDataConditionPO> signboardConditions=new ArrayList<>();
AnalyzeDataConditionPO conditionPO=new AnalyzeDataConditionPO();
conditionPO.setBeginTime(start);
conditionPO.setEndTime(end);
conditionPO.setSignages(col);
conditionPO.setKeepFigures(3);//保留三位小数
conditionPO.setAccessRules(0);//最早值
conditionPO.setSaveTimeType(2);//时
conditionPO.setTimeInterval(1);//间隔1时
conditionPO.setFull(1);
signboardConditions.add(conditionPO);
po.setSignboardConditions(signboardConditions);
Result<List<AnalyzeDataConditionVO>> result=analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po);
if(result!=null && result.isSuccess()){
List<AnalyzeDataConditionVO> list=result.getData();
if(list!=null && !list.isEmpty()) {
List<AnalyseDataTaosVO> dataTaosVOS = list.get(0).getList();
if(dataTaosVOS!=null && !dataTaosVOS.isEmpty()) {
return dataTaosVOS.get(0).getVal();
}
}
}
return null;
}
}

169
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/ImagePointServiceImpl.java

@ -0,0 +1,169 @@
package com.hnac.hzims.videoimage.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.mp.base.BaseServiceImpl;
import com.hnac.hzims.videoimage.entity.ImageConfigExample;
import com.hnac.hzims.videoimage.entity.ImagePoint;
import com.hnac.hzims.videoimage.mapper.ImageConfigMapper;
import com.hnac.hzims.videoimage.mapper.ImagePointMapper;
import com.hnac.hzims.videoimage.service.ImagePointService;
import com.hnac.hzims.videoimage.util.Constants;
import com.hnac.hzims.videoimage.vo.ImagePointVo;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@Service
public class ImagePointServiceImpl extends BaseServiceImpl<ImagePointMapper,ImagePoint> implements ImagePointService {
private static Logger logger = LoggerFactory.getLogger(ImagePointServiceImpl.class);
@Resource
ImagePointMapper imagePointMapper;
@Resource
ImageConfigMapper imageConfigMapper;
@Override
public int addImagePoint(ImagePoint imagePoint) {
// 检测是否有编码和名字重复
if(null != imagePoint) {
LambdaQueryWrapper<ImagePoint> wrapper=new LambdaQueryWrapper();
wrapper.eq(ImagePoint::getStnm,imagePoint.getStnm());
wrapper.eq(ImagePoint::getIsDeleted,0);
List<ImagePoint> imagePoints = imagePointMapper.selectList(wrapper);
if(imagePoints!=null && !imagePoints.isEmpty()){
return Constants.ERROR_CODE_DUPLICATE_STNM;
}
wrapper=new LambdaQueryWrapper();
wrapper.eq(ImagePoint::getStcd,imagePoint.getStcd());
wrapper.eq(ImagePoint::getIsDeleted,0);
imagePoints = imagePointMapper.selectList(wrapper);
if(imagePoints!=null && !imagePoints.isEmpty()){
return Constants.ERROR_CODE_DUPLICATE_STCB;
}
//创建新增时将设置创建时间
if (null != imagePoint.getStcd()) {
Date createTime = new Date();
imagePoint.setCreateTime(createTime);
int result = imagePointMapper.insert(imagePoint);
return result;
} else {
logger.error("======addImagePoint device id is null");
return Constants.ERROR_CODE_EMPTY_OBJ;
}
} else {
logger.error("======addImagePoint ERROR_CODE_EMPTY_OBJ");
return Constants.ERROR_CODE_EMPTY_OBJ;
}
}
@Override
public int deleteImagePoint(Long id) {
// 删除point时需要将其关联的配置删除
if (id!=null) {
int result = imagePointMapper.deleteById(id);
//删除配置表
ImageConfigExample example = new ImageConfigExample();
ImageConfigExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id);
int deleteConfig = imageConfigMapper.deleteByExample(example);
logger.debug("deleteImagePoint stcd delete config result is "+ deleteConfig);
return result;
}else {
logger.error("======deleteImagePoint not found stcd=" + id);
return Constants.ERROR_CODE_DELETE_ITEM_NOT_FOUND;
}
}
@Override
public int updateImagePoint(ImagePoint imagePoint) {
// 检测是否名字重复
if(null != imagePoint) {
String deviceName = imagePoint.getStnm();
String stcd = imagePoint.getStcd();
// 如果传入的stcd在数据库中不存在,提示更新错误
LambdaQueryWrapper<ImagePoint> exp=new LambdaQueryWrapper();
exp.eq(ImagePoint::getStcd,stcd);
exp.eq(ImagePoint::getIsDeleted,0);
exp.ne(ImagePoint::getId,imagePoint.getId());
List<ImagePoint> exitPoints = imagePointMapper.selectList(exp);
if (null != exitPoints && !exitPoints.isEmpty()) {
return Constants.ERROR_CODE_DUPLICATE_STCB;
}
// 如果传入的stcd存在,对比传入名字是否与其他记录名字相同
LambdaQueryWrapper<ImagePoint> wrapper=new LambdaQueryWrapper();
wrapper.eq(ImagePoint::getStnm,deviceName);
wrapper.eq(ImagePoint::getIsDeleted,0);
wrapper.ne(ImagePoint::getId,imagePoint.getId());
List<ImagePoint> imagePoints = imagePointMapper.selectList(wrapper);
if (null != imagePoints && !imagePoints.isEmpty()) {
logger.error("======updateImagePoint ERROR_CODE_DUPLICATE_STNM");
return Constants.ERROR_CODE_DUPLICATE_STNM;
}
int result = imagePointMapper.updateById(imagePoint);
return result;
} else {
logger.error("======updateImagePoint ERROR_CODE_EMPTY_OBJ");
return Constants.ERROR_CODE_EMPTY_OBJ;
}
}
@Override
public ImagePoint selectImagePoint(String stcd) {
// 查询过滤逻辑删除的数据
LambdaQueryWrapper<ImagePoint> exp=new LambdaQueryWrapper();
exp.eq(ImagePoint::getStcd,stcd);
List<ImagePoint> imagePoints = imagePointMapper.selectList(exp);
if ((null != imagePoints) && (imagePoints.size() > 0)) {
//如果找到多个,则返回第一个,有前面的添加去重保证,这里不应该出现多个
return imagePoints.get(0);
} else {
return null;
}
}
@Override
public List<ImagePoint> selelctAllImagePoint() {
LambdaQueryWrapper<ImagePoint> exp=new LambdaQueryWrapper();
List<ImagePoint> imagePoints = imagePointMapper.selectList(exp);
return imagePoints;
}
@Override
public List<ImagePoint> selectByExample(LambdaQueryWrapper<ImagePoint> exp) {
return imagePointMapper.selectList(exp);
}
@Override
public IPage<ImagePointVo> pageQueryImagePonit(List<String> stationIds, String stcd, String stnm,
IPage<ImagePoint> page) {
IPage<ImagePointVo> respList = imagePointMapper.pageQueryImagePoint(stationIds,stcd, stnm, page);
return respList;
}
@Override
public IPage<ImagePointVo> pageQueryImagePonitOrderBy(List<String> stationIds, String stcd, String stnm, IPage pageParam, String orderByField) {
IPage<ImagePointVo> respList = imagePointMapper.pageQueryImagePointOrderBy(stationIds,stcd,stnm,pageParam,orderByField);
return respList;
}
}

219
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/service/impl/MonitorPointServiceImpl.java

@ -0,0 +1,219 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.videoimage.entity.MonitorPoint;
import com.hnac.hzims.videoimage.entity.PointLeafNode;
import com.hnac.hzims.videoimage.entity.PointTreeNode;
import com.hnac.hzims.videoimage.entity.Video;
import com.hnac.hzims.videoimage.enums.VideoType;
import com.hnac.hzims.videoimage.mapper.MonitorPointMapper;
import com.hnac.hzims.videoimage.search.VideoSearchCondition;
import com.hnac.hzims.videoimage.service.IMonitorPointService;
import com.hnac.hzims.videoimage.service.VideoBaseService;
import com.hnac.hzims.videoimage.utils.Tree;
import com.hnac.hzims.videoimage.utils.TreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
import java.util.Map.Entry;
import java.util.stream.Collectors;
@Service
public class MonitorPointServiceImpl implements IMonitorPointService {
@Resource
MonitorPointMapper pointMapper;
@Autowired
ApplicationContext context;
@Override
public IPage<Video> searchList(VideoSearchCondition condition, IPage<Video> page) {
Objects.requireNonNull(condition);
List<Long> videoIdList = condition.getVideoIdList();
return videoIdList.isEmpty() ? page : this.searchFromDB(videoIdList, condition, page);
}
private IPage<Video> searchFromDB(List<Long> videoIdList, VideoSearchCondition condition, IPage<Video> pageParam) {
VideoBaseService service = this.getVideoService(condition.getVideoType());
return this.convert(service.searchList(videoIdList, condition.getInUse(), condition.getContent(), pageParam));
}
private IPage<Video> convert(IPage<? extends Video> pageList) {
IPage<Video> result = new Page<>(pageList.getCurrent(),pageList.getSize());
if(pageList!=null && pageList.getTotal()>0) {
List<Video> list=(List<Video>)pageList.getRecords();
result.setRecords(list);
}
return result;
}
private VideoBaseService getVideoService(VideoType videoType) {
assert Objects.nonNull(videoType);
return (VideoBaseService)this.context.getBean(videoType.getServiceClass());
}
@Override
public MonitorPoint insert(MonitorPoint point) {
Objects.requireNonNull(point);
this.pointMapper.insert(point);
return point;
}
@Override
public Optional<MonitorPoint> update(MonitorPoint point) {
return Objects.nonNull(point.getId()) && Objects.nonNull(point.getDeptId()) && this.pointMapper.update(point) > 0 ? Optional.of(point) : Optional.empty();
}
@Override
@Transactional
public boolean delete(List<PointTreeNode> waitDelete) {
this.deleteNodes(waitDelete);
this.clearBindingVideo(waitDelete);
return true;
}
private void deleteNodes(List<PointTreeNode> nodes) {
Set<Long> idList = (Set)nodes.stream().filter(Objects::nonNull).map(TreeNode::getId).collect(Collectors.toSet());
this.pointMapper.delete(idList);
}
private void clearBindingVideo(List<PointTreeNode> nodes) {
Map<VideoType, List<Long>> videoIdMap = (new PointTreeNode(nodes)).map();
Iterator var3 = videoIdMap.entrySet().iterator();
while(var3.hasNext()) {
Entry<VideoType, List<Long>> entry = (Entry)var3.next();
VideoType videoType = (VideoType)entry.getKey();
VideoBaseService service = this.getVideoService(videoType);
service.clearBindingRelation((List)videoIdMap.get(videoType));
}
}
@Override
public Optional<MonitorPoint> getById(String stationId, long id) {
return Objects.isNull(stationId) ? Optional.empty() : Optional.ofNullable(this.pointMapper.getById(stationId, id));
}
@Override
public List<Tree<PointTreeNode>> getPointRootNode(String stationId) {
List<MonitorPoint> pointList = this.pointMapper.selectPointList(stationId);
return this.constructTrees(pointList, this.getAllLeaves(pointList));
}
private List<PointLeafNode> getAllLeaves(List<MonitorPoint> pointList) {
List<PointLeafNode> result = new ArrayList();
List<Long> idList = this.pointIdList(pointList);
VideoType[] var4 = VideoType.values();
int var5 = var4.length;
for(int var6 = 0; var6 < var5; ++var6) {
VideoType type = var4[var6];
VideoBaseService service = this.getVideoService(type);
List<PointLeafNode> videoList = service.getVideoList(idList);
Iterator var10 = videoList.iterator();
while(var10.hasNext()) {
PointLeafNode node = (PointLeafNode)var10.next();
node.setType(type);
result.add(node);
}
}
return result;
}
private List<Long> pointIdList(List<MonitorPoint> pointList) {
return (List)pointList.stream().map((point) -> {
return point.getId();
}).collect(Collectors.toList());
}
private List<Tree<PointTreeNode>> constructTrees(List<MonitorPoint> pointList, List<PointLeafNode> leaves) {
return (new TreeHelper(pointList, leaves)).constructTrees();
}
private static class TreeHelper {
private final List<MonitorPoint> pointList;
private final List<PointLeafNode> leaves;
private final Map<Long, List<PointTreeNode>> parentIdMap = new HashMap();
private final Map<Long, List<PointLeafNode>> leafMap = new HashMap();
private final Map<Long, PointTreeNode> idMap = new HashMap();
public TreeHelper(List<MonitorPoint> pointList, List<PointLeafNode> leaves) {
Objects.requireNonNull(pointList);
Objects.requireNonNull(leaves);
this.pointList = pointList;
this.leaves = leaves;
this.init();
}
private void init() {
this.initLeafMap();
Iterator var1 = this.pointList.iterator();
while(var1.hasNext()) {
MonitorPoint point = (MonitorPoint)var1.next();
PointTreeNode node = TreeNode.from(point);
this.putParentMap(point.getParentId(), node);
this.putIdMap(node);
}
}
public List<Tree<PointTreeNode>> constructTrees() {
List<Tree<PointTreeNode>> trees = new ArrayList();
Iterator var2 = this.pointList.iterator();
while(var2.hasNext()) {
MonitorPoint point = (MonitorPoint)var2.next();
PointTreeNode node = (PointTreeNode)this.idMap.get(point.getId());
node.setChildren((List)this.parentIdMap.get(point.getId()));
node.setLeaves((List)this.leafMap.get(point.getId()));
if (this.noFather(point)) {
trees.add(new Tree(node));
}
}
return trees;
}
private boolean noFather(MonitorPoint point) {
return Objects.isNull(point.getParentId()) || point.getId().equals(point.getParentId()) || Objects.isNull(this.idMap.get(point.getParentId()));
}
private void initLeafMap() {
Iterator var1 = this.leaves.iterator();
while(var1.hasNext()) {
PointLeafNode leaf = (PointLeafNode)var1.next();
Long pointId = leaf.getPointId();
this.leafMap.putIfAbsent(pointId, new ArrayList());
((List)this.leafMap.get(pointId)).add(leaf);
}
}
private void putParentMap(Long parentId, PointTreeNode node) {
if (!node.getId().equals(parentId)) {
this.parentIdMap.putIfAbsent(parentId, new ArrayList());
((List)this.parentIdMap.get(parentId)).add(node);
}
}
private void putIdMap(PointTreeNode node) {
this.idMap.put(node.getId(), node);
}
}
}

95
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/ArtemisPostUtils.java

@ -0,0 +1,95 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import com.alibaba.fastjson.JSONObject;
import com.hikvision.artemis.sdk.ArtemisHttpUtil;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import java.util.HashMap;
import java.util.Map;
public class ArtemisPostUtils {
static int FINAL_TIME = 1;
public ArtemisPostUtils() {
}
public static String getCameraPreviewURL(String host, String appKey, String appSecret, String cameraIndexCode, String addressType, int streamType) {
ArtemisConfig.host = host;
ArtemisConfig.appKey = appKey;
ArtemisConfig.appSecret = appSecret;
String ARTEMIS_PATH = "/artemis";
String getCamsApi = "/artemis/api/video/v1/cameras/previewURLs";
Map<String, String> path = new HashMap<String, String>(2) {
{
this.put("https://", "/artemis/api/video/v1/cameras/previewURLs");
}
};
String contentType = "application/json";
JSONObject jsonBody = new JSONObject();
jsonBody.put("cameraIndexCode", cameraIndexCode);
jsonBody.put("streamType", streamType);
jsonBody.put("protocol", addressType);
String body = jsonBody.toJSONString();
String result = ArtemisHttpUtil.doPostStringArtemis(path, body, (Map)null, (String)null, contentType, (Map)null);
if (null == result && "".equals(result)) {
return null;
} else {
JSONObject json = JSONObject.parseObject(result);
json = JSONObject.parseObject(json.getString("data"));
String url = json.getString("url");
return url;
}
}
public static String controlCameraByCameraIndexCode(String host, String appKey, String appSecret, String cameraIndexCode, int action, String command, final int time) {
ArtemisConfig.host = host;
ArtemisConfig.appKey = appKey;
ArtemisConfig.appSecret = appSecret;
String ARTEMIS_PATH = "/artemis";
String getCamsApi = "/artemis/api/video/v1/ptzs/controlling";
final Map<String, String> path = new HashMap<String, String>(2) {
{
this.put("https://", "/artemis/api/video/v1/ptzs/controlling");
}
};
final String contentType = "application/json";
final JSONObject jsonBody = new JSONObject();
jsonBody.put("cameraIndexCode", cameraIndexCode);
jsonBody.put("action", action);
jsonBody.put("command", command);
String body = jsonBody.toJSONString();
String result = ArtemisHttpUtil.doPostStringArtemis(path, body, (Map)null, (String)null, contentType, (Map)null);
if (null == result && "".equals(result)) {
return null;
} else {
JSONObject json = JSONObject.parseObject(result);
if (time != -1 && json.getString("msg").equals("success")) {
Runnable myRunnable = new Runnable() {
@Override
public void run() {
try {
Thread.sleep((long)(time * 1000));
jsonBody.put("action", 1);
String body = jsonBody.toJSONString();
ArtemisHttpUtil.doPostStringArtemis(path, body, (Map)null, (String)null, contentType, (Map)null);
} catch (InterruptedException var3) {
System.out.println("Runnable is error");
}
System.out.println("Runnable running");
}
};
Thread thread = new Thread(myRunnable);
thread.start();
return "success";
} else {
return json.getString("msg");
}
}
}
}

12
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Childable.java

@ -0,0 +1,12 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import java.util.List;
public interface Childable<T extends Childable<T>> {
List<T> getChildren();
}

8
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Constants.java

@ -0,0 +1,8 @@
package com.hnac.hzims.videoimage.utils;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class Constants {
public static Map<String, String> LAST_DATE_MAP=new ConcurrentHashMap<>();
}

5
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Markable.java

@ -0,0 +1,5 @@
package com.hnac.hzims.videoimage.utils;
public interface Markable {
Long getUniqueMark();
}

66
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/PointTreeCache.java

@ -0,0 +1,66 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import com.hnac.hzims.videoimage.entity.PointTreeNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.*;
public class PointTreeCache {
private static final Logger logger = LoggerFactory.getLogger(PointTreeCache.class);
private static final ConcurrentHashMap<String, Future<List<Tree<PointTreeNode>>>> cacheTree = new ConcurrentHashMap();
public PointTreeCache() {
}
public static List<Tree<PointTreeNode>> getFromCache(String stationId) {
Future<List<Tree<PointTreeNode>>> future = (Future)cacheTree.get(stationId);
if (Objects.nonNull(future)) {
try {
return (List)future.get();
} catch (ExecutionException | InterruptedException var3) {
var3.printStackTrace();
logger.error(var3.getMessage());
}
}
return null;
}
public static void putToCache(String stationId, List<Tree<PointTreeNode>> trees) {
cacheTree.put(stationId, future(() -> {
return trees;
}));
}
public static void computeIfAbsent(String stationId, Callable<List<Tree<PointTreeNode>>> task) {
if (Objects.isNull(cacheTree.get(stationId))) {
FutureTask<List<Tree<PointTreeNode>>> future = future(task);
if (Objects.isNull(cacheTree.putIfAbsent(stationId, future))) {
future.run();
}
}
}
public static List<Tree<PointTreeNode>> addAndGet(String stationId, Callable<List<Tree<PointTreeNode>>> task) {
clearCache(stationId);
computeIfAbsent(stationId, task);
return getFromCache(stationId);
}
public static void clearCache(String stationId) {
cacheTree.remove(stationId);
}
private static FutureTask<List<Tree<PointTreeNode>>> future(Callable<List<Tree<PointTreeNode>>> task) {
return new FutureTask(task);
}
}

39
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/SessionUtil.java

@ -0,0 +1,39 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import org.springblade.core.secure.utils.AuthUtil;
import java.util.Optional;
public class SessionUtil {
// private static final String ATTR_STATION = "stationId";
private SessionUtil() {
}
// public static Optional<String> getStationId(HttpSession session) {
// String deptId=AuthUtil.getDeptId();
// return Optional.ofNullable(session.getAttribute("stationId")).map(String::valueOf);
// }
public static Optional<String> getDeptId() {
String deptId=AuthUtil.getDeptId();
return Optional.ofNullable(deptId).map(String::valueOf);
}
// public static String getExistStationId(HttpSession session) {
// return (String)getStationId(session).orElseThrow(() -> {
// return new IllegalStateException("session中不存在站点信息");
// });
// }
public static String getExistDeptId() {
return (String)getDeptId().orElseThrow(() -> {
return new IllegalStateException("不存在此机构");
});
}
}

51
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Stack.java

@ -0,0 +1,51 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
public class Stack<E> implements Iterable<E> {
private LinkedList<E> elements;
public Stack() {
this.elements = new LinkedList();
}
public Stack(List<E> elements) {
Objects.requireNonNull(elements);
this.elements = new LinkedList(elements);
}
public E poll() {
return this.elements.poll();
}
public void push(E e) {
this.elements.push(e);
}
public void pushAll(List<? extends E> list) {
Objects.requireNonNull(list);
Iterator var2 = list.iterator();
while(var2.hasNext()) {
E e = (E)var2.next();
this.push(e);
}
}
public boolean isEmpty() {
return this.elements.isEmpty();
}
public Iterator<E> iterator() {
return this.elements.iterator();
}
}

85
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/Tree.java

@ -0,0 +1,85 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
public class Tree<T extends Childable<T> & Markable> {
private final T root;
public Tree(T root) {
Objects.requireNonNull(root);
this.root = root;
}
public Optional<T> findNode(long key) {
AtomicReference<T> result = new AtomicReference((Object)null);
this.preorderTravel(this.root, (e) -> {
if (key == ((Markable)e).getUniqueMark()) {
result.set(e);
}
});
return Optional.ofNullable(result.get());
}
public List<T> subTreeNodeList(long key) {
List<T> nodeList = new ArrayList();
this.findNode(key).ifPresent((root) -> {
this.preorderTravel(root, (e) -> {
nodeList.add(e);
});
});
return nodeList;
}
public List<Long> subTreeMarkKeyList(long key) {
final List<T> nodes = this.subTreeNodeList(key);
return new AbstractList<Long>() {
public Long get(int index) {
return (Long)Optional.ofNullable(nodes.get(index)).map(Markable::getUniqueMark).orElse(null);
}
public int size() {
return nodes.size();
}
};
}
public void addNode(T node) {
}
public T getRoot() {
return this.root;
}
private boolean legalNode(T node) {
return Objects.nonNull(node) && Objects.nonNull(((Markable)node).getUniqueMark());
}
private boolean haveChildren(T node) {
return Objects.nonNull(node.getChildren()) && !node.getChildren().isEmpty();
}
private void preorderTravel(T root, Consumer<T> func) {
Queue<T> queue = new LinkedList();
queue.add(root);
while(!queue.isEmpty()) {
T e = (T)queue.poll();
if (this.legalNode(e)) {
func.accept(e);
}
if (this.haveChildren(e)) {
queue.addAll(e.getChildren());
}
}
}
}

43
hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/utils/TreeNode.java

@ -0,0 +1,43 @@
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.hnac.hzims.videoimage.utils;
import com.hnac.hzims.videoimage.entity.MonitorPoint;
import com.hnac.hzims.videoimage.entity.PointTreeNode;
public abstract class TreeNode {
private Long id;
private String name;
public TreeNode() {
}
public static PointTreeNode from(MonitorPoint point) {
PointTreeNode node = new PointTreeNode();
node.setId(point.getId());
node.setName(point.getName());
return node;
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public abstract boolean isLeaf();
}

30
hzims-service/video-image/src/main/resources/application-dev.yml

@ -0,0 +1,30 @@
#服务器端口
server:
port: 8200
#数据源配置
#spring:
# datasource:
# url: ${blade.datasource.dev.url}
# username: ${blade.datasource.dev.username}
# password: ${blade.datasource.dev.password}
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/equipment?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: 123456
slave:
url: jdbc:mysql://127.0.0.1:3306/equipment?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: 123456
demo:
name: aaa

28
hzims-service/video-image/src/main/resources/application-prod.yml

@ -0,0 +1,28 @@
#服务器端口
server:
port: 8200
#数据源配置
#spring:
# datasource:
# url: ${blade.datasource.prod.url}
# username: ${blade.datasource.prod.username}
# password: ${blade.datasource.prod.password}
spring:
#排除DruidDataSourceAutoConfigure
autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
datasource:
dynamic:
#设置默认的数据源或者数据源组,默认值即为master
primary: master
datasource:
master:
url: ${blade.datasource.demo.master.url}
username: ${blade.datasource.demo.master.username}
password: ${blade.datasource.demo.master.password}
slave:
url: ${blade.datasource.demo.slave.url}
username: ${blade.datasource.demo.slave.username}
password: ${blade.datasource.demo.slave.password}

13
hzims-service/video-image/src/main/resources/application.yml

@ -0,0 +1,13 @@
#mybatis-plus配置
mybatis-plus:
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.hnac.hzims.**.entity
#swagger扫描路径配置
swagger:
base-packages:
- org.springbalde
- com.hnac
Loading…
Cancel
Save