diff --git a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClient.java b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClient.java index 703e512..ba86f10 100644 --- a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClient.java +++ b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClient.java @@ -1,6 +1,8 @@ package com.hnac.hzims.spare.feign; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; import com.hnac.hzims.spare.entity.*; +import com.hnac.hzims.spare.vo.ExceedVo; import com.hnac.hzims.spare.vo.WtSpBasicVO; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; @@ -19,6 +21,8 @@ public interface ISpareClient { String API_PREFIX = "/client"; String WAREHOUSEOUT = API_PREFIX+"/warehouseOut"; + String EXCEED_LIMIT = API_PREFIX + "/exceedLimit" ; + /** * 保存工单与出库单关联信息 * @param recordEntity @@ -26,4 +30,7 @@ public interface ISpareClient { */ @PostMapping(WAREHOUSEOUT) Boolean warehouseOut(@RequestBody SpRecordEntity recordEntity); + + @PostMapping(EXCEED_LIMIT) + List exceedLimit(@RequestParam("deptId") Long deptId); } diff --git a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClientFallback.java b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClientFallback.java index fffc82b..6a55a8e 100644 --- a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClientFallback.java +++ b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/feign/ISpareClientFallback.java @@ -1,5 +1,6 @@ package com.hnac.hzims.spare.feign; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; import com.hnac.hzims.spare.entity.*; import com.hnac.hzims.spare.vo.WtSpBasicVO; import org.springblade.core.tool.api.R; @@ -7,6 +8,7 @@ import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; +import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -17,4 +19,9 @@ public class ISpareClientFallback implements ISpareClient { public Boolean warehouseOut(SpRecordEntity recordEntity) { return false; } + + @Override + public List exceedLimit(Long deptId) { + return new ArrayList<>(); + } } diff --git a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/h.java b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/h.java new file mode 100644 index 0000000..e69de29 diff --git a/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/ExceedVo.java b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/ExceedVo.java new file mode 100644 index 0000000..c1b4e1c --- /dev/null +++ b/hzims-service-api/assets-api/src/main/java/com/hnac/hzims/spare/vo/ExceedVo.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.spare.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + */ +@Data +public class ExceedVo { + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "事件Id") + private String eventId; + + @ApiModelProperty(value = "事件内容") + private String content; + + @ApiModelProperty(value = "事件time") + private String time; + + @ApiModelProperty(value = "提醒数量") + private Integer sum; +} diff --git a/hzims-service-api/base-info-api/pom.xml b/hzims-service-api/base-info-api/pom.xml new file mode 100644 index 0000000..3fcd836 --- /dev/null +++ b/hzims-service-api/base-info-api/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + + base-info-api + ${hzims.project.version} + jar + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/FileReservoirInfo.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/FileReservoirInfo.java new file mode 100644 index 0000000..379d842 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/FileReservoirInfo.java @@ -0,0 +1,65 @@ +package com.hnac.hzims.baseinfo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 文件 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:01 + */ +@Data +@Accessors(chain = true) +@TableName("file_reservoir_info") +public class FileReservoirInfo implements Serializable { + + + /** + * 视频Id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + + /** + * '视频地址' + */ + private String file; + + + /** + * 站点Id + */ + private String reservoirInfoId; + + + + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + + /** + * 逻辑删除0 正常 1 删除 + */ + @TableLogic + private int isDeleted; +} diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ImageReservoirInfo.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ImageReservoirInfo.java new file mode 100644 index 0000000..687249f --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ImageReservoirInfo.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.baseinfo.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 文件 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:01 + */ +@Data +@Accessors(chain = true) +@TableName("image_reservoir_info") +public class ImageReservoirInfo implements Serializable { + + + /** + * 视频Id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + + /** + * '视频地址' + */ + private String image; + + + /** + * 站点Id + */ + private String reservoirInfoId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + + /** + * 逻辑删除0 正常 1 删除 + */ + @TableLogic + private int isDeleted; +} diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReach.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReach.java new file mode 100644 index 0000000..2513e9f --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReach.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; + +/** + * 河流 <国标> + * + * @author moze + * + */ +public class IrrBIReach { + private String riverCode; // 河流代码 + + private String riverName; // 河流名称 + + private BigDecimal riverWidth; // 河槽平均宽度(米) + + private BigDecimal riverFlux; // 河槽平均流量(立方米/秒) + + private String coordinateset; // 经纬集合 + + public String getCoordinateset() { + return coordinateset; + } + + public void setCoordinateset(String coordinateset) { + this.coordinateset = coordinateset; + } + + public String getRiverCode() { + return riverCode; + } + + public void setRiverCode(String riverCode) { + this.riverCode = riverCode; + } + + public String getRiverName() { + return riverName; + } + + public void setRiverName(String riverName) { + this.riverName = riverName; + } + + public BigDecimal getRiverWidth() { + return riverWidth; + } + + public void setRiverWidth(BigDecimal riverWidth) { + this.riverWidth = riverWidth; + } + + public BigDecimal getRiverFlux() { + return riverFlux; + } + + public void setRiverFlux(BigDecimal riverFlux) { + this.riverFlux = riverFlux; + } + +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReachExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReachExample.java new file mode 100644 index 0000000..888d33a --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/IrrBIReachExample.java @@ -0,0 +1,531 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class IrrBIReachExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public IrrBIReachExample() { + 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 andRiverCodeIsNull() { + addCriterion("RIVER_CODE is null"); + return (Criteria) this; + } + + public Criteria andRiverCodeIsNotNull() { + addCriterion("RIVER_CODE is not null"); + return (Criteria) this; + } + + public Criteria andRiverCodeEqualTo(String value) { + addCriterion("RIVER_CODE =", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeNotEqualTo(String value) { + addCriterion("RIVER_CODE <>", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeGreaterThan(String value) { + addCriterion("RIVER_CODE >", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeGreaterThanOrEqualTo(String value) { + addCriterion("RIVER_CODE >=", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeLessThan(String value) { + addCriterion("RIVER_CODE <", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeLessThanOrEqualTo(String value) { + addCriterion("RIVER_CODE <=", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeLike(String value) { + addCriterion("RIVER_CODE like", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeNotLike(String value) { + addCriterion("RIVER_CODE not like", value, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeIn(List values) { + addCriterion("RIVER_CODE in", values, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeNotIn(List values) { + addCriterion("RIVER_CODE not in", values, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeBetween(String value1, String value2) { + addCriterion("RIVER_CODE between", value1, value2, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverCodeNotBetween(String value1, String value2) { + addCriterion("RIVER_CODE not between", value1, value2, "riverCode"); + return (Criteria) this; + } + + public Criteria andRiverNameIsNull() { + addCriterion("RIVER_NAME is null"); + return (Criteria) this; + } + + public Criteria andRiverNameIsNotNull() { + addCriterion("RIVER_NAME is not null"); + return (Criteria) this; + } + + public Criteria andRiverNameEqualTo(String value) { + addCriterion("RIVER_NAME =", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameNotEqualTo(String value) { + addCriterion("RIVER_NAME <>", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameGreaterThan(String value) { + addCriterion("RIVER_NAME >", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameGreaterThanOrEqualTo(String value) { + addCriterion("RIVER_NAME >=", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameLessThan(String value) { + addCriterion("RIVER_NAME <", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameLessThanOrEqualTo(String value) { + addCriterion("RIVER_NAME <=", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameLike(String value) { + addCriterion("RIVER_NAME like", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameNotLike(String value) { + addCriterion("RIVER_NAME not like", value, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameIn(List values) { + addCriterion("RIVER_NAME in", values, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameNotIn(List values) { + addCriterion("RIVER_NAME not in", values, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameBetween(String value1, String value2) { + addCriterion("RIVER_NAME between", value1, value2, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverNameNotBetween(String value1, String value2) { + addCriterion("RIVER_NAME not between", value1, value2, "riverName"); + return (Criteria) this; + } + + public Criteria andRiverWidthIsNull() { + addCriterion("RIVER_WIDTH is null"); + return (Criteria) this; + } + + public Criteria andRiverWidthIsNotNull() { + addCriterion("RIVER_WIDTH is not null"); + return (Criteria) this; + } + + public Criteria andRiverWidthEqualTo(BigDecimal value) { + addCriterion("RIVER_WIDTH =", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthNotEqualTo(BigDecimal value) { + addCriterion("RIVER_WIDTH <>", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthGreaterThan(BigDecimal value) { + addCriterion("RIVER_WIDTH >", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("RIVER_WIDTH >=", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthLessThan(BigDecimal value) { + addCriterion("RIVER_WIDTH <", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthLessThanOrEqualTo(BigDecimal value) { + addCriterion("RIVER_WIDTH <=", value, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthIn(List values) { + addCriterion("RIVER_WIDTH in", values, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthNotIn(List values) { + addCriterion("RIVER_WIDTH not in", values, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RIVER_WIDTH between", value1, value2, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverWidthNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RIVER_WIDTH not between", value1, value2, "riverWidth"); + return (Criteria) this; + } + + public Criteria andRiverFluxIsNull() { + addCriterion("RIVER_FLUX is null"); + return (Criteria) this; + } + + public Criteria andRiverFluxIsNotNull() { + addCriterion("RIVER_FLUX is not null"); + return (Criteria) this; + } + + public Criteria andRiverFluxEqualTo(BigDecimal value) { + addCriterion("RIVER_FLUX =", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxNotEqualTo(BigDecimal value) { + addCriterion("RIVER_FLUX <>", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxGreaterThan(BigDecimal value) { + addCriterion("RIVER_FLUX >", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("RIVER_FLUX >=", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxLessThan(BigDecimal value) { + addCriterion("RIVER_FLUX <", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxLessThanOrEqualTo(BigDecimal value) { + addCriterion("RIVER_FLUX <=", value, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxIn(List values) { + addCriterion("RIVER_FLUX in", values, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxNotIn(List values) { + addCriterion("RIVER_FLUX not in", values, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RIVER_FLUX between", value1, value2, "riverFlux"); + return (Criteria) this; + } + + public Criteria andRiverFluxNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RIVER_FLUX not between", value1, value2, "riverFlux"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIsNull() { + addCriterion("COORDINATESET is null"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIsNotNull() { + addCriterion("COORDINATESET is not null"); + return (Criteria) this; + } + + public Criteria andCoordinatesetEqualTo(String value) { + addCriterion("COORDINATESET =", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotEqualTo(String value) { + addCriterion("COORDINATESET <>", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetGreaterThan(String value) { + addCriterion("COORDINATESET >", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetGreaterThanOrEqualTo(String value) { + addCriterion("COORDINATESET >=", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLessThan(String value) { + addCriterion("COORDINATESET <", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLessThanOrEqualTo(String value) { + addCriterion("COORDINATESET <=", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLike(String value) { + addCriterion("COORDINATESET like", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotLike(String value) { + addCriterion("COORDINATESET not like", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIn(List values) { + addCriterion("COORDINATESET in", values, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotIn(List values) { + addCriterion("COORDINATESET not in", values, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetBetween(String value1, String value2) { + addCriterion("COORDINATESET between", value1, value2, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotBetween(String value1, String value2) { + addCriterion("COORDINATESET not between", value1, value2, "coordinateset"); + 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfo.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfo.java new file mode 100644 index 0000000..c8af1b7 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfo.java @@ -0,0 +1,408 @@ +package com.hnac.hzims.baseinfo.entity; + + + +import com.hnac.hzims.baseinfo.vo.ReservoirInfoVo; + +import java.util.Date; + +/** + * 水库基本信息表 《参照国标自行设计》 + * + * @author moze + * + */ +public class ReservoirInfo { + private String stcd; // 水库编号 + + private String stationid; // 站点ID + + private Float discharge; // 水库核定下泄流量 m³/s + + private String name; // 水库名称 + + private String location; // 水库地址 + + private String village; // 所在乡镇村 + + private Float roadlength; // 防汛公路长度 m + + private String roadconditiion;// 防汛公路状况 + + private Date builddate;// 建设时间 + + private Date completeddate;// 竣工时间 + + private Float rainarea;// 积雨面积km² + + private Float designedfloodflow;// 设计洪水流量m³/s + + private Float chedkedfloodflow;// 校核洪水流量m³/s + + private Float designedfillarea;// 设计灌面km² + + private Float designedtotalflow;// 设计洪水总量 万m³ + + private Float checdedtotalflow;// 校核洪水总量 万m³ + + private Float averagerainfall;// 平均降雨量 mm + + private Float designedmaxflow;// 设计最大泄量 m³/s + + private Float checkedmaxflow;// 校核最大泄量m³/s + + private Float volume;// 总库容 万m³ + + private Float checkedfloodlevel;// 校核洪水位 + + private Float historicalmaxlevel;// 历史最高水位 + + private Float floodcontrolvolume;// 防洪库容 万m³ + + private Float designedfloodlevel; // 设计洪水位 m + + private Date maxleveltime; // 最高水位发生时间 + + private Float utilizablevolume; // 兴利库容万m³ + + private Float norrmallevel; // 正常蓄水位 m + + private Float flooddetentionvolume; // 滞洪库容 万m³ + + private Float deadlevel; // 死水位 m + + private String areaCode; // 行政区划Code + + private String lrcd; // 湖库代码 + + private String szhldm; // 所在河流代码 + + private Float dongj; // 东经 + + private Float beiw; // 北纬 + + private Float mjflsscnwl; //主汛期限制水位 + + public Float getMjflsscnwl() { + return mjflsscnwl; + } + + public void setMjflsscnwl(Float mjflsscnwl) { + this.mjflsscnwl = mjflsscnwl; + } + + public String getAreaCode() { + return areaCode; + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getLrcd() { + return lrcd; + } + + public void setLrcd(String lrcd) { + this.lrcd = lrcd; + } + + public String getSzhldm() { + return szhldm; + } + + public void setSzhldm(String szhldm) { + this.szhldm = szhldm; + } + + public Float getDongj() { + return dongj; + } + + public void setDongj(Float dongj) { + this.dongj = dongj; + } + + public Float getBeiw() { + return beiw; + } + + public void setBeiw(Float beiw) { + this.beiw = beiw; + } + + public ReservoirInfo() { + } + + public ReservoirInfo(ReservoirInfoVo vo) { + this.averagerainfall = vo.getAveragerainfall(); + this.builddate = vo.getBuilddate(); + this.checdedtotalflow = vo.getChecdedtotalflow(); + this.checkedfloodlevel = vo.getCheckedfloodlevel(); + this.checkedmaxflow = vo.getCheckedmaxflow(); + this.chedkedfloodflow = vo.getChedkedfloodflow(); + this.completeddate = vo.getCompleteddate(); + this.deadlevel = vo.getDeadlevel(); + this.designedfillarea = vo.getDesignedfillarea(); + this.designedfloodflow = vo.getDesignedfloodflow(); + this.designedfloodlevel = vo.getDesignedfloodlevel(); + this.designedmaxflow = vo.getDesignedmaxflow(); + this.designedtotalflow = vo.getDesignedtotalflow(); + this.discharge = vo.getDischarge(); + this.floodcontrolvolume = vo.getFloodcontrolvolume(); + this.flooddetentionvolume = vo.getFlooddetentionvolume(); + this.historicalmaxlevel = vo.getHistoricalmaxlevel(); + this.location = vo.getLocation(); + this.maxleveltime = vo.getMaxleveltime(); + this.name = vo.getName(); + this.norrmallevel = vo.getNorrmallevel(); + this.rainarea = vo.getRainarea(); + this.roadconditiion = vo.getRoadconditiion(); + this.roadlength = vo.getRoadlength(); + this.stationid = vo.getStationid(); + this.stcd = vo.getStcd(); + this.utilizablevolume = vo.getUtilizablevolume(); + this.village = vo.getVillage(); + this.volume = vo.getVolume(); + this.areaCode = vo.getAreaCode(); + this.beiw = vo.getBeiw(); + this.dongj = vo.getDongj(); + this.lrcd = vo.getLrcd(); + this.szhldm = vo.getSzhldm(); + this.areaCode = vo.getAreaCode(); + this.mjflsscnwl = vo.getMjflsscnwl(); + } + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } + + public String getStationid() { + return stationid; + } + + public void setStationid(String stationid) { + this.stationid = stationid; + } + + public Float getDischarge() { + return discharge; + } + + public void setDischarge(Float discharge) { + this.discharge = discharge; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getVillage() { + return village; + } + + public void setVillage(String village) { + this.village = village; + } + + public Float getRoadlength() { + return roadlength; + } + + public void setRoadlength(Float roadlength) { + this.roadlength = roadlength; + } + + public String getRoadconditiion() { + return roadconditiion; + } + + public void setRoadconditiion(String roadconditiion) { + this.roadconditiion = roadconditiion; + } + + public Date getBuilddate() { + return builddate; + } + + public void setBuilddate(Date builddate) { + this.builddate = builddate; + } + + public Date getCompleteddate() { + return completeddate; + } + + public void setCompleteddate(Date completeddate) { + this.completeddate = completeddate; + } + + public Float getRainarea() { + return rainarea; + } + + public void setRainarea(Float rainarea) { + this.rainarea = rainarea; + } + + public Float getDesignedfloodflow() { + return designedfloodflow; + } + + public void setDesignedfloodflow(Float designedfloodflow) { + this.designedfloodflow = designedfloodflow; + } + + public Float getChedkedfloodflow() { + return chedkedfloodflow; + } + + public void setChedkedfloodflow(Float chedkedfloodflow) { + this.chedkedfloodflow = chedkedfloodflow; + } + + public Float getDesignedfillarea() { + return designedfillarea; + } + + public void setDesignedfillarea(Float designedfillarea) { + this.designedfillarea = designedfillarea; + } + + public Float getDesignedtotalflow() { + return designedtotalflow; + } + + public void setDesignedtotalflow(Float designedtotalflow) { + this.designedtotalflow = designedtotalflow; + } + + public Float getChecdedtotalflow() { + return checdedtotalflow; + } + + public void setChecdedtotalflow(Float checdedtotalflow) { + this.checdedtotalflow = checdedtotalflow; + } + + public Float getAveragerainfall() { + return averagerainfall; + } + + public void setAveragerainfall(Float averagerainfall) { + this.averagerainfall = averagerainfall; + } + + public Float getDesignedmaxflow() { + return designedmaxflow; + } + + public void setDesignedmaxflow(Float designedmaxflow) { + this.designedmaxflow = designedmaxflow; + } + + public Float getCheckedmaxflow() { + return checkedmaxflow; + } + + public void setCheckedmaxflow(Float checkedmaxflow) { + this.checkedmaxflow = checkedmaxflow; + } + + public Float getVolume() { + return volume; + } + + public void setVolume(Float volume) { + this.volume = volume; + } + + public Float getCheckedfloodlevel() { + return checkedfloodlevel; + } + + public void setCheckedfloodlevel(Float checkedfloodlevel) { + this.checkedfloodlevel = checkedfloodlevel; + } + + public Float getHistoricalmaxlevel() { + return historicalmaxlevel; + } + + public void setHistoricalmaxlevel(Float historicalmaxlevel) { + this.historicalmaxlevel = historicalmaxlevel; + } + + public Float getFloodcontrolvolume() { + return floodcontrolvolume; + } + + public void setFloodcontrolvolume(Float floodcontrolvolume) { + this.floodcontrolvolume = floodcontrolvolume; + } + + public Float getDesignedfloodlevel() { + return designedfloodlevel; + } + + public void setDesignedfloodlevel(Float designedfloodlevel) { + this.designedfloodlevel = designedfloodlevel; + } + + public Date getMaxleveltime() { + return maxleveltime; + } + + public void setMaxleveltime(Date maxleveltime) { + this.maxleveltime = maxleveltime; + } + + public Float getUtilizablevolume() { + return utilizablevolume; + } + + public void setUtilizablevolume(Float utilizablevolume) { + this.utilizablevolume = utilizablevolume; + } + + public Float getNorrmallevel() { + return norrmallevel; + } + + public void setNorrmallevel(Float norrmallevel) { + this.norrmallevel = norrmallevel; + } + + public Float getFlooddetentionvolume() { + return flooddetentionvolume; + } + + public void setFlooddetentionvolume(Float flooddetentionvolume) { + this.flooddetentionvolume = flooddetentionvolume; + } + + public Float getDeadlevel() { + return deadlevel; + } + + public void setDeadlevel(Float deadlevel) { + this.deadlevel = deadlevel; + } + +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfoExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfoExample.java new file mode 100644 index 0000000..51e78e3 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirInfoExample.java @@ -0,0 +1,2358 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class ReservoirInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ReservoirInfoExample() { + 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)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + 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 andStationidIsNull() { + addCriterion("STATIONID is null"); + return (Criteria) this; + } + + public Criteria andStationidIsNotNull() { + addCriterion("STATIONID is not null"); + return (Criteria) this; + } + + public Criteria andStationidEqualTo(String value) { + addCriterion("STATIONID =", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidNotEqualTo(String value) { + addCriterion("STATIONID <>", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidGreaterThan(String value) { + addCriterion("STATIONID >", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidGreaterThanOrEqualTo(String value) { + addCriterion("STATIONID >=", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidLessThan(String value) { + addCriterion("STATIONID <", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidLessThanOrEqualTo(String value) { + addCriterion("STATIONID <=", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidLike(String value) { + addCriterion("STATIONID like", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidNotLike(String value) { + addCriterion("STATIONID not like", value, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidIn(List values) { + addCriterion("STATIONID in", values, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidNotIn(List values) { + addCriterion("STATIONID not in", values, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidBetween(String value1, String value2) { + addCriterion("STATIONID between", value1, value2, "stationid"); + return (Criteria) this; + } + + public Criteria andStationidNotBetween(String value1, String value2) { + addCriterion("STATIONID not between", value1, value2, "stationid"); + return (Criteria) this; + } + + public Criteria andDischargeIsNull() { + addCriterion("DISCHARGE is null"); + return (Criteria) this; + } + + public Criteria andDischargeIsNotNull() { + addCriterion("DISCHARGE is not null"); + return (Criteria) this; + } + + public Criteria andDischargeEqualTo(Float value) { + addCriterion("DISCHARGE =", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeNotEqualTo(Float value) { + addCriterion("DISCHARGE <>", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeGreaterThan(Float value) { + addCriterion("DISCHARGE >", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeGreaterThanOrEqualTo(Float value) { + addCriterion("DISCHARGE >=", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeLessThan(Float value) { + addCriterion("DISCHARGE <", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeLessThanOrEqualTo(Float value) { + addCriterion("DISCHARGE <=", value, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeIn(List values) { + addCriterion("DISCHARGE in", values, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeNotIn(List values) { + addCriterion("DISCHARGE not in", values, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeBetween(Float value1, Float value2) { + addCriterion("DISCHARGE between", value1, value2, "discharge"); + return (Criteria) this; + } + + public Criteria andDischargeNotBetween(Float value1, Float value2) { + addCriterion("DISCHARGE not between", value1, value2, "discharge"); + 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 andLocationIsNull() { + addCriterion("LOCATION is null"); + return (Criteria) this; + } + + public Criteria andLocationIsNotNull() { + addCriterion("LOCATION is not null"); + return (Criteria) this; + } + + public Criteria andLocationEqualTo(String value) { + addCriterion("LOCATION =", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotEqualTo(String value) { + addCriterion("LOCATION <>", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationGreaterThan(String value) { + addCriterion("LOCATION >", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationGreaterThanOrEqualTo(String value) { + addCriterion("LOCATION >=", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLessThan(String value) { + addCriterion("LOCATION <", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLessThanOrEqualTo(String value) { + addCriterion("LOCATION <=", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationLike(String value) { + addCriterion("LOCATION like", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotLike(String value) { + addCriterion("LOCATION not like", value, "location"); + return (Criteria) this; + } + + public Criteria andLocationIn(List values) { + addCriterion("LOCATION in", values, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotIn(List values) { + addCriterion("LOCATION not in", values, "location"); + return (Criteria) this; + } + + public Criteria andLocationBetween(String value1, String value2) { + addCriterion("LOCATION between", value1, value2, "location"); + return (Criteria) this; + } + + public Criteria andLocationNotBetween(String value1, String value2) { + addCriterion("LOCATION not between", value1, value2, "location"); + return (Criteria) this; + } + + public Criteria andVillageIsNull() { + addCriterion("VILLAGE is null"); + return (Criteria) this; + } + + public Criteria andVillageIsNotNull() { + addCriterion("VILLAGE is not null"); + return (Criteria) this; + } + + public Criteria andVillageEqualTo(String value) { + addCriterion("VILLAGE =", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageNotEqualTo(String value) { + addCriterion("VILLAGE <>", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageGreaterThan(String value) { + addCriterion("VILLAGE >", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageGreaterThanOrEqualTo(String value) { + addCriterion("VILLAGE >=", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageLessThan(String value) { + addCriterion("VILLAGE <", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageLessThanOrEqualTo(String value) { + addCriterion("VILLAGE <=", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageLike(String value) { + addCriterion("VILLAGE like", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageNotLike(String value) { + addCriterion("VILLAGE not like", value, "village"); + return (Criteria) this; + } + + public Criteria andVillageIn(List values) { + addCriterion("VILLAGE in", values, "village"); + return (Criteria) this; + } + + public Criteria andVillageNotIn(List values) { + addCriterion("VILLAGE not in", values, "village"); + return (Criteria) this; + } + + public Criteria andVillageBetween(String value1, String value2) { + addCriterion("VILLAGE between", value1, value2, "village"); + return (Criteria) this; + } + + public Criteria andVillageNotBetween(String value1, String value2) { + addCriterion("VILLAGE not between", value1, value2, "village"); + return (Criteria) this; + } + + public Criteria andRoadlengthIsNull() { + addCriterion("ROADLENGTH is null"); + return (Criteria) this; + } + + public Criteria andRoadlengthIsNotNull() { + addCriterion("ROADLENGTH is not null"); + return (Criteria) this; + } + + public Criteria andRoadlengthEqualTo(Float value) { + addCriterion("ROADLENGTH =", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthNotEqualTo(Float value) { + addCriterion("ROADLENGTH <>", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthGreaterThan(Float value) { + addCriterion("ROADLENGTH >", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthGreaterThanOrEqualTo(Float value) { + addCriterion("ROADLENGTH >=", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthLessThan(Float value) { + addCriterion("ROADLENGTH <", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthLessThanOrEqualTo(Float value) { + addCriterion("ROADLENGTH <=", value, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthIn(List values) { + addCriterion("ROADLENGTH in", values, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthNotIn(List values) { + addCriterion("ROADLENGTH not in", values, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthBetween(Float value1, Float value2) { + addCriterion("ROADLENGTH between", value1, value2, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadlengthNotBetween(Float value1, Float value2) { + addCriterion("ROADLENGTH not between", value1, value2, "roadlength"); + return (Criteria) this; + } + + public Criteria andRoadconditiionIsNull() { + addCriterion("ROADCONDITIION is null"); + return (Criteria) this; + } + + public Criteria andRoadconditiionIsNotNull() { + addCriterion("ROADCONDITIION is not null"); + return (Criteria) this; + } + + public Criteria andRoadconditiionEqualTo(String value) { + addCriterion("ROADCONDITIION =", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionNotEqualTo(String value) { + addCriterion("ROADCONDITIION <>", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionGreaterThan(String value) { + addCriterion("ROADCONDITIION >", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionGreaterThanOrEqualTo(String value) { + addCriterion("ROADCONDITIION >=", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionLessThan(String value) { + addCriterion("ROADCONDITIION <", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionLessThanOrEqualTo(String value) { + addCriterion("ROADCONDITIION <=", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionLike(String value) { + addCriterion("ROADCONDITIION like", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionNotLike(String value) { + addCriterion("ROADCONDITIION not like", value, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionIn(List values) { + addCriterion("ROADCONDITIION in", values, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionNotIn(List values) { + addCriterion("ROADCONDITIION not in", values, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionBetween(String value1, String value2) { + addCriterion("ROADCONDITIION between", value1, value2, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andRoadconditiionNotBetween(String value1, String value2) { + addCriterion("ROADCONDITIION not between", value1, value2, "roadconditiion"); + return (Criteria) this; + } + + public Criteria andBuilddateIsNull() { + addCriterion("BUILDDATE is null"); + return (Criteria) this; + } + + public Criteria andBuilddateIsNotNull() { + addCriterion("BUILDDATE is not null"); + return (Criteria) this; + } + + public Criteria andBuilddateEqualTo(Date value) { + addCriterionForJDBCDate("BUILDDATE =", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateNotEqualTo(Date value) { + addCriterionForJDBCDate("BUILDDATE <>", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateGreaterThan(Date value) { + addCriterionForJDBCDate("BUILDDATE >", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("BUILDDATE >=", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateLessThan(Date value) { + addCriterionForJDBCDate("BUILDDATE <", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("BUILDDATE <=", value, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateIn(List values) { + addCriterionForJDBCDate("BUILDDATE in", values, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateNotIn(List values) { + addCriterionForJDBCDate("BUILDDATE not in", values, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("BUILDDATE between", value1, value2, "builddate"); + return (Criteria) this; + } + + public Criteria andBuilddateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("BUILDDATE not between", value1, value2, "builddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateIsNull() { + addCriterion("COMPLETEDDATE is null"); + return (Criteria) this; + } + + public Criteria andCompleteddateIsNotNull() { + addCriterion("COMPLETEDDATE is not null"); + return (Criteria) this; + } + + public Criteria andCompleteddateEqualTo(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE =", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateNotEqualTo(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE <>", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateGreaterThan(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE >", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE >=", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateLessThan(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE <", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("COMPLETEDDATE <=", value, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateIn(List values) { + addCriterionForJDBCDate("COMPLETEDDATE in", values, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateNotIn(List values) { + addCriterionForJDBCDate("COMPLETEDDATE not in", values, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("COMPLETEDDATE between", value1, value2, "completeddate"); + return (Criteria) this; + } + + public Criteria andCompleteddateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("COMPLETEDDATE not between", value1, value2, "completeddate"); + return (Criteria) this; + } + + public Criteria andRainareaIsNull() { + addCriterion("RAINAREA is null"); + return (Criteria) this; + } + + public Criteria andRainareaIsNotNull() { + addCriterion("RAINAREA is not null"); + return (Criteria) this; + } + + public Criteria andRainareaEqualTo(Float value) { + addCriterion("RAINAREA =", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaNotEqualTo(Float value) { + addCriterion("RAINAREA <>", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaGreaterThan(Float value) { + addCriterion("RAINAREA >", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaGreaterThanOrEqualTo(Float value) { + addCriterion("RAINAREA >=", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaLessThan(Float value) { + addCriterion("RAINAREA <", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaLessThanOrEqualTo(Float value) { + addCriterion("RAINAREA <=", value, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaIn(List values) { + addCriterion("RAINAREA in", values, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaNotIn(List values) { + addCriterion("RAINAREA not in", values, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaBetween(Float value1, Float value2) { + addCriterion("RAINAREA between", value1, value2, "rainarea"); + return (Criteria) this; + } + + public Criteria andRainareaNotBetween(Float value1, Float value2) { + addCriterion("RAINAREA not between", value1, value2, "rainarea"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowIsNull() { + addCriterion("DESIGNEDFLOODFLOW is null"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowIsNotNull() { + addCriterion("DESIGNEDFLOODFLOW is not null"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowEqualTo(Float value) { + addCriterion("DESIGNEDFLOODFLOW =", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowNotEqualTo(Float value) { + addCriterion("DESIGNEDFLOODFLOW <>", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowGreaterThan(Float value) { + addCriterion("DESIGNEDFLOODFLOW >", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowGreaterThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFLOODFLOW >=", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowLessThan(Float value) { + addCriterion("DESIGNEDFLOODFLOW <", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowLessThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFLOODFLOW <=", value, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowIn(List values) { + addCriterion("DESIGNEDFLOODFLOW in", values, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowNotIn(List values) { + addCriterion("DESIGNEDFLOODFLOW not in", values, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFLOODFLOW between", value1, value2, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfloodflowNotBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFLOODFLOW not between", value1, value2, "designedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowIsNull() { + addCriterion("CHEDKEDFLOODFLOW is null"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowIsNotNull() { + addCriterion("CHEDKEDFLOODFLOW is not null"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowEqualTo(Float value) { + addCriterion("CHEDKEDFLOODFLOW =", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowNotEqualTo(Float value) { + addCriterion("CHEDKEDFLOODFLOW <>", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowGreaterThan(Float value) { + addCriterion("CHEDKEDFLOODFLOW >", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowGreaterThanOrEqualTo(Float value) { + addCriterion("CHEDKEDFLOODFLOW >=", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowLessThan(Float value) { + addCriterion("CHEDKEDFLOODFLOW <", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowLessThanOrEqualTo(Float value) { + addCriterion("CHEDKEDFLOODFLOW <=", value, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowIn(List values) { + addCriterion("CHEDKEDFLOODFLOW in", values, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowNotIn(List values) { + addCriterion("CHEDKEDFLOODFLOW not in", values, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowBetween(Float value1, Float value2) { + addCriterion("CHEDKEDFLOODFLOW between", value1, value2, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andChedkedfloodflowNotBetween(Float value1, Float value2) { + addCriterion("CHEDKEDFLOODFLOW not between", value1, value2, "chedkedfloodflow"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaIsNull() { + addCriterion("DESIGNEDFILLAREA is null"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaIsNotNull() { + addCriterion("DESIGNEDFILLAREA is not null"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaEqualTo(Float value) { + addCriterion("DESIGNEDFILLAREA =", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaNotEqualTo(Float value) { + addCriterion("DESIGNEDFILLAREA <>", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaGreaterThan(Float value) { + addCriterion("DESIGNEDFILLAREA >", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaGreaterThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFILLAREA >=", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaLessThan(Float value) { + addCriterion("DESIGNEDFILLAREA <", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaLessThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFILLAREA <=", value, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaIn(List values) { + addCriterion("DESIGNEDFILLAREA in", values, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaNotIn(List values) { + addCriterion("DESIGNEDFILLAREA not in", values, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFILLAREA between", value1, value2, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedfillareaNotBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFILLAREA not between", value1, value2, "designedfillarea"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowIsNull() { + addCriterion("DESIGNEDTOTALFLOW is null"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowIsNotNull() { + addCriterion("DESIGNEDTOTALFLOW is not null"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowEqualTo(Float value) { + addCriterion("DESIGNEDTOTALFLOW =", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowNotEqualTo(Float value) { + addCriterion("DESIGNEDTOTALFLOW <>", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowGreaterThan(Float value) { + addCriterion("DESIGNEDTOTALFLOW >", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowGreaterThanOrEqualTo(Float value) { + addCriterion("DESIGNEDTOTALFLOW >=", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowLessThan(Float value) { + addCriterion("DESIGNEDTOTALFLOW <", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowLessThanOrEqualTo(Float value) { + addCriterion("DESIGNEDTOTALFLOW <=", value, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowIn(List values) { + addCriterion("DESIGNEDTOTALFLOW in", values, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowNotIn(List values) { + addCriterion("DESIGNEDTOTALFLOW not in", values, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowBetween(Float value1, Float value2) { + addCriterion("DESIGNEDTOTALFLOW between", value1, value2, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andDesignedtotalflowNotBetween(Float value1, Float value2) { + addCriterion("DESIGNEDTOTALFLOW not between", value1, value2, "designedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowIsNull() { + addCriterion("CHECDEDTOTALFLOW is null"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowIsNotNull() { + addCriterion("CHECDEDTOTALFLOW is not null"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowEqualTo(Float value) { + addCriterion("CHECDEDTOTALFLOW =", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowNotEqualTo(Float value) { + addCriterion("CHECDEDTOTALFLOW <>", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowGreaterThan(Float value) { + addCriterion("CHECDEDTOTALFLOW >", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowGreaterThanOrEqualTo(Float value) { + addCriterion("CHECDEDTOTALFLOW >=", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowLessThan(Float value) { + addCriterion("CHECDEDTOTALFLOW <", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowLessThanOrEqualTo(Float value) { + addCriterion("CHECDEDTOTALFLOW <=", value, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowIn(List values) { + addCriterion("CHECDEDTOTALFLOW in", values, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowNotIn(List values) { + addCriterion("CHECDEDTOTALFLOW not in", values, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowBetween(Float value1, Float value2) { + addCriterion("CHECDEDTOTALFLOW between", value1, value2, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andChecdedtotalflowNotBetween(Float value1, Float value2) { + addCriterion("CHECDEDTOTALFLOW not between", value1, value2, "checdedtotalflow"); + return (Criteria) this; + } + + public Criteria andAveragerainfallIsNull() { + addCriterion("AVERAGERAINFALL is null"); + return (Criteria) this; + } + + public Criteria andAveragerainfallIsNotNull() { + addCriterion("AVERAGERAINFALL is not null"); + return (Criteria) this; + } + + public Criteria andAveragerainfallEqualTo(Float value) { + addCriterion("AVERAGERAINFALL =", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallNotEqualTo(Float value) { + addCriterion("AVERAGERAINFALL <>", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallGreaterThan(Float value) { + addCriterion("AVERAGERAINFALL >", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallGreaterThanOrEqualTo(Float value) { + addCriterion("AVERAGERAINFALL >=", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallLessThan(Float value) { + addCriterion("AVERAGERAINFALL <", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallLessThanOrEqualTo(Float value) { + addCriterion("AVERAGERAINFALL <=", value, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallIn(List values) { + addCriterion("AVERAGERAINFALL in", values, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallNotIn(List values) { + addCriterion("AVERAGERAINFALL not in", values, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallBetween(Float value1, Float value2) { + addCriterion("AVERAGERAINFALL between", value1, value2, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andAveragerainfallNotBetween(Float value1, Float value2) { + addCriterion("AVERAGERAINFALL not between", value1, value2, "averagerainfall"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowIsNull() { + addCriterion("DESIGNEDMAXFLOW is null"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowIsNotNull() { + addCriterion("DESIGNEDMAXFLOW is not null"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowEqualTo(Float value) { + addCriterion("DESIGNEDMAXFLOW =", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowNotEqualTo(Float value) { + addCriterion("DESIGNEDMAXFLOW <>", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowGreaterThan(Float value) { + addCriterion("DESIGNEDMAXFLOW >", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowGreaterThanOrEqualTo(Float value) { + addCriterion("DESIGNEDMAXFLOW >=", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowLessThan(Float value) { + addCriterion("DESIGNEDMAXFLOW <", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowLessThanOrEqualTo(Float value) { + addCriterion("DESIGNEDMAXFLOW <=", value, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowIn(List values) { + addCriterion("DESIGNEDMAXFLOW in", values, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowNotIn(List values) { + addCriterion("DESIGNEDMAXFLOW not in", values, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowBetween(Float value1, Float value2) { + addCriterion("DESIGNEDMAXFLOW between", value1, value2, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andDesignedmaxflowNotBetween(Float value1, Float value2) { + addCriterion("DESIGNEDMAXFLOW not between", value1, value2, "designedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowIsNull() { + addCriterion("CHECKEDMAXFLOW is null"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowIsNotNull() { + addCriterion("CHECKEDMAXFLOW is not null"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowEqualTo(Float value) { + addCriterion("CHECKEDMAXFLOW =", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowNotEqualTo(Float value) { + addCriterion("CHECKEDMAXFLOW <>", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowGreaterThan(Float value) { + addCriterion("CHECKEDMAXFLOW >", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowGreaterThanOrEqualTo(Float value) { + addCriterion("CHECKEDMAXFLOW >=", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowLessThan(Float value) { + addCriterion("CHECKEDMAXFLOW <", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowLessThanOrEqualTo(Float value) { + addCriterion("CHECKEDMAXFLOW <=", value, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowIn(List values) { + addCriterion("CHECKEDMAXFLOW in", values, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowNotIn(List values) { + addCriterion("CHECKEDMAXFLOW not in", values, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowBetween(Float value1, Float value2) { + addCriterion("CHECKEDMAXFLOW between", value1, value2, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andCheckedmaxflowNotBetween(Float value1, Float value2) { + addCriterion("CHECKEDMAXFLOW not between", value1, value2, "checkedmaxflow"); + return (Criteria) this; + } + + public Criteria andVolumeIsNull() { + addCriterion("VOLUME is null"); + return (Criteria) this; + } + + public Criteria andVolumeIsNotNull() { + addCriterion("VOLUME is not null"); + return (Criteria) this; + } + + public Criteria andVolumeEqualTo(Float value) { + addCriterion("VOLUME =", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeNotEqualTo(Float value) { + addCriterion("VOLUME <>", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeGreaterThan(Float value) { + addCriterion("VOLUME >", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeGreaterThanOrEqualTo(Float value) { + addCriterion("VOLUME >=", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeLessThan(Float value) { + addCriterion("VOLUME <", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeLessThanOrEqualTo(Float value) { + addCriterion("VOLUME <=", value, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeIn(List values) { + addCriterion("VOLUME in", values, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeNotIn(List values) { + addCriterion("VOLUME not in", values, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeBetween(Float value1, Float value2) { + addCriterion("VOLUME between", value1, value2, "volume"); + return (Criteria) this; + } + + public Criteria andVolumeNotBetween(Float value1, Float value2) { + addCriterion("VOLUME not between", value1, value2, "volume"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelIsNull() { + addCriterion("CHECKEDFLOODLEVEL is null"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelIsNotNull() { + addCriterion("CHECKEDFLOODLEVEL is not null"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelEqualTo(Float value) { + addCriterion("CHECKEDFLOODLEVEL =", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelNotEqualTo(Float value) { + addCriterion("CHECKEDFLOODLEVEL <>", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelGreaterThan(Float value) { + addCriterion("CHECKEDFLOODLEVEL >", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelGreaterThanOrEqualTo(Float value) { + addCriterion("CHECKEDFLOODLEVEL >=", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelLessThan(Float value) { + addCriterion("CHECKEDFLOODLEVEL <", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelLessThanOrEqualTo(Float value) { + addCriterion("CHECKEDFLOODLEVEL <=", value, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelIn(List values) { + addCriterion("CHECKEDFLOODLEVEL in", values, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelNotIn(List values) { + addCriterion("CHECKEDFLOODLEVEL not in", values, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelBetween(Float value1, Float value2) { + addCriterion("CHECKEDFLOODLEVEL between", value1, value2, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andCheckedfloodlevelNotBetween(Float value1, Float value2) { + addCriterion("CHECKEDFLOODLEVEL not between", value1, value2, "checkedfloodlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelIsNull() { + addCriterion("HISTORICALMAXLEVEL is null"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelIsNotNull() { + addCriterion("HISTORICALMAXLEVEL is not null"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelEqualTo(Float value) { + addCriterion("HISTORICALMAXLEVEL =", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelNotEqualTo(Float value) { + addCriterion("HISTORICALMAXLEVEL <>", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelGreaterThan(Float value) { + addCriterion("HISTORICALMAXLEVEL >", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelGreaterThanOrEqualTo(Float value) { + addCriterion("HISTORICALMAXLEVEL >=", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelLessThan(Float value) { + addCriterion("HISTORICALMAXLEVEL <", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelLessThanOrEqualTo(Float value) { + addCriterion("HISTORICALMAXLEVEL <=", value, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelIn(List values) { + addCriterion("HISTORICALMAXLEVEL in", values, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelNotIn(List values) { + addCriterion("HISTORICALMAXLEVEL not in", values, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelBetween(Float value1, Float value2) { + addCriterion("HISTORICALMAXLEVEL between", value1, value2, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andHistoricalmaxlevelNotBetween(Float value1, Float value2) { + addCriterion("HISTORICALMAXLEVEL not between", value1, value2, "historicalmaxlevel"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeIsNull() { + addCriterion("FLOODCONTROLVOLUME is null"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeIsNotNull() { + addCriterion("FLOODCONTROLVOLUME is not null"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeEqualTo(Float value) { + addCriterion("FLOODCONTROLVOLUME =", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeNotEqualTo(Float value) { + addCriterion("FLOODCONTROLVOLUME <>", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeGreaterThan(Float value) { + addCriterion("FLOODCONTROLVOLUME >", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeGreaterThanOrEqualTo(Float value) { + addCriterion("FLOODCONTROLVOLUME >=", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeLessThan(Float value) { + addCriterion("FLOODCONTROLVOLUME <", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeLessThanOrEqualTo(Float value) { + addCriterion("FLOODCONTROLVOLUME <=", value, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeIn(List values) { + addCriterion("FLOODCONTROLVOLUME in", values, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeNotIn(List values) { + addCriterion("FLOODCONTROLVOLUME not in", values, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeBetween(Float value1, Float value2) { + addCriterion("FLOODCONTROLVOLUME between", value1, value2, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andFloodcontrolvolumeNotBetween(Float value1, Float value2) { + addCriterion("FLOODCONTROLVOLUME not between", value1, value2, "floodcontrolvolume"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelIsNull() { + addCriterion("DESIGNEDFLOODLEVEL is null"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelIsNotNull() { + addCriterion("DESIGNEDFLOODLEVEL is not null"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelEqualTo(Float value) { + addCriterion("DESIGNEDFLOODLEVEL =", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelNotEqualTo(Float value) { + addCriterion("DESIGNEDFLOODLEVEL <>", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelGreaterThan(Float value) { + addCriterion("DESIGNEDFLOODLEVEL >", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelGreaterThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFLOODLEVEL >=", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelLessThan(Float value) { + addCriterion("DESIGNEDFLOODLEVEL <", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelLessThanOrEqualTo(Float value) { + addCriterion("DESIGNEDFLOODLEVEL <=", value, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelIn(List values) { + addCriterion("DESIGNEDFLOODLEVEL in", values, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelNotIn(List values) { + addCriterion("DESIGNEDFLOODLEVEL not in", values, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFLOODLEVEL between", value1, value2, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andDesignedfloodlevelNotBetween(Float value1, Float value2) { + addCriterion("DESIGNEDFLOODLEVEL not between", value1, value2, "designedfloodlevel"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeIsNull() { + addCriterion("MAXLEVELTIME is null"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeIsNotNull() { + addCriterion("MAXLEVELTIME is not null"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeEqualTo(Date value) { + addCriterion("MAXLEVELTIME =", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeNotEqualTo(Date value) { + addCriterion("MAXLEVELTIME <>", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeGreaterThan(Date value) { + addCriterion("MAXLEVELTIME >", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeGreaterThanOrEqualTo(Date value) { + addCriterion("MAXLEVELTIME >=", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeLessThan(Date value) { + addCriterion("MAXLEVELTIME <", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeLessThanOrEqualTo(Date value) { + addCriterion("MAXLEVELTIME <=", value, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeIn(List values) { + addCriterion("MAXLEVELTIME in", values, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeNotIn(List values) { + addCriterion("MAXLEVELTIME not in", values, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeBetween(Date value1, Date value2) { + addCriterion("MAXLEVELTIME between", value1, value2, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andMaxleveltimeNotBetween(Date value1, Date value2) { + addCriterion("MAXLEVELTIME not between", value1, value2, "maxleveltime"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeIsNull() { + addCriterion("UTILIZABLEVOLUME is null"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeIsNotNull() { + addCriterion("UTILIZABLEVOLUME is not null"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeEqualTo(Float value) { + addCriterion("UTILIZABLEVOLUME =", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeNotEqualTo(Float value) { + addCriterion("UTILIZABLEVOLUME <>", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeGreaterThan(Float value) { + addCriterion("UTILIZABLEVOLUME >", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeGreaterThanOrEqualTo(Float value) { + addCriterion("UTILIZABLEVOLUME >=", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeLessThan(Float value) { + addCriterion("UTILIZABLEVOLUME <", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeLessThanOrEqualTo(Float value) { + addCriterion("UTILIZABLEVOLUME <=", value, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeIn(List values) { + addCriterion("UTILIZABLEVOLUME in", values, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeNotIn(List values) { + addCriterion("UTILIZABLEVOLUME not in", values, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeBetween(Float value1, Float value2) { + addCriterion("UTILIZABLEVOLUME between", value1, value2, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andUtilizablevolumeNotBetween(Float value1, Float value2) { + addCriterion("UTILIZABLEVOLUME not between", value1, value2, "utilizablevolume"); + return (Criteria) this; + } + + public Criteria andNorrmallevelIsNull() { + addCriterion("NORRMALLEVEL is null"); + return (Criteria) this; + } + + public Criteria andNorrmallevelIsNotNull() { + addCriterion("NORRMALLEVEL is not null"); + return (Criteria) this; + } + + public Criteria andNorrmallevelEqualTo(Float value) { + addCriterion("NORRMALLEVEL =", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelNotEqualTo(Float value) { + addCriterion("NORRMALLEVEL <>", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelGreaterThan(Float value) { + addCriterion("NORRMALLEVEL >", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelGreaterThanOrEqualTo(Float value) { + addCriterion("NORRMALLEVEL >=", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelLessThan(Float value) { + addCriterion("NORRMALLEVEL <", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelLessThanOrEqualTo(Float value) { + addCriterion("NORRMALLEVEL <=", value, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelIn(List values) { + addCriterion("NORRMALLEVEL in", values, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelNotIn(List values) { + addCriterion("NORRMALLEVEL not in", values, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelBetween(Float value1, Float value2) { + addCriterion("NORRMALLEVEL between", value1, value2, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andNorrmallevelNotBetween(Float value1, Float value2) { + addCriterion("NORRMALLEVEL not between", value1, value2, "norrmallevel"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeIsNull() { + addCriterion("FLOODDETENTIONVOLUME is null"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeIsNotNull() { + addCriterion("FLOODDETENTIONVOLUME is not null"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeEqualTo(Float value) { + addCriterion("FLOODDETENTIONVOLUME =", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeNotEqualTo(Float value) { + addCriterion("FLOODDETENTIONVOLUME <>", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeGreaterThan(Float value) { + addCriterion("FLOODDETENTIONVOLUME >", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeGreaterThanOrEqualTo(Float value) { + addCriterion("FLOODDETENTIONVOLUME >=", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeLessThan(Float value) { + addCriterion("FLOODDETENTIONVOLUME <", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeLessThanOrEqualTo(Float value) { + addCriterion("FLOODDETENTIONVOLUME <=", value, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeIn(List values) { + addCriterion("FLOODDETENTIONVOLUME in", values, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeNotIn(List values) { + addCriterion("FLOODDETENTIONVOLUME not in", values, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeBetween(Float value1, Float value2) { + addCriterion("FLOODDETENTIONVOLUME between", value1, value2, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andFlooddetentionvolumeNotBetween(Float value1, Float value2) { + addCriterion("FLOODDETENTIONVOLUME not between", value1, value2, "flooddetentionvolume"); + return (Criteria) this; + } + + public Criteria andDeadlevelIsNull() { + addCriterion("DEADLEVEL is null"); + return (Criteria) this; + } + + public Criteria andDeadlevelIsNotNull() { + addCriterion("DEADLEVEL is not null"); + return (Criteria) this; + } + + public Criteria andDeadlevelEqualTo(Float value) { + addCriterion("DEADLEVEL =", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelNotEqualTo(Float value) { + addCriterion("DEADLEVEL <>", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelGreaterThan(Float value) { + addCriterion("DEADLEVEL >", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelGreaterThanOrEqualTo(Float value) { + addCriterion("DEADLEVEL >=", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelLessThan(Float value) { + addCriterion("DEADLEVEL <", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelLessThanOrEqualTo(Float value) { + addCriterion("DEADLEVEL <=", value, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelIn(List values) { + addCriterion("DEADLEVEL in", values, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelNotIn(List values) { + addCriterion("DEADLEVEL not in", values, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelBetween(Float value1, Float value2) { + addCriterion("DEADLEVEL between", value1, value2, "deadlevel"); + return (Criteria) this; + } + + public Criteria andDeadlevelNotBetween(Float value1, Float value2) { + addCriterion("DEADLEVEL not between", value1, value2, "deadlevel"); + return (Criteria) this; + } + + public Criteria andAreaCodeIsNull() { + addCriterion("AREA_CODE is null"); + return (Criteria) this; + } + + public Criteria andAreaCodeIsNotNull() { + addCriterion("AREA_CODE is not null"); + return (Criteria) this; + } + + public Criteria andAreaCodeEqualTo(String value) { + addCriterion("AREA_CODE =", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeNotEqualTo(String value) { + addCriterion("AREA_CODE <>", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeGreaterThan(String value) { + addCriterion("AREA_CODE >", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeGreaterThanOrEqualTo(String value) { + addCriterion("AREA_CODE >=", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeLessThan(String value) { + addCriterion("AREA_CODE <", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeLessThanOrEqualTo(String value) { + addCriterion("AREA_CODE <=", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeLike(String value) { + addCriterion("AREA_CODE like", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeNotLike(String value) { + addCriterion("AREA_CODE not like", value, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeIn(List values) { + addCriterion("AREA_CODE in", values, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeNotIn(List values) { + addCriterion("AREA_CODE not in", values, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeBetween(String value1, String value2) { + addCriterion("AREA_CODE between", value1, value2, "areaCode"); + return (Criteria) this; + } + + public Criteria andAreaCodeNotBetween(String value1, String value2) { + addCriterion("AREA_CODE not between", value1, value2, "areaCode"); + return (Criteria) this; + } + + public Criteria andLrcdIsNull() { + addCriterion("LRCD is null"); + return (Criteria) this; + } + + public Criteria andLrcdIsNotNull() { + addCriterion("LRCD is not null"); + return (Criteria) this; + } + + public Criteria andLrcdEqualTo(String value) { + addCriterion("LRCD =", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotEqualTo(String value) { + addCriterion("LRCD <>", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdGreaterThan(String value) { + addCriterion("LRCD >", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdGreaterThanOrEqualTo(String value) { + addCriterion("LRCD >=", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLessThan(String value) { + addCriterion("LRCD <", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLessThanOrEqualTo(String value) { + addCriterion("LRCD <=", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLike(String value) { + addCriterion("LRCD like", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotLike(String value) { + addCriterion("LRCD not like", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdIn(List values) { + addCriterion("LRCD in", values, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotIn(List values) { + addCriterion("LRCD not in", values, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdBetween(String value1, String value2) { + addCriterion("LRCD between", value1, value2, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotBetween(String value1, String value2) { + addCriterion("LRCD not between", value1, value2, "lrcd"); + return (Criteria) this; + } + + public Criteria andSzhldmIsNull() { + addCriterion("SZHLDM is null"); + return (Criteria) this; + } + + public Criteria andSzhldmIsNotNull() { + addCriterion("SZHLDM is not null"); + return (Criteria) this; + } + + public Criteria andSzhldmEqualTo(String value) { + addCriterion("SZHLDM =", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmNotEqualTo(String value) { + addCriterion("SZHLDM <>", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmGreaterThan(String value) { + addCriterion("SZHLDM >", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmGreaterThanOrEqualTo(String value) { + addCriterion("SZHLDM >=", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmLessThan(String value) { + addCriterion("SZHLDM <", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmLessThanOrEqualTo(String value) { + addCriterion("SZHLDM <=", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmLike(String value) { + addCriterion("SZHLDM like", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmNotLike(String value) { + addCriterion("SZHLDM not like", value, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmIn(List values) { + addCriterion("SZHLDM in", values, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmNotIn(List values) { + addCriterion("SZHLDM not in", values, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmBetween(String value1, String value2) { + addCriterion("SZHLDM between", value1, value2, "szhldm"); + return (Criteria) this; + } + + public Criteria andSzhldmNotBetween(String value1, String value2) { + addCriterion("SZHLDM not between", value1, value2, "szhldm"); + return (Criteria) this; + } + + public Criteria andDongjIsNull() { + addCriterion("DONGJ is null"); + return (Criteria) this; + } + + public Criteria andDongjIsNotNull() { + addCriterion("DONGJ is not null"); + return (Criteria) this; + } + + public Criteria andDongjEqualTo(Float value) { + addCriterion("DONGJ =", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjNotEqualTo(Float value) { + addCriterion("DONGJ <>", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjGreaterThan(Float value) { + addCriterion("DONGJ >", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjGreaterThanOrEqualTo(Float value) { + addCriterion("DONGJ >=", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjLessThan(Float value) { + addCriterion("DONGJ <", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjLessThanOrEqualTo(Float value) { + addCriterion("DONGJ <=", value, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjIn(List values) { + addCriterion("DONGJ in", values, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjNotIn(List values) { + addCriterion("DONGJ not in", values, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjBetween(Float value1, Float value2) { + addCriterion("DONGJ between", value1, value2, "dongj"); + return (Criteria) this; + } + + public Criteria andDongjNotBetween(Float value1, Float value2) { + addCriterion("DONGJ not between", value1, value2, "dongj"); + return (Criteria) this; + } + + public Criteria andBeiwIsNull() { + addCriterion("BEIW is null"); + return (Criteria) this; + } + + public Criteria andBeiwIsNotNull() { + addCriterion("BEIW is not null"); + return (Criteria) this; + } + + public Criteria andBeiwEqualTo(Float value) { + addCriterion("BEIW =", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwNotEqualTo(Float value) { + addCriterion("BEIW <>", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwGreaterThan(Float value) { + addCriterion("BEIW >", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwGreaterThanOrEqualTo(Float value) { + addCriterion("BEIW >=", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwLessThan(Float value) { + addCriterion("BEIW <", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwLessThanOrEqualTo(Float value) { + addCriterion("BEIW <=", value, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwIn(List values) { + addCriterion("BEIW in", values, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwNotIn(List values) { + addCriterion("BEIW not in", values, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwBetween(Float value1, Float value2) { + addCriterion("BEIW between", value1, value2, "beiw"); + return (Criteria) this; + } + + public Criteria andBeiwNotBetween(Float value1, Float value2) { + addCriterion("BEIW not between", value1, value2, "beiw"); + 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdata.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdata.java new file mode 100644 index 0000000..d389af5 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdata.java @@ -0,0 +1,50 @@ +package com.hnac.hzims.baseinfo.entity; + +/** + * 水库数据扩展表 + * + * @author moze + * + */ +public class ReservoirRefdata { + private String stcd; // 水库编号 + + private String refstcd; // 关联测站 + + private String refqpoint; // 关联流量数据点 + + private String refzpoint; // 关联水位数据点 + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } + + public String getRefstcd() { + return refstcd; + } + + public void setRefstcd(String refstcd) { + this.refstcd = refstcd; + } + + public String getRefqpoint() { + return refqpoint; + } + + public void setRefqpoint(String refqpoint) { + this.refqpoint = refqpoint; + } + + public String getRefzpoint() { + return refzpoint; + } + + public void setRefzpoint(String refzpoint) { + this.refzpoint = refzpoint; + } + +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdataExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdataExample.java new file mode 100644 index 0000000..c59eabc --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirRefdataExample.java @@ -0,0 +1,480 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.util.ArrayList; +import java.util.List; + +public class ReservoirRefdataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ReservoirRefdataExample() { + 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 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 andRefstcdIsNull() { + addCriterion("REFSTCD is null"); + return (Criteria) this; + } + + public Criteria andRefstcdIsNotNull() { + addCriterion("REFSTCD is not null"); + return (Criteria) this; + } + + public Criteria andRefstcdEqualTo(String value) { + addCriterion("REFSTCD =", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdNotEqualTo(String value) { + addCriterion("REFSTCD <>", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdGreaterThan(String value) { + addCriterion("REFSTCD >", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdGreaterThanOrEqualTo(String value) { + addCriterion("REFSTCD >=", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdLessThan(String value) { + addCriterion("REFSTCD <", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdLessThanOrEqualTo(String value) { + addCriterion("REFSTCD <=", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdLike(String value) { + addCriterion("REFSTCD like", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdNotLike(String value) { + addCriterion("REFSTCD not like", value, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdIn(List values) { + addCriterion("REFSTCD in", values, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdNotIn(List values) { + addCriterion("REFSTCD not in", values, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdBetween(String value1, String value2) { + addCriterion("REFSTCD between", value1, value2, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefstcdNotBetween(String value1, String value2) { + addCriterion("REFSTCD not between", value1, value2, "refstcd"); + return (Criteria) this; + } + + public Criteria andRefqpointIsNull() { + addCriterion("REFQPOINT is null"); + return (Criteria) this; + } + + public Criteria andRefqpointIsNotNull() { + addCriterion("REFQPOINT is not null"); + return (Criteria) this; + } + + public Criteria andRefqpointEqualTo(String value) { + addCriterion("REFQPOINT =", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointNotEqualTo(String value) { + addCriterion("REFQPOINT <>", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointGreaterThan(String value) { + addCriterion("REFQPOINT >", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointGreaterThanOrEqualTo(String value) { + addCriterion("REFQPOINT >=", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointLessThan(String value) { + addCriterion("REFQPOINT <", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointLessThanOrEqualTo(String value) { + addCriterion("REFQPOINT <=", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointLike(String value) { + addCriterion("REFQPOINT like", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointNotLike(String value) { + addCriterion("REFQPOINT not like", value, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointIn(List values) { + addCriterion("REFQPOINT in", values, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointNotIn(List values) { + addCriterion("REFQPOINT not in", values, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointBetween(String value1, String value2) { + addCriterion("REFQPOINT between", value1, value2, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefqpointNotBetween(String value1, String value2) { + addCriterion("REFQPOINT not between", value1, value2, "refqpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointIsNull() { + addCriterion("REFZPOINT is null"); + return (Criteria) this; + } + + public Criteria andRefzpointIsNotNull() { + addCriterion("REFZPOINT is not null"); + return (Criteria) this; + } + + public Criteria andRefzpointEqualTo(String value) { + addCriterion("REFZPOINT =", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointNotEqualTo(String value) { + addCriterion("REFZPOINT <>", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointGreaterThan(String value) { + addCriterion("REFZPOINT >", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointGreaterThanOrEqualTo(String value) { + addCriterion("REFZPOINT >=", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointLessThan(String value) { + addCriterion("REFZPOINT <", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointLessThanOrEqualTo(String value) { + addCriterion("REFZPOINT <=", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointLike(String value) { + addCriterion("REFZPOINT like", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointNotLike(String value) { + addCriterion("REFZPOINT not like", value, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointIn(List values) { + addCriterion("REFZPOINT in", values, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointNotIn(List values) { + addCriterion("REFZPOINT not in", values, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointBetween(String value1, String value2) { + addCriterion("REFZPOINT between", value1, value2, "refzpoint"); + return (Criteria) this; + } + + public Criteria andRefzpointNotBetween(String value1, String value2) { + addCriterion("REFZPOINT not between", value1, value2, "refzpoint"); + 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManage.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManage.java new file mode 100644 index 0000000..fdb15f0 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManage.java @@ -0,0 +1,95 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; + +public class ReservoirWaterManage { + private Integer id; + + private Integer month; + + private BigDecimal firstArea; + + private BigDecimal secondArea; + + private BigDecimal thirdArea; + + private BigDecimal fourthArea; + + private BigDecimal fivthArea; + + private BigDecimal sixthArea; + + private String stcd; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getMonth() { + return month; + } + + public void setMonth(Integer month) { + this.month = month; + } + + public BigDecimal getFirstArea() { + return firstArea; + } + + public void setFirstArea(BigDecimal firstArea) { + this.firstArea = firstArea; + } + + public BigDecimal getSecondArea() { + return secondArea; + } + + public void setSecondArea(BigDecimal secondArea) { + this.secondArea = secondArea; + } + + public BigDecimal getThirdArea() { + return thirdArea; + } + + public void setThirdArea(BigDecimal thirdArea) { + this.thirdArea = thirdArea; + } + + public BigDecimal getFourthArea() { + return fourthArea; + } + + public void setFourthArea(BigDecimal fourthArea) { + this.fourthArea = fourthArea; + } + + public BigDecimal getFivthArea() { + return fivthArea; + } + + public void setFivthArea(BigDecimal fivthArea) { + this.fivthArea = fivthArea; + } + + public BigDecimal getSixthArea() { + return sixthArea; + } + + public void setSixthArea(BigDecimal sixthArea) { + this.sixthArea = sixthArea; + } + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManageExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManageExample.java new file mode 100644 index 0000000..64bf2f4 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/ReservoirWaterManageExample.java @@ -0,0 +1,751 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class ReservoirWaterManageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ReservoirWaterManageExample() { + 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(Integer value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("ID not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMonthIsNull() { + addCriterion("MONTH is null"); + return (Criteria) this; + } + + public Criteria andMonthIsNotNull() { + addCriterion("MONTH is not null"); + return (Criteria) this; + } + + public Criteria andMonthEqualTo(Integer value) { + addCriterion("MONTH =", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthNotEqualTo(Integer value) { + addCriterion("MONTH <>", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthGreaterThan(Integer value) { + addCriterion("MONTH >", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthGreaterThanOrEqualTo(Integer value) { + addCriterion("MONTH >=", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthLessThan(Integer value) { + addCriterion("MONTH <", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthLessThanOrEqualTo(Integer value) { + addCriterion("MONTH <=", value, "month"); + return (Criteria) this; + } + + public Criteria andMonthIn(List values) { + addCriterion("MONTH in", values, "month"); + return (Criteria) this; + } + + public Criteria andMonthNotIn(List values) { + addCriterion("MONTH not in", values, "month"); + return (Criteria) this; + } + + public Criteria andMonthBetween(Integer value1, Integer value2) { + addCriterion("MONTH between", value1, value2, "month"); + return (Criteria) this; + } + + public Criteria andMonthNotBetween(Integer value1, Integer value2) { + addCriterion("MONTH not between", value1, value2, "month"); + return (Criteria) this; + } + + public Criteria andFirstAreaIsNull() { + addCriterion("FIRST_AREA is null"); + return (Criteria) this; + } + + public Criteria andFirstAreaIsNotNull() { + addCriterion("FIRST_AREA is not null"); + return (Criteria) this; + } + + public Criteria andFirstAreaEqualTo(BigDecimal value) { + addCriterion("FIRST_AREA =", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaNotEqualTo(BigDecimal value) { + addCriterion("FIRST_AREA <>", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaGreaterThan(BigDecimal value) { + addCriterion("FIRST_AREA >", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("FIRST_AREA >=", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaLessThan(BigDecimal value) { + addCriterion("FIRST_AREA <", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("FIRST_AREA <=", value, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaIn(List values) { + addCriterion("FIRST_AREA in", values, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaNotIn(List values) { + addCriterion("FIRST_AREA not in", values, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FIRST_AREA between", value1, value2, "firstArea"); + return (Criteria) this; + } + + public Criteria andFirstAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FIRST_AREA not between", value1, value2, "firstArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaIsNull() { + addCriterion("SECOND_AREA is null"); + return (Criteria) this; + } + + public Criteria andSecondAreaIsNotNull() { + addCriterion("SECOND_AREA is not null"); + return (Criteria) this; + } + + public Criteria andSecondAreaEqualTo(BigDecimal value) { + addCriterion("SECOND_AREA =", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaNotEqualTo(BigDecimal value) { + addCriterion("SECOND_AREA <>", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaGreaterThan(BigDecimal value) { + addCriterion("SECOND_AREA >", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("SECOND_AREA >=", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaLessThan(BigDecimal value) { + addCriterion("SECOND_AREA <", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("SECOND_AREA <=", value, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaIn(List values) { + addCriterion("SECOND_AREA in", values, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaNotIn(List values) { + addCriterion("SECOND_AREA not in", values, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("SECOND_AREA between", value1, value2, "secondArea"); + return (Criteria) this; + } + + public Criteria andSecondAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("SECOND_AREA not between", value1, value2, "secondArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaIsNull() { + addCriterion("THIRD_AREA is null"); + return (Criteria) this; + } + + public Criteria andThirdAreaIsNotNull() { + addCriterion("THIRD_AREA is not null"); + return (Criteria) this; + } + + public Criteria andThirdAreaEqualTo(BigDecimal value) { + addCriterion("THIRD_AREA =", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaNotEqualTo(BigDecimal value) { + addCriterion("THIRD_AREA <>", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaGreaterThan(BigDecimal value) { + addCriterion("THIRD_AREA >", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("THIRD_AREA >=", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaLessThan(BigDecimal value) { + addCriterion("THIRD_AREA <", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("THIRD_AREA <=", value, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaIn(List values) { + addCriterion("THIRD_AREA in", values, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaNotIn(List values) { + addCriterion("THIRD_AREA not in", values, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("THIRD_AREA between", value1, value2, "thirdArea"); + return (Criteria) this; + } + + public Criteria andThirdAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("THIRD_AREA not between", value1, value2, "thirdArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaIsNull() { + addCriterion("FOURTH_AREA is null"); + return (Criteria) this; + } + + public Criteria andFourthAreaIsNotNull() { + addCriterion("FOURTH_AREA is not null"); + return (Criteria) this; + } + + public Criteria andFourthAreaEqualTo(BigDecimal value) { + addCriterion("FOURTH_AREA =", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaNotEqualTo(BigDecimal value) { + addCriterion("FOURTH_AREA <>", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaGreaterThan(BigDecimal value) { + addCriterion("FOURTH_AREA >", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("FOURTH_AREA >=", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaLessThan(BigDecimal value) { + addCriterion("FOURTH_AREA <", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("FOURTH_AREA <=", value, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaIn(List values) { + addCriterion("FOURTH_AREA in", values, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaNotIn(List values) { + addCriterion("FOURTH_AREA not in", values, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FOURTH_AREA between", value1, value2, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFourthAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FOURTH_AREA not between", value1, value2, "fourthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaIsNull() { + addCriterion("FIVTH_AREA is null"); + return (Criteria) this; + } + + public Criteria andFivthAreaIsNotNull() { + addCriterion("FIVTH_AREA is not null"); + return (Criteria) this; + } + + public Criteria andFivthAreaEqualTo(BigDecimal value) { + addCriterion("FIVTH_AREA =", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaNotEqualTo(BigDecimal value) { + addCriterion("FIVTH_AREA <>", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaGreaterThan(BigDecimal value) { + addCriterion("FIVTH_AREA >", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("FIVTH_AREA >=", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaLessThan(BigDecimal value) { + addCriterion("FIVTH_AREA <", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("FIVTH_AREA <=", value, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaIn(List values) { + addCriterion("FIVTH_AREA in", values, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaNotIn(List values) { + addCriterion("FIVTH_AREA not in", values, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FIVTH_AREA between", value1, value2, "fivthArea"); + return (Criteria) this; + } + + public Criteria andFivthAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("FIVTH_AREA not between", value1, value2, "fivthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaIsNull() { + addCriterion("SIXTH_AREA is null"); + return (Criteria) this; + } + + public Criteria andSixthAreaIsNotNull() { + addCriterion("SIXTH_AREA is not null"); + return (Criteria) this; + } + + public Criteria andSixthAreaEqualTo(BigDecimal value) { + addCriterion("SIXTH_AREA =", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaNotEqualTo(BigDecimal value) { + addCriterion("SIXTH_AREA <>", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaGreaterThan(BigDecimal value) { + addCriterion("SIXTH_AREA >", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("SIXTH_AREA >=", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaLessThan(BigDecimal value) { + addCriterion("SIXTH_AREA <", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaLessThanOrEqualTo(BigDecimal value) { + addCriterion("SIXTH_AREA <=", value, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaIn(List values) { + addCriterion("SIXTH_AREA in", values, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaNotIn(List values) { + addCriterion("SIXTH_AREA not in", values, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("SIXTH_AREA between", value1, value2, "sixthArea"); + return (Criteria) this; + } + + public Criteria andSixthAreaNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("SIXTH_AREA not between", value1, value2, "sixthArea"); + 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 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlB.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlB.java new file mode 100644 index 0000000..3bc009f --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlB.java @@ -0,0 +1,92 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 库(湖)容曲线表 + * + * @author moze + * + */ +public class StZvarlB { + private Integer id; + + private String stcd; // 水库编码 + + private Date mstm; // 施测时间 + + private Integer ptno; // 点序号 + + private BigDecimal rz; // 库水位 + + private BigDecimal w; // 蓄水量 + + private BigDecimal wsfa; // 水位面积 + + private Date moditime; // 时间戳 + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } + + public Date getMstm() { + return mstm; + } + + public void setMstm(Date mstm) { + this.mstm = mstm; + } + + public Integer getPtno() { + return ptno; + } + + public void setPtno(Integer ptno) { + this.ptno = ptno; + } + + public BigDecimal getRz() { + return rz; + } + + public void setRz(BigDecimal rz) { + this.rz = rz; + } + + public BigDecimal getW() { + return w; + } + + public void setW(BigDecimal w) { + this.w = w; + } + + public BigDecimal getWsfa() { + return wsfa; + } + + public void setWsfa(BigDecimal wsfa) { + this.wsfa = wsfa; + } + + public Date getModitime() { + return moditime; + } + + public void setModitime(Date moditime) { + this.moditime = moditime; + } +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlBExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlBExample.java new file mode 100644 index 0000000..d510e14 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/StZvarlBExample.java @@ -0,0 +1,692 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StZvarlBExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StZvarlBExample() { + 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(Integer value) { + addCriterion("ID =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("ID <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("ID >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("ID >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("ID <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("ID between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer 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 andMstmIsNull() { + addCriterion("MSTM is null"); + return (Criteria) this; + } + + public Criteria andMstmIsNotNull() { + addCriterion("MSTM is not null"); + return (Criteria) this; + } + + public Criteria andMstmEqualTo(Date value) { + addCriterion("MSTM =", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmNotEqualTo(Date value) { + addCriterion("MSTM <>", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmGreaterThan(Date value) { + addCriterion("MSTM >", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmGreaterThanOrEqualTo(Date value) { + addCriterion("MSTM >=", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmLessThan(Date value) { + addCriterion("MSTM <", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmLessThanOrEqualTo(Date value) { + addCriterion("MSTM <=", value, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmIn(List values) { + addCriterion("MSTM in", values, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmNotIn(List values) { + addCriterion("MSTM not in", values, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmBetween(Date value1, Date value2) { + addCriterion("MSTM between", value1, value2, "mstm"); + return (Criteria) this; + } + + public Criteria andMstmNotBetween(Date value1, Date value2) { + addCriterion("MSTM not between", value1, value2, "mstm"); + return (Criteria) this; + } + + public Criteria andPtnoIsNull() { + addCriterion("PTNO is null"); + return (Criteria) this; + } + + public Criteria andPtnoIsNotNull() { + addCriterion("PTNO is not null"); + return (Criteria) this; + } + + public Criteria andPtnoEqualTo(Integer value) { + addCriterion("PTNO =", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoNotEqualTo(Integer value) { + addCriterion("PTNO <>", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoGreaterThan(Integer value) { + addCriterion("PTNO >", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoGreaterThanOrEqualTo(Integer value) { + addCriterion("PTNO >=", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoLessThan(Integer value) { + addCriterion("PTNO <", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoLessThanOrEqualTo(Integer value) { + addCriterion("PTNO <=", value, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoIn(List values) { + addCriterion("PTNO in", values, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoNotIn(List values) { + addCriterion("PTNO not in", values, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoBetween(Integer value1, Integer value2) { + addCriterion("PTNO between", value1, value2, "ptno"); + return (Criteria) this; + } + + public Criteria andPtnoNotBetween(Integer value1, Integer value2) { + addCriterion("PTNO not between", value1, value2, "ptno"); + return (Criteria) this; + } + + public Criteria andRzIsNull() { + addCriterion("RZ is null"); + return (Criteria) this; + } + + public Criteria andRzIsNotNull() { + addCriterion("RZ is not null"); + return (Criteria) this; + } + + public Criteria andRzEqualTo(BigDecimal value) { + addCriterion("RZ =", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzNotEqualTo(BigDecimal value) { + addCriterion("RZ <>", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzGreaterThan(BigDecimal value) { + addCriterion("RZ >", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("RZ >=", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzLessThan(BigDecimal value) { + addCriterion("RZ <", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzLessThanOrEqualTo(BigDecimal value) { + addCriterion("RZ <=", value, "rz"); + return (Criteria) this; + } + + public Criteria andRzIn(List values) { + addCriterion("RZ in", values, "rz"); + return (Criteria) this; + } + + public Criteria andRzNotIn(List values) { + addCriterion("RZ not in", values, "rz"); + return (Criteria) this; + } + + public Criteria andRzBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RZ between", value1, value2, "rz"); + return (Criteria) this; + } + + public Criteria andRzNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RZ not between", value1, value2, "rz"); + return (Criteria) this; + } + + public Criteria andWIsNull() { + addCriterion("W is null"); + return (Criteria) this; + } + + public Criteria andWIsNotNull() { + addCriterion("W is not null"); + return (Criteria) this; + } + + public Criteria andWEqualTo(BigDecimal value) { + addCriterion("W =", value, "w"); + return (Criteria) this; + } + + public Criteria andWNotEqualTo(BigDecimal value) { + addCriterion("W <>", value, "w"); + return (Criteria) this; + } + + public Criteria andWGreaterThan(BigDecimal value) { + addCriterion("W >", value, "w"); + return (Criteria) this; + } + + public Criteria andWGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("W >=", value, "w"); + return (Criteria) this; + } + + public Criteria andWLessThan(BigDecimal value) { + addCriterion("W <", value, "w"); + return (Criteria) this; + } + + public Criteria andWLessThanOrEqualTo(BigDecimal value) { + addCriterion("W <=", value, "w"); + return (Criteria) this; + } + + public Criteria andWIn(List values) { + addCriterion("W in", values, "w"); + return (Criteria) this; + } + + public Criteria andWNotIn(List values) { + addCriterion("W not in", values, "w"); + return (Criteria) this; + } + + public Criteria andWBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("W between", value1, value2, "w"); + return (Criteria) this; + } + + public Criteria andWNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("W not between", value1, value2, "w"); + return (Criteria) this; + } + + public Criteria andWsfaIsNull() { + addCriterion("WSFA is null"); + return (Criteria) this; + } + + public Criteria andWsfaIsNotNull() { + addCriterion("WSFA is not null"); + return (Criteria) this; + } + + public Criteria andWsfaEqualTo(Integer value) { + addCriterion("WSFA =", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaNotEqualTo(Integer value) { + addCriterion("WSFA <>", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaGreaterThan(Integer value) { + addCriterion("WSFA >", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaGreaterThanOrEqualTo(Integer value) { + addCriterion("WSFA >=", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaLessThan(Integer value) { + addCriterion("WSFA <", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaLessThanOrEqualTo(Integer value) { + addCriterion("WSFA <=", value, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaIn(List values) { + addCriterion("WSFA in", values, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaNotIn(List values) { + addCriterion("WSFA not in", values, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaBetween(Integer value1, Integer value2) { + addCriterion("WSFA between", value1, value2, "wsfa"); + return (Criteria) this; + } + + public Criteria andWsfaNotBetween(Integer value1, Integer value2) { + addCriterion("WSFA not between", value1, value2, "wsfa"); + return (Criteria) this; + } + + public Criteria andModitimeIsNull() { + addCriterion("MODITIME is null"); + return (Criteria) this; + } + + public Criteria andModitimeIsNotNull() { + addCriterion("MODITIME is not null"); + return (Criteria) this; + } + + public Criteria andModitimeEqualTo(Date value) { + addCriterion("MODITIME =", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeNotEqualTo(Date value) { + addCriterion("MODITIME <>", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeGreaterThan(Date value) { + addCriterion("MODITIME >", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeGreaterThanOrEqualTo(Date value) { + addCriterion("MODITIME >=", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeLessThan(Date value) { + addCriterion("MODITIME <", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeLessThanOrEqualTo(Date value) { + addCriterion("MODITIME <=", value, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeIn(List values) { + addCriterion("MODITIME in", values, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeNotIn(List values) { + addCriterion("MODITIME not in", values, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeBetween(Date value1, Date value2) { + addCriterion("MODITIME between", value1, value2, "moditime"); + return (Criteria) this; + } + + public Criteria andModitimeNotBetween(Date value1, Date value2) { + addCriterion("MODITIME not between", value1, value2, "moditime"); + 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfB.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfB.java new file mode 100644 index 0000000..3c71b9b --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfB.java @@ -0,0 +1,72 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; + +/** + * 湖库<国标> + * + * @author moze + * + */ +public class WqLrinfB { + private String lrcd; // 湖库代码 + + private String watp; // 水域类型 + + private String lrnm; // 湖(库)名称 + + private BigDecimal lrar; // 湖(库)面积 + + private BigDecimal rscp; // 水库库容 + + private String coordinateset; // 经纬集合 + + public String getCoordinateset() { + return coordinateset; + } + + public void setCoordinateset(String coordinateset) { + this.coordinateset = coordinateset; + } + + public String getLrcd() { + return lrcd; + } + + public void setLrcd(String lrcd) { + this.lrcd = lrcd; + } + + public String getWatp() { + return watp; + } + + public void setWatp(String watp) { + this.watp = watp; + } + + public String getLrnm() { + return lrnm; + } + + public void setLrnm(String lrnm) { + this.lrnm = lrnm; + } + + public BigDecimal getLrar() { + return lrar; + } + + public void setLrar(BigDecimal lrar) { + this.lrar = lrar; + } + + public BigDecimal getRscp() { + return rscp; + } + + public void setRscp(BigDecimal rscp) { + this.rscp = rscp; + } + +} \ No newline at end of file diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfBExample.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfBExample.java new file mode 100644 index 0000000..e8ef6c8 --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/entity/WqLrinfBExample.java @@ -0,0 +1,601 @@ +package com.hnac.hzims.baseinfo.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class WqLrinfBExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WqLrinfBExample() { + 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 andLrcdIsNull() { + addCriterion("LRCD is null"); + return (Criteria) this; + } + + public Criteria andLrcdIsNotNull() { + addCriterion("LRCD is not null"); + return (Criteria) this; + } + + public Criteria andLrcdEqualTo(String value) { + addCriterion("LRCD =", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotEqualTo(String value) { + addCriterion("LRCD <>", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdGreaterThan(String value) { + addCriterion("LRCD >", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdGreaterThanOrEqualTo(String value) { + addCriterion("LRCD >=", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLessThan(String value) { + addCriterion("LRCD <", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLessThanOrEqualTo(String value) { + addCriterion("LRCD <=", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdLike(String value) { + addCriterion("LRCD like", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotLike(String value) { + addCriterion("LRCD not like", value, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdIn(List values) { + addCriterion("LRCD in", values, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotIn(List values) { + addCriterion("LRCD not in", values, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdBetween(String value1, String value2) { + addCriterion("LRCD between", value1, value2, "lrcd"); + return (Criteria) this; + } + + public Criteria andLrcdNotBetween(String value1, String value2) { + addCriterion("LRCD not between", value1, value2, "lrcd"); + return (Criteria) this; + } + + public Criteria andWatpIsNull() { + addCriterion("WATP is null"); + return (Criteria) this; + } + + public Criteria andWatpIsNotNull() { + addCriterion("WATP is not null"); + return (Criteria) this; + } + + public Criteria andWatpEqualTo(String value) { + addCriterion("WATP =", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpNotEqualTo(String value) { + addCriterion("WATP <>", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpGreaterThan(String value) { + addCriterion("WATP >", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpGreaterThanOrEqualTo(String value) { + addCriterion("WATP >=", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpLessThan(String value) { + addCriterion("WATP <", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpLessThanOrEqualTo(String value) { + addCriterion("WATP <=", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpLike(String value) { + addCriterion("WATP like", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpNotLike(String value) { + addCriterion("WATP not like", value, "watp"); + return (Criteria) this; + } + + public Criteria andWatpIn(List values) { + addCriterion("WATP in", values, "watp"); + return (Criteria) this; + } + + public Criteria andWatpNotIn(List values) { + addCriterion("WATP not in", values, "watp"); + return (Criteria) this; + } + + public Criteria andWatpBetween(String value1, String value2) { + addCriterion("WATP between", value1, value2, "watp"); + return (Criteria) this; + } + + public Criteria andWatpNotBetween(String value1, String value2) { + addCriterion("WATP not between", value1, value2, "watp"); + return (Criteria) this; + } + + public Criteria andLrnmIsNull() { + addCriterion("LRNM is null"); + return (Criteria) this; + } + + public Criteria andLrnmIsNotNull() { + addCriterion("LRNM is not null"); + return (Criteria) this; + } + + public Criteria andLrnmEqualTo(String value) { + addCriterion("LRNM =", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmNotEqualTo(String value) { + addCriterion("LRNM <>", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmGreaterThan(String value) { + addCriterion("LRNM >", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmGreaterThanOrEqualTo(String value) { + addCriterion("LRNM >=", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmLessThan(String value) { + addCriterion("LRNM <", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmLessThanOrEqualTo(String value) { + addCriterion("LRNM <=", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmLike(String value) { + addCriterion("LRNM like", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmNotLike(String value) { + addCriterion("LRNM not like", value, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmIn(List values) { + addCriterion("LRNM in", values, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmNotIn(List values) { + addCriterion("LRNM not in", values, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmBetween(String value1, String value2) { + addCriterion("LRNM between", value1, value2, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrnmNotBetween(String value1, String value2) { + addCriterion("LRNM not between", value1, value2, "lrnm"); + return (Criteria) this; + } + + public Criteria andLrarIsNull() { + addCriterion("LRAR is null"); + return (Criteria) this; + } + + public Criteria andLrarIsNotNull() { + addCriterion("LRAR is not null"); + return (Criteria) this; + } + + public Criteria andLrarEqualTo(BigDecimal value) { + addCriterion("LRAR =", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarNotEqualTo(BigDecimal value) { + addCriterion("LRAR <>", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarGreaterThan(BigDecimal value) { + addCriterion("LRAR >", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("LRAR >=", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarLessThan(BigDecimal value) { + addCriterion("LRAR <", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarLessThanOrEqualTo(BigDecimal value) { + addCriterion("LRAR <=", value, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarIn(List values) { + addCriterion("LRAR in", values, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarNotIn(List values) { + addCriterion("LRAR not in", values, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("LRAR between", value1, value2, "lrar"); + return (Criteria) this; + } + + public Criteria andLrarNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("LRAR not between", value1, value2, "lrar"); + return (Criteria) this; + } + + public Criteria andRscpIsNull() { + addCriterion("RSCP is null"); + return (Criteria) this; + } + + public Criteria andRscpIsNotNull() { + addCriterion("RSCP is not null"); + return (Criteria) this; + } + + public Criteria andRscpEqualTo(BigDecimal value) { + addCriterion("RSCP =", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpNotEqualTo(BigDecimal value) { + addCriterion("RSCP <>", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpGreaterThan(BigDecimal value) { + addCriterion("RSCP >", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("RSCP >=", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpLessThan(BigDecimal value) { + addCriterion("RSCP <", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpLessThanOrEqualTo(BigDecimal value) { + addCriterion("RSCP <=", value, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpIn(List values) { + addCriterion("RSCP in", values, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpNotIn(List values) { + addCriterion("RSCP not in", values, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RSCP between", value1, value2, "rscp"); + return (Criteria) this; + } + + public Criteria andRscpNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("RSCP not between", value1, value2, "rscp"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIsNull() { + addCriterion("COORDINATESET is null"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIsNotNull() { + addCriterion("COORDINATESET is not null"); + return (Criteria) this; + } + + public Criteria andCoordinatesetEqualTo(String value) { + addCriterion("COORDINATESET =", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotEqualTo(String value) { + addCriterion("COORDINATESET <>", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetGreaterThan(String value) { + addCriterion("COORDINATESET >", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetGreaterThanOrEqualTo(String value) { + addCriterion("COORDINATESET >=", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLessThan(String value) { + addCriterion("COORDINATESET <", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLessThanOrEqualTo(String value) { + addCriterion("COORDINATESET <=", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetLike(String value) { + addCriterion("COORDINATESET like", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotLike(String value) { + addCriterion("COORDINATESET not like", value, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetIn(List values) { + addCriterion("COORDINATESET in", values, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotIn(List values) { + addCriterion("COORDINATESET not in", values, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetBetween(String value1, String value2) { + addCriterion("COORDINATESET between", value1, value2, "coordinateset"); + return (Criteria) this; + } + + public Criteria andCoordinatesetNotBetween(String value1, String value2) { + addCriterion("COORDINATESET not between", value1, value2, "coordinateset"); + 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/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirInfoVo.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirInfoVo.java new file mode 100644 index 0000000..16797da --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirInfoVo.java @@ -0,0 +1,64 @@ +package com.hnac.hzims.baseinfo.vo; + + +import com.hnac.hzims.baseinfo.entity.FileReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ReservoirInfo; +import lombok.Data; + +import java.util.List; + +@Data +public class ReservoirInfoVo extends ReservoirInfo { + private String rz; // 水位 + private String INQ; // 流量 + + + private List imageReservoirInfoList; + + private List fileReservoirInfoList; + + public ReservoirInfoVo() { + + } + + public ReservoirInfoVo(ReservoirInfo vo) { + this.setAveragerainfall(vo.getAveragerainfall()); + this.setBuilddate(vo.getBuilddate()); + this.setChecdedtotalflow(vo.getChecdedtotalflow()); + this.setCheckedfloodlevel(vo.getCheckedfloodlevel()); + this.setCheckedmaxflow(vo.getCheckedmaxflow()); + this.setChedkedfloodflow(vo.getChedkedfloodflow()); + this.setCompleteddate(vo.getCompleteddate()); + this.setDeadlevel(vo.getDeadlevel()); + this.setDesignedfillarea(vo.getDesignedfillarea()); + this.setDesignedfloodflow(vo.getDesignedfloodflow()); + this.setDesignedfloodlevel(vo.getDesignedfloodlevel()); + this.setDesignedmaxflow(vo.getDesignedmaxflow()); + this.setDesignedtotalflow(vo.getDesignedtotalflow()); + this.setDischarge(vo.getDischarge()); + this.setFloodcontrolvolume(vo.getFloodcontrolvolume()); + this.setFlooddetentionvolume(vo.getFlooddetentionvolume()); + this.setHistoricalmaxlevel(vo.getHistoricalmaxlevel()); + this.setLocation(vo.getLocation()); + this.setMaxleveltime(vo.getMaxleveltime()); + this.setName(vo.getName()); + this.setNorrmallevel(vo.getNorrmallevel()); + this.setRainarea(vo.getRainarea()); + this.setRoadconditiion(vo.getRoadconditiion()); + this.setRoadlength(vo.getRoadlength()); + this.setStationid(vo.getStationid()); + this.setStcd(vo.getStcd()); + this.setUtilizablevolume(vo.getUtilizablevolume()); + this.setVillage(vo.getVillage()); + this.setVolume(vo.getVolume()); + this.setBeiw(vo.getBeiw()); + this.setDongj(vo.getDongj()); + this.setMjflsscnwl(vo.getMjflsscnwl()); + setAreaCode(vo.getAreaCode()); + setLrcd(vo.getLrcd()); + setSzhldm(vo.getSzhldm()); + + } + +} diff --git a/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirRefdataVo.java b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirRefdataVo.java new file mode 100644 index 0000000..046ab2f --- /dev/null +++ b/hzims-service-api/base-info-api/src/main/java/com/hnac/hzims/baseinfo/vo/ReservoirRefdataVo.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.baseinfo.vo; + + +import com.hnac.hzims.baseinfo.entity.ReservoirRefdata; + +public class ReservoirRefdataVo extends ReservoirRefdata { + private String refqFactory; // 关联流量数据点point + private String refqGroupId; // 关联流量数据点point + private String refzFactory; // 关联水位数据点 + private String refzGroupId; // 关联水位数据点 + + public ReservoirRefdataVo(){ + + } + + public ReservoirRefdataVo(ReservoirRefdata model){ + setStcd(model.getStcd()); + setRefstcd(model.getRefstcd()); + setRefzpoint(model.getRefzpoint()); + setRefqpoint(model.getRefqpoint()); + } + + public String getRefqFactory() { + return refqFactory; + } + + public void setRefqFactory(String refqFactory) { + this.refqFactory = refqFactory; + } + + public String getRefqGroupId() { + return refqGroupId; + } + + public void setRefqGroupId(String refqGroupId) { + this.refqGroupId = refqGroupId; + } + + public String getRefzFactory() { + return refzFactory; + } + + public void setRefzFactory(String refzFactory) { + this.refzFactory = refzFactory; + } + + public String getRefzGroupId() { + return refzGroupId; + } + + public void setRefzGroupId(String refzGroupId) { + this.refzGroupId = refzGroupId; + } + + + +} diff --git a/hzims-service-api/common-api/pom.xml b/hzims-service-api/common-api/pom.xml index 49c639e..e238dbf 100644 --- a/hzims-service-api/common-api/pom.xml +++ b/hzims-service-api/common-api/pom.xml @@ -21,7 +21,11 @@ - + + com.github.ben-manes.caffeine + caffeine + 2.8.2 + com.alibaba easyexcel diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/cache/CaffeineCacheUtil.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/cache/CaffeineCacheUtil.java new file mode 100644 index 0000000..06b1e18 --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/cache/CaffeineCacheUtil.java @@ -0,0 +1,94 @@ +package com.hnac.hzims.cache; + +import com.github.benmanes.caffeine.cache.Cache; +import com.github.benmanes.caffeine.cache.Caffeine; +import com.hnac.hzims.entity.Report; +import com.hnac.hzims.entity.YearReport; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +//Caffeine采用了W-TinyLFU(LUR和LFU的优点结合)开源的缓存技术。缓存性能接近理论最优,属于是Guava Cache的增强版 +public class CaffeineCacheUtil { + + //创建guava cache + private static Cache loadingCache = Caffeine.newBuilder() + //cache的初始容量 + .initialCapacity(5) + //cache最大缓存数 + .maximumSize(50) + //设置写缓存后n秒钟过期 + .expireAfterWrite(1, TimeUnit.HOURS) + //设置读写缓存后n秒钟过期,实际很少用到,类似于expireAfterWrite + //.expireAfterAccess(17, TimeUnit.SECONDS) + .build(); + + private static Cache loadingYearCache = Caffeine.newBuilder() + //cache的初始容量 + .initialCapacity(5) + //cache最大缓存数 + .maximumSize(50) + //设置写缓存后n秒钟过期 + .expireAfterWrite(1, TimeUnit.HOURS) + //设置读写缓存后n秒钟过期,实际很少用到,类似于expireAfterWrite + //.expireAfterAccess(17, TimeUnit.SECONDS) + .build(); + + private static Cache>> loadingMapCache = Caffeine.newBuilder() + //cache的初始容量 + .initialCapacity(5) + //cache最大缓存数 + .maximumSize(50) + //设置写缓存后n秒钟过期 + .expireAfterWrite(1, TimeUnit.HOURS) + //设置读写缓存后n秒钟过期,实际很少用到,类似于expireAfterWrite + //.expireAfterAccess(17, TimeUnit.SECONDS) + .build(); + + public static void add(String key, Report report){ + // 往缓存写数据 + if(report!=null) { + loadingCache.put(key, report); + } + +// // 获取value的值,如果key不存在,获取value后再返回 +// String value = loadingCache.get(key, CaffeineCacheTest::getValueFromDB); +// System.out.println(value); +// // 删除key +// loadingCache.invalidate(key); + } + + public static void addYear(String key, YearReport report){ + // 往缓存写数据 + if(report!=null) { + loadingYearCache.put(key, report); + } + } + + public static void addMap(String key, List> report){ + // 往缓存写数据 + if(report!=null && !report.isEmpty()) { + loadingMapCache.put(key, report); + } + } + + public static List> getMap(String key){ +// // 获取value的值,如果key不存在,获取value后再返回 + List> report = loadingMapCache.getIfPresent(key); + return report; + } + + public static YearReport getYear(String key){ +// // 获取value的值,如果key不存在,获取value后再返回 + YearReport report = loadingYearCache.getIfPresent(key); + return report; + } + + public static Report get(String key){ +// // 获取value的值,如果key不存在,获取value后再返回 + Report report = loadingCache.getIfPresent(key); + return report; + } + +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/Report.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/Report.java new file mode 100644 index 0000000..7925b1c --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/Report.java @@ -0,0 +1,273 @@ +package com.hnac.hzims.entity; + +import com.hnac.hzims.enums.QueryDateTypeEnum; +import com.hnac.hzims.util.ReportDateUtil; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * 提供出去的报表 + * 提供基础业务数据以及统计数据 + * + * @Author: liugang + * @Date: 2019/7/8 15:03 + */ +public class Report { + + /** + * (唯一标识key,标题名称value), + */ + private List> title; + + /** + * 报表基础数据 + */ + private List data; + + /** + * 附加报表统计数据 + */ + private List standardData; + + /** + * 初始化基础报表数据 + * 把数据全部置为初始状态("-") + * + * @return + */ + public void initBaseReport(int size, Date begin, Date end, QueryDateTypeEnum dtEnum) { + data = new ArrayList<>(); + Calendar cal = Calendar.getInstance(); + cal.setTime(begin); + SimpleDateFormat sdf = ReportDateUtil.getSimpleDateFormatByType(dtEnum); + int step = ReportDateUtil.getCalendarType(dtEnum); + Date temp = cal.getTime(); + while (temp.before(end)) { + String key = sdf.format(temp); + ReportUnit unit = new ReportUnit(); + unit.init(key, size); + data.add(unit); + cal.set(step, cal.get(step) + 1); + temp = cal.getTime(); + } + } + + public void initBaseReportMonth(int day,int month){ + data = new ArrayList<>(); + for(int i=1;i<=day;i++){ + String key=i> 9 ? ""+i:"0"+i; + ReportUnit unit = new ReportUnit(); + unit.init(key, month); + data.add(unit); + } + ReportUnit unit = new ReportUnit(); + unit.init("max", month); + data.add(unit); + + unit = new ReportUnit(); + unit.init("maxDate", month); + data.add(unit); + + unit = new ReportUnit(); + unit.init("min", month); + data.add(unit); + + unit = new ReportUnit(); + unit.init("minDate", month); + data.add(unit); + + unit = new ReportUnit(); + unit.init("avg", month); + data.add(unit); + } + + public void initBaseReportMaxMin(int size, Date begin, Date end, QueryDateTypeEnum dtEnum) { + initBaseReport(size, begin, end, dtEnum); + ReportUnit unit = new ReportUnit(); + unit.init("max", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("maxDate", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("min", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("minDate", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("avg", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("range", size);//极差 + data.add(unit); + } + + public void initBaseReportHistory(int size){ + data = new ArrayList<>(); + ReportUnit unit = new ReportUnit(); + unit.init("max", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("maxDate", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("min", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("minDate", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("avg", size); + data.add(unit); + + unit = new ReportUnit(); + unit.init("range", size);//极差 + data.add(unit); + } + + public void initCompareBaseReport(int size, Date begin, Date end, QueryDateTypeEnum dtEnum) { + data = new ArrayList<>(); + Calendar cal = Calendar.getInstance(); + cal.setTime(begin); + SimpleDateFormat sdf = new SimpleDateFormat("MM-dd"); + int step = ReportDateUtil.getCalendarType(dtEnum); + Date temp = cal.getTime(); + while (temp.before(end)) { + String key = sdf.format(temp); + ReportUnit unit = new ReportUnit(); + unit.init(key, size); + data.add(unit); + cal.set(step, cal.get(step) + 1); + temp = cal.getTime(); + } + } + + public void initBaseRingReport(int size, Date begin, Date end, QueryDateTypeEnum dtEnum){ + data = new ArrayList<>(); + Calendar cal = Calendar.getInstance(); + cal.setTime(begin); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH"); + int step = ReportDateUtil.getCalendarType(dtEnum); + Date temp = cal.getTime(); + while (temp.before(end)) { + String key = sdf.format(temp); + ReportUnit unit = new ReportUnit(); + unit.init(key, size); + data.add(unit); + cal.set(step, cal.get(step) + 1); + temp = cal.getTime(); + } + } + + public void initRingBaseReport(int size, Date begin, Date end, QueryDateTypeEnum dtEnum) { + data = new ArrayList<>(); + Calendar cal = Calendar.getInstance(); + cal.setTime(begin); + SimpleDateFormat sdf = new SimpleDateFormat("MM-dd"); + int step = ReportDateUtil.getCalendarType(dtEnum); + Date temp = cal.getTime(); + while (temp.before(end)) { + String key = sdf.format(temp); + ReportUnit unit = new ReportUnit(); + unit.init(key, size); + data.add(unit); + cal.set(step, cal.get(step) + 1); + temp = cal.getTime(); + } + } + + /** + * 初始化统计数据 + * + * @param size 大小 + * @param keys 统计数据类型 + */ + public void initStandardReport(int size, String[] keys) { + standardData = new ArrayList<>(); + for (String key : keys) { + standardData.add(initSingleStandard(key, size)); + } + } + + private ReportUnit initSingleStandard(String key, int size) { + ReportUnit unit = new ReportUnit(); + unit.setKey(key); + unit.setDataList(new ArrayList<>()); + for (int i = 0; i < size; i++) { + unit.getDataList().add("-"); + } + return unit; + } + + /** + * 修改唯一标识标定的数据对象(基础数据) + * + * @param key 唯一标识 + * @param index 修改的数据索引 + * @param value 修改的值 + */ + public void setBaseCell(String key, int index, String value) { + for (ReportUnit unit : data) { + if (unit.getKey().equals(key)) { + unit.getDataList().set(index, value); + } + } + } + + /** + * 修改唯一标识标定的数据对象(标准数据) + * + * @param key 唯一标识 + * @param index 修改的数据索引 + * @param value 修改的值 + */ + public void setStandardCell(String key, int index, String value) { + for (ReportUnit unit : standardData) { + if (unit.getKey().equals(key)) { + unit.getDataList().set(index, value); + } + } + } + + public List> getTitle() { + return title; + } + + public void setTitle(List> title) { + this.title = title; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public List getStandardData() { + return standardData; + } + + public void setStandardData(List standardData) { + this.standardData = standardData; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } +} + diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportData.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportData.java new file mode 100644 index 0000000..bfde3a8 --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportData.java @@ -0,0 +1,107 @@ +package com.hnac.hzims.entity; + +/** + * 封装一个key,value键值对象 + * 可能是数据库返回查询数据 + * 也可能是使用的对象由于数据需要置为- + * 所以采用String存储处理 + * + * @Author: liugang + * @Date: 2019/7/8 16:02 + */ +public class ReportData { + + private String keyStr; + + private String keyDate; + + private String val; + //测站 或 属性 + private String stcd; + //属性名 + private String name; + + private Double value; + + private int month=-1; + + private String day; + + public String getDay() { + return day; + } + + public void setDay(String day) { + this.day = day; + } + + public int getMonth() { + return month; + } + + public void setMonth(int month) { + this.month = month; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } + + public ReportData() { + } + + public String getKeyDate() { + return keyDate; + } + + public void setKeyDate(String keyDate) { + this.keyDate = keyDate; + } + + public ReportData(String keyStr, String val) { + this.keyStr = keyStr; + this.val = val; + } + + public String getKeyStr() { + return keyStr; + } + + public void setKeyStr(String keyStr) { + this.keyStr = keyStr; + } + + public String getVal() { + return val; + } + + public void setVal(String val) { + this.val = val; + } + + public Double getValue() { + if(val!=null && !"".equals(val.trim())) { + if(val.indexOf("-")==-1) { + return Double.valueOf(val); + } + } + return null; + } + + public void setValue(Double value) { + this.value = value; + } +} + diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportUnit.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportUnit.java new file mode 100644 index 0000000..deac24c --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/ReportUnit.java @@ -0,0 +1,34 @@ +package com.hnac.hzims.entity; + +import java.util.ArrayList; +import java.util.List; + +public class ReportUnit { + private String key; + + private List dataList; + + public void init(String key, int size) { + this.key = key; + dataList = new ArrayList<>(); + for (int i = 0; i < size; i++) { + dataList.add("-"); + } + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public List getDataList() { + return dataList; + } + + public void setDataList(List dataList) { + this.dataList = dataList; + } +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/StandardData.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/StandardData.java new file mode 100644 index 0000000..01ac0bb --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/StandardData.java @@ -0,0 +1,174 @@ +package com.hnac.hzims.entity; + +import org.apache.commons.lang3.StringUtils; + +import java.math.BigDecimal; +import java.util.Objects; + +public class StandardData { + public static final String STANDARD_AVG = "时刻平均值"; + public static final String STANDARD_MAX = "时刻最大值"; + public static final String STANDARD_MAX_DATE = "最大值出现的时间"; + public static final String STANDARD_MIN = "时刻最小值"; + public static final String STANDARD_MIN_DATE = "最小值出现的时间"; + public static final String STANDARD_AMPLITUDE = "最大变幅"; + public static final String STANDARD_SUM = "总量"; + + /** + * 平均值 + */ + private String dataAvg; + /** + * 最大值 + */ + private String dataMax; + /** + * 最大值时间 + */ + private String dataMaxDate; + /** + * 最小值 + */ + private String dataMin; + /** + * 最小值出现时间 + */ + private String dataMinDate; + /** + * 最大变幅 + */ + private String amplitude; + /** + * 总量 + */ + private String dataSum; + + /** + * 比较并处理最大值和最大值日期 + * + * @param value 被比较值 + * @param date 日期 + */ + public void compareDealMax(String value, String date) { + if (Objects.isNull(dataMax)) { + dataMax = value; + dataMaxDate = date; + } else { + if (Double.valueOf(dataMax) < Double.valueOf(value)) { + dataMax = value; + dataMaxDate = date; + } + } + } + + /** + * 比较并处理最小值和最小值日期 + * + * @param value 被比较值 + * @param date 日期 + */ + public void compareDealMin(String value, String date) { + if (Objects.isNull(dataMin)) { + dataMin = value; + dataMinDate = date; + } else { + if (Double.valueOf(value) < Double.valueOf(dataMin)) { + dataMin = value; + dataMinDate = date; + } + } + } + + /** + * 默认计算总和,如有其他逻辑请继承后改写 + * + * @param value + */ + public void countSum(String value) { + if (Objects.isNull(dataSum)) { + dataSum = value; + } else { + dataSum = new BigDecimal(value).add(new BigDecimal(dataSum)).toString(); + } + } + + /** + * 处理空数据,如果数据为空则置- + */ + public void dealNullData() { + if (StringUtils.isEmpty(dataAvg)) { + dataAvg = "-"; + } + if (StringUtils.isEmpty(dataMax)) { + dataMax = "-"; + } + if (StringUtils.isEmpty(dataMaxDate)) { + dataMaxDate = "-"; + } + if (StringUtils.isEmpty(dataMin)) { + dataMin = "-"; + } + if (StringUtils.isEmpty(dataMinDate)) { + dataMinDate = "-"; + } + if (StringUtils.isEmpty(dataSum)) { + dataSum = "-"; + } + } + + public String getDataAvg() { + return dataAvg; + } + + public void setDataAvg(String dataAvg) { + this.dataAvg = dataAvg; + } + + public String getDataMax() { + return dataMax; + } + + public void setDataMax(String dataMax) { + this.dataMax = dataMax; + } + + public String getDataMaxDate() { + return dataMaxDate; + } + + public void setDataMaxDate(String dataMaxDate) { + this.dataMaxDate = dataMaxDate; + } + + public String getDataMin() { + return dataMin; + } + + public void setDataMin(String dataMin) { + this.dataMin = dataMin; + } + + public String getDataMinDate() { + return dataMinDate; + } + + public void setDataMinDate(String dataMinDate) { + this.dataMinDate = dataMinDate; + } + + public String getAmplitude() { + return amplitude; + } + + public void setAmplitude(String amplitude) { + this.amplitude = amplitude; + } + + public String getDataSum() { + return dataSum; + } + + public void setDataSum(String dataSum) { + this.dataSum = dataSum; + } +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/YearReport.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/YearReport.java new file mode 100644 index 0000000..a601e1d --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/entity/YearReport.java @@ -0,0 +1,178 @@ +package com.hnac.hzims.entity; + + + +import com.hnac.hzims.util.ReportDateUtil; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class YearReport { + private static final int MAX_DAY = 31; + + private int year; + private String stcd; + + /** + * 一个List代表1个月 + * 1个List有31个Double对象代表每一天 + * 如果没有数据或者天不存在就用-表示 + */ + private List> dayList; + + /** + * 一个key代表统计数据类型,value代表每个月统计数据值 + * 例如<最大值,12个月的数据> + * 最大值,最小值,平均值等等组成一个List + */ + private List monthList; + + /** + * 全年统计数据 + */ + private List yearList; + + public void init(String stcd, Integer year) { + this.year = year; + this.stcd = stcd; + initDayList(); + } + + /** + * 依据年份初始化年度报表,每个月的每天都加上- + * 目前不存在的年份也加上了- + * 如果有需求,则只把有日期的天上加上- + */ + public void initDayList() { + dayList = new ArrayList<>(); + for (int month = 0; month <= ReportDateUtil.MAX_MONTH; month++) { + dayList.add(new ArrayList<>()); + for (int day = 0; day < MAX_DAY; day++) { + dayList.get(month).add("-"); + } + } + } + + /** + * 初始化月份统计数据 + * + * @param keys 最大值,最小值,平均值等 + */ + public void initMonthList(String[] keys) { + monthList = new ArrayList<>(); + for (String key : keys) { + ReportUnit reportUnit = new ReportUnit(); + reportUnit.setKey(key); + List list = new ArrayList<>(); + for (int month = 0; month <= ReportDateUtil.MAX_MONTH; month++) { + list.add("-"); + } + reportUnit.setDataList(list); + monthList.add(reportUnit); + } + } + + /** + * 获取某类型每个月的数据 + * + * @param key + * @return + */ + public ReportUnit getMonthKeyList(String key) { + for (ReportUnit reportUnit : monthList) { + if (reportUnit.getKey().equals(key)) { + return reportUnit; + } + } + return null; + } + + /** + * 提供出去的设置每天数据 + * + * @param month 0-11月 + * @param day 1-31日 + * @param value 值 + */ + public void setDayValue(int month, int day, String value) { + dayList.get(month).set(day - 1, value); + } + + /** + * 提供出去的设置每月的统计数据 + * + * @param key 类型(最大值,最小值等) + * @param month 0-11月 + * @param value 值 + */ + public void setMonthValue(String key, int month, String value) { + for (ReportUnit reportUnit : monthList) { + if (reportUnit.getKey().equals(key)) { + reportUnit.getDataList().set(month, value); + } + } + } + + /** + * 针对数据进行求和计算 + * + * @param list + * @return + */ + public String sum(List list) { + String temp = null; + for (String data : list) { + if ("-".equals(data) || Double.valueOf(data) <= 0) { + continue; + } + if (Objects.isNull(temp)) { + temp = data; + } else { + temp = new BigDecimal(temp).add(new BigDecimal(data)).toString(); + } + } + return temp; + } + + public int getYear() { + return year; + } + + public void setYear(int year) { + this.year = year; + } + + public String getStcd() { + return stcd; + } + + public void setStcd(String stcd) { + this.stcd = stcd; + } + + public List> getDayList() { + return dayList; + } + + public void setDayList(List> dayList) { + this.dayList = dayList; + } + + public List getMonthList() { + return monthList; + } + + public void setMonthList(List monthList) { + this.monthList = monthList; + } + + public List getYearList() { + return yearList; + } + + public void setYearList(List yearList) { + this.yearList = yearList; + } +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/enums/QueryDateTypeEnum.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/enums/QueryDateTypeEnum.java new file mode 100644 index 0000000..da64139 --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/enums/QueryDateTypeEnum.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.enums; + +public enum QueryDateTypeEnum { + //时 + HOUR("hour"), + //日 + DAY("day"), + //月 + MONTH("month"), + //年 + YEAR("year"); + + private String queryDateType; + + QueryDateTypeEnum(String queryDateType) { + this.queryDateType = queryDateType; + } + + public static QueryDateTypeEnum getInstance(String queryDateType) { + for (QueryDateTypeEnum queryTypeEnum : QueryDateTypeEnum.values()) { + if (queryTypeEnum.getQueryDateType().equals(queryDateType)) { + return queryTypeEnum; + } + } + return null; + } + + public String getQueryDateType() { + return queryDateType; + } + + public void setQueryDateType(String queryDateType) { + this.queryDateType = queryDateType; + } +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/CommonUtil.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/CommonUtil.java new file mode 100644 index 0000000..e138604 --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/CommonUtil.java @@ -0,0 +1,148 @@ +package com.hnac.hzims.util; + + +import com.hnac.hzims.entity.ReportData; +import com.hnac.hzims.enums.QueryDateTypeEnum; + +import java.text.SimpleDateFormat; +import java.util.*; + +public class CommonUtil { + /** + * 检查查询类型是否符合 + * + * @param type + */ + public static QueryDateTypeEnum checkType(String type) { + QueryDateTypeEnum dtEnum = QueryDateTypeEnum.getInstance(type); + if (Objects.isNull(dtEnum)) { + return null; + } + return dtEnum; + } + + public static Date getHistoryDate(Date now,int year){ + Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例 + calendar.setTime(now); + calendar.add(Calendar.YEAR, -year);//当前时间减去一年,即一年前的时间 + return calendar.getTime(); + } + + public static String getLastDayOfMonth(String yearMonth) + { + String[] arr=yearMonth.split("-"); + Calendar cal = Calendar.getInstance(); + //设置年份 + int year=Integer.valueOf(arr[0]); + cal.set(Calendar.YEAR,year); + //设置月份 + int month=Integer.valueOf(arr[1]); + cal.set(Calendar.MONTH, month-1); + //获取某月最大天数 + int lastDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH); + //设置日历中月份的最大天数 + cal.set(Calendar.DAY_OF_MONTH, lastDay); + //格式化日期 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + String lastDayOfMonth = sdf.format(cal.getTime()); + + return lastDayOfMonth; + } + + public static int getYearGap(Date start,Date end){ + Calendar calStartTime = Calendar.getInstance(); //获取日历实例 + Calendar calEndTime = Calendar.getInstance(); + calStartTime.setTime(start); + calEndTime.setTime(end); + return calEndTime.get(Calendar.YEAR) - calStartTime.get(Calendar.YEAR); + } + + + public static Map getStartEnd(String beginSpt, String endSpt){ + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date begin = null; + Date end = null; + try { + begin = sdf.parse(beginSpt); + end = sdf.parse(endSpt); + } catch (Exception e) { + return null; + } + + Map res=new HashMap<>(); + res.put("begin",begin); + res.put("end",end); + return res; + } + + public static String getKey(String str) { + String[] arr=str.split(" "); + String arr0=arr[0]; + String[] keys=arr0.split("-"); + String key=keys[1]+"-"+keys[2]; + return key; + } + + + public static List getReportDataBySignage(List timeDataList, String signage){ + List list=new ArrayList<>(); + for(ReportData data:timeDataList){ + if(signage.equals(data.getStcd())){ + list.add(data); + } + } + return list; + } + + public static int getMonth(String key) { + String[] keys = key.split("-"); + String month = keys[1]; + return Integer.valueOf(month); + } + + public static String getDay(String key) { + String[] keys = key.split("-"); + String dayHour = keys[2]; + String[] dayHourArr=dayHour.split(" "); + return dayHourArr[0]; + } + + public static int getHour(String key) { + String[] keys = key.split(" "); + String dayHour = keys[1]; + String[] dayHourArr=dayHour.split(":"); + return Integer.valueOf(dayHourArr[0]); + } + + //0-> s(秒) 1->、m(分)、2->h(小时)3->、d(天)4->、w(周)5->、n(自然月)、6->y(自然年) + public static String getKeyBySaveTimeType(String key,Integer saveTimeType){ + if(saveTimeType.intValue() == 2){//小时 + int index=key.indexOf(":"); + if(index>0) { + String tmp = key.substring(0, index); + return tmp; + } + } + if(saveTimeType.intValue() == 3){//天 + String[] arr=key.split(" "); + return arr[0]; + } + if(saveTimeType.intValue() == 5){//月 + int index=key.lastIndexOf("-"); + if(index>0) { + String tmp = key.substring(0, index); + return tmp; + } + } + if(saveTimeType.intValue() == 6){//年 + int index = key.indexOf("-"); + if(index>0) { + String tmp = key.substring(0, index); + return tmp; + } + } + return key; + } + +} diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/ReportDateUtil.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/ReportDateUtil.java new file mode 100644 index 0000000..16e02b5 --- /dev/null +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/util/ReportDateUtil.java @@ -0,0 +1,116 @@ +package com.hnac.hzims.util; + +import com.hnac.hzims.enums.QueryDateTypeEnum; +import org.apache.commons.lang3.StringUtils; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +public class ReportDateUtil { + public static final int MAX_MONTH = 11; + + public static int getDateDiff(Date begin, Date end, int step) { + //初始化差距 + int diff = 0; + Calendar cal = Calendar.getInstance(); + cal.setTime(begin); + Date temp = cal.getTime(); + while (temp.before(end)) { + diff++; + cal.set(step, cal.get(step) + 1); + temp = cal.getTime(); + } + return diff; + } + + /** + * 获取日期 + * + * @param year 年 + * @param month 月(0-11) + * @param day 日(1-31) + * @param hour 时 + * @param minute 分 + * @param second 秒 + * @return + */ + public static Date getDate(int year, int month, int day, int hour, int minute, int second) { + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.YEAR, year); + calendar.set(Calendar.MONTH, month); + calendar.set(Calendar.DAY_OF_MONTH, day); + calendar.set(Calendar.HOUR_OF_DAY, hour); + calendar.set(Calendar.MINUTE, minute); + calendar.set(Calendar.SECOND, second); + calendar.set(Calendar.MILLISECOND, 0); + Date date = calendar.getTime(); + return date; + } + + /** + * 获取下一个日期(下一年,下一月,下一日等) + * + * @param curDate + * @param field + * @return + */ + public static Date getNextDate(Date curDate, int field) { + Calendar calendar = Calendar.getInstance(); + calendar.setTime(curDate); + calendar.set(field, calendar.get(field) + 1); + return calendar.getTime(); + } + + /** + * 依据查询类型获取时间格式类型 + * + * @param dtEnum + * @return + */ + public static SimpleDateFormat getSimpleDateFormatByType(QueryDateTypeEnum dtEnum) { + switch (dtEnum) { + case HOUR: + return new SimpleDateFormat("yyyy-MM-dd HH"); + case DAY: + return new SimpleDateFormat("yyyy-MM-dd"); + case MONTH: + return new SimpleDateFormat("yyyy-MM"); + case YEAR: + return new SimpleDateFormat("yyyy"); + default: + return new SimpleDateFormat("yyyy-MM-dd"); + } + } + + /** + * 依据查询类型获取日历类型 + * + * @param dtEnum + * @return + */ + public static int getCalendarType(QueryDateTypeEnum dtEnum) { + switch (dtEnum) { + case HOUR: + return Calendar.HOUR_OF_DAY; + case DAY: + return Calendar.DAY_OF_MONTH; + case MONTH: + return Calendar.MONTH; + case YEAR: + return Calendar.YEAR; + default: + return Calendar.DAY_OF_MONTH; + } + } + + /*** + * 年月日时分秒 转年月日 + */ + public static String getYMDStr(String ymd) { + if(StringUtils.isNotEmpty(ymd)){ + return ymd.substring(0,11); + } + return ""; + } +} diff --git a/hzims-service-api/dam-safety-api/pom.xml b/hzims-service-api/dam-safety-api/pom.xml new file mode 100644 index 0000000..6d4ee93 --- /dev/null +++ b/hzims-service-api/dam-safety-api/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + + com.hnac.hzinfo.data + hzinfo-data-sdk + + + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + dam-safety-api + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TBuilding.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TBuilding.java new file mode 100644 index 0000000..21fe57a --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TBuilding.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; + +/** + * 大坝信息表 + */ +@Data +@TableName("t_building") +public class TBuilding extends BaseEntity { + @ApiModelProperty("水库编号") + private String rscd; + @ApiModelProperty("建筑物名称") + private String name; + @ApiModelProperty("建筑物分级路径") + private String ipath; + @ApiModelProperty("简介") + private String brief; + @ApiModelProperty("图片地址") + private String attach; + @ApiModelProperty("文件地址") + private String filePath; + + //大坝信息 + @ApiModelProperty("坝类型") + private String type;//坝类型 + @ApiModelProperty("地址") + private String address;//地址 + @ApiModelProperty("坝高") + private BigDecimal damHeight;//坝高 + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TProjInfo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TProjInfo.java new file mode 100644 index 0000000..0670671 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TProjInfo.java @@ -0,0 +1,38 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.util.Date; + +/** + * 工程物信息表 + */ +@Data +@TableName("t_projinfo") +@EqualsAndHashCode(callSuper = true) +public class TProjInfo extends BaseEntity { + @ApiModelProperty("水库编码") + private String rscd; + @ApiModelProperty("工程名称") + private String projName; + @ApiModelProperty("工程编号") + private String projCode; + @ApiModelProperty("开工日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date startDate; + @ApiModelProperty("竣工日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date completeDate; + @ApiModelProperty("蓄水日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date storeWaterDate; + @ApiModelProperty("工程所在位置") + private String location; + @ApiModelProperty("备注") + private String rm; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TSectionConfig.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TSectionConfig.java new file mode 100644 index 0000000..5eaf6a8 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/TSectionConfig.java @@ -0,0 +1,34 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 大坝断面数据配置表 + */ +@Data +@TableName("t_section_config") +public class TSectionConfig implements Serializable { + @ApiModelProperty("渗流量测点编号") + @TableId(type = IdType.INPUT) + private String stcd; + @ApiModelProperty("断面编号") + private String sectionNo; + @ApiModelProperty("是否显示浸润线") + private String opinion; + @ApiModelProperty("x轴") + private BigDecimal xzhou; + @ApiModelProperty("y轴最大值") + private BigDecimal ymax; + @ApiModelProperty("y轴最小值") + private BigDecimal ymin; + @ApiModelProperty("警戒值") + private BigDecimal warm; + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDamsB.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDamsB.java new file mode 100644 index 0000000..a6160f2 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDamsB.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 断面特征点信息表 + */ +@Data +@TableName("wrp_dams_b") +public class WrpDamsB{ + @ApiModelProperty("断面编号") + private String damcd; + @ApiModelProperty("特征点编号") + @TableId(type= IdType.INPUT) + private String damscd; + @ApiModelProperty("特征点名称") + private String damsnm; + @ApiModelProperty("起点距(m)") + private BigDecimal redi; + @ApiModelProperty("高程(m)") + private BigDecimal poel; + @ApiModelProperty("更新时间") + private Date dtuptm; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrhrdsmp.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrhrdsmp.java new file mode 100644 index 0000000..0b165bf --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrhrdsmp.java @@ -0,0 +1,56 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + *水平位移监测测点 + */ +@Data +@TableName("wrp_dfr_srhrdsmp") +@EqualsAndHashCode(callSuper = true) +public class WrpDfrSrhrdsmp extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("断面编号") + private String damcd; + @ApiModelProperty("测点编号") + private String mpcd; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("轴距") + private BigDecimal ofax; + @ApiModelProperty("高程") + private BigDecimal el; + @ApiModelProperty("基准值 X") + private BigDecimal stvlx; + @ApiModelProperty("基准值 Y") + private BigDecimal stvly; + @ApiModelProperty("位移阈值") + private BigDecimal xyhrds; + @ApiModelProperty("型式") + private String tp; + @ApiModelProperty("基础情况") + private String bsin; + @ApiModelProperty("安装日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date indt; + @ApiModelProperty("测定日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dtdt; + @ApiModelProperty("仪器编号") + private String dvcd; + @ApiModelProperty("经度") + private BigDecimal eslg; + @ApiModelProperty("纬度") + private BigDecimal nrlt; + @ApiModelProperty("备注") + private String rm; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsbp.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsbp.java new file mode 100644 index 0000000..60ee6aa --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsbp.java @@ -0,0 +1,55 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 监测基点表 + */ +@Data +@TableName("wrp_dfr_srvrdsbp") +@EqualsAndHashCode(callSuper = true) +public class WrpDfrSrvrdsbp extends BaseEntity { + @ApiModelProperty("水库代码") + private String rscd; + @ApiModelProperty("水工建筑物id") + private Long hycncd; + @ApiModelProperty("基点编号") + private String bpcd; + @ApiModelProperty("考证信息日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date txindt; + @ApiModelProperty("基点类型") + private String bptp; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("轴距") + private BigDecimal ofax; + @ApiModelProperty("高程") + private BigDecimal el; + @ApiModelProperty("型式") + private String tp; + @ApiModelProperty("基础情况") + private String bsin; + @ApiModelProperty("安装日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date indt; + @ApiModelProperty("测定日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dtdt; + @ApiModelProperty("经度") + private BigDecimal lgtd; + @ApiModelProperty("纬度") + private BigDecimal lttd; + @ApiModelProperty("工作状态") + private String wkcn; + @ApiModelProperty("备注") + private String rm; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsmp.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsmp.java new file mode 100644 index 0000000..54af217 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpDfrSrvrdsmp.java @@ -0,0 +1,53 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 垂直位移监测测点 + */ +@Data +@TableName("wrp_dfr_srvrdsmp") +@EqualsAndHashCode(callSuper = true) +public class WrpDfrSrvrdsmp extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("断面编号") + private String damcd; + @ApiModelProperty("测点编号") + private String mpcd; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("轴距") + private BigDecimal ofax; + @ApiModelProperty("初始高程") + private BigDecimal inel; + @ApiModelProperty("位移阈值") + private BigDecimal vrds; + @ApiModelProperty("型式") + private String tp; + @ApiModelProperty("基础情况") + private String bsin; + @ApiModelProperty("安装日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date indt; + @ApiModelProperty("测定日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dtdt; + @ApiModelProperty("仪器编号") + private String dvcd; + @ApiModelProperty("经度") + private BigDecimal eslg; + @ApiModelProperty("纬度") + private BigDecimal nrlt; + @ApiModelProperty("备注") + private String rm; + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSectionB.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSectionB.java new file mode 100644 index 0000000..26b408b --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSectionB.java @@ -0,0 +1,38 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; + +/** + * 大坝断面信息表 + */ +@Data +@TableName("wrp_section_b") +@EqualsAndHashCode(callSuper = true) +public class WrpSectionB extends BaseEntity { + @ApiModelProperty("水库编号") + private String rscd; + @ApiModelProperty("建筑物id") + private Long buildingId; + @ApiModelProperty("断面编码") + private String damcd; + @ApiModelProperty("断面名称") + private String damnm; + @ApiModelProperty("防渗墙类型") + private String wallType; + @ApiModelProperty("断面长度") + private BigDecimal damlen; + @ApiModelProperty("断面宽度") + private BigDecimal damwd; + @ApiModelProperty("备注") + private String rm; + @ApiModelProperty("预留字段") + private String text; + @ApiModelProperty("图片地址") + private String attach; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgPztb.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgPztb.java new file mode 100644 index 0000000..4ed8686 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgPztb.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; + +/** + * 测压管测点 + */ +@Data +@TableName("wrp_spg_pztb") +@EqualsAndHashCode(callSuper = true) +public class WrpSpgPztb extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("测点编号") + private String mpcd; + @ApiModelProperty("断面编号") + private String damcd; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("坝轴距") + private BigDecimal ofax; + @ApiModelProperty("监测部位") + private String msps; + + @ApiModelProperty("监测类型") + private String mstp; + @ApiModelProperty("安装高程") + private BigDecimal el; + @ApiModelProperty("进水段底高程") + private BigDecimal ipbtel; + @ApiModelProperty("进水段顶高程") + private BigDecimal iptpel; + @ApiModelProperty("管口高程") + private BigDecimal tbtpel; + @ApiModelProperty("管底高程") + private BigDecimal tbbtel; + @ApiModelProperty("水位阈值高程") + private BigDecimal pztbtel; + + @ApiModelProperty("仪器编号") + private String dvcd; + @ApiModelProperty("经度") + private BigDecimal eslg; + @ApiModelProperty("纬度") + private BigDecimal nrlt; + @ApiModelProperty("备注") + private String rm; + + + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpprmp.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpprmp.java new file mode 100644 index 0000000..b9ed7aa --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpprmp.java @@ -0,0 +1,52 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 渗流压力测点信息表 + */ +@Data +@TableName("wrp_spg_spprmp") +@EqualsAndHashCode(callSuper = true) +public class WrpSpgSpprmp extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("断面编码") + private String damcd; + @ApiModelProperty("测点编号") + private String mpcd; + @ApiModelProperty("考证信息日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date txindt; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("轴距") + private BigDecimal ofax; + @ApiModelProperty("高程") + private BigDecimal el; + @ApiModelProperty("监测类型") + private String mstp; + @ApiModelProperty("透水段底高程") + private BigDecimal pmbtel; + @ApiModelProperty("透水段顶高程") + private BigDecimal pmtpel; + @ApiModelProperty("安装日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date indt; + @ApiModelProperty("仪器出厂编号") + private String dvfccd; + @ApiModelProperty("工作状态") + private String wkcn; + @ApiModelProperty("备注") + private String rm; + + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpqnmp.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpqnmp.java new file mode 100644 index 0000000..d6a47ae --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/entity/WrpSpgSpqnmp.java @@ -0,0 +1,45 @@ +package com.hnac.hzims.damsafety.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 渗流量测点 + */ +@Data +@TableName("wrp_spg_spqnmp") +@EqualsAndHashCode(callSuper = true) +public class WrpSpgSpqnmp extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("测点编号") + private String mpcd; + @ApiModelProperty("断面编号") + private String damcd; + @ApiModelProperty("桩号") + private String ch; + @ApiModelProperty("轴距") + private BigDecimal ofax; + @ApiModelProperty("高程") + private BigDecimal el; + @ApiModelProperty("渗流阈值") + private BigDecimal spprwl; + @ApiModelProperty("安装日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date indt; + @ApiModelProperty("仪器编号") + private String dvcd; + @ApiModelProperty("经度") + private BigDecimal eslg; + @ApiModelProperty("纬度") + private BigDecimal nrlt; + @ApiModelProperty("备注") + private String rm; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/feign/IWrpSectionBClient.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/feign/IWrpSectionBClient.java new file mode 100644 index 0000000..874e072 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/feign/IWrpSectionBClient.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.damsafety.feign; + +import com.hnac.hzims.damsafety.vo.WrpSectionBVO; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import org.springblade.core.tool.api.R; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; + +import java.util.List; +import java.util.Map; + +@FeignClient( + value = "dam-safety", + url = "${feign.dam-safety:}" +) +public interface IWrpSectionBClient { + String API_PREFIX = "/wrpSectionBClient"; + String LIST = API_PREFIX + "/list"; + String GET_REAL_DATA = API_PREFIX + "/getRealData"; + + /** + * 获取断面列表 + * + * @return + */ + @GetMapping(LIST) + R> list(Map param); + + @GetMapping(GET_REAL_DATA) + R> getRealData(String deviceCode); +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TBuildingVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TBuildingVo.java new file mode 100644 index 0000000..c61c0e5 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TBuildingVo.java @@ -0,0 +1,8 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.TBuilding; + +public class TBuildingVo extends TBuilding { + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TProjInfoVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TProjInfoVo.java new file mode 100644 index 0000000..96ccab5 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/TProjInfoVo.java @@ -0,0 +1,8 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.TProjInfo; + +public class TProjInfoVo extends TProjInfo { + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrhrdsmpVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrhrdsmpVo.java new file mode 100644 index 0000000..23143d7 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrhrdsmpVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; + +public class WrpDfrSrhrdsmpVo extends WrpDfrSrhrdsmp { + +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsbpVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsbpVo.java new file mode 100644 index 0000000..755bb19 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsbpVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; + +public class WrpDfrSrvrdsbpVo extends WrpDfrSrvrdsbp { +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsmpVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsmpVo.java new file mode 100644 index 0000000..8511d94 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpDfrSrvrdsmpVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; + +public class WrpDfrSrvrdsmpVo extends WrpDfrSrvrdsmp { +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSectionBVO.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSectionBVO.java new file mode 100644 index 0000000..04ab4ad --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSectionBVO.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.damsafety.vo; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = true) +public class WrpSectionBVO extends WrpSectionB { + //测点集合 + private List points; +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgPztbVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgPztbVo.java new file mode 100644 index 0000000..b6bfa5e --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgPztbVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; + +public class WrpSpgPztbVo extends WrpSpgPztb { +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpprmpVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpprmpVo.java new file mode 100644 index 0000000..902d0e8 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpprmpVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; + +public class WrpSpgSpprmpVo extends WrpSpgSpprmp { +} diff --git a/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpqnmpVo.java b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpqnmpVo.java new file mode 100644 index 0000000..269abd7 --- /dev/null +++ b/hzims-service-api/dam-safety-api/src/main/java/com/hnac/hzims/damsafety/vo/WrpSpgSpqnmpVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.vo; + + +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; + +public class WrpSpgSpqnmpVo extends WrpSpgSpqnmp { +} diff --git a/hzims-service-api/digital-twin-display-api/pom.xml b/hzims-service-api/digital-twin-display-api/pom.xml new file mode 100644 index 0000000..0ca55dc --- /dev/null +++ b/hzims-service-api/digital-twin-display-api/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + + digital-twin-display-api + jar + ${hzims.project.version} + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java index de44d52..3a7df24 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java @@ -248,4 +248,8 @@ public class EmInfoEntity extends TenantEntity { @ApiModelProperty(value = "子设备") @TableField(exist = false) private List infoChildren; + + + @ApiModelProperty("固定资产编码") + private String assetCode; } diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClient.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClient.java index 304fe4e..7c8ffa3 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClient.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClient.java @@ -32,7 +32,7 @@ public interface IFdpMonitorClient { R> getRealIds(); @GetMapping(GET_FAULT_LIST) - String getFaultList(); + String getFaultList(List stations); @GetMapping(UPDATE_FAULT_STATE) String updateFaultState(UpdateFaultStateVo state); diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClientFallBack.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClientFallBack.java index a96ff35..f354cff 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClientFallBack.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpMonitorClientFallBack.java @@ -24,7 +24,7 @@ public class IFdpMonitorClientFallBack implements IFdpMonitorClient{ } @Override - public String getFaultList() { + public String getFaultList(List stations) { return null; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java new file mode 100644 index 0000000..56ce3a8 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetDeviceVo.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + * @date 2023/8/29 11:22:22 + * @version 4.0.0 + */ +@Data +public class AreaAssetDeviceVo { + + @ApiModelProperty(value = "机构Id") + private Long deptId; + + @ApiModelProperty(value = "设备名称") + private String deviceCode; + + @ApiModelProperty(value = "设备名称") + private String deviceName; + + @ApiModelProperty(value = "状态") + private Integer status; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetVo.java new file mode 100644 index 0000000..e6eead2 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaAssetVo.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author ysj + * @date 2023/8/29 11:22:22 + * @version 4.0.0 + */ +@Data +public class AreaAssetVo { + + @ApiModelProperty(value = "机构Id") + private Long deptId; + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "设备集合") + private List devices; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java new file mode 100644 index 0000000..d50cd69 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/AreaTimelyVo.java @@ -0,0 +1,31 @@ +package com.hnac.hzims.operational.census.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/8/29 11:22:22 + * @version 4.0.0 + */ +@Data +public class AreaTimelyVo { + + @ApiModelProperty(value = "机构名称") + private String deptName; + + @ApiModelProperty(value = "事件Id") + private String eventId; + + @ApiModelProperty(value = "事件内容") + private String content; + + @ApiModelProperty(value = "事件time") + private String time; + + @ApiModelProperty(value = "提醒数量") + private Integer sum; + + @ApiModelProperty(value = "字体颜色:1-红色 0-黄色") + private Integer colour; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java new file mode 100644 index 0000000..57651d8 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClient.java @@ -0,0 +1,39 @@ +package com.hnac.hzims.operational.defect.feign; + +import com.hnac.hzims.operational.OperationalConstants; +import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.tool.api.R; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 15:36 + */ +@FeignClient( + value = OperationalConstants.APP_NAME, + fallback = StatisticsFeignClientFallback.class +) +public interface StatisticsFeignClient { + + + @GetMapping("/defect_statistic/list") + R> list(@SpringQueryMap OperDefectStatisticsVO entity); + + + + /** + * 巡检任务统计 + * @return + */ + @GetMapping("/defect_statistic/defectStatistictCount") + public R> defectStatistictCount(); +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java new file mode 100644 index 0000000..974aa1d --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/feign/StatisticsFeignClientFallback.java @@ -0,0 +1,34 @@ +package com.hnac.hzims.operational.defect.feign; + +import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 15:40 + */ +@Component +public class StatisticsFeignClientFallback implements StatisticsFeignClient { + @Override + public R> list(OperDefectStatisticsVO entity) { + throw new ServiceException("熔断错误"); + } + + /** + * 巡检任务统计 + * + * @return + */ + @Override + public R> defectStatistictCount() { + return null; + } +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java new file mode 100644 index 0000000..413e395 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCount.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.operational.defect.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 16:46 + */ +@Data +public class StatistictCount { + + + private String createDept; + + + private Integer count; + + + private Integer handleStatus; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java new file mode 100644 index 0000000..d5141c7 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/defect/vo/StatistictCountVo.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.operational.defect.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 17:03 + */ +@Data +public class StatistictCountVo { + + + private String createDept; + + + + private String createDeptName; + + + /** + * 已处理 + */ + private Integer processedCount = 0; + + + /** + * 未处理 + */ + + private Integer untreatedCount = 0; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/Estimate.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/Estimate.java new file mode 100644 index 0000000..12f8a61 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/Estimate.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 总体评分附表 + *

+ * + * @author dfy + * @since 2023-08-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("estimate") +public class Estimate implements Serializable { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 基本条件 + */ + @TableField("name") + private String name; + + /** + * 0 为选择 1 为选中 + */ + @TableField("checked") + private Boolean checked; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableField("is_deleted") + @TableLogic + private Boolean deleted; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetails.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetails.java new file mode 100644 index 0000000..87b47a3 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetails.java @@ -0,0 +1,80 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 得分事项简述 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("evaluation_details") +public class EvaluationDetails implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 电站评分id + */ + @TableField("station_evaluation_id") + private Long stationEvaluationId; + + /** + * 选择题目 + */ + @TableField("title") + private String title; + + /** + * 是否选中 1 选中 0 不选中 + */ + @TableField("checked") + private Boolean checked; + + /** + * 分数 + */ + @TableField("grade") + private Integer grade; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableField("is_deleted") + private Boolean deleted; + + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetailsOption.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetailsOption.java new file mode 100644 index 0000000..773ece0 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/EvaluationDetailsOption.java @@ -0,0 +1,78 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 选择表 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("evaluation_details_option") +public class EvaluationDetailsOption implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 题目 + */ + @TableField("option_title") + private String optionTitle; + + /** + * 是否选中 1 选中 0 不选中 + */ + @TableField("option_checked") + private Boolean optionChecked; + + /** + * 分数 + */ + @TableField("option_grade") + private Integer optionGrade; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableField("is_deleted") + private Boolean deleted; + + + + @TableField("evaluation_details_id") + private Long evaluationDetailsId; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FileStation.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FileStation.java new file mode 100644 index 0000000..255dd4a --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/FileStation.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 文件 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:01 + */ +@Data +@Accessors(chain = true) +@TableName("file_station") +public class FileStation implements Serializable { + + + /** + * 视频Id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + + /** + * '视频地址' + */ + private String file; + + + /** + * 站点Id + */ + private Long stationId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + + /** + * 逻辑删除0 正常 1 删除 + */ + @TableLogic + private int isDeleted; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/ImageStation.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/ImageStation.java new file mode 100644 index 0000000..87a02aa --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/ImageStation.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 图片 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:01 + */ +@Data +@Accessors(chain = true) +@TableName("image_station") +public class ImageStation implements Serializable { + + + /** + * 视频Id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + + /** + * '视频地址' + */ + private String image; + + + /** + * 站点Id + */ + private Long stationId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + + /** + * 逻辑删除0 正常 1 删除 + */ + @TableLogic + private int isDeleted; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEvaluation.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEvaluation.java new file mode 100644 index 0000000..b23dca9 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEvaluation.java @@ -0,0 +1,97 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 电站评分表 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("station_evaluation") +public class StationEvaluation implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 类别 + */ + @TableField("evaluation_name") + private String evaluationName; + + /** + * 站点id + */ + @TableField("station_id") + private Long stationId; + + /** + * 父级 + */ + @TableField("parent_id") + private Long parentId; + + /** + * 等级 + */ + @TableField("level") + private Integer level; + + /** + * 分数 + */ + @TableField("minute") + private Integer minute; + + /** + * 得分 + */ + @TableField("score") + private Integer score; + + /** + * 描述 + */ + @TableField("description") + private String description; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableField("is_deleted") + private Boolean deleted; + + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/VideoStation.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/VideoStation.java new file mode 100644 index 0000000..4314782 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/VideoStation.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.operational.station.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * 视频 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:01 + */ +@Data +@Accessors(chain = true) +@TableName("video_station") +public class VideoStation implements Serializable { + + + /** + * 视频Id + */ + @TableId(type = IdType.ASSIGN_ID) + private Long id; + + + /** + * '视频地址' + */ + private String video; + + + /** + * 站点Id + */ + private Long stationId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + + /** + * 逻辑删除0 正常 1 删除 + */ + @TableLogic + private int isDeleted; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsOptionVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsOptionVo.java new file mode 100644 index 0000000..0773777 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsOptionVo.java @@ -0,0 +1,45 @@ +package com.hnac.hzims.operational.station.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/17 11:08 + */ +@Data +public class EvaluationDetailsOptionVo { + + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 题目 + */ + @TableField("option_title") + private String optionTitle; + + /** + * 是否选中 1 选中 0 不选中 + */ + @TableField("option_checked") + private Boolean optionChecked; + + /** + * 分数 + */ + @TableField("option_grade") + private Integer optionGrade; + + + private Long evaluationDetailsId; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsVo.java new file mode 100644 index 0000000..688be97 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/EvaluationDetailsVo.java @@ -0,0 +1,53 @@ +package com.hnac.hzims.operational.station.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/17 11:06 + */ +@Data +public class EvaluationDetailsVo { + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 电站评分id + */ + @TableField("station_evaluation_id") + private Long stationEvaluationId; + + /** + * 选择题目 + */ + @TableField("title") + private String title; + + /** + * 是否选中 1 选中 0 不选中 + */ + @TableField("checked") + private Boolean checked; + + /** + * 分数 + */ + @TableField("grade") + private Integer grade; + + /** + * 封装选择项 + */ + private List evaluationDetailsOptionVos; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/OneStationEvaluationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/OneStationEvaluationVo.java new file mode 100644 index 0000000..98f93d2 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/OneStationEvaluationVo.java @@ -0,0 +1,63 @@ +package com.hnac.hzims.operational.station.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/17 10:43 + */ +@Data +public class OneStationEvaluationVo { + + /** + * 编号 + */ + private Long id; + + /** + * 类别 + */ + private String evaluationName; + + /** + * 站点id + */ + + private Long stationId; + + /** + * 父级 + */ + + private Long parentId; + + /** + * 等级 + */ + private Integer level; + + /** + * 分数 + */ + private Integer minute; + + /** + * 得分 + */ + private Integer score; + + /** + * 描述 + */ + private String description; + + + /** + * 封装第二级参数 + */ + private List children; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsQueryVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsQueryVo.java new file mode 100644 index 0000000..29cc2f1 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsQueryVo.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.operational.station.vo; + +import com.baomidou.mybatisplus.annotation.SqlCondition; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.mp.support.QueryField; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/22 14:05 + */ +@Data +public class StationsQueryVo { + + @ApiModelProperty("行政区划(来源于平台的行政区划表)") + @QueryField(condition = SqlCondition.EQUAL) + private String areaCode; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsVo.java new file mode 100644 index 0000000..58a7c45 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/StationsVo.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.operational.station.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/22 9:39 + */ +@Data +public class StationsVo { + + + /** + * 电站名称 + */ + private Integer year; + + + private Integer count; +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/ThreeStationEvaluationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/ThreeStationEvaluationVo.java new file mode 100644 index 0000000..ab28732 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/ThreeStationEvaluationVo.java @@ -0,0 +1,64 @@ +package com.hnac.hzims.operational.station.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/17 10:59 + */ +@Data +public class ThreeStationEvaluationVo { + + /** + * 编号 + */ + private Long id; + + /** + * 类别 + */ + private String evaluationName; + + /** + * 站点id + */ + + private Long stationId; + + /** + * 父级 + */ + + private Long parentId; + + /** + * 等级 + */ + private Integer level; + + /** + * 分数 + */ + private Integer minute; + + /** + * 得分 + */ + private Integer score; + + /** + * 描述 + */ + private String description; + + + /** + * 封装简述参数 + */ + private List evaluationDetailsVos; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/TwoStationEvaluationVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/TwoStationEvaluationVo.java new file mode 100644 index 0000000..f89052a --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/vo/TwoStationEvaluationVo.java @@ -0,0 +1,64 @@ +package com.hnac.hzims.operational.station.vo; + +import lombok.Data; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/17 10:58 + */ +@Data +public class TwoStationEvaluationVo { + + + /** + * 编号 + */ + private Long id; + + /** + * 类别 + */ + private String evaluationName; + + /** + * 站点id + */ + + private Long stationId; + + /** + * 父级 + */ + + private Long parentId; + + /** + * 等级 + */ + private Integer level; + + /** + * 分数 + */ + private Integer minute; + + /** + * 得分 + */ + private Integer score; + + /** + * 描述 + */ + private String description; + + + /** + * 封装第三级参数 + */ + private List children; +} diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java index 3f4803c..599e462 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/TaskFeignClient.java @@ -1,19 +1,24 @@ package com.hnac.hzinfo.inspect.areamonthly.feign; -import com.hnac.hzinfo.inspect.areamonthly.feign.fallback.TaskFeignClientFallback; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.vo.VoteChartVo; + +import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; import com.hnac.hzinfo.inspect.task.entity.TaskEntity; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.SpringQueryMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; + +import java.util.List; import static com.hnac.hzinfo.inspect.Constants.APP_NAME; @@ -23,27 +28,50 @@ import static com.hnac.hzinfo.inspect.Constants.APP_NAME; * @Serial 1.0 * @Date 2023/4/11 17:21 */ -@FeignClient(value = APP_NAME, fallback = TaskFeignClientFallback.class) +@FeignClient(value = APP_NAME) public interface TaskFeignClient { @GetMapping("/task/list") @ApiOperation(value = "分页显示任务列表", notes = "传入task") - public R> list(@SpringQueryMap TaskListQuery task,@SpringQueryMap Query query); + public R> list(@SpringQueryMap TaskListQuery task, @SpringQueryMap Query query); @GetMapping(value = "/task/detail") @ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid") public R detail(@RequestParam Long id); - /** * 巡检任务分页 */ @GetMapping("/task/pageList/{page}/{size}") @ApiOperation(value = "分页显示任务列表", notes = "传入task") public R> pageList( - @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page, - @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size, + @PathVariable("page") Long page, + @PathVariable("size") Long size, @SpringQueryMap TaskListQuery task); + + + @GetMapping(value = "/task/event/list") + @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId") + public R> eventList(@RequestParam Long taskId, @SpringQueryMap Query query, + @SpringQueryMap BladeUser bladeUser); + + + /** + * 获取任务详情 + */ + @GetMapping(value = "/task/getTaskById") + @ApiOperation(value = "获取任务详情", notes = "传入taskId") + public R> getTaskById(@RequestParam Long id); + + + /** + * 巡检计划统计 + */ + @GetMapping("task/getTaskListStatistics") + @ApiOperation(value = "巡检计划统计", notes = "传入计划id") + public R> getTaskListStatistics(@RequestParam String startTime,@RequestParam String endTime, + @RequestParam Long deptId); + } diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java index 6acac03..dece8f3 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/feign/fallback/TaskFeignClientFallback.java @@ -1,46 +1,80 @@ -package com.hnac.hzinfo.inspect.areamonthly.feign.fallback; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient; -import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; -import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; -import com.hnac.hzinfo.inspect.task.entity.TaskEntity; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.mp.support.BladePage; -import org.springblade.core.mp.support.Query; -import org.springblade.core.tool.api.R; -import org.springframework.stereotype.Service; - -/** - * @Author WL - * @Version v1.0 - * @Serial 1.0 - * @Date 2023/4/11 17:23 - */ -@Slf4j -@Service -public class TaskFeignClientFallback implements TaskFeignClient { - @Override - public R> list(TaskListQuery task, Query query) { - - return R.fail("远程调用失败"); - } - - @Override - public R detail(Long id) { - return R.fail("远程调用失败"); - } - - /** - * 巡检任务分页 - * - * @param page - * @param size - * @param task - */ - @Override - public R> pageList(Long page, Long size, TaskListQuery task) { - return R.fail("远程调用失败"); - } - -} +// package com.hnac.hzinfo.inspect.areamonthly.feign.fallback; +// +// import com.baomidou.mybatisplus.core.metadata.IPage; +// import com.hnac.hzims.vo.VoteChartVo; +// import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient; +// import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; +// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; +// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; +// import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; +// import com.hnac.hzinfo.inspect.task.entity.TaskEntity; +// import lombok.extern.slf4j.Slf4j; +// import org.springblade.core.mp.support.BladePage; +// import org.springblade.core.mp.support.Query; +// import org.springblade.core.secure.BladeUser; +// import org.springblade.core.tool.api.R; +// import org.springframework.stereotype.Service; +// +// import java.util.List; +// +// /** +// * @Author WL +// * @Version v1.0 +// * @Serial 1.0 +// * @Date 2023/4/11 17:23 +// */ +// @Slf4j +// @Service +// public class TaskFeignClientFallback implements TaskFeignClient { +// @Override +// public R> list(TaskListQuery task, Query query) { +// +// return R.fail("远程调用失败"); +// } +// +// @Override +// public R detail(Long id) { +// return R.fail("远程调用失败"); +// } +// +// /** +// * 巡检任务分页 +// * +// * @param page +// * @param size +// * @param task +// */ +// @Override +// public R> pageList(Long page, Long size, TaskListQuery task) { +// return R.fail("远程调用失败"); +// } +// +// +// @Override +// public R> eventList(Long taskId, Query query, BladeUser bladeUser) { +// return R.fail("远程调用失败"); +// } +// +// /** +// * 获取任务详情 +// * +// * @param id +// */ +// @Override +// public R> getTaskById(Long id) { +// return R.fail("远程调用失败"); +// } +// +// /** +// * 巡检计划统计 +// * +// * @param startTime +// * @param endTime +// * @param deptId +// */ +// @Override +// public R> getTaskListStatistics(String startTime, String endTime, Long deptId) { +// return R.fail("远程调用失败"); +// } +// +// } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java similarity index 96% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java index 89c396b..2a2d68f 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/EventListVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/EventListVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import java.io.Serializable; import java.util.Date; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java similarity index 98% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java index 3f129b5..701da86 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectContentVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectContentVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java similarity index 94% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java index 5bf8aa6..0e7ee14 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectOfflineVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectOfflineVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java similarity index 94% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java index 7a36742..5a2ef8a 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectProjectVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectProjectVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.google.common.collect.Lists; import io.swagger.annotations.ApiModel; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java similarity index 96% rename from hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java rename to hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java index 040e03c..7c14a37 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/vo/TaskObjectVO.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/areamonthly/vo/TaskObjectVO.java @@ -1,4 +1,4 @@ -package com.hnac.hzinfo.inspect.task.vo; +package com.hnac.hzinfo.inspect.areamonthly.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.google.common.collect.Lists; diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java index db54fe2..2804780 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java @@ -20,6 +20,8 @@ public interface IInspectTaskClient { String QUERY_BY_PLAN_START_TIME_AND_DEPT = API_PREFIX + "/queryByPlanStartTimeAndDept"; String GET_INSPECT_TASK_CHECK = API_PREFIX + "/getInspectTaskCheck"; + String EXPIRE_INSPECT = API_PREFIX + "/expireInspect"; + /** * 根据创建时间查询巡检任务列表 **/ @@ -40,9 +42,20 @@ public interface IInspectTaskClient { * @param inspectType 查询类型 1:为运行人员 2:管理及其他人员 * @return */ - @GetMapping(GET_INSPECT_TASK_CHECK) + @GetMapping(EXPIRE_INSPECT) R getInspectTaskCheck(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("dept") Long dept, @RequestParam("inspectType") String inspectType); + + /** + * 查询到期巡检 + * @param start + * @param end + * @param deptId + * @return + */ + @GetMapping(EXPIRE_INSPECT) + List expireInspect(@RequestParam("start") String start, @RequestParam("end") String end,@RequestParam("deptId")Long deptId); + } diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClientBack.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClientBack.java index bd35e0e..0075825 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClientBack.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClientBack.java @@ -28,4 +28,9 @@ public class IInspectTaskClientBack implements IInspectTaskClient { public R getInspectTaskCheck(String startDate, String endDate, Long dept, String inspectType) { return R.data(new SafeCheckStatisticVO()); } + + @Override + public List expireInspect(String start, String end, Long deptId) { + return new ArrayList<>(); + } } diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java new file mode 100644 index 0000000..8fa36c0 --- /dev/null +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fallback/RouteFeignClientFallback.java @@ -0,0 +1,63 @@ +package com.hnac.hzinfo.inspect.threedimensional.fallback; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzinfo.inspect.plan.entity.RouteEntity; +import com.hnac.hzinfo.inspect.threedimensional.fegin.RouteFeignClient; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 8:57 + */ +@Component +public class RouteFeignClientFallback implements RouteFeignClient { + /** + * 查询巡检路径管理列表 + * + * @param st_re_route + * @param query + * @return + */ + @Override + public R> list(Map st_re_route, Query query) { + throw new ServiceException("熔断错误"); + } + + /** + * 新增 代码自定义代号 + * + * @param st_re_route + */ + @Override + public R save(RouteEntity st_re_route) { + throw new ServiceException("熔断错误"); + } + + /** + * 修改 代码自定义代号 + * + * @param st_re_route + */ + @Override + public R update(RouteEntity st_re_route) { + throw new ServiceException("熔断错误"); + } + + /** + * 删除 代码自定义代号 + * + * @param ids + */ + @Override + public R remove(String ids) { + throw new ServiceException("熔断错误"); + } +} diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java new file mode 100644 index 0000000..76881f3 --- /dev/null +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/threedimensional/fegin/RouteFeignClient.java @@ -0,0 +1,73 @@ +package com.hnac.hzinfo.inspect.threedimensional.fegin; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzinfo.inspect.Constants; +import com.hnac.hzinfo.inspect.plan.entity.RouteEntity; +import com.hnac.hzinfo.inspect.threedimensional.fallback.RouteFeignClientFallback; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.Valid; +import java.util.Map; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 8:55 + */ +@FeignClient(value = Constants.APP_NAME) +public interface RouteFeignClient { + + + /** + * 查询巡检路径管理列表 + * + * @param st_re_route + * @param query + * @return + */ + @GetMapping("/st_re_route/list") + public R> list(@ApiIgnore @RequestParam Map st_re_route, + @SpringQueryMap Query query); + + + /** + * 新增 代码自定义代号 + */ + @PostMapping("/st_re_route/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入st_re_route") + public R save(@RequestBody RouteEntity st_re_route); + + + /** + * 修改 代码自定义代号 + */ + @PostMapping("/st_re_route/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入st_re_route") + public R update(@RequestBody RouteEntity st_re_route); + + + /** + * 删除 代码自定义代号 + */ + @PostMapping("/st_re_route/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids); +} diff --git a/hzims-service-api/middle-api/.gitignore b/hzims-service-api/middle-api/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/hzims-service-api/middle-api/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/hzims-service-api/pom.xml b/hzims-service-api/pom.xml index 397a172..6fc1e55 100644 --- a/hzims-service-api/pom.xml +++ b/hzims-service-api/pom.xml @@ -27,6 +27,12 @@ weather-api common-api middle-api + base-info-api + digital-twin-display-api + dam-safety-api + video-image-api + water-quality-api + water-rain-api diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/entity/HiddenDanger.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/entity/HiddenDanger.java new file mode 100644 index 0000000..1924629 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/entity/HiddenDanger.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.safeproduct.hiddendanger.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("hidden_danger") +public class HiddenDanger { + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 危险行为 + */ + @TableField("danger_behavior") + private String dangerBehavior; + + /** + * 发生次数 + */ + @TableField("times") + private Integer times; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/vo/HiddenDangerQueryVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/vo/HiddenDangerQueryVo.java new file mode 100644 index 0000000..384bab9 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/vo/HiddenDangerQueryVo.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.safeproduct.hiddendanger.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; + +@Data +public class HiddenDangerQueryVo { + /** + * 危险行为 + */ + @TableField("danger_behavior") + private String dangerBehavior; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/DocumentManagement.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/DocumentManagement.java new file mode 100644 index 0000000..fafbe44 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/DocumentManagement.java @@ -0,0 +1,74 @@ +package com.hnac.hzims.safeproduct.management.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 文档管理 + *

+ * + * @author dfy + * @since 2023-08-11 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("document_management") +public class DocumentManagement implements Serializable { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 文档名称 + */ + @TableField("document_name") + private String documentName; + + /** + * 文档路径 + */ + @TableField("document_url") + private String documentUrl; + + /** + * 创建人Id + */ + @TableField("creator_id") + private Long creatorId; + + /** + * 创建人名称 + */ + @TableField("creator_name") + private String creatorName; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableLogic + @TableField("is_deleted") + private Integer isDeleted; + + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/IndicatorManagement.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/IndicatorManagement.java new file mode 100644 index 0000000..c53dc48 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/IndicatorManagement.java @@ -0,0 +1,77 @@ +package com.hnac.hzims.safeproduct.management.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 指标项管理 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("indicator_management") +public class IndicatorManagement implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 项目名称 + */ + @TableField("product_name") + private String productName; + + /** + * 标准分值 + */ + @TableField("standard_score") + private String standardScore; + + /** + * 评审方法及评分标准 + */ + @TableField("evaluation_method") + private String evaluationMethod; + + /** + * 指标管理id + */ + @TableField("target_management_id") + private Long targetManagementId; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableLogic + @TableField("is_deleted") + private Boolean deleted; + + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/RatingScale.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/RatingScale.java new file mode 100644 index 0000000..9345a44 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/RatingScale.java @@ -0,0 +1,71 @@ +package com.hnac.hzims.safeproduct.management.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 平分表 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("rating_scale") +public class RatingScale implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 指标项管理id + */ + @TableField("indicator_management_id") + private Long indicatorManagementId; + + /** + * 得分 + */ + @TableField("goal") + private String goal; + + /** + * 评审描述 + */ + @TableField("review_description") + private String reviewDescription; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableLogic + @TableField("is_deleted") + private Boolean deleted; + + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/TargetManagement.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/TargetManagement.java new file mode 100644 index 0000000..be6f001 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/entity/TargetManagement.java @@ -0,0 +1,81 @@ +package com.hnac.hzims.safeproduct.management.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.List; + +/** + *

+ * 指标管理 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("target_management") +public class TargetManagement implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 名称 + */ + @TableField("name") + private String name; + + /** + * 分值 + */ + @TableField("score") + private String score; + + /** + * 父级Id + */ + @TableField("parent_id") + private Long parentId; + + /** + * 等级 + */ + @TableField("level") + private Integer level; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 逻辑删除 + */ + @TableLogic + @TableField("is_deleted") + private Boolean deleted; + + + @TableField(exist = false) + private List children; + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/DocumentManagementQueryVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/DocumentManagementQueryVo.java new file mode 100644 index 0000000..375c018 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/DocumentManagementQueryVo.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.safeproduct.management.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/11 16:46 + */ +@Data +public class DocumentManagementQueryVo { + + /** + * 文档名称 + */ + @TableField("document_name") + private String documentName; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementQueryVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementQueryVo.java new file mode 100644 index 0000000..4a4fa7f --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementQueryVo.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.safeproduct.management.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/11 10:22 + */ +@Data +public class IndicatorManagementQueryVo { + + + /** + * 指标管理id + */ + private Long targetManagementId; + + + /** + * 项目名称 + */ + private String productName; + + + /** + * 开始时间 + */ + private String startTime; + + /** + * 结束时间 + */ + private String endTime; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementResponseVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementResponseVo.java new file mode 100644 index 0000000..c660d08 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/IndicatorManagementResponseVo.java @@ -0,0 +1,32 @@ +package com.hnac.hzims.safeproduct.management.vo; + +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/11 10:32 + */ +@Data +public class IndicatorManagementResponseVo extends IndicatorManagement { + + /** + * 名称 + */ + private String name; + + + /** + * 得分 + */ + private String goal; + + /** + * 评审描述 + */ + private String reviewDescription; + + +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/RatingScaleVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/RatingScaleVo.java new file mode 100644 index 0000000..b2527d1 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/management/vo/RatingScaleVo.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.safeproduct.management.vo; + +import lombok.Data; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/15 16:39 + */ +@Data +public class RatingScaleVo { + + + /** + * 指标项管理id + */ + private Long indicatorManagementId; + + /** + * 得分 + */ + private String goal; + + /** + * 评审描述 + */ + private String reviewDescription; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/entity/WorkArea.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/entity/WorkArea.java new file mode 100644 index 0000000..0f1ae1a --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/entity/WorkArea.java @@ -0,0 +1,54 @@ +package com.hnac.hzims.safeproduct.workarea.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("work_area") +public class WorkArea { + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 区域名称 + */ + @TableField("area_name") + private String areaName; + + /** + * 安全责任人 + */ + @TableField("direct_op_id") + private Long directOpId; + + /** + * 监管部门 + */ + @TableField("depart_id") + private Long departId; + + /** + * 分管领导 + */ + @TableField("lead_op_id") + private Long leadOpId; + + /** + * 区域范围 + */ + @TableField("area_range") + private String areaRange; + + private String directOpName; + + private String departName; + + private String leadOpName; +} diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/vo/WorkAreaQueryVo.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/vo/WorkAreaQueryVo.java new file mode 100644 index 0000000..61c2160 --- /dev/null +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/workarea/vo/WorkAreaQueryVo.java @@ -0,0 +1,32 @@ +package com.hnac.hzims.safeproduct.workarea.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import lombok.Data; + +@Data +public class WorkAreaQueryVo { + + /** + * 区域名称 + */ + @TableField("area_name") + private String areaName; + + /** + * 安全责任人 + */ + @TableField("direct_op_id") + private Long directOpId; + + /** + * 监管部门 + */ + @TableField("depart_id") + private Long departId; + + /** + * 分管领导 + */ + @TableField("lead_op_id") + private Long leadOpId; +} 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-api/water-quality-api/pom.xml b/hzims-service-api/water-quality-api/pom.xml new file mode 100644 index 0000000..c203bd2 --- /dev/null +++ b/hzims-service-api/water-quality-api/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + water-quality-api + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqConfigD.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqConfigD.java new file mode 100644 index 0000000..c69e21a --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqConfigD.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.waterquality.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *水质监测指标配置 + */ +@Data +@TableName("wq_config_d") +public class WqConfigD implements Serializable { + @ApiModelProperty("测站编码") + @TableId(type=IdType.INPUT) + private String stcd; + @ApiModelProperty("指标类型") + private String type; + @ApiModelProperty("指标值") + private String value; +} diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWfrinfB.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWfrinfB.java new file mode 100644 index 0000000..6cd688b --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWfrinfB.java @@ -0,0 +1,54 @@ +package com.hnac.hzims.waterquality.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + + +/** + *水功能区基本信息 + */ +@Data +@TableName("wq_wfrinf_b") +@EqualsAndHashCode(callSuper = true) +public class WqWfrinfB extends BaseEntity { + @ApiModelProperty("水功能区代码") + private String wfrcd; + @ApiModelProperty("水功能区名称") + private String wfrnm; + @ApiModelProperty("流域名称") + private String bsnm; + @ApiModelProperty("水系名称") + private String hnnm; + @ApiModelProperty("河流名称") + private String rvnm; + @ApiModelProperty("水功能区起始断面名称") + private String wfrscsnm; + @ApiModelProperty("水功能区起始断面经度") + private Double wfrscslgtd; + @ApiModelProperty("水功能区起始断面纬度") + private Double wfrscslttd; + @ApiModelProperty("水功能区终止断面名称") + private String wfrecsnm; + @ApiModelProperty("水功能区终止断面经度") + private Double wfrecslgtd; + @ApiModelProperty("水功能区终止断面纬度") + private Double wfrecslttd; + + @ApiModelProperty("行政区划码") + private String addvcd; + @ApiModelProperty("水功能区长度") + private Double wfrln; + @ApiModelProperty("水功能区库容") + private Double wfrrc; + @ApiModelProperty("水功能区面积") + private Double wfrar; + @ApiModelProperty("水功能区水质目标") + private String wfrwqt; + @ApiModelProperty("水功能区功能排序") + private String wfrwfo; + @ApiModelProperty("备注") + private String nt; +} diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWqsinfB.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWqsinfB.java new file mode 100644 index 0000000..96c7c70 --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWqsinfB.java @@ -0,0 +1,59 @@ +package com.hnac.hzims.waterquality.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.springblade.core.mp.base.BaseEntity; + +import java.util.Date; + +/** + *水质监测站 + */ +@Data +@TableName("wq_wqsinf_b") +@EqualsAndHashCode(callSuper = true) +public class WqWqsinfB extends BaseEntity { + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("测站名称") + private String stnm; + @ApiModelProperty("测站等级") + private String stgrd; + @ApiModelProperty("流域名称") + private String bsnm; + @ApiModelProperty("水系名称") + private String hnnm; + @ApiModelProperty("河流名称") + private String rvnm; + @ApiModelProperty("经度") + private Double lgtd; + @ApiModelProperty("纬度") + private Double lttd; + @ApiModelProperty("站址") + private String stlc; + @ApiModelProperty("行政区划码") + private String addvcd; + @ApiModelProperty("水资源分区码") + private String wrrcd; + @ApiModelProperty("水功能区划码") + private String wfrcd; + @ApiModelProperty("管理单位") + private String adag; + @ApiModelProperty("监测单位") + private String mnag; + @ApiModelProperty("监测频次") + private Integer mnfrq; + @ApiModelProperty("自动监测") + private Integer atmn; + @ApiModelProperty("建站年月") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date esstym; + @ApiModelProperty("撤站年月") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date wdstym; + @ApiModelProperty("备注") + private String nt; +} diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWrrinfB.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWrrinfB.java new file mode 100644 index 0000000..b09563b --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/entity/WqWrrinfB.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.waterquality.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.mp.base.BaseEntity; + + +/** + * 水资源分区基本信息 + */ +@Data +@TableName("wq_wrrinf_b") +public class WqWrrinfB extends BaseEntity { + @ApiModelProperty("水资源分区码") + private String wrrcd; + @ApiModelProperty("水资源分区名称") + private String wrrnm; + @ApiModelProperty("水资源分区面积") + private Double wrr5r; + +} diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/feign/IWqWqsinfBClient.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/feign/IWqWqsinfBClient.java new file mode 100644 index 0000000..a80f5c4 --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/feign/IWqWqsinfBClient.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright Example, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * Example, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.hnac.hzims.waterquality.feign; + +import com.hnac.hzims.waterquality.vo.WqWqsinfBVo; +import org.springblade.core.launch.constant.AppConstant; +import org.springblade.core.tool.api.R; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +/** + * Example Feign接口类 + * + * @author Chill + */ +@FeignClient( + value = AppConstant.APPLICATION_DESK_NAME +) +public interface IWqWqsinfBClient { + + String API_PREFIX = "/wqWqsinfBClient"; + String LIST = API_PREFIX + "/list"; + + /** + * 获取Example列表 + * + * @param number + * @return + */ + @GetMapping(LIST) + R> list(@RequestParam("number") Integer number); + +} diff --git a/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/vo/WqWqsinfBVo.java b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/vo/WqWqsinfBVo.java new file mode 100644 index 0000000..9d05b72 --- /dev/null +++ b/hzims-service-api/water-quality-api/src/main/java/com/hnac/hzims/waterquality/vo/WqWqsinfBVo.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.waterquality.vo; + + +import com.hnac.hzims.waterquality.entity.WqWqsinfB; + +public class WqWqsinfBVo extends WqWqsinfB { +} diff --git a/hzims-service-api/water-rain-api/pom.xml b/hzims-service-api/water-rain-api/pom.xml new file mode 100644 index 0000000..a919a96 --- /dev/null +++ b/hzims-service-api/water-rain-api/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service-api + 4.0.0-SNAPSHOT + + + water-rain-api + + + 8 + 8 + UTF-8 + + + \ No newline at end of file diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/bo/StationResp.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/bo/StationResp.java new file mode 100644 index 0000000..2691c22 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/bo/StationResp.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.waterrain.bo; + + +import com.hnac.hzims.waterrain.entity.StStbprpB; + +public class StationResp { + private StStbprpB stStbprpB; + + private Object obj; + + public StStbprpB getStStbprpB() { + return stStbprpB; + } + + public void setStStbprpB(StStbprpB stStbprpB) { + this.stStbprpB = stStbprpB; + } + + public Object getObj() { + return obj; + } + + public void setObj(Object obj) { + this.obj = obj; + } +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStPptnR.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStPptnR.java new file mode 100644 index 0000000..dda2d53 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStPptnR.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.waterrain.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class HzStPptnR implements Serializable { + private String stcd; + private Date tm; + private Double drp; +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRiverR.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRiverR.java new file mode 100644 index 0000000..d69750a --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRiverR.java @@ -0,0 +1,14 @@ +package com.hnac.hzims.waterrain.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class HzStRiverR implements Serializable { + private String stcd; + private Date tm; + private Double z; + private Double q; +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRsvrR.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRsvrR.java new file mode 100644 index 0000000..feb5928 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/HzStRsvrR.java @@ -0,0 +1,15 @@ +package com.hnac.hzims.waterrain.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class HzStRsvrR implements Serializable { + private String stcd;//测站编码 + private Date tm;//时间 + private Double rz; //水位 + private Double inq;//流量 +} + diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeData.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeData.java new file mode 100644 index 0000000..fee68a4 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeData.java @@ -0,0 +1,14 @@ +package com.hnac.hzims.waterrain.entity; + +import lombok.Data; + +import java.util.List; +import java.util.Map; + +@Data +public class ReorganizeData { + private String yearMonth; + private String stcd; + private String sttp; + private List> data; +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeLog.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeLog.java new file mode 100644 index 0000000..355fb4a --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/ReorganizeLog.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.waterrain.entity; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ReorganizeLog implements Serializable { + private String stcd; + private String yearMonth; + private String operateUser; + private String checkUser; +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/StStbprpB.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/StStbprpB.java new file mode 100644 index 0000000..5c8fb95 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/entity/StStbprpB.java @@ -0,0 +1,74 @@ +package com.hnac.hzims.waterrain.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springblade.core.mp.base.BaseEntity; + +/** + * 水雨情测站信息表 + */ +@Data +@TableName("st_stbprp_b") +public class StStbprpB extends BaseEntity { + @ApiModelProperty("机构id") + private String orgId; + @ApiModelProperty("河流id") + private String rvid; + @ApiModelProperty("水系id") + private String hnid; + @ApiModelProperty("流域id") + private String bsid; + @ApiModelProperty("测站编码") + private String stcd; + @ApiModelProperty("测站名称") + private String stnm; + @ApiModelProperty("河流名称") + private String rvnm; + @ApiModelProperty("水系名称") + private String hnnm; + @ApiModelProperty("流域名称") + private String bsnm; + @ApiModelProperty("经度(度分秒)") + private String lgtd; + @ApiModelProperty("纬度(度分秒)") + private String lttd; + @ApiModelProperty("站址") + private String stlc; + @ApiModelProperty("行政区划码") + private String addvcd; + @ApiModelProperty("基面修正基值") + private Double mdbz; + @ApiModelProperty("基面修正参数") + private Double mdpr; + @ApiModelProperty("基面名称") + private String dtmnm; + @ApiModelProperty("基面高程") + private Double dtmel; + @ApiModelProperty("站类") + private String sttp; + @ApiModelProperty("拍报段次") + private Double dfrtms; + @ApiModelProperty("拍报项目") + private String fritm; + @ApiModelProperty("报讯等级") + private String frgrd; + @ApiModelProperty("始报年月") + private String bgfrym; + @ApiModelProperty("截报年月") + private String edfrym; + @ApiModelProperty("管理机构") + private String admauth; + @ApiModelProperty("测站岸别") + private String stbk; + @ApiModelProperty("集水面积") + private Double drna; + @ApiModelProperty("拼音码") + private String phcd; + @ApiModelProperty("数值经度") + private Double nlgtd; + @ApiModelProperty("数值纬度") + private Double nlttd; + @ApiModelProperty("水库编码") + private String rscd; +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/HistoryDataCalcTypeEnum.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/HistoryDataCalcTypeEnum.java new file mode 100644 index 0000000..a840f68 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/HistoryDataCalcTypeEnum.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.waterrain.enums; + +public enum HistoryDataCalcTypeEnum { + ZERO(0,"整点值/最早值"), + ONE(1,"最大值"), + TWO(2,"最小值"), + THREE(3,"平均值"), + FOUR(4,"累计值/和值"), + FIVE(5,"变化值/差值"), + SIX(6,"最新值"); + + Integer strategy; + String desc; + + HistoryDataCalcTypeEnum(Integer strategy, String desc){ + this.strategy = strategy; + this.desc = desc; + } + + public Integer getStrategy() { + return strategy; + } + + public void setStrategy(Integer strategy) { + this.strategy = strategy; + } + + public String getDesc() { + return desc; + } + + public void setDesc(String desc) { + this.desc = desc; + } +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/WaterFlowRainEnum.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/WaterFlowRainEnum.java new file mode 100644 index 0000000..9858933 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/enums/WaterFlowRainEnum.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.waterrain.enums; + +public enum WaterFlowRainEnum { + RR("RR","水库水文站"), + ZZ("ZZ","河道水位站"), + ZQ("ZQ","河道水文站"), + PP("PP","雨量站"), + + LEVEL("level","水位"), + FLOW("flow","流量"), + RAIN("rain","降水"); + private String code; + private String name; + + WaterFlowRainEnum(String code,String name){ + this.code=code; + this.name=name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBClient.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBClient.java new file mode 100644 index 0000000..13c92ea --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBClient.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.waterrain.feign; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.waterrain.entity.StStbprpB; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; + +import java.util.List; + +@FeignClient( + value = "water-rain-monitor", + url = "${feign.water-rain-monitor:}" +) +public interface IStStbprpBClient { + String API_PREFIX = "/stStbprpBClient"; + String DETAIL = API_PREFIX + "/detail"; + String LIST = API_PREFIX + "/list"; + + /** + * 获取测站详情 + * @return + */ + @GetMapping(DETAIL) + StStbprpB detail(LambdaQueryWrapper wrapper); + + @GetMapping(LIST) + List list(LambdaQueryWrapper wrapper); +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBDataClient.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBDataClient.java new file mode 100644 index 0000000..091e381 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/feign/IStStbprpBDataClient.java @@ -0,0 +1,19 @@ +package com.hnac.hzims.waterrain.feign; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; + +import java.util.Date; +import java.util.Map; + +@FeignClient( + value = "water-rain-monitor", + url = "${feign.water-rain-monitor:}" +) +public interface IStStbprpBDataClient { + String API_PREFIX = "/stStbprpBDataClient"; + String QUERYMAXORMIN = API_PREFIX + "/queryMaxOrMin"; + + @GetMapping(QUERYMAXORMIN) + Map queryMaxOrMin(String deviceCode, Date startTime, Date endTime, Integer calcType,Integer saveTimeType,Integer timeInterval, String col); +} diff --git a/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/vo/StStbprpBVo.java b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/vo/StStbprpBVo.java new file mode 100644 index 0000000..8d1dfb8 --- /dev/null +++ b/hzims-service-api/water-rain-api/src/main/java/com/hnac/hzims/waterrain/vo/StStbprpBVo.java @@ -0,0 +1,9 @@ +package com.hnac.hzims.waterrain.vo; + +import com.hnac.hzims.waterrain.entity.StStbprpB; +import lombok.Data; + +@Data +public class StStbprpBVo extends StStbprpB { + private String sttpName; +} diff --git a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java index 191d23e..aef9c2b 100644 --- a/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java +++ b/hzims-service/assets/src/main/java/com/hnac/hzims/spare/feign/SpareClient.java @@ -1,23 +1,26 @@ package com.hnac.hzims.spare.feign; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; import com.hnac.hzims.spare.entity.*; import com.hnac.hzims.spare.mapper.SpRecordMapper; import com.hnac.hzims.spare.mapper.SpWarehouseOutMapper; import com.hnac.hzims.spare.service.*; -import com.hnac.hzims.spare.vo.WtSpBasicVO; import lombok.RequiredArgsConstructor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springblade.core.mp.support.Condition; -import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.RequestParam; +import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.system.feign.ISysClient; import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; -import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; /** * 备品备件Feign实现类 @@ -42,8 +45,17 @@ public class SpareClient implements ISpareClient{ private final IWtSpProviderService providerService; + private final IWtSpTotalService totalService; + + private final IWtSpBasicService wtSpBasicService; + private final ISpWarehouseOutService warehouseOutService; + private final IWtSpWarehouseService wtSpWarehouseService; + + private final ISysClient sysClient; + + @Override public Boolean warehouseOut(SpRecordEntity recordEntity) { List recordEntities = new ArrayList<>(); @@ -57,4 +69,72 @@ public class SpareClient implements ISpareClient{ Boolean result = warehouseOutService.save(entity); return result; } + + /** + * 固定资产越限 + * @param deptId + * @return + */ + @Override + public List exceedLimit(Long deptId) { + // 查询仓库 + List warehouses = wtSpWarehouseService.list(Wrappers.lambdaQuery() + .like(WtSpWarehouseEntity::getCreateDept,deptId) + ); + if(CollectionUtil.isEmpty(warehouses)){ + return new ArrayList<>(); + } + // 查询库存 + List totals = totalService.list(Wrappers.lambdaQuery() + .in(WtSpTotalEntity::getWarehouseId, warehouses.stream().map(WtSpWarehouseEntity::getId).collect(Collectors.toList())) + ); + if(CollectionUtil.isEmpty(totals)){ + return new ArrayList<>(); + } + // 查询限制条件 + List basics = wtSpBasicService.list(Wrappers.lambdaQuery() + .in(WtSpBasicEntity::getId,totals.stream().map(WtSpTotalEntity::getSpBasicId).collect(Collectors.toList())) + ); + if(CollectionUtil.isEmpty(totals)){ + return new ArrayList<>(); + } + // 过滤越限记录 + List exceeds = new ArrayList<>(); + for (WtSpTotalEntity total : totals){ + WtSpBasicEntity basic = basics.stream().filter(o->o.getId().equals(total.getSpBasicId())).min(Comparator.comparing(WtSpBasicEntity::getId)).get(); + if(ObjectUtil.isEmpty(basics)){ + continue; + } + if(total.getStock() > basic.getUpperLimit() || total.getStock() < basic.getLowerLimit()){ + AreaTimelyVo timely = new AreaTimelyVo(); + WtSpWarehouseEntity warehouse = warehouses.stream().filter(o->o.getId().equals(total.getWarehouseId())).min(Comparator.comparing(WtSpWarehouseEntity::getId)).get(); + timely.setDeptName(warehouse.getName()); + timely.setEventId(String.valueOf(total.getId())); + if(total.getStock() > basic.getUpperLimit()){ + timely.setContent(String.format("(%s)已达到上限,目前仓库内的库存为:%s,上限值为:%s。", + basic.getName(), + total.getStock(), + basic.getUpperLimit())); + timely.setSum((int) (total.getStock() - basic.getUpperLimit())); + timely.setColour(0); + if((double) (total.getStock() - basic.getUpperLimit()) / basic.getUpperLimit() > 0.3){ + timely.setColour(1); + } + }else{ + timely.setContent(String.format("(%s)已达到下限,目前仓库内的库存为:%s,下限值为:%s。", + basic.getName(), + total.getStock(), + basic.getUpperLimit())); + timely.setSum((int) (total.getStock() - basic.getLowerLimit())); + timely.setColour(0); + if((double)(basic.getLowerLimit() - total.getStock()) / basic.getLowerLimit() > 0.3){ + timely.setColour(1); + } + } + timely.setTime(DateUtil.format(new Date(),DateUtil.PATTERN_DATETIME)); + exceeds.add(timely); + } + } + return exceeds; + } } diff --git a/hzims-service/base-info/pom.xml b/hzims-service/base-info/pom.xml new file mode 100644 index 0000000..e5e862e --- /dev/null +++ b/hzims-service/base-info/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service + 4.0.0-SNAPSHOT + + + base-info + + + 8 + 8 + UTF-8 + + + + + + com.hnac.hzims + base-info-api + ${hzims.project.version} + + + org.springblade + blade-common + + + + org.springblade + blade-core-boot + + + org.springblade + blade-starter-swagger + + + org.springblade + blade-core-test + test + + + org.springblade + blade-core-auto + provided + + + + + + com.baomidou + mybatis-plus-generator + + + + + org.apache.velocity + velocity-engine-core + 2.2 + + + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/BaseInfoApplication.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/BaseInfoApplication.java new file mode 100644 index 0000000..eb1d8f3 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/BaseInfoApplication.java @@ -0,0 +1,40 @@ +package com.hnac.hzims.baseinfo; + +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 BaseInfoApplication extends SpringBootServletInitializer { + + + static { + System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.config.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.username", "nacos"); + System.setProperty("spring.cloud.nacos.password", "nacos"); + } + + + public final static String APP_NAME = "base-info"; + + public static void main(String[] args) { +// System.setProperty("nacos.standalone", "true"); + BladeApplication.run(APP_NAME, BaseInfoApplication.class, args); + } + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + return BladeApplication.createSpringApplicationBuilder(builder, APP_NAME, BaseInfoApplication.class); + } +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/IrrBIReachController.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/IrrBIReachController.java new file mode 100644 index 0000000..e39a843 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/IrrBIReachController.java @@ -0,0 +1,94 @@ +package com.hnac.hzims.baseinfo.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.IrrBIReach; +import com.hnac.hzims.baseinfo.service.IrrBIReachService; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; + +@RestController +@Api(description = "河流控制器") +@RequestMapping(value = "/area/irrBIReach/info") +public class IrrBIReachController { + @Autowired + private IrrBIReachService irs; + +// @ApiOperation(notes = "加载所有河流记录,不区分站点", value = "河流列表接口") +// @RequestMapping(value = "bindIrrBIReachs", method = RequestMethod.GET) +// @ResponseBody +// public R bindIrrBIReachs(@ApiParam(value = "名称") @RequestParam(required = false) String riverName, +// @ApiParam(value = "分页参数") @ModelAttribute PageParam pageParam) { +// R res = new R(); +// if(riverName!=null && "".equals(riverName)){ +// if(riverName.length() > 50){ +// res.setFailure("名称长度不能大于50","500"); +// } +// } +// res.setSuccess(irs.bindIrrBIReachs(riverName, pageParam)); +// return res; +// } + + @ApiOperation(notes = "加载所有河流记录,不区分站点", value = "河流列表接口") + @RequestMapping(value = "bindIrrBIReachs", method = RequestMethod.GET) + @ResponseBody + public R bindIrrBIReachs(@ApiParam(value = "名称") @RequestParam(required = false) String riverName, + @ApiParam(value = "分页参数") @ModelAttribute Query query) { + Page page = new Page<>(query.getCurrent(), query.getSize()); + R res = new R(); + if(riverName!=null && "".equals(riverName)){ + if(riverName.length() > 50){ + res.setMsg("名称长度不能大于50"); + res.setCode(500); + } + } + res.setData(irs.bindIrrBIReachs(riverName, page)); + return res; + } + + @ApiOperation(notes = "获取单条河流的信息接口", value = "获取单条河流的信息接口") + @RequestMapping(value = "getIrrBIReach", method = RequestMethod.GET) + @ResponseBody + public R getIrrBIReach(@RequestParam(required = true) @ApiParam(value = "河流编号") String riverCode) { + R res = new R(); + res.setData(irs.getIrrBIReach(riverCode)); + return res; + } + + @ApiOperation(notes = "编辑时编号不能修改", value = "河流信息修改接口") + @RequestMapping(value = "editIrrBIReach", method = RequestMethod.POST) + @ResponseBody + public R editIrrBIReach(@ApiParam(value = "河流") @RequestBody IrrBIReach irrBIReach) { + return irs.addOrEditIrrBIReach(irrBIReach,"update"); + } + + @ApiOperation(notes = "删除河流接口", value = "删除河流接口") + @RequestMapping(value = "delIrrBIReach", method = { RequestMethod.GET, RequestMethod.POST }) + @ResponseBody + public R delIrrBIReach(@RequestParam(required = true) @ApiParam(value = "河流编号") String riverCode) { + R res = new R(); + irs.delIrrBIReach(riverCode); + res.setMsg("操作成功"); + return res; + } + + @ApiOperation(notes = " 新增时编号需要做唯一性验证 ", value = "新增河流接口") + @RequestMapping(value = "addIrrBIReach", method = RequestMethod.POST) + @ResponseBody + public R addIrrBIReach(@ApiParam(value = "河流") @RequestBody IrrBIReach vo) { + return irs.addOrEditIrrBIReach(vo,"add"); + } +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirInfoController.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirInfoController.java new file mode 100644 index 0000000..3555c2a --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirInfoController.java @@ -0,0 +1,88 @@ +package com.hnac.hzims.baseinfo.controller; + + +import com.hnac.hzims.baseinfo.service.ReservoirInfoService; +import com.hnac.hzims.baseinfo.vo.ReservoirInfoVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import sun.reflect.generics.tree.VoidDescriptor; + +import javax.servlet.http.HttpServletRequest; +import java.util.ArrayList; +import java.util.List; + +@RestController +@Api(description = "水库档案控制器") +@RequestMapping(value = "/reservoir/info") +public class ReservoirInfoController { + + @Autowired + private ReservoirInfoService reservoirInfoService; + + + @ApiOperation(notes = "加载所有水库记录,区分站点", value = "水库列表接口") + @RequestMapping(value = "bindReservoirs", method = RequestMethod.GET) + @ResponseBody + public R bindReservoirs(HttpServletRequest request, + @ApiParam(value = "名称") @RequestParam(required = false) String name, + @ApiParam(value = "站点ID") @RequestParam String stationId, + @ApiParam(value = "区域编码") @RequestParam(required = false) String areaCode, + @ApiParam(value = "河流编码") @RequestParam(required = false) String riverCode, + @ApiParam(value = "分页参数") @ModelAttribute Query query) { + List stationIds = new ArrayList(); + //查询当前用户下所有站点的水库列表 + if(stationId.equals("ALL")){ + + }else{ + stationIds.add(stationId); + } + + String tmpAreaCode =""; + if(areaCode!=null) { + tmpAreaCode = areaCode.replaceAll("0+$", ""); + } + return R.data(reservoirInfoService.bindReservoirList(name,tmpAreaCode,riverCode, stationIds, query)); + } + + + @ApiOperation(notes = "获取单条水库的信息接口", value = "获取单条水库的信息接口") + @RequestMapping(value = "getReservoir", method = RequestMethod.GET) + @ResponseBody + public R getReservoir(@RequestParam(required = true) @ApiParam(value = "水库编号") String stcd) { + return R.data(reservoirInfoService.getReservoir(stcd)); + } + + @ApiOperation(notes = "水库信息修改接口", value = "水库信息修改接口") + @RequestMapping(value = "editReservoir", method = RequestMethod.POST) + @ResponseBody + public R editReservoir(@ApiParam(value = "水库信息") @RequestBody ReservoirInfoVo reservoirInfoVo) { + + return reservoirInfoService.addOrEditReservoir(reservoirInfoVo,"update"); + + } + + @ApiOperation(notes = "删除水库接口", value = "删除水库接口") + @RequestMapping(value = "delReservoir", method = { RequestMethod.GET, RequestMethod.POST }) + @ResponseBody + public R delReservoir(@RequestParam(required = true) @ApiParam(value = "水库编号") String stcd) { + + return reservoirInfoService.delReservoir(stcd); + + } + + @ApiOperation(notes = "新增水库接口", value = "新增水库接口") + @RequestMapping(value = "addReservoir", method = { RequestMethod.POST }) + @ResponseBody + public R addReservoir(@ApiParam(value = "水库") @RequestBody ReservoirInfoVo vo) { + return reservoirInfoService.addOrEditReservoir(vo,"add"); + } + + + + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirRefdataController.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirRefdataController.java new file mode 100644 index 0000000..8defce9 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/ReservoirRefdataController.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.baseinfo.controller; + + +import com.hnac.hzims.baseinfo.entity.ReservoirRefdata; +import com.hnac.hzims.baseinfo.service.ReservoirRefDataService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RestController +@Api(description = "水库数据扩展表控制器") +@RequestMapping(value = "/reservoir/refdata") +public class ReservoirRefdataController { + @Autowired + private ReservoirRefDataService reservoirRefDataService; + + @ApiOperation(notes = "stcd必须真实", value = "水库数据扩展配置接口") + @RequestMapping(value = "configReservoirRefData", method = RequestMethod.POST) + @ResponseBody + public R configReservoirRefData( + @ApiParam(value = "水库信息") @RequestBody ReservoirRefdata reservoirRefdata) { + reservoirRefDataService.configReservoirRefData(reservoirRefdata); + return R.success("操作成功"); + } + + @ApiOperation(notes = "stcd必须真实", value = "水库数据扩展获得接口") + @RequestMapping(value = "getReservoirRefData", method = {RequestMethod.POST, RequestMethod.GET}) + @ResponseBody + public R getReservoirRefData(@ApiParam(value = "水库编码") String stcd) { + return R.data(reservoirRefDataService.getReservoirRefData(stcd)); + } +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StZvarlBController.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StZvarlBController.java new file mode 100644 index 0000000..3f2bc62 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/StZvarlBController.java @@ -0,0 +1,72 @@ +package com.hnac.hzims.baseinfo.controller; + + +import com.hnac.hzims.baseinfo.entity.StZvarlB; +import com.hnac.hzims.baseinfo.service.StZvarlBService; +import com.hnac.hzims.common.utils.Condition; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; + +@RestController +@Api(description = "库(湖)容曲线控制器") +@RequestMapping(value = "/reservoir/stZvarlB") +public class StZvarlBController { + + @Autowired + private StZvarlBService stZvarlBService; + + + @ApiOperation(notes = "获取库(湖)容曲线列表数据接口", value = "获取库(湖)容曲线列表数据接口") + @RequestMapping(value = "bindStZvarlBs", method = RequestMethod.GET) + @ResponseBody + public R bindStZvarlBs(@RequestParam(required = true) @ApiParam(value = "水库编号") String stcd, + @ApiParam(value = "分页参数") @ModelAttribute Query query) { + return R.data(stZvarlBService.bindStZvarlBs(stcd, Condition.getPage(query))); + } + + @ApiOperation(notes = "新增库(湖)容曲线记录接口", value = "新增库(湖)容曲线记录息接口") + @RequestMapping(value = "addStZvarlB", method = RequestMethod.POST) + @ResponseBody + public R addStZvarlB(@ApiParam(value = "库(湖)曲线对象") @RequestBody StZvarlB stZvarlB) { + + return stZvarlBService.addOrEditStZvarlB(stZvarlB); + + } + + @ApiOperation(notes = "更新库(湖)容曲线记录接口", value = "更新库(湖)容曲线记录接口") + @RequestMapping(value = "editStZvarlB", method = RequestMethod.POST) + @ResponseBody + public R editStZvarlB(@ApiParam(value = "库(湖)曲线对象") @RequestBody StZvarlB stZvarlB) { + + return stZvarlBService.addOrEditStZvarlB(stZvarlB); + + } + + @ApiOperation(notes = "删除库(湖)容曲线记录接口", value = "删除库(湖)容曲线记录接口") + @RequestMapping(value = "delStZvarlB", method = { RequestMethod.GET, RequestMethod.POST }) + @ResponseBody + public R delStZvarlB(@RequestParam(required = true) @ApiParam(value = "ID") Integer id) { + + return stZvarlBService.delStZvarlB(id); + + } + + @ApiOperation(notes = "根据库水位获取库容", value = "根据库水位获取库容") + @RequestMapping(value = "getWValue", method = { RequestMethod.GET, RequestMethod.POST }) + @ResponseBody + public R getWValue(String stcd,String rz) { + R res = new R(); + BigDecimal bd=new BigDecimal(rz); + BigDecimal data=stZvarlBService.getWValue(stcd,bd); + res.setMsg("操作成功"); + res.setData(data); + return res; + } +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/WqLrinfBController.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/WqLrinfBController.java new file mode 100644 index 0000000..ea1e462 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/controller/WqLrinfBController.java @@ -0,0 +1,94 @@ +package com.hnac.hzims.baseinfo.controller; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.WqLrinfB; +import com.hnac.hzims.baseinfo.service.WqLrinfBService; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; + +@RestController +@Api(description = "湖库控制器") +@RequestMapping(value = "/area/wqLrinfB/info") +public class WqLrinfBController { + @Autowired + private WqLrinfBService wbs; + +// @ApiOperation(notes = "加载所有湖库记录,不区分站点", value = "湖库列表接口") +// @RequestMapping(value = "bindWqLrinfBs", method = RequestMethod.GET) +// @ResponseBody +// public R bindWqLrinfBs(@ApiParam(value = "名称") @RequestParam(required = false) String lrnm, +// @ApiParam(value = "分页参数") @ModelAttribute PageParam pageParam) { +// R res = new R(); +// if(lrnm!=null && "".equals(lrnm)){ +// if(lrnm.length() > 50){ +// res.setFailure("名称长度不能大于50","500"); +// } +// } +// res.setSuccess(wbs.bindWqLrinfBs(lrnm, pageParam)); +// return res; +// } + + @ApiOperation(notes = "加载所有湖库记录,不区分站点", value = "湖库列表接口") + @RequestMapping(value = "bindWqLrinfBs", method = RequestMethod.GET) + @ResponseBody + public R bindWqLrinfBs(@ApiParam(value = "名称") @RequestParam(required = false) String lrnm, + @ApiParam(value = "分页参数") @ModelAttribute Query query) { + Page page = new Page<>(query.getCurrent(), query.getSize()); + R res = new R(); + if(lrnm!=null && "".equals(lrnm)){ + if(lrnm.length() > 50){ + res.setMsg("名称长度不能大于50"); + res.setData(500); + } + } + res.setData(wbs.bindWqLrinfBs(lrnm, page)); + return res; + } + + @ApiOperation(notes = "获取单条湖库的信息接口", value = "获取单条湖库的信息接口") + @RequestMapping(value = "getWqLrinfB", method = RequestMethod.GET) + @ResponseBody + public R getWqLrinfB(@RequestParam(required = true) @ApiParam(value = "湖库编号") String lrcd) { + R res = new R(); + res.setData(wbs.getWqLrinfB(lrcd)); + return res; + } + + @ApiOperation(notes = "编辑时编号不能修改", value = "湖库信息修改接口") + @RequestMapping(value = "editWqLrinfB", method = RequestMethod.POST) + @ResponseBody + public R editWqLrinfB(@ApiParam(value = "湖库信息") @RequestBody WqLrinfB wqLrinfB) { + + return wbs.editWqLrinfB(wqLrinfB); + + } + + @ApiOperation(notes = "删除湖库接口", value = "删除湖库接口") + @RequestMapping(value = "delWqLrinfB", method = { RequestMethod.GET, RequestMethod.POST }) + @ResponseBody + public R delWqLrinfB(@RequestParam @ApiParam(value = "湖库编号") String lrcd) { + return wbs.delWqLrinfB(lrcd); + + } + + @ApiOperation(notes = "新增时编号需要做唯一性验证", value = "新增湖库接口") + @RequestMapping(value = "addWqLrinfB", method = RequestMethod.POST ) + @ResponseBody + public R addWqLrinfB(@ApiParam(value = "湖库") @RequestBody WqLrinfB wqLrinfB) { + + return wbs.addWqLrinfB(wqLrinfB); + + } +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/FileReservoirInfoMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/FileReservoirInfoMapper.java new file mode 100644 index 0000000..00da4b4 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/FileReservoirInfoMapper.java @@ -0,0 +1,14 @@ +package com.hnac.hzims.baseinfo.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.baseinfo.entity.FileReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:41 + */ +public interface FileReservoirInfoMapper extends BaseMapper { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ImageReservoirInfoMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ImageReservoirInfoMapper.java new file mode 100644 index 0000000..f4ddffa --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ImageReservoirInfoMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.baseinfo.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:40 + */ +public interface ImageReservoirInfoMapper extends BaseMapper { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.java new file mode 100644 index 0000000..d10aeaa --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.baseinfo.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.IrrBIReach; +import com.hnac.hzims.baseinfo.entity.IrrBIReachExample; +import org.apache.ibatis.annotations.Param; + +public interface IrrBIReachMapper { + int deleteByPrimaryKey(String riverCode); + + int insert(IrrBIReach record); + + int insertSelective(IrrBIReach record); + + List selectByExample(IrrBIReachExample example); + + IrrBIReach selectByPrimaryKey(String riverCode); + + int updateByPrimaryKeySelective(IrrBIReach record); + + int updateByPrimaryKey(IrrBIReach record); + + IPage selectByRiverName(@Param("riverName")String riverName, IPage page); +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.xml b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.xml new file mode 100644 index 0000000..918892e --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/IrrBIReachMapper.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + RIVER_CODE, RIVER_NAME, RIVER_WIDTH, RIVER_FLUX, COORDINATESET + + + + + delete from irrbireach + where RIVER_CODE = #{riverCode,jdbcType=CHAR} + + + insert into irrbireach (RIVER_CODE, RIVER_NAME, RIVER_WIDTH, + RIVER_FLUX, COORDINATESET) + values (#{riverCode,jdbcType=CHAR}, #{riverName,jdbcType=VARCHAR}, #{riverWidth,jdbcType=DECIMAL}, + #{riverFlux,jdbcType=DECIMAL}, #{coordinateset,jdbcType=VARCHAR}) + + + insert into irrbireach + + + RIVER_CODE, + + + RIVER_NAME, + + + RIVER_WIDTH, + + + RIVER_FLUX, + + + COORDINATESET, + + + + + #{riverCode,jdbcType=CHAR}, + + + #{riverName,jdbcType=VARCHAR}, + + + #{riverWidth,jdbcType=DECIMAL}, + + + #{riverFlux,jdbcType=DECIMAL}, + + + #{coordinateset,jdbcType=VARCHAR}, + + + + + update irrbireach + + + RIVER_NAME = #{riverName,jdbcType=VARCHAR}, + + + RIVER_WIDTH = #{riverWidth,jdbcType=DECIMAL}, + + + RIVER_FLUX = #{riverFlux,jdbcType=DECIMAL}, + + + COORDINATESET = #{coordinateset,jdbcType=VARCHAR}, + + + where RIVER_CODE = #{riverCode,jdbcType=CHAR} + + + update irrbireach + set RIVER_NAME = #{riverName,jdbcType=VARCHAR}, + RIVER_WIDTH = #{riverWidth,jdbcType=DECIMAL}, + RIVER_FLUX = #{riverFlux,jdbcType=DECIMAL}, + COORDINATESET = #{coordinateset,jdbcType=VARCHAR} + where RIVER_CODE = #{riverCode,jdbcType=CHAR} + + + + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.java new file mode 100644 index 0000000..5d1f6fe --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.java @@ -0,0 +1,35 @@ +package com.hnac.hzims.baseinfo.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.metadata.PageList; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.ReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ReservoirInfoExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ReservoirInfoMapper { + int deleteByPrimaryKey(String stcd); + + int insert(ReservoirInfo record); + + int insertSelective(ReservoirInfo record); + + List selectByExample(ReservoirInfoExample example); + + ReservoirInfo selectByPrimaryKey(String stcd); + + int updateByPrimaryKeySelective(ReservoirInfo record); + + int updateByPrimaryKey(ReservoirInfo record); + + IPage selectByNameAndStationId(@Param("name") String name, + @Param("areaCode")String areaCode, @Param("riverCode")String riverCode, + @Param("stationIds") List stationId, + Page pageBounds); + + IPage selectByNameAndStationId(@Param("name") String name, + @Param("areaCode")String areaCode,@Param("riverCode")String riverCode, + @Param("stationIds") List stationId, IPage page); +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.xml b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.xml new file mode 100644 index 0000000..776420d --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirInfoMapper.xml @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + STCD, STATIONID, DISCHARGE, NAME, LOCATION, VILLAGE, ROADLENGTH, ROADCONDITIION, + BUILDDATE, COMPLETEDDATE, RAINAREA, DESIGNEDFLOODFLOW, CHEDKEDFLOODFLOW, DESIGNEDFILLAREA, + DESIGNEDTOTALFLOW, CHECDEDTOTALFLOW, AVERAGERAINFALL, DESIGNEDMAXFLOW, CHECKEDMAXFLOW, + VOLUME, CHECKEDFLOODLEVEL, HISTORICALMAXLEVEL, FLOODCONTROLVOLUME, DESIGNEDFLOODLEVEL, + MAXLEVELTIME, UTILIZABLEVOLUME, NORRMALLEVEL, FLOODDETENTIONVOLUME, DEADLEVEL, AREA_CODE, + LRCD, SZHLDM, DONGJ, BEIW,MJFLSSCNWL + + + + + delete from reservoir_info + where STCD = #{stcd,jdbcType=VARCHAR} + + + insert into reservoir_info (STCD, STATIONID, DISCHARGE, + NAME, LOCATION, VILLAGE, + ROADLENGTH, ROADCONDITIION, BUILDDATE, + COMPLETEDDATE, RAINAREA, DESIGNEDFLOODFLOW, + CHEDKEDFLOODFLOW, DESIGNEDFILLAREA, DESIGNEDTOTALFLOW, + CHECDEDTOTALFLOW, AVERAGERAINFALL, DESIGNEDMAXFLOW, + CHECKEDMAXFLOW, VOLUME, CHECKEDFLOODLEVEL, + HISTORICALMAXLEVEL, FLOODCONTROLVOLUME, DESIGNEDFLOODLEVEL, + MAXLEVELTIME, UTILIZABLEVOLUME, NORRMALLEVEL, + FLOODDETENTIONVOLUME, DEADLEVEL, AREA_CODE, + LRCD, SZHLDM, DONGJ, BEIW,MJFLSSCNWL + ) + values (#{stcd,jdbcType=VARCHAR}, #{stationid,jdbcType=VARCHAR}, #{discharge,jdbcType=REAL}, + #{name,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, #{village,jdbcType=VARCHAR}, + #{roadlength,jdbcType=REAL}, #{roadconditiion,jdbcType=VARCHAR}, #{builddate,jdbcType=DATE}, + #{completeddate,jdbcType=DATE}, #{rainarea,jdbcType=REAL}, #{designedfloodflow,jdbcType=REAL}, + #{chedkedfloodflow,jdbcType=REAL}, #{designedfillarea,jdbcType=REAL}, #{designedtotalflow,jdbcType=REAL}, + #{checdedtotalflow,jdbcType=REAL}, #{averagerainfall,jdbcType=REAL}, #{designedmaxflow,jdbcType=REAL}, + #{checkedmaxflow,jdbcType=REAL}, #{volume,jdbcType=REAL}, #{checkedfloodlevel,jdbcType=REAL}, + #{historicalmaxlevel,jdbcType=REAL}, #{floodcontrolvolume,jdbcType=REAL}, #{designedfloodlevel,jdbcType=REAL}, + #{maxleveltime,jdbcType=TIMESTAMP}, #{utilizablevolume,jdbcType=REAL}, #{norrmallevel,jdbcType=REAL}, + #{flooddetentionvolume,jdbcType=REAL}, #{deadlevel,jdbcType=REAL}, #{areaCode,jdbcType=VARCHAR}, + #{lrcd,jdbcType=VARCHAR}, #{szhldm,jdbcType=VARCHAR}, #{dongj,jdbcType=REAL}, #{beiw,jdbcType=REAL} + , #{mjflsscnwl,jdbcType=REAL} + ) + + + insert into reservoir_info + + + STCD, + + + STATIONID, + + + DISCHARGE, + + + NAME, + + + LOCATION, + + + VILLAGE, + + + ROADLENGTH, + + + ROADCONDITIION, + + + BUILDDATE, + + + COMPLETEDDATE, + + + RAINAREA, + + + DESIGNEDFLOODFLOW, + + + CHEDKEDFLOODFLOW, + + + DESIGNEDFILLAREA, + + + DESIGNEDTOTALFLOW, + + + CHECDEDTOTALFLOW, + + + AVERAGERAINFALL, + + + DESIGNEDMAXFLOW, + + + CHECKEDMAXFLOW, + + + VOLUME, + + + CHECKEDFLOODLEVEL, + + + HISTORICALMAXLEVEL, + + + FLOODCONTROLVOLUME, + + + DESIGNEDFLOODLEVEL, + + + MAXLEVELTIME, + + + UTILIZABLEVOLUME, + + + NORRMALLEVEL, + + + FLOODDETENTIONVOLUME, + + + DEADLEVEL, + + + AREA_CODE, + + + LRCD, + + + SZHLDM, + + + DONGJ, + + + BEIW, + + + MJFLSSCNWL, + + + + + #{stcd,jdbcType=VARCHAR}, + + + #{stationid,jdbcType=VARCHAR}, + + + #{discharge,jdbcType=REAL}, + + + #{name,jdbcType=VARCHAR}, + + + #{location,jdbcType=VARCHAR}, + + + #{village,jdbcType=VARCHAR}, + + + #{roadlength,jdbcType=REAL}, + + + #{roadconditiion,jdbcType=VARCHAR}, + + + #{builddate,jdbcType=DATE}, + + + #{completeddate,jdbcType=DATE}, + + + #{rainarea,jdbcType=REAL}, + + + #{designedfloodflow,jdbcType=REAL}, + + + #{chedkedfloodflow,jdbcType=REAL}, + + + #{designedfillarea,jdbcType=REAL}, + + + #{designedtotalflow,jdbcType=REAL}, + + + #{checdedtotalflow,jdbcType=REAL}, + + + #{averagerainfall,jdbcType=REAL}, + + + #{designedmaxflow,jdbcType=REAL}, + + + #{checkedmaxflow,jdbcType=REAL}, + + + #{volume,jdbcType=REAL}, + + + #{checkedfloodlevel,jdbcType=REAL}, + + + #{historicalmaxlevel,jdbcType=REAL}, + + + #{floodcontrolvolume,jdbcType=REAL}, + + + #{designedfloodlevel,jdbcType=REAL}, + + + #{maxleveltime,jdbcType=TIMESTAMP}, + + + #{utilizablevolume,jdbcType=REAL}, + + + #{norrmallevel,jdbcType=REAL}, + + + #{flooddetentionvolume,jdbcType=REAL}, + + + #{deadlevel,jdbcType=REAL}, + + + #{areaCode,jdbcType=VARCHAR}, + + + #{lrcd,jdbcType=VARCHAR}, + + + #{szhldm,jdbcType=VARCHAR}, + + + #{dongj,jdbcType=REAL}, + + + #{beiw,jdbcType=REAL}, + + + #{mjflsscnwl,jdbcType=REAL}, + + + + + update reservoir_info + + + STATIONID = #{stationid,jdbcType=VARCHAR}, + + + DISCHARGE = #{discharge,jdbcType=REAL}, + + + NAME = #{name,jdbcType=VARCHAR}, + + + LOCATION = #{location,jdbcType=VARCHAR}, + + + VILLAGE = #{village,jdbcType=VARCHAR}, + + + ROADLENGTH = #{roadlength,jdbcType=REAL}, + + + ROADCONDITIION = #{roadconditiion,jdbcType=VARCHAR}, + + + BUILDDATE = #{builddate,jdbcType=DATE}, + + + COMPLETEDDATE = #{completeddate,jdbcType=DATE}, + + + RAINAREA = #{rainarea,jdbcType=REAL}, + + + DESIGNEDFLOODFLOW = #{designedfloodflow,jdbcType=REAL}, + + + CHEDKEDFLOODFLOW = #{chedkedfloodflow,jdbcType=REAL}, + + + DESIGNEDFILLAREA = #{designedfillarea,jdbcType=REAL}, + + + DESIGNEDTOTALFLOW = #{designedtotalflow,jdbcType=REAL}, + + + CHECDEDTOTALFLOW = #{checdedtotalflow,jdbcType=REAL}, + + + AVERAGERAINFALL = #{averagerainfall,jdbcType=REAL}, + + + DESIGNEDMAXFLOW = #{designedmaxflow,jdbcType=REAL}, + + + CHECKEDMAXFLOW = #{checkedmaxflow,jdbcType=REAL}, + + + VOLUME = #{volume,jdbcType=REAL}, + + + CHECKEDFLOODLEVEL = #{checkedfloodlevel,jdbcType=REAL}, + + + HISTORICALMAXLEVEL = #{historicalmaxlevel,jdbcType=REAL}, + + + FLOODCONTROLVOLUME = #{floodcontrolvolume,jdbcType=REAL}, + + + DESIGNEDFLOODLEVEL = #{designedfloodlevel,jdbcType=REAL}, + + + MAXLEVELTIME = #{maxleveltime,jdbcType=TIMESTAMP}, + + + UTILIZABLEVOLUME = #{utilizablevolume,jdbcType=REAL}, + + + NORRMALLEVEL = #{norrmallevel,jdbcType=REAL}, + + + FLOODDETENTIONVOLUME = #{flooddetentionvolume,jdbcType=REAL}, + + + DEADLEVEL = #{deadlevel,jdbcType=REAL}, + + + AREA_CODE = #{areaCode,jdbcType=VARCHAR}, + + + LRCD = #{lrcd,jdbcType=VARCHAR}, + + + SZHLDM = #{szhldm,jdbcType=VARCHAR}, + + + DONGJ = #{dongj,jdbcType=REAL}, + + + BEIW = #{beiw,jdbcType=REAL}, + + + MJFLSSCNWL = #{mjflsscnwl,jdbcType=REAL}, + + + where STCD = #{stcd,jdbcType=VARCHAR} + + + update reservoir_info + set STATIONID = #{stationid,jdbcType=VARCHAR}, + DISCHARGE = #{discharge,jdbcType=REAL}, + NAME = #{name,jdbcType=VARCHAR}, + LOCATION = #{location,jdbcType=VARCHAR}, + VILLAGE = #{village,jdbcType=VARCHAR}, + ROADLENGTH = #{roadlength,jdbcType=REAL}, + ROADCONDITIION = #{roadconditiion,jdbcType=VARCHAR}, + BUILDDATE = #{builddate,jdbcType=DATE}, + COMPLETEDDATE = #{completeddate,jdbcType=DATE}, + RAINAREA = #{rainarea,jdbcType=REAL}, + DESIGNEDFLOODFLOW = #{designedfloodflow,jdbcType=REAL}, + CHEDKEDFLOODFLOW = #{chedkedfloodflow,jdbcType=REAL}, + DESIGNEDFILLAREA = #{designedfillarea,jdbcType=REAL}, + DESIGNEDTOTALFLOW = #{designedtotalflow,jdbcType=REAL}, + CHECDEDTOTALFLOW = #{checdedtotalflow,jdbcType=REAL}, + AVERAGERAINFALL = #{averagerainfall,jdbcType=REAL}, + DESIGNEDMAXFLOW = #{designedmaxflow,jdbcType=REAL}, + CHECKEDMAXFLOW = #{checkedmaxflow,jdbcType=REAL}, + VOLUME = #{volume,jdbcType=REAL}, + CHECKEDFLOODLEVEL = #{checkedfloodlevel,jdbcType=REAL}, + HISTORICALMAXLEVEL = #{historicalmaxlevel,jdbcType=REAL}, + FLOODCONTROLVOLUME = #{floodcontrolvolume,jdbcType=REAL}, + DESIGNEDFLOODLEVEL = #{designedfloodlevel,jdbcType=REAL}, + MAXLEVELTIME = #{maxleveltime,jdbcType=TIMESTAMP}, + UTILIZABLEVOLUME = #{utilizablevolume,jdbcType=REAL}, + NORRMALLEVEL = #{norrmallevel,jdbcType=REAL}, + FLOODDETENTIONVOLUME = #{flooddetentionvolume,jdbcType=REAL}, + DEADLEVEL = #{deadlevel,jdbcType=REAL}, + AREA_CODE = #{areaCode,jdbcType=VARCHAR}, + LRCD = #{lrcd,jdbcType=VARCHAR}, + SZHLDM = #{szhldm,jdbcType=VARCHAR}, + DONGJ = #{dongj,jdbcType=REAL}, + BEIW = #{beiw,jdbcType=REAL}, + MJFLSSCNWL = #{mjflsscnwl,jdbcType=REAL} + where STCD = #{stcd,jdbcType=VARCHAR} + + + + + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.java new file mode 100644 index 0000000..01c9ea8 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.baseinfo.mapper; + +import com.hnac.hzims.baseinfo.entity.ReservoirRefdata; +import com.hnac.hzims.baseinfo.entity.ReservoirRefdataExample; + +import java.util.List; +public interface ReservoirRefdataMapper { + int deleteByPrimaryKey(String stcd); + + int insert(ReservoirRefdata record); + + int insertSelective(ReservoirRefdata record); + + List selectByExample(ReservoirRefdataExample example); + + ReservoirRefdata selectByPrimaryKey(String stcd); + + int updateByPrimaryKeySelective(ReservoirRefdata record); + + int updateByPrimaryKey(ReservoirRefdata record); +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.xml b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.xml new file mode 100644 index 0000000..41e50a5 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/ReservoirRefdataMapper.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + STCD, REFSTCD, REFQPOINT, REFZPOINT + + + + + delete from reservoir_refdata + where STCD = #{stcd,jdbcType=VARCHAR} + + + insert into reservoir_refdata (STCD, REFSTCD, REFQPOINT, + REFZPOINT) + values (#{stcd,jdbcType=VARCHAR}, #{refstcd,jdbcType=CHAR}, #{refqpoint,jdbcType=VARCHAR}, + #{refzpoint,jdbcType=CHAR}) + + + insert into reservoir_refdata + + + STCD, + + + REFSTCD, + + + REFQPOINT, + + + REFZPOINT, + + + + + #{stcd,jdbcType=VARCHAR}, + + + #{refstcd,jdbcType=CHAR}, + + + #{refqpoint,jdbcType=VARCHAR}, + + + #{refzpoint,jdbcType=CHAR}, + + + + + update reservoir_refdata + + + REFSTCD = #{refstcd,jdbcType=CHAR}, + + + REFQPOINT = #{refqpoint,jdbcType=VARCHAR}, + + + REFZPOINT = #{refzpoint,jdbcType=CHAR}, + + + where STCD = #{stcd,jdbcType=VARCHAR} + + + update reservoir_refdata + set REFSTCD = #{refstcd,jdbcType=CHAR}, + REFQPOINT = #{refqpoint,jdbcType=VARCHAR}, + REFZPOINT = #{refzpoint,jdbcType=CHAR} + where STCD = #{stcd,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.java new file mode 100644 index 0000000..7b41776 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.baseinfo.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.StZvarlB; +import com.hnac.hzims.baseinfo.entity.StZvarlBExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +public interface StZvarlBMapper { + int deleteByPrimaryKey(Integer id); + + int insert(StZvarlB record); + + int insertSelective(StZvarlB record); + + List selectByExample(StZvarlBExample example); + + StZvarlB selectByPrimaryKey(Integer id); + + int updateByPrimaryKeySelective(StZvarlB record); + + int updateByPrimaryKey(StZvarlB record); + IPage selectByStcd(@Param("stcd") String stcd, IPage page); + + List selectMaxMin(StZvarlB stZvarlB); + + List selectStZvarlB(@Param("stcd") String stcd); +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.xml b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.xml new file mode 100644 index 0000000..84cd544 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/StZvarlBMapper.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + ID, STCD, MSTM, PTNO, RZ, W, WSFA, MODITIME + + + + + delete from st_zvarl_b + where ID = #{id,jdbcType=INTEGER} + + + insert into st_zvarl_b (ID, STCD, MSTM, + PTNO, RZ, W, WSFA, + MODITIME) + values (#{id,jdbcType=INTEGER}, #{stcd,jdbcType=VARCHAR}, #{mstm,jdbcType=TIMESTAMP}, + #{ptno,jdbcType=INTEGER}, #{rz,jdbcType=DECIMAL}, #{w,jdbcType=DECIMAL}, #{wsfa,jdbcType=DECIMAL}, + #{moditime,jdbcType=TIMESTAMP}) + + + insert into st_zvarl_b + + + ID, + + + STCD, + + + MSTM, + + + PTNO, + + + RZ, + + + W, + + + WSFA, + + + MODITIME, + + + + + #{id,jdbcType=INTEGER}, + + + #{stcd,jdbcType=VARCHAR}, + + + #{mstm,jdbcType=TIMESTAMP}, + + + #{ptno,jdbcType=INTEGER}, + + + #{rz,jdbcType=DECIMAL}, + + + #{w,jdbcType=DECIMAL}, + + + #{wsfa,jdbcType=DECIMAL}, + + + #{moditime,jdbcType=TIMESTAMP}, + + + + + update st_zvarl_b + + + STCD = #{stcd,jdbcType=VARCHAR}, + + + MSTM = #{mstm,jdbcType=TIMESTAMP}, + + + PTNO = #{ptno,jdbcType=INTEGER}, + + + RZ = #{rz,jdbcType=DECIMAL}, + + + W = #{w,jdbcType=DECIMAL}, + + + WSFA = #{wsfa,jdbcType=DECIMAL}, + + + MODITIME = #{moditime,jdbcType=TIMESTAMP}, + + + where ID = #{id,jdbcType=INTEGER} + + + update st_zvarl_b + set STCD = #{stcd,jdbcType=VARCHAR}, + MSTM = #{mstm,jdbcType=TIMESTAMP}, + PTNO = #{ptno,jdbcType=INTEGER}, + RZ = #{rz,jdbcType=DECIMAL}, + W = #{w,jdbcType=DECIMAL}, + WSFA = #{wsfa,jdbcType=DECIMAL}, + MODITIME = #{moditime,jdbcType=TIMESTAMP} + where ID = #{id,jdbcType=INTEGER} + + + + + + + + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.java new file mode 100644 index 0000000..35336c3 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.baseinfo.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.WqLrinfB; +import com.hnac.hzims.baseinfo.entity.WqLrinfBExample; +import org.apache.ibatis.annotations.Param; + + +public interface WqLrinfBMapper { + int deleteByPrimaryKey(String lrcd); + + int insert(WqLrinfB record); + + int insertSelective(WqLrinfB record); + + List selectByExample(WqLrinfBExample example); + + WqLrinfB selectByPrimaryKey(String lrcd); + + int updateByPrimaryKeySelective(WqLrinfB record); + + int updateByPrimaryKey(WqLrinfB record); + + IPage selectByLrnm(@Param("lrnm")String lrnm, IPage page); +} \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.xml b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.xml new file mode 100644 index 0000000..0e4cd7a --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/mapper/WqLrinfBMapper.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + LRCD, WATP, LRNM, LRAR, RSCP, COORDINATESET + + + + + delete from wq_lrinf_b + where LRCD = #{lrcd,jdbcType=CHAR} + + + insert into wq_lrinf_b (LRCD, WATP, LRNM, LRAR, + RSCP, COORDINATESET) + values (#{lrcd,jdbcType=CHAR}, #{watp,jdbcType=CHAR}, #{lrnm,jdbcType=VARCHAR}, #{lrar,jdbcType=DECIMAL}, + #{rscp,jdbcType=DECIMAL}, #{coordinateset,jdbcType=VARCHAR}) + + + insert into wq_lrinf_b + + + LRCD, + + + WATP, + + + LRNM, + + + LRAR, + + + RSCP, + + + COORDINATESET, + + + + + #{lrcd,jdbcType=CHAR}, + + + #{watp,jdbcType=CHAR}, + + + #{lrnm,jdbcType=VARCHAR}, + + + #{lrar,jdbcType=DECIMAL}, + + + #{rscp,jdbcType=DECIMAL}, + + + #{coordinateset,jdbcType=VARCHAR}, + + + + + update wq_lrinf_b + + + WATP = #{watp,jdbcType=CHAR}, + + + LRNM = #{lrnm,jdbcType=VARCHAR}, + + + LRAR = #{lrar,jdbcType=DECIMAL}, + + + RSCP = #{rscp,jdbcType=DECIMAL}, + + + COORDINATESET = #{coordinateset,jdbcType=VARCHAR}, + + + where LRCD = #{lrcd,jdbcType=CHAR} + + + update wq_lrinf_b + set WATP = #{watp,jdbcType=CHAR}, + LRNM = #{lrnm,jdbcType=VARCHAR}, + LRAR = #{lrar,jdbcType=DECIMAL}, + RSCP = #{rscp,jdbcType=DECIMAL}, + COORDINATESET = #{coordinateset,jdbcType=VARCHAR} + where LRCD = #{lrcd,jdbcType=CHAR} + + + + \ No newline at end of file diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/FileReservoirInfoService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/FileReservoirInfoService.java new file mode 100644 index 0000000..9dd9b09 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/FileReservoirInfoService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.baseinfo.entity.FileReservoirInfo; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:42 + */ +public interface FileReservoirInfoService extends IService { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ImageReservoirInfoService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ImageReservoirInfoService.java new file mode 100644 index 0000000..896f7d7 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ImageReservoirInfoService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:42 + */ +public interface ImageReservoirInfoService extends IService { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IrrBIReachService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IrrBIReachService.java new file mode 100644 index 0000000..e631b4f --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/IrrBIReachService.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.IrrBIReach; +import org.springblade.core.tool.api.R; + +public interface IrrBIReachService { + + IPage bindIrrBIReachs(String riverName, Page page); + + R addOrEditIrrBIReach(IrrBIReach irrBIReach, String operate); + + R delIrrBIReach(String riverCode); + + IrrBIReach getIrrBIReach(String riverCode); + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirInfoService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirInfoService.java new file mode 100644 index 0000000..0607b7e --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirInfoService.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.ReservoirInfo; +import com.hnac.hzims.baseinfo.vo.ReservoirInfoVo; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; + +import java.util.List; + +public interface ReservoirInfoService { + + IPage bindReservoirList(String name, String areaCode, String riverCode, + List stationIds, Query query); + + IPage bindReservoirList(String name, String areaCode, String riverCode, + List stationIds, IPage page); + + ReservoirInfoVo getReservoir(String id); + + R addOrEditReservoir(ReservoirInfoVo reservoirInfoVo, String operate); + + R delReservoir(String id); + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirRefDataService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirRefDataService.java new file mode 100644 index 0000000..f442341 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirRefDataService.java @@ -0,0 +1,15 @@ +package com.hnac.hzims.baseinfo.service; + +import com.hnac.hzims.baseinfo.entity.ReservoirRefdata; +import com.hnac.hzims.baseinfo.vo.ReservoirRefdataVo; +import org.springblade.core.tool.api.R; + +public interface ReservoirRefDataService { + + R configReservoirRefData(ReservoirRefdata reservoirRefdata); + + R delReservoirRefData(String rstcd); + + ReservoirRefdataVo getReservoirRefData(String stcd); + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirWaterManageService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirWaterManageService.java new file mode 100644 index 0000000..dab1fb6 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/ReservoirWaterManageService.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.baseinfo.service; + + + +import com.hnac.hzims.baseinfo.entity.ReservoirWaterManage; + +import java.util.List; + +public interface ReservoirWaterManageService { + List getReservoirWaterManage(String stcd, List months); +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/StZvarlBService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/StZvarlBService.java new file mode 100644 index 0000000..90530b1 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/StZvarlBService.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.StZvarlB; +import org.springblade.core.tool.api.R; + + +import java.math.BigDecimal; +import java.util.List; + +public interface StZvarlBService { + + IPage bindStZvarlBs(String stcd, IPage page); + + R addOrEditStZvarlB(StZvarlB stZvarlB); + + R delStZvarlB(Integer id); + + BigDecimal getWValue(String stcd,BigDecimal rz); + //根据水库获取库容曲线 + List selectStZvarlB(String stcd); + //计算库容 + BigDecimal calcResp(List list,BigDecimal rz); + //计算小于等于rz最大 和 大于rz最小值的 水位与库容关系两个点 + List calcMaxMin(List list, BigDecimal rz); +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/WqLrinfBService.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/WqLrinfBService.java new file mode 100644 index 0000000..0930c3c --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/WqLrinfBService.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.baseinfo.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.WqLrinfB; +import org.springblade.core.tool.api.R; + +public interface WqLrinfBService { + + IPage bindWqLrinfBs(String lrnm, Page page); + + WqLrinfB getWqLrinfB(String lrcd); + + R delWqLrinfB(String lrcd); + + R editWqLrinfB(WqLrinfB wqLrinfB); + + R addWqLrinfB(WqLrinfB wqLrinfB); + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/FileReservoirInfoServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/FileReservoirInfoServiceImpl.java new file mode 100644 index 0000000..112af3e --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/FileReservoirInfoServiceImpl.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.baseinfo.entity.FileReservoirInfo; +import com.hnac.hzims.baseinfo.mapper.FileReservoirInfoMapper; +import com.hnac.hzims.baseinfo.service.FileReservoirInfoService; +import org.springframework.stereotype.Service; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:43 + */ +@Service +public class FileReservoirInfoServiceImpl extends ServiceImpl + implements FileReservoirInfoService { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ImageReservoirInfoServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ImageReservoirInfoServiceImpl.java new file mode 100644 index 0000000..21775cd --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ImageReservoirInfoServiceImpl.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.baseinfo.entity.FileReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; +import com.hnac.hzims.baseinfo.mapper.FileReservoirInfoMapper; +import com.hnac.hzims.baseinfo.mapper.ImageReservoirInfoMapper; +import com.hnac.hzims.baseinfo.service.FileReservoirInfoService; +import com.hnac.hzims.baseinfo.service.ImageReservoirInfoService; +import org.springframework.stereotype.Service; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/9 10:46 + */ +@Service +public class ImageReservoirInfoServiceImpl extends ServiceImpl + implements ImageReservoirInfoService { +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/IrrBIReachServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/IrrBIReachServiceImpl.java new file mode 100644 index 0000000..79c6ef8 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/IrrBIReachServiceImpl.java @@ -0,0 +1,65 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.IrrBIReach; +import com.hnac.hzims.baseinfo.mapper.IrrBIReachMapper; +import com.hnac.hzims.baseinfo.service.IrrBIReachService; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.alibaba.druid.util.StringUtils; +@Service +public class IrrBIReachServiceImpl implements IrrBIReachService { + @Autowired + private IrrBIReachMapper ibm; + + @Override + public IPage bindIrrBIReachs(String riverName, Page page) { + riverName = riverName == null ? "" : riverName; + IPage records = ibm.selectByRiverName(riverName, page); + return records; + } + + @Override + public R addOrEditIrrBIReach(IrrBIReach irrBIReach, String operate) { + + String riverCode = irrBIReach.getRiverCode(); + IrrBIReach model = ibm.selectByPrimaryKey(riverCode); + + if("add".equals(operate) && model!=null){ + return R.fail(500,"河流编码已存在"); + } + + int cnt = 0; + if (model != null && !StringUtils.isEmpty(model.getRiverCode())) { // edit + cnt = ibm.updateByPrimaryKey(irrBIReach); + } else { + cnt = ibm.insert(irrBIReach); + } + if (cnt < 1) { + if("add".equals(operate)) { + return R.fail(500,"新增失败"); + }else{ + return R.fail(500,"编辑失败"); + } + } + return R.success("操作成功"); + } + + @Override + public R delIrrBIReach(String riverCode) { + int cnt = 0; + cnt = ibm.deleteByPrimaryKey(riverCode); + if (cnt < 1) + return R.fail(500,"删除失败"); + return R.success("删除成功"); + } + + @Override + public IrrBIReach getIrrBIReach(String riverCode) { + return ibm.selectByPrimaryKey(riverCode); + } + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirInfoServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirInfoServiceImpl.java new file mode 100644 index 0000000..5c143fd --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirInfoServiceImpl.java @@ -0,0 +1,180 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.alibaba.druid.util.StringUtils; +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.hzims.baseinfo.entity.FileReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ImageReservoirInfo; +import com.hnac.hzims.baseinfo.entity.ReservoirInfo; +import com.hnac.hzims.baseinfo.mapper.ReservoirInfoMapper; +import com.hnac.hzims.baseinfo.mapper.ReservoirRefdataMapper; +import com.hnac.hzims.baseinfo.service.FileReservoirInfoService; +import com.hnac.hzims.baseinfo.service.ImageReservoirInfoService; +import com.hnac.hzims.baseinfo.service.ReservoirInfoService; +import com.hnac.hzims.baseinfo.vo.ReservoirInfoVo; +import org.apache.commons.collections4.CollectionUtils; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.yaml.snakeyaml.events.Event; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Service +public class ReservoirInfoServiceImpl implements ReservoirInfoService { + + @Autowired + ReservoirInfoMapper reservoirInfoMapper; + @Autowired + private ReservoirRefdataMapper rrm; + + @Autowired + private ImageReservoirInfoService imageReservoirInfoService; + @Autowired + private FileReservoirInfoService fileReservoirInfoService; + + @Override + public ReservoirInfoVo getReservoir(String id) { + ReservoirInfo info = null; + ReservoirInfoVo infoVo = null; + info = reservoirInfoMapper.selectByPrimaryKey(id); + if (info != null) { + infoVo = new ReservoirInfoVo(info); + } + //查询图片 + List imageReservoirInfoList = imageReservoirInfoService.list(new LambdaQueryWrapper() + .eq(ImageReservoirInfo::getReservoirInfoId, id)); + if (CollectionUtils.isNotEmpty(imageReservoirInfoList)) { + infoVo.setImageReservoirInfoList(imageReservoirInfoList); + } + + //查询文件 + List fileReservoirInfoList = + fileReservoirInfoService.list(new LambdaQueryWrapper() + .eq(FileReservoirInfo::getReservoirInfoId, id)); + if (CollectionUtils.isNotEmpty(fileReservoirInfoList)) { + infoVo.setFileReservoirInfoList(fileReservoirInfoList); + } + + return infoVo; + } + + @Override + public R addOrEditReservoir(ReservoirInfoVo reservoirInfoVo, String operate) { + int cnt = 0; + ReservoirInfo ri = new ReservoirInfo(reservoirInfoVo); + String stcd = ri.getStcd(); + ReservoirInfo info = reservoirInfoMapper.selectByPrimaryKey(stcd); + + if ("add".equals(operate) && info != null) { + return R.fail(500, "水库编码已存在"); + } + + if (info != null && !StringUtils.isEmpty(info.getStcd())) { // edit + cnt = reservoirInfoMapper.updateByPrimaryKey(ri); + if (!info.getStationid().equals(reservoirInfoVo.getStationid())) { //编辑时站点更换清除之前数据配置 + rrm.deleteByPrimaryKey(info.getStcd()); + } + } else { // add + cnt = reservoirInfoMapper.insert(ri); + } + if (cnt < 1) { + return R.fail(500, "操作失败"); + } + + + if ("update".equals(operate)) { + //删除图片 + imageReservoirInfoService.remove(new LambdaQueryWrapper() + .eq(ImageReservoirInfo::getReservoirInfoId, stcd)); + //删除文件 + fileReservoirInfoService.remove(new LambdaQueryWrapper() + .eq(FileReservoirInfo::getReservoirInfoId, stcd)); + + } + + //图片 + List imageReservoirInfoList = reservoirInfoVo.getImageReservoirInfoList(); + if (CollectionUtils.isNotEmpty(imageReservoirInfoList)) { + imageReservoirInfoList.stream().map(item -> { + item.setReservoirInfoId(stcd); + return item; + }).collect(Collectors.toList()); + imageReservoirInfoService.saveOrUpdateBatch(imageReservoirInfoList); + } + + //文件 + List fileReservoirInfoList = reservoirInfoVo.getFileReservoirInfoList(); + if (CollectionUtils.isNotEmpty(fileReservoirInfoList)) { + fileReservoirInfoList.stream().map(item -> { + item.setReservoirInfoId(stcd); + return item; + }).collect(Collectors.toList()); + fileReservoirInfoService.saveOrUpdateBatch(fileReservoirInfoList); + } + return R.success("操作成功"); + } + + @Override + public R delReservoir(String stcd) { + int cnt = reservoirInfoMapper.deleteByPrimaryKey(stcd); + rrm.deleteByPrimaryKey(stcd); + + //删除图片 + imageReservoirInfoService.remove( + new LambdaQueryWrapper().eq(ImageReservoirInfo::getReservoirInfoId, stcd)); + + //删除文集 + fileReservoirInfoService.remove( + new LambdaQueryWrapper().eq(FileReservoirInfo::getReservoirInfoId, stcd)); + + if (cnt < 1) + return R.fail(500, "删除失败"); + return R.success("删除成功"); + } + + @Override + public IPage bindReservoirList(String name, String areaCode, String riverCode, + List stationIds, Query query) { + Page reservoirInfoPage = new Page<>(query.getCurrent(), query.getSize()); + IPage records = reservoirInfoMapper + .selectByNameAndStationId(name, areaCode, riverCode, stationIds, reservoirInfoPage); + + IPage resultPage = new Page<>(records.getCurrent(), records.getSize()); + List reservoirInfoVos = new ArrayList<>(); + for (ReservoirInfo record : records.getRecords()) { + ReservoirInfoVo reservoirInfoVo = new ReservoirInfoVo(); + BeanUtils.copyProperties(record, reservoirInfoVo); + //查询图片 + List imageReservoirInfoList = imageReservoirInfoService.list(new LambdaQueryWrapper() + .eq(ImageReservoirInfo::getReservoirInfoId, record.getStcd())); + if (CollectionUtils.isNotEmpty(imageReservoirInfoList)) { + reservoirInfoVo.setImageReservoirInfoList(imageReservoirInfoList); + } + + //查询文件 + List fileReservoirInfoList = + fileReservoirInfoService.list(new LambdaQueryWrapper() + .eq(FileReservoirInfo::getReservoirInfoId, record.getStcd())); + if (CollectionUtils.isNotEmpty(fileReservoirInfoList)) { + reservoirInfoVo.setFileReservoirInfoList(fileReservoirInfoList); + } + reservoirInfoVos.add(reservoirInfoVo); + } + resultPage.setRecords(reservoirInfoVos); + return resultPage; + } + + @Override + public IPage bindReservoirList(String name, String areaCode, String riverCode, List stationIds, IPage page) { + IPage records = reservoirInfoMapper + .selectByNameAndStationId(name, areaCode, riverCode, stationIds, page); + return records; + } + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirRefDataServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirRefDataServiceImpl.java new file mode 100644 index 0000000..34c3869 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/ReservoirRefDataServiceImpl.java @@ -0,0 +1,66 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.alibaba.druid.util.StringUtils; +import com.hnac.hzims.baseinfo.entity.ReservoirRefdata; +import com.hnac.hzims.baseinfo.mapper.ReservoirRefdataMapper; +import com.hnac.hzims.baseinfo.service.ReservoirRefDataService; +import com.hnac.hzims.baseinfo.vo.ReservoirRefdataVo; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class ReservoirRefDataServiceImpl implements ReservoirRefDataService { + @Autowired + private ReservoirRefdataMapper rrm; + + @Override + public R configReservoirRefData(ReservoirRefdata reservoirRefdata) { + String stcd = reservoirRefdata.getStcd(); + int cnt = 0; + ReservoirRefdata model = rrm.selectByPrimaryKey(stcd); + if (model != null && !StringUtils.isEmpty(model.getStcd())) { + cnt = rrm.updateByPrimaryKey(reservoirRefdata); + } else { + cnt = rrm.insert(reservoirRefdata); + } + if (cnt < 1) return R.data("500", "操作失败"); + return R.success("操作成功"); + } + + @Override + public R delReservoirRefData(String rstcd) { + int cnt = rrm.deleteByPrimaryKey(rstcd); + if (cnt < 1) { + return R.fail(500, "删除失败"); + } + return R.success("删除成功"); + } + + @Override + public ReservoirRefdataVo getReservoirRefData(String stcd) { + ReservoirRefdata info = rrm.selectByPrimaryKey(stcd); + ReservoirRefdataVo infoVo = new ReservoirRefdataVo(info); + if (info != null) { + infoVo = new ReservoirRefdataVo(info); + // if (!StringUtils.isEmpty(info.getRefqpoint())) { + // + // BasePoint dataPointDef = FacInfoFactory.getInstance().getDataPointDef(info.getRefqpoint()); + // if (dataPointDef != null) { + // infoVo.setRefqFactory(dataPointDef.getFactoryId()); + // infoVo.setRefqGroupId(dataPointDef.getGroupId()); + // } + // } + // + // if (!StringUtils.isEmpty(info.getRefzpoint())) { + // BasePoint dataPointDef = FacInfoFactory.getInstance().getDataPointDef(info.getRefzpoint()); + // if (dataPointDef != null) { + // infoVo.setRefzFactory(dataPointDef.getFactoryId()); + // infoVo.setRefzGroupId(dataPointDef.getGroupId()); + // } + // } + } + return infoVo; + } + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StZvarlBServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StZvarlBServiceImpl.java new file mode 100644 index 0000000..abe6e05 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/StZvarlBServiceImpl.java @@ -0,0 +1,148 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.alibaba.druid.util.StringUtils; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.baseinfo.entity.StZvarlB; +import com.hnac.hzims.baseinfo.mapper.StZvarlBMapper; +import com.hnac.hzims.baseinfo.service.StZvarlBService; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +@Service +public class StZvarlBServiceImpl implements StZvarlBService { + @Autowired + private StZvarlBMapper stZvarlBMapper; + + + @Override + public IPage bindStZvarlBs(String stcd, IPage page) { + IPage records = stZvarlBMapper.selectByStcd(stcd, page); + return records; + } + + @Override + public R addOrEditStZvarlB(StZvarlB stZvarlB) { + int cnt = 0; + Integer id = stZvarlB.getId(); + if (id == null) { + cnt = stZvarlBMapper.insert(stZvarlB); + } else { + StZvarlB info = stZvarlBMapper.selectByPrimaryKey(id); + stZvarlB.setModitime(new Date()); + if (info != null && !StringUtils.isEmpty(info.getStcd())) { // edit + cnt = stZvarlBMapper.updateByPrimaryKey(stZvarlB); + } else { // add + cnt = stZvarlBMapper.insert(stZvarlB); + } + } + if (cnt < 1) { + return R.fail(500,"操作失败"); + } + return R.success("操作成功"); + } + + @Override + public R delStZvarlB(Integer id) { + int cnt = stZvarlBMapper.deleteByPrimaryKey(id); + if (cnt < 1) + return R.fail(500,"删除失败"); + return R.success("删除成功"); + + } + + @Override + public BigDecimal getWValue(String stcd,BigDecimal rz) { + List list=selectStZvarlB(stcd); + if(list!=null && !list.isEmpty()){ + return calcResp(list,rz); + }else{ + return BigDecimal.ZERO; + } + + } + + @Override + public List selectStZvarlB(String stcd) { + return stZvarlBMapper.selectStZvarlB(stcd); + } + + @Override + public BigDecimal calcResp(List list, BigDecimal rz) { + List data=calcMaxMin(list,rz); + if(data!=null && data.size()!=2){ + return BigDecimal.ZERO; + } + StZvarlB zvarlB0=data.get(0); + StZvarlB zvarlB1=data.get(1); + return calcRespTmp(zvarlB0, zvarlB1, rz); + } + + //获取小于等于rz最大值 和 大于rz最小值的两个点 + public List calcMaxMin(List list,BigDecimal rz){ + List data=new ArrayList<>(); + //求小于等于rz最大值 + StZvarlB max=calcMax(list,rz); + if(max!=null){ + data.add(max); + } + //求大于rz最小值 + StZvarlB min=calcMin(list,rz); + if(min!=null){ + data.add(min); + } + return data; + } + + StZvarlB calcMax(List list,BigDecimal rz){ + List maxList=new ArrayList<>(); + for (StZvarlB stZvarlB:list){ + BigDecimal tmpRz=stZvarlB.getRz(); + if(tmpRz.compareTo(rz)<=0){ + maxList.add(stZvarlB); + } + } + if(maxList!=null && !maxList.isEmpty()){ + return maxList.get(maxList.size()-1); + }else{ + return null; + } + + + } + + StZvarlB calcMin(List list,BigDecimal rz){ + List minList=new ArrayList<>(); + for (StZvarlB stZvarlB:list){ + BigDecimal tmpRz=stZvarlB.getRz(); + if(tmpRz.compareTo(rz)>0){ + minList.add(stZvarlB); + } + } + if(minList!=null && !minList.isEmpty()){ + return minList.get(0); + }else{ + return null; + } + } + + + + private BigDecimal calcRespTmp(StZvarlB zvarlB0,StZvarlB zvarlB1,BigDecimal rz){ + try{ + BigDecimal data1=rz.subtract(zvarlB0.getRz()); + BigDecimal data2=zvarlB1.getRz().subtract(zvarlB0.getRz()); + BigDecimal data3 = zvarlB1.getW().subtract(zvarlB0.getW());; + Double tmp=Math.abs(data3.doubleValue()); + BigDecimal data4=data1.divide(data2).multiply(new BigDecimal(tmp)); + return zvarlB0.getW().add(data4).setScale(2, BigDecimal.ROUND_HALF_UP); + }catch (Exception e){ + return new BigDecimal("0"); + } + } + +} diff --git a/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/WqLrinfBServiceImpl.java b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/WqLrinfBServiceImpl.java new file mode 100644 index 0000000..a728fb5 --- /dev/null +++ b/hzims-service/base-info/src/main/java/com/hnac/hzims/baseinfo/service/impl/WqLrinfBServiceImpl.java @@ -0,0 +1,71 @@ +package com.hnac.hzims.baseinfo.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.baseinfo.entity.WqLrinfB; +import com.hnac.hzims.baseinfo.mapper.WqLrinfBMapper; +import com.hnac.hzims.baseinfo.service.WqLrinfBService; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.alibaba.druid.util.StringUtils; + +@Service +public class WqLrinfBServiceImpl implements WqLrinfBService { + @Autowired + private WqLrinfBMapper wbm; + + + @Override + public IPage bindWqLrinfBs(String lrnm, Page page) { + lrnm = lrnm == null ? "" : lrnm; +// PageBounds pageBounds = new PageBounds(pageParam.getPageNo(), pageParam.getPageSize()); + IPage records = wbm.selectByLrnm(lrnm, page); + return records; + } + + @Override + public WqLrinfB getWqLrinfB(String lrcd) { + return wbm.selectByPrimaryKey(lrcd); + } + + @Override + public R delWqLrinfB(String lrcd) { + int cnt = wbm.deleteByPrimaryKey(lrcd); + if (cnt < 1) + return R.fail(500,"删除失败"); + return R.fail("删除成功"); + } + + @Override + public R editWqLrinfB(WqLrinfB wqLrinfB) { + int cnt = 0; + String lrcd = wqLrinfB.getLrcd(); + WqLrinfB model = wbm.selectByPrimaryKey(lrcd); + if (model != null && !StringUtils.isEmpty(model.getLrcd())) { + cnt = wbm.updateByPrimaryKey(wqLrinfB); + } else { + return R.fail(500,"湖库对象不存在"); + } + if (cnt < 1) + return R.fail(500,"编辑操作失败"); + return R.success("操作成功"); + } + + @Override + public R addWqLrinfB(WqLrinfB wqLrinfB) { + int cnt = 0; + String lrcd = wqLrinfB.getLrcd(); + WqLrinfB model = wbm.selectByPrimaryKey(lrcd); + if (model == null || StringUtils.isEmpty(model.getLrcd())) { + cnt = wbm.insert(wqLrinfB); + } else { + return R.fail(500,"湖库编码已存在"); + } + if (cnt < 1) + return R.fail(500,"添加失败"); + return R.success("操作成功"); + } + +} diff --git a/hzims-service/base-info/src/main/resources/application-dev.yml b/hzims-service/base-info/src/main/resources/application-dev.yml new file mode 100644 index 0000000..50a4ea7 --- /dev/null +++ b/hzims-service/base-info/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 diff --git a/hzims-service/base-info/src/main/resources/application-prod.yml b/hzims-service/base-info/src/main/resources/application-prod.yml new file mode 100644 index 0000000..da89262 --- /dev/null +++ b/hzims-service/base-info/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} diff --git a/hzims-service/base-info/src/main/resources/application.yml b/hzims-service/base-info/src/main/resources/application.yml new file mode 100644 index 0000000..aa52542 --- /dev/null +++ b/hzims-service/base-info/src/main/resources/application.yml @@ -0,0 +1,21 @@ +spring: + profiles: + active: dfy + datasource: + url: jdbc:mysql://175.6.40.67:50311/blade_huoshan_business?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true + username: root + password: 123 + driver-class-name: com.mysql.jdbc.Driver +#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 + + diff --git a/hzims-service/dam-safety/pom.xml b/hzims-service/dam-safety/pom.xml new file mode 100644 index 0000000..244cf7c --- /dev/null +++ b/hzims-service/dam-safety/pom.xml @@ -0,0 +1,67 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service + 4.0.0-SNAPSHOT + + + dam-safety + + + 8 + 8 + UTF-8 + + + + + + com.hnac.hzims + dam-safety-api + ${hzims.project.version} + + + 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.hzinfo.data + hzinfo-data-sdk + + + org.springblade + blade-common + + + com.hnac.hzims + common-api + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/DamSafetyApplication.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/DamSafetyApplication.java new file mode 100644 index 0000000..e86c3e0 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/DamSafetyApplication.java @@ -0,0 +1,40 @@ +package com.hnac.hzims.damsafety; + +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 DamSafetyApplication extends SpringBootServletInitializer { + public final static String APP_NAME = "dam-safety"; + + + static { + System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://192.168.65.105:8848"); + System.setProperty("spring.cloud.nacos.config.server-addr", "http://192.168.65.105:8848"); + System.setProperty("spring.cloud.nacos.username", "nacos"); + System.setProperty("spring.cloud.nacos.password", "nacos"); + } + + + + public static void main(String[] args) { +// System.setProperty("nacos.standalone", "true"); + BladeApplication.run(APP_NAME, DamSafetyApplication.class, args); + } + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + return BladeApplication.createSpringApplicationBuilder(builder, APP_NAME, DamSafetyApplication.class); + } +} \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/DamSafetyDataController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/DamSafetyDataController.java new file mode 100644 index 0000000..1cb4de9 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/DamSafetyDataController.java @@ -0,0 +1,211 @@ +package com.hnac.hzims.damsafety.controller; + +import com.hnac.hzims.damsafety.entity.TProjInfo; +import com.hnac.hzims.damsafety.service.IDamSafetyDataService; +import com.hnac.hzims.damsafety.service.ITProjInfoService; +import com.hnac.hzims.entity.Report; +import com.hnac.hzims.enums.QueryDateTypeEnum; +import com.hnac.hzims.util.CommonUtil; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeInstanceFieldVO; +import com.hnac.hzinfo.sdk.analyse.vo.DeviceSinglePropsValueVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; + +@RestController +@RequestMapping("/damSafety/data") +@AllArgsConstructor +@Api(value = "大坝安全数据查询接口", tags = "大坝安全数据查询接口") +public class DamSafetyDataController extends BladeController implements CacheNames { + private final IDamSafetyDataService damSafetyDataService; + + + @ApiOperation("实时数据接口") + @RequestMapping(value = "/getRealData", method = RequestMethod.GET) + public R getRealData(String deviceCode){ + List data = damSafetyDataService.getRealData(deviceCode); + return R.data(data,"查询成功"); + } + + //过程线 + @ApiOperation("基础数据报表,数据查询和统计分析使用接口") + @RequestMapping(value = "/getReportData", method = RequestMethod.GET) + public R getReportData(String deviceCode, String beginSpt, String endSpt, String type, Integer accessRules,String col){ + Map res= CommonUtil.getStartEnd(beginSpt,endSpt); + if(res == null){ + return R.data(500,false, "日期格式错误"); + } + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Report report = damSafetyDataService.getReportData(Arrays.asList(deviceCodes),type,accessRules, res.get("begin"), res.get("end"),col); + return R.data(report,"查询成功"); + } + + @ApiOperation("大坝浸润线") + @RequestMapping(value = "/getSeepageLine", method = RequestMethod.GET) + public R getSeepageLine(String deviceCode, String beginSpt, String endSpt,String col){ + Map res= CommonUtil.getStartEnd(beginSpt,endSpt); + if(res == null){ + return R.data(500,false, "日期格式错误"); + } + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + List data = damSafetyDataService.getSeepageLine(Arrays.asList(deviceCodes), res.get("begin"), res.get("end"),col); + return R.data(data,"查询成功"); + } + + @ApiOperation("用于渗压水位过程线,相同业务场景也可用此接口") + @RequestMapping(value = "/getReportDataByDeviceCode", method = RequestMethod.GET) + public R getReportData(String deviceCode, String beginSpt, String endSpt, String type, Integer accessRules){ + Map res= CommonUtil.getStartEnd(beginSpt,endSpt); + if(res == null){ + return R.data(500,false, "日期格式错误"); + } + //查询基础数据 + Report report = damSafetyDataService.getReportDataByDeviceCode(deviceCode,type,accessRules, res.get("begin"), res.get("end")); + return R.data(report,"查询成功"); + } + + @ApiOperation("表头列") + @RequestMapping(value = "/getTableHead", method = RequestMethod.GET) + public R getTableHead(String stcd) { + //查询基础数据 + List report = damSafetyDataService.getSignages(stcd); + return R.data(report,"查询成功"); + } + + //==============================报表接口========================== + @ApiOperation("渗压年报表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "year", value = "年份", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "col", value = "传渗压属性字段", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getYearSpprReport", method = RequestMethod.GET) + public R getYearSpprReport(String rscd,String deviceCode,String year,String col) { + Map res= CommonUtil.getStartEnd(year+"-01-01 00:00:00",year+"-12-31 23:59:59"); + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Map data = damSafetyDataService.getYearSpprReport(rscd,Arrays.asList(deviceCodes),res.get("begin"), res.get("end"),col); + return R.data(data,"查询成功"); + } + + //==============================报表接口========================== + @ApiOperation("渗流年报表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "year", value = "年份", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "col", value = "传渗流属性字段", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getYearSpqnReport", method = RequestMethod.GET) + public R getYearSpqnReport(String rscd,String deviceCode,String year,String col) { + Map res= CommonUtil.getStartEnd(year+"-01-01 00:00:00",year+"-12-31 23:59:59"); + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Map data = damSafetyDataService.getYearSpprReport(rscd,Arrays.asList(deviceCodes),res.get("begin"), res.get("end"),col); + return R.data(data,"查询成功"); + } + + + @ApiOperation("水平位移年报表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "year", value = "年份", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getYearHrdsReport", method = RequestMethod.GET) + public R getYearHrdsReport(String deviceCode,String year) { + Map res= CommonUtil.getStartEnd(year+"-01-01 00:00:00",year+"-12-31 23:59:59"); + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Map data = damSafetyDataService.getYearHrdsReport(Arrays.asList(deviceCodes),res.get("begin"), res.get("end")); + return R.data(data,"查询成功"); + } + + @ApiOperation("垂直位移年报表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "year", value = "年份", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "col", value = "传垂直位移属性字段", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getYearVrdsReport", method = RequestMethod.GET) + public R getYearVrdsReport(String deviceCode,String year,String col) { + Map res= CommonUtil.getStartEnd(year+"-01-01 00:00:00",year+"-12-31 23:59:59"); + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Report data = damSafetyDataService.getYearVrdsReport(Arrays.asList(deviceCodes),res.get("begin"), res.get("end"),col); + return R.data(data,"查询成功"); + } + + @ApiOperation("压力(应力)年报表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "year", value = "年份", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "col", value = "传垂直位移属性字段", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getYearStressReport", method = RequestMethod.GET) + public R getYearStressReport(String deviceCode,String year,String col) { + Map res= CommonUtil.getStartEnd(year+"-01-01 00:00:00",year+"-12-31 23:59:59"); + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + Report data = damSafetyDataService.getYearVrdsReport(Arrays.asList(deviceCodes),res.get("begin"), res.get("end"),col); + return R.data(data,"查询成功"); + } + + private final ITProjInfoService tProjInfoService; + @ApiOperation("大坝报表 无工程竣工日期将默认查询三年的历史数据") + @ApiImplicitParams({ + @ApiImplicitParam(name = "deviceCode", value = "仪器模型code", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "queryType", value = "year 或 month", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "yearMonth", value = "年份或者年月", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "col", value = "属性字段", paramType = "query", dataType = "string") + }) + @RequestMapping(value = "/getDamReport", method = RequestMethod.GET) + public R getDamReport(String deviceCode,String queryType,String yearMonth,String col) { + Map res = CommonUtil.getStartEnd(yearMonth + "-01-01 00:00:00", yearMonth + "-12-31 23:59:59"); + String type="month"; + if(QueryDateTypeEnum.MONTH.getQueryDateType().equals(queryType)) { + String yearMonthDay = CommonUtil.getLastDayOfMonth(yearMonth); + type="day"; + res = CommonUtil.getStartEnd(yearMonth + "-01 00:00:00", yearMonthDay + " 23:59:59"); + } + + List dd=tProjInfoService.list(); + int yearGap=3; + if(dd!=null && !dd.isEmpty()){ + Date completeDate=dd.get(0).getCompleteDate(); + if(completeDate!=null) { + yearGap = CommonUtil.getYearGap(completeDate, res.get("begin")); + } + } + //查询基础数据 + String[] deviceCodes=deviceCode.split(","); + String[] cols=col.split(","); + if(cols.length == 1) {//渗压、垂直位移 + Map data = damSafetyDataService.getDamReport(Arrays.asList(deviceCodes),type, res.get("begin"), res.get("end"), cols[0],yearGap); + return R.data(data,"查询成功"); + } + + if(cols.length == 2) {//水平位移 + Map xData = damSafetyDataService.getDamReport(Arrays.asList(deviceCodes),type, res.get("begin"), res.get("end"), cols[0],yearGap); + Map yData = damSafetyDataService.getDamReport(Arrays.asList(deviceCodes),type, res.get("begin"), res.get("end"), cols[1],yearGap); + Map data=new HashMap<>(); + data.put("xData",xData); + data.put("yData",yData); + return R.data(data,"查询成功"); + } + return null; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/FileUploadController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/FileUploadController.java new file mode 100644 index 0000000..c0afe21 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/FileUploadController.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.damsafety.controller; + +import com.hnac.hzims.damsafety.service.IFileUploadService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +@RestController +@RequestMapping("/damSafety/fileUpload") +@AllArgsConstructor +@Api(value = "大坝文件上传", tags = "大坝文件上传接口") +public class FileUploadController { + + @Autowired + IFileUploadService iImageUploadService; + + @RequestMapping(value="/uploadFile", method = {RequestMethod.POST}) + @ApiOperation(notes ="上传单个文件", value = "上传单个文件") + public R addImage(@RequestParam("file") MultipartFile file){ + try { + Object path = iImageUploadService.addFile(file,"fileInfo"); + if (path!=null) { + return R.data(path); + } else { + return R.fail("操作失败"); + } + }catch (Exception e) { + return R.fail("操作失败"); + } + } + + @RequestMapping(value="/uploadFiles", method = {RequestMethod.POST}) + @ApiOperation(notes ="上传多文件", value = "上传多文件") + public R addFiles(@RequestParam("files") MultipartFile[] files){ + try { + List paths = iImageUploadService.addFiles(files,"fileInfo"); + if (paths!=null) { + return R.data(paths); + } else { + return R.fail("操作失败"); + } + }catch (Exception e) { + return R.fail("操作失败"); + } + } + + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TBuildingController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TBuildingController.java new file mode 100644 index 0000000..69ad800 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TBuildingController.java @@ -0,0 +1,124 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.TBuilding; +import com.hnac.hzims.damsafety.service.ITBuildingService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.TBuildingVo; +import com.hnac.hzims.damsafety.wrapper.TBuildingWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/tBuilding") +@AllArgsConstructor +@Api(value = "建筑物", tags = "建筑物接口") +public class TBuildingController extends BladeController implements CacheNames { + private final ITBuildingService tBuildingService; + + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "建筑物名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入tBuilding") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionTBuilding(param); + IPage pages = tBuildingService.page(Condition.getPage(query), wrapper); + return R.data(TBuildingWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "name", value = "建筑物名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入tBuilding") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionTBuilding(param); + List list = tBuildingService.list(wrapper); + return R.data(TBuildingWrapper.build().listVO(list)); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入tBuilding") + public R detail(TBuilding tBuilding) { + TBuilding detail = tBuildingService.getOne(Condition.getQueryWrapper(tBuilding)); + return R.data(TBuildingWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入tBuilding") + public R save(@RequestBody TBuilding tBuilding) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + + wrapper.eq(TBuilding::getRscd,tBuilding.getRscd()); + wrapper.eq(TBuilding::getName,tBuilding.getName()); + List list = tBuildingService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("此水库中建筑物名称已存在"); + } + return R.status(tBuildingService.save(tBuilding)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入tBuilding") + public R update(@RequestBody TBuilding tBuilding) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + wrapper.eq(TBuilding::getRscd,tBuilding.getRscd()); + wrapper.eq(TBuilding::getName,tBuilding.getName()); + wrapper.ne(TBuilding::getId,tBuilding.getId()); + List list = tBuildingService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("此水库中建筑物名称已存在"); + } + return R.status(tBuildingService.updateById(tBuilding)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = tBuildingService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TProjInfoController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TProjInfoController.java new file mode 100644 index 0000000..05154fa --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TProjInfoController.java @@ -0,0 +1,131 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.TProjInfo; +import com.hnac.hzims.damsafety.service.ITProjInfoService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.TProjInfoVo; +import com.hnac.hzims.damsafety.wrapper.TProjInfoWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/tProjInfo") +@AllArgsConstructor +@Api(value = "工程信息", tags = "工程信息接口") +public class TProjInfoController extends BladeController implements CacheNames { + + private final ITProjInfoService tProjInfoService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "projName", value = "工程名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "projCode", value = "工程编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入tProjInfo") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionTProjInfo(param); + IPage pages = tProjInfoService.page(Condition.getPage(query), wrapper); + return R.data(TProjInfoWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "projName", value = "工程名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "projCode", value = "工程编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入tProjInfo") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionTProjInfo(param); + List list = tProjInfoService.list(wrapper); + return R.data(TProjInfoWrapper.build().listVO(list)); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入tProjInfo") + public R detail(TProjInfo tProjInfo) { + TProjInfo detail = tProjInfoService.getOne(Condition.getQueryWrapper(tProjInfo)); + return R.data(TProjInfoWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入tProjInfo") + public R save(@RequestBody TProjInfo tProjInfo) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + wrapper.eq(TProjInfo::getProjCode,tProjInfo.getProjCode()); + List list = tProjInfoService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("工程编码已存在"); + } + + wrapper=new LambdaQueryWrapper(); + wrapper.eq(TProjInfo::getProjName,tProjInfo.getProjName()); + list = tProjInfoService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("工程名称已存在"); + } + + return R.status(tProjInfoService.save(tProjInfo)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入tProjInfo") + public R update(@RequestBody TProjInfo tProjInfo) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + wrapper.eq(TProjInfo::getProjCode,tProjInfo.getProjCode()); + wrapper.ne(TProjInfo::getId,tProjInfo.getId()); + List list = tProjInfoService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("工程编码已存在"); + } + return R.status(tProjInfoService.updateById(tProjInfo)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = tProjInfoService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TSectionConfigController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TSectionConfigController.java new file mode 100644 index 0000000..2082b75 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/TSectionConfigController.java @@ -0,0 +1,114 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.TSectionConfig; +import com.hnac.hzims.damsafety.service.ITSectionConfigService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/tSectionConfig") +@AllArgsConstructor +@Api(value = "断面配置", tags = "断面配置接口") +public class TSectionConfigController extends BladeController implements CacheNames { + private final ITSectionConfigService tSectionConfigService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "sectionNo", value = "断面编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入TSectionConfig") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionTSectionConfig(param); + IPage pages = tSectionConfigService.page(Condition.getPage(query), wrapper); + return R.data(pages); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "sectionNo", value = "断面编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入TSectionConfig") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionTSectionConfig(param); + List list = tSectionConfigService.list(wrapper); + return R.data(list); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入tSectionConfig") + public R detail(TSectionConfig tSectionConfig) { + TSectionConfig detail = tSectionConfigService.getOne(Condition.getQueryWrapper(tSectionConfig)); + return R.data(detail); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入tSectionConfig") + public R save(@RequestBody TSectionConfig tSectionConfig) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(TSectionConfig::getStcd,tSectionConfig.getStcd()); + List list = tSectionConfigService.list(wrapper); + if(list!=null && !list.isEmpty()){ + return R.fail("该测点编号配置已存在"); + } + + return R.status(tSectionConfigService.save(tSectionConfig)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入tSectionConfig") + public R update(@RequestBody TSectionConfig tSectionConfig) { + return R.status(tSectionConfigService.updateById(tSectionConfig)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "stcd") + public R remove(@ApiParam(value = "测点编号集合") @RequestParam String stcd) { + List list=Func.toStrList(stcd); + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + wrapper.in(TSectionConfig::getStcd,list); + boolean temp = tSectionConfigService.delete(wrapper); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDamsBController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDamsBController.java new file mode 100644 index 0000000..0399420 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDamsBController.java @@ -0,0 +1,123 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpDamsB; +import com.hnac.hzims.damsafety.service.IWrpDamsBService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpDamsB") +@AllArgsConstructor +@Api(value = "断面特征点信息", tags = "断面特征点信息接口") +public class WrpDamsBController extends BladeController implements CacheNames { + private final IWrpDamsBService wrpDamsBService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damscd", value = "特征点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damsnm", value = "特征点名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpDamsB") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpDamsB(param); + IPage pages = wrpDamsBService.page(Condition.getPage(query), wrapper); + return R.data(pages); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damscd", value = "特征点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damsnm", value = "特征点名称", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpDamsB") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpDamsB(param); + List list = wrpDamsBService.list(wrapper); + return R.data(list); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpDamsB") + public R detail(WrpDamsB wrpDamsB) { + WrpDamsB detail = wrpDamsBService.getOne(Condition.getQueryWrapper(wrpDamsB)); + return R.data(detail); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpDamsB") + public R save(@RequestBody WrpDamsB wrpDamsB) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpDamsB::getDamscd,wrpDamsB.getDamscd()); + List list = wrpDamsBService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"特征点编号已存在"); + } + + wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpDamsB::getDamsnm,wrpDamsB.getDamsnm()); + list = wrpDamsBService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"特征点名称已存在"); + } + + return R.status(wrpDamsBService.save(wrpDamsB)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpDamsB") + public R update(@RequestBody WrpDamsB wrpDamsB) { + return R.status(wrpDamsBService.updateById(wrpDamsB)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "damscd") + public R remove(@ApiParam(value = "特征点编号集合") @RequestParam String damscd) { + List list=Func.toStrList(damscd); + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + wrapper.in(WrpDamsB::getDamscd,list); + boolean temp = wrpDamsBService.delete(wrapper); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrhrdsmpController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrhrdsmpController.java new file mode 100644 index 0000000..e913baa --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrhrdsmpController.java @@ -0,0 +1,135 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; +import com.hnac.hzims.damsafety.service.IWrpDfrSrhrdsmpService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpDfrSrhrdsmpVo; +import com.hnac.hzims.damsafety.wrapper.WrpDfrSrhrdsmpWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +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.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpDfrSrhrdsmp") +@AllArgsConstructor +@Api(value = "水平位移监测测点", tags = "水平位移监测测点接口") +public class WrpDfrSrhrdsmpController extends BladeController implements CacheNames { + private final IWrpDfrSrhrdsmpService wrpDfrSrhrdsmpService; + + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpDfrSrhrdsmp") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpDfrSrhrdsmp(param); + IPage pages = wrpDfrSrhrdsmpService.page(Condition.getPage(query), wrapper); + return R.data(WrpDfrSrhrdsmpWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpDfrSrhrdsmp") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpDfrSrhrdsmp(param); + List list = wrpDfrSrhrdsmpService.list(wrapper); + return R.data(WrpDfrSrhrdsmpWrapper.build().listVO(list)); + } + + + /** + * 查询水平位移断面 + */ + @GetMapping("/section") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询水平位移断面") + public R>> section(HttpServletRequest request,String rscd) { + String deptId=request.getHeader("dept-id"); + if(StringUtils.isBlank(deptId)){ + deptId = AuthUtil.getDeptId(); + } + List> list = wrpDfrSrhrdsmpService.section(deptId,rscd); + //返回断面加仪器数据 + return R.data(list,"查询断面成功"); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpDfrSrhrdsmp") + public R detail(WrpDfrSrhrdsmp wrpDfrSrhrdsmp) { + WrpDfrSrhrdsmp detail = wrpDfrSrhrdsmpService.getOne(Condition.getQueryWrapper(wrpDfrSrhrdsmp)); + return R.data(WrpDfrSrhrdsmpWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpDfrSrhrdsmp") + public R save(@RequestBody WrpDfrSrhrdsmp wrpDfrSrhrdsmp) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpDfrSrhrdsmp::getMpcd,wrpDfrSrhrdsmp.getMpcd()); + List list = wrpDfrSrhrdsmpService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"测点编号已存在"); + } + return R.status(wrpDfrSrhrdsmpService.save(wrpDfrSrhrdsmp)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpDfrSrhrdsmp") + public R update(@RequestBody WrpDfrSrhrdsmp wrpDfrSrhrdsmp) { + return R.status(wrpDfrSrhrdsmpService.updateById(wrpDfrSrhrdsmp)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpDfrSrhrdsmpService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsbpController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsbpController.java new file mode 100644 index 0000000..ed4c9ca --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsbpController.java @@ -0,0 +1,117 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import com.hnac.hzims.damsafety.service.IWrpDfrSrvrdsbpService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpDfrSrvrdsbpVo; +import com.hnac.hzims.damsafety.wrapper.WrpDfrSrvrdsbpWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpDfrSrvrdsbp") +@AllArgsConstructor +@Api(value = "监测基点表", tags = "监测基点接口") +public class WrpDfrSrvrdsbpController extends BladeController implements CacheNames { + private final IWrpDfrSrvrdsbpService wrpDfrSrvrdsbpService; + + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库代码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "hycncd", value = "水工建筑物id", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "bpcd", value = "基点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "bptp", value = "基点类型", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入WrpDfrSrvrdsbp") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpDfrSrvrdsbp(param); + IPage pages = wrpDfrSrvrdsbpService.page(Condition.getPage(query), wrapper); + return R.data(WrpDfrSrvrdsbpWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库代码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "hycncd", value = "水工建筑物id", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "bpcd", value = "基点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "bptp", value = "基点类型", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入WrpDfrSrvrdsbp") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpDfrSrvrdsbp(param); + List list = wrpDfrSrvrdsbpService.list(wrapper); + return R.data(WrpDfrSrvrdsbpWrapper.build().listVO(list)); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpDfrSrvrdsbp") + public R detail(WrpDfrSrvrdsbp wrpDfrSrvrdsbp) { + WrpDfrSrvrdsbp detail = wrpDfrSrvrdsbpService.getOne(Condition.getQueryWrapper(wrpDfrSrvrdsbp)); + return R.data(WrpDfrSrvrdsbpWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpDfrSrvrdsbp") + public R save(@RequestBody WrpDfrSrvrdsbp wrpDfrSrvrdsbp) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpDfrSrvrdsbp::getBpcd,wrpDfrSrvrdsbp.getBpcd()); + List list = wrpDfrSrvrdsbpService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"基点编号已存在"); + } + return R.status(wrpDfrSrvrdsbpService.save(wrpDfrSrvrdsbp)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpDfrSrvrdsbp") + public R update(@RequestBody WrpDfrSrvrdsbp wrpDfrSrvrdsbp) { + return R.status(wrpDfrSrvrdsbpService.updateById(wrpDfrSrvrdsbp)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpDfrSrvrdsbpService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsmpController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsmpController.java new file mode 100644 index 0000000..2b5bcdb --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpDfrSrvrdsmpController.java @@ -0,0 +1,135 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; +import com.hnac.hzims.damsafety.service.IWrpDfrSrvrdsmpService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpDfrSrvrdsmpVo; +import com.hnac.hzims.damsafety.wrapper.WrpDfrSrvrdsmpWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +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.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpDfrSrvrdsmp") +@AllArgsConstructor +@Api(value = "垂直位移监测测点", tags = "垂直位移监测测点接口") +public class WrpDfrSrvrdsmpController extends BladeController implements CacheNames { + private final IWrpDfrSrvrdsmpService wrpDfrSrvrdsmpService; + + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpDfrSrvrdsmp") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpDfrSrvrdsmp(param); + IPage pages = wrpDfrSrvrdsmpService.page(Condition.getPage(query), wrapper); + return R.data(WrpDfrSrvrdsmpWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpDfrSrvrdsmp") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpDfrSrvrdsmp(param); + List list = wrpDfrSrvrdsmpService.list(wrapper); + return R.data(WrpDfrSrvrdsmpWrapper.build().listVO(list)); + } + + + /** + * 查询垂直位移断面 + */ + @GetMapping("/section") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询垂直位移断面") + public R>> section(HttpServletRequest request,String rscd) { + String deptId=request.getHeader("dept-id"); + if(StringUtils.isBlank(deptId)){ + deptId = AuthUtil.getDeptId(); + } + List> list = wrpDfrSrvrdsmpService.section(deptId,rscd); + //返回断面加仪器数据 + return R.data(list,"查询断面成功"); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpDfrSrvrdsmp") + public R detail(WrpDfrSrvrdsmp wrpDfrSrvrdsmp) { + WrpDfrSrvrdsmp detail = wrpDfrSrvrdsmpService.getOne(Condition.getQueryWrapper(wrpDfrSrvrdsmp)); + return R.data(WrpDfrSrvrdsmpWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpDfrSrvrdsmp") + public R save(@RequestBody WrpDfrSrvrdsmp wrpDfrSrvrdsmp) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpDfrSrvrdsmp::getMpcd,wrpDfrSrvrdsmp.getMpcd()); + List list = wrpDfrSrvrdsmpService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"测点编号已存在"); + } + return R.status(wrpDfrSrvrdsmpService.save(wrpDfrSrvrdsmp)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpDfrSrvrdsmp") + public R update(@RequestBody WrpDfrSrvrdsmp wrpDfrSrvrdsmp) { + return R.status(wrpDfrSrvrdsmpService.updateById(wrpDfrSrvrdsmp)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpDfrSrvrdsmpService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSectionBController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSectionBController.java new file mode 100644 index 0000000..04099e5 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSectionBController.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright Example, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * Example, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import com.hnac.hzims.damsafety.service.IWrpSectionBService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpSectionBVO; +import com.hnac.hzims.damsafety.wrapper.WrpSectionBWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.Condition; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; + +/** + * 大坝断面控制器 + * + * @author Chill + */ +@RestController +@RequestMapping("/damSafety/wrpSectionB") +@AllArgsConstructor +@Api(value = "大坝断面", tags = "大坝断面接口") +public class WrpSectionBController extends BladeController implements CacheNames { + + private final IWrpSectionBService wrpSectionBService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "buildingId", value = "建筑物id", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "damcd", value = "断面编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damnm", value = "断面名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "wallType", value = "防渗墙类型", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpSectionB") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpSectionB(param); + IPage pages = wrpSectionBService.page(Condition.getPage(query), wrapper); + return R.data(WrpSectionBWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "buildingId", value = "建筑物id", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "damcd", value = "断面编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damnm", value = "断面名称", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "wallType", value = "防渗墙类型", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpSectionB") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpSectionB(param); + List list = wrpSectionBService.list(wrapper); + return R.data(WrpSectionBWrapper.build().listVO(list)); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpSectionB") + public R detail(WrpSectionB WrpSectionB) { + WrpSectionB detail = wrpSectionBService.getOne(Condition.getQueryWrapper(WrpSectionB)); + return R.data(WrpSectionBWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpSectionB") + public R save(@RequestBody WrpSectionB wrpSectionB) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpSectionB::getDamcd,wrpSectionB.getDamcd()); + List list = wrpSectionBService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"断面编码已存在"); + } + + wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpSectionB::getDamnm,wrpSectionB.getDamnm()); + list = wrpSectionBService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"断面名称已存在"); + } + + return R.status(wrpSectionBService.save(wrpSectionB)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpSectionB") + public R update(@RequestBody WrpSectionB wrpSectionB) { + return R.status(wrpSectionBService.updateById(wrpSectionB)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpSectionBService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgPztbController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgPztbController.java new file mode 100644 index 0000000..771f2c7 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgPztbController.java @@ -0,0 +1,133 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; +import com.hnac.hzims.damsafety.service.IWrpSpgPztbService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpSpgPztbVo; +import com.hnac.hzims.damsafety.wrapper.WrpSpgPztbWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +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.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpSpgPztb") +@AllArgsConstructor +@Api(value = "测压管测点", tags = "测压管测点接口") +public class WrpSpgPztbController extends BladeController implements CacheNames { + private final IWrpSpgPztbService wrpSpgPztbService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpSpgPztb") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpSpgPztb(param); + IPage pages = wrpSpgPztbService.page(Condition.getPage(query), wrapper); + return R.data(WrpSpgPztbWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpSpgPztb") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpSpgPztb(param); + List list = wrpSpgPztbService.list(wrapper); + return R.data(WrpSpgPztbWrapper.build().listVO(list)); + } + + /** + * 查询测压管断面 + */ + @GetMapping("/section") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询测压管断面") + public R>> section(HttpServletRequest request,String rscd) { + String deptId=request.getHeader("dept-id"); + if(StringUtils.isBlank(deptId)){ + deptId = AuthUtil.getDeptId(); + } + List> list = wrpSpgPztbService.section(deptId,rscd); + //返回断面加仪器数据 + return R.data(list,"查询断面成功"); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpSpgPztb") + public R detail(WrpSpgPztb wrpSpgPztb) { + WrpSpgPztb detail = wrpSpgPztbService.getOne(Condition.getQueryWrapper(wrpSpgPztb)); + return R.data(WrpSpgPztbWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpSpgPztb") + public R save(@RequestBody WrpSpgPztb wrpSpgPztb) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpSpgPztb::getMpcd,wrpSpgPztb.getMpcd()); + List list = wrpSpgPztbService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"测点编号已存在"); + } + return R.status(wrpSpgPztbService.save(wrpSpgPztb)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpSpgPztb") + public R update(@RequestBody WrpSpgPztb wrpSpgPztb) { + return R.status(wrpSpgPztbService.updateById(wrpSpgPztb)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpSpgPztbService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpprmpController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpprmpController.java new file mode 100644 index 0000000..cf1c276 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpprmpController.java @@ -0,0 +1,139 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; +import com.hnac.hzims.damsafety.service.IWrpSpgSpprmpService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpSpgSpprmpVo; +import com.hnac.hzims.damsafety.wrapper.WrpSpgSpprmpWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +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.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpSpgSpprmp") +@AllArgsConstructor +@Api(value = "渗流压力测点信息", tags = "渗流压力测点信息接口") +public class WrpSpgSpprmpController extends BladeController implements CacheNames { + private final IWrpSpgSpprmpService wrpSpgSpprmpService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "ch", value = "桩号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpSpgSpprmp") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpSpgSpprmp(param); + IPage pages = wrpSpgSpprmpService.page(Condition.getPage(query), wrapper); + return R.data(WrpSpgSpprmpWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "ch", value = "桩号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpSpgSpprmp") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpSpgSpprmp(param); + List list = wrpSpgSpprmpService.list(wrapper); + return R.data(WrpSpgSpprmpWrapper.build().listVO(list)); + } + + + /** + * 查询渗压断面 + */ + @GetMapping("/section") + @ApiImplicitParams({ + @ApiImplicitParam(name = "rscd", value = "水库编码", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询渗压断面") + public R>> section(HttpServletRequest request,String rscd) { + String deptId=request.getHeader("dept-id"); + if(StringUtils.isBlank(deptId)){ + deptId = AuthUtil.getDeptId(); + } + List> list = wrpSpgSpprmpService.section(deptId,rscd); + //返回断面加仪器数据 + return R.data(list,"查询断面成功"); + } + + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpSpgSpprmp") + public R detail(WrpSpgSpprmp wrpSpgSpprmp) { + WrpSpgSpprmp detail = wrpSpgSpprmpService.getOne(Condition.getQueryWrapper(wrpSpgSpprmp)); + return R.data(WrpSpgSpprmpWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpSpgSpprmp") + public R save(@RequestBody WrpSpgSpprmp wrpSpgSpprmp) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpSpgSpprmp::getMpcd,wrpSpgSpprmp.getMpcd()); + List list = wrpSpgSpprmpService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"测点编号已存在"); + } + return R.status(wrpSpgSpprmpService.save(wrpSpgSpprmp)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpSpgSpprmp") + public R update(@RequestBody WrpSpgSpprmp wrpSpgSpprmp) { + return R.status(wrpSpgSpprmpService.updateById(wrpSpgSpprmp)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpSpgSpprmpService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpqnmpController.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpqnmpController.java new file mode 100644 index 0000000..49bdb81 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/controller/WrpSpgSpqnmpController.java @@ -0,0 +1,133 @@ +package com.hnac.hzims.damsafety.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.common.logs.annotation.OperationAnnotation; +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; +import com.hnac.hzims.damsafety.service.IWrpSpgSpqnmpService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpSpgSpqnmpVo; +import com.hnac.hzims.damsafety.wrapper.WrpSpgSpqnmpWrapper; +import io.swagger.annotations.*; +import lombok.AllArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springblade.common.cache.CacheNames; +import org.springblade.core.boot.ctrl.BladeController; +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.springblade.core.tool.utils.Func; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/damSafety/wrpSpgSpqnmp") +@AllArgsConstructor +@Api(value = "渗流量测点", tags = "渗流量测点接口") +public class WrpSpgSpqnmpController extends BladeController implements CacheNames { + private final IWrpSpgSpqnmpService wrpSpgSpqnmpService; + + /** + * 分页 + */ + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 1) + @ApiOperation(value = "分页", notes = "传入wrpSpgSpqnmp") + public R> pageList(@ApiIgnore @RequestParam Map param, Query query) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpSpgSpqnmp(param); + IPage pages = wrpSpgSpqnmpService.page(Condition.getPage(query), wrapper); + return R.data(WrpSpgSpqnmpWrapper.build().pageVO(pages)); + } + + /** + * 列表 + */ + @GetMapping("/list") + @ApiImplicitParams({ + @ApiImplicitParam(name = "stcd", value = "测站编码", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "damcd", value = "断面编号", paramType = "query", dataType = "string"), + @ApiImplicitParam(name = "mpcd", value = "测点编号", paramType = "query", dataType = "string") + }) + @ApiOperationSupport(order = 2) + @ApiOperation(value = "列表", notes = "传入wrpSpgSpqnmp") + public R> list(@ApiIgnore @RequestParam Map param) { + LambdaQueryWrapper wrapper=ParamUtil.conditionWrpSpgSpqnmp(param); + List list = wrpSpgSpqnmpService.list(wrapper); + return R.data(WrpSpgSpqnmpWrapper.build().listVO(list)); + } + + /** + * 查询渗流断面 + */ + @GetMapping("/section") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询渗流断面") + public R>> section(HttpServletRequest request,String rscd) { + String deptId=request.getHeader("dept-id"); + if(StringUtils.isBlank(deptId)){ + deptId = AuthUtil.getDeptId(); + } + List> list = wrpSpgSpqnmpService.section(deptId,rscd); + //返回断面加仪器数据 + return R.data(list,"查询断面成功"); + } + + /** + * 详情 + */ + @GetMapping("/detail") + @ApiOperationSupport(order = 3) + @ApiOperation(value = "详情", notes = "传入wrpSpgSpqnmp") + public R detail(WrpSpgSpqnmp wrpSpgSpqnmp) { + WrpSpgSpqnmp detail = wrpSpgSpqnmpService.getOne(Condition.getQueryWrapper(wrpSpgSpqnmp)); + return R.data(WrpSpgSpqnmpWrapper.build().entityVO(detail)); + } + + /** + * 新增 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入wrpSpgSpqnmp") + public R save(@RequestBody WrpSpgSpqnmp wrpSpgSpqnmp) { + LambdaQueryWrapper wrapper=new LambdaQueryWrapper<>(); + wrapper.eq(WrpSpgSpqnmp::getMpcd,wrpSpgSpqnmp.getMpcd()); + List list = wrpSpgSpqnmpService.list(wrapper); + if(list!=null && !list.isEmpty()) { + return R.data(500,false,"测点编号已存在"); + } + return R.status(wrpSpgSpqnmpService.save(wrpSpgSpqnmp)); + } + + /** + * 修改 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入wrpSpgSpqnmp") + public R update(@RequestBody WrpSpgSpqnmp wrpSpgSpqnmp) { + return R.status(wrpSpgSpqnmpService.updateById(wrpSpgSpqnmp)); + } + + /** + * 删除 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 6) + @ApiOperation(value = "逻辑删除", notes = "ids") + public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { + boolean temp = wrpSpgSpqnmpService.deleteLogic(Func.toLongList(ids)); + return R.status(temp); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/feign/WrpSectionBClient.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/feign/WrpSectionBClient.java new file mode 100644 index 0000000..4e1916a --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/feign/WrpSectionBClient.java @@ -0,0 +1,38 @@ +package com.hnac.hzims.damsafety.feign; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import com.hnac.hzims.damsafety.service.IDamSafetyDataService; +import com.hnac.hzims.damsafety.service.IWrpSectionBService; +import com.hnac.hzims.damsafety.util.ParamUtil; +import com.hnac.hzims.damsafety.vo.WrpSectionBVO; +import com.hnac.hzims.damsafety.wrapper.WrpSectionBWrapper; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +@RestController +public class WrpSectionBClient implements IWrpSectionBClient { + + @Autowired + private IWrpSectionBService wrpSectionBService; + + @Autowired + private IDamSafetyDataService damSafetyDataService; + + @Override + public R> list(Map param) { + LambdaQueryWrapper wrapper= ParamUtil.conditionWrpSectionB(param); + List list = wrpSectionBService.list(wrapper); + return R.data(WrpSectionBWrapper.build().listVO(list)); + } + + @Override + public R> getRealData(String deviceCode) { + return R.data(damSafetyDataService.getRealData(deviceCode)); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.java new file mode 100644 index 0000000..928538d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.TBuilding; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +public interface TbBuildingMapper extends UserDataScopeBaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.xml new file mode 100644 index 0000000..7f49d66 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbBuildingMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.java new file mode 100644 index 0000000..d7b0e71 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.TProjInfo; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +public interface TbProjInfoMapper extends UserDataScopeBaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.xml new file mode 100644 index 0000000..d861102 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbProjInfoMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.java new file mode 100644 index 0000000..ccf23e5 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.damsafety.entity.TSectionConfig; + +public interface TbSectionConfigMapper extends BaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.xml new file mode 100644 index 0000000..a15c7ef --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/TbSectionConfigMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.java new file mode 100644 index 0000000..6308444 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.damsafety.entity.WrpDamsB; + +public interface WrpDamsBMapper extends BaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.xml new file mode 100644 index 0000000..63025e5 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDamsBMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.java new file mode 100644 index 0000000..8d7c93d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +import java.util.List; +import java.util.Map; + +public interface WrpDfrSrhrdsmpMapper extends UserDataScopeBaseMapper { + List> section(@Param("deptId") String deptId, @Param("rscd") String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.xml new file mode 100644 index 0000000..d17bb5d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrhrdsmpMapper.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.java new file mode 100644 index 0000000..09d0ab8 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +public interface WrpDfrSrvrdsbpMapper extends UserDataScopeBaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.xml new file mode 100644 index 0000000..b1ea19e --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsbpMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.java new file mode 100644 index 0000000..596aece --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +import java.util.List; +import java.util.Map; + +public interface WrpDfrSrvrdsmpMapper extends UserDataScopeBaseMapper { + List> section(@Param("deptId") String deptId,@Param("rscd") String rscd); +} + diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.xml new file mode 100644 index 0000000..b2052bb --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpDfrSrvrdsmpMapper.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.java new file mode 100644 index 0000000..2450a83 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright Example, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * Example, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +/** + * Mapper 接口 请不要使用TSectionMapper,否则扫描到的是TSectionMapper 而不是 tSectionMapper 导致找不到mapper + * @author Chill + */ +public interface WrpSectionBMapper extends UserDataScopeBaseMapper { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.xml new file mode 100644 index 0000000..418b268 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSectionBMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.java new file mode 100644 index 0000000..7df95c5 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +import java.util.List; +import java.util.Map; + +public interface WrpSpgPztbMapper extends UserDataScopeBaseMapper { + List> section(@Param("deptId") String deptId,@Param("rscd") String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.xml new file mode 100644 index 0000000..7fac0c9 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgPztbMapper.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.java new file mode 100644 index 0000000..fe0daf5 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +import java.util.List; +import java.util.Map; + +public interface WrpSpgSpprmpMapper extends UserDataScopeBaseMapper { + List> section(@Param("deptId") String deptId,@Param("rscd") String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.xml new file mode 100644 index 0000000..2e82e78 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpprmpMapper.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.java new file mode 100644 index 0000000..314cca4 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.damsafety.mapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; +import org.apache.ibatis.annotations.Param; +import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; + +import java.util.List; +import java.util.Map; + +public interface WrpSpgSpqnmpMapper extends UserDataScopeBaseMapper { + List> section(@Param("deptId") String deptId,@Param("rscd") String rscd); +} + diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.xml b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.xml new file mode 100644 index 0000000..cbbc403 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/mapper/WrpSpgSpqnmpMapper.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IDamSafetyDataService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IDamSafetyDataService.java new file mode 100644 index 0000000..908358f --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IDamSafetyDataService.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.entity.Report; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeInstanceFieldVO; +import com.hnac.hzinfo.sdk.analyse.vo.DeviceSinglePropsValueVO; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +public interface IDamSafetyDataService { + Report getReportData(List deviceCodes, String type, Integer accessRules, Date begin, Date end, String col); + List getSeepageLine(List deviceCodes, Date begin, Date end, String col); + Report getReportDataByDeviceCode(String deviceCode, String type, Integer accessRules, Date begin, Date end); + List getSignages(String stcd); + + Map getYearSpprReport(String rscd,List deviceCodes, Date begin, Date end,String col); + Map getYearHrdsReport(List deviceCodes,Date begin, Date end); + Report getYearVrdsReport(List deviceCodes,Date begin, Date end,String col); + + Map getDamReport(List deviceCodes,String type, Date begin, Date end,String col,int yearGap); + + List getRealData(String deviceCode); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IFileUploadService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IFileUploadService.java new file mode 100644 index 0000000..a0f3fce --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IFileUploadService.java @@ -0,0 +1,10 @@ +package com.hnac.hzims.damsafety.service; + +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +public interface IFileUploadService { + String addFile(MultipartFile file,String childPath); + List addFiles(MultipartFile[] files,String childPath); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITBuildingService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITBuildingService.java new file mode 100644 index 0000000..29bca9a --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITBuildingService.java @@ -0,0 +1,8 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.TBuilding; +import org.springblade.core.mp.base.BaseService; + + +public interface ITBuildingService extends BaseService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITProjInfoService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITProjInfoService.java new file mode 100644 index 0000000..fee9de9 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITProjInfoService.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.TProjInfo; +import org.springblade.core.mp.base.BaseService; + +public interface ITProjInfoService extends BaseService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITSectionConfigService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITSectionConfigService.java new file mode 100644 index 0000000..0465af0 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/ITSectionConfigService.java @@ -0,0 +1,23 @@ +package com.hnac.hzims.damsafety.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.damsafety.entity.TSectionConfig; + +import java.util.List; + +public interface ITSectionConfigService{ + IPage page(IPage page, LambdaQueryWrapper wrapper); + + List list(LambdaQueryWrapper wrapper); + + TSectionConfig getOne(QueryWrapper wrapper); + + boolean save(TSectionConfig entity); + + boolean updateById(TSectionConfig entity); + + boolean delete(Wrapper wrapper); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDamsBService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDamsBService.java new file mode 100644 index 0000000..45d2919 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDamsBService.java @@ -0,0 +1,23 @@ +package com.hnac.hzims.damsafety.service; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.damsafety.entity.WrpDamsB; + +import java.util.List; + +public interface IWrpDamsBService { + IPage page(IPage page, LambdaQueryWrapper wrapper); + + List list(LambdaQueryWrapper wrapper); + + WrpDamsB getOne(QueryWrapper wrapper); + + boolean save(WrpDamsB entity); + + boolean updateById(WrpDamsB entity); + + boolean delete(Wrapper wrapper); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrhrdsmpService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrhrdsmpService.java new file mode 100644 index 0000000..ee3cf37 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrhrdsmpService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; +import org.springblade.core.mp.base.BaseService; + +import java.util.List; +import java.util.Map; + +public interface IWrpDfrSrhrdsmpService extends BaseService { + List> section(String deptId,String rscd); + List> getSection(String deptId,String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsbpService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsbpService.java new file mode 100644 index 0000000..352b70d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsbpService.java @@ -0,0 +1,8 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import org.springblade.core.mp.base.BaseService; + +public interface IWrpDfrSrvrdsbpService extends BaseService { + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsmpService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsmpService.java new file mode 100644 index 0000000..ed89845 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpDfrSrvrdsmpService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; +import org.springblade.core.mp.base.BaseService; + +import java.util.List; +import java.util.Map; + +public interface IWrpDfrSrvrdsmpService extends BaseService { + List> section(String deptId,String rscd); + List> getSection(String deptId,String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSectionBService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSectionBService.java new file mode 100644 index 0000000..21ab3ab --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSectionBService.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright Example, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * Example, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import org.springblade.core.mp.base.BaseService; + +/** + * 服务类 + * + * @author Chill + */ +public interface IWrpSectionBService extends BaseService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgPztbService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgPztbService.java new file mode 100644 index 0000000..d30046d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgPztbService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; +import org.springblade.core.mp.base.BaseService; + +import java.util.List; +import java.util.Map; + +public interface IWrpSpgPztbService extends BaseService { + List> section(String deptId,String rscd); + List> getSection(String deptId,String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpprmpService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpprmpService.java new file mode 100644 index 0000000..d70efea --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpprmpService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; +import org.springblade.core.mp.base.BaseService; + +import java.util.List; +import java.util.Map; + +public interface IWrpSpgSpprmpService extends BaseService { + List> section(String deptId,String rscd); + List> getSection(String deptId,String rscd); +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpqnmpService.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpqnmpService.java new file mode 100644 index 0000000..fa63027 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/IWrpSpgSpqnmpService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.damsafety.service; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; +import org.springblade.core.mp.base.BaseService; + +import java.util.List; +import java.util.Map; + +public interface IWrpSpgSpqnmpService extends BaseService { + List> section(String deptId,String rscd); + List> getSection(String deptId,String rscd); +} + diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/DamSafetyDataServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/DamSafetyDataServiceImpl.java new file mode 100644 index 0000000..584e6c0 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/DamSafetyDataServiceImpl.java @@ -0,0 +1,647 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.service.IDamSafetyDataService; +import com.hnac.hzims.entity.Report; +import com.hnac.hzims.entity.ReportData; +import com.hnac.hzims.enums.QueryDateTypeEnum; +import com.hnac.hzims.util.CommonUtil; +import com.hnac.hzims.util.ReportDateUtil; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +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.datasearch.analyse.vo.AnalyzeInstanceFieldVO; +import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; +import com.hnac.hzinfo.sdk.analyse.AnalyseDataSearchClient; +import com.hnac.hzinfo.sdk.analyse.po.ComputeBaseStrategyPO; +import com.hnac.hzinfo.sdk.analyse.vo.DeviceSinglePropsValueQuery; +import com.hnac.hzinfo.sdk.analyse.vo.DeviceSinglePropsValueVO; +import com.hnac.hzinfo.sdk.core.response.Result; +import com.hnac.hzinfo.sdk.real.RealDataSearchClient; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.*; + +@Service +@Slf4j +public class DamSafetyDataServiceImpl implements IDamSafetyDataService { + + @Autowired + AnalyseDataSearchClient analyseDataSearchClient; + + @Autowired + RealDataSearchClient realDataSearchClient; + + @Override + public Report getReportData(List deviceCodes, String type, Integer accessRules, Date begin, Date end, String col) { + //检查数据是否正常并转化 + final QueryDateTypeEnum dtEnum = CommonUtil.checkType(type); + if(deviceCodes==null || deviceCodes.size()<=0){ + return null; + } + + if(dtEnum ==null){ + return null; + } + + //初始化报表 + Report report = new Report(); + report.initBaseReport(deviceCodes.size(), begin, end, dtEnum); + //设置基础数据 + for (int i = 0; i < deviceCodes.size(); i++) { + String deviceCode = deviceCodes.get(i); + //获取数据库某个站点不同时间要求的数据 + List timeDataList = listDataReport(begin,end,dtEnum,deviceCode,accessRules,col); + + for (ReportData reportData : timeDataList) { + String value=reportData.getVal(); +// if(value!=null && !"-".equals(value) && !"".equals(value.trim())){ +// value = new BigDecimal(value).setScale(3,BigDecimal.ROUND_DOWN).toString(); +// } + if(value == null){ + value = "-"; + } + report.setBaseCell(reportData.getKeyStr(), i, value); + } + } + return report; + } + + @Override + public List getSeepageLine(List deviceCodes, Date begin, Date end, String col) { + return getEightHourData(deviceCodes,"0",begin,end,col); + } + + List getEightHourData(List deviceCodes, String accessRules,Date begin, Date end,String col){ + DeviceSinglePropsValueQuery query=new DeviceSinglePropsValueQuery(); + query.setDeviceCodes(deviceCodes); + query.setSignage(col); + query.setAccessRule(accessRules); + query.setBeginTime(begin); + query.setEndTime(end); + Result> result=analyseDataSearchClient.getValueOfBacthDeviceCode(query); + if(result==null || !result.isSuccess()){ + return null; + } + List list=result.getData(); + return list; + } + + @Override + public List getSignages(String stcd){ + //查询列 + Result> result=analyseDataSearchClient.getInstanceFieldByAnalyseCode(stcd,1,""); + if(result==null || !result.isSuccess()){ + return null; + } + + List analyzeInstanceFieldVOS=result.getData(); + return analyzeInstanceFieldVOS; + } + + @Override + public Map getYearSpprReport(String rscd,List deviceCodes, Date begin, Date end,String col) { + String type="day"; + Report report=getYearDataReport(deviceCodes,type,begin,end,col); + + //根据水库模型获取数据 + Report data=getMaxMinByDeviceCode(rscd,type,6,begin,end); + Map res=new HashMap<>(); + res.put("spprData",report); + res.put("reservoirData",data); + return res; + } + + @Override + public Map getYearHrdsReport(List deviceCodes, Date begin, Date end) { + Report xData=getYearDataReport(deviceCodes,"day",begin,end,"xhrds"); + Report yData=getYearDataReport(deviceCodes,"day",begin,end,"yhrds"); + Map res=new HashMap<>(); + res.put("xData",xData); + res.put("yData",yData); + return res; + } + + @Override + public Report getYearVrdsReport(List deviceCodes, Date begin, Date end, String col) { + return getYearDataReport(deviceCodes,"day",begin,end,col); + } + + @Override + public Map getDamReport(List deviceCodes,String type, Date begin, Date end, String col,int yearGap) { + Map res=new HashMap<>(); + Report report=getYearDataReport(deviceCodes,type,begin,end,col); + res.put("nowData",report); + //历史时间对应的历史数据 + Date historyDate=CommonUtil.getHistoryDate(begin,yearGap); + Report historyData=getHistoryData(deviceCodes,"year", historyDate, end, col); + res.put("historyData",historyData); + return res; + } + + @Override + public List getRealData(String stcd) { + RealDataSearchPO po=new RealDataSearchPO(); + po.setAnalyzeCode(stcd); + List list=getSignages(stcd); + if(list==null && list.isEmpty()){ + return null; + } + List signages=new ArrayList<>(); + for(AnalyzeInstanceFieldVO vo:list){ + signages.add(vo.getSignage()); + } + po.setSignages(signages); + Result> result=realDataSearchClient.getRealDataByDeviceCode(po); + return result.getData(); + } + + public Report getHistoryData(List deviceCodes,String type, Date begin, Date end, String col){ + //检查数据是否正常并转化 + final QueryDateTypeEnum dtEnum = CommonUtil.checkType(type); + if(deviceCodes==null || deviceCodes.size()<=0){ + return null; + } + int count=deviceCodes.size(); + //初始化报表 + Report report = new Report(); + report.initBaseReportHistory(count); + //设置基础数据 + for (int i = 0; i < count; i++) { + String deviceCode = deviceCodes.get(i); +// List dataList = listDataReport(param,dtEnum,deviceCode,1,col); +// dealMaxMin(report,i,dataList); + //获取数据库某个站点不同时间要求的数据 + List maxList = listDataReport(begin, end,dtEnum,deviceCode,1,col); + List minList = listDataReport(begin, end,dtEnum,deviceCode,2,col); + List avgList = listDataReport(begin, end,dtEnum,deviceCode,3,col); + dealHistoryMaxMin(report,i,maxList,minList,avgList); + } + return report; + } + + private void dealHistoryMaxMin(Report report ,int i,List maxList,List minList,List avgList){ + BigDecimal maxValue=null; + BigDecimal minValue=null; + BigDecimal avg=null; + if(maxList!=null && !maxList.isEmpty()){ + ReportData maxObj=maxList.get(0); + if(maxObj!=null && maxObj.getValue()!=null) { + maxValue = new BigDecimal(maxObj.getValue()).setScale(3, BigDecimal.ROUND_HALF_UP); + report.setBaseCell("maxDate", i, ReportDateUtil.getYMDStr(maxObj.getKeyDate())); + }else{ + report.setBaseCell("maxDate", i, "-"); + } + } + + if(minList!=null && !minList.isEmpty()){ + ReportData minObj=minList.get(0); + if(minObj!=null && minObj.getValue()!=null) { + minValue = new BigDecimal(minObj.getValue()).setScale(3, BigDecimal.ROUND_HALF_UP); + report.setBaseCell("minDate", i, ReportDateUtil.getYMDStr(minObj.getKeyDate())); + }else{ + report.setBaseCell("minDate", i, "-"); + } + } + + if(avgList!=null && !avgList.isEmpty()){ + ReportData avgObj=avgList.get(0); + if(avgObj!=null && avgObj.getValue()!=null) { + avg = new BigDecimal(avgObj.getValue()).setScale(3, BigDecimal.ROUND_HALF_UP); + } + } + if(maxValue!=null) { + report.setBaseCell("max", i, String.valueOf(maxValue)); + }else{ + report.setBaseCell("max", i, "-"); + } + + if(minValue!=null) { + report.setBaseCell("min", i, String.valueOf(minValue)); + }else{ + report.setBaseCell("min", i, "-"); + } + + if(avg!=null){ + report.setBaseCell("avg", i, String.valueOf(avg)); + }else{ + report.setBaseCell("avg", i, "-"); + } + + if(maxValue!=null && minValue!=null) { + BigDecimal range = maxValue.subtract(minValue); + BigDecimal tmpRang = range.setScale(3, BigDecimal.ROUND_HALF_UP); + report.setBaseCell("range", i, String.valueOf(tmpRang));//极差 + }else{ + report.setBaseCell("range", i, "-");//极差 + } + } + + private Report getYearDataReport(List deviceCodes,String type, Date begin, Date end, String col){ + //检查数据是否正常并转化 + final QueryDateTypeEnum dtEnum = CommonUtil.checkType(type); + if(deviceCodes==null || deviceCodes.size()<=0){ + return null; + } + + int count=deviceCodes.size(); + //初始化报表 + Report report = new Report(); + report.initBaseReportMaxMin(count, begin, end, dtEnum); + //设置基础数据 + for (int i = 0; i < count; i++) { + String deviceCode = deviceCodes.get(i); + //获取数据库某个站点不同时间要求的数据 + List timeDataList = listDataReport(begin, end,dtEnum,deviceCode,6,col); + + for (ReportData reportData : timeDataList) { + String value=reportData.getVal(); +// if(value!=null && !"-".equals(value) && !"".equals(value.trim())){ +// value = new BigDecimal(value).setScale(3,BigDecimal.ROUND_DOWN).toString(); +// } + if(value == null){ + value = "-"; + } + report.setBaseCell(reportData.getKeyStr(), i, value); + } + dealMaxMin(report,i,timeDataList); + } + return report; + } + +// private void dealMaxMin(Report report ,int i,List timeDataList){ +// if(timeDataList==null || timeDataList.isEmpty()){ +// return; +// } +// +// Optional max = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).max(Comparator.comparingDouble(ReportData::getValue)); +// ReportData maxObj = max.get(); +// double maxValue=maxObj.getValue(); +// +// report.setBaseCell("max", i, String.valueOf(maxValue)); +// report.setBaseCell("maxDate", i, ReportDateUtil.getYMDStr(maxObj.getKeyDate())); +// +// Optional min = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).min(Comparator.comparingDouble(ReportData::getValue)); +// ReportData minObj = min.get(); +// double minValue=minObj.getValue(); +// +// report.setBaseCell("min", i, String.valueOf(minValue)); +// report.setBaseCell("minDate", i, ReportDateUtil.getYMDStr(minObj.getKeyDate())); +// +// +// Double avgs = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).mapToDouble(ReportData::getValue).average().orElse(0D); +// BigDecimal avg=new BigDecimal(String.valueOf(avgs)).setScale(3,BigDecimal.ROUND_HALF_UP); +// report.setBaseCell("avg", i, String.valueOf(avg)); +// +// BigDecimal range=new BigDecimal(maxValue).subtract(new BigDecimal(minValue)); +// BigDecimal tmpRang=range.setScale(3,BigDecimal.ROUND_HALF_UP); +// report.setBaseCell("range", i, String.valueOf(tmpRang.abs()));//极差 0或正值 +// +// } + + private void dealMaxMin(Report report ,int i,List timeDataList){ + if(timeDataList==null || timeDataList.isEmpty()){ + return; + } + + Optional max = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).max(Comparator.comparingDouble(ReportData::getValue)); + + Double maxValue =0.0; + if(max!=null && max.isPresent()) { + ReportData maxObj = max.get(); + maxValue = maxObj.getValue(); + report.setBaseCell("max", i, String.valueOf(maxValue)); + report.setBaseCell("maxDate", i, ReportDateUtil.getYMDStr(maxObj.getKeyDate())); + }else{ + report.setBaseCell("max", i, "-"); + report.setBaseCell("maxDate", i, "-"); + } + + Optional min = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).min(Comparator.comparingDouble(ReportData::getValue)); + + Double minValue=0.0; + if(min!=null && min.isPresent()) { + ReportData minObj = min.get(); + minValue = minObj.getValue(); + report.setBaseCell("min", i, String.valueOf(minValue)); + report.setBaseCell("minDate", i, ReportDateUtil.getYMDStr(minObj.getKeyDate())); + }else{ + report.setBaseCell("min", i, "-"); + report.setBaseCell("minDate", i, "-"); + } + + Double avgs = timeDataList.stream().filter(reportData -> reportData.getValue()!=null).mapToDouble(ReportData::getValue).average().orElse(0D); + BigDecimal avg=new BigDecimal(String.valueOf(avgs)).setScale(3,BigDecimal.ROUND_HALF_UP); + report.setBaseCell("avg", i, String.valueOf(avg)); + + BigDecimal range=new BigDecimal(maxValue).subtract(new BigDecimal(minValue)); + BigDecimal tmpRange=range.setScale(3,BigDecimal.ROUND_HALF_UP); + report.setBaseCell("range", i, String.valueOf(tmpRange));//极差 + + } + + +// public static void main(String[] args) { +// List dd=new ArrayList<>(); +// dd.add(null); +// dd.add(-18.924); +// dd.add(-444.924); +// +// Optional max = dd.stream().filter(aDouble -> aDouble!=null).max(Comparator.comparingDouble(Double::doubleValue)); +// Double maxObj = max.get(); +// System.out.println(maxObj); +// +// Optional min = dd.stream().filter(aDouble -> aDouble!=null).min(Comparator.comparingDouble(Double::doubleValue)); +// Double minObj = min.get(); +// System.out.println(minObj); +// +// Double avgs = dd.stream().filter(reportData -> reportData!=null).mapToDouble(Double::doubleValue).average().orElse(0D); +// BigDecimal avg=new BigDecimal(String.valueOf(avgs)).setScale(3,BigDecimal.ROUND_HALF_UP); +// +// System.out.println(avg); +// } + + + public Report getMaxMinByDeviceCode(String deviceCode, String type, Integer accessRules, Date start, Date end) { + //检查数据是否正常并转化 + final QueryDateTypeEnum dtEnum = CommonUtil.checkType(type); + if(deviceCode==null || "".equals(deviceCode)){ + return null; + } + + if(dtEnum ==null){ + return null; + } + + //设置基础数据 + List signages=getSignages(deviceCode); + if(signages==null || signages.isEmpty()){ + return null; + } + //初始化报表 + Report report = new Report(); + report.initBaseReportMaxMin(signages.size(), start, end, dtEnum); + + //获取数据库某个站点不同时间要求的数据 + List timeDataList = listDataReport(start, end,dtEnum,deviceCode,accessRules,signages); + for(int i=0;i tmpList=CommonUtil.getReportDataBySignage(timeDataList,signage); + + dealMaxMin(report,i,tmpList); + + for (ReportData reportData : tmpList) { + String value = reportData.getVal(); +// if (value != null && !"-".equals(value) && !"".equals(value.trim())) { +// value = new BigDecimal(value).setScale(3, BigDecimal.ROUND_DOWN).toString(); +// } + + if(value == null){ + value = "-"; + } + + report.setBaseCell(reportData.getKeyStr(), i, value); + } + } + + return report; + } + + @Override + public Report getReportDataByDeviceCode(String deviceCode, String type, Integer accessRules, Date start, Date end) { + //检查数据是否正常并转化 + final QueryDateTypeEnum dtEnum = CommonUtil.checkType(type); + if(deviceCode==null || "".equals(deviceCode)){ + return null; + } + + if(dtEnum ==null){ + return null; + } + + //设置基础数据 + List signages=getSignages(deviceCode); + if(signages==null || signages.isEmpty()){ + return null; + } + //初始化报表 + Report report = new Report(); +// List> titles=new ArrayList<>(); +// for(AnalyzeInstanceFieldVO vo:signages){ +// Map title=new HashMap<>(); +// title.put(vo.getSignage(),vo.getFieldName()); +// titles.add(title); +// } +// report.setTitle(titles); + report.initBaseReport(signages.size(), start, end, dtEnum); + + //获取数据库某个站点不同时间要求的数据 + List timeDataList = listDataReport(start, end,dtEnum,deviceCode,accessRules,signages); + for(int i=0;i tmpList=CommonUtil.getReportDataBySignage(timeDataList,signage); + for (ReportData reportData : tmpList) { + String value = reportData.getVal(); +// if (value != null && !"-".equals(value) && !"".equals(value.trim())) { +// value = new BigDecimal(value).setScale(3, BigDecimal.ROUND_DOWN).toString(); +// } + + if(value == null){ + value = "-"; + } + + report.setBaseCell(reportData.getKeyStr(), i, value); + } + } + + return report; + } + + //查询多个code对应的同一个值 + List getDataByDeviceCodes(List deviceCodes,Date begin,Date end,String accessRules,String col){ + DeviceSinglePropsValueQuery query=new DeviceSinglePropsValueQuery(); + query.setBeginTime(begin); + query.setEndTime(end); + query.setDeviceCodes(deviceCodes); + query.setSignage(col); + query.setAccessRule(accessRules); + Result> result=analyseDataSearchClient.getValueOfBacthDeviceCode(query); + List datas=result.getData(); + return datas; + } + + + private List listDataReport(Date begin,Date endSt, QueryDateTypeEnum dtEnum, String deviceCode, Integer accessRules, List signages) { + Integer saveTimeType=2; + if(QueryDateTypeEnum.DAY.equals(dtEnum)){ + saveTimeType = 3; + } + if(QueryDateTypeEnum.MONTH.equals(dtEnum)){ + saveTimeType = 5; + } + if(QueryDateTypeEnum.YEAR.equals(dtEnum)){ + saveTimeType = 6; + } + + LocalDateTime start = LocalDateTime.ofInstant(begin.toInstant(), ZoneId.systemDefault()); + LocalDateTime end = LocalDateTime.ofInstant(endSt.toInstant(), ZoneId.systemDefault()); + + return getDataByDeviceCode(deviceCode,accessRules,saveTimeType,start,end,signages); + } + + + private List listDataReport(Date begin,Date endSt,QueryDateTypeEnum dtEnum,String deviceCode,Integer accessRules,String col) { + + + Integer saveTimeType=2; + if(QueryDateTypeEnum.DAY.equals(dtEnum)){ + saveTimeType = 3; + } + if(QueryDateTypeEnum.MONTH.equals(dtEnum)){ + saveTimeType = 5; + } + if(QueryDateTypeEnum.YEAR.equals(dtEnum)){ + saveTimeType = 6; + } + + LocalDateTime start = LocalDateTime.ofInstant(begin.toInstant(), ZoneId.systemDefault()); + LocalDateTime end = LocalDateTime.ofInstant(endSt.toInstant(), ZoneId.systemDefault()); + //saveTimeType 周期类型: 0-> s(秒) 1->、m(分)、2->h(小时)3->、d(天)4->、w(周)5->、n(自然月)、6->y(自然年) + //accessRules 取数规则0=最早值、1=最大值、2=最小值、3=平均值、4=(累计值/和值)、5=(变化值/差值) 6=最新值 + return getDataByDeviceCode(deviceCode, accessRules, saveTimeType, start, end, col); + } + + List getDataByDeviceCode(String deviceCode,Integer accessRules,Integer saveTimeType, + LocalDateTime start,LocalDateTime end,List signages){ + List reportData=new ArrayList<>(); + AnalyseCodeByAnalyseDataPO po=new AnalyseCodeByAnalyseDataPO(); + po.setDeviceCode(deviceCode); + + List signboardConditions=new ArrayList<>(); + + for(AnalyzeInstanceFieldVO vo:signages) { + AnalyzeDataConditionPO conditionPO = new AnalyzeDataConditionPO(); + conditionPO.setBeginTime(start); + conditionPO.setEndTime(end); + conditionPO.setSignages(vo.getSignage()); +// conditionPO.setKeepFigures(3); + conditionPO.setAccessRules(accessRules); + conditionPO.setSaveTimeType(saveTimeType); + conditionPO.setTimeInterval(1); + conditionPO.setFull(1); + signboardConditions.add(conditionPO); + } + + po.setSignboardConditions(signboardConditions); + + Result> result=analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); + if(result==null){ + return reportData; + } + List datas=result.getData(); + if(datas==null || datas.isEmpty()){ + return reportData; + } + for(AnalyzeDataConditionVO vo:datas){ + List dataTaosVOs=vo.getList(); + for(AnalyseDataTaosVO vv:dataTaosVOs) { + ReportData data=new ReportData(); + data.setKeyStr(CommonUtil.getKeyBySaveTimeType(vv.getTs(),saveTimeType)); + data.setKeyDate(vv.getTs()); + data.setStcd(vo.getSignage());//测站变成属性值 + data.setVal(vv.getVal()); + data.setName(vo.getName()); + reportData.add(data); + } + } + return reportData; + } + + List getDataByDeviceCode(String deviceCode,Integer accessRules,Integer saveTimeType, + LocalDateTime start,LocalDateTime end,String col){ + List reportData=new ArrayList<>(); + AnalyseCodeByAnalyseDataPO po=new AnalyseCodeByAnalyseDataPO(); + po.setDeviceCode(deviceCode); + + List signboardConditions=new ArrayList<>(); + AnalyzeDataConditionPO conditionPO=new AnalyzeDataConditionPO(); + conditionPO.setBeginTime(start); + conditionPO.setEndTime(end); + conditionPO.setSignages(col); +// conditionPO.setKeepFigures(3); + conditionPO.setAccessRules(accessRules); + conditionPO.setSaveTimeType(saveTimeType); + conditionPO.setTimeInterval(1); + conditionPO.setFull(1); + signboardConditions.add(conditionPO); + po.setSignboardConditions(signboardConditions); + Result> result=analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(po); + if(result==null){ + return reportData; + } + List datas=result.getData(); + if(datas==null || datas.isEmpty()){ + return reportData; + } + for(AnalyzeDataConditionVO vo:datas){ + List dataTaosVOs=vo.getList(); + for (AnalyseDataTaosVO vv : dataTaosVOs) { + if(vo.getSignage().equals(col)) { + ReportData data = new ReportData(); + data.setKeyStr(CommonUtil.getKeyBySaveTimeType(vv.getTs(), saveTimeType)); + data.setKeyDate(vv.getTs()); + data.setStcd(deviceCode); + data.setVal(vv.getVal()); + data.setName(vo.getName()); + reportData.add(data); + } + } + } + return reportData; + } + + //按时间范围求最大值、最小值 + public List queryMaxOrMin(String deviceCode, Date startTime, Date endTime, + Integer calcType, String col) { + List res=new ArrayList<>(); + + List signages=new ArrayList<>(); + signages.add(col); + ComputeBaseStrategyPO po=new ComputeBaseStrategyPO(); + LocalDateTime start = LocalDateTime.ofInstant(startTime.toInstant(), ZoneId.systemDefault()); + po.setBeginTime(start); + LocalDateTime end = LocalDateTime.ofInstant(endTime.toInstant(), ZoneId.systemDefault()); + po.setEndTime(end); + po.setAccessRules(calcType); + po.setDeviceCode(deviceCode); + po.setSignages(signages); + Result> result=analyseDataSearchClient.getComputeBaseStrategy(po); + if(result==null){ + return res; + } + List datas =result.getData(); + + if(datas!=null && !datas.isEmpty()){ + for(AnalyseDataTaosVO vo:datas) { + if(col.equals(vo.getSignage())) { + ReportData reportData=new ReportData(); + String val=vo.getVal(); + String tm=vo.getTs(); + reportData.setKeyStr(tm); + reportData.setStcd(deviceCode); + reportData.setVal(val); + res.add(reportData); + } + } + } + + return res; + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/FileUploadServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/FileUploadServiceImpl.java new file mode 100644 index 0000000..b9a269d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/FileUploadServiceImpl.java @@ -0,0 +1,63 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.service.IFileUploadService; +import org.apache.commons.io.FileUtils; +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.util.ArrayList; +import java.util.List; +import java.util.UUID; + +@Service +public class FileUploadServiceImpl implements IFileUploadService { + @Value("${file.upload.path}") + String fileUploadPath; + + @Override + public String addFile(MultipartFile file,String childPath) { + MultipartFile[] files=new MultipartFile[1]; + files[0] = file; + return addFiles(files,childPath).get(0); + } + + @Override + public List addFiles(MultipartFile[] files,String childPath){ + List list=new ArrayList<>(); + String dirName = UUID.randomUUID().toString().replace("-", ""); + File uploadPath = new File(fileUploadPath, childPath); + uploadPath = new File(uploadPath, dirName); + try { + if(!uploadPath.exists()){ + uploadPath.mkdirs(); + } + for(MultipartFile file:files){ + saveFile(file, uploadPath); + list.add(File.separator+childPath+File.separator+dirName+File.separator+file.getOriginalFilename()); + } + return list; + }catch (IOException e){ + return list; + } + } + + /** + * 保存文件,如果后期有要求需要处理重名情况 + * + * @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); + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TBuildingServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TBuildingServiceImpl.java new file mode 100644 index 0000000..104eddf --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TBuildingServiceImpl.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.TBuilding; +import com.hnac.hzims.damsafety.mapper.TbBuildingMapper; +import com.hnac.hzims.damsafety.service.ITBuildingService; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class TBuildingServiceImpl extends BaseServiceImpl implements ITBuildingService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TProjInfoServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TProjInfoServiceImpl.java new file mode 100644 index 0000000..496cf8f --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TProjInfoServiceImpl.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.TProjInfo; +import com.hnac.hzims.damsafety.mapper.TbProjInfoMapper; +import com.hnac.hzims.damsafety.service.ITProjInfoService; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class TProjInfoServiceImpl extends BaseServiceImpl implements ITProjInfoService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TSectionConfigServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TSectionConfigServiceImpl.java new file mode 100644 index 0000000..97e78ab --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/TSectionConfigServiceImpl.java @@ -0,0 +1,53 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.damsafety.entity.TSectionConfig; +import com.hnac.hzims.damsafety.mapper.TbSectionConfigMapper; +import com.hnac.hzims.damsafety.service.ITSectionConfigService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class TSectionConfigServiceImpl implements ITSectionConfigService { + + @Resource + TbSectionConfigMapper tbSectionConfigMapper; + + @Override + public IPage page(IPage page, LambdaQueryWrapper wrapper) { + return tbSectionConfigMapper.selectPage(page,wrapper); + } + + @Override + public List list(LambdaQueryWrapper wrapper) { + return tbSectionConfigMapper.selectList(wrapper); + } + + @Override + public TSectionConfig getOne(QueryWrapper wrapper) { + return tbSectionConfigMapper.selectOne(wrapper); + } + + @Override + public boolean save(TSectionConfig entity) { + int count=tbSectionConfigMapper.insert(entity); + return count>0; + } + + @Override + public boolean updateById(TSectionConfig entity) { + int count=tbSectionConfigMapper.updateById(entity); + return count>0; + } + + @Override + public boolean delete(Wrapper wrapper) { + int count=tbSectionConfigMapper.delete(wrapper); + return count>0; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDamsBServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDamsBServiceImpl.java new file mode 100644 index 0000000..ad53a86 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDamsBServiceImpl.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.damsafety.entity.WrpDamsB; +import com.hnac.hzims.damsafety.mapper.WrpDamsBMapper; +import com.hnac.hzims.damsafety.service.IWrpDamsBService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class WrpDamsBServiceImpl implements IWrpDamsBService { + + @Resource + WrpDamsBMapper wrpDamsBMapper; + + @Override + public IPage page(IPage page, LambdaQueryWrapper wrapper) { + return wrpDamsBMapper.selectPage(page,wrapper); + } + + @Override + public List list(LambdaQueryWrapper wrapper) { + return wrpDamsBMapper.selectList(wrapper); + } + + @Override + public WrpDamsB getOne(QueryWrapper wrapper) { + return wrpDamsBMapper.selectOne(wrapper); + } + + @Override + public boolean save(WrpDamsB entity) { + int count=wrpDamsBMapper.insert(entity); + return count>0; + } + + @Override + public boolean updateById(WrpDamsB entity) { + LambdaUpdateWrapper wrapper=new LambdaUpdateWrapper(); + wrapper.eq(WrpDamsB::getDamscd,entity.getDamscd()); + int count=wrpDamsBMapper.update(entity,wrapper); + return count>0; + } + + @Override + public boolean delete(Wrapper wrapper) { + int count=wrpDamsBMapper.delete(wrapper); + return count>0; + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrhrdsmpServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrhrdsmpServiceImpl.java new file mode 100644 index 0000000..a8b2529 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrhrdsmpServiceImpl.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; +import com.hnac.hzims.damsafety.mapper.WrpDfrSrhrdsmpMapper; +import com.hnac.hzims.damsafety.service.IWrpDfrSrhrdsmpService; +import com.hnac.hzims.damsafety.util.DealSectionUtil; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service +public class WrpDfrSrhrdsmpServiceImpl extends BaseServiceImpl implements IWrpDfrSrhrdsmpService { + @Resource + WrpDfrSrhrdsmpMapper wrpDfrSrhrdsmpMapper; + + @Override + public List> section(String deptId,String rscd) { + List> list=wrpDfrSrhrdsmpMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } + + @Override + public List> getSection(String deptId,String rscd) { + List> list=wrpDfrSrhrdsmpMapper.section(deptId,rscd); + return list; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsbpServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsbpServiceImpl.java new file mode 100644 index 0000000..15160cc --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsbpServiceImpl.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import com.hnac.hzims.damsafety.mapper.WrpDfrSrvrdsbpMapper; +import com.hnac.hzims.damsafety.service.IWrpDfrSrvrdsbpService; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class WrpDfrSrvrdsbpServiceImpl extends BaseServiceImpl implements IWrpDfrSrvrdsbpService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsmpServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsmpServiceImpl.java new file mode 100644 index 0000000..9907aa7 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpDfrSrvrdsmpServiceImpl.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; +import com.hnac.hzims.damsafety.mapper.WrpDfrSrvrdsmpMapper; +import com.hnac.hzims.damsafety.service.IWrpDfrSrvrdsmpService; +import com.hnac.hzims.damsafety.util.DealSectionUtil; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service +public class WrpDfrSrvrdsmpServiceImpl extends BaseServiceImpl implements IWrpDfrSrvrdsmpService { + @Resource + WrpDfrSrvrdsmpMapper wrpDfrSrvrdsmpMapper; + @Override + public List> section(String deptId,String rscd) { + List> list=wrpDfrSrvrdsmpMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } + + @Override + public List> getSection(String deptId, String rscd) { + return wrpDfrSrvrdsmpMapper.section(deptId,rscd); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSectionBServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSectionBServiceImpl.java new file mode 100644 index 0000000..1d4b28b --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSectionBServiceImpl.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright Example, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * Example, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import com.hnac.hzims.damsafety.mapper.WrpSectionBMapper; +import com.hnac.hzims.damsafety.service.IWrpSectionBService; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +/** + * 服务实现类 + * @author Chill + */ +@Service +public class WrpSectionBServiceImpl extends BaseServiceImpl implements IWrpSectionBService { +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgPztbServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgPztbServiceImpl.java new file mode 100644 index 0000000..1eeca99 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgPztbServiceImpl.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; +import com.hnac.hzims.damsafety.mapper.WrpSpgPztbMapper; +import com.hnac.hzims.damsafety.service.IWrpSpgPztbService; +import com.hnac.hzims.damsafety.util.DealSectionUtil; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service +public class WrpSpgPztbServiceImpl extends BaseServiceImpl implements IWrpSpgPztbService { + + @Resource + WrpSpgPztbMapper wrpSpgPztbMapper; + + @Override + public List> section(String deptId,String rscd) { + List> list=wrpSpgPztbMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } + + @Override + public List> getSection(String deptId, String rscd) { + return wrpSpgPztbMapper.section(deptId,rscd); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpprmpServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpprmpServiceImpl.java new file mode 100644 index 0000000..c8c5a5e --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpprmpServiceImpl.java @@ -0,0 +1,32 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; +import com.hnac.hzims.damsafety.mapper.WrpSpgSpprmpMapper; +import com.hnac.hzims.damsafety.service.IWrpSpgSpprmpService; +import com.hnac.hzims.damsafety.util.DealSectionUtil; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service +public class WrpSpgSpprmpServiceImpl extends BaseServiceImpl implements IWrpSpgSpprmpService { + + @Resource + WrpSpgSpprmpMapper wrpSpgSpprmpMapper; + + @Override + public List> section(String deptId,String rscd) { + List> list=wrpSpgSpprmpMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } + + @Override + public List> getSection(String deptId, String rscd) { + return wrpSpgSpprmpMapper.section(deptId,rscd); + } + +} + diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpqnmpServiceImpl.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpqnmpServiceImpl.java new file mode 100644 index 0000000..2ee717f --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/service/impl/WrpSpgSpqnmpServiceImpl.java @@ -0,0 +1,30 @@ +package com.hnac.hzims.damsafety.service.impl; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; +import com.hnac.hzims.damsafety.mapper.WrpSpgSpqnmpMapper; +import com.hnac.hzims.damsafety.service.IWrpSpgSpqnmpService; +import com.hnac.hzims.damsafety.util.DealSectionUtil; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; +import java.util.Map; + +@Service +public class WrpSpgSpqnmpServiceImpl extends BaseServiceImpl implements IWrpSpgSpqnmpService { + @Resource + WrpSpgSpqnmpMapper wrpSpgSpqnmpMapper; + + @Override + public List> section(String deptId,String rscd) { + List> list=wrpSpgSpqnmpMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } + + @Override + public List> getSection(String deptId,String rscd) { + List> list=wrpSpgSpqnmpMapper.section(deptId,rscd); + return DealSectionUtil.getSection(list); + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/DealSectionUtil.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/DealSectionUtil.java new file mode 100644 index 0000000..c6b9dbd --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/DealSectionUtil.java @@ -0,0 +1,48 @@ +package com.hnac.hzims.damsafety.util; + +import java.util.*; + +public class DealSectionUtil { + public static String getDeviceCode(List> data){ + StringBuilder sb=new StringBuilder(); + for(Map dd:data){ + String stcd=String.valueOf(dd.get("stcd")); + if("".equals(sb.toString())){ + sb.append(stcd); + }else{ + sb.append(","+stcd); + } + } + return sb.toString(); + } + + public static List> getSection(List> list){ + List> res=new ArrayList<>(); + Map>> map = new LinkedHashMap<>(); + for(Map ll:list) { + String damcd=String.valueOf(ll.get("damcd")); + List> tmpList=map.get(damcd); + if(tmpList!=null && !tmpList.isEmpty()) { + tmpList.add(ll); + map.put(damcd, tmpList); + }else{ + tmpList = new ArrayList<>(); + tmpList.add(ll); + map.put(damcd, tmpList); + } + } + + for (Map.Entry>> m : map.entrySet()) { + List> data= m.getValue(); + Map sj=new HashMap<>(); + sj.put("damnm",data.get(0).get("damnm")); + sj.put("rscd",data.get(0).get("rscd")); + sj.put("damcd",m.getKey()); + sj.put("deviceCode",getDeviceCode(data)); + res.add(sj); + } + + return res; + } + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/ParamUtil.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/ParamUtil.java new file mode 100644 index 0000000..ef37a3d --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/util/ParamUtil.java @@ -0,0 +1,177 @@ +package com.hnac.hzims.damsafety.util; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.hnac.hzims.damsafety.entity.*; + +import java.util.Map; + +public class ParamUtil { + public static LambdaQueryWrapper conditionWrpSectionB(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("rscd")!=null) { + wrapper.like(WrpSectionB::getRscd,param.get("rscd")); + } + if(param.get("buildingId")!=null) { + wrapper.eq(WrpSectionB::getBuildingId,param.get("buildingId")); + } + if(param.get("damcd")!=null) { + wrapper.like(WrpSectionB::getDamcd,param.get("damcd")); + } + + if(param.get("damnm")!=null) { + wrapper.like(WrpSectionB::getDamnm,param.get("damnm")); + } + + + if(param.get("wallType")!=null) { + wrapper.eq(WrpSectionB::getWallType,param.get("wallType")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionTBuilding(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("rscd")!=null) { + wrapper.like(TBuilding::getRscd,param.get("rscd")); + } + if(param.get("name")!=null) { + wrapper.like(TBuilding::getName,param.get("name")); + } + return wrapper; + } + + + public static LambdaQueryWrapper conditionTProjInfo(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("rscd")!=null) { + wrapper.like(TProjInfo::getRscd,param.get("rscd")); + } + if(param.get("projName")!=null) { + wrapper.like(TProjInfo::getProjName,param.get("projName")); + } + if(param.get("projCode")!=null) { + wrapper.like(TProjInfo::getProjCode,param.get("projCode")); + } + return wrapper; + } + + + public static LambdaQueryWrapper conditionTSectionConfig(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("stcd")!=null) { + wrapper.like(TSectionConfig::getStcd,param.get("stcd")); + } + if(param.get("sectionNo")!=null) { + wrapper.like(TSectionConfig::getSectionNo,param.get("sectionNo")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionWrpDamsB(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpDamsB::getDamcd,param.get("damcd")); + } + if(param.get("damscd")!=null) { + wrapper.like(WrpDamsB::getDamscd,param.get("damscd")); + } + if(param.get("damsnm")!=null) { + wrapper.like(WrpDamsB::getDamscd,param.get("damsnm")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionWrpDfrSrhrdsmp(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpDfrSrhrdsmp::getDamcd,param.get("damcd")); + } + if(param.get("stcd")!=null) { + wrapper.like(WrpDfrSrhrdsmp::getStcd,param.get("stcd")); + } + if(param.get("mpcd")!=null) { + wrapper.like(WrpDfrSrhrdsmp::getMpcd,param.get("mpcd")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionWrpDfrSrvrdsbp(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("rscd")!=null) { + wrapper.like(WrpDfrSrvrdsbp::getRscd,param.get("rscd")); + } + if(param.get("hycncd")!=null) { + wrapper.eq(WrpDfrSrvrdsbp::getHycncd,param.get("hycncd")); + } + if(param.get("bpcd")!=null) { + wrapper.like(WrpDfrSrvrdsbp::getBpcd,param.get("bpcd")); + } + if(param.get("bptp")!=null) { + wrapper.like(WrpDfrSrvrdsbp::getBptp,param.get("bptp")); + } + return wrapper; + } + + + public static LambdaQueryWrapper conditionWrpDfrSrvrdsmp(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpDfrSrvrdsmp::getDamcd,param.get("damcd")); + } + if(param.get("stcd")!=null) { + wrapper.like(WrpDfrSrvrdsmp::getStcd,param.get("stcd")); + } + if(param.get("mpcd")!=null) { + wrapper.like(WrpDfrSrvrdsmp::getMpcd,param.get("mpcd")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionWrpSpgPztb(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpSpgPztb::getDamcd,param.get("damcd")); + } + if(param.get("stcd")!=null) { + wrapper.like(WrpSpgPztb::getStcd,param.get("stcd")); + } + if(param.get("mpcd")!=null) { + wrapper.like(WrpSpgPztb::getMpcd,param.get("mpcd")); + } + return wrapper; + } + + public static LambdaQueryWrapper conditionWrpSpgSpprmp(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpSpgSpprmp::getDamcd,param.get("damcd")); + } + if(param.get("stcd")!=null) { + wrapper.like(WrpSpgSpprmp::getStcd,param.get("stcd")); + } + if(param.get("mpcd")!=null) { + wrapper.like(WrpSpgSpprmp::getMpcd,param.get("mpcd")); + } + if(param.get("ch")!=null) { + wrapper.like(WrpSpgSpprmp::getCh,param.get("ch")); + } + return wrapper; + } + + + public static LambdaQueryWrapper conditionWrpSpgSpqnmp(Map param){ + LambdaQueryWrapper wrapper=new LambdaQueryWrapper(); + if(param.get("damcd")!=null) { + wrapper.like(WrpSpgSpqnmp::getDamcd,param.get("damcd")); + } + if(param.get("stcd")!=null) { + wrapper.like(WrpSpgSpqnmp::getStcd,param.get("stcd")); + } + if(param.get("mpcd")!=null) { + wrapper.like(WrpSpgSpqnmp::getMpcd,param.get("mpcd")); + } + return wrapper; + } + + +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TBuildingWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TBuildingWrapper.java new file mode 100644 index 0000000..fa206c6 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TBuildingWrapper.java @@ -0,0 +1,24 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.TBuilding; +import com.hnac.hzims.damsafety.vo.TBuildingVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + + +import java.util.Objects; + +public class TBuildingWrapper extends BaseEntityWrapper { + public TBuildingWrapper() { + } + + public static TBuildingWrapper build() { + return new TBuildingWrapper(); + } + + @Override + public TBuildingVo entityVO(TBuilding entity) { + TBuildingVo tBuildingVo = Objects.requireNonNull(BeanUtil.copy(entity, TBuildingVo.class)); + return tBuildingVo; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TProjInfoWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TProjInfoWrapper.java new file mode 100644 index 0000000..42e50c8 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/TProjInfoWrapper.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.TProjInfo; +import com.hnac.hzims.damsafety.vo.TProjInfoVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class TProjInfoWrapper extends BaseEntityWrapper { + public TProjInfoWrapper() { + } + + public static TProjInfoWrapper build() { + return new TProjInfoWrapper(); + } + + @Override + public TProjInfoVo entityVO(TProjInfo entity) { + if(entity == null){ + return null; + } + TProjInfoVo tProjInfoVo = Objects.requireNonNull(BeanUtil.copy(entity, TProjInfoVo.class)); + return tProjInfoVo; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrhrdsmpWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrhrdsmpWrapper.java new file mode 100644 index 0000000..d506247 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrhrdsmpWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrhrdsmp; +import com.hnac.hzims.damsafety.vo.WrpDfrSrhrdsmpVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpDfrSrhrdsmpWrapper extends BaseEntityWrapper { + public WrpDfrSrhrdsmpWrapper() { + } + + public static WrpDfrSrhrdsmpWrapper build() { + return new WrpDfrSrhrdsmpWrapper(); + } + + @Override + public WrpDfrSrhrdsmpVo entityVO(WrpDfrSrhrdsmp entity) { + if(entity == null){ + return null; + } + WrpDfrSrhrdsmpVo wrpDfrSrhrdsmpVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpDfrSrhrdsmpVo.class)); + + return wrpDfrSrhrdsmpVo; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsbpWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsbpWrapper.java new file mode 100644 index 0000000..b1f5417 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsbpWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsbp; +import com.hnac.hzims.damsafety.vo.WrpDfrSrvrdsbpVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpDfrSrvrdsbpWrapper extends BaseEntityWrapper { + public WrpDfrSrvrdsbpWrapper() { + } + + public static WrpDfrSrvrdsbpWrapper build() { + return new WrpDfrSrvrdsbpWrapper(); + } + + @Override + public WrpDfrSrvrdsbpVo entityVO(WrpDfrSrvrdsbp entity) { + if(entity == null){ + return null; + } + WrpDfrSrvrdsbpVo wrpDfrSrvrdsbpVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpDfrSrvrdsbpVo.class)); + + return wrpDfrSrvrdsbpVo; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsmpWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsmpWrapper.java new file mode 100644 index 0000000..5e47e27 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpDfrSrvrdsmpWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpDfrSrvrdsmp; +import com.hnac.hzims.damsafety.vo.WrpDfrSrvrdsmpVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpDfrSrvrdsmpWrapper extends BaseEntityWrapper { + public WrpDfrSrvrdsmpWrapper() { + } + + public static WrpDfrSrvrdsmpWrapper build() { + return new WrpDfrSrvrdsmpWrapper(); + } + + @Override + public WrpDfrSrvrdsmpVo entityVO(WrpDfrSrvrdsmp entity) { + if(entity == null){ + return null; + } + WrpDfrSrvrdsmpVo wrpDfrSrvrdsmpVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpDfrSrvrdsmpVo.class)); + + return wrpDfrSrvrdsmpVo; + } +} \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSectionBWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSectionBWrapper.java new file mode 100644 index 0000000..77cabaa --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSectionBWrapper.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpSectionB; +import com.hnac.hzims.damsafety.vo.WrpSectionBVO; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpSectionBWrapper extends BaseEntityWrapper { + public WrpSectionBWrapper() { + } + + public static WrpSectionBWrapper build() { + return new WrpSectionBWrapper(); + } + + @Override + public WrpSectionBVO entityVO(WrpSectionB entity) { + if(entity == null){ + return null; + } + WrpSectionBVO wrpSectionBVO = Objects.requireNonNull(BeanUtil.copy(entity, WrpSectionBVO.class)); + //测点集合 + wrpSectionBVO.setPoints(null); + return wrpSectionBVO; + } +} diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgPztbWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgPztbWrapper.java new file mode 100644 index 0000000..91e13ea --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgPztbWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgPztb; +import com.hnac.hzims.damsafety.vo.WrpSpgPztbVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpSpgPztbWrapper extends BaseEntityWrapper { + public WrpSpgPztbWrapper() { + } + + public static WrpSpgPztbWrapper build() { + return new WrpSpgPztbWrapper(); + } + + @Override + public WrpSpgPztbVo entityVO(WrpSpgPztb entity) { + if(entity == null){ + return null; + } + WrpSpgPztbVo wrpSpgPztbVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpSpgPztbVo.class)); + + return wrpSpgPztbVo; + } +} \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpprmpWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpprmpWrapper.java new file mode 100644 index 0000000..f34f6f8 --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpprmpWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpprmp; +import com.hnac.hzims.damsafety.vo.WrpSpgSpprmpVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpSpgSpprmpWrapper extends BaseEntityWrapper { + public WrpSpgSpprmpWrapper() { + } + + public static WrpSpgSpprmpWrapper build() { + return new WrpSpgSpprmpWrapper(); + } + + @Override + public WrpSpgSpprmpVo entityVO(WrpSpgSpprmp entity) { + if(entity == null){ + return null; + } + WrpSpgSpprmpVo wrpSpgSpprmpVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpSpgSpprmpVo.class)); + + return wrpSpgSpprmpVo; + } +} \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpqnmpWrapper.java b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpqnmpWrapper.java new file mode 100644 index 0000000..bbac35c --- /dev/null +++ b/hzims-service/dam-safety/src/main/java/com/hnac/hzims/damsafety/wrapper/WrpSpgSpqnmpWrapper.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.damsafety.wrapper; + +import com.hnac.hzims.damsafety.entity.WrpSpgSpqnmp; +import com.hnac.hzims.damsafety.vo.WrpSpgSpqnmpVo; +import org.springblade.core.mp.support.BaseEntityWrapper; +import org.springblade.core.tool.utils.BeanUtil; + +import java.util.Objects; + +public class WrpSpgSpqnmpWrapper extends BaseEntityWrapper { + public WrpSpgSpqnmpWrapper() { + } + + public static WrpSpgSpqnmpWrapper build() { + return new WrpSpgSpqnmpWrapper(); + } + + @Override + public WrpSpgSpqnmpVo entityVO(WrpSpgSpqnmp entity) { + if(entity == null){ + return null; + } + WrpSpgSpqnmpVo wrpSpgSpqnmpVo = Objects.requireNonNull(BeanUtil.copy(entity, WrpSpgSpqnmpVo.class)); + + return wrpSpgSpqnmpVo; + } +} \ No newline at end of file diff --git a/hzims-service/dam-safety/src/main/resources/application-dev.yml b/hzims-service/dam-safety/src/main/resources/application-dev.yml new file mode 100644 index 0000000..50a4ea7 --- /dev/null +++ b/hzims-service/dam-safety/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 diff --git a/hzims-service/dam-safety/src/main/resources/application-prod.yml b/hzims-service/dam-safety/src/main/resources/application-prod.yml new file mode 100644 index 0000000..da89262 --- /dev/null +++ b/hzims-service/dam-safety/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} diff --git a/hzims-service/dam-safety/src/main/resources/application.yml b/hzims-service/dam-safety/src/main/resources/application.yml new file mode 100644 index 0000000..0952a13 --- /dev/null +++ b/hzims-service/dam-safety/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 + + diff --git a/hzims-service/digital-twin-display/pom.xml b/hzims-service/digital-twin-display/pom.xml new file mode 100644 index 0000000..af85fc2 --- /dev/null +++ b/hzims-service/digital-twin-display/pom.xml @@ -0,0 +1,86 @@ + + + 4.0.0 + + com.hnac.hzims + hzims-service + 4.0.0-SNAPSHOT + + + digital-twin-display + jar + ${hzims.project.version} + + + 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 + digital-twin-display-api + ${hzims.project.version} + + + + com.hnac.hzinfo.data + hzinfo-data-sdk + + + + com.hnac.hzims + weather-api + ${hzims.project.version} + + + + com.hnac.hzims + dam-safety-api + ${hzims.project.version} + + + + com.hnac.hzims + inspect-api + + + + com.hnac.hzims + hzims-operational-api + + + \ No newline at end of file diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java new file mode 100644 index 0000000..ad3bcd6 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/DigitalTwinDisplayApplication.java @@ -0,0 +1,44 @@ +package com.hnac.hzims.twindisplay; + +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; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 8:24 + */ +//数据孪生展示服务 +@EnableBladeFeign(basePackages = {"org.springblade","com.hnac"}) +@SpringCloudApplication +@MapperScan("com.hnac.hzims.**.mapper.**") +@EnableScheduling +@ComponentScan(basePackages = {"com.hnac.hzims.*"}) +public class DigitalTwinDisplayApplication extends SpringBootServletInitializer { + public final static String APP_NAME = "digital-twin-display"; + + static { + System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.config.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.username", "nacos"); + System.setProperty("spring.cloud.nacos.password", "nacos"); + } + + + public static void main(String[] args) { +// System.setProperty("nacos.standalone", "true"); + BladeApplication.run(APP_NAME, DigitalTwinDisplayApplication.class, args); + } + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + return BladeApplication.createSpringApplicationBuilder(builder, APP_NAME, DigitalTwinDisplayApplication.class); + } +} \ No newline at end of file diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/BaseInfoController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/BaseInfoController.java new file mode 100644 index 0000000..e5893f6 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/BaseInfoController.java @@ -0,0 +1,79 @@ +package com.hnac.hzims.twindisplay.controller; + +import com.hnac.hzims.hzimsweather.vo.RainFallCountByMonthVo; +import com.hnac.hzims.twindisplay.service.IDigitalBaseInfoService; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +@Api(description = "数字孪生水电站一张图系统基本信息控制器") +@RequestMapping(value = "/digital/baseInfo/") +public class BaseInfoController { + + @Autowired + private IDigitalBaseInfoService digitalBaseInfoService; + + @ApiOperation(notes = "获取当前日期信息", value = "获取当前日期信息") + @RequestMapping(value = "/getDateInfo", method = RequestMethod.GET) + @ResponseBody + public Map getDateInfo(String areaCode) { + return digitalBaseInfoService.getDateInfo(); + } + + @ApiOperation(notes = "获取气象信息", value = "获取气象信息") + @RequestMapping(value = "/getWeatherInfo", method = RequestMethod.GET) + @ResponseBody + public Map getWeatherInfo(String location) { + Map result = new HashMap<>(1); + result.put(location, digitalBaseInfoService.getWeatherInfo(location)); + return result; + } + + @ApiOperation(notes = "获取水位信息", value = "获取水位信息") + @RequestMapping(value = "/getWaterLevel", method = RequestMethod.GET) + @ResponseBody + public double getWaterLevel(String instanceCode, String signage) { + return digitalBaseInfoService.getWaterLevel(instanceCode, signage); + } + + @ApiOperation(notes = "获取设备实时信息接口", value = "获取设备实时信息接口") + @RequestMapping(value = "/getRealData", method = RequestMethod.GET) + public Map getRealData(String deviceCode){ + Map result = new HashMap<>(); + List data = digitalBaseInfoService.getRealData(deviceCode); + result.put(deviceCode, data); + return result; + } + + @ApiOperation(notes = "获取降雨量信息", value = "获取降雨量信息") + @RequestMapping(value = "/getRainFallInfo", method = RequestMethod.GET) + @ResponseBody + public Map> getRainFallInfo(String year,String location) { + return digitalBaseInfoService.getRainFallInfo(year,location); + } + + @ApiOperation(notes = "获取电站发电运行信息", value = "获取电站发电运行信息") + @RequestMapping(value = "/getPowerStationHisInfo", method = RequestMethod.GET) + public Map getPowerStationHisInfo(String deviceCode){ + //有功功率属性名 + String activePower = "activePower"; + //无功功率属性名 + String reactivePower = "reactivePower"; + //发电量 + String power = "power"; + Map data = digitalBaseInfoService.getPowerStationHisInfo(deviceCode,activePower,reactivePower,power); + + return data; + } +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java new file mode 100644 index 0000000..0e05da3 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/RouteController.java @@ -0,0 +1,88 @@ +package com.hnac.hzims.twindisplay.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.twindisplay.service.RouteService; +import com.hnac.hzinfo.inspect.plan.entity.RouteEntity; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Map; + +/** + * 三维巡检 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 9:24 + */ +@Slf4j +@RestController +@RequestMapping("/route") +public class RouteController { + + + @Autowired + private RouteService routeService; + + + /** + * 查询巡检路径管理列表 + * + * @param st_re_route + * @param query + * @return + */ + @GetMapping("/list") + public R listRoute(@ApiIgnore @RequestParam Map st_re_route, Query query) { + BladePage pages = routeService.listRoute(st_re_route, query); + return R.data(pages); + + } + + + /** + * 新增 代码自定义代号 + */ + @PostMapping("/save") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "新增", notes = "传入st_re_route") + public R save(@RequestBody RouteEntity st_re_route) { + routeService.save(st_re_route); + return R.success("保存成功"); + } + + + /** + * 修改 代码自定义代号 + */ + @PostMapping("/update") + @ApiOperationSupport(order = 5) + @ApiOperation(value = "修改", notes = "传入st_re_route") + public R update(@RequestBody RouteEntity st_re_route) { + routeService.update(st_re_route); + return R.success("修改成功"); + } + + + /** + * 删除 代码自定义代号 + */ + @PostMapping("/remove") + @ApiOperationSupport(order = 7) + @ApiOperation(value = "逻辑删除", notes = "传入ids") + public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { + routeService.remove(ids); + return R.success("删除成功"); + } + + +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java new file mode 100644 index 0000000..4023b80 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/StatisticsController.java @@ -0,0 +1,64 @@ +package com.hnac.hzims.twindisplay.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.common.logs.annotation.OperationAnnotation; +import com.hnac.hzims.common.logs.enums.BusinessType; +import com.hnac.hzims.common.logs.enums.OperatorType; + +import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import com.hnac.hzims.twindisplay.service.StatisticsService; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 15:27 + */ +@RestController +@AllArgsConstructor +@RequestMapping("/defect_statistic") +public class StatisticsController { + + + @Autowired + private StatisticsService statisticsService; + + + + @GetMapping("/list") + @ApiOperation(value = "分页", notes = "传入statistics") + @ApiImplicitParams({ + }) + @OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action + = "分页查询缺陷记录列表") + public R> list(@SpringQueryMap OperDefectStatisticsVO entity){ + + BladePage resultPage = statisticsService.list(entity); + return R.data(resultPage); + + } + + + + /** + * 巡检任务统计 + * @return + */ + @GetMapping("/defectStatistictCount") + public R defectStatistictCount(){ + + List statistictCountVos = statisticsService.defectStatistictCount(); + return R.data(statistictCountVos); + } +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java new file mode 100644 index 0000000..81c4dde --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/controller/TaskController.java @@ -0,0 +1,128 @@ +package com.hnac.hzims.twindisplay.controller; + +import com.hnac.hzims.twindisplay.service.TaskService; +import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; +import com.hnac.hzinfo.inspect.task.entity.TaskEntity; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cloud.openfeign.SpringQueryMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 13:45 + */ +@Slf4j +@RestController +@RequestMapping("/task") +public class TaskController { + + + @Autowired + private TaskService taskService; + + + /** + * 巡检任务分页 + */ + @GetMapping("/pageList/{page}/{size}") + @ApiOperation(value = "分页显示任务列表", notes = "传入task") + public R> pageList( + @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page, + @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size, + @SpringQueryMap TaskListQuery task) { + + BladePage result = taskService.pageList(page, size, task); + return R.data(result); + + } + + + // /** + // * 获取巡检情况列表信息 + // */ + // @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) + // @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId") + // public R> list(Long taskId, Query query, + // BladeUser bladeUser) { + // BladePage result = taskService.list(taskId, query, bladeUser); + // return R.data(result); + // + // } + + + /** + * 查看 + * + * @param id + * @return + */ + @GetMapping(value = "/detail") + @ApiOperation(value = "查看,下面列表再调用eventController.list", notes = "传入taskid") + public R detail(@RequestParam Long id) { + TaskEntity task = taskService.detail(id); + return R.data(task); + } + + + /** + * 任务查看弹窗下面的列表 + * + * @param taskId + * @param query + * @param bladeUser + * @return + */ + @GetMapping(value = "/event/list") + @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId") + public R> eventList(Long taskId, Query query, + BladeUser bladeUser) { + + BladePage bladePage = taskService.eventList(taskId, query, bladeUser); + return R.data(bladePage); + } + + + /** + * 获取任务详情 + */ + @RequestMapping(value = "/getTaskById", method = {RequestMethod.GET, RequestMethod.POST}) + @ApiOperation(value = "获取任务详情", notes = "传入taskId") + public R> getTaskById(@RequestParam Long id) { + List taskObjectVOS = taskService.getTaskById(id); + return R.data(taskObjectVOS); + } + + + + + /** + * 巡检计划统计 + */ + @GetMapping("/getTaskListStatistics") + @ApiOperation(value = "巡检计划统计", notes = "传入计划id") + public R> getTaskListStatistics(@RequestParam String startTime, @RequestParam String endTime, + @RequestParam Long deptId){ + List taskObjectVOS = taskService.getTaskListStatistics(startTime,endTime,deptId); + return R.data(taskObjectVOS); + + } +} + + + + diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/IDigitalBaseInfoService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/IDigitalBaseInfoService.java new file mode 100644 index 0000000..514c751 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/IDigitalBaseInfoService.java @@ -0,0 +1,57 @@ +package com.hnac.hzims.twindisplay.service; + +import com.hnac.hzims.hzimsweather.response.weather.HeWeatherWeatherNowResponse; +import com.hnac.hzims.hzimsweather.vo.RainFallCountByMonthVo; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; + +import java.util.List; +import java.util.Map; + +public interface IDigitalBaseInfoService { + + /** + * 获取日期时间信息 + * @return + */ + Map getDateInfo(); + + /** + * 获取气象信息 + * @param location + * @return + */ + HeWeatherWeatherNowResponse getWeatherInfo(String location); + + /** + * 获取水位信息 + * @param instanceCode + * @param signage + * @return + */ + double getWaterLevel(String instanceCode, String signage); + + /** + * 获取设备信息 + * @param deviceCode + * @return + */ + List getRealData(String deviceCode); + + /** + * 获取地区降雨量信息 + * @param year + * @param location + * @return + */ + Map> getRainFallInfo(String year, String location); + + /** + * 获取电站发电运行信息 + * @param deviceCode + * @param activePower + * @param reactivePower + * @param power + * @return + */ + Map getPowerStationHisInfo(String deviceCode, String activePower, String reactivePower, String power); +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java new file mode 100644 index 0000000..5abf64f --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/RouteService.java @@ -0,0 +1,44 @@ +package com.hnac.hzims.twindisplay.service; + +import com.hnac.hzinfo.inspect.plan.entity.RouteEntity; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; + +import java.util.Map; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 10:12 + */ +public interface RouteService { + + /** + * 查询巡检路径管理列表 + * @param stReRoute + * @param query + * @return + */ + BladePage listRoute(Map stReRoute, Query query); + + /** + * 新增 + * @param stReRoute + */ + void save(RouteEntity stReRoute); + + + /** + * 修改 + * @param stReRoute + */ + void update(RouteEntity stReRoute); + + + /** + * 删除 + * @param ids + */ + void remove(String ids); +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java new file mode 100644 index 0000000..2e856f1 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/StatisticsService.java @@ -0,0 +1,32 @@ +package com.hnac.hzims.twindisplay.service; + +import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import org.springblade.core.mp.support.BladePage; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 15:28 + */ +public interface StatisticsService { + + + /** + * 缺陷管理 + * @param entity + * @return + */ + BladePage list(OperDefectStatisticsVO entity); + + + /** + * 巡检任务统计 + * @return + */ + List defectStatistictCount(); + +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java new file mode 100644 index 0000000..34f40ee --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/TaskService.java @@ -0,0 +1,78 @@ +package com.hnac.hzims.twindisplay.service; + +import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; +import com.hnac.hzinfo.inspect.task.entity.TaskEntity; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.BladeUser; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 13:49 + */ +public interface TaskService { + + + /** + * 巡检任务分页 + * @param page + * @param size + * @param task + * @return + */ + BladePage pageList(Long page, Long size, TaskListQuery task); + + // + // /** + // * 获取巡检情况列表信息 + // * @param taskId + // * @param query + // * @param bladeUser + // * @return + // */ + // BladePage list(Long taskId, Query query, BladeUser bladeUser); + + + /** + * 根据id获取检修任务 + * @param id + * @return + */ + TaskEntity detail(Long id); + + + /** + * 任务查看弹窗下面的列表 + * @param taskId + * @param query + * @param bladeUser + * @return + */ + BladePage eventList(Long taskId, Query query, BladeUser bladeUser); + + + /** + * 获取任务详情 + * @param id + * @return + */ + List getTaskById(Long id); + + + /** + * 巡检计划统计 + * @param startTime + * @param endTime + * @param deptId + * @return + */ + List getTaskListStatistics(String startTime, String endTime, Long deptId); +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/DigitalBaseInfoServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/DigitalBaseInfoServiceImpl.java new file mode 100644 index 0000000..db70c87 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/DigitalBaseInfoServiceImpl.java @@ -0,0 +1,203 @@ +package com.hnac.hzims.twindisplay.service.impl; + +import com.hnac.hzims.damsafety.feign.IWrpSectionBClient; +import com.hnac.hzims.hzimsweather.feign.IHeWeatherWeatherClient; +import com.hnac.hzims.hzimsweather.response.weather.HeWeatherWeatherNowResponse; +import com.hnac.hzims.hzimsweather.vo.RainFallCountByMonthVo; +import com.hnac.hzims.twindisplay.service.IDigitalBaseInfoService; +import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; +import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; +import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO; +import com.hnac.hzinfo.datasearch.analyse.po.AnalyzeDataConditionPO; +import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeDataConditionVO; +import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; +import com.hnac.hzinfo.sdk.analyse.AnalyseDataSearchClient; +import com.hnac.hzinfo.sdk.core.response.Result; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.*; + +@Service +@RequiredArgsConstructor +public class DigitalBaseInfoServiceImpl implements IDigitalBaseInfoService { + + private final IHeWeatherWeatherClient heWeatherWeatherClient; + + private final IAnalyseDataSearchClient ianalyseDataSearchClient; + + private final IWrpSectionBClient wrpSectionBClient; + + private final AnalyseDataSearchClient analyseDataSearchClient; + + @Override + public Map getDateInfo() { + Map info = new HashMap<>(3); + Date now = new Date(); + SimpleDateFormat dateFm1 = new SimpleDateFormat("EEEE"); + SimpleDateFormat dateFm2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + //获取当前日期是星期几,中文展示 e.g. 星期二 + String week = dateFm1.format(now); + String dateTime = dateFm2.format(now); + String[] s = dateTime.split(" "); + info.put("date", s[0]); + info.put("time", s[1]); + info.put("week", week); + return info; + } + + @Override + public HeWeatherWeatherNowResponse getWeatherInfo(String location) { + if(StringUtil.isEmpty(location)){ + return null; + } + // 天气feign接口查询实时天气 + R result = heWeatherWeatherClient.getWeatherNowWithCache(location); + if(!result.isSuccess() || ObjectUtil.isEmpty(result)){ + return null; + } + return result.getData(); + } + + @Override + public double getWaterLevel(String instanceCode, String signage) { + + RealDataSearchPO realData = new RealDataSearchPO(); + realData.setAnalyzeCode(instanceCode); + List signages = Collections.singletonList(signage); + realData.setSignages(signages); + // 调用fegin接口查询实时数据 + R> R = ianalyseDataSearchClient.getRealDataByAnalyzeCode(realData); + if(!R.isSuccess() || CollectionUtil.isEmpty(R.getData())){ + return 0.0; + } + // 时间限制 + String time = R.getData().get(0).getTime(); + if(StringUtil.isEmpty(time) || "-".equals(time)){ + return 0.0; + } + Date date = DateUtil.parse(time, "yyyy-MM-dd HH:mm:ss.sss"); + if(System.currentTimeMillis() - date.getTime() > 30 * 60 * 1000L){ + return 0.0; + } + return Double.parseDouble(R.getData().get(0).getValue()); + } + + @Override + public List getRealData(String deviceCode) { + R> realData = wrpSectionBClient.getRealData(deviceCode); + if(!realData.isSuccess() || CollectionUtil.isEmpty(realData.getData())){ + return null; + } + return realData.getData(); + } + + @Override + public Map> getRainFallInfo(String year, String location) { + R>> result = heWeatherWeatherClient.getRainFallMonthCount(year, location); + if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ + return null; + } + return result.getData(); + } + + @Override + public Map getPowerStationHisInfo(String deviceCode, String activePower, String reactivePower, String power) { + R> realData = wrpSectionBClient.getRealData(deviceCode); + + Map result = new HashMap<>(); + if(realData.isSuccess() && CollectionUtil.isNotEmpty(realData.getData())){ + List datas = realData.getData(); + datas.stream().forEach(data -> { + if (activePower.equals(data.getSignage())) { + //有功功率 + result.put(activePower, data.getValue()); + } + if (reactivePower.equals(data.getSignage())) { + //无功功率 + result.put(reactivePower, data.getValue()); + } + }); + } + + //当前年的第一天 2023-1-1 + LocalDate year = LocalDate.now().withDayOfYear(1); + //当前月的第一天 2023-8-1 + LocalDate month = LocalDate.now().withDayOfMonth(1); + //当天 2023-8-29 + LocalDate day = LocalDate.now(); + LocalTime startTime = LocalTime.MIN; + + + LocalDateTime end = LocalDateTime.now(); + + //年累计 + LocalDateTime start = LocalDateTime.of(year, startTime); + AnalyseCodeByAnalyseDataPO poForYear = getPowerByParam(deviceCode, start, end, 4, 6, 1); + Result> listForYear = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(poForYear); + + //月累计 + start = LocalDateTime.of(month, startTime); + AnalyseCodeByAnalyseDataPO poForMonth = getPowerByParam(deviceCode, start, end, 4, 5, 1); + Result> listForMonth = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(poForMonth); + + //日累计 + start = LocalDateTime.of(day, startTime); + AnalyseCodeByAnalyseDataPO poForDay = getPowerByParam(deviceCode, start, end, 4, 4, 1); + Result> listForDay = analyseDataSearchClient.getAnalyzeDataByAnalyzeCodeAndSignages(poForDay); + + //日发电计划完成率 + result.put("dayPowerRate",null); + //月发电计划完成率 + result.put("monthPowerRate",null); + //日累计发电量 + result.put("dayPowerSum",null); + //月累计发电量 + result.put("monthPowerSum",null); + //年累计发电量 + result.put("yearPowerSum",null); + return result; + } + + /** + * 根据入参查询设备信息 + * @param deviceCode 设备编号 + * @param start 开始时间 + * @param end 结束时间 + * @param accessRules 取数规则0=最早值、1=最大值、2=最小值、3=平均值、4=(累计值/和值)、5=(变化值/差值) 6=最新值 + * @param saveTimeType 周期类型: 0-> s(秒) 1->m(分) 2->h(小时) 3->d(天) 4->w(周) 5->n(自然月) 6->y(自然年) + * @param timeInterval 间隔时间 + * @return + */ + public AnalyseCodeByAnalyseDataPO getPowerByParam(String deviceCode, LocalDateTime start, LocalDateTime end, + Integer accessRules, Integer saveTimeType, Integer timeInterval) { + AnalyseCodeByAnalyseDataPO po = new AnalyseCodeByAnalyseDataPO(); + po.setDeviceCode(deviceCode); + + List signboardConditions = new ArrayList<>(); + AnalyzeDataConditionPO conditionPO = new AnalyzeDataConditionPO(); + + conditionPO.setBeginTime(start); + conditionPO.setEndTime(end); + conditionPO.setSignages(deviceCode); +// conditionPO.setKeepFigures(3); + conditionPO.setAccessRules(accessRules); + conditionPO.setSaveTimeType(saveTimeType); + conditionPO.setTimeInterval(timeInterval); + conditionPO.setFull(1); + signboardConditions.add(conditionPO); + po.setSignboardConditions(signboardConditions); + return po; + } + + +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java new file mode 100644 index 0000000..71aff48 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/RouteServiceImpl.java @@ -0,0 +1,82 @@ +package com.hnac.hzims.twindisplay.service.impl; + +import com.hnac.hzims.twindisplay.service.RouteService; +import com.hnac.hzinfo.inspect.plan.entity.RouteEntity; +import com.hnac.hzinfo.inspect.threedimensional.fegin.RouteFeignClient; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 10:12 + */ +@Slf4j +@Service("RouteServiceImpl") +public class RouteServiceImpl implements RouteService { + + + @Autowired + private RouteFeignClient routeFeignClient; + + /** + * 查询巡检路径管理列表 + * + * @param stReRoute + * @param query + * @return + */ + @Override + public BladePage listRoute(Map stReRoute, Query query) { + R> list = routeFeignClient.list(stReRoute, query); + if (list.isSuccess()) { + return list.getData(); + } + log.error("RouteFeignClient 调用错误"); + return null; + } + + /** + * 新增 + * + * @param stReRoute + */ + @Override + public void save(RouteEntity stReRoute) { + R save = routeFeignClient.save(stReRoute); + if (!save.isSuccess()) { + throw new ServiceException("保存失败"); + } + } + + /** + * 修改 + * + * @param stReRoute + */ + @Override + public void update(RouteEntity stReRoute) { + R update = routeFeignClient.update(stReRoute); + if (!update.isSuccess()) { + throw new ServiceException("数据不存在"); + } + } + + /** + * 删除 + * + * @param ids + */ + @Override + public void remove(String ids) { + + } +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java new file mode 100644 index 0000000..fbb3cc8 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/StatisticsServiceImpl.java @@ -0,0 +1,56 @@ +package com.hnac.hzims.twindisplay.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.operational.defect.feign.StatisticsFeignClient; +import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import com.hnac.hzims.twindisplay.service.StatisticsService; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 15:30 + */ +@Service +public class StatisticsServiceImpl implements StatisticsService { + + @Autowired + private StatisticsFeignClient statisticsFeignClient; + + /** + * 缺陷管理 + * + * @param entity + * @return + */ + @Override + public BladePage list(OperDefectStatisticsVO entity) { + R> list = statisticsFeignClient.list(entity); + if (list.isSuccess()) { + return list.getData(); + } + return null; + } + + /** + * 巡检任务统计 + * + * @return + */ + @Override + public List defectStatistictCount() { + + R> r = statisticsFeignClient.defectStatistictCount(); + if (r.isSuccess()) { + return r.getData(); + } + return null; + } +} diff --git a/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java new file mode 100644 index 0000000..ab88bc4 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/java/com/hnac/hzims/twindisplay/service/impl/TaskServiceImpl.java @@ -0,0 +1,135 @@ +package com.hnac.hzims.twindisplay.service.impl; + +import com.hnac.hzims.twindisplay.service.TaskService; +import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.inspect.areamonthly.feign.TaskFeignClient; +import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskListQuery; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskVo; +import com.hnac.hzinfo.inspect.task.entity.TaskEntity; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.support.BladePage; +import org.springblade.core.mp.support.Query; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/25 13:50 + */ +@Slf4j +@Service +public class TaskServiceImpl implements TaskService { + + + @Autowired + @Lazy + private TaskFeignClient taskFeignClient; + + /** + * 巡检任务分页 + * + * @param page + * @param size + * @param task + * @return + */ + @Override + public BladePage pageList(Long page, Long size, TaskListQuery task) { + R> pagedList = taskFeignClient.pageList(page, size, task); + if (pagedList.isSuccess()) { + return pagedList.getData(); + } + log.error("巡检任务调用失败"); + return null; + } + + // /** + // * 获取巡检情况列表信息 + // * + // * @param taskId + // * @param query + // * @param bladeUser + // * @return + // */ + // @Override + // public BladePage list(Long taskId, Query query, BladeUser bladeUser) { + // R> bladePageR = taskFeignClient.list(taskId, query, bladeUser); + // if (bladePageR.isSuccess()) { + // return bladePageR.getData(); + // } + // return null; + // } + + /** + * 根据id获取检修任务 + * + * @param id + * @return + */ + @Override + public TaskEntity detail(Long id) { + R detail = taskFeignClient.detail(id); + if (detail.isSuccess()) { + return detail.getData(); + } + return null; + } + + /** + * 任务查看弹窗下面的列表 + * + * @param taskId + * @param query + * @param bladeUser + * @return + */ + @Override + public BladePage eventList(Long taskId, Query query, BladeUser bladeUser) { + R> eventList = taskFeignClient.eventList(taskId, query, bladeUser); + if (eventList.isSuccess()) { + return eventList.getData(); + } + return null; + } + + /** + * 获取任务详情 + * + * @param id + * @return + */ + @Override + public List getTaskById(Long id) { + R> taskById = taskFeignClient.getTaskById(id); + if (taskById.isSuccess()) { + return taskById.getData(); + } + return null; + } + + /** + * 巡检计划统计 + * + * @param startTime + * @param endTime + * @param deptId + * @return + */ + @Override + public List getTaskListStatistics(String startTime, String endTime, Long deptId) { + R> taskListStatistics = taskFeignClient.getTaskListStatistics(startTime, endTime, deptId); + if (taskListStatistics.isSuccess()) { + return taskListStatistics.getData(); + } + return null; + } +} diff --git a/hzims-service/digital-twin-display/src/main/resources/application-dev.yml b/hzims-service/digital-twin-display/src/main/resources/application-dev.yml new file mode 100644 index 0000000..50a4ea7 --- /dev/null +++ b/hzims-service/digital-twin-display/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 diff --git a/hzims-service/digital-twin-display/src/main/resources/application-prod.yml b/hzims-service/digital-twin-display/src/main/resources/application-prod.yml new file mode 100644 index 0000000..da89262 --- /dev/null +++ b/hzims-service/digital-twin-display/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} diff --git a/hzims-service/digital-twin-display/src/main/resources/application.yml b/hzims-service/digital-twin-display/src/main/resources/application.yml new file mode 100644 index 0000000..de3d915 --- /dev/null +++ b/hzims-service/digital-twin-display/src/main/resources/application.yml @@ -0,0 +1,21 @@ +#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 + - + +spring: + datasource: + url: jdbc:mysql://192.168.65.124:3576/hzinfo_data?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: hzinfo + password: 1qaz2WSX! + + + diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/feign/FdpMonitorClient.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/feign/FdpMonitorClient.java index b8a3552..e8d2f6a 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/feign/FdpMonitorClient.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/feign/FdpMonitorClient.java @@ -30,8 +30,8 @@ public class FdpMonitorClient implements IFdpMonitorClient{ @GetMapping(GET_FAULT_LIST) @Override - public String getFaultList() { - return fdpMonitorService.getFaultList(); + public String getFaultList(List stations) { + return fdpMonitorService.getFaultList(stations); } @GetMapping(UPDATE_FAULT_STATE) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/IFdpMonitorService.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/IFdpMonitorService.java index 6dda785..31e19a7 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/IFdpMonitorService.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/IFdpMonitorService.java @@ -159,7 +159,7 @@ public interface IFdpMonitorService extends BaseService { List getRealIds(); - String getFaultList(); + String getFaultList(List stations); String updateFaultState(UpdateFaultStateVo state); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java index 364ca2d..ba577d3 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java @@ -629,16 +629,20 @@ public class FdpMonitorServiceImpl extends BaseServiceImpl list = this.baseMapper.selectStationIds(); - if (CollectionUtil.isEmpty(list)) { - return null; - } + public String getFaultList(List stations) { Map paramMap = new HashMap<>(); - paramMap.put("stationIds", list.toArray(new String[0])); + if(CollectionUtil.isEmpty(stations)){ + List list = this.baseMapper.selectStationIds(); + if (CollectionUtil.isEmpty(list)) { + return null; + } + paramMap.put("stationIds", list.toArray(new String[0])); + }else{ + paramMap.put("stationIds", stations); + } String result = HttpRequestUtil.postCall(paramMap, autoFaultPath, "POST"); if (StringUtil.isBlank(result)) { - return null; + return null; } return JSONObject.parseObject(result).get("data").toString(); } diff --git a/hzims-service/hzims-scheduled/.gitignore b/hzims-service/hzims-scheduled/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/hzims-service/hzims-scheduled/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java index be7492f..28429fb 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java @@ -104,7 +104,7 @@ public class ShowServiceImpl implements ShowService { @Value("${hzims.equipment.emInfo.emInfoList}") public String device_cache_cofig_final; - @Value("${hzims.operation.region.areaDutyInfoKey}") + @Value("${hzims.operation.region.areaDutyInfoKey}") private String area_duty_cache_final; @Value("${hzims.operation.region.deviceClassifyKey}") diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java index 2e73d9a..ad72a42 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java @@ -1,6 +1,5 @@ package com.hnac.hzinfo.inspect.offline.service.impl; -import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.hnac.hzims.equipment.feign.IEmInfoClient; import com.hnac.hzims.equipment.vo.DeviceVO; @@ -28,7 +27,7 @@ import com.hnac.hzinfo.inspect.plan.vo.PlanOfflineVO; import com.hnac.hzinfo.inspect.task.entity.*; import com.hnac.hzinfo.inspect.task.service.*; import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import com.hnac.hzinfo.inspect.task.vo.TaskOfflineVO; import com.hnac.hzinfo.inspect.utils.JsonFileUtil; import lombok.RequiredArgsConstructor; @@ -39,8 +38,6 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseService; @@ -55,8 +52,6 @@ import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; import org.springblade.offline.service.IOfflineDataService; import org.springblade.resource.feign.IOssClient; -import org.springblade.system.user.entity.User; -import org.springblade.system.user.feign.IUserClient; import org.springblade.system.vo.CreateTableVO; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Primary; @@ -837,6 +832,9 @@ public class InspectOfflineServiceImpl implements IOfflineDataService { List taskObjects = JsonFileUtil.readJsonFile(upload + "/HZ_ST_EX_OBJECT.json", TaskObjectSyncBO.class); List projectContents = JsonFileUtil.readJsonFile(upload + "/HZ_ST_EX_OBJECT_PROJECT_CONTENT.json", TaskObjectProjectContentBO.class); + // 内容图片 + this.batchCurrentImg(upload, eventRecords); + // 文件上传 this.batchUploadImg(upload, eventRecords); this.batchUploadImg(upload, eventAttachments); @@ -878,6 +876,49 @@ public class InspectOfflineServiceImpl implements IOfflineDataService { } /** + * 上传内容文件 + * + * @param sourceDir + * @param data + */ + private void batchCurrentImg(String sourceDir, List data) { + if (CollectionUtil.isEmpty(data)) { + return; + } + + data.forEach(bo -> { + if (CollectionUtil.isEmpty(bo.getCurrentValues())) { + return; + } + List urls = bo.getCurrentValues().stream().map(o -> { + if (StringUtils.isBlank(o) || !o.contains("file:")) { + return null; + } + /**wxq begin**/ + String fileName = o.substring(o.lastIndexOf("/") >= 0 ? o.lastIndexOf("/") + 1 : 0); + File file = new File(sourceDir + "/" + fileName); + if (!file.exists()) { + throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!"); + } + R r = null; + try { + MultipartFile multipartFile = this.getMultipartFile(file); + r = ossClient.putFile(multipartFile); + if (!r.isSuccess()) { + throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString()); + } + BladeFile bladeFile = r.getData(); + return bladeFile != null ? bladeFile.getLink() : null; + } catch (Exception ex) { + throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString(), ex); + } + }).filter(StringUtils::isNotBlank).collect(Collectors.toList()); + bo.setCurrentValues(urls); + }); + + } + + /** * 上传文件 * * @param sourceDir @@ -914,7 +955,7 @@ public class InspectOfflineServiceImpl implements IOfflineDataService { } catch (Exception ex) { throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString(), ex); } - }).filter(o -> StringUtils.isNotBlank(o)).collect(Collectors.toList()); + }).filter(StringUtils::isNotBlank).collect(Collectors.toList()); bo.setFiles(urls); }); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/EventRecordSyncBO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/EventRecordSyncBO.java index c90b919..1cc9c64 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/EventRecordSyncBO.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/EventRecordSyncBO.java @@ -40,4 +40,20 @@ public class EventRecordSyncBO extends EventRecordEntity implements SyncBO { super.setFileUrl(urls.get(0)); } } + + @Override + public List getCurrentValues() { + return new ArrayList() {{ + if (StringUtil.isNotBlank(getCurrentValue())) { + add(getCurrentValue()); + } + }}; + } + + @Override + public void setCurrentValues(List urls) { + if (CollectionUtil.isNotEmpty(urls)) { + super.setCurrentValue(urls.get(0)); + } + } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/SyncBO.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/SyncBO.java index 628053e..f03fd08 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/SyncBO.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/sync/SyncBO.java @@ -13,6 +13,15 @@ public interface SyncBO { } default void setFiles(List urls) { + + } + + default List getCurrentValues() { + return null; + } + + default void setCurrentValues(List urls) { + } Object getPrimaryKey(); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java index fb1ab29..b7d0859 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/RouteController.java @@ -12,6 +12,7 @@ import javax.validation.Valid; import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; @@ -62,11 +63,11 @@ public class RouteController extends BladeController { operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, action = "查询巡检路径管理列表") - public R> list(@ApiIgnore @RequestParam Map st_re_route, Query query) { + public R> list(@ApiIgnore @RequestParam Map st_re_route, Query query) { QueryWrapper queryWrapper = Condition.getQueryWrapper(st_re_route, RouteEntity.class); queryWrapper.orderByDesc("create_time", "update_time"); IPage pages = st_re_routeService.page(Condition.getPage(query), queryWrapper); - return R.data(pages); + return R.data(BladePage.of(pages)); } /** diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java index 7d6e194..de43b4c 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/EventController.java @@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Lists; import com.google.common.collect.Maps; +import com.hnac.hzinfo.inspect.areamonthly.vo.EventListVO; import com.hnac.hzinfo.inspect.obj.entity.ObjectEntity; import com.hnac.hzinfo.inspect.obj.entity.ProjectEntity; import com.hnac.hzinfo.inspect.obj.services.ObjectService; @@ -16,6 +17,7 @@ import com.hnac.hzinfo.inspect.task.vo.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; +import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; @@ -23,11 +25,11 @@ import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.SpringUtil; import org.springblade.core.tool.utils.StringUtil; import org.springblade.flow.core.constant.ProcessConstant; import org.springblade.flow.core.feign.IFlowClient; import org.springblade.system.feign.IDictClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -51,11 +53,17 @@ public class EventController{ /** * 获取巡检情况列表信息 */ - @RequestMapping(value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) + @GetMapping(value = "/list") @ApiOperation(value = "任务查看弹窗下面的列表 巡检情况列表信息分页", notes = "传入taskId") - public R> list(Long taskId, Query query, BladeUser bladeUser) { + public R> eventList(@RequestParam Long taskId, @SpringQueryMap Query query, + @SpringQueryMap BladeUser bladeUser) { + if (bladeUser == null) { + bladeUser = new BladeUser(); + bladeUser.setTenantId("200000"); + } LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery().eq(EventEntity::getTaskId,taskId).orderByDesc(EventEntity::getCreateTime); - IPage pages = eventService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? + IPage pages = eventService.page(Condition.getPage(query), + (!BladeConstant.ADMIN_TENANT_ID.equals(bladeUser.getTenantId())) ? queryWrapper.eq(EventEntity::getTenantId, bladeUser.getTenantId()).orderByDesc(EventEntity::getCreateTime) : queryWrapper); IPage resultPages = new Page<>(pages.getCurrent(), pages.getSize(),pages.getTotal()); @@ -84,7 +92,7 @@ public class EventController{ result.add(EventListVO.builder().id(entity.getId()).objectName(objectName).projectName(projectName).isProblem(entity.getIsProblem()).checkInTime(entity.getCreateTime()).build()); }); resultPages.setRecords(result); - return R.data(resultPages); + return R.data(BladePage.of(resultPages)); } /** diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java index 3309ca8..fb68146 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/controller/TaskController.java @@ -24,7 +24,7 @@ import com.hnac.hzinfo.inspect.task.service.IEventService; import com.hnac.hzinfo.inspect.task.service.ITaskService; import com.hnac.hzinfo.inspect.task.service.ITaskUserService; import com.hnac.hzinfo.inspect.task.vo.TaskListQuery; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.task.vo.TaskVo; import com.hnac.hzinfo.inspect.utils.Condition; import io.swagger.annotations.*; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java index 5c50adf..0fc8788 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java @@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.List; @@ -58,6 +59,7 @@ public class InspectTaskClient implements IInspectTaskClient { return taskService.queryByPlanStartTime(startDate,endDate,depts); } + /** * 获取安全检查巡检任务 * @param startDate 开始时间 @@ -74,4 +76,21 @@ public class InspectTaskClient implements IInspectTaskClient { @RequestParam("inspectType") String inspectType) { return taskService.getInspectTaskCheck(startDate,endDate,dept,inspectType); } + + /** + * 到期巡检任务 + * @param start + * @param end + * @param deptId + * @return + */ + @Override + public List expireInspect(String start, String end, Long deptId) { + return taskService.list(Wrappers.lambdaQuery() + .ge(TaskEntity::getPlanEndTime,start) + .le(TaskEntity::getPlanEndTime,end) + .ne(TaskEntity::getStatus,TaskContants.TaskStatusEnum.FINISH_STATUS) + .like(TaskEntity::getCreateDept,deptId) + ); + } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java index 6366203..be9aae9 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.java @@ -3,7 +3,7 @@ package com.hnac.hzinfo.inspect.task.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzinfo.inspect.task.entity.TaskObjectEntity; import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml index 9c34318..a940162 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectMapper.xml @@ -3,7 +3,7 @@ - + @@ -13,14 +13,14 @@ - + - + diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java index 5576f33..e568a98 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.java @@ -2,7 +2,7 @@ package com.hnac.hzinfo.inspect.task.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml index b7716f6..f75d728 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskObjectProjectMapper.xml @@ -15,7 +15,7 @@ - SELECT * from hz_st_ex_object_project where IS_DELETED = 0 AND task_id IN diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java index 12008f7..d0a2ef0 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectContentService.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectContentEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java index 64628ae..1f49aec 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectProjectService.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java index 469e963..66a1265 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskObjectService.java @@ -1,7 +1,7 @@ package com.hnac.hzinfo.inspect.task.service; import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import org.springblade.core.mp.base.BaseService; import com.hnac.hzinfo.inspect.task.entity.TaskObjectEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java index 7f62c5a..5715b8b 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/ITaskService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.task.dto.TaskDTO; import com.hnac.hzinfo.inspect.task.entity.InspectionTaskSMS; import com.hnac.hzinfo.inspect.task.entity.TaskEntity; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java index 0beb398..daf4e6c 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectContentServiceImpl.java @@ -1,16 +1,13 @@ package com.hnac.hzinfo.inspect.task.service.impl; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; -import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.real.po.RealDataSearchPO; import com.hnac.hzinfo.inspect.obj.entity.ContentEntity; import com.hnac.hzinfo.inspect.obj.services.ContentService; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; import com.hnac.hzinfo.sdk.v5.redis.RedisClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -21,15 +18,9 @@ import com.hnac.hzinfo.inspect.task.service.ITaskObjectProjectContentService; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; -import org.springblade.core.tool.utils.ObjectUtil; -import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; import java.util.List; -import java.util.Optional; /** * 服务实现类 diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java index b115b5c..1004aa1 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectProjectServiceImpl.java @@ -1,6 +1,6 @@ package com.hnac.hzinfo.inspect.task.service.impl; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectOfflineVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectOfflineVO; import org.springblade.core.mp.base.BaseServiceImpl; import com.hnac.hzinfo.inspect.task.entity.TaskObjectProjectEntity; import com.hnac.hzinfo.inspect.task.mapper.TaskObjectProjectMapper; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java index d421097..3643624 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskObjectServiceImpl.java @@ -7,8 +7,7 @@ import com.hnac.hzinfo.inspect.task.mapper.TaskObjectMapper; import com.hnac.hzinfo.inspect.task.service.ITaskObjectProjectContentService; import com.hnac.hzinfo.inspect.task.service.ITaskObjectService; import com.hnac.hzinfo.inspect.task.vo.TaskObjectOfflineVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectProjectContentVO; -import com.hnac.hzinfo.inspect.task.vo.TaskObjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import lombok.AllArgsConstructor; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.utils.CollectionUtil; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index 61b1c82..4a2e402 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -16,6 +16,9 @@ import com.hnac.hzims.safeproduct.feign.IImsMonCameraInfoClient; import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.VoteChartVo; import com.hnac.hzinfo.inspect.ai.service.IRobotService; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectContentVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectProjectVO; +import com.hnac.hzinfo.inspect.areamonthly.vo.TaskObjectVO; import com.hnac.hzinfo.inspect.obj.ObjContants; import com.hnac.hzinfo.inspect.obj.services.IObjectDangerService; import com.hnac.hzinfo.inspect.plan.PlanContants; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java index 561d583..f17bc99 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/OperationApplication.java @@ -38,6 +38,16 @@ import javax.annotation.Resource; @Resource public class OperationApplication extends SpringBootServletInitializer { + + static { + System.setProperty("spring.cloud.nacos.discovery.erver-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.config.server-addr", "http://hadoop:8848"); + System.setProperty("spring.cloud.nacos.username", "nacos"); + System.setProperty("spring.cloud.nacos.password", "nacos"); + } + + + public static void main(String[] args) { BladeApplication.run(OperationalConstants.APP_NAME, OperationApplication.class, args); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java new file mode 100644 index 0000000..8add3fa --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/controller/AreaDutyController.java @@ -0,0 +1,67 @@ +package com.hnac.hzims.operational.census.controller; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.census.service.AreaDutyService; +import com.hnac.hzims.operational.census.vo.AreaAssetVo; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; +import com.hnac.hzims.operational.duty.service.IImsDutyMainService; +import com.hnac.hzims.operational.main.vo.AreaDutyVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import java.util.Calendar; +import java.util.List; + +/** + * @author ysj + */ +@RestController +@AllArgsConstructor +@RequestMapping("/area_duty") +@Api(value = "区域值班统计", tags = "区域值班统计") +public class AreaDutyController { + + private final AreaDutyService service; + + private final IImsDutyMainService dutyMainService; + + @ApiLog + @ApiOperation("值班数据") + @GetMapping("/duty") + @ApiOperationSupport(order = 1) + public R duty(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId) { + return R.data(service.duty(deptId)); + } + + @ApiLog + @ApiOperation("资产信息") + @GetMapping("/asset") + @ApiOperationSupport(order = 2) + public R> asset(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId) { + return R.data(service.asset(deptId)); + } + + @ApiLog + @ApiOperation("及时提醒消息") + @GetMapping("/timely") + @ApiOperationSupport(order = 3) + public R> timely(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId, + @ApiParam(value = "类型", required = true) @RequestParam Integer type) { + return R.data(service.timely(deptId,type)); + } + + @ApiLog + @ApiOperation("排班数据") + @GetMapping("/scheduling") + @ApiOperationSupport(order = 4) + public R scheduling(@ApiParam(value = "机构Id", required = true) @RequestParam Long deptId) { + Calendar calendar = Calendar.getInstance(); + return dutyMainService.getSchedulingListV2(calendar.get(Calendar.YEAR),calendar.get(Calendar.MONTH) + 1, deptId); + } + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java new file mode 100644 index 0000000..83d8ce1 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/AreaDutyService.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.operational.census.service; + + +import com.hnac.hzims.operational.census.vo.AreaAssetVo; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; +import com.hnac.hzims.operational.main.vo.AreaDutyVo; + +import java.util.List; + +/** + * @author ysj + */ +public interface AreaDutyService { + + AreaDutyVo duty(Long deptId); + + List timely(Long deptId,Integer type); + + List asset(Long deptId); + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java new file mode 100644 index 0000000..1a75a11 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/AreaDutyServiceImpl.java @@ -0,0 +1,338 @@ +package com.hnac.hzims.operational.census.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hnac.hzims.equipment.vo.EminfoAndEmParamVo; +import com.hnac.hzims.fdp.feign.IFdpMonitorClient; +import com.hnac.hzims.operational.access.dto.AccessTaskV4DTO; +import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; +import com.hnac.hzims.operational.access.service.IOperAccessTaskService; +import com.hnac.hzims.operational.census.service.AreaDutyService; +import com.hnac.hzims.operational.census.vo.AreaAssetDeviceVo; +import com.hnac.hzims.operational.census.vo.AreaAssetVo; +import com.hnac.hzims.operational.census.vo.AreaTimelyVo; +import com.hnac.hzims.operational.config.vo.FaultVo; +import com.hnac.hzims.operational.main.service.IMainTaskStatisticService; +import com.hnac.hzims.operational.main.vo.AreaDutyVo; +import com.hnac.hzims.operational.main.vo.HydropowerUnitRealVo; +import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity; +import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; +import com.hnac.hzims.operational.maintenance.service.MaintenanceService; +import com.hnac.hzims.operational.station.entity.StationEntity; +import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.spare.feign.ISpareClient; +import com.hnac.hzinfo.inspect.task.entity.TaskEntity; +import com.hnac.hzinfo.inspect.task.feign.IInspectTaskClient; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; +import org.springblade.system.entity.Dept; +import org.springblade.system.feign.ISysClient; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import java.time.Duration; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author ysj + * @date 2023/02/23 13:37:22 + * @version 4.0.0 + */ +@Service +@Slf4j +@RequiredArgsConstructor +public class AreaDutyServiceImpl implements AreaDutyService { + + @Value("${hzims.equipment.emInfo.emInfoList}") + public String device_cache_cofig_final; + + @Value("${hzims.operation.region.areaDutyInfoKey}") + private String area_duty_cache_final; + + private final static String load_hydropower_unit_real_key = "hzims:operation:loadhydropowerunit:real:key"; + + private final IStationService stationService; + + private final IOperMaintenanceTaskService maintenanceService; + + private final IOperAccessTaskService accessTaskService; + + private final ISysClient sysClient; + + private final ISpareClient spareClient; + + private final IFdpMonitorClient monitorClient; + + private final IInspectTaskClient inspectTaskClient; + + private final RedisTemplate redisTemplate; + + /** + * 区域值班数据 + * @param deptId + * @return + */ + @Override + public AreaDutyVo duty(Long deptId) { + List dutys = (List) redisTemplate.opsForValue().get(area_duty_cache_final); + if(CollectionUtil.isEmpty(dutys)){ + return new AreaDutyVo(); + } + return dutys.stream().filter(o->o.getDepartId().equals(deptId)).min(Comparator.comparing(AreaDutyVo::getDepartId)).get(); + } + + /** + * 区域及时提醒消息 + * @param deptId + * @return + */ + @Override + public List timely(Long deptId,Integer type) { + Calendar calendar = Calendar.getInstance(); + String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); + calendar.add(Calendar.DAY_OF_MONTH,1); + String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); + switch (type){ + case 1: + return this.early(deptId); + case 2: + return this.inspection(start,end,deptId); + case 3: + return this.overhaul(start,end,deptId); + case 4: + return this.maintenance(start,end,deptId); + case 5: + return this.regular(deptId); + default: + return new ArrayList<>(); + } + } + + + /** + * 预警 + * @return + */ + private List early(Long deptId) { + // 查询子机构 + R> result = sysClient.getDeptChild(deptId); + if(!result.isSuccess() || CollectionUtil.isEmpty(result.getData())){ + return new ArrayList<>(); + } + // 站点 + List stations = stationService.list(Wrappers.lambdaQuery() + .in(StationEntity::getRefDept,result.getData().stream().map(Dept::getId).collect(Collectors.toList())) + ); + if(CollectionUtil.isEmpty(stations)){ + return new ArrayList<>(); + } + // 预警信息查询 + String response = monitorClient.getFaultList(stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); + if (StringUtil.isBlank(response)) { + return new ArrayList<>(); + } + List earlys = JSONArray.parseArray(response,FaultVo.class); + if(CollectionUtil.isEmpty(earlys)){ + return new ArrayList<>(); + } + // 遍历 + return earlys.stream().map(early->{ + AreaTimelyVo timely = new AreaTimelyVo(); + timely.setEventId(early.getFaultId()); + timely.setContent(early.getFinfo()); + timely.setDeptName("未知"); + if(!StringUtil.isEmpty(early.getStation())){ + List names = stations.stream().filter(o->o.getCode().equals(early.getStation())).map(StationEntity::getName).collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(names)){ + timely.setDeptName(names.get(0)); + } + } + timely.setTime(early.getCreateTime()); + int sum = this.eventToHours(LocalDateTime.parse(early.getCreateTime(),DateUtil.DATETIME_FORMATTER)); + timely.setSum(sum); + timely.setColour(0); + if(sum > 12){ + timely.setColour(1); + } + return timely; + }).collect(Collectors.toList()); + } + + /** + * 巡检 + * @param deptId + * @return + */ + private List inspection(String start,String end,Long deptId) { + List expires = inspectTaskClient.expireInspect(start,end,deptId); + if(CollectionUtil.isEmpty(expires)){ + return new ArrayList<>(); + } + return expires.stream().map(expire->{ + AreaTimelyVo timely = new AreaTimelyVo(); + timely.setEventId(String.valueOf(expire.getId())); + timely.setContent(expire.getPlanName()); + R result = sysClient.getDept(expire.getCreateDept()); + if(result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())){ + timely.setDeptName(result.getData().getDeptName()); + } + timely.setTime(expire.getPlanEndTime().format(DateUtil.DATETIME_FORMATTER)); + int sum = this.eventToHours(expire.getPlanEndTime()); + timely.setSum(sum); + timely.setColour(0); + if(sum < 12){ + timely.setColour(1); + } + return timely; + }).collect(Collectors.toList()); + } + + /** + * 检修 + * @param deptId + * @return + */ + private List overhaul(String start,String end,Long deptId) { + List overhauls = accessTaskService.list(Wrappers.lambdaQuery() + .ge(OperAccessTaskEntity::getPlanEndTime,start) + .le(OperAccessTaskEntity::getPlanEndTime,end) + .ne(OperAccessTaskEntity::getStatus,4) + .like(OperAccessTaskEntity::getCreateDept,deptId) + ); + if(CollectionUtil.isEmpty(overhauls)){ + return new ArrayList<>(); + } + return overhauls.stream().map(overhaul->{ + AreaTimelyVo timely = new AreaTimelyVo(); + timely.setEventId(String.valueOf(overhaul.getId())); + timely.setContent(overhaul.getName()); + R result = sysClient.getDept(overhaul.getCreateDept()); + if(result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())){ + timely.setDeptName(result.getData().getDeptName()); + } + timely.setTime(DateUtil.format(overhaul.getPlanEndTime(),DateUtil.PATTERN_DATETIME)); + int sum = this.eventToHours(LocalDateTime.ofInstant(overhaul.getPlanEndTime().toInstant(), ZoneId.systemDefault())); + timely.setSum(sum); + timely.setColour(0); + if(sum < 12){ + timely.setColour(1); + } + return timely; + }).collect(Collectors.toList()); + } + + /** + * 日常维护 + * @param deptId + * @return + */ + private List maintenance(String start,String end,Long deptId) { + List maintenances = maintenanceService.list(Wrappers.lambdaQuery() + .ge(OperMaintenanceTaskEntity::getPlanEndTime,start) + .le(OperMaintenanceTaskEntity::getPlanEndTime,end) + .ne(OperMaintenanceTaskEntity::getFlowTaskName,"结束") + .like(OperMaintenanceTaskEntity::getCreateDept,deptId) + ); + if(CollectionUtil.isEmpty(maintenances)){ + return new ArrayList<>(); + } + return maintenances.stream().map(maintenance -> { + AreaTimelyVo timely = new AreaTimelyVo(); + timely.setEventId(String.valueOf(maintenance.getId())); + timely.setContent(maintenance.getTitle()); + R result = sysClient.getDept(maintenance.getCreateDept()); + if(result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())){ + timely.setDeptName(result.getData().getDeptName()); + } + timely.setTime(DateUtil.format(maintenance.getPlanEndTime(),DateUtil.PATTERN_DATETIME)); + int sum = this.eventToHours(maintenance.getPlanEndTime()); + timely.setSum(sum); + timely.setColour(0); + if(sum < 12){ + timely.setColour(1); + } + return timely; + }).collect(Collectors.toList()); + } + + /** + * 固定资产 + * @param deptId + * @return + */ + private List regular(Long deptId) { + return spareClient.exceedLimit(deptId); + } + + + /** + * 资产信息 + * @param deptId + * @return + */ + @Override + public List asset(Long deptId) { + // 查询子部门 + R> result = sysClient.getDeptChild(deptId); + if(!result.isSuccess() && CollectionUtil.isEmpty(result.getData())){ + return new ArrayList<>(); + } + List depts = result.getData().stream().map(Dept::getId).collect(Collectors.toList()); + // 查询站点 + List stations = stationService.list(Wrappers.lambdaQuery() + .in(StationEntity::getRefDept,depts)); + if(CollectionUtil.isEmpty(stations)){ + return new ArrayList<>(); + } + try{ + // 查询设备 + List devices = JSONObject.parseObject(redisTemplate.opsForValue().get(device_cache_cofig_final).toString(),new TypeReference>() {}); + // 水电站设备实时数据 + List reals = (List) redisTemplate.opsForValue().get(load_hydropower_unit_real_key); + return devices.stream().filter(device -> depts.contains(device.getCreateDept())).collect(Collectors.groupingBy(EminfoAndEmParamVo::getCreateDept)).entrySet().stream().map(entry->{ + AreaAssetVo asset = new AreaAssetVo(); + asset.setDeptId(entry.getKey()); + asset.setDeptName(sysClient.getDeptName(entry.getKey()).getData()); + asset.setDevices(entry.getValue().stream().map(value->{ + AreaAssetDeviceVo item = new AreaAssetDeviceVo(); + item.setDeptId(entry.getKey()); + item.setDeviceCode(value.getEmCode()); + item.setDeviceName(value.getName()); + // 状态 + HydropowerUnitRealVo real = reals.stream().filter(o->o.getDeviceCode().equals(value.getEmCode())).min(Comparator.comparing(HydropowerUnitRealVo::getDeviceCode)).get(); + item.setStatus(2); + if(ObjectUtil.isNotEmpty(real) && Math.abs(real.getActivePower()) > 0){ + item.setStatus(1); + } + return item; + }).collect(Collectors.toList())); + return asset; + }).collect(Collectors.toList()); + }catch (Exception ex){ + log.error("duty_asset_error: {}",ex); + return new ArrayList<>(); + } + } + + /** + * 事件产生时长 + * @param startTime + * @return + */ + private int eventToHours(LocalDateTime startTime) { + // 计算投运时间与当前时间相隔天数 + Duration dur = Duration.between(startTime, LocalDateTime.now()); + return Math.abs((int) dur.toHours()); + } +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java index 9865756..27e4d92 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/StAlamRecordServiceImpl.java @@ -733,7 +733,7 @@ public class StAlamRecordServiceImpl extends BaseServiceImpl()); if(StringUtil.isEmpty(result)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java index cd4e5b2..6045079 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/controller/OperDefectStatisticsController.java @@ -10,6 +10,7 @@ import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; import com.hnac.hzims.operational.defect.wrapper.OperDefectStatisticsWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; @@ -18,6 +19,7 @@ import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; @@ -25,6 +27,7 @@ import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.system.entity.Dept; import org.springblade.system.feign.ISysClient; +import org.springframework.cloud.openfeign.SpringQueryMap; import org.springframework.web.bind.annotation.*; import java.util.List; @@ -61,14 +64,14 @@ public class OperDefectStatisticsController extends BladeController { * 分页 代码自定义代号 */ @ApiLog - @PostMapping("/list") + @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入statistics") @ApiImplicitParams({ }) @OperationAnnotation(moduleName = "缺陷管理",title = "缺陷记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action = "分页查询缺陷记录列表") - public R> list(@RequestBody OperDefectStatisticsVO entity) { + public R> list(@SpringQueryMap OperDefectStatisticsVO entity) { Query query=new Query(); query.setCurrent(entity.getCurrent()); query.setSize(entity.getSize()); @@ -84,7 +87,7 @@ public class OperDefectStatisticsController extends BladeController { return o; }).collect(Collectors.toList())); } - return R.data(vos); + return R.data(BladePage.of(vos)); } /** @@ -141,4 +144,15 @@ public class OperDefectStatisticsController extends BladeController { return R.status(statisticsService.deleteLogic(Func.toLongList(ids))); }*/ + + /** + * 巡检任务统计 + * @return + */ + @GetMapping("/defectStatistictCount") + public R> defectStatistictCount(){ + List statistictCountVos = statisticsService.defectStatistictCount(); + return R.data(statistictCountVos); + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java index 2a2714e..ebbf25b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.java @@ -1,5 +1,6 @@ package com.hnac.hzims.operational.defect.mapper; +import com.hnac.hzims.operational.defect.vo.StatistictCount; import org.springblade.core.datascope.annotation.UserDataAuth; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; @@ -26,4 +27,11 @@ public interface OperDefectStatisticsMapper extends UserDataScopeBaseMapper getEMStaticstic(@Param("emCode") String emCode, @Param("startTime") String startTime, @Param("endTime") String endTime); + + /** + * 巡检任务统计 + * @return + */ + List defectStatistictCount(); + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml index a996ca2..77ec3d9 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/mapper/OperDefectStatisticsMapper.xml @@ -15,4 +15,8 @@ GROUP BY SOURCE_CODE + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java index 12b9695..6effa45 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/IOperDefectStatisticsService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.hnac.hzims.operational.defect.dto.OperDefectStatisticsDTO; import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; import org.springblade.core.mp.base.BaseService; import java.util.List; @@ -25,4 +26,10 @@ public interface IOperDefectStatisticsService extends BaseService getQueryWrapper(OperDefectStatisticsVO statistics); + /** + * 巡检任务统计 + */ + List defectStatistictCount(); + + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java index 837e107..c48bfbf 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectStatisticsServiceImpl.java @@ -7,94 +7,142 @@ import com.hnac.hzims.operational.defect.entity.OperDefectStatisticsEntity; import com.hnac.hzims.operational.defect.mapper.OperDefectStatisticsMapper; import com.hnac.hzims.operational.defect.service.IOperDefectStatisticsService; import com.hnac.hzims.operational.defect.vo.OperDefectStatisticsVO; +import com.hnac.hzims.operational.defect.vo.StatistictCount; +import com.hnac.hzims.operational.defect.vo.StatistictCountVo; +import com.hnac.hzims.operational.report.service.IDeptService; +import org.apache.commons.lang3.math.NumberUtils; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.support.Condition; +import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.system.cache.DictCache; +import org.springblade.system.feign.ISysClient; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; /** - * 服务实现类 + * 服务实现类 * * @author Chill */ @Service public class OperDefectStatisticsServiceImpl extends BaseServiceImpl implements IOperDefectStatisticsService { - /** - * 获取设备缺陷统计数据 - * @param emCode - * @return - */ - @Override - public List getEMStaticstic(String emCode, String startTime, String endTime){ - List re = this.baseMapper.getEMStaticstic(emCode, startTime, endTime); - for (OperDefectStatisticsDTO dto : re) { - dto.setSourceCodeName(DictCache.getValue(dto.getSourceCode(), DefectConstant.SOURCE_CODE_DICT_KEY)); - } - return re; - } - - @Override - public LambdaQueryWrapper getQueryWrapper(OperDefectStatisticsVO statistics) { - LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(),statistics); - if(Func.isNotEmpty(statistics)) { - if (Func.isNotEmpty(statistics.getDefectCodeList())) { - queryWrapper.in(OperDefectStatisticsEntity::getDefectCode, statistics.getDefectCodeList()); - } - if (statistics.getActStartTime() != null) { - queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime, statistics.getActStartTime()); - } - if (statistics.getActEndTime() != null) { - queryWrapper.le(OperDefectStatisticsEntity::getActStartTime, statistics.getActEndTime()); - } - if (statistics.getDefectLevel() != null) { - queryWrapper.like(OperDefectStatisticsEntity::getDefectLevel, statistics.getDefectLevel()); - } - if (statistics.getDisposer() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getDisposer, statistics.getDisposer()); - } - if (statistics.getConclusion() != null) { - queryWrapper.like(OperDefectStatisticsEntity::getConclusion, statistics.getConclusion()); - } - if (statistics.getName() != null) { - queryWrapper.like(OperDefectStatisticsEntity::getName, statistics.getName()); - } - if (statistics.getConclusionTime() != null) { - queryWrapper.ge(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionTime()); - } - if (Func.isNotEmpty(statistics.getConclusionEndTime())) { - queryWrapper.le(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionEndTime()); - } - if (statistics.getCreateTime() != null) { - queryWrapper.ge(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateTime()); - } - if (Func.isNotEmpty(statistics.getCreateEndTime())) { - queryWrapper.le(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateEndTime()); - } - if (statistics.getIsDefect() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getIsDefect, statistics.getIsDefect()); - } - if (statistics.getEmCode() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getEmCode, statistics.getEmCode()); - } - if (statistics.getIsWarehousing() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getIsWarehousing, statistics.getIsWarehousing()); - } - if (statistics.getSourceCode() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getSourceCode, statistics.getSourceCode()); - } - if (statistics.getConclusionPeople() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getConclusionPeople, statistics.getConclusionPeople()); - } - if (statistics.getCreateDept() != null) { - queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, statistics.getCreateDept()); - } - - } - queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime); - return queryWrapper; - } + + @Autowired + private ISysClient sysClient; + + + /** + * 获取设备缺陷统计数据 + * + * @param emCode + * @return + */ + @Override + public List getEMStaticstic(String emCode, String startTime, String endTime) { + List re = this.baseMapper.getEMStaticstic(emCode, startTime, endTime); + for (OperDefectStatisticsDTO dto : re) { + dto.setSourceCodeName(DictCache.getValue(dto.getSourceCode(), DefectConstant.SOURCE_CODE_DICT_KEY)); + } + return re; + } + + @Override + public LambdaQueryWrapper getQueryWrapper(OperDefectStatisticsVO statistics) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new OperDefectStatisticsEntity(), statistics); + if (Func.isNotEmpty(statistics)) { + if (Func.isNotEmpty(statistics.getDefectCodeList())) { + queryWrapper.in(OperDefectStatisticsEntity::getDefectCode, statistics.getDefectCodeList()); + } + if (statistics.getActStartTime() != null) { + queryWrapper.ge(OperDefectStatisticsEntity::getActStartTime, statistics.getActStartTime()); + } + if (statistics.getActEndTime() != null) { + queryWrapper.le(OperDefectStatisticsEntity::getActStartTime, statistics.getActEndTime()); + } + if (statistics.getDefectLevel() != null) { + queryWrapper.like(OperDefectStatisticsEntity::getDefectLevel, statistics.getDefectLevel()); + } + if (statistics.getDisposer() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getDisposer, statistics.getDisposer()); + } + if (statistics.getConclusion() != null) { + queryWrapper.like(OperDefectStatisticsEntity::getConclusion, statistics.getConclusion()); + } + if (statistics.getName() != null) { + queryWrapper.like(OperDefectStatisticsEntity::getName, statistics.getName()); + } + if (statistics.getConclusionTime() != null) { + queryWrapper.ge(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionTime()); + } + if (Func.isNotEmpty(statistics.getConclusionEndTime())) { + queryWrapper.le(OperDefectStatisticsEntity::getConclusionTime, statistics.getConclusionEndTime()); + } + if (statistics.getCreateTime() != null) { + queryWrapper.ge(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateTime()); + } + if (Func.isNotEmpty(statistics.getCreateEndTime())) { + queryWrapper.le(OperDefectStatisticsEntity::getCreateTime, statistics.getCreateEndTime()); + } + if (statistics.getIsDefect() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getIsDefect, statistics.getIsDefect()); + } + if (statistics.getEmCode() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getEmCode, statistics.getEmCode()); + } + if (statistics.getIsWarehousing() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getIsWarehousing, statistics.getIsWarehousing()); + } + if (statistics.getSourceCode() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getSourceCode, statistics.getSourceCode()); + } + if (statistics.getConclusionPeople() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getConclusionPeople, statistics.getConclusionPeople()); + } + if (statistics.getCreateDept() != null) { + queryWrapper.eq(OperDefectStatisticsEntity::getCreateDept, statistics.getCreateDept()); + } + + } + queryWrapper.orderByDesc(OperDefectStatisticsEntity::getCreateTime); + return queryWrapper; + } + + /** + * 巡检任务统计 + */ + @Override + public List defectStatistictCount() { + List statistictCounts = baseMapper.defectStatistictCount(); + + List result = new ArrayList<>(); + for (StatistictCount statistictCount : statistictCounts) { + StatistictCountVo statistictCountVo = new StatistictCountVo(); + + R deptName = sysClient.getDeptName(Long.valueOf(statistictCount.getCreateDept())); + if (deptName != null) { + statistictCountVo.setCreateDeptName(deptName.getData()); + } + statistictCountVo.setCreateDept(statistictCount.getCreateDept()); + //未处理 + if (statistictCount.getHandleStatus() == 0) { + statistictCountVo.setUntreatedCount(statistictCount.getCount()); + } + //已处理 + if (statistictCount.getHandleStatus() == 1) { + statistictCountVo.setProcessedCount(statistictCount.getCount()); + } + + result.add(statistictCountVo); + + } + + return result; + + + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java new file mode 100644 index 0000000..89e3e54 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EstimateController.java @@ -0,0 +1,74 @@ +package com.hnac.hzims.operational.station.controller; + + +import com.hnac.hzims.operational.station.entity.Estimate; +import com.hnac.hzims.operational.station.service.EstimateService; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + *

+ * 总体评分附表 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-23 + */ +@RestController +@RequestMapping("/station/estimate") +public class EstimateController { + + @Autowired + private EstimateService estimateService; + + /** + * 列表 + */ + @GetMapping("/list") + public R list() { + Map result = estimateService.selectEstimateList(); + return R.data(result); + } + + + /** + * 保存 + * + * @return + */ + @PostMapping("/save") + public R save(@RequestBody Estimate estimate) { + estimateService.save(estimate); + return R.success("新增成功"); + } + + + + /** + * 保存 + * + * @return + */ + @PutMapping("/update") + public R update(@RequestBody Estimate estimate) { + estimateService.updateById(estimate); + return R.success("修改成功"); + } + + + /** + * 删除 + * + * @return + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable String id) { + estimateService.removeById(id); + return R.success("删除成功"); + } + +} + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsController.java new file mode 100644 index 0000000..0d0b252 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsController.java @@ -0,0 +1,56 @@ +package com.hnac.hzims.operational.station.controller; + + +import com.hnac.hzims.operational.station.service.EvaluationDetailsService; +import com.hnac.hzims.operational.station.vo.EvaluationDetailsVo; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + *

+ * 得分事项简述 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@RestController +@RequestMapping("/station/evaluation-details") +public class EvaluationDetailsController { + + + @Autowired + private EvaluationDetailsService evaluationDetailsService; + + /** + * 新增 + */ + @PostMapping("/save") + public R save(@RequestBody EvaluationDetailsVo evaluationDetailsVo) { + evaluationDetailsService.saveEvaluationDetail(evaluationDetailsVo); + return R.success("新增成功"); + } + + + /** + * 修改 + */ + @PutMapping("/update") + public R update(@RequestBody EvaluationDetailsVo evaluationDetailsVo) { + evaluationDetailsService.updateEvaluationDetail(evaluationDetailsVo); + return R.success("修改成功"); + } + + + /** + * 删除 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + evaluationDetailsService.removeEvaluationDetail(id); + return R.success("删除成功"); + } + +} + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsOptionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsOptionController.java new file mode 100644 index 0000000..b98a26a --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/EvaluationDetailsOptionController.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.operational.station.controller; + + +import com.hnac.hzims.operational.station.service.EvaluationDetailsOptionService; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 选择表 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@RestController +@RequestMapping("/station/evaluation-details-option") +public class EvaluationDetailsOptionController { + + @Autowired + private EvaluationDetailsOptionService evaluationDetailsOptionService; + + + /** + * 删除 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + evaluationDetailsOptionService.removeById(id); + return R.success("删除成功"); + } +} + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HydropowerStationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HydropowerStationController.java new file mode 100644 index 0000000..c2a389f --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/HydropowerStationController.java @@ -0,0 +1,80 @@ +package com.hnac.hzims.operational.station.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.operational.station.entity.StationEntity; +import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.operational.station.vo.StationsQueryVo; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +/** + * 绿色小水电 + * + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/15 15:58 + */ +@RequestMapping("/hydropower/station") +@Slf4j +@RestController +@RequiredArgsConstructor +public class HydropowerStationController { + + + private final IStationService stationService; + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + */ + @GetMapping("pageList/{page}/{size}") + public R pageList(@PathVariable Long page, + @PathVariable Long size, + StationsQueryVo stationQueryVo) { + Page stationEntityPage = new Page<>(page, size); + IPage stationEntityIPage = + stationService.selectPageList(stationEntityPage, stationQueryVo); + return R.data(stationEntityIPage); + } + + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + */ + @GetMapping("/list") + public R list(StationsQueryVo stationsQueryVo) { + List list = stationService.selectStationsQueryList(stationsQueryVo); + return R.data(list); + } + + + /** + * 查看详情 + */ + @GetMapping("/get/{id}") + public R getById(@PathVariable Long id) { + StationEntity station = stationService.getById(id); + return R.data(station); + } + + + /** + * 获取绿色小水站电站数据 + */ + @GetMapping("/get/count") + public R getCount() { + Map stationVos = stationService.getCount(); + return R.data(stationVos); + } + + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java index 096c768..ca0ecbb 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java @@ -74,7 +74,7 @@ public class StationController extends BladeController { // @ApiOperationSupport(order = 60) @ApiOperation(value = "查看详情", notes = "查看详情") public R detail(@PathVariable @ApiParam("主键ID") Long id) { - return R.data(stationService.getById(id)); + return R.data(stationService.getByStationId(id)); } /** @@ -84,7 +84,7 @@ public class StationController extends BladeController { @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") public R save(@Valid @RequestBody StationEntity req) { - stationService.buildStation(req); + stationService.buildStation(req,"add"); return R.success("保存成功!"); // List list = stationService.list(new LambdaQueryWrapper(){{ // eq(StationEntity::getCode,req.getCode()).or().eq(StationEntity::getName,req.getName()); @@ -106,7 +106,7 @@ public class StationController extends BladeController { @ApiOperationSupport(order = 30) @ApiOperation(value = "修改", notes = "传入StationEntity") public R update(@Valid @RequestBody StationEntity req) { - stationService.buildStation(req); + stationService.buildStation(req,"update"); return R.success("修改成功!"); // LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper(); // queryWrapper.ne(StationEntity::getId,req.getId()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationEvaluationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationEvaluationController.java new file mode 100644 index 0000000..b0e603b --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationEvaluationController.java @@ -0,0 +1,71 @@ +package com.hnac.hzims.operational.station.controller; + + + +import com.hnac.hzims.operational.station.entity.StationEvaluation; +import com.hnac.hzims.operational.station.service.StationEvaluationService; +import com.hnac.hzims.operational.station.vo.OneStationEvaluationVo; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + *

+ * 电站评分表 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@RestController +@RequestMapping("/station/station-evaluation") +public class StationEvaluationController { + + + @Autowired + private StationEvaluationService stationEvaluationService; + + /** + * 列表展示 + */ + @GetMapping("/list") + public R list() { + List result = stationEvaluationService.selectList(); + return R.data(result); + } + + + /** + * 新增 + */ + @PostMapping("/save") + public R save(@RequestBody StationEvaluation stationEvaluation) { + stationEvaluationService.save(stationEvaluation); + return R.success("新增成功"); + } + + + /** + * 修改 + */ + @PutMapping("/update") + public R update(@RequestBody StationEvaluation stationEvaluation) { + stationEvaluationService.updateById(stationEvaluation); + return R.success("修改成功"); + } + + + /** + * 删除 + */ + @PostMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + stationEvaluationService.removeStationEvaluation(id); + return R.success("删除成功"); + } + + +} + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.java new file mode 100644 index 0000000..0cf7326 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.Estimate; + +/** + *

+ * 总体评分附表 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-23 + */ +public interface EstimateMapper extends BaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.xml new file mode 100644 index 0000000..a30bb0e --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EstimateMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.java new file mode 100644 index 0000000..c2195c7 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.EvaluationDetails; + +/** + *

+ * 得分事项简述 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface EvaluationDetailsMapper extends BaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.xml new file mode 100644 index 0000000..a6cd7d5 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.java new file mode 100644 index 0000000..8b57fc8 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; + +/** + *

+ * 选择表 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface EvaluationDetailsOptionMapper extends BaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.xml new file mode 100644 index 0000000..e7402ad --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/EvaluationDetailsOptionMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FileStationMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FileStationMapper.java new file mode 100644 index 0000000..bf07a45 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/FileStationMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.FileStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:12 + */ +public interface FileStationMapper extends BaseMapper { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/ImageStationMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/ImageStationMapper.java new file mode 100644 index 0000000..a4d0872 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/ImageStationMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.ImageStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:12 + */ +public interface ImageStationMapper extends BaseMapper { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.java new file mode 100644 index 0000000..90f6eea --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.StationEvaluation; + +/** + *

+ * 电站评分表 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface StationEvaluationMapper extends BaseMapper { + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.xml new file mode 100644 index 0000000..beaffa0 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationEvaluationMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.java index 7a3824b..5795087 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.java @@ -6,6 +6,7 @@ import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; import com.hnac.hzims.operational.station.vo.RefDomainOrStationVo; import com.hnac.hzims.operational.station.vo.StationAndDeptVo; +import com.hnac.hzims.operational.station.vo.StationsVo; import org.apache.ibatis.annotations.Param; import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; @@ -274,4 +275,7 @@ public interface StationMapper extends UserDataScopeBaseMapper { Integer getStationMaxOrder(); List getStationCount(); + + + List stationVoCount(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.xml index d21120e..c955341 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/StationMapper.xml @@ -2,6 +2,7 @@ + + + + + diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoStationMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoStationMapper.java new file mode 100644 index 0000000..7e8d6e7 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/mapper/VideoStationMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.station.entity.VideoStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:12 + */ +public interface VideoStationMapper extends BaseMapper { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EstimateService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EstimateService.java new file mode 100644 index 0000000..f11a28f --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EstimateService.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.Estimate; + +import java.util.Map; + +/** + *

+ * 总体评分附表 服务类 + *

+ * + * @author dfy + * @since 2023-08-23 + */ +public interface EstimateService extends IService { + + + /** + * 查询列表数据 + * @return + */ + Map selectEstimateList(); + +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsOptionService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsOptionService.java new file mode 100644 index 0000000..0a5e238 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsOptionService.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; + +import java.util.List; + +/** + *

+ * 选择表 服务类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface EvaluationDetailsOptionService extends IService { + + + /** + * 根据描述id获取选择信息 + * @param evaluationDetailsId + * @return + */ + List selectEvaluationDetailsOptionByStationEvaluationId(Long evaluationDetailsId); +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsService.java new file mode 100644 index 0000000..052d921 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/EvaluationDetailsService.java @@ -0,0 +1,48 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.EvaluationDetails; +import com.hnac.hzims.operational.station.vo.EvaluationDetailsVo; + +import java.util.List; + +/** + *

+ * 得分事项简述 服务类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface EvaluationDetailsService extends IService { + + + + /** + * 根据电站评分表id 获取描述信息 + * @param stationEvaluationId + * @return + */ + List selectEvaluationDetailsOptionListByStationEvaluationId(Long stationEvaluationId); + + + /** + * 新增 + * @param evaluationDetailsVo + */ + void saveEvaluationDetail(EvaluationDetailsVo evaluationDetailsVo); + + + /** + * 修改 + * @param evaluationDetailsVo + */ + void updateEvaluationDetail(EvaluationDetailsVo evaluationDetailsVo); + + + /** + * 删除 + * @param id + */ + void removeEvaluationDetail(Long id); +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FileStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FileStationService.java new file mode 100644 index 0000000..11f0164 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/FileStationService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.FileStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:14 + */ +public interface FileStationService extends IService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java index 3e6ef34..fbf2ec8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java @@ -1,11 +1,13 @@ package com.hnac.hzims.operational.station.service; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzims.operational.main.vo.StationCountVo; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; import com.hnac.hzims.operational.station.vo.StationAndDeptVo; import com.hnac.hzims.operational.station.vo.StationVO; +import com.hnac.hzims.operational.station.vo.StationsQueryVo; import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; @@ -25,9 +27,11 @@ public interface IStationService extends BaseService { /** * 新建站点 - * @param req 站点信息 + * + * @param req 站点信息 + * @param updateOrAdd */ - void buildStation(StationEntity req); + void buildStation(StationEntity req, String updateOrAdd); /** * 实例化实时画面项目 @@ -137,4 +141,35 @@ public interface IStationService extends BaseService { * @return */ String selectStationById(String station); + + + /** + * 查看详情 + * @param id + * @return + */ + StationEntity getByStationId(Long id); + + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + * @param stationEntityPage + * @param stationQueryVo + * @return + */ + IPage selectPageList(Page stationEntityPage, StationsQueryVo stationQueryVo); + + /** + * 获取绿色小水站电站数据 + * @return + */ + Map getCount(); + + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + * @param stationsQueryVo + * @return + */ + List selectStationsQueryList(StationsQueryVo stationsQueryVo); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/ImageStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/ImageStationService.java new file mode 100644 index 0000000..0b02e15 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/ImageStationService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.ImageStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:14 + */ +public interface ImageStationService extends IService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/StationEvaluationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/StationEvaluationService.java new file mode 100644 index 0000000..281f545 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/StationEvaluationService.java @@ -0,0 +1,37 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.StationEvaluation; +import com.hnac.hzims.operational.station.vo.OneStationEvaluationVo; + +import java.util.List; + +/** + *

+ * 电站评分表 服务类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +public interface StationEvaluationService extends IService { + + /** + * 列表展示 + * @return + */ + List selectList(); + + /** + * 根据父级Id 查询数据 + * @param parentId + * @return + */ + List selectStationEvaluationListByParentId(Long parentId); + + /** + * 删除 + * @param id + */ + void removeStationEvaluation(Long id); +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/VideoStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/VideoStationService.java new file mode 100644 index 0000000..6458766 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/VideoStationService.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.station.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.operational.station.entity.VideoStation; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:14 + */ +public interface VideoStationService extends IService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EstimateServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EstimateServiceImpl.java new file mode 100644 index 0000000..cb9f0f0 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EstimateServiceImpl.java @@ -0,0 +1,213 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.Estimate; +import com.hnac.hzims.operational.station.entity.EvaluationDetails; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; +import com.hnac.hzims.operational.station.entity.StationEvaluation; +import com.hnac.hzims.operational.station.mapper.EstimateMapper; +import com.hnac.hzims.operational.station.service.EstimateService; +import com.hnac.hzims.operational.station.service.EvaluationDetailsOptionService; +import com.hnac.hzims.operational.station.service.EvaluationDetailsService; +import com.hnac.hzims.operational.station.service.StationEvaluationService; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + *

+ * 总体评分附表 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-23 + */ +@Service +public class EstimateServiceImpl extends ServiceImpl implements EstimateService { + + + @Autowired + private StationEvaluationService stationEvaluationService; + + + @Autowired + private EvaluationDetailsService evaluationDetailsService; + + + @Autowired + private EvaluationDetailsOptionService evaluationDetailsOptionService; + + private static Map cacheMap = new HashMap<>(); + + /** + * 查询列表数据 + * + * @return + */ + @Override + public Map selectEstimateList() { + Map result = new HashMap<>(); + //获取所有数据 + List estimates = baseMapper.selectList(null); + result.put("estimate", estimates); + int num = 0; + for (Estimate estimate : estimates) { + Boolean checked = estimate.getChecked(); + if (checked) { + num++; + } + } + //如果num==0 不会执行下面的代码 + if (num == 0) { + return result; + } + + + //生态环境 + int ecologicalNum = 0; + //社会 + int societyNum = 0; + //管理 + int administrationNum = 0; + //经济 + int economicsNum = 0; + //水文形式 + int hydrologicalNum = 0; + cacheMap.put("hydrologicalNum", 0); + + List stationEvaluations = stationEvaluationService.selectStationEvaluationListByParentId(0L); + for (StationEvaluation stationEvaluation : stationEvaluations) { + + String evaluationName = stationEvaluation.getEvaluationName(); + switch (evaluationName) { + case "生态环境": + ecologicalNum = getStationEvaluationCount(stationEvaluation, hydrologicalNum); + break; + case "社会": + societyNum = getStationEvaluationCount(stationEvaluation, null); + break; + case "管理": + administrationNum = getStationEvaluationCount(stationEvaluation, null); + break; + case "经济": + economicsNum = getStationEvaluationCount(stationEvaluation, null); + break; + default: + System.err.println("输入错误"); + break; + } + } + + result.put("ecologicalNum", ecologicalNum); + result.put("societyNum", societyNum); + result.put("administrationNum", administrationNum); + result.put("economicsNum", economicsNum); + + + //如果num == estimates.size() 就是绿色小水电 + hydrologicalNum = cacheMap.get("hydrologicalNum"); + //总数 + int count = ecologicalNum + societyNum + administrationNum + economicsNum; + result.put("count", count); + + if (count >= 85 && hydrologicalNum >= 12) { + result.put("smallHydropower", true); + } else { + result.put("smallHydropower", false); + } + return result; + } + + + /** + * 统计 + * + * @param stationEvaluation + * @param hydrologicalNum + * @return + */ + private int getStationEvaluationCount(StationEvaluation stationEvaluation, Integer hydrologicalNum) { + int count = 0; + List newStationEvaluations = new ArrayList<>(); + List stationEvaluations = stationEvaluationService.selectStationEvaluationListByParentId(stationEvaluation.getId()); + for (StationEvaluation evaluation : stationEvaluations) { + List selectedStationEvaluationListByParentId = stationEvaluationService.selectStationEvaluationListByParentId(evaluation.getId()); + newStationEvaluations.addAll(selectedStationEvaluationListByParentId); + } + + + List collect = newStationEvaluations.stream().map(StationEvaluation::getId).collect(Collectors.toList()); + + QueryWrapper detailsQueryWrapper = new QueryWrapper<>(); + detailsQueryWrapper.lambda().in(EvaluationDetails::getStationEvaluationId, collect); + List evaluationDetailsList = evaluationDetailsService.list(detailsQueryWrapper); + + for (EvaluationDetails evaluationDetails : evaluationDetailsList) { + if (evaluationDetails.getChecked() != null && evaluationDetails.getChecked()) { + count += evaluationDetails.getGrade(); + } + + QueryWrapper evaluationDetailsOptionQueryWrapper = new QueryWrapper<>(); + evaluationDetailsOptionQueryWrapper.lambda().eq(EvaluationDetailsOption::getEvaluationDetailsId + , evaluationDetails.getId()); + List evaluationDetailsOptions = + evaluationDetailsOptionService.list(evaluationDetailsOptionQueryWrapper); + if (CollectionUtils.isNotEmpty(evaluationDetailsOptions)) { + for (EvaluationDetailsOption evaluationDetailsOption : evaluationDetailsOptions) { + if (evaluationDetailsOption.getOptionChecked()) { + count += evaluationDetailsOption.getOptionGrade(); + } + } + } + } + + + if (hydrologicalNum != null) { + newStationEvaluations.clear(); + stationEvaluations = stationEvaluationService.selectStationEvaluationListByParentId(stationEvaluation.getId()); + List evaluations = stationEvaluations.stream().filter(item -> "水文形势".equals(item.getEvaluationName())).collect(Collectors.toList()); + for (StationEvaluation evaluation : evaluations) { + List selectedStationEvaluationListByParentId = stationEvaluationService.selectStationEvaluationListByParentId(evaluation.getId()); + newStationEvaluations.addAll(selectedStationEvaluationListByParentId); + } + + collect = newStationEvaluations.stream().map(StationEvaluation::getId).collect(Collectors.toList()); + + detailsQueryWrapper = new QueryWrapper<>(); + detailsQueryWrapper.lambda().in(EvaluationDetails::getStationEvaluationId, collect); + evaluationDetailsList = evaluationDetailsService.list(detailsQueryWrapper); + + + for (EvaluationDetails evaluationDetails : evaluationDetailsList) { + if (evaluationDetails.getChecked() != null && evaluationDetails.getChecked()) { + hydrologicalNum = evaluationDetails.getGrade(); + } + + QueryWrapper evaluationDetailsOptionQueryWrapper = new QueryWrapper<>(); + evaluationDetailsOptionQueryWrapper.lambda().eq(EvaluationDetailsOption::getEvaluationDetailsId + , evaluationDetails.getId()); + List evaluationDetailsOptions = + evaluationDetailsOptionService.list(evaluationDetailsOptionQueryWrapper); + if (CollectionUtils.isNotEmpty(evaluationDetailsOptions)) { + for (EvaluationDetailsOption evaluationDetailsOption : evaluationDetailsOptions) { + if (evaluationDetailsOption.getOptionChecked()) { + hydrologicalNum = evaluationDetailsOption.getOptionGrade(); + } + } + } + } + cacheMap.put("hydrologicalNum", hydrologicalNum); + + } + + + return count; + } +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsOptionServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsOptionServiceImpl.java new file mode 100644 index 0000000..63671cb --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsOptionServiceImpl.java @@ -0,0 +1,36 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; +import com.hnac.hzims.operational.station.mapper.EvaluationDetailsOptionMapper; +import com.hnac.hzims.operational.station.service.EvaluationDetailsOptionService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + *

+ * 选择表 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Service +public class EvaluationDetailsOptionServiceImpl extends ServiceImpl implements EvaluationDetailsOptionService { + + + /** + * 根据描述id获取选择信息 + * + * @param evaluationDetailsId + * @return + */ + @Override + public List selectEvaluationDetailsOptionByStationEvaluationId(Long evaluationDetailsId) { + + return new LambdaQueryChainWrapper<>(baseMapper).eq(EvaluationDetailsOption::getEvaluationDetailsId, + evaluationDetailsId).list(); + } +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsServiceImpl.java new file mode 100644 index 0000000..ad6fb6b --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/EvaluationDetailsServiceImpl.java @@ -0,0 +1,125 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.EvaluationDetails; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; +import com.hnac.hzims.operational.station.mapper.EvaluationDetailsMapper; +import com.hnac.hzims.operational.station.service.EvaluationDetailsOptionService; +import com.hnac.hzims.operational.station.service.EvaluationDetailsService; +import com.hnac.hzims.operational.station.vo.EvaluationDetailsOptionVo; +import com.hnac.hzims.operational.station.vo.EvaluationDetailsVo; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 得分事项简述 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Service +public class EvaluationDetailsServiceImpl extends ServiceImpl implements EvaluationDetailsService { + + + @Autowired + private EvaluationDetailsOptionService evaluationDetailsOptionService; + + @Autowired + private EvaluationDetailsOptionService optionService; + + + /** + * 根据电站评分表id 获取描述信息 + * + * @param stationEvaluationId + * @return + */ + @Override + public List selectEvaluationDetailsOptionListByStationEvaluationId(Long stationEvaluationId) { + return new LambdaQueryChainWrapper<>(baseMapper).eq(EvaluationDetails::getStationEvaluationId, + stationEvaluationId).list(); + } + + /** + * 新增 + * + * @param evaluationDetailsVo + */ + @Override + public void saveEvaluationDetail(EvaluationDetailsVo evaluationDetailsVo) { + //新增描述 + EvaluationDetails evaluationDetails = new EvaluationDetails(); + BeanUtils.copyProperties(evaluationDetailsVo, evaluationDetails); + baseMapper.insert(evaluationDetails); + + List evaluationDetailsOptionVos = evaluationDetailsVo.getEvaluationDetailsOptionVos(); + if (CollectionUtils.isEmpty(evaluationDetailsOptionVos)) { + return; + } + //新增选项 + List detailsOptionList = evaluationDetailsOptionVos.stream().map(item -> { + EvaluationDetailsOption evaluationDetailsOption = new EvaluationDetailsOption(); + BeanUtils.copyProperties(item, evaluationDetailsOption); + return evaluationDetailsOption; + }).collect(Collectors.toList()); + + evaluationDetailsOptionService.saveBatch(detailsOptionList); + } + + /** + * 修改 + * + * @param evaluationDetailsVo + */ + @Override + public void updateEvaluationDetail(EvaluationDetailsVo evaluationDetailsVo) { + //修改描述 + EvaluationDetails evaluationDetails = new EvaluationDetails(); + BeanUtils.copyProperties(evaluationDetailsVo, evaluationDetails); + baseMapper.updateById(evaluationDetails); + + + //先删除选项 + Long id = evaluationDetailsVo.getId(); + evaluationDetailsOptionService.remove( + new LambdaQueryWrapper().eq(EvaluationDetailsOption::getEvaluationDetailsId, id)); + + + List evaluationDetailsOptionVos = evaluationDetailsVo.getEvaluationDetailsOptionVos(); + if (CollectionUtils.isEmpty(evaluationDetailsOptionVos)) { + return; + } + //新增选项 + List detailsOptionList = evaluationDetailsOptionVos.stream().map(item -> { + EvaluationDetailsOption evaluationDetailsOption = new EvaluationDetailsOption(); + BeanUtils.copyProperties(item, evaluationDetailsOption); + return evaluationDetailsOption; + }).collect(Collectors.toList()); + + evaluationDetailsOptionService.saveBatch(detailsOptionList); + } + + /** + * 删除 + * + * @param id + */ + @Override + public void removeEvaluationDetail(Long id) { + //删除描述 + baseMapper.deleteById(id); + //删除选项 + optionService.remove(new LambdaQueryWrapper() + .eq(EvaluationDetailsOption::getEvaluationDetailsId, id)); + + } +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FIleStationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FIleStationServiceImpl.java new file mode 100644 index 0000000..720e4a7 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/FIleStationServiceImpl.java @@ -0,0 +1,17 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.FileStation; +import com.hnac.hzims.operational.station.mapper.FileStationMapper; +import com.hnac.hzims.operational.station.service.FileStationService; +import org.springframework.stereotype.Service; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:17 + */ +@Service +public class FIleStationServiceImpl extends ServiceImpl implements FileStationService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImageStationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImageStationServiceImpl.java new file mode 100644 index 0000000..35e7269 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImageStationServiceImpl.java @@ -0,0 +1,17 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.ImageStation; +import com.hnac.hzims.operational.station.mapper.ImageStationMapper; +import com.hnac.hzims.operational.station.service.ImageStationService; +import org.springframework.stereotype.Service; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:17 + */ +@Service +public class ImageStationServiceImpl extends ServiceImpl implements ImageStationService { +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationEvaluationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationEvaluationServiceImpl.java new file mode 100644 index 0000000..e779108 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationEvaluationServiceImpl.java @@ -0,0 +1,306 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.EvaluationDetails; +import com.hnac.hzims.operational.station.entity.EvaluationDetailsOption; +import com.hnac.hzims.operational.station.entity.StationEvaluation; +import com.hnac.hzims.operational.station.mapper.StationEvaluationMapper; +import com.hnac.hzims.operational.station.service.EvaluationDetailsOptionService; +import com.hnac.hzims.operational.station.service.EvaluationDetailsService; +import com.hnac.hzims.operational.station.service.StationEvaluationService; +import com.hnac.hzims.operational.station.vo.*; +import org.apache.commons.collections4.CollectionUtils; +import org.springblade.core.log.exception.ServiceException; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 电站评分表 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-16 + */ +@Service +public class StationEvaluationServiceImpl extends ServiceImpl implements StationEvaluationService { + + @Autowired + private EvaluationDetailsService detailsService; + + + @Autowired + private EvaluationDetailsOptionService optionService; + + + /** + * 根据父级Id 查询数据 + * + * @param parentId + * @return + */ + @Override + public List selectStationEvaluationListByParentId(Long parentId) { + return new LambdaQueryChainWrapper<>(baseMapper) + .eq(StationEvaluation::getParentId, parentId).list(); + } + + /** + * 删除 + * + * @param id + */ + @Override + public void removeStationEvaluation(Long id) { + StationEvaluation stationEvaluation = baseMapper.selectById(id); + if (stationEvaluation == null) { + throw new ServiceException("删除的数据不存在"); + } + if (stationEvaluation.getLevel() == 1) { + deleteOneStationEvaluationLevel(stationEvaluation); + } + + + if (stationEvaluation.getLevel() == 2) { + deleteTwoStationEvaluationLevel(stationEvaluation); + } + + if (stationEvaluation.getLevel() == 3) { + deleteThreeStationEvaluationLevel(stationEvaluation); + } + } + /** + * 删除所有跟三级相关联的数据 + * @param stationEvaluation + */ + private void deleteThreeStationEvaluationLevel(StationEvaluation stationEvaluation) { + //先删除三级 + baseMapper.deleteById(stationEvaluation.getId()); + List stationEvaluations = this.selectStationEvaluationListByParentId(stationEvaluation.getId()); + + //删除描述信息 + deleteStationEvaluation(stationEvaluations); + + } + + + /** + * 删除所有跟二级相关联的数据 + * @param stationEvaluation + */ + private void deleteTwoStationEvaluationLevel(StationEvaluation stationEvaluation) { + //先删除一级 + baseMapper.deleteById(stationEvaluation.getId()); + + List stationEvaluations = this.selectStationEvaluationListByParentId(stationEvaluation.getId()); + if (CollectionUtils.isEmpty(stationEvaluations)) { + return; + } + //查询3及的数据删除 + for (StationEvaluation evaluation : stationEvaluations) { + stationEvaluations = this.selectStationEvaluationListByParentId(evaluation.getId()); + List collect = stationEvaluations.stream().map(StationEvaluation::getId).collect(Collectors.toList()); + this.removeByIds(collect); + } + + + if (CollectionUtils.isEmpty(stationEvaluations)) { + return; + } + + //删除描述信息 + deleteStationEvaluation(stationEvaluations); + } + + + /** + * 删除所有跟一级相关联的数据 + */ + private void deleteOneStationEvaluationLevel(StationEvaluation stationEvaluation) { + //先删除一级 + baseMapper.deleteById(stationEvaluation.getId()); + + List stationEvaluations = this.selectStationEvaluationListByParentId(stationEvaluation.getId()); + if (CollectionUtils.isEmpty(stationEvaluations)) { + return; + } + //查询2及的数据删除 + for (StationEvaluation evaluation : stationEvaluations) { + stationEvaluations = this.selectStationEvaluationListByParentId(evaluation.getId()); + List collect = stationEvaluations.stream().map(StationEvaluation::getId).collect(Collectors.toList()); + this.removeByIds(collect); + } + + + if (CollectionUtils.isEmpty(stationEvaluations)) { + return; + } + //查询3级的数据删除 + for (StationEvaluation evaluation : stationEvaluations) { + stationEvaluations = this.selectStationEvaluationListByParentId(evaluation.getId()); + List collect = stationEvaluations.stream().map(StationEvaluation::getId).collect(Collectors.toList()); + this.removeByIds(collect); + } + + if (CollectionUtils.isEmpty(stationEvaluations)) { + return; + } + //删除描述信息 + deleteStationEvaluation(stationEvaluations); + + } + + private void deleteStationEvaluation(List stationEvaluations) { + List evaluationDetailsList = null; + //查看描述信息删除 + for (StationEvaluation evaluation : stationEvaluations) { + evaluationDetailsList = detailsService.list( + new LambdaQueryWrapper().eq(EvaluationDetails::getStationEvaluationId, + evaluation.getId())); + List collect = evaluationDetailsList.stream().map(EvaluationDetails::getId).collect(Collectors.toList()); + detailsService.removeByIds(collect); + } + + //查看描述选项信息删除 + if (CollectionUtils.isEmpty(evaluationDetailsList)) { + return; + } + + for (EvaluationDetails evaluationDetails : evaluationDetailsList) { + List list = optionService.list(new LambdaQueryWrapper().eq(EvaluationDetailsOption::getEvaluationDetailsId, + evaluationDetails.getId())); + List collect = list.stream().map(EvaluationDetailsOption::getId).collect(Collectors.toList()); + optionService.removeByIds(collect); + } + } + + + /** + * 列表展示 + * + * @return + */ + @Override + public List selectList() { + List stationEvaluations = this.selectStationEvaluationListByParentId(0L); + //获取以一级的数据 + List collect = stationEvaluations.stream().map(item -> { + OneStationEvaluationVo oneStationEvaluationVo = getOneStationEvaluationVo(item); + return oneStationEvaluationVo; + }).collect(Collectors.toList()); + return collect; + } + + + /** + * 获取一级数据 + * + * @param item + * @return + */ + private OneStationEvaluationVo getOneStationEvaluationVo(StationEvaluation item) { + OneStationEvaluationVo oneStationEvaluationVo = new OneStationEvaluationVo(); + BeanUtils.copyProperties(item, oneStationEvaluationVo); + //获取二级的数据 + List twoStationEvaluations = + this.selectStationEvaluationListByParentId(item.getId()); + if (CollectionUtils.isNotEmpty(twoStationEvaluations)) { + List twoStationEvaluationVos = getTwoStationEvaluationVos(twoStationEvaluations); + oneStationEvaluationVo.setChildren(twoStationEvaluationVos); + } + return oneStationEvaluationVo; + } + + + /** + * 获取二级数据 + * + * @param twoStationEvaluations + * @return + */ + private List getTwoStationEvaluationVos(List twoStationEvaluations) { + List twoStationEvaluationVos = + twoStationEvaluations.stream().map(item1 -> { + TwoStationEvaluationVo twoStationEvaluationVo = new TwoStationEvaluationVo(); + BeanUtils.copyProperties(item1, twoStationEvaluationVo); + //获取3级数据 + List threeStationEvaluationVoList = getThreeStationEvaluationVos(item1); + if (CollectionUtils.isNotEmpty(threeStationEvaluationVoList)) { + twoStationEvaluationVo.setChildren(threeStationEvaluationVoList); + } + return twoStationEvaluationVo; + }).collect(Collectors.toList()); + return twoStationEvaluationVos; + } + + + /** + * 获取三级数据 + * + * @param item1 + * @return + */ + private List getThreeStationEvaluationVos(StationEvaluation item1) { + List threeStationEvaluations = + this.selectStationEvaluationListByParentId(item1.getId()); + if (CollectionUtils.isEmpty(threeStationEvaluations)) { + return null; + } + List threeStationEvaluationVoList = + threeStationEvaluations.stream().map(item2 -> { + ThreeStationEvaluationVo threeStationEvaluationVo = + new ThreeStationEvaluationVo(); + BeanUtils.copyProperties(item2, threeStationEvaluationVo); + + Long stationEvaluationId = item2.getId(); + //获取描述信息 + List evaluationDetailsVoList = getEvaluationDetailsVos(stationEvaluationId); + if (CollectionUtils.isNotEmpty(evaluationDetailsVoList)) { + threeStationEvaluationVo.setEvaluationDetailsVos(evaluationDetailsVoList); + } + return threeStationEvaluationVo; + }).collect(Collectors.toList()); + return threeStationEvaluationVoList; + } + + + /** + * 获取描述信息及选择信息 + * + * @param stationEvaluationId + * @return + */ + private List getEvaluationDetailsVos(Long stationEvaluationId) { + List details = + detailsService.selectEvaluationDetailsOptionListByStationEvaluationId(stationEvaluationId); + if (CollectionUtils.isEmpty(details)) { + return null; + } + List evaluationDetailsVoList = details.stream().map(item3 -> { + EvaluationDetailsVo evaluationDetailsVo = new EvaluationDetailsVo(); + BeanUtils.copyProperties(item3, evaluationDetailsVo); + //获取选择信息 + Long evaluationDetailsId = item3.getId(); + List detailsOptions = + optionService.selectEvaluationDetailsOptionByStationEvaluationId(evaluationDetailsId); + if (CollectionUtils.isNotEmpty(detailsOptions)) { + List evaluationDetailsOptionVoList = detailsOptions.stream().map(item4 -> { + EvaluationDetailsOptionVo evaluationDetailsOptionVo = new EvaluationDetailsOptionVo(); + BeanUtils.copyProperties(item4, evaluationDetailsOptionVo); + + return evaluationDetailsOptionVo; + }).collect(Collectors.toList()); + + evaluationDetailsVo.setEvaluationDetailsOptionVos(evaluationDetailsOptionVoList); + } + return evaluationDetailsVo; + }).collect(Collectors.toList()); + return evaluationDetailsVoList; + } +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 37d83d0..5fc6b17 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -5,27 +5,20 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.google.common.collect.Lists; import com.hnac.hzims.common.service.UserAuthDataService; import com.hnac.hzims.fdp.feign.IQuestionClient; -import com.hnac.hzims.hzimsweather.response.air.Station; import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.main.vo.StationCountVo; import com.hnac.hzims.operational.station.StationConstants; import com.hnac.hzims.operational.main.constant.HomePageConstant; import com.hnac.hzims.operational.station.dto.StationPushConfigDTO; -import com.hnac.hzims.operational.station.entity.ControlUsersEntity; -import com.hnac.hzims.operational.station.entity.StationEntity; -import com.hnac.hzims.operational.station.entity.StationPushConfigEntity; +import com.hnac.hzims.operational.station.entity.*; import com.hnac.hzims.operational.station.mapper.ControlUsersMapper; import com.hnac.hzims.operational.station.mapper.StationMapper; -import com.hnac.hzims.operational.station.service.IStationAttributeService; -import com.hnac.hzims.operational.station.service.IStationPushConfigService; -import com.hnac.hzims.operational.station.service.IStationService; -import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; -import com.hnac.hzims.operational.station.vo.StationAndDeptVo; -import com.hnac.hzims.operational.station.vo.StationPushConfigVO; -import com.hnac.hzims.operational.station.vo.StationVO; +import com.hnac.hzims.operational.station.service.*; +import com.hnac.hzims.operational.station.vo.*; import com.hnac.hzims.operational.station.wrapper.StationWrapper; /*import com.hnac.hzinfo.sdk.core.response.Result; import com.hnac.hzinfo.sdk.v5.project.ProjectClient; @@ -36,6 +29,7 @@ import com.hnac.hzinfo.sdk.v5.project.ProjectClient; import com.hnac.hzinfo.sdk.v5.project.dto.ProjectDTO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.logger.BladeLogger; @@ -58,9 +52,8 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; +import java.time.Year; import java.util.*; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; import java.util.stream.Collectors; /** @@ -80,8 +73,13 @@ public class StationServiceImpl extends BaseServiceImpllambdaQuery() @@ -105,6 +103,49 @@ public class StationServiceImpl extends BaseServiceImpl().eq(VideoStation::getStationId, + req.getId())); + //图片 + imageStationService.remove(new LambdaQueryWrapper().eq(ImageStation::getStationId, + req.getId())); + //文件 + fileStationService.remove(new LambdaQueryWrapper().eq(FileStation::getStationId, + req.getId())); + } + + + //视频 + List videoStationList = req.getVideoStationList(); + if (CollectionUtils.isNotEmpty(videoStationList)) { + List collect = videoStationList.stream().map(item -> { + item.setStationId(req.getId()); + return item; + }).collect(Collectors.toList()); + videoStationService.saveOrUpdateBatch(collect); + } + //图片 + List imageStationList = req.getImageStationList(); + if (CollectionUtils.isNotEmpty(imageStationList)) { + List collect = imageStationList.stream().map(item -> { + item.setStationId(req.getId()); + return item; + }).collect(Collectors.toList()); + imageStationService.saveOrUpdateBatch(collect); + } + //文件 + List fileStationList = req.getFileStationList(); + if (CollectionUtils.isNotEmpty(fileStationList)) { + List collect = fileStationList.stream().map(item -> { + item.setStationId(req.getId()); + return item; + }).collect(Collectors.toList()); + fileStationService.saveOrUpdateBatch(collect); + } } /** @@ -174,6 +215,34 @@ public class StationServiceImpl extends BaseServiceImpl videoStationList = + videoStationService.list(new LambdaQueryWrapper().eq(VideoStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(videoStationList)) { + List collect = videoStationList.stream().map(VideoStation::getId).collect(Collectors.toList()); + videoStationService.removeByIds(collect); + } + + + //删除文件 + List fileStationList = + fileStationService.list(new LambdaQueryWrapper().eq(FileStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(fileStationList)) { + List collect = fileStationList.stream().map(FileStation::getId).collect(Collectors.toList()); + fileStationService.removeByIds(collect); + } + + //删除图片 + List imageStationList = + imageStationService.list(new LambdaQueryWrapper().eq(ImageStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(imageStationList)) { + List collect = imageStationList.stream().map(ImageStation::getId).collect(Collectors.toList()); + imageStationService.removeByIds(collect); + } + return saveFlag; } @@ -726,4 +795,122 @@ public class StationServiceImpl extends BaseServiceImpl videoStationList = + videoStationService.list(new LambdaQueryWrapper().eq(VideoStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(videoStationList)) { + stationEntity.setVideoStationList(videoStationList); + } + + //获取文件 + List fileStationList = + fileStationService.list(new LambdaQueryWrapper().eq(FileStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(fileStationList)) { + stationEntity.setFileStationList(fileStationList); + } + + //获取图片 + List imageStationList = + imageStationService.list(new LambdaQueryWrapper().eq(ImageStation::getStationId, id)); + if (CollectionUtil.isNotEmpty(imageStationList)) { + stationEntity.setImageStationList(imageStationList); + } + return stationEntity; + } + + + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + * + * @param stationEntityPage + * @param stationQueryVo + * @return + */ + @Override + public IPage selectPageList(Page stationEntityPage, StationsQueryVo stationQueryVo) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + + + Page resultStationEntity = baseMapper.selectPage(stationEntityPage, queryWrapper); + + + return resultStationEntity; + } + + + + + /** + * 获取绿色小水站电站数据 + * + * @return + */ + @Override + public Map getCount() { + Map resultMap = new HashMap<>(); + List stationVoList = baseMapper.stationVoCount(); + + + List yesterday = new ArrayList<>(); + Year year = Year.now(); + for (int i = 0; i < 6; i++) { + Year newYear = year.minusYears(i); + yesterday.add(newYear.getValue()); + } + + + for (StationsVo stationVo : stationVoList) { + Integer stationVoYear = stationVo.getYear(); + //包含删除 + if (yesterday.contains(stationVoYear)) { + yesterday.remove(stationVoYear); + } + } + + + for (Integer i : yesterday) { + StationsVo stationVo = new StationsVo(); + stationVo.setYear(i); + stationVo.setCount(0); + stationVoList.add(stationVo); + } + + + //月份 + List yearList = stationVoList.stream().map(StationsVo::getYear).collect(Collectors.toList()); + resultMap.put("yearList", yearList); + resultMap.put("stationVoList", stationVoList); + + + return resultMap; + } + + + /** + * 对全县绿色水电站在水电GIS一张图上进行展示,直观展现绿色小水电站的分布信息。 + * + * @param stationsQueryVo + * @return + */ + @Override + public List selectStationsQueryList(StationsQueryVo stationsQueryVo) { + + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(stationsQueryVo.getAreaCode()), + StationEntity::getAreaCode, + stationsQueryVo.getAreaCode()); + return baseMapper.selectList(lambdaQueryWrapper); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/VideoStationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/VideoStationServiceImpl.java new file mode 100644 index 0000000..8681c90 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/VideoStationServiceImpl.java @@ -0,0 +1,17 @@ +package com.hnac.hzims.operational.station.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.operational.station.entity.VideoStation; +import com.hnac.hzims.operational.station.mapper.VideoStationMapper; +import com.hnac.hzims.operational.station.service.VideoStationService; +import org.springframework.stereotype.Service; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/8 16:17 + */ +@Service +public class VideoStationServiceImpl extends ServiceImpl implements VideoStationService { +} diff --git a/hzims-service/operational/src/main/resources/db/2.0.0.sql b/hzims-service/operational/src/main/resources/db/2.0.0.sql new file mode 100644 index 0000000..ed6994c --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.0.sql @@ -0,0 +1,32 @@ +alter table hzims_station add discharge_facilities varchar(100) null comment '生态流量泄放设施'; +alter table hzims_station add monitoring_mode varchar(100) null comment '监测方式'; +alter table hzims_station add is_power_station tinyint(0) comment '是否绿色小水电示范电站 0 否 1 是'; + +create table video_station( + id bigint primary key auto_increment comment '图片id', + video varchar(300) not null comment '视频地址', + station_id bigint not null comment '站点ID', + create_time datetime default CURRENT_TIMESTAMP, + update_time datetime default current_timestamp on update current_timestamp, + is_deleted tinyint default 0 comment '0 正常 1 删除' +) comment '电站视频'; + + +create table image_station( + id bigint primary key auto_increment comment '图片id', + image varchar(300) not null comment '图片地址', + station_id bigint not null comment '站点ID', + create_time datetime default CURRENT_TIMESTAMP, + update_time datetime default current_timestamp on update current_timestamp, + is_deleted tinyint default 0 comment '0 正常 1 删除' +) comment '电站图片'; + + +create table file_station( + id bigint primary key auto_increment comment '图片id', + file varchar(300) not null comment '文件地址', + station_id bigint not null comment '站点ID', + create_time datetime default CURRENT_TIMESTAMP, + update_time datetime default current_timestamp on update current_timestamp, + is_deleted tinyint default 0 comment '0 正常 1 删除' +) comment '电站文件'; diff --git a/hzims-service/operational/src/main/resources/db/2.0.1.sql b/hzims-service/operational/src/main/resources/db/2.0.1.sql new file mode 100644 index 0000000..cdda729 --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.1.sql @@ -0,0 +1 @@ +alter table hzims_station add discharge_value varchar(60) comment '核定值'; \ No newline at end of file diff --git a/hzims-service/operational/src/main/resources/db/2.0.2.sql b/hzims-service/operational/src/main/resources/db/2.0.2.sql new file mode 100644 index 0000000..c77de2b --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.2.sql @@ -0,0 +1,39 @@ +create table station_evaluation +( + id bigint primary key auto_increment comment '编号', + evaluation_name varchar(50) comment '类别', + station_id bigint comment '站点id', + parent_id bigint comment '父级', + level int comment '等级', + minute int comment '分数', + score int comment '得分', + description text comment '描述', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '电站评分表'; + + +create table evaluation_details +( + id bigint primary key auto_increment comment '编号', + station_evaluation_id bigint comment '电站评分id', + title varchar(100) comment '选择题目', + checked tinyint(1) comment '是否选中 1 选中 0 不选中', + grade int comment '分数', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '得分事项简述'; + +create table evaluation_details_option +( + id bigint primary key auto_increment comment '编号', + option_title varchar(100) comment '题目', + option_checked tinyint(1) comment '是否选中 1 选中 0 不选中', + option_grade int comment '分数', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '选择表'; + diff --git a/hzims-service/operational/src/main/resources/db/2.0.3.sql b/hzims-service/operational/src/main/resources/db/2.0.3.sql new file mode 100644 index 0000000..81f45b1 --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.3.sql @@ -0,0 +1,2 @@ + +alter table evaluation_details_option add evaluation_details_id bigint comment '得分事项简述id'; \ No newline at end of file diff --git a/hzims-service/operational/src/main/resources/db/2.0.4.sql b/hzims-service/operational/src/main/resources/db/2.0.4.sql new file mode 100644 index 0000000..b9d2517 --- /dev/null +++ b/hzims-service/operational/src/main/resources/db/2.0.4.sql @@ -0,0 +1,9 @@ +create table estimate( + id bigint primary key auto_increment, + name varchar(200) comment '基本条件', + checked tinyint(1) comment '0 为选择 1 为选中', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' + +) comment '总体评分附表'; \ No newline at end of file diff --git a/hzims-service/pom.xml b/hzims-service/pom.xml index e61f072..e69bc7f 100644 --- a/hzims-service/pom.xml +++ b/hzims-service/pom.xml @@ -27,6 +27,12 @@ weather hzims-middle hzims-scheduled + base-info + digital-twin-display + dam-safety + video-image + water-quality + water-rain diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/controller/HiddenDangerController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/controller/HiddenDangerController.java new file mode 100644 index 0000000..bea8663 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/controller/HiddenDangerController.java @@ -0,0 +1,63 @@ +package com.hnac.hzims.safeproduct.hiddendanger.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.hiddendanger.entity.HiddenDanger; +import com.hnac.hzims.safeproduct.hiddendanger.service.HiddenDangerService; +import com.hnac.hzims.safeproduct.hiddendanger.vo.HiddenDangerQueryVo; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RequiredArgsConstructor +@RestController +@RequestMapping("/hiddendanger") +public class HiddenDangerController { + + @Autowired + HiddenDangerService hiddenDangerService; + + /** + * 分页查询 + */ + @GetMapping("/listPage/{page}/{size}") + public R listPage(@PathVariable Long page, + @PathVariable Long size, + HiddenDangerQueryVo hiddenDangerQueryVo) { + Page pageParam = new Page<>(page, size); + IPage resultParams = + hiddenDangerService.selectPage(pageParam, + hiddenDangerQueryVo); + return R.data(resultParams); + } + + /** + * 新增指标项管理 + */ + @PostMapping("/save") + public R save(@RequestBody HiddenDanger hiddenDanger) { + hiddenDangerService.save(hiddenDanger); + return R.success("新增成功"); + } + + + /** + * 更新指标项管理 + */ + @PutMapping("/update") + public R update(@RequestBody HiddenDanger hiddenDanger) { + hiddenDangerService.updateById(hiddenDanger); + return R.success("修改成功"); + } + + + /** + * 删除指标项管理 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + hiddenDangerService.removeById(id); + return R.success("删除成功"); + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/mapper/HiddenDangerMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/mapper/HiddenDangerMapper.java new file mode 100644 index 0000000..a7a4c7a --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/mapper/HiddenDangerMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.safeproduct.hiddendanger.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.safeproduct.hiddendanger.entity.HiddenDanger; + +public interface HiddenDangerMapper extends BaseMapper { +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/HiddenDangerService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/HiddenDangerService.java new file mode 100644 index 0000000..35b3dc9 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/HiddenDangerService.java @@ -0,0 +1,19 @@ +package com.hnac.hzims.safeproduct.hiddendanger.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.safeproduct.hiddendanger.entity.HiddenDanger; +import com.hnac.hzims.safeproduct.hiddendanger.vo.HiddenDangerQueryVo; + +public interface HiddenDangerService extends IService { + + + /** + * 分页查询 + * @param pageParam + * @param hiddenDangerQueryVo + * @return + */ + IPage selectPage(Page pageParam, HiddenDangerQueryVo hiddenDangerQueryVo); +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/impl/HiddenDangerServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/impl/HiddenDangerServiceImpl.java new file mode 100644 index 0000000..2632dbc --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hiddendanger/service/impl/HiddenDangerServiceImpl.java @@ -0,0 +1,27 @@ +package com.hnac.hzims.safeproduct.hiddendanger.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.hiddendanger.entity.HiddenDanger; +import com.hnac.hzims.safeproduct.hiddendanger.mapper.HiddenDangerMapper; +import com.hnac.hzims.safeproduct.hiddendanger.service.HiddenDangerService; +import com.hnac.hzims.safeproduct.hiddendanger.vo.HiddenDangerQueryVo; +import org.springframework.stereotype.Service; + +@Service +public class HiddenDangerServiceImpl extends ServiceImpl implements HiddenDangerService { + @Override + public IPage selectPage(Page pageParam, HiddenDangerQueryVo hiddenDangerQueryVo) { + String dangerBehavior = hiddenDangerQueryVo.getDangerBehavior(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(dangerBehavior)) { + queryWrapper.like(HiddenDanger::getDangerBehavior,dangerBehavior); + } + IPage hiddenDangerIPage = baseMapper.selectPage(pageParam, queryWrapper); + + return hiddenDangerIPage; + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/DocumentManagementController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/DocumentManagementController.java new file mode 100644 index 0000000..a7ad8a2 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/DocumentManagementController.java @@ -0,0 +1,77 @@ +package com.hnac.hzims.safeproduct.management.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.management.entity.DocumentManagement; +import com.hnac.hzims.safeproduct.management.service.DocumentManagementService; +import com.hnac.hzims.safeproduct.management.service.impl.DocumentManagementServiceImpl; +import com.hnac.hzims.safeproduct.management.vo.DocumentManagementQueryVo; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementResponseVo; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +/** + *

+ * 文档管理 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-11 + */ +@RequiredArgsConstructor +@RestController +@RequestMapping("/management/document-management") +public class DocumentManagementController { + + private final DocumentManagementService documentManagementService; + + + /** + * 分页查询文档管理 + */ + @GetMapping("/listPage/{page}/{size}") + public R listPage(@PathVariable Long page, + @PathVariable Long size, + DocumentManagementQueryVo documentManagementQueryVo) { + Page pageParam = new Page<>(page, size); + IPage resultParams = + documentManagementService.selectPage(pageParam, + documentManagementQueryVo); + return R.data(resultParams); + } + + + + /** + * 新增指标项管理 + */ + @PostMapping("/save") + public R save(@RequestBody DocumentManagement documentManagement) { + documentManagementService.save(documentManagement); + return R.success("新增文件管理成功"); + } + + + /** + * 更新指标项管理 + */ + @PutMapping("/update") + public R update(@RequestBody DocumentManagement documentManagement) { + documentManagementService.updateById(documentManagement); + return R.success("修改文件管理成功"); + } + + + /** + * 删除指标项管理 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + documentManagementService.removeById(id); + return R.success("删除文件管理成功"); + } + +} + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/IndicatorManagementController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/IndicatorManagementController.java new file mode 100644 index 0000000..6a7dc03 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/IndicatorManagementController.java @@ -0,0 +1,91 @@ +package com.hnac.hzims.safeproduct.management.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.hnac.hzims.safeproduct.management.service.IndicatorManagementService; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementQueryVo; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementResponseVo; +import groovy.util.logging.Slf4j; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; + +/** + *

+ * 指标项管理 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Slf4j +@RequiredArgsConstructor +@RestController +@RequestMapping("/management/indicator-management") +public class IndicatorManagementController { + + + private final IndicatorManagementService indicatorManagementService; + + + /** + * 分页查询列表 + */ + @GetMapping("/listPage/{page}/{size}") + public R listPage(@PathVariable Long page, + @PathVariable Long size, + IndicatorManagementQueryVo indicatorManagementQueryVo) { + Page pageSize = new Page<>(page, size); + IPage responseVoIPage = indicatorManagementService.selectPage(pageSize, indicatorManagementQueryVo); + return R.data(responseVoIPage); + } + + + /** + * 新增指标管理 + */ + @PostMapping("/save") + public R save(@RequestBody IndicatorManagementResponseVo indicatorManagementResponseVo) { + indicatorManagementService.saveIndicatorManagement(indicatorManagementResponseVo); + return R.success("新增指标项管理成功"); + } + + + /** + * 修改指标管理 + */ + @PutMapping("/update") + public R update(@RequestBody IndicatorManagementResponseVo indicatorManagementResponseVo) { + indicatorManagementService.saveIndicatorManagement(indicatorManagementResponseVo); + return R.success("修改增指标项管理成功"); + } + + + /** + * 删除指标管理 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + indicatorManagementService.removeIndicatorManagementById(id); + return R.success("删除指标项管理成功"); + } + + + /** + * 导出 + * + * @param response + */ + @GetMapping("/export") + public void export(HttpServletResponse response) { + indicatorManagementService.export(response); + } + + +} + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/RatingScaleController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/RatingScaleController.java new file mode 100644 index 0000000..c6ffaa3 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/RatingScaleController.java @@ -0,0 +1,49 @@ +package com.hnac.hzims.safeproduct.management.controller; + + +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.hnac.hzims.safeproduct.management.service.RatingScaleService; +import com.hnac.hzims.safeproduct.management.vo.RatingScaleVo; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + *

+ * 平分表 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@RestController +@RequestMapping("/management/rating-scale") +public class RatingScaleController { + + + @Autowired + private RatingScaleService ratingScaleService; + + + /** + * 评分 + */ + @PostMapping("/saveScore") + public R saveScore(@RequestBody RatingScaleVo ratingScaleVo) { + ratingScaleService.saveScore(ratingScaleVo); + return R.success("评价成功"); + } + + + /** + * 查看评价 + */ + @GetMapping("/getReviews/{indicatorManagementId}") + public R getReviews(@PathVariable Long indicatorManagementId){ + RatingScale ratingScale = ratingScaleService.selectReviews(indicatorManagementId); + return R.data(ratingScale); + } + + +} + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/TargetManagementController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/TargetManagementController.java new file mode 100644 index 0000000..3671785 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/controller/TargetManagementController.java @@ -0,0 +1,78 @@ +package com.hnac.hzims.safeproduct.management.controller; + + +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.hnac.hzims.safeproduct.management.service.TargetManagementService; +import groovy.util.logging.Slf4j; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import javax.ws.rs.GET; +import javax.xml.bind.util.JAXBSource; +import java.util.List; + +/** + *

+ * 指标管理 前端控制器 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Slf4j +@RequiredArgsConstructor +@RestController +@RequestMapping("/management/target-management") +public class TargetManagementController { + + + private final TargetManagementService targetManagementService; + + /** + * 查询列表 + */ + @GetMapping("/listTree") + public R listPage() { + List TargetManagement = targetManagementService.listPage(); + return R.data(TargetManagement); + } + + + /** + * 新增指标管理 + */ + @PostMapping("/save") + public R save(@RequestBody TargetManagement targetManagement){ + boolean save = targetManagementService.save(targetManagement); + if (!save) { + return R.fail("新增指标管理失败"); + } + return R.data(targetManagement,"新增指标管理成功"); + } + + + /** + * 修改指标管理 + */ + @PutMapping("/update") + public R update(@RequestBody TargetManagement targetManagement){ + boolean update = targetManagementService.updateById(targetManagement); + if (!update) { + return R.fail("修改指标管理失败"); + } + return R.data(targetManagement,"修改指标管理成功"); + } + + + /** + * 删除指标管理 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id){ + TargetManagement targetManagement = targetManagementService.getById(id); + targetManagementService.removeTargetManagementById(id); + return R.data(targetManagement,"删除指标管理成功"); + } +} + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMerge.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMerge.java new file mode 100644 index 0000000..bc9d88a --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMerge.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.safeproduct.management.excel; + +import java.lang.annotation.*; + +/** + * 自定义注解,用于判断是否需要合并以及合并的主键 + */ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Inherited +public @interface CustomMerge { + + /** + * 是否需要合并单元格 + */ + boolean needMerge() default false; + + /** + * 是否是主键,即该字段相同的行合并 + */ + boolean isPk() default false; +} \ No newline at end of file diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMergeStrategy.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMergeStrategy.java new file mode 100644 index 0000000..d47a30d --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/CustomMergeStrategy.java @@ -0,0 +1,167 @@ +package com.hnac.hzims.safeproduct.management.excel; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/14 14:55 + */ + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.write.handler.RowWriteHandler; +import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; +import com.alibaba.excel.write.metadata.holder.WriteTableHolder; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.util.CellRangeAddress; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +/** + * 自定义单元格合并策略 + */ +public class CustomMergeStrategy implements RowWriteHandler { + /** + * 主键下标 + */ + private Integer pkIndex; + + /** + * 需要合并的列的下标集合 + */ + private List needMergeColumnIndex = new ArrayList<>(); + + /** + * DTO数据类型 + */ + private Class elementType; + + public CustomMergeStrategy(Class elementType) { + this.elementType = elementType; + } + + /** + * Called before create the row + * + * @param writeSheetHolder + * @param writeTableHolder Nullable.It is null without using table writes. + * @param rowIndex + * @param relativeRowIndex Nullable.It is null in the case of fill data. + * @param isHead Nullable.It is null in the case of fill data. + */ + @Override + public void beforeRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Integer rowIndex, Integer relativeRowIndex, Boolean isHead) { + + } + + /** + * Called after the row is created + * + * @param writeSheetHolder + * @param writeTableHolder Nullable.It is null without using table writes. + * @param row + * @param relativeRowIndex Nullable.It is null in the case of fill data. + * @param isHead Nullable.It is null in the case of fill data. + */ + @Override + public void afterRowCreate(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) { + + } + + @Override + public void afterRowDispose(WriteSheetHolder writeSheetHolder, WriteTableHolder writeTableHolder, Row row, Integer relativeRowIndex, Boolean isHead) { + // 如果是标题,则直接返回 + if (isHead) { + return; + } + + // 获取当前sheet + Sheet sheet = writeSheetHolder.getSheet(); + + // 获取标题行 + Row titleRow = sheet.getRow(0); + + if (null == pkIndex) { + this.lazyInit(writeSheetHolder); + } + + // 判断是否需要和上一行进行合并 + // 不能和标题合并,只能数据行之间合并 + if (row.getRowNum() <= 1) { + return; + } + // 获取上一行数据 + Row lastRow = sheet.getRow(row.getRowNum() - 1); + // 将本行和上一行是同一类型的数据(通过主键字段进行判断),则需要合并 + if (lastRow.getCell(pkIndex).getStringCellValue().equalsIgnoreCase(row.getCell(pkIndex).getStringCellValue())) { + for (Integer needMerIndex : needMergeColumnIndex) { + CellRangeAddress cellRangeAddress = new CellRangeAddress(row.getRowNum() - 1, row.getRowNum(), + needMerIndex, needMerIndex); + sheet.addMergedRegionUnsafe(cellRangeAddress); + } + } + } + + /** + * 初始化主键下标和需要合并字段的下标 + */ + private void lazyInit(WriteSheetHolder writeSheetHolder) { + + // 获取当前sheet + Sheet sheet = writeSheetHolder.getSheet(); + + // 获取标题行 + Row titleRow = sheet.getRow(0); + // 获取DTO的类型 + Class eleType = this.elementType; + + // 获取DTO所有的属性 + Field[] fields = eleType.getDeclaredFields(); + + // 遍历所有的字段,因为是基于DTO的字段来构建excel,所以字段数 >= excel的列数 + for (Field theField : fields) { + // 获取@ExcelProperty注解,用于获取该字段对应在excel中的列的下标 + ExcelProperty easyExcelAnno = theField.getAnnotation(ExcelProperty.class); + // 为空,则表示该字段不需要导入到excel,直接处理下一个字段 + if (null == easyExcelAnno) { + continue; + } + // 获取自定义的注解,用于合并单元格 + CustomMerge customMerge = theField.getAnnotation(CustomMerge.class); + + // 没有@CustomMerge注解的默认不合并 + if (null == customMerge) { + continue; + } + + for (int index = 0; index < fields.length; index++) { + Cell theCell = titleRow.getCell(index); + // 当配置为不需要导出时,返回的为null,这里作一下判断,防止NPE + if (null == theCell) { + continue; + } + // 将字段和excel的表头匹配上 + if (easyExcelAnno.value()[0].equalsIgnoreCase(((Cell) theCell).getStringCellValue())) { + if (customMerge.isPk()) { + pkIndex = index; + } + + if (customMerge.needMerge()) { + needMergeColumnIndex.add(index); + } + } + } + } + + // 没有指定主键,则异常 + if (null == this.pkIndex) { + throw new IllegalStateException("使用@CustomMerge注解必须指定主键"); + } + + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/ManagementVo.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/ManagementVo.java new file mode 100644 index 0000000..b33f65d --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/excel/ManagementVo.java @@ -0,0 +1,67 @@ +package com.hnac.hzims.safeproduct.management.excel; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.write.style.ColumnWidth; +import com.alibaba.excel.annotation.write.style.ContentRowHeight; +import com.alibaba.excel.annotation.write.style.HeadRowHeight; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/14 10:34 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +// @ContentRowHeight(90) +@HeadRowHeight(40) +public class ManagementVo { + + /** + * 名称 + */ + @ColumnWidth(20) + @ExcelProperty(value = "二级项目", index = 0) + private String name; + + /** + * 项目名称 + */ + @ColumnWidth(80) + @ExcelProperty(value = "三级项目", index = 1) + private String productName; + + /** + * 标准分值 + */ + @ColumnWidth(14) + @ExcelProperty(value = "标准分值", index = 2) + private String standardScore; + + /** + * 评审方法及评分标准 + */ + @ColumnWidth(80) + @ExcelProperty(value = "评审方法及评分标准", index = 3) + private String evaluationMethod; + + + /** + * 评审描述 + */ + @ColumnWidth(80) + @ExcelProperty(value = "评审描述", index = 4) + private String reviewDescription; + + + /** + * 得分 + */ + @ColumnWidth(14) + @ExcelProperty(value = "得分", index = 5) + private String goal; +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/CustomMergeStrategyHandler.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/CustomMergeStrategyHandler.java new file mode 100644 index 0000000..0b75661 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/CustomMergeStrategyHandler.java @@ -0,0 +1,107 @@ +package com.hnac.hzims.safeproduct.management.handler; + +import cn.hutool.core.collection.CollUtil; +import com.alibaba.excel.metadata.Head; +import com.alibaba.excel.write.merge.AbstractMergeStrategy; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.util.CellRangeAddress; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.atomic.AtomicInteger; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/15 8:49 + */ +public class CustomMergeStrategyHandler extends AbstractMergeStrategy { + + /** + * 分组,每几行合并一次 + */ + private List> mergeColDataGroupCountList; + + /** + * 目标合并列index + */ + private List targetColumnIndex; + /** + * 需要开始合并单元格的首行index + */ + private Integer rowIndex; + + /** + * mergeColDataList为待合并目标列的值 + */ + public CustomMergeStrategyHandler(List> mergeColDataList, List targetColumnIndex) { + this.mergeColDataGroupCountList = getGroupCountList(mergeColDataList); + this.targetColumnIndex = targetColumnIndex; + } + + + @Override + protected void merge(Sheet sheet, Cell cell, Head head, Integer relativeRowIndex) { + + if (null == rowIndex) { + rowIndex = cell.getRowIndex(); + } + + // 仅从首行以及目标列的单元格开始合并,忽略其他 + if (cell.getRowIndex() == rowIndex && targetColumnIndex.contains(cell.getColumnIndex())) { + //找到对应的需要合并的列 + AtomicInteger i = new AtomicInteger(0); + Optional first = targetColumnIndex.stream().filter(col -> { + i.getAndIncrement(); + return col == cell.getColumnIndex(); + }).findFirst(); + mergeGroupColumn(sheet, first.get()); + } + } + + private void mergeGroupColumn(Sheet sheet, Integer index) { + int rowCount = rowIndex; + for (Integer count : mergeColDataGroupCountList.get(index)) { + if (count == 1) { + rowCount += count; + continue; + } + // 合并单元格 + CellRangeAddress cellRangeAddress = new CellRangeAddress(rowCount, rowCount + count - 1, + targetColumnIndex.get(index), targetColumnIndex.get(index)); + sheet.addMergedRegionUnsafe(cellRangeAddress); + rowCount += count; + } + } + + /** + * 该方法将目标列根据值是否相同连续可合并,存储可合并的行数 + */ + private List> getGroupCountList(List> exportDataList) { + if (CollUtil.isEmpty(exportDataList)) { + return new ArrayList<>(); + } + List> groupCountListList = new ArrayList<>(); + exportDataList.forEach(dataList -> { + List groupCountList = new ArrayList<>(); + int count = 1; + for (int i = 1; i < dataList.size(); i++) { + if (dataList.get(i).equals(dataList.get(i - 1))) { + count++; + } else { + groupCountList.add(count); + count = 1; + } + } + // 处理完最后一条后 + groupCountList.add(count); + groupCountListList.add(groupCountList); + }); + return groupCountListList; + } +} + + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/ManagementSheetWriteHandler.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/ManagementSheetWriteHandler.java new file mode 100644 index 0000000..224d999 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/handler/ManagementSheetWriteHandler.java @@ -0,0 +1,147 @@ +package com.hnac.hzims.safeproduct.management.handler; + +import com.alibaba.excel.write.handler.SheetWriteHandler; +import com.alibaba.excel.write.metadata.holder.WriteSheetHolder; +import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder; +import com.hnac.hzims.safeproduct.management.excel.ManagementVo; +import lombok.AllArgsConstructor; +import lombok.Data; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; + +import java.util.List; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/8/14 11:05 + */ +@Data +@AllArgsConstructor +public class ManagementSheetWriteHandler implements SheetWriteHandler { + + private String name; + + + private Integer count; + + + private List data; + + + /** + * Called before create the sheet + * + * @param writeWorkbookHolder + * @param writeSheetHolder + */ + @Override + public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) { + + } + + /** + * Called after the sheet is created + * + * @param writeWorkbookHolder + * @param writeSheetHolder + */ + @Override + public void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) { + Workbook workbook = writeWorkbookHolder.getWorkbook(); + CellStyle headerStyle = createHeadCellStyle(workbook); + + Sheet sheet = workbook.getSheetAt(count); + sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 5)); + + sheet.addMergedRegion(new CellRangeAddress(data.size() + 1 , data.size() +1, 0, 1)); + sheet.addMergedRegion(new CellRangeAddress(data.size() + 1 , data.size() +1, 3, 4)); + //sheet.addMergedRegion(new CellRangeAddress(0, data.size() - 1, 1, 2)); + + + Row row1 = sheet.createRow(0); + row1.setHeightInPoints((short) 35); + Cell row1Cell = row1.createCell(0); + row1Cell.setCellValue(name); + row1Cell.setCellStyle(headerStyle); + + } + + + /** + * 创建表头样式 + * + * @param wb + * @return + */ + private static CellStyle createHeadCellStyle(Workbook wb) { + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setWrapText(true);// 设置自动换行 + cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());//背景颜色 + cellStyle.setAlignment(HorizontalAlignment.CENTER); //水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER); //垂直对齐 + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyle.setBottomBorderColor(IndexedColors.BLACK.index); + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN); //左边框 + cellStyle.setBorderRight(BorderStyle.THIN); //右边框 + cellStyle.setBorderTop(BorderStyle.THIN); //上边框 + + Font headerFont = wb.createFont(); // 创建字体样式 + headerFont.setBold(true); //字体加粗 + headerFont.setFontName("黑体"); // 设置字体类型 + headerFont.setFontHeightInPoints((short) 12); // 设置字体大小 + cellStyle.setFont(headerFont); // 为标题样式设置字体样式 + + return cellStyle; + } + + + /** + * 创建内容样式 + * + * @param wb + * @return + */ + private static CellStyle createContentCellStyle(Workbook wb) { + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直居中 + cellStyle.setAlignment(HorizontalAlignment.CENTER);// 水平居中 + cellStyle.setWrapText(true);// 设置自动换行 + cellStyle.setBorderBottom(BorderStyle.THIN); //下边框 + cellStyle.setBorderLeft(BorderStyle.THIN); //左边框 + cellStyle.setBorderRight(BorderStyle.THIN); //右边框 + cellStyle.setBorderTop(BorderStyle.THIN); //上边框 + + // 生成12号字体 + Font font = wb.createFont(); + font.setColor((short) 8); + font.setFontHeightInPoints((short) 12); + cellStyle.setFont(font); + return cellStyle; + } + + + /** + * 创建标题样式 + * + * @param wb + * @return + */ + private static CellStyle createTitleCellStyle(Workbook wb) { + CellStyle cellStyle = wb.createCellStyle(); + cellStyle.setAlignment(HorizontalAlignment.CENTER);//水平居中 + cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);//垂直对齐 + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyle.setFillForegroundColor(IndexedColors.GREY_40_PERCENT.getIndex());//背景颜色 + + Font headerFont1 = wb.createFont(); // 创建字体样式 + headerFont1.setBold(true); //字体加粗 + headerFont1.setFontName("黑体"); // 设置字体类型 + headerFont1.setFontHeightInPoints((short) 15); // 设置字体大小 + cellStyle.setFont(headerFont1); // 为标题样式设置字体样式 + + return cellStyle; + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.java new file mode 100644 index 0000000..6d93dba --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.safeproduct.management.mapper; + +import com.hnac.hzims.safeproduct.management.entity.DocumentManagement; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 文档管理 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-11 + */ +public interface DocumentManagementMapper extends BaseMapper { + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.xml new file mode 100644 index 0000000..90f69ab --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/DocumentManagementMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.java new file mode 100644 index 0000000..0c5d043 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.safeproduct.management.mapper; + +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 指标项管理 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface IndicatorManagementMapper extends BaseMapper { + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.xml new file mode 100644 index 0000000..dad0674 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/IndicatorManagementMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.java new file mode 100644 index 0000000..c394e63 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.safeproduct.management.mapper; + +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 平分表 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface RatingScaleMapper extends BaseMapper { + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.xml new file mode 100644 index 0000000..81f9aaf --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/RatingScaleMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.java new file mode 100644 index 0000000..bff972d --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.safeproduct.management.mapper; + +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + *

+ * 指标管理 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface TargetManagementMapper extends BaseMapper { + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.xml b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.xml new file mode 100644 index 0000000..51dbbec --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/mapper/TargetManagementMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/DocumentManagementService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/DocumentManagementService.java new file mode 100644 index 0000000..5fe4ac5 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/DocumentManagementService.java @@ -0,0 +1,28 @@ +package com.hnac.hzims.safeproduct.management.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.management.entity.DocumentManagement; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.safeproduct.management.vo.DocumentManagementQueryVo; + +/** + *

+ * 文档管理 服务类 + *

+ * + * @author dfy + * @since 2023-08-11 + */ +public interface DocumentManagementService extends IService { + + + /** + * 分页查询文档管理 + * @param pageParam + * @param documentManagementQueryVo + * @return + */ + IPage selectPage(Page pageParam, DocumentManagementQueryVo documentManagementQueryVo); + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/IndicatorManagementService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/IndicatorManagementService.java new file mode 100644 index 0000000..8cb7b95 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/IndicatorManagementService.java @@ -0,0 +1,55 @@ +package com.hnac.hzims.safeproduct.management.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementQueryVo; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementResponseVo; + +import javax.servlet.http.HttpServletResponse; + +/** + *

+ * 指标项管理 服务类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface IndicatorManagementService extends IService { + + /** + * 分页查询列表 + * @param pageSize + * @param indicatorManagementQueryVo + * @return + */ + IPage selectPage(Page pageSize, IndicatorManagementQueryVo indicatorManagementQueryVo); + + /** + * 新增指标项管理 + * @param indicatorManagementResponseVo + */ + void saveIndicatorManagement(IndicatorManagementResponseVo indicatorManagementResponseVo); + + /** + * 修改指标项管理 + * @param indicatorManagementResponseVo + */ + void upadteIndicatorManagement(IndicatorManagementResponseVo indicatorManagementResponseVo); + + + /** + * 删除指标项管理 + */ + void removeIndicatorManagementById(Long id); + + + /** + * 导出 + * @param response + */ + void export(HttpServletResponse response); + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/RatingScaleService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/RatingScaleService.java new file mode 100644 index 0000000..dbef1ea --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/RatingScaleService.java @@ -0,0 +1,29 @@ +package com.hnac.hzims.safeproduct.management.service; + +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.safeproduct.management.vo.RatingScaleVo; + +/** + *

+ * 平分表 服务类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface RatingScaleService extends IService { + + /** + * 评分 + * @param ratingScaleVo + */ + void saveScore(RatingScaleVo ratingScaleVo); + + /** + * 查看评价 + * @param indicatorManagementId + * @return + */ + RatingScale selectReviews(Long indicatorManagementId); +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/TargetManagementService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/TargetManagementService.java new file mode 100644 index 0000000..e7166e8 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/TargetManagementService.java @@ -0,0 +1,39 @@ +package com.hnac.hzims.safeproduct.management.service; + +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + *

+ * 指标管理 服务类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +public interface TargetManagementService extends IService { + + + /** + * 指标管理树形结构 + * @return + */ + List listPage(); + + + /** + * 删除指标管理 + * @param id + * @return + */ + void removeTargetManagementById(Long id); + + /** + * 查询一级的数据 + * @return + */ + List listByParentId(Long parentId); + +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/DocumentManagementServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/DocumentManagementServiceImpl.java new file mode 100644 index 0000000..f6ddb28 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/DocumentManagementServiceImpl.java @@ -0,0 +1,44 @@ +package com.hnac.hzims.safeproduct.management.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.management.entity.DocumentManagement; +import com.hnac.hzims.safeproduct.management.mapper.DocumentManagementMapper; +import com.hnac.hzims.safeproduct.management.service.DocumentManagementService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.management.vo.DocumentManagementQueryVo; +import org.springframework.stereotype.Service; + +/** + *

+ * 文档管理 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-11 + */ +@Service +public class DocumentManagementServiceImpl extends ServiceImpl implements DocumentManagementService { + + /** + * 分页查询文档管理 + * + * @param pageParam + * @param documentManagementQueryVo + * @return + */ + @Override + public IPage selectPage(Page pageParam, DocumentManagementQueryVo documentManagementQueryVo) { + String documentName = documentManagementQueryVo.getDocumentName(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(documentName)) { + queryWrapper.eq(DocumentManagement::getDocumentName,documentName); + } + queryWrapper.orderByDesc(DocumentManagement::getCreateTime); + IPage documentManagementPage = baseMapper.selectPage(pageParam, queryWrapper); + + return documentManagementPage; + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/IndicatorManagementServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/IndicatorManagementServiceImpl.java new file mode 100644 index 0000000..82b97c3 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/IndicatorManagementServiceImpl.java @@ -0,0 +1,301 @@ +package com.hnac.hzims.safeproduct.management.service.impl; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.ExcelWriter; +import com.alibaba.excel.support.ExcelTypeEnum; +import com.alibaba.excel.write.builder.ExcelWriterBuilder; +import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder; +import com.alibaba.excel.write.merge.LoopMergeStrategy; +import com.alibaba.excel.write.metadata.WriteSheet; +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.common.logs.utils.StringUtils; +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.hnac.hzims.safeproduct.management.handler.CustomMergeStrategyHandler; +import com.hnac.hzims.safeproduct.management.handler.ManagementSheetWriteHandler; +import com.hnac.hzims.safeproduct.management.mapper.IndicatorManagementMapper; +import com.hnac.hzims.safeproduct.management.service.IndicatorManagementService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.management.service.RatingScaleService; +import com.hnac.hzims.safeproduct.management.service.TargetManagementService; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementQueryVo; +import com.hnac.hzims.safeproduct.management.vo.IndicatorManagementResponseVo; +import com.hnac.hzims.safeproduct.management.excel.ManagementVo; +import lombok.SneakyThrows; +import org.apache.commons.lang3.math.NumberUtils; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.HorizontalAlignment; +import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletResponse; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + *

+ * 指标项管理 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ + +@Service +public class IndicatorManagementServiceImpl extends ServiceImpl implements IndicatorManagementService { + + @Autowired + private TargetManagementService targetManagementService; + + @Autowired + private RatingScaleService ratingScaleService; + + /** + * 分页查询列表 + * + * @param pageSize + * @param indicatorManagementQueryVo + * @return + */ + @Override + public IPage selectPage(Page pageSize, IndicatorManagementQueryVo indicatorManagementQueryVo) { + Long targetManagementId = indicatorManagementQueryVo.getTargetManagementId(); + String productName = indicatorManagementQueryVo.getProductName(); + String startTime = indicatorManagementQueryVo.getStartTime(); + String endTime = indicatorManagementQueryVo.getEndTime(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + //指标管理id + if (ObjectUtils.isNotEmpty(targetManagementId)) { + queryWrapper.eq(IndicatorManagement::getTargetManagementId, targetManagementId); + } + //项目名称 + if (ObjectUtils.isNotEmpty(productName)) { + queryWrapper.like(IndicatorManagement::getProductName, productName); + } + + //开始时间 + if (StringUtils.isNotEmpty(startTime)) { + queryWrapper.ge(IndicatorManagement::getCreateTime, startTime); + } + + //结束时间 + if (StringUtils.isNotEmpty(endTime)) { + queryWrapper.le(IndicatorManagement::getCreateTime, startTime); + } + + queryWrapper.orderByDesc(IndicatorManagement::getCreateTime); + + IPage managementPage = baseMapper.selectPage(pageSize, queryWrapper); + //封装分页对象 + Page resultPage = new Page<>(managementPage.getCurrent(), + managementPage.getPages()); + List records = managementPage.getRecords(); + + //封装对象属性 + List responseVoList = records.stream().map(item -> { + IndicatorManagementResponseVo indicatorManagementResponseVo = new IndicatorManagementResponseVo(); + BeanUtils.copyProperties(item, indicatorManagementResponseVo); + //查询指标项名称 + TargetManagement targetManagement = targetManagementService.getById(item.getTargetManagementId()); + if (targetManagement != null) { + indicatorManagementResponseVo.setName(targetManagement.getName()); + } + //查询平方表查询 + RatingScale ratingScale = ratingScaleService.getOne(new LambdaQueryWrapper().eq(RatingScale::getIndicatorManagementId, + item.getId())); + if (ratingScale != null) { + indicatorManagementResponseVo.setGoal(ratingScale.getGoal()); + indicatorManagementResponseVo.setReviewDescription(ratingScale.getReviewDescription()); + } + return indicatorManagementResponseVo; + }).collect(Collectors.toList()); + resultPage.setRecords(responseVoList); + return resultPage; + } + + /** + * 新增指标项管理 + * + * @param indicatorManagementResponseVo + */ + @Override + public void saveIndicatorManagement(IndicatorManagementResponseVo indicatorManagementResponseVo) { + //保存指标项管理 + IndicatorManagement indicatorManagement = new IndicatorManagement(); + BeanUtils.copyProperties(indicatorManagementResponseVo, indicatorManagement); + baseMapper.insert(indicatorManagement); + //保存评分表 + // RatingScale ratingScale = new RatingScale(); + // ratingScale.setIndicatorManagementId(indicatorManagement.getId()); + // ratingScale.setGoal(indicatorManagementResponseVo.getGoal()); + // ratingScale.setReviewDescription(indicatorManagementResponseVo.getReviewDescription()); + // ratingScaleService.save(ratingScale); + } + + /** + * 修改指标项管理 + * + * @param indicatorManagementResponseVo + */ + @Override + public void upadteIndicatorManagement(IndicatorManagementResponseVo indicatorManagementResponseVo) { + //更新指标项管理 + IndicatorManagement indicatorManagement = new IndicatorManagement(); + BeanUtils.copyProperties(indicatorManagementResponseVo, indicatorManagement); + baseMapper.updateById(indicatorManagement); + // //更新评分表 + // LambdaQueryWrapper ratingScaleLambdaQueryWrapper = new LambdaQueryWrapper<>(); + // ratingScaleLambdaQueryWrapper.eq(RatingScale::getIndicatorManagementId, indicatorManagementResponseVo.getId()); + // RatingScale ratingScale = ratingScaleService.getOne(ratingScaleLambdaQueryWrapper); + // if (ratingScale != null) { + // ratingScale.setGoal(indicatorManagementResponseVo.getGoal()); + // ratingScale.setReviewDescription(indicatorManagementResponseVo.getReviewDescription()); + // ratingScaleService.updateById(ratingScale); + // } + + } + + /** + * 删除指标项管理 + */ + @Override + public void removeIndicatorManagementById(Long id) { + //删除评分表 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(RatingScale::getIndicatorManagementId, id); + ratingScaleService.remove(lambdaQueryWrapper); + //删除指标项管理 + baseMapper.deleteById(id); + } + + + /** + * 导出 + * + * @param response + */ + @SneakyThrows + @Override + public void export(HttpServletResponse response) { + String fileName = URLEncoder.encode("安全标准化.xlsx"); + response.setHeader("Content-Disposition", "attachment; filename=" + fileName); + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("utf-8"); + //内容样式策略 + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + // //垂直居中,水平居中 + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); + contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); + contentWriteCellStyle.setBorderTop(BorderStyle.THIN); + contentWriteCellStyle.setBorderRight(BorderStyle.THIN); + contentWriteCellStyle.setBorderBottom(BorderStyle.THIN); + // //设置 自动换行 + contentWriteCellStyle.setWrapped(true); + // // 字体策略 + // WriteFont contentWriteFont = new WriteFont(); + // // 字体大小 + // contentWriteFont.setFontHeightInPoints((short) 12); + // contentWriteCellStyle.setWriteFont(contentWriteFont); + // //头策略使用默认 + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + + //查询一级的数据 + List targetManagements = targetManagementService.listByParentId(0L); + + ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), ManagementVo.class) + .excelType(ExcelTypeEnum.XLSX).head(ManagementVo.class).build(); + int count = 0; + for (TargetManagement targetManagement : targetManagements) { + Long id = targetManagement.getId(); + List data = new ArrayList<>(); + List twoTargetManagements = targetManagementService.listByParentId(id); + Map map = new HashMap<>(); + List indicatorManagements = new ArrayList<>(); + for (TargetManagement twoTargetManagement : twoTargetManagements) { + Long twoTargetManagementId = twoTargetManagement.getId(); + List newIndicatorManagements = baseMapper.selectList( + new QueryWrapper().eq("target_management_id", twoTargetManagementId)); + indicatorManagements.addAll(newIndicatorManagements); + map.put(twoTargetManagement.getId(),twoTargetManagement.getName()); + } + + int standardScoreCount = 0; + int goalCount= 0; + //封装对象 + for (IndicatorManagement indicatorManagement : indicatorManagements) { + ManagementVo managementVo = new ManagementVo(); + RatingScale ratingScale = ratingScaleService.getOne(new QueryWrapper().eq("indicator_management_id", + indicatorManagement.getId())); + managementVo.setProductName(indicatorManagement.getProductName()); + managementVo.setEvaluationMethod(indicatorManagement.getEvaluationMethod()); + if (map.containsKey(indicatorManagement.getTargetManagementId())) { + managementVo.setName(map.get(indicatorManagement.getTargetManagementId())); + } + if (ratingScale != null) { + managementVo.setGoal(ratingScale.getGoal()); + managementVo.setReviewDescription(ratingScale.getReviewDescription()); + goalCount += NumberUtils.toInt(ratingScale.getGoal()); + } + managementVo.setStandardScore(indicatorManagement.getStandardScore()); + data.add(managementVo); + standardScoreCount += NumberUtils.toInt(indicatorManagement.getStandardScore()); + + } + + + + ManagementVo managementVo = new ManagementVo(); + managementVo.setName("合计"); + managementVo.setProductName("合计"); + managementVo.setStandardScore(standardScoreCount + ""); + managementVo.setGoal(goalCount + ""); + managementVo.setReviewDescription(""); + managementVo.setEvaluationMethod("得分小计"); + data.add(managementVo); + + // 序号列和运营公司列需要合并单元格 + List> mergeColDataList = + Stream.of(data.stream().map(ManagementVo::getName).collect(Collectors.toList()), + data.stream().map(ManagementVo::getProductName).collect(Collectors.toList())).collect(Collectors.toList()); + + + List mergeColIndexList = Stream.of(0, 1).collect(Collectors.toList()); + + String name = targetManagement.getName(); + WriteSheet writeSheet = EasyExcel.writerSheet(name) + //设置输出excel版本,不设置默认为xlsx + // .head(ManagementVo.class) + //设置拦截器或自定义样式 + .registerWriteHandler(new ManagementSheetWriteHandler(name + "(" + targetManagement.getScore() + + ")", count,data)) + .registerWriteHandler(new CustomMergeStrategyHandler(mergeColDataList, mergeColIndexList)) + .registerWriteHandler(new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle)) + //设置默认样式及写入头信息开始的行数 + .useDefaultStyle(true).relativeHeadRowIndex(1).build(); + + excelWriter.write(data, writeSheet); + + count++; + + } + excelWriter.finish(); + + + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/RatingScaleServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/RatingScaleServiceImpl.java new file mode 100644 index 0000000..e872f2c --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/RatingScaleServiceImpl.java @@ -0,0 +1,48 @@ +package com.hnac.hzims.safeproduct.management.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.hnac.hzims.safeproduct.management.mapper.RatingScaleMapper; +import com.hnac.hzims.safeproduct.management.service.RatingScaleService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.management.vo.RatingScaleVo; +import org.springframework.stereotype.Service; + +/** + *

+ * 平分表 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Service +public class RatingScaleServiceImpl extends ServiceImpl implements RatingScaleService { + + /** + * 评分 + * + * @param ratingScaleVo + */ + @Override + public void saveScore(RatingScaleVo ratingScaleVo) { + RatingScale ratingScale = new RatingScale(); + ratingScale.setIndicatorManagementId(ratingScaleVo.getIndicatorManagementId()); + ratingScale.setGoal(ratingScaleVo.getGoal()); + ratingScale.setReviewDescription(ratingScaleVo.getReviewDescription()); + baseMapper.insert(ratingScale); + } + + /** + * 查看评价 + * + * @param indicatorManagementId + * @return + */ + @Override + public RatingScale selectReviews(Long indicatorManagementId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("indicator_management_id", indicatorManagementId); + return baseMapper.selectOne(queryWrapper); + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/TargetManagementServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/TargetManagementServiceImpl.java new file mode 100644 index 0000000..25537fb --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/management/service/impl/TargetManagementServiceImpl.java @@ -0,0 +1,135 @@ +package com.hnac.hzims.safeproduct.management.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.hnac.hzims.safeproduct.management.entity.IndicatorManagement; +import com.hnac.hzims.safeproduct.management.entity.RatingScale; +import com.hnac.hzims.safeproduct.management.entity.TargetManagement; +import com.hnac.hzims.safeproduct.management.mapper.TargetManagementMapper; +import com.hnac.hzims.safeproduct.management.service.IndicatorManagementService; +import com.hnac.hzims.safeproduct.management.service.RatingScaleService; +import com.hnac.hzims.safeproduct.management.service.TargetManagementService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.sun.org.apache.bcel.internal.generic.NEW; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + *

+ * 指标管理 服务实现类 + *

+ * + * @author dfy + * @since 2023-08-10 + */ +@Service +public class TargetManagementServiceImpl extends ServiceImpl implements TargetManagementService { + + @Lazy + @Autowired + private IndicatorManagementService indicatorManagementService; + + @Autowired + private RatingScaleService ratingScaleService; + + + /** + * 指标管理树形结构 + * + * @return + */ + @Override + public List listPage() { + List targetManagements = this.list(); + //获取第一级的数据 + List rootTargetManagements = targetManagements.stream() + .filter(item -> item.getParentId().intValue() == 0).collect(Collectors.toList()); + //获取2级的数据 + for (TargetManagement rootTargetManagement : rootTargetManagements) { + Long id = rootTargetManagement.getId(); + List menuTargetManagement = + targetManagements.stream().filter(item -> item.getParentId().intValue() == id).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(menuTargetManagement)) { + rootTargetManagement.setChildren(menuTargetManagement); + } + } + return rootTargetManagements; + } + + /** + * 删除指标管理 + * + * @param id + * @return + */ + @Override + public void removeTargetManagementById(Long id) { + TargetManagement targetManagement = baseMapper.selectById(id); + //删除指标项管理 + if (targetManagement.getParentId().intValue() == 0) { + Long targetManagementId = targetManagement.getId(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TargetManagement::getParentId, targetManagementId); + List targetManagements = baseMapper.selectList(queryWrapper); + List targetManagementIds = + targetManagements.stream().map(TargetManagement::getId).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(targetManagementIds)) { + //删除平方表 + LambdaQueryWrapper indicatorManagementLambdaQueryWrapper = new LambdaQueryWrapper<>(); + indicatorManagementLambdaQueryWrapper.in(IndicatorManagement::getTargetManagementId, targetManagementIds); + deleteIndicatorById(indicatorManagementLambdaQueryWrapper); + } + //1.删除2级的数据 + Long managementId = targetManagement.getId(); + LambdaQueryWrapper targetManagementLambdaQueryWrapper = new LambdaQueryWrapper<>(); + targetManagementLambdaQueryWrapper.eq(TargetManagement::getParentId, managementId); + baseMapper.delete(targetManagementLambdaQueryWrapper); + //删除一级的数据 + baseMapper.deleteById(id); + } else { + //删除平方表 + LambdaQueryWrapper indicatorManagementLambdaQueryWrapper = new LambdaQueryWrapper<>(); + indicatorManagementLambdaQueryWrapper.eq(IndicatorManagement::getTargetManagementId, id); + deleteIndicatorById(indicatorManagementLambdaQueryWrapper); + baseMapper.deleteById(id); + } + } + + + /** + * 删除指标项管理 + * + * @param indicatorManagementLambdaQueryWrapper + */ + private void deleteIndicatorById(LambdaQueryWrapper indicatorManagementLambdaQueryWrapper) { + List indicatorManagements = indicatorManagementService + .list(indicatorManagementLambdaQueryWrapper); + List indicatorManagementId = indicatorManagements.stream().map(IndicatorManagement::getId).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(indicatorManagementId)) { + LambdaQueryWrapper ratingScaleLambdaQueryWrapper = new LambdaQueryWrapper<>(); + ratingScaleLambdaQueryWrapper.in(RatingScale::getIndicatorManagementId, indicatorManagementId); + ratingScaleService.remove(ratingScaleLambdaQueryWrapper); + } + //删除指标项管理 + indicatorManagementService.remove(indicatorManagementLambdaQueryWrapper); + } + + + /** + * 查询一级的数据 + * + * @return + */ + @Override + public List listByParentId(Long parentId) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("parent_id", parentId); + return this.list(queryWrapper); + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/controller/WorkAreaController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/controller/WorkAreaController.java new file mode 100644 index 0000000..b8de9d9 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/controller/WorkAreaController.java @@ -0,0 +1,63 @@ +package com.hnac.hzims.safeproduct.workarea.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hnac.hzims.safeproduct.workarea.entity.WorkArea; +import com.hnac.hzims.safeproduct.workarea.service.WorkAreaService; +import com.hnac.hzims.safeproduct.workarea.vo.WorkAreaQueryVo; +import lombok.RequiredArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RequiredArgsConstructor +@RestController +@RequestMapping("/workarea") +public class WorkAreaController { + + @Autowired + WorkAreaService workAreaService; + + /** + * 分页查询 + */ + @GetMapping("/listPage/{page}/{size}") + public R listPage(@PathVariable Long page, + @PathVariable Long size, + WorkAreaQueryVo workAreaQueryVo) { + Page pageParam = new Page<>(page, size); + IPage resultParams = + workAreaService.selectPage(pageParam, + workAreaQueryVo); + return R.data(resultParams); + } + + /** + * 新增工作区域数据 + */ + @PostMapping("/save") + public R save(@RequestBody WorkArea workArea) { + workAreaService.saveWorkArea(workArea); + return R.success("新增成功"); + } + + + /** + * 更新工作区域数据 + */ + @PutMapping("/update") + public R update(@RequestBody WorkArea workArea) { + workAreaService.updateWorkArea(workArea); + return R.success("修改成功"); + } + + + /** + * 删除工作区域数据 + */ + @DeleteMapping("/remove/{id}") + public R remove(@PathVariable Long id) { + workAreaService.removeById(id); + return R.success("删除成功"); + } +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/mapper/WorkAreaMapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/mapper/WorkAreaMapper.java new file mode 100644 index 0000000..f3e3dba --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/mapper/WorkAreaMapper.java @@ -0,0 +1,7 @@ +package com.hnac.hzims.safeproduct.workarea.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.safeproduct.workarea.entity.WorkArea; + +public interface WorkAreaMapper extends BaseMapper { +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/WorkAreaService.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/WorkAreaService.java new file mode 100644 index 0000000..645db2d --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/WorkAreaService.java @@ -0,0 +1,22 @@ +package com.hnac.hzims.safeproduct.workarea.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.safeproduct.workarea.entity.WorkArea; +import com.hnac.hzims.safeproduct.workarea.vo.WorkAreaQueryVo; + +public interface WorkAreaService extends IService { + + /** + * 分页查询 + * @param pageParam + * @param workAreaQueryVo + * @return + */ + IPage selectPage(Page pageParam, WorkAreaQueryVo workAreaQueryVo); + + void saveWorkArea(WorkArea workArea); + + void updateWorkArea(WorkArea workArea); +} diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/impl/WorkAreaServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/impl/WorkAreaServiceImpl.java new file mode 100644 index 0000000..52f07e5 --- /dev/null +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/workarea/service/impl/WorkAreaServiceImpl.java @@ -0,0 +1,93 @@ +package com.hnac.hzims.safeproduct.workarea.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.hnac.hzims.safeproduct.workarea.entity.WorkArea; +import com.hnac.hzims.safeproduct.workarea.mapper.WorkAreaMapper; +import com.hnac.hzims.safeproduct.workarea.service.WorkAreaService; +import com.hnac.hzims.safeproduct.workarea.vo.WorkAreaQueryVo; +import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.system.cache.SysCache; +import org.springblade.system.entity.Dept; +import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class WorkAreaServiceImpl extends ServiceImpl implements WorkAreaService { + + @Override + public IPage selectPage(Page pageParam, WorkAreaQueryVo workAreaQueryVo) { + String areaName = workAreaQueryVo.getAreaName(); + Long directOpId = workAreaQueryVo.getDirectOpId(); + Long leadOpId = workAreaQueryVo.getLeadOpId(); + Long departId = workAreaQueryVo.getDepartId(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + if (StringUtils.isNotBlank(areaName)) { + queryWrapper.like(WorkArea::getAreaName,areaName); + } + if (ObjectUtil.isNotEmpty(directOpId)) { + queryWrapper.eq(WorkArea::getDirectOpId, directOpId); + } + if (ObjectUtil.isNotEmpty(leadOpId)) { + queryWrapper.eq(WorkArea::getLeadOpId, leadOpId); + } + if (ObjectUtil.isNotEmpty(departId)) { + queryWrapper.eq(WorkArea::getDepartId, departId); + } + IPage workAreaIPage = baseMapper.selectPage(pageParam, queryWrapper); + + //翻译 + List records = workAreaIPage.getRecords(); + records.stream().forEach(workArea -> { + User directOp = UserCache.getUser(workArea.getDirectOpId()); + String directOpName = directOp.getName(); + User leadOp = UserCache.getUser(workArea.getLeadOpId()); + String leadOpName = leadOp.getName(); + Dept dept = SysCache.getDept(workArea.getDepartId()); + String deptName = dept.getDeptName(); + workArea.setDirectOpName(directOpName); + workArea.setLeadOpName(leadOpName); + workArea.setDepartName(deptName); + }); + + return workAreaIPage; + } + + @Override + public void saveWorkArea(WorkArea workArea) { + checkOpAndDept(workArea); + this.save(workArea); + } + + @Override + public void updateWorkArea(WorkArea workArea) { + checkOpAndDept(workArea); + this.updateById(workArea); + } + + /** + * 校验员工id、部门id是否存在 + * @param workArea + */ + private void checkOpAndDept(WorkArea workArea) { + Long directOpId = workArea.getDirectOpId(); + Long leadOpId = workArea.getLeadOpId(); + Long departId = workArea.getDepartId(); + User user = UserCache.getUser(directOpId); + User user1 = UserCache.getUser(leadOpId); + if (user == null || user1 == null) { + throw new ServiceException("员工不存在,保存失败"); + } + Dept dept = SysCache.getDept(departId); + if (dept == null) { + throw new ServiceException("部门不存在,保存失败"); + } + } +} diff --git a/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql b/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql new file mode 100644 index 0000000..4c6c082 --- /dev/null +++ b/hzims-service/safeproduct/src/main/resources/db/1.0.0.sql @@ -0,0 +1,37 @@ +create table target_management +( + id bigint primary key auto_increment comment '编号', + name varchar(50) not null comment '名称', + score varchar(50) comment '分值', + parent_id bigint comment '父级Id', + level int comment '等级', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '指标管理'; + + +create table indicator_management +( + id bigint primary key auto_increment comment '编号', + product_name varchar(5000) not null comment '项目名称', + standard_score varchar(50) comment '标准分值', + evaluation_method varchar(50) comment '评审方法及评分标准', + target_management_id bigint comment '指标管理id', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '指标项管理'; + + + +create table rating_scale +( + id bigint primary key auto_increment comment '编号', + indicator_management_id bigint comment '指标项管理id', + goal varchar(50) comment '得分', + review_description varchar(5000) comment '评审描述', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint(1) default 0 comment '逻辑删除' +) comment '平分表'; diff --git a/hzims-service/safeproduct/src/main/resources/db/1.0.1.sql b/hzims-service/safeproduct/src/main/resources/db/1.0.1.sql new file mode 100644 index 0000000..f63ae4c --- /dev/null +++ b/hzims-service/safeproduct/src/main/resources/db/1.0.1.sql @@ -0,0 +1,12 @@ +create table document_management +( + id bigint primary key auto_increment, + document_name varchar(100) comment '文档名称', + document_url varchar(300) comment '文档路径', + creator_id bigint comment '创建人Id', + creator_name varchar(50) comment '创建人名称', + create_time datetime default current_timestamp comment '创建时间', + update_time datetime default current_timestamp on update current_timestamp comment '更新时间', + is_deleted tinyint default 0 comment '逻辑删除' + +) comment '文档管理'; \ No newline at end of file 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