Browse Source

report pool

xushili 9 months ago
parent
commit
984dbaabe2

+ 766 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/entity/ProEconReportIndicatorPool.java

@@ -0,0 +1,766 @@
+package com.ruoyi.ucp.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+/**
+ * <p>
+ * 报表指标池
+ * </p>
+ *
+ * @author wang
+ * @since 2024-05-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@TableName("pro_econ_report_indicator_pool")
+public class ProEconReportIndicatorPool extends Model<ProEconReportIndicatorPool> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 编号
+     */
+    private String id;
+
+    /**
+     * 外键编号
+     */
+    private String foreignKeyId;
+
+    /**
+     * 日期
+     */
+    private LocalDate recordDate;
+
+    /**
+     * 类型
+     */
+    private String type;
+
+    /**
+     * 风场编号
+     */
+    private String windpowerstationId;
+
+    /**
+     * 项目编号
+     */
+    private String projectId;
+
+    /**
+     * 线路编号
+     */
+    private String lineId;
+
+    /**
+     * 公司编号
+     */
+    private String companyId;
+
+    /**
+     * 区域编号
+     */
+    private String regionId;
+
+    /**
+     * 所属位置(区域、区域风、区域光、公司、公司、公司风、公司光、场站、期次、线路)
+     */
+    private String location;
+
+    /**
+     * 日发电量(电表)
+     */
+    private Double rfdldb;
+
+    /**
+     * 日上网电量(电表)
+     */
+    private Double rswdldb;
+
+    /**
+     * 日工网购网电量(电表)
+     */
+    private Double rgwgwdldb;
+
+    /**
+     * 日农网购网电量(电表)
+     */
+    private Double rnwgwdldb;
+
+    /**
+     * 日综合场用电量(电表)
+     */
+    private Double rzhcydldb;
+
+    /**
+     * 日发电厂用电量(电表)
+     */
+    private Double rfdcydldb;
+
+    /**
+     * 月发电量(电表)
+     */
+    private Double yfdldb;
+
+    /**
+     * 月上网电量(电表)
+     */
+    private Double yswdldb;
+
+    /**
+     * 月工网购网电量(电表)
+     */
+    private Double ygwgwdldb;
+
+    /**
+     * 月农网购网电量(电表)
+     */
+    private Double ynwgwdldb;
+
+    /**
+     * 月综合场用电量(电表)
+     */
+    private Double yzhcydldb;
+
+    /**
+     * 月发电厂用电量(电表)
+     */
+    private Double yfdcydldb;
+
+    /**
+     * 年发电量(电表)
+     */
+    private Double nfdldb;
+
+    /**
+     * 年上网电量(电表)
+     */
+    private Double nswdldb;
+
+    /**
+     * 年工网购网电量(电表)
+     */
+    private Double ngwgwdldb;
+
+    /**
+     * 年农网购网电量(电表)
+     */
+    private Double nnwgwdldb;
+
+    /**
+     * 年综合场用电量(电表)
+     */
+    private Double nzhcydldb;
+
+    /**
+     * 年发电厂用电量(电表)
+     */
+    private Double nfdcydldb;
+
+    /**
+     * 日最大风速
+     */
+    private Double rzdfs;
+
+    /**
+     * 日最小风速
+     */
+    private Double rzxfs;
+
+    /**
+     * 日最大功率
+     */
+    private Double rzdgl;
+
+    /**
+     * 日最小功率
+     */
+    private Double rzxgl;
+
+    /**
+     * 日平均功率
+     */
+    private Double rpjgl;
+
+    /**
+     * 日平均风速
+     */
+    private Double rpjfs;
+
+    /**
+     * 日理论发电量
+     */
+    private Double rllfdl;
+
+    /**
+     * 日故障损失电量
+     */
+    private Double rgzssdl;
+
+    /**
+     * 日场内受累故障损失电量
+     */
+    private Double rcnslgzssdl;
+
+    /**
+     * 日检修损失电量
+     */
+    private Double rjxssdl;
+
+    /**
+     * 日场内受累检修损失电量
+     */
+    private Double rcnsljxssdl;
+
+    /**
+     * 日待机损失电量
+     */
+    private Double rdjssdl;
+
+    /**
+     * 日缺陷降出力损失电量
+     */
+    private Double rqxjclssdl;
+
+    /**
+     * 日手动停机损失电量
+     */
+    private Double rsdtjssdl;
+
+    /**
+     * 日性能损失电量
+     */
+    private Double rxnssdl;
+
+    /**
+     * 日限电停机损失电量
+     */
+    private Double rxdtjssdl;
+
+    /**
+     * 日限电降出力损失电量
+     */
+    private Double rxdjclssdl;
+
+    /**
+     * 日场外受累电网损失电量
+     */
+    private Double rcwsldwssdl;
+
+    /**
+     * 日场外受累天气损失电量
+     */
+    private Double rcwsltqssdl;
+
+    /**
+     * 月最大风速
+     */
+    private Double yzdfs;
+
+    /**
+     * 月最小风速
+     */
+    private Double yzxfs;
+
+    /**
+     * 月最大功率
+     */
+    private Double yzdgl;
+
+    /**
+     * 月最小功率
+     */
+    private Double yzxgl;
+
+    /**
+     * 月平均功率
+     */
+    private Double ypjgl;
+
+    /**
+     * 月平均风速
+     */
+    private Double ypjfs;
+
+    /**
+     * 月理论发电量
+     */
+    private Double yllfdl;
+
+    /**
+     * 月故障损失电量
+     */
+    private Double ygzssdl;
+
+    /**
+     * 月场内受累故障损失电量
+     */
+    private Double ycnslgzssdl;
+
+    /**
+     * 月检修损失电量
+     */
+    private Double yjxssdl;
+
+    /**
+     * 月场内受累检修损失电量
+     */
+    private Double ycnsljxssdl;
+
+    /**
+     * 月待机损失电量
+     */
+    private Double ydjssdl;
+
+    /**
+     * 月缺陷降出力损失电量
+     */
+    private Double yqxjclssdl;
+
+    /**
+     * 月手动停机损失电量
+     */
+    private Double ysdtjssdl;
+
+    /**
+     * 月性能损失电量
+     */
+    private Double yxnssdl;
+
+    /**
+     * 月限电停机损失电量
+     */
+    private Double yxdtjssdl;
+
+    /**
+     * 月限电降出力损失电量
+     */
+    private Double yxdjclssdl;
+
+    /**
+     * 月场外受累电网损失电量
+     */
+    private Double ycwsldwssdl;
+
+    /**
+     * 月场外受累天气损失电量
+     */
+    private Double ycwsltqssdl;
+
+    /**
+     * 年最大风速
+     */
+    private Double nzdfs;
+
+    /**
+     * 年最小风速
+     */
+    private Double nzxfs;
+
+    /**
+     * 年最大功率
+     */
+    private Double nzdgl;
+
+    /**
+     * 年最小功率
+     */
+    private Double nzxgl;
+
+    /**
+     * 年平均功率
+     */
+    private Double npjgl;
+
+    /**
+     * 年平均风速
+     */
+    private Double npjfs;
+
+    /**
+     * 年理论发电量
+     */
+    private Double nllfdl;
+
+    /**
+     * 年故障损失电量
+     */
+    private Double ngzssdl;
+
+    /**
+     * 年场内受累故障损失电量
+     */
+    private Double ncnslgzssdl;
+
+    /**
+     * 年检修损失电量
+     */
+    private Double njxssdl;
+
+    /**
+     * 年场内受累检修损失电量
+     */
+    private Double ncnsljxssdl;
+
+    /**
+     * 年待机损失电量
+     */
+    private Double ndjssdl;
+
+    /**
+     * 年缺陷降出力损失电量
+     */
+    private Double nqxjclssdl;
+
+    /**
+     * 年手动停机损失电量
+     */
+    private Double nsdtjssdl;
+
+    /**
+     * 年性能损失电量
+     */
+    private Double nxnssdl;
+
+    /**
+     * 年限电停机损失电量
+     */
+    private Double nxdtjssdl;
+
+    /**
+     * 年限电降出力损失电量
+     */
+    private Double nxdjclssdl;
+
+    /**
+     * 年场外受累电网损失电量
+     */
+    private Double ncwsldwssdl;
+
+    /**
+     * 年场外受累天气损失电量
+     */
+    private Double ncwsltqssdl;
+
+    /**
+     * 日合计故障小时(明细)
+     */
+    private Double rhjgzxsmx;
+
+    /**
+     * 日合计场内受累故障小时(明细)
+     */
+    private Double rhjcnslgzxsmx;
+
+    /**
+     * 日合计检修小时(明细)
+     */
+    private Double rhjjxxsmx;
+
+    /**
+     * 日合计场内受累检修小时(明细)
+     */
+    private Double rhjcnsljxxsmx;
+
+    /**
+     * 日合计待机小时(明细)
+     */
+    private Double rhjdjxsmx;
+
+    /**
+     * 日合计缺陷降出力小时(明细)
+     */
+    private Double rhjqxjclxsmx;
+
+    /**
+     * 日合计手动停机小时(明细)
+     */
+    private Double rhjsdtjxsmx;
+
+    /**
+     * 日合计并网小时(明细)
+     */
+    private Double rhjbwxsmx;
+
+    /**
+     * 日合计限电停机小时(明细)
+     */
+    private Double rhjxdtjxsmx;
+
+    /**
+     * 日合计限电降出力小时(明细)
+     */
+    private Double rhjxdjclxsmx;
+
+    /**
+     * 日合计场外受累电网小时(明细)
+     */
+    private Double rhjcwsldwxsmx;
+
+    /**
+     * 日合计场外受累天气小时(明细)
+     */
+    private Double rhjcwsltqxsmx;
+
+    /**
+     * 日合计离线小时(明细)
+     */
+    private Double rhjlxxsmx;
+
+    /**
+     * 日合计通讯中断小时(明细)
+     */
+    private Double rhjtxzdxsmx;
+
+    /**
+     * 日合计待机小时
+     */
+    private Double rhjdjxs;
+
+    /**
+     * 日合计故障停机小时
+     */
+    private Double rhjgztjxs;
+
+    /**
+     * 日合计通讯中断小时
+     */
+    private Double rhjtxzdxs;
+
+    /**
+     * 日合计维护停机小时
+     */
+    private Double rhjjxtjxs;
+
+    /**
+     * 日合计限电小时
+     */
+    private Double rhjxdxs;
+
+    /**
+     * 日合计运行小时
+     */
+    private Double rhjyxxs;
+
+    /**
+     * 月合计故障小时(明细)
+     */
+    private Double yhjgzxsmx;
+
+    /**
+     * 月合计场内受累故障小时(明细)
+     */
+    private Double yhjcnslgzxsmx;
+
+    /**
+     * 月合计检修小时(明细)
+     */
+    private Double yhjjxxsmx;
+
+    /**
+     * 月合计场内受累检修小时(明细)
+     */
+    private Double yhjcnsljxxsmx;
+
+    /**
+     * 月合计待机小时(明细)
+     */
+    private Double yhjdjxsmx;
+
+    /**
+     * 月合计缺陷降出力小时(明细)
+     */
+    private Double yhjqxjclxsmx;
+
+    /**
+     * 月合计手动停机小时(明细)
+     */
+    private Double yhjsdtjxsmx;
+
+    /**
+     * 月合计并网小时(明细)
+     */
+    private Double yhjbwxsmx;
+
+    /**
+     * 月合计限电停机小时(明细)
+     */
+    private Double yhjxdtjxsmx;
+
+    /**
+     * 月合计限电降出力小时(明细)
+     */
+    private Double yhjxdjclxsmx;
+
+    /**
+     * 月合计场外受累电网小时(明细)
+     */
+    private Double yhjcwsldwxsmx;
+
+    /**
+     * 月合计场外受累天气小时(明细)
+     */
+    private Double yhjcwsltqxsmx;
+
+    /**
+     * 月合计离线小时(明细)
+     */
+    private Double yhjlxxsmx;
+
+    /**
+     * 月合计通讯中断小时(明细)
+     */
+    private Double yhjtxzdxsmx;
+
+    /**
+     * 月合计待机小时
+     */
+    private Double yhjdjxs;
+
+    /**
+     * 月合计故障停机小时
+     */
+    private Double yhjgztjxs;
+
+    /**
+     * 月合计通讯中断小时
+     */
+    private Double yhjtxzdxs;
+
+    /**
+     * 月合计维护停机小时
+     */
+    private Double yhjjxtjxs;
+
+    /**
+     * 月合计限电小时
+     */
+    private Double yhjxdxs;
+
+    /**
+     * 月合计运行小时
+     */
+    private Double yhjyxxs;
+
+    /**
+     * 年合计故障小时(明细)
+     */
+    private Double nhjgzxsmx;
+
+    /**
+     * 年合计场内受累故障小时(明细)
+     */
+    private Double nhjcnslgzxsmx;
+
+    /**
+     * 年合计检修小时(明细)
+     */
+    private Double nhjjxxsmx;
+
+    /**
+     * 年合计场内受累检修小时(明细)
+     */
+    private Double nhjcnsljxxsmx;
+
+    /**
+     * 年合计待机小时(明细)
+     */
+    private Double nhjdjxsmx;
+
+    /**
+     * 年合计缺陷降出力小时(明细)
+     */
+    private Double nhjqxjclxsmx;
+
+    /**
+     * 年合计手动停机小时(明细)
+     */
+    private Double nhjsdtjxsmx;
+
+    /**
+     * 年合计并网小时(明细)
+     */
+    private Double nhjbwxsmx;
+
+    /**
+     * 年合计限电停机小时(明细)
+     */
+    private Double nhjxdtjxsmx;
+
+    /**
+     * 年合计限电降出力小时(明细)
+     */
+    private Double nhjxdjclxsmx;
+
+    /**
+     * 年合计场外受累电网小时(明细)
+     */
+    private Double nhjcwsldwxsmx;
+
+    /**
+     * 年合计场外受累天气小时(明细)
+     */
+    private Double nhjcwsltqxsmx;
+
+    /**
+     * 年合计离线小时(明细)
+     */
+    private Double nhjlxxsmx;
+
+    /**
+     * 年合计通讯中断小时(明细)
+     */
+    private Double nhjtxzdxsmx;
+
+    /**
+     * 年合计待机小时
+     */
+    private Double nhjdjxs;
+
+    /**
+     * 年合计故障停机小时
+     */
+    private Double nhjgztjxs;
+
+    /**
+     * 年合计通讯中断小时
+     */
+    private Double nhjtxzdxs;
+
+    /**
+     * 年合计维护停机小时
+     */
+    private Double nhjjxtjxs;
+
+    /**
+     * 年合计限电小时
+     */
+    private Double nhjxdxs;
+
+    /**
+     * 年合计运行小时
+     */
+    private Double nhjyxxs;
+
+    /**
+     * 年合计受累小时
+     */
+    private Double nhjslxs;
+
+    /**
+     * 月合计受累小时
+     */
+    private Double yhjslxs;
+
+    /**
+     * 日合计受累小时
+     */
+    private Double rhjslxs;
+
+}

+ 4 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/entity/StationInfoDay.java

@@ -41,4 +41,8 @@ public class StationInfoDay implements Serializable {
     private Integer rfdl;
 
     private Integer zhcydl;
+
+    private Double hjwd;
+
+    private Double rfdlFj;
 }

+ 9 - 76
universal-computing-platform/src/main/java/com/ruoyi/ucp/entity/TurbineInfoDay.java

@@ -3,18 +3,20 @@ package com.ruoyi.ucp.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 
 /**
  * <p>
- * 
+ *
  * </p>
  *
  * @author gfhd
  * @since 2024-05-29
  */
+@Data
 @TableName("turbine_info_day")
 public class TurbineInfoDay implements Serializable {
 
@@ -22,85 +24,16 @@ public class TurbineInfoDay implements Serializable {
 
     @TableId(value = "id", type = IdType.AUTO)
     private Integer id;
-
     private String stationId;
-
     private String projectId;
-
     private String lineId;
-
     private String turbineId;
-
     private Date recordDate;
-
     private Double rfdl;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getStationId() {
-        return stationId;
-    }
-
-    public void setStationId(String stationId) {
-        this.stationId = stationId;
-    }
-
-    public String getProjectId() {
-        return projectId;
-    }
-
-    public void setProjectId(String projectId) {
-        this.projectId = projectId;
-    }
-
-    public String getLineId() {
-        return lineId;
-    }
-
-    public void setLineId(String lineId) {
-        this.lineId = lineId;
-    }
-
-    public String getTurbineId() {
-        return turbineId;
-    }
-
-    public void setTurbineId(String turbineId) {
-        this.turbineId = turbineId;
-    }
-
-    public Date getRecordDate() {
-        return recordDate;
-    }
-
-    public void setRecordDate(Date recordDate) {
-        this.recordDate = recordDate;
-    }
-
-    public Double getRfdl() {
-        return rfdl;
-    }
-
-    public void setRfdl(Double rfdl) {
-        this.rfdl = rfdl;
-    }
-
-    @Override
-    public String toString() {
-        return "TurbineInfoDay{" +
-            "id = " + id +
-            ", stationId = " + stationId +
-            ", projectId = " + projectId +
-            ", lineId = " + lineId +
-            ", turbineId = " + turbineId +
-            ", recordDate = " + recordDate +
-            ", rfdl = " + rfdl +
-        "}";
-    }
+    private Double jhjxss;
+    private Double fjhjxss;
+    private Double xdss;
+    private Double slss;
+    private Double xnss;
+    private Double llfdl;
 }

+ 6 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/feign/AdapterApi.java

@@ -37,6 +37,12 @@ public interface AdapterApi {
                                         @RequestParam("endTs") long endTs);
                                         //@RequestParam("interval") int interval);
 
+    @GetMapping("/history/stat")
+    List<DoubleStatData> getHistoryStat2(URI baseUri, @RequestParam("tagName") String tagName,
+                                         @RequestParam("startTs") long startTs,
+                                         @RequestParam("endTs") long endTs,
+                                         @RequestParam("interval") int interval);
+
     @GetMapping("/history/section")
     Map<String,PointData> getHistorySection(URI baseUri, @RequestParam("tagNames") String tagNames,
                                       @RequestParam("ts") long ts);

+ 16 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/mapper/ProEconReportIndicatorPoolMapper.java

@@ -0,0 +1,16 @@
+package com.ruoyi.ucp.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.ucp.entity.ProEconReportIndicatorPool;
+
+/**
+ * <p>
+ * 报表指标池 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2024-05-21
+ */
+public interface ProEconReportIndicatorPoolMapper extends BaseMapper<ProEconReportIndicatorPool> {
+
+}

+ 18 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/service/IProEconReportIndicatorPoolService.java

@@ -0,0 +1,18 @@
+package com.ruoyi.ucp.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.ucp.entity.ProEconReportIndicatorPool;
+
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * <p>
+ * 报表指标池 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2024-05-21
+ */
+public interface IProEconReportIndicatorPoolService extends IService<ProEconReportIndicatorPool> {
+}

+ 40 - 0
universal-computing-platform/src/main/java/com/ruoyi/ucp/service/impl/ProEconReportIndicatorPoolServiceImpl.java

@@ -0,0 +1,40 @@
+package com.ruoyi.ucp.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.ucp.entity.ProEconReportIndicatorPool;
+import com.ruoyi.ucp.mapper.ProEconReportIndicatorPoolMapper;
+import com.ruoyi.ucp.service.IProEconReportIndicatorPoolService;
+import org.springframework.stereotype.Service;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * <p>
+ * 报表指标池 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2024-05-21
+ */
+@Service
+@DataSource(DataSourceType.SLAVE)
+public class ProEconReportIndicatorPoolServiceImpl extends ServiceImpl<ProEconReportIndicatorPoolMapper, ProEconReportIndicatorPool> implements IProEconReportIndicatorPoolService {
+    @Override
+    public List<ProEconReportIndicatorPool> list(Wrapper<ProEconReportIndicatorPool> queryWrapper) {
+        return super.list(queryWrapper);
+    }
+
+    @Override
+    public boolean saveOrUpdateBatch(Collection<ProEconReportIndicatorPool> entityList) {
+        return super.saveOrUpdateBatch(entityList);
+    }
+}

+ 1 - 1
universal-computing-platform/src/main/java/com/ruoyi/ucp/util/CalcCache.java

@@ -7,7 +7,7 @@ import java.util.concurrent.ConcurrentHashMap;
 
 public class CalcCache {
     /**
-     * 场站月拟合功率曲线
+     * 场站月拟合功率曲线,风机-风速-功率
      */
     public static Map<String, Map<Double, Double>> wtMcfMap= new ConcurrentHashMap<>();
 }