Browse Source

Merge remote-tracking branch 'origin/master'

wangchangsheng 2 years ago
parent
commit
e0b725ca5c
31 changed files with 2553 additions and 44 deletions
  1. 72 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicRealtimeDbconfigController.java
  2. 29 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWindpowerstationController.java
  3. 64 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconEquipmentmodelController.java
  4. 52 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconManufacturerController.java
  5. 16 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/mapper/auto/ProBasicRealtimeDbconfigMapper.java
  6. 16 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicProject.java
  7. 87 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicRealtimeDbconfig.java
  8. 15 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWindpowerstation.java
  9. 36 10
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWindturbine.java
  10. 2 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicCompanyService.java
  11. 17 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicRealtimeDbconfigService.java
  12. 4 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicRegionService.java
  13. 1 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWindpowerstationService.java
  14. 3 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconEquipmentmodelService.java
  15. 3 1
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconManufacturerService.java
  16. 11 9
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/PointGenerateService.java
  17. 49 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/RedisService.java
  18. 13 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicCompanyServiceImpl.java
  19. 40 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRealtimeDbconfigServiceImpl.java
  20. 0 10
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRegionServiceImpl.java
  21. 67 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWindpowerstationServiceImpl.java
  22. 3 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWppointServiceImpl.java
  23. 21 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconEquipmentmodelServiceImpl.java
  24. 18 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconManufacturerServiceImpl.java
  25. 49 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/RedisService.java
  26. 1260 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/EdosUtil.java
  27. 38 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/ErrorRequest.java
  28. 232 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/IEdosUtil.java
  29. 206 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/JsonObjectHelper.java
  30. 128 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/MathUtil.java
  31. 1 1
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/WindpowerstationServiceImpl.java

+ 72 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicRealtimeDbconfigController.java

@@ -0,0 +1,72 @@
+package com.gyee.backconfig.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.model.auto.ProBasicRealtimeDbconfig;
+import com.gyee.backconfig.service.auto.IProBasicRealtimeDbconfigService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.Arrays;
+
+/**
+ * <p>
+ * 实时数据库配置表 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-02
+ */
+@RestController
+@RequestMapping("//pro-basic-realtime-dbconfig")
+public class ProBasicRealtimeDbconfigController {
+
+    @Resource
+    private IProBasicRealtimeDbconfigService proBasicRealtimeDbconfigService;
+
+    /**
+     * 查询
+     *
+     * @param id
+     * @param surName
+     * @param windpowerstationId
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "/listByPage")
+    public R findList(@RequestParam(value = "id", required = false) String id,
+                      @RequestParam(value = "surName", required = false) String surName,
+                      @RequestParam(value = "windpowerstationId", required = false) String windpowerstationId,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<ProBasicRealtimeDbconfig> list = proBasicRealtimeDbconfigService.list(id, surName, windpowerstationId, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    @PostMapping(value = "/save")
+    public R addAll(@RequestBody ProBasicRealtimeDbconfig proBasicRealtimeDbconfig) {
+        boolean b = proBasicRealtimeDbconfigService.saveOrUpdate(proBasicRealtimeDbconfig);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("保存失败!");
+        }
+    }
+
+    @DeleteMapping(value = "/remove-Realtime/{ids}")
+    public R deleteAll(@PathVariable("ids") String ids) {
+        String[] strings = ids.split(",");
+        boolean b = proBasicRealtimeDbconfigService.removeByIds(Arrays.asList(strings));
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
+}

+ 29 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWindpowerstationController.java

@@ -5,11 +5,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.config.R;
 import com.gyee.backconfig.model.auto.ProBasicWindpowerstation;
 import com.gyee.backconfig.service.auto.IProBasicWindpowerstationService;
+import com.gyee.backconfig.vo.WindpowerstationAdmVo;
 import com.gyee.common.model.StringUtils;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.Arrays;
+import java.util.List;
 
 /**
  * <p>
@@ -87,4 +89,31 @@ public class ProBasicWindpowerstationController {
         }
     }
 
+    /**
+     * 行政管理区域风电场列表
+     * @param id
+     * @param regionId
+     * @param regionId
+     * @return
+     */
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    @GetMapping(value = "/getAdmList")
+    public R getAdmList(
+            @RequestParam(value = "id",required = false) String id,
+            @RequestParam(value = "regionId",required = false) String regionId,
+            @RequestParam(value = "companyId",required = false) String companyId){
+        try {
+            List<WindpowerstationAdmVo> list = proBasicWindpowerstationService.getList(id,regionId,companyId);
+            if (null != list){
+                return R.ok().data(list);
+            }else {
+                return R.error().data("查询失败!");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error().data("查询失败!");
+        }
+    }
+
+
 }

+ 64 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconEquipmentmodelController.java

@@ -1,9 +1,14 @@
 package com.gyee.backconfig.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
+import com.gyee.backconfig.service.auto.IProEconEquipmentmodelService;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.Arrays;
 
 /**
  * <p>
@@ -16,5 +21,62 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("//pro-econ-equipmentmodel")
 public class ProEconEquipmentmodelController {
+    @Resource
+    private IProEconEquipmentmodelService proEconEquipmentmodelService;
+
+    /**
+     * 查询
+     * @param id
+     * @param code
+     * @param name
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "/list")
+    public R findList(@RequestParam(value = "id", required = false) String id,
+                      @RequestParam(value = "code", required = false) String code,
+                      @RequestParam(value = "name", required = false) String name,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<ProEconEquipmentmodel> list = proEconEquipmentmodelService.list(id, code, name, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    /**
+     * 添加
+     * @param proEconEquipmentmodel
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody ProEconEquipmentmodel proEconEquipmentmodel) {
+
+        boolean b = proEconEquipmentmodelService.saveOrUpdate(proEconEquipmentmodel);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("保存失败!");
+        }
+    }
+
+    /**
+     * 删除
+     * @param ids
+     * @return
+     */
+    @DeleteMapping(value = "/{ids}")
+    public R deleteAll(@PathVariable("ids") String ids) {
+        String[] strings = ids.split(",");
+        boolean b = proEconEquipmentmodelService.removeByIds(Arrays.asList(strings));
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
 
 }

+ 52 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProEconManufacturerController.java

@@ -1,9 +1,14 @@
 package com.gyee.backconfig.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.model.auto.ProEconManufacturer;
+import com.gyee.backconfig.service.auto.IProEconManufacturerService;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.Arrays;
 
 /**
  * <p>
@@ -16,5 +21,50 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("//pro-econ-manufacturer")
 public class ProEconManufacturerController {
+    @Resource
+    private IProEconManufacturerService proEconManufacturerService;
 
+    @GetMapping(value = "/list")
+    public R findList(@RequestParam(value = "id", required = false) String id,
+                      @RequestParam(value = "name", required = false) String name,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<ProEconManufacturer> list = proEconManufacturerService.list(id, name, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+    /**
+     * 添加
+     * @param proEconManufacturer
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody ProEconManufacturer proEconManufacturer) {
+
+        boolean b = proEconManufacturerService.saveOrUpdate(proEconManufacturer);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("保存失败!");
+        }
+    }
+
+    /**
+     * 删除
+     * @param ids
+     * @return
+     */
+    @DeleteMapping(value = "/{ids}")
+    public R deleteAll(@PathVariable("ids") String ids) {
+        String[] strings = ids.split(",");
+        boolean b = proEconManufacturerService.removeByIds(Arrays.asList(strings));
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
 }

+ 16 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/mapper/auto/ProBasicRealtimeDbconfigMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.mapper.auto;
+
+import com.gyee.backconfig.model.auto.ProBasicRealtimeDbconfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 实时数据库配置表 Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-02
+ */
+public interface ProBasicRealtimeDbconfigMapper extends BaseMapper<ProBasicRealtimeDbconfig> {
+
+}

+ 16 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicProject.java

@@ -24,13 +24,11 @@ import lombok.EqualsAndHashCode;
 @Data
 @EqualsAndHashCode(callSuper = true)
 public class ProBasicProject extends Model {
-
     private static final long serialVersionUID = 1L;
 
     /**
      * 编号
      */
-    @TableId(value = "ID", type = IdType.INPUT)
     private String id;
 
     /**
@@ -102,14 +100,30 @@ public class ProBasicProject extends Model {
      * 变电所ID
      */
     private String windsubStationId;
+
+    /**
+     * 是否可用
+     */
     private Integer isAble;
 
+    /**
+     * 备用1
+     */
     private String spare1;
 
+    /**
+     * 备用2
+     */
     private String spare2;
 
+    /**
+     * 备用3
+     */
     private String spare3;
 
+    /**
+     * 备用4
+     */
     private String spare4;
     @TableField(exist = false)
     private List<ProBasicLine> Children = new ArrayList<>();

+ 87 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicRealtimeDbconfig.java

@@ -0,0 +1,87 @@
+package com.gyee.backconfig.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 实时数据库配置表
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProBasicRealtimeDbconfig extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private String id;
+
+    /**
+     * 服务姓
+     */
+    private String surName;
+
+    /**
+     * 服务名(历史)
+     */
+    private String nameHist;
+
+    /**
+     * 服务名(配置)
+     */
+    private String nameCmcfg;
+
+    /**
+     * 服务名(实时)
+     */
+    private String nameRts;
+
+    /**
+     * 点标签
+     */
+    private String label;
+
+    /**
+     * 风场编号
+     */
+    private String windpowerstationId;
+
+    /**
+     * 端口(历史)
+     */
+    private String portHist;
+
+    /**
+     * 端口(配置)
+     */
+    private String portCmcfg;
+
+    /**
+     * 端口(实时)
+     */
+    private String portRts;
+
+    /**
+     * 地址(历史)
+     */
+    private String ipHist;
+
+    /**
+     * 地址(配置)
+     */
+    private String ipCmcfg;
+
+    /**
+     * 地址(实时)
+     */
+    private String ipRts;
+
+
+}

+ 15 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWindpowerstation.java

@@ -28,7 +28,6 @@ public class ProBasicWindpowerstation extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID", type = IdType.INPUT)
     private String id;
 
     /**
@@ -136,14 +135,29 @@ public class ProBasicWindpowerstation extends Model {
      */
     private String groupId;
 
+    /**
+     * 是否可用
+     */
     private Integer isAble;
 
+    /**
+     * 备用1
+     */
     private String spare1;
 
+    /**
+     * 备用2
+     */
     private String spare2;
 
+    /**
+     * 备用3
+     */
     private String spare3;
 
+    /**
+     * 备用4
+     */
     private String spare4;
 
 

+ 36 - 10
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicWindturbine.java

@@ -1,9 +1,6 @@
 package com.gyee.backconfig.model.auto;
 
 import java.math.BigDecimal;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import java.time.LocalDate;
 import lombok.Data;
@@ -11,11 +8,11 @@ import lombok.EqualsAndHashCode;
 
 /**
  * <p>
- * 风机
+ * 风机&光伏
  * </p>
  *
  * @author wang
- * @since 2022-10-15
+ * @since 2022-11-02
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
@@ -26,7 +23,6 @@ public class ProBasicWindturbine extends Model {
     /**
      * 编号
      */
-    @TableId(value = "ID", type = IdType.INPUT)
     private String id;
 
     /**
@@ -85,6 +81,11 @@ public class ProBasicWindturbine extends Model {
     private String name;
 
     /**
+     * 别名
+     */
+    private String aname;
+
+    /**
      * 是否是标杆设备
      */
     private Integer isStandard;
@@ -99,19 +100,44 @@ public class ProBasicWindturbine extends Model {
      */
     private String companyId;
 
-    private Integer is_Able;
+    /**
+     * 是否可用
+     */
+    private Integer isable;
 
-    private Integer equipment_category;
+    /**
+     * 0:风机;1:集中;2:组串
+     */
+    private Integer equipmentCategory;
 
-    private String parent_id;
+    private String parentId;
 
-    private String square_id;
+    private String squareId;
 
+    /**
+     * 备用1
+     */
     private String spare1;
 
+    /**
+     * 备用2
+     */
     private String spare2;
 
+    /**
+     * 备用3
+     */
     private String spare3;
 
+    /**
+     * 备用4
+     */
     private String spare4;
+
+    /**
+     * 排序
+     */
+    private Integer orderNum;
+
+
 }

+ 2 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicCompanyService.java

@@ -19,4 +19,6 @@ public interface IProBasicCompanyService extends IService<ProBasicCompany> {
 
     List<ProBasicCompany> getCompanysByidAndRid(String id);
 
+    List<ProBasicCompany> getCompanycode(String groupId);
+
 }

+ 17 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicRealtimeDbconfigService.java

@@ -0,0 +1,17 @@
+package com.gyee.backconfig.service.auto;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.ProBasicRealtimeDbconfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 实时数据库配置表 服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-02
+ */
+public interface IProBasicRealtimeDbconfigService extends IService<ProBasicRealtimeDbconfig> {
+    IPage<ProBasicRealtimeDbconfig> list(String id, String surName, String windpowerstationId, String pageNum, String pageSize);
+}

+ 4 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicRegionService.java

@@ -1,6 +1,7 @@
 package com.gyee.backconfig.service.auto;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.ProBasicEnergyGroup;
 import com.gyee.backconfig.model.auto.ProBasicRegion;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -16,5 +17,7 @@ import java.util.List;
  */
 public interface IProBasicRegionService extends IService<ProBasicRegion> {
     IPage<ProBasicRegion> list(String id, String name, String aname, String code,String pageNum, String pageSize);
-    List<ProBasicRegion> getReginBycode(String groupId);
+//    List<ProBasicRegion> getReginBycode(String groupId);
+
+//    List<ProBasicRegion> getRegionByidAndRid(String id);
 }

+ 1 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWindpowerstationService.java

@@ -19,6 +19,5 @@ public interface IProBasicWindpowerstationService extends IService<ProBasicWindp
     IPage<ProBasicWindpowerstation> getList(String id, String name, String code, String companyId, String pageNum, String pageSize);
     List<ProBasicWindpowerstation> getList(String regionId);
 
-
-    List<WindpowerstationAdmVo> getList(String regionid, String companyid) throws Exception;
+    List<WindpowerstationAdmVo> getList(String id,String regionId, String companyId) throws Exception;
 }

+ 3 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconEquipmentmodelService.java

@@ -1,5 +1,7 @@
 package com.gyee.backconfig.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.ProBasicWppoint;
 import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProEconEquipmentmodelService extends IService<ProEconEquipmentmodel> {
-
+    IPage<ProEconEquipmentmodel> list (String id, String code, String name,String pageNum, String pageSize);
 }

+ 3 - 1
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProEconManufacturerService.java

@@ -1,5 +1,7 @@
 package com.gyee.backconfig.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
 import com.gyee.backconfig.model.auto.ProEconManufacturer;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -12,5 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProEconManufacturerService extends IService<ProEconManufacturer> {
-
+    IPage<ProEconManufacturer> list (String id, String name, String pageNum, String pageSize);
 }

+ 11 - 9
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/PointGenerateService.java

@@ -54,13 +54,14 @@ public class PointGenerateService {
         int num = 0;
 
         List<Standardpoint> pointList = standardpointService.list(points);
-        List<ProBasicEnergyGroup> companysList = proBasicEnergyGroupService.getCompanysByidAndRid("");
+        List<ProBasicEnergyGroup> EnergyList = proBasicEnergyGroupService.getCompanysByidAndRid("");
+//        List<ProBasicRegion> RegionList = proBasicRegionService.getRegionByidAndRid("");
 
         for (Standardpoint p : pointList) {
 
             if ("czjs".equals(p.getType())) {
 
-                List<ProBasicWppoint> staionList = fjd(p, companysList);
+                List<ProBasicWppoint> staionList = fjd(p, EnergyList);
                 for (ProBasicWppoint i : staionList) {
                     boolean b = proBasicWppointService.addOrUpdate(i);
                     if (!b) {
@@ -73,9 +74,9 @@ public class PointGenerateService {
                 //fjjs
                 //fjjcd
 
-                for (ProBasicEnergyGroup c : companysList) {
-                    List<ProBasicRegion> regionList = proBasicRegionService.getReginBycode(c.getCapacityUnit());
-                    for (ProBasicRegion r : regionList) {
+                for (ProBasicEnergyGroup c : EnergyList) {
+                    List<ProBasicCompany> CompanyList = proBasicCompanyService.getCompanycode(c.getCapacityUnit());
+                    for (ProBasicCompany r : CompanyList) {
                         List<ProBasicWindpowerstation> windpowerstationList = proBasicWindpowerstationService.getList(r.getId());
                         List<ProBasicEquipmentPoint> testingList = czd(p, windpowerstationList, r);
                         for (ProBasicEquipmentPoint i : testingList) {
@@ -138,10 +139,10 @@ public class PointGenerateService {
                 }
             }
 
-            List<ProBasicRegion> regionList = proBasicRegionService.getReginBycode(c.getCapacityUnit());
+            List<ProBasicCompany> CompanyList = proBasicCompanyService.getCompanycode(c.getCapacityUnit());
 
 
-            for (ProBasicRegion r : regionList) {
+            for (ProBasicCompany r : CompanyList) {
 
 
                 StringBuilder qusb = new StringBuilder();
@@ -262,9 +263,10 @@ public class PointGenerateService {
     /**
      * @param p
      * @param windpowerstationList
+     * @param company
      * @return
      */
-    private List<ProBasicEquipmentPoint> czd(Standardpoint p, List<ProBasicWindpowerstation> windpowerstationList,ProBasicRegion region) {
+    private List<ProBasicEquipmentPoint> czd(Standardpoint p, List<ProBasicWindpowerstation> windpowerstationList, ProBasicCompany company) {
         ProBasicEquipmentPoint testing = null;
         List<ProBasicEquipmentPoint> testingList = new ArrayList<>();
         for (ProBasicWindpowerstation station : windpowerstationList) {
@@ -283,7 +285,7 @@ public class PointGenerateService {
                 if ("fjjs".equals(p.getType())) {
                     StringBuilder stationsb = new StringBuilder();
                     stationsb.append(substaion).append(station.getId().endsWith("_FDC") ? "FJJSFW." : "GFJSFW.");
-//                    stationsb.append(region.getGroupId()).append("_").append(region.getId()).append("_").append(substaion);
+                    stationsb.append(company.getGroupId()).append("_").append(company.getId()).append("_").append(substaion);
                     stationsb.append(station.getId().endsWith("_FDC") ? "F" : "G").append("_JS_");
                     Integer pnum = Integer.valueOf(w.getProjectId().substring(substaion.length(), w.getProjectId().indexOf("_"))) * 1;
                     stationsb.append("P").append(pnum);

+ 49 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/RedisService.java

@@ -0,0 +1,49 @@
+package com.gyee.backconfig.service.auto;
+
+public interface RedisService {
+
+    /**
+     * set存数据
+     * @param key
+     * @param value
+     * @return
+     */
+    boolean set(String key, String value);
+
+    /**
+     * get获取数据
+     * @param key
+     * @return
+     */
+    String get(String key);
+
+//    void getList(String key,int start,int end);
+
+    /**
+     * 设置有效天数
+     * @param key
+     * @param expire
+     * @return
+     */
+    boolean expire(String key, long expire);
+
+    /**
+     * 移除数据
+     * @param key
+     * @return
+     */
+    boolean remove(String key);
+
+
+    /**
+     * 插入对象
+     */
+    void setObject(Object o);
+
+
+    boolean hasKey(String key);
+
+
+    void select(Integer dbIndex);
+
+}

+ 13 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicCompanyServiceImpl.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gyee.backconfig.model.auto.ProBasicCompany;
 import com.gyee.backconfig.mapper.auto.ProBasicCompanyMapper;
+import com.gyee.backconfig.model.auto.ProBasicRegion;
 import com.gyee.backconfig.service.auto.IProBasicCompanyService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
@@ -45,4 +46,16 @@ public class ProBasicCompanyServiceImpl extends ServiceImpl<ProBasicCompanyMappe
     public List<ProBasicCompany> getCompanysByidAndRid(String id) {
         return null;
     }
+
+    @Override
+    public List<ProBasicCompany> getCompanycode(String groupId) {
+            QueryWrapper<ProBasicCompany> qw = new QueryWrapper<>();
+            if (StringUtils.isNotEmpty(groupId)){
+                qw.eq("groupId",groupId);
+            }
+
+            List<ProBasicCompany> list = baseMapper.selectList(qw);
+            return list;
+
+    }
 }

+ 40 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRealtimeDbconfigServiceImpl.java

@@ -0,0 +1,40 @@
+package com.gyee.backconfig.service.auto.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.backconfig.model.auto.ProBasicRealtimeDbconfig;
+import com.gyee.backconfig.mapper.auto.ProBasicRealtimeDbconfigMapper;
+import com.gyee.backconfig.service.auto.IProBasicRealtimeDbconfigService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 实时数据库配置表 服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-11-02
+ */
+@Service
+public class ProBasicRealtimeDbconfigServiceImpl extends ServiceImpl<ProBasicRealtimeDbconfigMapper, ProBasicRealtimeDbconfig> implements IProBasicRealtimeDbconfigService {
+
+    @Override
+    public IPage<ProBasicRealtimeDbconfig> list(String id, String surName, String windpowerstationId, String pageNum, String pageSize) {
+        QueryWrapper<ProBasicRealtimeDbconfig> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(id)) {
+            qw.like("id", id);
+        }
+        if (StringUtils.isNotEmpty(surName)) {
+            qw.like("surName", surName);
+        }
+        if (StringUtils.isNotEmpty(windpowerstationId)) {
+            qw.like("windpowerstationId", windpowerstationId);
+        }
+        Page<ProBasicRealtimeDbconfig> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
+        IPage<ProBasicRealtimeDbconfig> ModelpowerPage =getBaseMapper().selectPage(page, qw);
+        return ModelpowerPage;
+    }
+}

+ 0 - 10
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRegionServiceImpl.java

@@ -47,14 +47,4 @@ public class ProBasicRegionServiceImpl extends ServiceImpl<ProBasicRegionMapper,
         return pageData;
     }
 
-    @Override
-    public List<ProBasicRegion> getReginBycode(String groupId) {
-        QueryWrapper<ProBasicRegion> qw = new QueryWrapper<>();
-        if (StringUtils.isNotEmpty(groupId)){
-            qw.eq("groupId",groupId);
-        }
-
-        List<ProBasicRegion> list = baseMapper.selectList(qw);
-        return list;
-    }
 }

+ 67 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWindpowerstationServiceImpl.java

@@ -1,5 +1,8 @@
 package com.gyee.backconfig.service.auto.impl;
 
+import cn.hutool.core.math.MathUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -7,11 +10,17 @@ import com.gyee.backconfig.model.auto.ProBasicWindpowerstation;
 import com.gyee.backconfig.mapper.auto.ProBasicWindpowerstationMapper;
 import com.gyee.backconfig.service.auto.IProBasicWindpowerstationService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.backconfig.until.realtimedate.EdosUtil;
 import com.gyee.backconfig.vo.WindpowerstationAdmVo;
+import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -23,7 +32,11 @@ import java.util.List;
  */
 @Service
 public class ProBasicWindpowerstationServiceImpl extends ServiceImpl<ProBasicWindpowerstationMapper, ProBasicWindpowerstation> implements IProBasicWindpowerstationService {
+    @Resource
+    private RedisService redisService;
 
+    @Autowired
+    private EdosUtil goldenUtil;
     @Override
     public IPage<ProBasicWindpowerstation> getList(String id, String name, String code, String companyId, String pageNum, String pageSize) {
         QueryWrapper<ProBasicWindpowerstation> qw = new QueryWrapper<>();
@@ -64,7 +77,59 @@ public class ProBasicWindpowerstationServiceImpl extends ServiceImpl<ProBasicWin
     }
 
     @Override
-    public List<WindpowerstationAdmVo> getList(String regionid, String companyid) throws Exception {
-        return null;
+    public List<WindpowerstationAdmVo> getList(String id, String regionId, String companyId) throws Exception {
+
+        List<WindpowerstationAdmVo> admvos =  new ArrayList<>();
+        QueryWrapper<ProBasicWindpowerstation> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(id)){
+            qw.eq("id",id);
+        }
+        if (StringUtils.isNotEmpty(regionId)){
+            qw.eq("regionId",regionId);
+        }
+
+        if (StringUtils.isNotEmpty(companyId)){
+            qw.eq("companyId",companyId);
+        }
+
+        List<ProBasicWindpowerstation> list = baseMapper.selectList(qw);
+
+        list.stream().forEach(i->{
+            List<String> codes = new ArrayList<>();
+//            RPJFS
+//            RFDL
+            String wpString = redisService.get(i.getId());
+            Map<String, ProBasicWindpowerstation> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, ProBasicWindpowerstation>>() {
+
+            });
+            if(null !=stringMapMap){
+                codes.add(stringMapMap.get("RPJFS").getCode());//日平局风速
+                codes.add(stringMapMap.get("RFDL").getCode());//日发电量
+            }
+            try {
+                List<PointData> pointList = goldenUtil.getRealData(codes);
+                WindpowerstationAdmVo vo = new WindpowerstationAdmVo();
+                vo.setId(i.getId());
+                vo.setCode(i.getCode());
+                vo.setName(i.getName());
+                vo.setCapacity(i.getCapacity());//装机容量
+                vo.setCapacityUnit(i.getCapacityUnit());//装机容量单位
+                vo.setQuantity(i.getQuantity());//装机台数
+                vo.setModel(i.getModel());//机型
+                vo.setSystemManufact(i.getSystemManufact());//厂家
+                vo.setAddress(i.getAddress());//地址
+                if(null != pointList && pointList.size()>=2){
+                    vo.setRfdl(com.gyee.backconfig.until.realtimedate.MathUtil.twoBit(pointList.get(0).getPointValueInDouble()));
+                    vo.setRfdl(com.gyee.backconfig.until.realtimedate.MathUtil.twoBit(pointList.get(1).getPointValueInDouble()));
+                }
+                admvos.add(vo);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
+        });
+
+        return admvos;
     }
 }

+ 3 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWppointServiceImpl.java

@@ -34,6 +34,9 @@ public class ProBasicWppointServiceImpl extends ServiceImpl<ProBasicWppointMappe
         if (StringUtils.isNotEmpty(code)) {
             qw.like(code, "code");
         }
+        if (StringUtils.isNotEmpty(name)) {
+            qw.like(name, "name");
+        }
         if (StringUtils.isNotEmpty(model)) {
             qw.like(model, "model");
         }

+ 21 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconEquipmentmodelServiceImpl.java

@@ -1,9 +1,14 @@
 package com.gyee.backconfig.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.backconfig.model.auto.ProBasicWppoint;
 import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
 import com.gyee.backconfig.mapper.auto.ProEconEquipmentmodelMapper;
 import com.gyee.backconfig.service.auto.IProEconEquipmentmodelService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
 /**
@@ -17,4 +22,20 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconEquipmentmodelServiceImpl extends ServiceImpl<ProEconEquipmentmodelMapper, ProEconEquipmentmodel> implements IProEconEquipmentmodelService {
 
+    @Override
+    public IPage<ProEconEquipmentmodel> list(String id, String code, String name, String pageNum, String pageSize) {
+        QueryWrapper<ProEconEquipmentmodel> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(id)) {
+            qw.like("id", id);
+        }
+        if (StringUtils.isNotEmpty(code)) {
+            qw.like(code, "code");
+        }
+        if (StringUtils.isNotEmpty(name)) {
+            qw.like(name, "name");
+        }
+        Page<ProEconEquipmentmodel> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
+        IPage<ProEconEquipmentmodel> companysPage = getBaseMapper().selectPage(page, qw);
+        return companysPage;
+    }
 }

+ 18 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProEconManufacturerServiceImpl.java

@@ -1,9 +1,14 @@
 package com.gyee.backconfig.service.auto.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.gyee.backconfig.model.auto.ProEconEquipmentmodel;
 import com.gyee.backconfig.model.auto.ProEconManufacturer;
 import com.gyee.backconfig.mapper.auto.ProEconManufacturerMapper;
 import com.gyee.backconfig.service.auto.IProEconManufacturerService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
 /**
@@ -17,4 +22,17 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProEconManufacturerServiceImpl extends ServiceImpl<ProEconManufacturerMapper, ProEconManufacturer> implements IProEconManufacturerService {
 
+    @Override
+    public IPage<ProEconManufacturer> list(String id, String name, String pageNum, String pageSize) {
+        QueryWrapper<ProEconManufacturer> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(id)) {
+            qw.like("id", id);
+        }
+        if (StringUtils.isNotEmpty(name)) {
+            qw.like(name, "name");
+        }
+        Page<ProEconManufacturer> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
+        IPage<ProEconManufacturer> companysPage = getBaseMapper().selectPage(page, qw);
+        return companysPage;
+    }
 }

+ 49 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/RedisService.java

@@ -0,0 +1,49 @@
+package com.gyee.backconfig.service.auto.impl;
+
+public interface RedisService {
+
+    /**
+     * set存数据
+     * @param key
+     * @param value
+     * @return
+     */
+    boolean set(String key, String value);
+
+    /**
+     * get获取数据
+     * @param key
+     * @return
+     */
+    String get(String key);
+
+//    void getList(String key,int start,int end);
+
+    /**
+     * 设置有效天数
+     * @param key
+     * @param expire
+     * @return
+     */
+    boolean expire(String key, long expire);
+
+    /**
+     * 移除数据
+     * @param key
+     * @return
+     */
+    boolean remove(String key);
+
+
+    /**
+     * 插入对象
+     */
+    void setObject(Object o);
+
+
+    boolean hasKey(String key);
+
+
+    void select(Integer dbIndex);
+
+}

File diff suppressed because it is too large
+ 1260 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/EdosUtil.java


+ 38 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/ErrorRequest.java

@@ -0,0 +1,38 @@
+package com.gyee.backconfig.until.realtimedate;
+
+import com.gyee.common.model.PointData;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @descrition:接口请求失败返回操作类
+ * @author:Wanghs
+ * @date:2018-05-21
+ */
+public class ErrorRequest {
+
+    public static List<PointData> RequestListError(String pointId) {
+        List<PointData> dataList = new ArrayList<>();
+        return dataList;
+    }
+
+    public static List<PointData> RequestListError(String... pointId) {
+        List<PointData> dataList = new ArrayList<>();
+        return dataList;
+    }
+
+    public static PointData RequestError(String pointId) {
+        PointData data = new PointData();
+        data.setPointValueInDouble(0);
+        data.setPointName("0");
+        return data;
+    }
+
+    public static Map<String, Double> RequestMapError() {
+        Map<String, Double> resultMap = new HashMap();
+        return resultMap;
+    }
+}

+ 232 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/IEdosUtil.java

@@ -0,0 +1,232 @@
+package com.gyee.backconfig.until.realtimedate;
+
+import com.gyee.backconfig.model.auto.ProBasicEquipmentPoint;
+import com.gyee.backconfig.model.auto.ProBasicWppoint;
+import com.gyee.common.model.DNAStatVal;
+import com.gyee.common.model.DNAVal;
+import com.gyee.common.model.PointData;
+
+import java.util.List;
+import java.util.Map;
+
+public interface IEdosUtil {
+
+
+    /**
+     * 通过风场测点获得测点实时数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @return
+     * @throws Exception
+     */
+    public PointData getRealData(ProBasicWppoint point) throws Exception;
+
+
+    /**
+     * 通过风场测点获得测点历史快照数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(ProBasicWppoint point, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风场测点获得测点历史存储数据,存多少取多少
+     * @param point 只是用了code字段,作为唯一标识
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(ProBasicWppoint point, Long beginDate, Long endDate) throws Exception;
+
+    /**
+     * 通过风机测点获得测点实时数据
+     * @param point 只是用了id字段,作为唯一标识
+     * @return
+     * @throws Exception
+     */
+    public PointData getRealData(ProBasicEquipmentPoint point) throws Exception;
+
+    /**
+     * 通过风机测点获得历史快照
+     * @param point  只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(ProBasicEquipmentPoint point, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风机测点获得测点历史存储数据,存多少取多少
+     * @param point 只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(ProBasicEquipmentPoint point, Long beginDate, Long endDate) throws Exception;
+
+
+    /**
+     * 通过风机测点获得测点实时数据
+     * @param pointid 测点编号
+     * @return
+     * @throws Exception
+     */
+    public PointData getRealData(String pointid) throws Exception;
+
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的数组
+     * @return 列表集合
+     * @throws Exception
+     */
+    public List<PointData> getRealData(String... pointids) throws Exception;
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的列表
+     * @return 列表集合
+     * @throws Exception
+     */
+    public List<PointData> getRealData(List<String> pointids) throws Exception;
+    /**
+     * 通过全局点名获得测点实时数据 读取多个点
+     * @param pointids 测点的数组
+     * @return Map集合
+     * @throws Exception
+     */
+    public Map<String,Double> getRealDataMap(String... pointids) throws Exception;
+
+    /**
+     * 通过全局点名获得历史数据快照
+     * @param pointid  全局点名
+     * @param beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasSnap(String pointid, Long beginDate, Long endDate, Long count, Long pried) throws Exception;
+
+    /**
+     * 通过风机测点获得测点历史存储数据,存多少取多少
+     * @param pointid 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistoryDatasRaw(String pointid, Long beginDate, Long endDate) throws Exception;
+
+
+    /**
+     * 通过风机测点获得测点指定时间周期的统计数据
+     * @param point 只是用了id字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(ProBasicEquipmentPoint point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过风场测点获得测点指定时间周期的统计数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(ProBasicWppoint point, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过全局点名获得测点指定时间周期的统计数据
+     * @param pointid 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param count  点数
+     * @param pried  时间间隔
+     * @type 0、最大值。1、最小值。、平均值
+     * @return
+     * @throws Exception
+     */
+    public List<PointData> getHistStat(String pointid, Long beginDate, Long endDate, Long count, Long pried, int type) throws Exception;
+
+    /**
+     * 通过全局点名获得测点指定时间周期的统计数据 同时返回max、min、avg数据
+     * @param point 全局点名
+     * @param  beginDate 开始时间(秒级)
+     * @param endDate 结束时间(秒级)
+     * @param pried  时间间隔
+     * @return
+     * @throws Exception
+     */
+    public DNAStatVal[] getHistStat(String point, Long beginDate, Long endDate, Integer pried) throws Exception;
+    /**
+     * 补录单点历史数据
+     * @param point 测点对象
+     * @return
+     * @throws Exception
+     */
+    public void updatePoint(PointData point) throws Exception;
+
+    /**
+     * 批量查询实时数据
+     * @param tagNames 测点字符串数组
+     * @return
+     * @throws Exception
+     */
+
+    public DNAVal[] getRealtimeTagValues(String... tagNames) throws Exception;
+
+    /**
+     * 批量插入历史数据
+     * @param pointls 测点对象集合
+     * @throws Exception
+     */
+    public void updatePoint(List<PointData> pointls) throws Exception;
+
+    /**
+     * 单点写入实时数据
+     * @param point 测点对象
+     * @throws Exception
+     */
+    public String  sendSinglePoint(PointData point) throws Exception ;
+    /**
+     * 批量写入实时数据
+     * @param pointls 测点对象列表
+     * @throws Exception
+     */
+    public void sendMultiPoint(List<PointData> pointls) throws Exception ;
+
+    /**
+     * 通过两个字符串数组对象批量写入实时数据
+     * @param realvalue 插入值字符串数组
+     * @param pointls 存储对象数组对象
+     * @throws Exception
+     */
+
+    public void sendMultiPoint(String[] realvalue,DNAVal[] pointls) throws Exception;
+    /**
+     *
+     * @param nameList 测点名称列表集合
+     * @param tTime  时间点(秒级)
+     * @return
+     * @throws Exception
+     */
+    public DNAVal[] getHistMatrix(String[] nameList, int tTime) throws Exception;
+}

+ 206 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/JsonObjectHelper.java

@@ -0,0 +1,206 @@
+package com.gyee.backconfig.until.realtimedate;
+
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.gyee.common.model.DNAStatVal;
+import com.gyee.common.model.DNAVal;
+import com.gyee.common.model.PointData;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+
+/**
+ * @descrition:JSONObject转实体辅助类
+ * @author:Wanghs
+ * @date:2018-05-10
+ */
+public class JsonObjectHelper {
+    public static List<PointData> phrasePointData(JSONArray jsonArray, String tagName) {
+        List<PointData> result = new ArrayList<>();
+
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject tsData = jsonArray.getJSONObject(i);
+
+            Long ts = tsData.getLong("ts");
+            String pointValue = null;
+            if (tsData.containsKey("doubleValue")) {
+                pointValue = tsData.getString("doubleValue");
+            } else if (tsData.containsKey("booleanValue")) {
+                pointValue = tsData.getString("booleanValue");
+            } else if (tsData.containsKey("longValue")) {
+                pointValue = tsData.getString("longValue");
+            } else if (tsData.containsKey("stringValue")) {
+                pointValue = tsData.getString("stringValue");
+            }
+            PointData pointData = new PointData();
+            pointData.setEdnaId(tagName);
+            pointData.setPointName("1");
+            pointData.setPointTime(ts / 1000);
+            pointData.setPointValue(pointValue);
+            pointData.setPointValueInDouble(Double.parseDouble(pointValue));
+            //System.out.println("key= " + tagName + ", ts = " + ts + ", value = " + pointValue);
+            result.add(pointData);
+        }
+        return result;
+    }
+
+
+    public static List<PointData> phrasePointData(JSONObject jsonObject) {
+        List<PointData> result = new ArrayList<>();
+        Iterator<String> sIterator = jsonObject.keySet().iterator();
+        while (sIterator.hasNext()) {
+            // 获得key
+            String key = sIterator.next();
+            // 根据key获得value, value也可以是JSONObject,JSONArray,使用对应的参数接收即可
+            JSONObject jsonData = jsonObject.getJSONObject(key);
+            Long ts = 0l;
+
+            if (jsonData!=null){
+                ts  = jsonData.getLong("ts");
+                String pointValue = null;
+                if (jsonData.containsKey("doubleValue")) {
+                    pointValue = jsonData.getString("doubleValue");
+                } else if (jsonData.containsKey("booleanValue")) {
+                    pointValue = jsonData.getString("booleanValue");
+                } else if (jsonData.containsKey("longValue")) {
+                    pointValue = jsonData.getString("longValue");
+                } else if (jsonData.containsKey("stringValue")) {
+                    pointValue = jsonData.getString("stringValue");
+                }
+                PointData pointData = new PointData();
+                pointData.setEdnaId(key);
+                pointData.setPointName("1");
+                pointData.setPointValue(pointValue);
+                pointData.setPointTime(ts/1000);
+                if(pointValue.equals("false")  )
+                {
+                    pointData.setPointValueInDouble(0.0);
+                }else  if(pointValue.equals("true") )
+                {
+                    pointData.setPointValueInDouble(1.0);
+                }else
+                {
+                    pointData.setPointValueInDouble(Double.parseDouble(pointValue));
+                }
+
+                //  System.out.println("key= " + key + ", ts = " + ts + ", value = " + pointValue);
+                result.add(pointData);
+            }
+        }
+        return result;
+    }
+    /**
+     * @param arry    DoubleStatData集合
+     * @param tagName 标签点名
+     * @param type    0、最大值。1、最小值。2、平均值
+     */
+    public static List<PointData> GeneralTsDataToPointDataByStat(JSONArray arry, String tagName, int type) {
+        List<PointData> result = new ArrayList<>();
+        for (int i = 0; i < arry.size(); i++) {
+            JSONObject jsonData = arry.getJSONObject(i);
+            PointData data = new PointData();
+            data.setEdnaId(tagName);
+            data.setPointName("1");
+            JSONObject avgData = null;
+            JSONObject maxData = null;
+            JSONObject minData = null;
+            if (jsonData.containsKey("avg")) {
+                avgData = jsonData.getJSONObject("avg");
+            }
+            if (jsonData.containsKey("max")) {
+                maxData = jsonData.getJSONObject("max");
+            }
+            if (jsonData.containsKey("min")) {
+                minData = jsonData.getJSONObject("min");
+            }
+            switch (type) {
+                case 0:
+                    data.setPointValue(String.valueOf(maxData.getString("doubleValue")));
+                    data.setPointValueInDouble(Double.valueOf(maxData.getString("doubleValue")));
+                    data.setPointTime(Long.valueOf(maxData.getString("ts")) / 1000);
+                    break;
+                case 1:
+                    data.setPointValue(String.valueOf(minData.getString("doubleValue")));
+                    data.setPointValueInDouble(Double.valueOf(minData.getString("doubleValue")));
+                    data.setPointTime(Long.valueOf(minData.getString("ts")) / 1000);
+                    break;
+                case 2:
+                    data.setPointValue(String.valueOf(avgData.getString("doubleValue")));
+                    data.setPointValueInDouble(Double.valueOf(avgData.getString("doubleValue")));
+                    data.setPointTime(Long.valueOf(avgData.getString("ts")) / 1000);
+                    break;
+                default:
+                    break;
+            }
+            result.add(data);
+        }
+        return result;
+    }
+
+    public static DNAVal[] phraseDNAVal(JSONObject jsonObject, String[] tagName) {
+        DNAVal[] arr = new DNAVal[jsonObject.size()];
+        List<DNAVal> list = new ArrayList<>();
+        Iterator<String> sIterator = jsonObject.keySet().iterator();
+
+        for (int i = 0; i < tagName.length; i++) {
+            // 获得key
+            String key = tagName[i];
+            // 根据key获得value, value也可以是JSONObject,JSONArray,使用对应的参数接收即可
+            JSONObject jsonData = jsonObject.getJSONObject(key);
+            DNAVal data = new DNAVal();
+            data.Time = Integer.parseInt(String.valueOf(Long.valueOf(jsonData.getString("ts")) / 1000));
+            data.Status = (short) jsonData.getShortValue("status");
+            data.DValue = (Double.valueOf(jsonData.getDoubleValue("doubleValue")));
+            list.add(data);
+        }
+
+        return list.toArray(arr);
+    }
+
+    public static DNAStatVal[] phraseDNAVal(JSONArray jsonArray) {
+
+        DNAStatVal[] arr = new DNAStatVal[jsonArray.size()];
+        List<DNAStatVal> list = new ArrayList<>();
+        for (int i = 0; i < jsonArray.size(); i++) {
+            JSONObject jsonData = jsonArray.getJSONObject(i);
+            JSONObject avgData = null;
+            JSONObject maxData = null;
+            JSONObject minData = null;
+            if (jsonData.containsKey("avg")) {
+                avgData = jsonData.getJSONObject("avg");
+            }
+            if (jsonData.containsKey("max")) {
+                maxData = jsonData.getJSONObject("max");
+            }
+            if (jsonData.containsKey("min")) {
+                minData = jsonData.getJSONObject("min");
+            }
+            DNAStatVal statVal = new DNAStatVal();
+
+            DNAVal avgVal = new DNAVal();
+            DNAVal maxVal = new DNAVal();
+            DNAVal minVal = new DNAVal();
+
+            avgVal.Time = Integer.valueOf(String.valueOf(Long.valueOf(avgData.getString("ts")) / 1000));
+            avgVal.DValue = Double.valueOf(avgData.getString("doubleValue"));
+
+            maxVal.Time =  Integer.valueOf(String.valueOf(Long.valueOf(maxData.getString("ts")) / 1000));
+            maxVal.DValue = Double.valueOf(maxData.getString("doubleValue"));
+
+            minVal.Time =  Integer.valueOf(String.valueOf(Long.valueOf(minData.getString("ts")) / 1000));
+            minVal.DValue = Double.valueOf(minData.getString("doubleValue"));
+
+            statVal.max = maxVal;
+            statVal.min = minVal;
+            statVal.avg = avgVal;
+
+            list.add(statVal);
+        }
+
+        return list.toArray(arr);
+    }
+
+}

+ 128 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/until/realtimedate/MathUtil.java

@@ -0,0 +1,128 @@
+package com.gyee.backconfig.until.realtimedate;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author fhq
+ *
+ */
+public class MathUtil {
+
+	// 截取小数点后两位
+	public static Double twoBit(Double dd) {
+		if (dd == null) {
+			return dd;
+		} else {
+			BigDecimal decimal = new BigDecimal(dd);
+			decimal = decimal.setScale(2, BigDecimal.ROUND_HALF_UP);
+			return decimal.doubleValue();
+		}
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return
+	 */
+	public static Double decimal(Double dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.doubleValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return 无格式字符串 ,末位去零
+	 */
+	public static String plain(Double dd, int Scale) {
+		if (dd == 0) {
+			return "0";
+		} else {
+			return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+					.stripTrailingZeros().toPlainString();
+		}
+	}
+
+	/**
+	 * 字符串转Double
+	 *
+	 * @param value
+	 * @return
+	 */
+	public static Double getDouble(String value) {
+		return new BigDecimal(value).doubleValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return
+	 */
+	public static Float decimal(Float dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.floatValue();
+	}
+
+	/**
+	 * 格式化小数位数,四舍五入
+	 *
+	 * @param dd
+	 * @param Scale
+	 *            小数位数
+	 * @return 无格式字符串
+	 */
+	public static String plain(Float dd, int Scale) {
+		return new BigDecimal(dd).setScale(Scale, BigDecimal.ROUND_HALF_UP)
+				.toPlainString();
+	}
+
+	/**
+	 * 字符串转Float
+	 *
+	 * @param value
+	 * @return
+	 */
+	public static Float getFloat(String value) {
+		return new BigDecimal(value).floatValue();
+	}
+
+	/**
+	 * 将10进制数转换成二进制数
+	 */
+	public static String getBinaryString(Double value) {
+		return Integer.toBinaryString(value.intValue());
+	}
+
+	/**
+	 * 在指定时间上加指定的小时
+	 * @param date
+	 * @param hour
+	 * @return
+	 */
+	public static Date addHours(Date date, double hour) {
+		return new Date(date.getTime() + (long) (hour * 3600 * 1000));
+	}
+
+	public static Integer toInt(String str) {
+		return Integer.parseInt(str);
+	}
+
+	public static Float toFloat(String str) {
+		return Float.parseFloat(str);
+	}
+
+	public static Double toDouble(String str) {
+		return Double.parseDouble(str);
+	}
+
+}

+ 1 - 1
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/WindpowerstationServiceImpl.java

@@ -105,7 +105,7 @@ public class WindpowerstationServiceImpl extends ServiceImpl<WindpowerstationMap
         List<Windpowerstation> list = baseMapper.selectList(qw);
         return list;
     }
-
+    //行政管理区域风电场列表
     @Override
     public List<WindpowerstationAdmVo> getList(String id,String regionid, String companyid) throws Exception {