Pārlūkot izejas kodu

报表系统:看板+维度

linxk 1 nedēļu atpakaļ
vecāks
revīzija
ba468961bc
48 mainītis faili ar 3441 papildinājumiem un 1 dzēšanām
  1. 186 0
      operating-api/src/main/java/com/txz/operating/dto/DayStatisticsDTO.java
  2. 374 0
      operating-api/src/main/java/com/txz/operating/dto/DimensionDTO.java
  3. 206 0
      operating-api/src/main/java/com/txz/operating/dto/DimensionSectionDTO.java
  4. 79 0
      operating-api/src/main/java/com/txz/operating/dto/SpectacularsDTO.java
  5. 100 0
      operating-api/src/main/java/com/txz/operating/dto/SpectacularsDimensionDTO.java
  6. 27 0
      operating-interface/src/main/java/com/txz/operating/service/DayStatisticsServiceClient.java
  7. 27 0
      operating-interface/src/main/java/com/txz/operating/service/DimensionSectionServiceClient.java
  8. 27 0
      operating-interface/src/main/java/com/txz/operating/service/DimensionServiceClient.java
  9. 27 0
      operating-interface/src/main/java/com/txz/operating/service/SpectacularsDimensionServiceClient.java
  10. 27 0
      operating-interface/src/main/java/com/txz/operating/service/SpectacularsServiceClient.java
  11. 493 0
      operating-service/src/main/java/com/txz/operating/controller/SpectacularsController.java
  12. 12 0
      operating-service/src/main/java/com/txz/operating/dao/DayStatisticsMapper.java
  13. 7 0
      operating-service/src/main/java/com/txz/operating/dao/DimensionMapper.java
  14. 7 0
      operating-service/src/main/java/com/txz/operating/dao/DimensionSectionMapper.java
  15. 7 0
      operating-service/src/main/java/com/txz/operating/dao/SpectacularsDimensionMapper.java
  16. 7 0
      operating-service/src/main/java/com/txz/operating/dao/SpectacularsMapper.java
  17. 190 0
      operating-service/src/main/java/com/txz/operating/model/DayStatistics.java
  18. 408 0
      operating-service/src/main/java/com/txz/operating/model/Dimension.java
  19. 218 0
      operating-service/src/main/java/com/txz/operating/model/DimensionSection.java
  20. 74 0
      operating-service/src/main/java/com/txz/operating/model/Spectaculars.java
  21. 93 0
      operating-service/src/main/java/com/txz/operating/model/SpectacularsDimension.java
  22. 16 0
      operating-service/src/main/java/com/txz/operating/service/DayStatisticsService.java
  23. 11 0
      operating-service/src/main/java/com/txz/operating/service/DimensionSectionService.java
  24. 11 0
      operating-service/src/main/java/com/txz/operating/service/DimensionService.java
  25. 13 0
      operating-service/src/main/java/com/txz/operating/service/SpectacularsDimensionService.java
  26. 11 0
      operating-service/src/main/java/com/txz/operating/service/SpectacularsService.java
  27. 29 0
      operating-service/src/main/java/com/txz/operating/service/impl/DayStatisticsServiceImpl.java
  28. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/DimensionSectionServiceImpl.java
  29. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/DimensionServiceImpl.java
  30. 27 0
      operating-service/src/main/java/com/txz/operating/service/impl/SpectacularsDimensionServiceImpl.java
  31. 22 0
      operating-service/src/main/java/com/txz/operating/service/impl/SpectacularsServiceImpl.java
  32. 57 0
      operating-service/src/main/java/com/txz/operating/web/bo/DayStatisticsBo.java
  33. 45 0
      operating-service/src/main/java/com/txz/operating/web/bo/DimensionBo.java
  34. 89 0
      operating-service/src/main/java/com/txz/operating/web/bo/DimensionDto.java
  35. 44 0
      operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionBo.java
  36. 55 0
      operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionDto.java
  37. 41 0
      operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionStatisticsDto.java
  38. 25 0
      operating-service/src/main/java/com/txz/operating/web/bo/SpectacularsDto.java
  39. 63 0
      operating-service/src/main/java/com/txz/operating/web/param/DimensionDetailParam.java
  40. 27 0
      operating-service/src/main/java/com/txz/operating/web/param/DimensionParam.java
  41. 53 0
      operating-service/src/main/java/com/txz/operating/web/param/SpectacularsDetailParam.java
  42. 39 0
      operating-service/src/main/java/com/txz/operating/web/param/SpectacularsListParam.java
  43. 53 0
      operating-service/src/main/resources/mapper/DayStatisticsMapper.xml
  44. 26 0
      operating-service/src/main/resources/mapper/DimensionMapper.xml
  45. 18 0
      operating-service/src/main/resources/mapper/DimensionSectionMapper.xml
  46. 13 0
      operating-service/src/main/resources/mapper/SpectacularsDimensionMapper.xml
  47. 12 0
      operating-service/src/main/resources/mapper/SpectacularsMapper.xml
  48. 1 1
      operating-service/src/test/java/CodeGenerator.java

+ 186 - 0
operating-api/src/main/java/com/txz/operating/dto/DayStatisticsDTO.java

@@ -0,0 +1,186 @@
+/*
+*
+* DayStatisticsDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2025-09-01
+*/
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class DayStatisticsDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 维度id
+     */
+    private Long dimensionId;
+
+    /**
+     * 区间id
+     */
+    private Long sectionId;
+
+    /**
+     * 
+     */
+    private Integer seq;
+
+    /**
+     * 区间名称
+     */
+    private String sectionName;
+
+    /**
+     * 日切时间
+     */
+    private Date cutDay;
+
+    /**
+     * 统计值
+     */
+    private BigDecimal statisticsValue;
+
+    /**
+     * 统计总数
+     */
+    private BigDecimal statisticsTotal;
+
+    /**
+     * r_day_statistics
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 维度id
+     * @return dimension_id 维度id
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * 维度id
+     * @param dimensionId 维度id
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 区间id
+     * @return section_id 区间id
+     */
+    public Long getSectionId() {
+        return sectionId;
+    }
+
+    /**
+     * 区间id
+     * @param sectionId 区间id
+     */
+    public void setSectionId(Long sectionId) {
+        this.sectionId = sectionId;
+    }
+
+    /**
+     * 
+     * @return seq 
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * 
+     * @param seq 
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 区间名称
+     * @return section_name 区间名称
+     */
+    public String getSectionName() {
+        return sectionName;
+    }
+
+    /**
+     * 区间名称
+     * @param sectionName 区间名称
+     */
+    public void setSectionName(String sectionName) {
+        this.sectionName = sectionName;
+    }
+
+    /**
+     * 日切时间
+     * @return cut_day 日切时间
+     */
+    public Date getCutDay() {
+        return cutDay;
+    }
+
+    /**
+     * 日切时间
+     * @param cutDay 日切时间
+     */
+    public void setCutDay(Date cutDay) {
+        this.cutDay = cutDay;
+    }
+
+    /**
+     * 统计值
+     * @return statistics_value 统计值
+     */
+    public BigDecimal getStatisticsValue() {
+        return statisticsValue;
+    }
+
+    /**
+     * 统计值
+     * @param statisticsValue 统计值
+     */
+    public void setStatisticsValue(BigDecimal statisticsValue) {
+        this.statisticsValue = statisticsValue;
+    }
+
+    /**
+     * 统计总数
+     * @return statistics_total 统计总数
+     */
+    public BigDecimal getStatisticsTotal() {
+        return statisticsTotal;
+    }
+
+    /**
+     * 统计总数
+     * @param statisticsTotal 统计总数
+     */
+    public void setStatisticsTotal(BigDecimal statisticsTotal) {
+        this.statisticsTotal = statisticsTotal;
+    }
+}

+ 374 - 0
operating-api/src/main/java/com/txz/operating/dto/DimensionDTO.java

@@ -0,0 +1,374 @@
+/*
+*
+* DimensionDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2025-09-01
+*/
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class DimensionDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 单位类型:1秒 2个 3元 4%
+     */
+    private Byte unitType;
+
+    /**
+     * 类型 1日统计 2实时查询
+     */
+    private Byte type;
+
+    /**
+     * 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    private Byte interType;
+
+    /**
+     * 接口地址
+     */
+    private String interUrl;
+
+    /**
+     * 
+     */
+    private String paramValue;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    private String viewType;
+
+    /**
+     * 状态 1正常 2停用 
+     */
+    private Byte status;
+
+    /**
+     * 统计类型 1无统计 2汇总 
+     */
+    private Byte statisticsType;
+
+    /**
+     * 减少入库天数
+     */
+    private Integer decreaseNum;
+
+    /**
+     * 
+     */
+    private Integer seq;
+
+    /**
+     * 创建人
+     */
+    private String createName;
+
+    /**
+     * 更新人
+     */
+    private String updateName;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * r_dimension
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 备注
+     * @return memo 备注
+     */
+    public String getMemo() {
+        return memo;
+    }
+
+    /**
+     * 备注
+     * @param memo 备注
+     */
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    /**
+     * 单位类型:1秒 2个 3元 4%
+     * @return unit_type 单位类型:1秒 2个 3元 4%
+     */
+    public Byte getUnitType() {
+        return unitType;
+    }
+
+    /**
+     * 单位类型:1秒 2个 3元 4%
+     * @param unitType 单位类型:1秒 2个 3元 4%
+     */
+    public void setUnitType(Byte unitType) {
+        this.unitType = unitType;
+    }
+
+    /**
+     * 类型 1日统计 2实时查询
+     * @return type 类型 1日统计 2实时查询
+     */
+    public Byte getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1日统计 2实时查询
+     * @param type 类型 1日统计 2实时查询
+     */
+    public void setType(Byte type) {
+        this.type = type;
+    }
+
+    /**
+     * 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     * @return inter_type 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    public Byte getInterType() {
+        return interType;
+    }
+
+    /**
+     * 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     * @param interType 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    public void setInterType(Byte interType) {
+        this.interType = interType;
+    }
+
+    /**
+     * 接口地址
+     * @return inter_url 接口地址
+     */
+    public String getInterUrl() {
+        return interUrl;
+    }
+
+    /**
+     * 接口地址
+     * @param interUrl 接口地址
+     */
+    public void setInterUrl(String interUrl) {
+        this.interUrl = interUrl;
+    }
+
+    /**
+     * 
+     * @return param_value 
+     */
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    /**
+     * 
+     * @param paramValue 
+     */
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     * @return view_type 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public String getViewType() {
+        return viewType;
+    }
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     * @param viewType 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public void setViewType(String viewType) {
+        this.viewType = viewType;
+    }
+
+    /**
+     * 状态 1正常 2停用 
+     * @return status 状态 1正常 2停用 
+     */
+    public Byte getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2停用 
+     * @param status 状态 1正常 2停用 
+     */
+    public void setStatus(Byte status) {
+        this.status = status;
+    }
+
+    /**
+     * 统计类型 1无统计 2汇总 
+     * @return statistics_type 统计类型 1无统计 2汇总 
+     */
+    public Byte getStatisticsType() {
+        return statisticsType;
+    }
+
+    /**
+     * 统计类型 1无统计 2汇总 
+     * @param statisticsType 统计类型 1无统计 2汇总 
+     */
+    public void setStatisticsType(Byte statisticsType) {
+        this.statisticsType = statisticsType;
+    }
+
+    /**
+     * 减少入库天数
+     * @return decrease_num 减少入库天数
+     */
+    public Integer getDecreaseNum() {
+        return decreaseNum;
+    }
+
+    /**
+     * 减少入库天数
+     * @param decreaseNum 减少入库天数
+     */
+    public void setDecreaseNum(Integer decreaseNum) {
+        this.decreaseNum = decreaseNum;
+    }
+
+    /**
+     * 
+     * @return seq 
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * 
+     * @param seq 
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 创建人
+     * @return create_name 创建人
+     */
+    public String getCreateName() {
+        return createName;
+    }
+
+    /**
+     * 创建人
+     * @param createName 创建人
+     */
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    /**
+     * 更新人
+     * @return update_name 更新人
+     */
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    /**
+     * 更新人
+     * @param updateName 更新人
+     */
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 206 - 0
operating-api/src/main/java/com/txz/operating/dto/DimensionSectionDTO.java

@@ -0,0 +1,206 @@
+/*
+*
+* DimensionSectionDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2025-09-01
+*/
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class DimensionSectionDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 维度id
+     */
+    private Long dimensionId;
+
+    /**
+     * 下界(-1为无穷大)
+     */
+    private BigDecimal lowerBound;
+
+    /**
+     * 上界(-1为无穷大)
+     */
+    private BigDecimal upperBound;
+
+    /**
+     * 参数值
+     */
+    private String paramValue;
+
+    /**
+     * 边界类型:1下开上闭 2下闭上开 
+     */
+    private Byte boundType;
+
+    /**
+     * 参数类型 1区间 2固定值
+     */
+    private Byte type;
+
+    /**
+     * r_dimension_section
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 备注
+     * @return memo 备注
+     */
+    public String getMemo() {
+        return memo;
+    }
+
+    /**
+     * 备注
+     * @param memo 备注
+     */
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    /**
+     * 维度id
+     * @return dimension_id 维度id
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * 维度id
+     * @param dimensionId 维度id
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 下界(-1为无穷大)
+     * @return lower_bound 下界(-1为无穷大)
+     */
+    public BigDecimal getLowerBound() {
+        return lowerBound;
+    }
+
+    /**
+     * 下界(-1为无穷大)
+     * @param lowerBound 下界(-1为无穷大)
+     */
+    public void setLowerBound(BigDecimal lowerBound) {
+        this.lowerBound = lowerBound;
+    }
+
+    /**
+     * 上界(-1为无穷大)
+     * @return upper_bound 上界(-1为无穷大)
+     */
+    public BigDecimal getUpperBound() {
+        return upperBound;
+    }
+
+    /**
+     * 上界(-1为无穷大)
+     * @param upperBound 上界(-1为无穷大)
+     */
+    public void setUpperBound(BigDecimal upperBound) {
+        this.upperBound = upperBound;
+    }
+
+    /**
+     * 参数值
+     * @return param_value 参数值
+     */
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    /**
+     * 参数值
+     * @param paramValue 参数值
+     */
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+    /**
+     * 边界类型:1下开上闭 2下闭上开 
+     * @return bound_type 边界类型:1下开上闭 2下闭上开 
+     */
+    public Byte getBoundType() {
+        return boundType;
+    }
+
+    /**
+     * 边界类型:1下开上闭 2下闭上开 
+     * @param boundType 边界类型:1下开上闭 2下闭上开 
+     */
+    public void setBoundType(Byte boundType) {
+        this.boundType = boundType;
+    }
+
+    /**
+     * 参数类型 1区间 2固定值
+     * @return type 参数类型 1区间 2固定值
+     */
+    public Byte getType() {
+        return type;
+    }
+
+    /**
+     * 参数类型 1区间 2固定值
+     * @param type 参数类型 1区间 2固定值
+     */
+    public void setType(Byte type) {
+        this.type = type;
+    }
+}

+ 79 - 0
operating-api/src/main/java/com/txz/operating/dto/SpectacularsDTO.java

@@ -0,0 +1,79 @@
+/*
+*
+* SpectacularsDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2025-09-01
+*/
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class SpectacularsDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 
+     */
+    private String name;
+
+    /**
+     * 
+     */
+    private Integer userId;
+
+    /**
+     * r_spectaculars
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return name 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 
+     * @param name 
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 
+     * @return user_id 
+     */
+    public Integer getUserId() {
+        return userId;
+    }
+
+    /**
+     * 
+     * @param userId 
+     */
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+}

+ 100 - 0
operating-api/src/main/java/com/txz/operating/dto/SpectacularsDimensionDTO.java

@@ -0,0 +1,100 @@
+/*
+*
+* SpectacularsDimensionDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2025-09-01
+*/
+package com.txz.operating.dto;
+
+import java.io.Serializable;
+
+public class SpectacularsDimensionDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 
+     */
+    private Integer spectId;
+
+    /**
+     * 
+     */
+    private Long dimensionId;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    private String viewType;
+
+    /**
+     * r_spectaculars_dimension
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return spect_id 
+     */
+    public Integer getSpectId() {
+        return spectId;
+    }
+
+    /**
+     * 
+     * @param spectId 
+     */
+    public void setSpectId(Integer spectId) {
+        this.spectId = spectId;
+    }
+
+    /**
+     * 
+     * @return dimension_id 
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * 
+     * @param dimensionId 
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     * @return view_type 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public String getViewType() {
+        return viewType;
+    }
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     * @param viewType 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public void setViewType(String viewType) {
+        this.viewType = viewType;
+    }
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/DayStatisticsServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface DayStatisticsServiceClient {
+
+	@RequestMapping( value = {"/day/statistics/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody DayStatisticsDPO dayStatistics,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/day/statistics/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/day/statistics/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody DayStatisticsDPO dayStatistics,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/day/statistics/detail"}, method = {RequestMethod.POST} )
+	public Result<DayStatisticsDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/day/statistics/list"}, method = {RequestMethod.POST} )
+	public Result<List<DayStatisticsDPO>> list(@RequestBody DayStatisticsDPO dayStatistics, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/DimensionSectionServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface DimensionSectionServiceClient {
+
+	@RequestMapping( value = {"/dimension/section/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody DimensionSectionDPO dimensionSection,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/section/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/section/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody DimensionSectionDPO dimensionSection,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/section/detail"}, method = {RequestMethod.POST} )
+	public Result<DimensionSectionDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/section/list"}, method = {RequestMethod.POST} )
+	public Result<List<DimensionSectionDPO>> list(@RequestBody DimensionSectionDPO dimensionSection, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/DimensionServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface DimensionServiceClient {
+
+	@RequestMapping( value = {"/dimension/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody DimensionDPO dimension,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody DimensionDPO dimension,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/detail"}, method = {RequestMethod.POST} )
+	public Result<DimensionDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/dimension/list"}, method = {RequestMethod.POST} )
+	public Result<List<DimensionDPO>> list(@RequestBody DimensionDPO dimension, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/SpectacularsDimensionServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface SpectacularsDimensionServiceClient {
+
+	@RequestMapping( value = {"/spectaculars/dimension/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody SpectacularsDimensionDPO spectacularsDimension,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/dimension/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/dimension/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody SpectacularsDimensionDPO spectacularsDimension,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/dimension/detail"}, method = {RequestMethod.POST} )
+	public Result<SpectacularsDimensionDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/dimension/list"}, method = {RequestMethod.POST} )
+	public Result<List<SpectacularsDimensionDPO>> list(@RequestBody SpectacularsDimensionDPO spectacularsDimension, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 27 - 0
operating-interface/src/main/java/com/txz/operating/service/SpectacularsServiceClient.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service;
+
+
+import com.txz.operating.dto.*;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+import java.util.List;
+
+
+@FeignClient("operating")
+public interface SpectacularsServiceClient {
+
+	@RequestMapping( value = {"/spectaculars/add"}, method = {RequestMethod.POST} )
+    public Result add(@RequestBody SpectacularsDPO spectaculars,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/delete"}, method = {RequestMethod.POST} )
+	public Result delete(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/update"}, method = {RequestMethod.POST} )
+	public Result update(@RequestBody SpectacularsDPO spectaculars,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/detail"}, method = {RequestMethod.POST} )
+	public Result<SpectacularsDPO> detail(@RequestParam("id") Integer id,@RequestParam("userId") String userId);
+
+	@RequestMapping( value = {"/spectaculars/list"}, method = {RequestMethod.POST} )
+	public Result<List<SpectacularsDPO>> list(@RequestBody SpectacularsDPO spectaculars, @RequestParam("page") Integer page, @RequestParam("size") Integer size,@RequestParam("userId") String userId);
+}

+ 493 - 0
operating-service/src/main/java/com/txz/operating/controller/SpectacularsController.java

@@ -0,0 +1,493 @@
+package com.txz.operating.controller;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.poi.excel.ExcelUtil;
+import cn.hutool.poi.excel.ExcelWriter;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.txz.operating.core.ResultCode;
+import com.txz.operating.core.ResultGenerator;
+import com.txz.operating.model.*;
+import com.txz.operating.result.Result;
+import com.txz.operating.service.*;
+import com.txz.operating.web.bo.*;
+import com.txz.operating.web.param.*;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+import tk.mybatis.mapper.entity.Condition;
+import tk.mybatis.mapper.entity.Example.Criteria;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * Created by CodeGenerator on 2020/07/01.
+ */
+@Api(tags = "[后台]看板管理")
+@RestController
+@RequestMapping("/spectaculars")
+public class SpectacularsController {
+
+    private static Logger log = LoggerFactory.getLogger(SpectacularsController.class);
+
+    @Resource
+    private SpectacularsService spectacularsService;
+
+    @Resource
+    private SpectacularsDimensionService spectacularsDimensionService;
+
+    @Resource
+    private DimensionService dimensionService;
+
+    @Resource
+    private DimensionSectionService dimensionSectionService;
+
+    @Resource
+    private DayStatisticsService dayStatisticsService;
+
+    @Value("${statistics.data.ids}")
+    private String ids;
+
+    @GetMapping("/addDimensionView")
+    @ApiOperation(value = "新增纬度视图", httpMethod = "GET")
+    public Result<List<DimensionDto>> addDimensionView(@RequestParam Integer spectId) {
+        if (spectId == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        try {
+            Condition c = new Condition(SpectacularsDimension.class);
+            c.createCriteria().andEqualTo("spectId", spectId);
+            List<SpectacularsDimension> haveList = spectacularsDimensionService.findByCondition(c);
+            c = new Condition(Dimension.class);
+            c.createCriteria().andEqualTo("status", 1).andEqualTo("type", 1);
+            List<Dimension> all = dimensionService.findByCondition(c);
+            if (CollUtil.isNotEmpty(haveList)) {
+                for (int i = all.size() - 1; i >= 0; i--) {
+                    for (SpectacularsDimension spectacularsDimension : haveList) {
+                        if (all.get(i).getId().compareTo(spectacularsDimension.getDimensionId()) == 0) {
+                            all.remove(i);
+                            break;
+                        }
+                    }
+                }
+            }
+            if (CollUtil.isNotEmpty(all)) {
+                return ResultGenerator.genSuccessResult(all.stream().map(temp -> BeanUtil.toBean(temp, DimensionDto.class)).collect(Collectors.toList()));
+            }
+            return ResultGenerator.genSuccessResult(new ArrayList<>());
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @PostMapping("/add")
+    @ApiOperation(value = "新增看板", httpMethod = "POST")
+    public Result add(@RequestBody Spectaculars spectaculars) {
+        if (spectaculars == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        if (StrUtil.isBlank(spectaculars.getName())) {
+            return ResultGenerator.genFailResult(ResultCode.NAME_IS_NULL);
+        }
+        if (spectaculars.getUserId() == null) {
+            return ResultGenerator.genFailResult(ResultCode.USERID_IS_NULL);
+        }
+        try {
+            spectacularsService.save(spectaculars);
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+
+        return ResultGenerator.genSuccessResult();
+    }
+
+    @PostMapping("/addDimension")
+    @ApiOperation(value = "新增维度", httpMethod = "POST")
+    public Result addDimension(@RequestBody Spectaculars spectaculars) {
+        if (spectaculars == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        if (spectaculars.getId() == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        if (CollUtil.isEmpty(spectaculars.getDimensions())) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+            Spectaculars temp = spectacularsService.findById(spectaculars.getId());
+            if (temp == null) {
+                return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+            }
+            for (SpectacularsDimension dimension : spectaculars.getDimensions()) {
+                dimension.setSpectId(spectaculars.getId());
+            }
+            spectacularsDimensionService.save(spectaculars.getDimensions());
+        } catch (Exception e) {
+            log.error("新增对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+
+        return ResultGenerator.genSuccessResult();
+    }
+
+    @GetMapping("/deleteDimension")
+    @ApiOperation(value = "删除维度", httpMethod = "GET")
+    public Result deleteDimension(@RequestParam Integer id) {
+        if (id == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        try {
+            spectacularsDimensionService.deleteById(id);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult();
+    }
+
+    @GetMapping("/delete")
+    @ApiOperation(value = "spectaculars删除", httpMethod = "GET")
+    public Result delete(@RequestParam Integer id) {
+        if (id == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        try {
+            spectacularsService.deleteById(id);
+            Condition condition = new Condition(SpectacularsDimension.class);
+            Criteria criteria = condition.createCriteria();
+            criteria.andEqualTo("spectId", id);
+            spectacularsDimensionService.deleteByCondition(condition);
+        } catch (Exception e) {
+            log.error("删除对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult();
+    }
+
+    @PostMapping("/updateDimension")
+    @ApiOperation(value = "更新维度", httpMethod = "POST")
+    public Result updateDimension(@RequestBody DimensionParam param) {
+        if (param == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        if (param.getId() == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        if (StrUtil.isBlank(param.getViewType())) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        try {
+            spectacularsDimensionService.update(SpectacularsDimension.builder().id(param.getId()).viewType(param.getViewType()).build());
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult();
+    }
+
+    @PostMapping("/update")
+    @ApiOperation(value = "spectaculars更新", httpMethod = "POST")
+    public Result update(@RequestBody Spectaculars spectaculars) {
+        if (spectaculars == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        if (spectaculars.getId() == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        try {
+            spectacularsService.update(spectaculars);
+        } catch (Exception e) {
+            log.error("更新对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult();
+    }
+
+    // 获取维度详情
+    @PostMapping("/dimensionDetail")
+    @ApiOperation(value = "获取维度详情", httpMethod = "POST")
+    public Result<DimensionDto> dimensionDetail(@RequestBody DimensionDetailParam param) {
+        if (param == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        if (param.getGranularity() == null) {
+            param.setGranularity(2);
+        }
+        if (param.getTimeInterval() != null) {
+            if (param.getTimeInterval() == -1) {
+                param.setStartTime(null);
+                param.setEndTime(null);
+            } else {
+                param.setTimeInterval(param.getTimeInterval() + 1);
+                param.setStartTime(DateUtil.format(DateUtil.offsetDay(DateUtil.date(), -param.getTimeInterval()), "yyyy-MM-dd") + " 00:00:00");
+                param.setEndTime(DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd") + " 00:00:00");
+            }
+        }
+
+        SpectacularsDimension spectacularsDimension = spectacularsDimensionService.findBy("id", param.getId());
+        if (spectacularsDimension == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        Dimension dimension = dimensionService.findById(spectacularsDimension.getDimensionId());
+        if (dimension == null) {
+            return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+        }
+        DimensionDto dimensionDto = buildDimensionDto(dimension, param.getStartTime(), param.getEndTime(), param.getType(), param.getGranularity(), param.getAppCode());
+        dimensionDto.setViewType(spectacularsDimension.getViewType());
+        dimensionDto.setSpectacularsDimensionId(spectacularsDimension.getId());
+        return ResultGenerator.genSuccessResult(dimensionDto);
+    }
+
+    private DimensionDto buildDimensionDto(Dimension temp, String startTime, String endTime, Integer type, Integer granularity, String appCode) {
+        DimensionDto dto = BeanUtil.toBean(temp, DimensionDto.class);
+        Condition c = new Condition(DimensionSection.class);
+        Criteria criteria = c.createCriteria().andEqualTo("dimensionId", temp.getId());
+        if (granularity == 2) {
+            if (StrUtil.isNotBlank(appCode)) {
+                criteria.andLike("appCode", appCode.split("_")[0] + "%");
+            }
+        } else if (granularity == 3) {
+            String[] appCodes = appCode.split("_");
+            criteria.andLike("appCode", "%" + appCodes[appCodes.length - 1]);
+        }
+        c.setOrderByClause("id");
+        List<DimensionSection> sections = dimensionSectionService.findByCondition(c);
+        if (CollUtil.isNotEmpty(sections)) {
+            Map<String, DimensionSectionStatisticsDto> totalStatistics = new LinkedHashMap<>();
+            List<DimensionSectionDto> sectionList = sections.stream().map(temp2 -> {
+                DimensionSectionDto sectionDto = BeanUtil.toBean(temp2, DimensionSectionDto.class);
+                Map<String, Object> map = new HashMap<>();
+                map.put("sectionId", temp2.getId());
+                map.put("startTime", startTime);
+                map.put("endTime", endTime);
+                map.put("dataType", type);
+                List<DayStatisticsBo> statistics = dayStatisticsService.findStatisticsByCondition(map);
+                if (CollUtil.isNotEmpty(statistics)) {
+                    sectionDto.setStatistics(statistics.stream().map(temp3 -> {
+                        DimensionSectionStatisticsDto tempStatistic = BeanUtil.toBean(temp3, DimensionSectionStatisticsDto.class);
+                        DimensionSectionStatisticsDto dto1 = totalStatistics.get(tempStatistic.getCutDay());
+                        if (temp2.getType() == 1) {
+                            if (dto1 == null) {
+                                totalStatistics.put(tempStatistic.getCutDay(), BeanUtil.toBean(tempStatistic, DimensionSectionStatisticsDto.class));
+                            } else {
+                                dto1.setStatisticsValue(dto1.getStatisticsValue().add(tempStatistic.getStatisticsValue()));
+                            }
+                        }
+                        return tempStatistic;
+                    }).collect(Collectors.toList()));
+                }
+                return sectionDto;
+            }).collect(Collectors.toList());
+            if (temp.getStatisticsType().compareTo((byte) 2) == 0 && CollUtil.isNotEmpty(totalStatistics.values())) {
+                sectionList.add(DimensionSectionDto.builder().name(dto.getName() + "汇总").statistics(totalStatistics.values().stream().collect(Collectors.toList())).build());
+            }
+            for (DimensionSectionDto section : sectionList) {
+                if (section != null && CollUtil.isNotEmpty(section.getStatistics())) {
+                    for (DimensionSectionStatisticsDto statisticsDto : section.getStatistics()) {
+                        if (totalStatistics.get(statisticsDto.getCutDay()).getStatisticsValue().compareTo(BigDecimal.ZERO) > 0) {
+                            statisticsDto.setProportion(statisticsDto.getStatisticsValue().divide(totalStatistics.get(statisticsDto.getCutDay()).getStatisticsValue(), 4, BigDecimal.ROUND_HALF_DOWN));
+                        } else {
+                            statisticsDto.setProportion(BigDecimal.valueOf(100));
+                        }
+                    }
+                }
+            }
+            dto.setSections(sectionList);
+        }
+        return dto;
+    }
+
+    @GetMapping("/report")
+    @ApiOperation(value = "导出维度", httpMethod = "GET")
+    public void report(@RequestParam("id") Integer id, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "timeInterval", required = false) String timeInterval, HttpServletResponse response) {
+        if (id == null) {
+            log.info("关系id为空");
+            return;
+        }
+        if (StrUtil.isNotBlank(timeInterval) && !StrUtil.equals("null", timeInterval)) {
+            if (Integer.valueOf(timeInterval) == -1) {
+                startTime = null;
+                endTime = null;
+            } else {
+                startTime = (DateUtil.format(DateUtil.offsetDay(DateUtil.date(), -Integer.valueOf(timeInterval)), "yyyy-MM-dd") + " 00:00:00");
+                endTime = (DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd") + " 00:00:00");
+            }
+        }
+        SpectacularsDimension spectacularsDimension = spectacularsDimensionService.findBy("id", id);
+        if (spectacularsDimension == null) {
+            log.info("SpectacularsDimension 未找到");
+            return;
+        }
+        Dimension dimension = dimensionService.findById(spectacularsDimension.getDimensionId());
+        if (dimension == null) {
+            log.info("dimension 未找到");
+            return;
+        }
+        Condition c = new Condition(DimensionSection.class);
+        c.createCriteria().andEqualTo("dimensionId", dimension.getId());
+        List<DimensionSection> sections = dimensionSectionService.findByCondition(c);
+        List<String> rowHead = CollUtil.newArrayList("编号", "区间名称", "日切时间", "统计值");
+        ExcelWriter writer = ExcelUtil.getWriter();
+        try {
+            writer.writeHeadRow(rowHead);
+            List<List<Object>> rows = new LinkedList<>();
+            if (CollUtil.isNotEmpty(sections)) {
+                for (DimensionSection temp : sections) {
+                    Condition c2 = new Condition(DayStatistics.class);
+                    Criteria cc = c2.createCriteria().andEqualTo("sectionId", temp.getId());
+                    if (StrUtil.isNotBlank(startTime)) {
+                        cc.andGreaterThanOrEqualTo("cutDay", startTime);
+                    }
+                    if (StrUtil.isNotBlank(endTime)) {
+                        cc.andLessThanOrEqualTo("cutDay", endTime);
+                    }
+                    c2.setOrderByClause("cut_day");
+                    List<DayStatistics> statistics = dayStatisticsService.findByCondition(c2);
+                    if (CollUtil.isNotEmpty(statistics)) {
+                        for (DayStatistics temp2 : statistics) {
+                            List<Object> rowA = CollUtil.newArrayList(temp2.getId(), temp2.getSectionName(), DateUtil.format(temp2.getCutDay(), "yyyy-MM-dd"), temp2.getStatisticsValue()
+
+                            );
+                            rows.add(rowA);
+                        }
+                    } else {
+                        log.info("导出内容为空");
+                    }
+                }
+            }
+            writer.write(rows);
+            //设置宽度自适应
+            writer.setColumnWidth(-1, 22);
+            //response为HttpServletResponse对象
+            response.setContentType("application/vnd.ms-excel;charset=utf-8");
+            //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码
+            response.setHeader("Content-Disposition", "attachment;filename=" + new String(("数据列表").getBytes("UTF-8"), "ISO-8859-1") + ".xls");
+            ServletOutputStream out = response.getOutputStream();
+            //out为OutputStream,需要写出到的目标流
+            writer.flush(out);
+            log.info("导出结束");
+        } catch (Exception e) {
+            log.error("导出异常", e);
+            e.printStackTrace();
+        } finally {
+            // 关闭writer,释放内存
+            writer.close();
+            log.info("导出结束");
+        }
+    }
+
+    // 看板详情
+    @PostMapping("/detail")
+    @ApiOperation(value = "看板详情", httpMethod = "POST")
+    public Result<SpectacularsDto> detail(@RequestBody SpectacularsDetailParam param) {
+        if (param.getId() == null) {
+            return ResultGenerator.genFailResult(ResultCode.ID_IS_NULL);
+        }
+        if (param.getTimeInterval() != null) {
+            if (param.getTimeInterval() == -1) {
+                param.setStartTime(null);
+                param.setEndTime(null);
+            } else {
+                param.setTimeInterval(param.getTimeInterval() + 1);
+                param.setStartTime(DateUtil.format(DateUtil.offsetDay(DateUtil.date(), -param.getTimeInterval()), "yyyy-MM-dd") + " 00:00:00");
+                param.setEndTime(DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd") + " 00:00:00");
+            }
+        }
+        SpectacularsDto spectacularsDto = null;
+        try {
+            Spectaculars spectaculars = spectacularsService.findById(param.getId());
+            if (spectaculars == null) {
+                return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
+            }
+            spectacularsDto = BeanUtil.toBean(spectaculars, SpectacularsDto.class);
+            Condition condition = new Condition(SpectacularsDimension.class);
+            Criteria criteria = condition.createCriteria();
+            criteria.andEqualTo("spectId", spectaculars.getId());
+            List<SpectacularsDimension> spectacularsDimensions = spectacularsDimensionService.findByCondition(condition);
+            String dimensionIds = "";
+            if (CollUtil.isEmpty(spectacularsDimensions)) {
+                return ResultGenerator.genSuccessResult(spectacularsDto);
+            }
+            for (SpectacularsDimension temp : spectacularsDimensions) {
+                dimensionIds = dimensionIds + "," + temp.getDimensionId();
+            }
+            List<Dimension> dimensions = dimensionService.findByIds(dimensionIds.substring(1));
+            if (CollUtil.isEmpty(dimensions)) {
+                return ResultGenerator.genSuccessResult(spectacularsDto);
+            }
+            for (Dimension dimension : dimensions) {
+                for (SpectacularsDimension temp : spectacularsDimensions) {
+                    if (temp.getDimensionId().compareTo(dimension.getId()) == 0) {
+                        dimension.setViewType(temp.getViewType());
+                        dimension.setSpectacularsDimensionId(temp.getId());
+                    }
+                }
+            }
+            spectacularsDto.setDimensions(dimensions.stream().map(temp -> buildDimensionDto(temp, param.getStartTime(), param.getEndTime(), param.getType(), 1, null)).collect(Collectors.toList()));
+
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult(spectacularsDto);
+    }
+
+    @PostMapping("/list")
+    @ApiOperation(value = "spectaculars获取列表", httpMethod = "POST")
+    public Result<List<Spectaculars>> list(@RequestBody SpectacularsListParam spectaculars) {
+
+        PageHelper.startPage(spectaculars.getPage(), spectaculars.getSize());
+
+        Condition condition = new Condition(Spectaculars.class);
+        Criteria criteria = condition.createCriteria();
+        criteria.andEqualTo("userId", spectaculars.getUserId());
+        PageInfo pageInfo = null;
+        try {
+            List<Spectaculars> list = spectacularsService.findByCondition(condition);
+            pageInfo = new PageInfo(list);
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+        return ResultGenerator.genSuccessResult(pageInfo);
+    }
+
+    @PostMapping("/yesterdayData")
+    @ApiOperation(value = "获取昨日数据", httpMethod = "POST")
+    public Result<List<DimensionBo>> yesterdayData() {
+        Condition condition = new Condition(DayStatistics.class);
+        Criteria criteria = condition.createCriteria();
+        if (StrUtil.isNotBlank(ids)) {
+            criteria.andIn("dimensionId", Arrays.asList(ids.split(",")));
+        }
+        criteria.andEqualTo("cutDay", DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd"));
+        condition.setOrderByClause("seq");
+        try {
+            List<DayStatistics> list = dayStatisticsService.findByCondition(condition);
+            if (CollUtil.isNotEmpty(list)) {
+                return ResultGenerator.genSuccessResult(list.stream().map(temp -> BeanUtil.toBean(temp, DimensionSectionBo.class)).collect(Collectors.toList()));
+            } else {
+                return ResultGenerator.genSuccessResult(new ArrayList<>());
+            }
+        } catch (Exception e) {
+            log.error("查询对象操作异常e:{}", e);
+            return ResultGenerator.genFailResult(ResultCode.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+}

+ 12 - 0
operating-service/src/main/java/com/txz/operating/dao/DayStatisticsMapper.java

@@ -0,0 +1,12 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.DayStatistics;
+import com.txz.operating.web.bo.DayStatisticsBo;
+
+import java.util.List;
+import java.util.Map;
+
+public interface DayStatisticsMapper extends Mapper<DayStatistics> {
+    List<DayStatisticsBo> findStatisticsByCondition(Map<String, Object> map);
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/DimensionMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Dimension;
+
+public interface DimensionMapper extends Mapper<Dimension> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/DimensionSectionMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.DimensionSection;
+
+public interface DimensionSectionMapper extends Mapper<DimensionSection> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/SpectacularsDimensionMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.SpectacularsDimension;
+
+public interface SpectacularsDimensionMapper extends Mapper<SpectacularsDimension> {
+}

+ 7 - 0
operating-service/src/main/java/com/txz/operating/dao/SpectacularsMapper.java

@@ -0,0 +1,7 @@
+package com.txz.operating.dao;
+
+import com.txz.operating.core.Mapper;
+import com.txz.operating.model.Spectaculars;
+
+public interface SpectacularsMapper extends Mapper<Spectaculars> {
+}

+ 190 - 0
operating-service/src/main/java/com/txz/operating/model/DayStatistics.java

@@ -0,0 +1,190 @@
+package com.txz.operating.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import javax.persistence.*;
+
+/**
+ * 表名:r_day_statistics
+ * 表注释:日统计
+*/
+@Table(name = "r_day_statistics")
+public class DayStatistics {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Long id;
+
+    /**
+     * 维度id
+     */
+    @Column(name = "dimension_id")
+    private Long dimensionId;
+
+    /**
+     * 区间id
+     */
+    @Column(name = "section_id")
+    private Long sectionId;
+
+    private Integer seq;
+
+    /**
+     * 区间名称
+     */
+    @Column(name = "section_name")
+    private String sectionName;
+
+    /**
+     * 日切时间
+     */
+    @Column(name = "cut_day")
+    private Date cutDay;
+
+    /**
+     * 统计值
+     */
+    @Column(name = "statistics_value")
+    private BigDecimal statisticsValue;
+
+    /**
+     * 统计总数
+     */
+    @Column(name = "statistics_total")
+    private BigDecimal statisticsTotal;
+
+    /**
+     * @return id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取维度id
+     *
+     * @return dimensionId - 维度id
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * 设置维度id
+     *
+     * @param dimensionId 维度id
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 获取区间id
+     *
+     * @return sectionId - 区间id
+     */
+    public Long getSectionId() {
+        return sectionId;
+    }
+
+    /**
+     * 设置区间id
+     *
+     * @param sectionId 区间id
+     */
+    public void setSectionId(Long sectionId) {
+        this.sectionId = sectionId;
+    }
+
+    /**
+     * @return seq
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * @param seq
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 获取区间名称
+     *
+     * @return sectionName - 区间名称
+     */
+    public String getSectionName() {
+        return sectionName;
+    }
+
+    /**
+     * 设置区间名称
+     *
+     * @param sectionName 区间名称
+     */
+    public void setSectionName(String sectionName) {
+        this.sectionName = sectionName;
+    }
+
+    /**
+     * 获取日切时间
+     *
+     * @return cutDay - 日切时间
+     */
+    public Date getCutDay() {
+        return cutDay;
+    }
+
+    /**
+     * 设置日切时间
+     *
+     * @param cutDay 日切时间
+     */
+    public void setCutDay(Date cutDay) {
+        this.cutDay = cutDay;
+    }
+
+    /**
+     * 获取统计值
+     *
+     * @return statisticsValue - 统计值
+     */
+    public BigDecimal getStatisticsValue() {
+        return statisticsValue;
+    }
+
+    /**
+     * 设置统计值
+     *
+     * @param statisticsValue 统计值
+     */
+    public void setStatisticsValue(BigDecimal statisticsValue) {
+        this.statisticsValue = statisticsValue;
+    }
+
+    /**
+     * 获取统计总数
+     *
+     * @return statisticsTotal - 统计总数
+     */
+    public BigDecimal getStatisticsTotal() {
+        return statisticsTotal;
+    }
+
+    /**
+     * 设置统计总数
+     *
+     * @param statisticsTotal 统计总数
+     */
+    public void setStatisticsTotal(BigDecimal statisticsTotal) {
+        this.statisticsTotal = statisticsTotal;
+    }
+}

+ 408 - 0
operating-service/src/main/java/com/txz/operating/model/Dimension.java

@@ -0,0 +1,408 @@
+package com.txz.operating.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+import javax.persistence.*;
+
+/**
+ * 表名:r_dimension
+ * 表注释:维度表
+*/
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Table(name = "r_dimension")
+public class Dimension {
+
+    @Transient
+    @ApiModelProperty("纬度关系id")
+    private Integer spectacularsDimensionId;
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 单位类型:1秒 2个 3元 4%
+     */
+    @Column(name = "unit_type")
+    private Byte unitType;
+
+    /**
+     * 类型 1日统计 2实时查询
+     */
+    private Byte type;
+
+    /**
+     * 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    @Column(name = "inter_type")
+    private Byte interType;
+
+    /**
+     * 接口地址
+     */
+    @Column(name = "inter_url")
+    private String interUrl;
+
+    @Column(name = "param_value")
+    private String paramValue;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    @Column(name = "view_type")
+    private String viewType;
+
+    /**
+     * 状态 1正常 2停用 
+     */
+    private Byte status;
+
+    /**
+     * 统计类型 1无统计 2汇总 
+     */
+    @Column(name = "statistics_type")
+    private Byte statisticsType;
+
+    /**
+     * 减少入库天数
+     */
+    @Column(name = "decrease_num")
+    private Integer decreaseNum;
+
+    private Integer seq;
+
+    /**
+     * 创建人
+     */
+    @Column(name = "create_name")
+    private String createName;
+
+    /**
+     * 更新人
+     */
+    @Column(name = "update_name")
+    private String updateName;
+
+    /**
+     * 创建时间
+     */
+    @Column(name = "create_time")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @Column(name = "update_time")
+    private Date updateTime;
+
+    /**
+     * @return id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取名称
+     *
+     * @return name - 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 设置名称
+     *
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 获取备注
+     *
+     * @return memo - 备注
+     */
+    public String getMemo() {
+        return memo;
+    }
+
+    /**
+     * 设置备注
+     *
+     * @param memo 备注
+     */
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    /**
+     * 获取单位类型:1秒 2个 3元 4%
+     *
+     * @return unitType - 单位类型:1秒 2个 3元 4%
+     */
+    public Byte getUnitType() {
+        return unitType;
+    }
+
+    /**
+     * 设置单位类型:1秒 2个 3元 4%
+     *
+     * @param unitType 单位类型:1秒 2个 3元 4%
+     */
+    public void setUnitType(Byte unitType) {
+        this.unitType = unitType;
+    }
+
+    /**
+     * 获取类型 1日统计 2实时查询
+     *
+     * @return type - 类型 1日统计 2实时查询
+     */
+    public Byte getType() {
+        return type;
+    }
+
+    /**
+     * 设置类型 1日统计 2实时查询
+     *
+     * @param type 类型 1日统计 2实时查询
+     */
+    public void setType(Byte type) {
+        this.type = type;
+    }
+
+    /**
+     * 获取接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     *
+     * @return interType - 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    public Byte getInterType() {
+        return interType;
+    }
+
+    /**
+     * 设置接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     *
+     * @param interType 接口类型:1商城停留时间2支付停留时间3种子使用4装饰使用5虫子使用 6 http
+     */
+    public void setInterType(Byte interType) {
+        this.interType = interType;
+    }
+
+    /**
+     * 获取接口地址
+     *
+     * @return interUrl - 接口地址
+     */
+    public String getInterUrl() {
+        return interUrl;
+    }
+
+    /**
+     * 设置接口地址
+     *
+     * @param interUrl 接口地址
+     */
+    public void setInterUrl(String interUrl) {
+        this.interUrl = interUrl;
+    }
+
+    /**
+     * @return paramValue
+     */
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    /**
+     * @param paramValue
+     */
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+    /**
+     * 获取显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     *
+     * @return viewType - 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public String getViewType() {
+        return viewType;
+    }
+
+    /**
+     * 设置显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     *
+     * @param viewType 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public void setViewType(String viewType) {
+        this.viewType = viewType;
+    }
+
+    /**
+     * 获取状态 1正常 2停用 
+     *
+     * @return status - 状态 1正常 2停用 
+     */
+    public Byte getStatus() {
+        return status;
+    }
+
+    /**
+     * 设置状态 1正常 2停用 
+     *
+     * @param status 状态 1正常 2停用 
+     */
+    public void setStatus(Byte status) {
+        this.status = status;
+    }
+
+    /**
+     * 获取统计类型 1无统计 2汇总 
+     *
+     * @return statisticsType - 统计类型 1无统计 2汇总 
+     */
+    public Byte getStatisticsType() {
+        return statisticsType;
+    }
+
+    /**
+     * 设置统计类型 1无统计 2汇总 
+     *
+     * @param statisticsType 统计类型 1无统计 2汇总 
+     */
+    public void setStatisticsType(Byte statisticsType) {
+        this.statisticsType = statisticsType;
+    }
+
+    /**
+     * 获取减少入库天数
+     *
+     * @return decreaseNum - 减少入库天数
+     */
+    public Integer getDecreaseNum() {
+        return decreaseNum;
+    }
+
+    /**
+     * 设置减少入库天数
+     *
+     * @param decreaseNum 减少入库天数
+     */
+    public void setDecreaseNum(Integer decreaseNum) {
+        this.decreaseNum = decreaseNum;
+    }
+
+    /**
+     * @return seq
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * @param seq
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 获取创建人
+     *
+     * @return createName - 创建人
+     */
+    public String getCreateName() {
+        return createName;
+    }
+
+    /**
+     * 设置创建人
+     *
+     * @param createName 创建人
+     */
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    /**
+     * 获取更新人
+     *
+     * @return updateName - 更新人
+     */
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    /**
+     * 设置更新人
+     *
+     * @param updateName 更新人
+     */
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    /**
+     * 获取创建时间
+     *
+     * @return createTime - 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 设置创建时间
+     *
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 获取更新时间
+     *
+     * @return updateTime - 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 设置更新时间
+     *
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 218 - 0
operating-service/src/main/java/com/txz/operating/model/DimensionSection.java

@@ -0,0 +1,218 @@
+package com.txz.operating.model;
+
+import java.math.BigDecimal;
+import javax.persistence.*;
+
+/**
+ * 表名:r_dimension_section
+ * 表注释:维度区间(-1为无穷大)
+*/
+@Table(name = "r_dimension_section")
+public class DimensionSection {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 维度id
+     */
+    @Column(name = "dimension_id")
+    private Long dimensionId;
+
+    /**
+     * 下界(-1为无穷大)
+     */
+    @Column(name = "lower_bound")
+    private BigDecimal lowerBound;
+
+    /**
+     * 上界(-1为无穷大)
+     */
+    @Column(name = "upper_bound")
+    private BigDecimal upperBound;
+
+    /**
+     * 参数值
+     */
+    @Column(name = "param_value")
+    private String paramValue;
+
+    /**
+     * 边界类型:1下开上闭 2下闭上开 
+     */
+    @Column(name = "bound_type")
+    private Byte boundType;
+
+    /**
+     * 参数类型 1区间 2固定值
+     */
+    private Byte type;
+
+    /**
+     * @return id
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取名称
+     *
+     * @return name - 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 设置名称
+     *
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 获取备注
+     *
+     * @return memo - 备注
+     */
+    public String getMemo() {
+        return memo;
+    }
+
+    /**
+     * 设置备注
+     *
+     * @param memo 备注
+     */
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    /**
+     * 获取维度id
+     *
+     * @return dimensionId - 维度id
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * 设置维度id
+     *
+     * @param dimensionId 维度id
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 获取下界(-1为无穷大)
+     *
+     * @return lowerBound - 下界(-1为无穷大)
+     */
+    public BigDecimal getLowerBound() {
+        return lowerBound;
+    }
+
+    /**
+     * 设置下界(-1为无穷大)
+     *
+     * @param lowerBound 下界(-1为无穷大)
+     */
+    public void setLowerBound(BigDecimal lowerBound) {
+        this.lowerBound = lowerBound;
+    }
+
+    /**
+     * 获取上界(-1为无穷大)
+     *
+     * @return upperBound - 上界(-1为无穷大)
+     */
+    public BigDecimal getUpperBound() {
+        return upperBound;
+    }
+
+    /**
+     * 设置上界(-1为无穷大)
+     *
+     * @param upperBound 上界(-1为无穷大)
+     */
+    public void setUpperBound(BigDecimal upperBound) {
+        this.upperBound = upperBound;
+    }
+
+    /**
+     * 获取参数值
+     *
+     * @return paramValue - 参数值
+     */
+    public String getParamValue() {
+        return paramValue;
+    }
+
+    /**
+     * 设置参数值
+     *
+     * @param paramValue 参数值
+     */
+    public void setParamValue(String paramValue) {
+        this.paramValue = paramValue;
+    }
+
+    /**
+     * 获取边界类型:1下开上闭 2下闭上开 
+     *
+     * @return boundType - 边界类型:1下开上闭 2下闭上开 
+     */
+    public Byte getBoundType() {
+        return boundType;
+    }
+
+    /**
+     * 设置边界类型:1下开上闭 2下闭上开 
+     *
+     * @param boundType 边界类型:1下开上闭 2下闭上开 
+     */
+    public void setBoundType(Byte boundType) {
+        this.boundType = boundType;
+    }
+
+    /**
+     * 获取参数类型 1区间 2固定值
+     *
+     * @return type - 参数类型 1区间 2固定值
+     */
+    public Byte getType() {
+        return type;
+    }
+
+    /**
+     * 设置参数类型 1区间 2固定值
+     *
+     * @param type 参数类型 1区间 2固定值
+     */
+    public void setType(Byte type) {
+        this.type = type;
+    }
+}

+ 74 - 0
operating-service/src/main/java/com/txz/operating/model/Spectaculars.java

@@ -0,0 +1,74 @@
+package com.txz.operating.model;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.*;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+@Setter
+/**
+ * 表名:r_spectaculars
+ * 表注释:看板
+*/
+@Table(name = "r_spectaculars")
+public class Spectaculars {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    private String name;
+
+    @Column(name = "user_id")
+    private Integer userId;
+
+    @ApiModelProperty("关联纬度")
+    @Transient
+    private List<SpectacularsDimension> dimensions;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return userId
+     */
+    public Integer getUserId() {
+        return userId;
+    }
+
+    /**
+     * @param userId
+     */
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+}

+ 93 - 0
operating-service/src/main/java/com/txz/operating/model/SpectacularsDimension.java

@@ -0,0 +1,93 @@
+package com.txz.operating.model;
+
+import lombok.*;
+
+import javax.persistence.*;
+
+/**
+ * 表名:r_spectaculars_dimension
+ * 表注释:看板纬度关系表
+*/
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+@Setter
+@Table(name = "r_spectaculars_dimension")
+public class SpectacularsDimension {
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    @Column(name = "spect_id")
+    private Integer spectId;
+
+    @Column(name = "dimension_id")
+    private Long dimensionId;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    @Column(name = "view_type")
+    private String viewType;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * @return spectId
+     */
+    public Integer getSpectId() {
+        return spectId;
+    }
+
+    /**
+     * @param spectId
+     */
+    public void setSpectId(Integer spectId) {
+        this.spectId = spectId;
+    }
+
+    /**
+     * @return dimensionId
+     */
+    public Long getDimensionId() {
+        return dimensionId;
+    }
+
+    /**
+     * @param dimensionId
+     */
+    public void setDimensionId(Long dimensionId) {
+        this.dimensionId = dimensionId;
+    }
+
+    /**
+     * 获取显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     *
+     * @return viewType - 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public String getViewType() {
+        return viewType;
+    }
+
+    /**
+     * 设置显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     *
+     * @param viewType 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    public void setViewType(String viewType) {
+        this.viewType = viewType;
+    }
+}

+ 16 - 0
operating-service/src/main/java/com/txz/operating/service/DayStatisticsService.java

@@ -0,0 +1,16 @@
+package com.txz.operating.service;
+import com.txz.operating.model.DayStatistics;
+import com.txz.operating.core.Service;
+import com.txz.operating.web.bo.DayStatisticsBo;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+public interface DayStatisticsService extends Service<DayStatistics> {
+
+    List<DayStatisticsBo> findStatisticsByCondition(Map<String, Object> map);
+}

+ 11 - 0
operating-service/src/main/java/com/txz/operating/service/DimensionSectionService.java

@@ -0,0 +1,11 @@
+package com.txz.operating.service;
+import com.txz.operating.model.DimensionSection;
+import com.txz.operating.core.Service;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+public interface DimensionSectionService extends Service<DimensionSection> {
+
+}

+ 11 - 0
operating-service/src/main/java/com/txz/operating/service/DimensionService.java

@@ -0,0 +1,11 @@
+package com.txz.operating.service;
+import com.txz.operating.model.Dimension;
+import com.txz.operating.core.Service;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+public interface DimensionService extends Service<Dimension> {
+
+}

+ 13 - 0
operating-service/src/main/java/com/txz/operating/service/SpectacularsDimensionService.java

@@ -0,0 +1,13 @@
+package com.txz.operating.service;
+import com.txz.operating.model.SpectacularsDimension;
+import com.txz.operating.core.Service;
+import tk.mybatis.mapper.entity.Condition;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+public interface SpectacularsDimensionService extends Service<SpectacularsDimension> {
+
+    void deleteByCondition(Condition condition);
+}

+ 11 - 0
operating-service/src/main/java/com/txz/operating/service/SpectacularsService.java

@@ -0,0 +1,11 @@
+package com.txz.operating.service;
+import com.txz.operating.model.Spectaculars;
+import com.txz.operating.core.Service;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+public interface SpectacularsService extends Service<Spectaculars> {
+
+}

+ 29 - 0
operating-service/src/main/java/com/txz/operating/service/impl/DayStatisticsServiceImpl.java

@@ -0,0 +1,29 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.dao.DayStatisticsMapper;
+import com.txz.operating.model.DayStatistics;
+import com.txz.operating.service.DayStatisticsService;
+import com.txz.operating.core.AbstractService;
+import com.txz.operating.web.bo.DayStatisticsBo;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+@Service
+@Transactional
+public class DayStatisticsServiceImpl extends AbstractService<DayStatistics> implements DayStatisticsService {
+    @Resource
+    private DayStatisticsMapper rDayStatisticsMapper;
+
+    @Override
+    public List<DayStatisticsBo> findStatisticsByCondition(Map<String, Object> map) {
+        return rDayStatisticsMapper.findStatisticsByCondition(map);
+    }
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/DimensionSectionServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.dao.DimensionSectionMapper;
+import com.txz.operating.model.DimensionSection;
+import com.txz.operating.service.DimensionSectionService;
+import com.txz.operating.core.AbstractService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+@Service
+@Transactional
+public class DimensionSectionServiceImpl extends AbstractService<DimensionSection> implements DimensionSectionService {
+    @Resource
+    private DimensionSectionMapper rDimensionSectionMapper;
+
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/DimensionServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.dao.DimensionMapper;
+import com.txz.operating.model.Dimension;
+import com.txz.operating.service.DimensionService;
+import com.txz.operating.core.AbstractService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+@Service
+@Transactional
+public class DimensionServiceImpl extends AbstractService<Dimension> implements DimensionService {
+    @Resource
+    private DimensionMapper rDimensionMapper;
+
+}

+ 27 - 0
operating-service/src/main/java/com/txz/operating/service/impl/SpectacularsDimensionServiceImpl.java

@@ -0,0 +1,27 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.dao.SpectacularsDimensionMapper;
+import com.txz.operating.model.SpectacularsDimension;
+import com.txz.operating.service.SpectacularsDimensionService;
+import com.txz.operating.core.AbstractService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import tk.mybatis.mapper.entity.Condition;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+@Service
+@Transactional
+public class SpectacularsDimensionServiceImpl extends AbstractService<SpectacularsDimension> implements SpectacularsDimensionService {
+    @Resource
+    private SpectacularsDimensionMapper rSpectacularsDimensionMapper;
+
+    @Override
+    public void deleteByCondition(Condition condition) {
+        rSpectacularsDimensionMapper.deleteByCondition(condition);
+    }
+}

+ 22 - 0
operating-service/src/main/java/com/txz/operating/service/impl/SpectacularsServiceImpl.java

@@ -0,0 +1,22 @@
+package com.txz.operating.service.impl;
+
+import com.txz.operating.dao.SpectacularsMapper;
+import com.txz.operating.model.Spectaculars;
+import com.txz.operating.service.SpectacularsService;
+import com.txz.operating.core.AbstractService;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+
+
+/**
+ * Created by CodeGenerator on 2025/09/01.
+ */
+@Service
+@Transactional
+public class SpectacularsServiceImpl extends AbstractService<Spectaculars> implements SpectacularsService {
+    @Resource
+    private SpectacularsMapper rSpectacularsMapper;
+
+}

+ 57 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DayStatisticsBo.java

@@ -0,0 +1,57 @@
+package com.txz.operating.web.bo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class DayStatisticsBo {
+
+    /**
+     * 维度id
+     */
+    @ApiModelProperty("维度id")
+    private Long dimensionId;
+
+    @ApiModelProperty("排序")
+    private Integer seq;
+
+    /**
+     * 区间id
+     */
+    @ApiModelProperty("区间id")
+    private Long sectionId;
+
+    /**
+     * 区间名称
+     */
+    @ApiModelProperty("区间名称")
+    private String sectionName;
+
+    /**
+     * 统计时间
+     */
+    @ApiModelProperty("统计时间")
+    private String cutDay;
+
+    /**
+     * 统计值
+     */
+    @ApiModelProperty("统计值")
+    private BigDecimal statisticsValue;
+
+    /**
+     * 统计总数
+     */
+    @ApiModelProperty("统计总数")
+    private BigDecimal statisticsTotal;
+
+
+}

+ 45 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DimensionBo.java

@@ -0,0 +1,45 @@
+package com.txz.operating.web.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@ApiModel("纬度")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DimensionBo {
+    private Long id;
+
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+
+    /**
+     * 单位类型:1秒 2个
+     */
+    @ApiModelProperty("单位类型:1秒 2个")
+    private Byte unitType;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    @ApiModelProperty("显示类型 line:折线图 bar:圆饼图 pie:柱状图")
+    private String viewType;
+
+    /**
+     * 纬度区间值
+     */
+    @ApiModelProperty("纬度区间值")
+    private List<DimensionSectionBo> sections;
+
+}

+ 89 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DimensionDto.java

@@ -0,0 +1,89 @@
+package com.txz.operating.web.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+import java.util.List;
+import javax.persistence.*;
+@ApiModel("纬度")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DimensionDto {
+    private Long id;
+
+    @Transient
+    @ApiModelProperty("纬度关系id")
+    private Integer spectacularsDimensionId;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty("备注")
+    private String memo;
+
+    /**
+     * 单位类型:1秒 2个
+     */
+    @ApiModelProperty("单位类型:1秒 2个")
+    private Byte unitType;
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    @ApiModelProperty("显示类型 line:折线图 bar:圆饼图 pie:柱状图")
+    private String viewType;
+
+    /**
+     * 纬度区间
+     */
+    @ApiModelProperty("纬度区间")
+    private List<DimensionSectionDto> sections;
+
+    /**
+     * 创建人
+     */
+    @ApiModelProperty("创建人")
+    private String createName;
+
+    /**
+     * 更新人
+     */
+    @ApiModelProperty("更新人")
+    private String updateName;
+
+    /**
+     * 创建时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+
+    @ApiModelProperty("是否选中")
+    private Boolean selected = false;
+
+}

+ 44 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionBo.java

@@ -0,0 +1,44 @@
+package com.txz.operating.web.bo;
+
+import cn.hutool.core.collection.CollUtil;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import javax.persistence.*;
+@ApiModel("纬度区间")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DimensionSectionBo {
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty("名称")
+    private String sectionName;
+
+    /**
+     * 日切时间
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    @ApiModelProperty("日切时间")
+    private Date cutDay;
+
+    /**
+     * 统计值
+     */
+    @ApiModelProperty("统计值")
+    private BigDecimal statisticsValue;
+}

+ 55 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionDto.java

@@ -0,0 +1,55 @@
+package com.txz.operating.web.bo;
+
+import cn.hutool.core.collection.CollUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel("纬度区间")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DimensionSectionDto {
+    private Long id;
+
+    /**
+     * 名称
+     */
+    @ApiModelProperty("名称")
+    private String name;
+
+    /**
+     * 备注
+     */
+    @ApiModelProperty("备注")
+    private String memo;
+
+    /**
+     * 统计值
+     */
+    @ApiModelProperty("统计值")
+    private List<DimensionSectionStatisticsDto> statistics;
+
+    /**
+     * 统计总值
+     */
+    @ApiModelProperty("统计总值")
+    private BigDecimal total;
+
+    public BigDecimal getTotal() {
+        BigDecimal a = new BigDecimal(0);
+        if (CollUtil.isNotEmpty(statistics)){
+            for (DimensionSectionStatisticsDto dto:statistics) {
+                a = a.add(dto.getStatisticsValue());
+            }
+        }
+        return a;
+    }
+}

+ 41 - 0
operating-service/src/main/java/com/txz/operating/web/bo/DimensionSectionStatisticsDto.java

@@ -0,0 +1,41 @@
+package com.txz.operating.web.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ *
+ */
+@ApiModel("纬度区间")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DimensionSectionStatisticsDto {
+    private Long id;
+
+    /**
+     * 日切时间
+     */
+    @ApiModelProperty("日切时间")
+    private String cutDay;
+
+    /**
+     * 统计值
+     */
+    @ApiModelProperty("统计值")
+    private BigDecimal statisticsValue;
+
+    /**
+     * 当日占比
+     */
+    @ApiModelProperty("当日占比")
+    private BigDecimal proportion;
+
+}

+ 25 - 0
operating-service/src/main/java/com/txz/operating/web/bo/SpectacularsDto.java

@@ -0,0 +1,25 @@
+package com.txz.operating.web.bo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+@ApiModel("看板")
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class SpectacularsDto {
+    @ApiModelProperty("看板id")
+    private Integer id;
+    @ApiModelProperty("名称")
+    private String name;
+    @ApiModelProperty("用户id")
+    private Integer userId;
+    @ApiModelProperty("纬度")
+    private List<DimensionDto> dimensions;
+}

+ 63 - 0
operating-service/src/main/java/com/txz/operating/web/param/DimensionDetailParam.java

@@ -0,0 +1,63 @@
+package com.txz.operating.web.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/12/14 13:56
+ * @Version 1.0
+ */
+@Data
+@ApiModel("维度详情参数")
+public class DimensionDetailParam implements Serializable {
+
+    private static final long serialVersionUID = -5318595472853014732L;
+
+    /**
+     * id
+     */
+    @ApiModelProperty("id")
+    private Integer id;
+
+
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty("开始时间")
+    private String startTime;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty("结束时间")
+    private String endTime;
+
+    /**
+     * 时间间隔
+     */
+    @ApiModelProperty("时间间隔")
+    private Integer timeInterval;
+
+    /**
+     * 统计类型 1按日统计 2按周统计 3按月统计 4按年统计
+     */
+    @ApiModelProperty("统计类型 1按日统计 2按周统计 3按月统计 4按年统计")
+    private Integer type;
+
+    /**
+     * 颗粒度 1全部应用 2应用级 3渠道级
+     */
+    @ApiModelProperty("颗粒度 1全部应用 2应用级 (默认) 3渠道级")
+    private Integer granularity;
+
+    /**
+     * 应用编号
+     */
+    @ApiModelProperty("应用编号")
+    private String appCode;
+
+}

+ 27 - 0
operating-service/src/main/java/com/txz/operating/web/param/DimensionParam.java

@@ -0,0 +1,27 @@
+package com.txz.operating.web.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/12/14 13:56
+ * @Version 1.0
+ */
+@Data
+@ApiModel("维度关系")
+public class DimensionParam  {
+
+
+    /**
+     * 显示类型 line:折线图 bar:圆饼图 pie:柱状图
+     */
+    @ApiModelProperty("显示类型 line:折线图 bar:圆饼图 pie:柱状图")
+    private String viewType;
+
+    @ApiModelProperty("id")
+    private Integer id;
+}

+ 53 - 0
operating-service/src/main/java/com/txz/operating/web/param/SpectacularsDetailParam.java

@@ -0,0 +1,53 @@
+package com.txz.operating.web.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/12/14 13:56
+ * @Version 1.0
+ */
+@Data
+@ApiModel("看板详情参数")
+public class SpectacularsDetailParam implements Serializable {
+
+    private static final long serialVersionUID = -5318595472853014732L;
+
+    /**
+     * id
+     */
+    @ApiModelProperty("id")
+    private Integer id;
+
+
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty("开始时间")
+    private String startTime;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty("结束时间")
+    private String endTime;
+
+    /**
+     * 时间间隔
+     */
+    @ApiModelProperty("时间间隔")
+    private Integer timeInterval;
+
+
+    /**
+     * 统计类型 1按日统计 2按周统计 3按月统计 4按年统计
+     */
+    @ApiModelProperty("统计类型 1按日统计 2按周统计 3按月统计 4按年统计")
+    private Integer type;
+
+
+}

+ 39 - 0
operating-service/src/main/java/com/txz/operating/web/param/SpectacularsListParam.java

@@ -0,0 +1,39 @@
+package com.txz.operating.web.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/12/14 13:56
+ * @Version 1.0
+ */
+@Data
+@ApiModel("看板列表参数")
+public class SpectacularsListParam implements Serializable {
+
+    private static final long serialVersionUID = -5318595472853014732L;
+
+    /**
+     * 页码
+     */
+    @ApiModelProperty("页码")
+    private Integer page;
+
+
+    /**
+     * 页码
+     */
+    @ApiModelProperty("页码")
+    private Integer size;
+
+    /**
+     * 用户id
+     */
+    @ApiModelProperty("用户id")
+    private String userId;
+
+}

+ 53 - 0
operating-service/src/main/resources/mapper/DayStatisticsMapper.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.DayStatisticsMapper">
+  <resultMap id="BaseResultMap" type="com.txz.operating.model.DayStatistics">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="dimension_id" jdbcType="BIGINT" property="dimensionId" />
+    <result column="section_id" jdbcType="BIGINT" property="sectionId" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <result column="section_name" jdbcType="VARCHAR" property="sectionName" />
+    <result column="cut_day" jdbcType="DATE" property="cutDay" />
+    <result column="statistics_value" jdbcType="DECIMAL" property="statisticsValue" />
+    <result column="statistics_total" jdbcType="DECIMAL" property="statisticsTotal" />
+  </resultMap>
+
+  <select id="findStatisticsByCondition" resultType="com.txz.operating.web.bo.DayStatisticsBo">
+    select sum(statistics_value) as statisticsValue,
+    <choose>
+      <when test="dataType != null and dataType == 2">
+        DATE_FORMAT(cut_day, '%Y-%u') as cutDay
+      </when>
+      <when test="dataType != null and dataType == 3">
+        DATE_FORMAT(cut_day, '%Y-%m') as cutDay
+      </when>
+      <when test="dataType != null and dataType == 4">
+        DATE_FORMAT(cut_day, '%Y') as cutDay
+      </when>
+      <otherwise>
+        cut_day as cutDay
+      </otherwise>
+    </choose>
+    from r_day_statistics
+    where section_id = #{sectionId} and cut_day between #{startTime} and #{endTime}
+    GROUP BY
+    <choose>
+      <when test="dataType != null and dataType == 2">
+        DATE_FORMAT(cut_day, '%Y-%u')
+      </when>
+      <when test="dataType != null and dataType == 3">
+        DATE_FORMAT(cut_day, '%Y-%m')
+      </when>
+      <when test="dataType != null and dataType == 4">
+        DATE_FORMAT(cut_day, '%Y')
+      </when>
+      <otherwise>
+        cut_day
+      </otherwise>
+    </choose>
+    order by cut_day
+  </select>
+</mapper>

+ 26 - 0
operating-service/src/main/resources/mapper/DimensionMapper.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.DimensionMapper">
+  <resultMap id="BaseResultMap" type="com.txz.operating.model.Dimension">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="memo" jdbcType="VARCHAR" property="memo" />
+    <result column="unit_type" jdbcType="TINYINT" property="unitType" />
+    <result column="type" jdbcType="TINYINT" property="type" />
+    <result column="inter_type" jdbcType="TINYINT" property="interType" />
+    <result column="inter_url" jdbcType="VARCHAR" property="interUrl" />
+    <result column="param_value" jdbcType="VARCHAR" property="paramValue" />
+    <result column="view_type" jdbcType="VARCHAR" property="viewType" />
+    <result column="status" jdbcType="TINYINT" property="status" />
+    <result column="statistics_type" jdbcType="TINYINT" property="statisticsType" />
+    <result column="decrease_num" jdbcType="INTEGER" property="decreaseNum" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <result column="create_name" jdbcType="VARCHAR" property="createName" />
+    <result column="update_name" jdbcType="VARCHAR" property="updateName" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+</mapper>

+ 18 - 0
operating-service/src/main/resources/mapper/DimensionSectionMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.DimensionSectionMapper">
+  <resultMap id="BaseResultMap" type="com.txz.operating.model.DimensionSection">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="memo" jdbcType="VARCHAR" property="memo" />
+    <result column="dimension_id" jdbcType="BIGINT" property="dimensionId" />
+    <result column="lower_bound" jdbcType="DECIMAL" property="lowerBound" />
+    <result column="upper_bound" jdbcType="DECIMAL" property="upperBound" />
+    <result column="param_value" jdbcType="VARCHAR" property="paramValue" />
+    <result column="bound_type" jdbcType="TINYINT" property="boundType" />
+    <result column="type" jdbcType="TINYINT" property="type" />
+  </resultMap>
+</mapper>

+ 13 - 0
operating-service/src/main/resources/mapper/SpectacularsDimensionMapper.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.SpectacularsDimensionMapper">
+  <resultMap id="BaseResultMap" type="com.txz.operating.model.SpectacularsDimension">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="spect_id" jdbcType="INTEGER" property="spectId" />
+    <result column="dimension_id" jdbcType="BIGINT" property="dimensionId" />
+    <result column="view_type" jdbcType="VARCHAR" property="viewType" />
+  </resultMap>
+</mapper>

+ 12 - 0
operating-service/src/main/resources/mapper/SpectacularsMapper.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.txz.operating.dao.SpectacularsMapper">
+  <resultMap id="BaseResultMap" type="com.txz.operating.model.Spectaculars">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="user_id" jdbcType="INTEGER" property="userId" />
+  </resultMap>
+</mapper>

+ 1 - 1
operating-service/src/test/java/CodeGenerator.java

@@ -46,7 +46,7 @@ public class CodeGenerator {
 	public static void main(String[] args) {
 //		genCode("o_lottery","o_lottery_prize","o_lottery_record");
 		// genCode("输入表名","输入自定义Model名称");
-		  genCode("o_app_half_time");
+		  genCode("r_day_statistics","r_dimension","r_dimension_section","r_spectaculars","r_spectaculars_dimension");
 		//genCode("c_member_coupon");
 	}