diff --git a/hzims-service-api/pom.xml b/hzims-service-api/pom.xml index 9ac0bdb..62171b4 100644 --- a/hzims-service-api/pom.xml +++ b/hzims-service-api/pom.xml @@ -30,6 +30,7 @@ base-info-api digital-twin-display-api dam-safety-api + video-image-api diff --git a/hzims-service-api/video-image-api/pom.xml b/hzims-service-api/video-image-api/pom.xml new file mode 100644 index 0000000..b05af54 --- /dev/null +++ b/hzims-service-api/video-image-api/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + video-image-api + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfig.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfig.java new file mode 100644 index 0000000..966b016 --- /dev/null +++ b/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; + +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfigExample.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageConfigExample.java new file mode 100644 index 0000000..2e1905e --- /dev/null +++ b/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 oredCriteria; + + public ImageConfigExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("STCD in", values, "stcd"); + return (Criteria) this; + } + + public Criteria andStcdNotIn(List 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 values) { + addCriterion("NAME in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List 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 values) { + addCriterion("TYPE in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List 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 values) { + addCriterion("REALID in", values, "realid"); + return (Criteria) this; + } + + public Criteria andRealidNotIn(List 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 values) { + addCriterion("VALUE in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List 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 values) { + addCriterion("UNIT in", values, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfo.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfo.java new file mode 100644 index 0000000..5ddd835 --- /dev/null +++ b/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; + } +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfoExample.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImageInfoExample.java new file mode 100644 index 0000000..0ad64f0 --- /dev/null +++ b/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 oredCriteria; + + public ImageInfoExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("ID in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 values) { + addCriterion("STCD in", values, "stcd"); + return (Criteria) this; + } + + public Criteria andStcdNotIn(List 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 values) { + addCriterion("TIME in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List 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); + } + } +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePoint.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePoint.java new file mode 100644 index 0000000..3cf3098 --- /dev/null +++ b/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(); + } +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePointRelateInfo.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/entity/ImagePointRelateInfo.java new file mode 100644 index 0000000..19af260 --- /dev/null +++ b/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 imageConfigs; + + //最新快照图片,只有一张 + private ImageInfo newestImageInfo; + + public List getImageConfigs() { + return imageConfigs; + } + + public void setImageConfigs(List imageConfigs) { + this.imageConfigs = imageConfigs; + } + + public ImageInfo getNewestImageInfo() { + return newestImageInfo; + } + + public void setNewestImageInfo(ImageInfo newestImageInfo) { + this.newestImageInfo = newestImageInfo; + } + + + + + + +} diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/Constants.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/Constants.java new file mode 100644 index 0000000..d53152c --- /dev/null +++ b/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; + + +} \ No newline at end of file diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/ConvertUtils.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/util/ConvertUtils.java new file mode 100644 index 0000000..26428f1 --- /dev/null +++ b/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; + } +} diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImageInfoVo.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImageInfoVo.java new file mode 100644 index 0000000..8530c6f --- /dev/null +++ b/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 list; +} diff --git a/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImagePointVo.java b/hzims-service-api/video-image-api/src/main/java/com/hnac/hzims/videoimage/vo/ImagePointVo.java new file mode 100644 index 0000000..7094f81 --- /dev/null +++ b/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; + } +} diff --git a/hzims-service/pom.xml b/hzims-service/pom.xml index cac61c1..46c8839 100644 --- a/hzims-service/pom.xml +++ b/hzims-service/pom.xml @@ -30,6 +30,7 @@ base-info digital-twin-display dam-safety + video-image diff --git a/hzims-service/video-image/pom.xml b/hzims-service/video-image/pom.xml new file mode 100644 index 0000000..c7e85d8 --- /dev/null +++ b/hzims-service/video-image/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service + 4.0.0-SNAPSHOT + + + video-image + + + 8 + 8 + UTF-8 + + + + + + org.springblade + blade-core-boot + + + org.springblade + blade-starter-swagger + + + org.springblade + blade-starter-oss-all + + + com.baomidou + dynamic-datasource-spring-boot-starter + + + org.springblade + blade-core-test + test + + + org.springblade + blade-core-auto + compile + + + com.hnac.hzims + video-image-api + ${hzims.project.version} + + + + com.hikvision.ga + artemis-http-client + 1.1.2 + + + com.hnac.hzinfo.data + hzinfo-data-sdk + + + \ No newline at end of file diff --git a/hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/VideoImageApplication.java b/hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/VideoImageApplication.java new file mode 100644 index 0000000..60a47c8 --- /dev/null +++ b/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); + } +} \ No newline at end of file diff --git a/hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoController.java b/hzims-service/video-image/src/main/java/com/hnac/hzims/videoimage/controller/HikVideoController.java new file mode 100644 index 0000000..75ba4fa --- /dev/null +++ b/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