Browse Source

Merge remote-tracking branch 'origin/master'

shilin 2 năm trước cách đây
mục cha
commit
4d2ce6b62b
73 tập tin đã thay đổi với 6230 bổ sung46 xóa
  1. 30 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/PointGenerateController.java
  2. 109 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEquipmentPointController.java
  3. 108 2
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWppointController.java
  4. 143 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/StandardpointController.java
  5. 16 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/mapper/auto/StandardpointMapper.java
  6. 6 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/ProBasicLine.java
  7. 35 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/model/auto/Standardpoint.java
  8. 3 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicEnergyGroupService.java
  9. 11 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicEquipmentPointService.java
  10. 4 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicLineService.java
  11. 4 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicProjectService.java
  12. 3 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicRegionService.java
  13. 7 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWindpowerstationService.java
  14. 4 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWindturbineService.java
  15. 13 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IProBasicWppointService.java
  16. 31 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/IStandardpointService.java
  17. 312 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/PointGenerateService.java
  18. 19 10
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/SttreeService.java
  19. 12 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicEnergyGroupServiceImpl.java
  20. 65 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicEquipmentPointServiceImpl.java
  21. 12 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicLineServiceImpl.java
  22. 14 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicProjectServiceImpl.java
  23. 13 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicRegionServiceImpl.java
  24. 20 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWindpowerstationServiceImpl.java
  25. 21 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWindturbineServiceImpl.java
  26. 67 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/ProBasicWppointServiceImpl.java
  27. 118 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/impl/StandardpointServiceImpl.java
  28. 75 0
      web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/vo/WindpowerstationAdmVo.java
  29. 4 0
      web/backmanagerconfig/pom.xml
  30. 126 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/ProjectstudyController.java
  31. 3 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/RealtimedatabaseconfigurationController.java
  32. 20 3
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/RegionController.java
  33. 42 5
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/WindpowerstationController.java
  34. 1 1
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/WindpowerstationpointnewController.java
  35. 16 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/mapper/auto/ProjectstudyMapper.java
  36. 37 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Projectstudy.java
  37. 4 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Realtimedatabaseconfiguration.java
  38. 24 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Region.java
  39. 18 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/IProjectstudyService.java
  40. 43 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/ProjectstudyServiceImpl.java
  41. 16 9
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/WindpowerstationServiceImpl.java
  42. 8 0
      web/backmanagerconfig/src/main/java/com/gyee/backconfig/vo/PersisVo.java
  43. 10 10
      web/gdsx-ghost/src/main/java/com/gyee/ghost/config/GeneratorCodeConfig.java
  44. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconStationStatusmxController.java
  45. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconStatusmxController.java
  46. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconWindturbineStatus2Controller.java
  47. 23 2
      web/gdsx-ghost/src/main/java/com/gyee/ghost/init/CacheContext.java
  48. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconStationStatusmxMapper.java
  49. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconStatusmxMapper.java
  50. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconWindturbineStatus2Mapper.java
  51. 62 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconStationStatusmx.java
  52. 26 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconStatusmx.java
  53. 63 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconWindturbineStatus2.java
  54. 266 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/RealtimeService.java
  55. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconStationStatusmxService.java
  56. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconStatusmxService.java
  57. 16 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconWindturbineStatus2Service.java
  58. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconStationStatusmxServiceImpl.java
  59. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconStatusmxServiceImpl.java
  60. 20 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconWindturbineStatus2ServiceImpl.java
  61. 26 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/task/SaticScheduleTask.java
  62. 17 0
      web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/EdosUtil.java
  63. 8 1
      web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/IEdosUtil.java
  64. 1 0
      web/gdsx-ghost/src/main/resources/application-dev.yml
  65. 2 1
      web/gdsx-ghost/src/test/java/com/gyee/ghost/GhostTest.java
  66. 96 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/FreedomMapper.java
  67. 64 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/RegionPGMapper.java
  68. 79 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/Freedom.java
  69. 442 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/FreedomExample.java
  70. 773 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/RegionPG.java
  71. 1763 0
      web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/RegionPGExample.java
  72. 224 0
      web/monitor-web-sxjn/src/main/resources/mybatis/auto/FreedomMapper.xml
  73. 432 0
      web/monitor-web-sxjn/src/main/resources/mybatis/auto/RegionPGMapper.xml

+ 30 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/PointGenerateController.java

@@ -0,0 +1,30 @@
+package com.gyee.backconfig.controller;
+
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.service.auto.PointGenerateService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("//generate")
+public class PointGenerateController {
+
+    @Autowired
+    private PointGenerateService pointGenerateService;
+
+
+    @PostMapping(value = "/add")
+    public R addGeneratePoint(@RequestParam(value = "points", required = false) String[] points) {
+
+        int code = pointGenerateService.addGeneratePoint(points);
+
+        if (code > 0) {
+            return R.ok();
+        } else {
+            return R.ok().data("插入失败" + code + "条测点");
+        }
+    }
+}

+ 109 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicEquipmentPointController.java

@@ -1,9 +1,15 @@
 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.ProBasicEquipmentPoint;
+import com.gyee.backconfig.service.auto.IProBasicEquipmentPointService;
+import com.gyee.common.model.StringUtils;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * <p>
@@ -16,5 +22,106 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("//pro-basic-equipment-point")
 public class ProBasicEquipmentPointController {
+    @Resource
+    private IProBasicEquipmentPointService proBasicEquipmentPointService;
+
+    /**
+     * 查询
+     *
+     * @param id
+     * @param code
+     * @param name
+     * @param model
+     * @param uniformCode
+     * @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 = "model", required = false) String model,
+                      @RequestParam(value = "uniformCode", required = false) String uniformCode,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<ProBasicEquipmentPoint> list = proBasicEquipmentPointService.list(id, code, name, model, uniformCode, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    /**
+     * 根据id查询
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/{id}")
+    public R findOne(@PathVariable("id") String id) {
+
+        ProBasicEquipmentPoint pointnew = proBasicEquipmentPointService.getOne(id);
+        if (StringUtils.isNotNull(pointnew)) {
+            return R.ok().data(pointnew);
+        } else {
+            return R.error().data("查询失败!");
+        }
+
+    }
+
+
+    /**
+     * 插入(批量)
+     *
+     * @param pointnew
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody ProBasicEquipmentPoint pointnew) {
+
+        boolean b = proBasicEquipmentPointService.addOrUpdate(pointnew);
+        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) {
+        boolean b = proBasicEquipmentPointService.removeByIds(ids);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
+
+    /**
+     * 批量修改
+     *
+     * @param list
+     * @return
+     */
+    @PutMapping(value = "/editPointnew")
+    public R update(@RequestBody List<ProBasicEquipmentPoint> list) {
+        boolean b = proBasicEquipmentPointService.updateBatchById(list);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("更新失败!");
+        }
+    }
+
 
 }

+ 108 - 2
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/ProBasicWppointController.java

@@ -1,9 +1,15 @@
 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.ProBasicWppoint;
+import com.gyee.backconfig.service.auto.IProBasicWppointService;
+import com.gyee.common.model.StringUtils;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * <p>
@@ -16,5 +22,105 @@ import org.springframework.web.bind.annotation.RestController;
 @RestController
 @RequestMapping("//pro-basic-wppoint")
 public class ProBasicWppointController {
+    @Resource
+    private IProBasicWppointService proBasicWppointService;
+
+    /**
+     * 查询
+     *
+     * @param id
+     * @param code
+     * @param name
+     * @param model
+     * @param uniformCode
+     * @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 = "model", required = false) String model,
+                      @RequestParam(value = "uniformCode", required = false) String uniformCode,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<ProBasicWppoint> list = proBasicWppointService.list(id, code, name, model, uniformCode, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+    /**
+     * 根据id查询
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/{id}")
+    public R findOne(@PathVariable("id") String id) {
+
+        ProBasicWppoint pointnew = proBasicWppointService.getOne(id);
+        if (StringUtils.isNotNull(pointnew)) {
+            return R.ok().data(pointnew);
+        } else {
+            return R.error().data("查询失败!");
+        }
+
+    }
+
+
+    /**
+     * 插入(批量)
+     *
+     * @param pointnew
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody ProBasicWppoint pointnew) {
+
+        boolean b = proBasicWppointService.addOrUpdate(pointnew);
+        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) {
+        boolean b = proBasicWppointService.removeByIds(ids);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
+
+    /**
+     * 批量修改
+     *
+     * @param list
+     * @return
+     */
+    @PutMapping(value = "/editPointnew")
+    public R update(@RequestBody List<ProBasicWppoint> list) {
+        boolean b = proBasicWppointService.updateBatchById(list);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("更新失败!");
+        }
+    }
 
 }

+ 143 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/controller/StandardpointController.java

@@ -0,0 +1,143 @@
+package com.gyee.backconfig.controller;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.model.auto.Standardpoint;
+import com.gyee.backconfig.service.auto.IStandardpointService;
+import com.gyee.common.model.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-24
+ */
+@RestController
+@RequestMapping("//standardpoint")
+public class StandardpointController {
+    @Resource
+    private IStandardpointService standardpointService;
+
+    /**
+     * 查询
+     * @param id
+     * @param uniformcode
+     * @param name
+     * @param type
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "/list")
+    public R findList(@RequestParam(value = "id", required = false) String id,
+                      @RequestParam(value = "uniformcode", required = false) String uniformcode,
+                      @RequestParam(value = "name", required = false) String name,
+                      @RequestParam(value = "type", required = false) String type,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<Standardpoint> list = standardpointService.list(id, uniformcode, name, type, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+
+    /**
+     * 根据id查询
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/{id}")
+    public R findOne(@PathVariable("id") String id) {
+
+        Standardpoint standardpoint = standardpointService.getOne(id);
+        if (StringUtils.isNotNull(standardpoint)) {
+            return R.ok().data(standardpoint);
+        } else {
+            return R.error().data("查询失败!");
+        }
+
+    }
+
+
+    /**
+     * 插入(批量)
+     *
+     * @param standardpoint
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody Standardpoint standardpoint) {
+
+        boolean b = standardpointService.addOrUpdate(standardpoint);
+        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) {
+        boolean b = standardpointService.removeByIds(ids);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
+
+    /**
+     * 批量修改
+     *
+     * @param list
+     * @return
+     */
+    @PutMapping(value = "/editStandardpoint")
+    public R update(@RequestBody List<Standardpoint> list) {
+        boolean b = standardpointService.updateBatchById(list);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("更新失败!");
+        }
+
+    }
+
+
+    /**
+     * 查询
+     *
+     * @param type
+     * @return
+     */
+    @GetMapping(value = "/pointcode")
+    public R findList(
+            @RequestParam(value = "type", required = false) String type) {
+        String code = standardpointService.getPointCode(type);
+        if (null != code) {
+            return R.ok().data(code);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+}

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

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.mapper.auto;
+
+import com.gyee.backconfig.model.auto.Standardpoint;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-24
+ */
+public interface StandardpointMapper extends BaseMapper<Standardpoint> {
+
+}

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

@@ -1,8 +1,11 @@
 package com.gyee.backconfig.model.auto;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
 
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
@@ -69,4 +72,7 @@ public class ProBasicLine extends Model {
     private Integer quantity;
 
     private Integer isAble;
+
+    @TableField(exist = false)
+    private List<ProBasicWindturbine> Children = new ArrayList<>();
 }

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

@@ -0,0 +1,35 @@
+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-10-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Standardpoint extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String uniformcode;
+
+    private String name;
+
+    private String type;
+
+    /**
+     * 标签点代码(类型为计算点时必填)
+     */
+    private String point;
+
+
+}

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

@@ -5,6 +5,8 @@ import com.gyee.backconfig.model.auto.ProBasicEnergyGroup;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.gyee.backconfig.model.auto.ProBasicRegion;
 
+import java.util.List;
+
 /**
  * <p>
  * 集团 服务类
@@ -15,4 +17,5 @@ import com.gyee.backconfig.model.auto.ProBasicRegion;
  */
 public interface IProBasicEnergyGroupService extends IService<ProBasicEnergyGroup> {
     IPage<ProBasicEnergyGroup> list(String id, String name, String aname, String pageNum, String pageSize);
+    List<ProBasicEnergyGroup> getCompanysByidAndRid(String id);
 }

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

@@ -1,8 +1,11 @@
 package com.gyee.backconfig.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicEquipmentPoint;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 设备测点 服务类
@@ -12,5 +15,13 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProBasicEquipmentPointService extends IService<ProBasicEquipmentPoint> {
+    IPage<ProBasicEquipmentPoint> list(String id, String code, String name, String model, String uniformCode, String pageNum, String pageSize);
+
+    ProBasicEquipmentPoint getOne(String id);
+
+    boolean addOrUpdate(ProBasicEquipmentPoint pointnew);
+
+    boolean removeByIds(String ids);
 
+    List<ProBasicEquipmentPoint> list(String windpowerstationId , String uniformCode);
 }

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

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicLine;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 集电线路 服务类
@@ -14,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicLineService extends IService<ProBasicLine> {
     IPage<ProBasicLine> list(String id,String code, String name, String aname, String pageNum, String pageSize);
+
+    List<ProBasicLine> getList(String projectId);
 }

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

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicProject;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 工程表 服务类
@@ -14,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicProjectService extends IService<ProBasicProject> {
     IPage<ProBasicProject> getList(String id, String name, String code, String windpowerstationId, String pageNum, String pageSize);
+
+    List<ProBasicProject> getList(String windpowerstationId);
 }

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

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicRegion;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 区域 服务类
@@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicRegionService extends IService<ProBasicRegion> {
     IPage<ProBasicRegion> list(String id, String name, String groupId, String aname, String pageNum, String pageSize);
+    List<ProBasicRegion> getReginBycode(String groupId);
 }

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

@@ -3,6 +3,9 @@ package com.gyee.backconfig.service.auto;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicWindpowerstation;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.gyee.backconfig.vo.WindpowerstationAdmVo;
+
+import java.util.List;
 
 /**
  * <p>
@@ -14,4 +17,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface IProBasicWindpowerstationService extends IService<ProBasicWindpowerstation> {
     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;
 }

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

@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.model.auto.ProBasicWindturbine;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 风机 服务类
@@ -15,4 +17,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 public interface IProBasicWindturbineService extends IService<ProBasicWindturbine> {
     IPage<ProBasicWindturbine> list(String id, String code, String windpowerstationId, String projectId, String lineId, String pageNum, String pageSize);
 
+    List<ProBasicWindturbine> getWindturbineGyLine(String windpowerstationId, String projectId , String lineId);
+
 }

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

@@ -1,8 +1,12 @@
 package com.gyee.backconfig.service.auto;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.ProBasicEquipmentPoint;
 import com.gyee.backconfig.model.auto.ProBasicWppoint;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import java.util.List;
+
 /**
  * <p>
  * 场站测点 服务类
@@ -12,5 +16,14 @@ import com.baomidou.mybatisplus.extension.service.IService;
  * @since 2022-10-15
  */
 public interface IProBasicWppointService extends IService<ProBasicWppoint> {
+    IPage<ProBasicWppoint> list(String id, String code, String name, String model, String uniformCode, String pageNum, String pageSize);
+
+    boolean addOrUpdate(ProBasicWppoint pointnew);
+
+    ProBasicWppoint getOne(String id);
+
+    boolean removeByIds(String ids);
+
 
+    List<ProBasicWppoint> getStationpointByUniformcode(String windpowerstationId, String uniformCode);
 }

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

@@ -0,0 +1,31 @@
+package com.gyee.backconfig.service.auto;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.Standardpoint;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-24
+ */
+public interface IStandardpointService extends IService<Standardpoint> {
+    IPage<Standardpoint> list(String id, String uniformcode, String name, String type, String pageNum, String pageSize);
+
+    Standardpoint getOne(String id);
+
+    boolean addOrUpdate(Standardpoint standardpoint);
+
+    boolean  removeByIds(String ids);
+
+    List<Standardpoint> list(String[] uniformcodes);
+
+    String getPointCode(String type);
+
+    List<Standardpoint> list(String uniformcode);
+}

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

@@ -0,0 +1,312 @@
+package com.gyee.backconfig.service.auto;
+
+
+import com.gyee.backconfig.model.auto.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 生成测点服务类
+ */
+@Service
+public class PointGenerateService {
+    private static Logger logger = LoggerFactory.getLogger(PointGenerateService.class);
+
+    @Resource
+    private IProBasicEnergyGroupService proBasicEnergyGroupService;//集团
+
+    @Autowired
+    private IProBasicRegionService proBasicRegionService;//区域
+
+    @Resource
+    private IProBasicCompanyService proBasicCompanyService;//公司
+
+    @Resource
+    private IProBasicWindpowerstationService proBasicWindpowerstationService;//场站
+
+    @Resource
+    private IProBasicProjectService proBasicProjectService;//期次
+
+    @Resource
+    private IProBasicLineService proBasicLineService;//线路
+
+    @Autowired
+    private IProBasicWindturbineService proBasicWindturbineService;//风机
+
+    @Autowired
+    private IProBasicWppointService proBasicWppointService;//场站测点
+
+    @Autowired
+    private IProBasicEquipmentPointService proBasicEquipmentPointService;//设备测点
+
+    @Autowired
+    private IStandardpointService standardpointService;
+
+    public int addGeneratePoint(String[] points) {
+        int num = 0;
+
+        List<Standardpoint> pointList = standardpointService.list(points);
+        List<ProBasicEnergyGroup> companysList = proBasicEnergyGroupService.getCompanysByidAndRid("");
+
+        for (Standardpoint p : pointList) {
+
+            if ("czjs".equals(p.getType())) {
+
+                List<ProBasicWppoint> staionList = fjd(p, companysList);
+                for (ProBasicWppoint i : staionList) {
+                    boolean b = proBasicWppointService.addOrUpdate(i);
+                    if (!b) {
+                        logger.error(i.getCode() + "测点插入失败");
+                        num++;
+                    }
+                }
+
+            } else {
+                //fjjs
+                //fjjcd
+
+                for (ProBasicEnergyGroup c : companysList) {
+                    List<ProBasicRegion> regionList = proBasicRegionService.getReginBycode(c.getCapacityUnit());
+                    for (ProBasicRegion r : regionList) {
+                        List<ProBasicWindpowerstation> windpowerstationList = proBasicWindpowerstationService.getList(r.getId());
+                        List<ProBasicEquipmentPoint> testingList = czd(p, windpowerstationList, r);
+                        for (ProBasicEquipmentPoint i : testingList) {
+                            boolean b = proBasicEquipmentPointService.addOrUpdate(i);
+                            if (!b) {
+                                logger.error(i.getCode() + "测点插入失败");
+                                num++;
+                            }
+                        }
+                    }
+                }
+            }
+
+        }
+
+        return num;
+    }
+    private List<ProBasicWppoint> fjd(Standardpoint p, List<ProBasicEnergyGroup> companysList) {
+        List<ProBasicWppoint> stationList = new ArrayList<>();
+
+        ProBasicWppoint stationpoint = null;
+
+        List<String> gflist = new ArrayList<>();
+        gflist.add("G");
+        gflist.add("F");
+
+        for (ProBasicEnergyGroup c : companysList) {
+            StringBuilder gssb = null;
+            List<ProBasicWppoint> list1 = proBasicWppointService.getStationpointByUniformcode(c.getId(), p.getUniformcode());
+            if (null == list1 || list1.size() <= 0) {
+                //"JSFW.QY_JN_XXXX_XX_XX_XX_XXX_CI0144"	"区域限电停机台数(明细)"
+                gssb = new StringBuilder();
+                gssb.append("JSFW.").append(c.getId()).append("_");
+                stationpoint = new ProBasicWppoint();
+                stationpoint.setCode(gssb.toString() + "XXXX_XX_XX_XX_XXX_" + p.getPoint());
+                stationpoint.setName(c.getName() + p.getName());
+                stationpoint.setUniformCode(p.getUniformcode());
+                stationpoint.setWindpowerstationId(c.getId());
+                stationpoint.setRealtimeId("JSFW");
+                stationList.add(stationpoint);
+            }
+
+
+            for (String gf : gflist) {
+                List<ProBasicWppoint> list1df = proBasicWppointService.getStationpointByUniformcode(c.getId() + "_" + gf, p.getUniformcode());
+                if (null == list1df || list1df.size() <= 0) {
+                    //"JSFW.QY_JN_QYG_XX_XX_XX_XXX_CI0144"	"区域光伏限电停机台数(明细)"
+                    //"JSFW.QY_JN_QYF_XX_XX_XX_XXX_CI0144"	"区域风场限电停机台数(明细)"
+                    StringBuilder gsgfsb = new StringBuilder(gssb);
+                    gsgfsb.append(c.getId()).append(gf)
+                            .append("_XX_XX_XX_XXX_")
+                            .append(p.getPoint());
+                    stationpoint = new ProBasicWppoint();
+                    stationpoint.setCode(gsgfsb.toString());
+                    stationpoint.setName(c.getName() + p.getName());
+                    stationpoint.setUniformCode(p.getUniformcode());
+                    stationpoint.setWindpowerstationId(c.getId() + "_" + gf);
+                    stationpoint.setRealtimeId("JSFW");
+                    stationList.add(stationpoint);
+                }
+            }
+
+            List<ProBasicRegion> regionList = proBasicRegionService.getReginBycode(c.getCapacityUnit());
+
+
+            for (ProBasicRegion r : regionList) {
+
+
+                StringBuilder qusb = new StringBuilder();
+                List<ProBasicWppoint> list2 = proBasicWppointService.getStationpointByUniformcode(r.getId(), p.getUniformcode());
+                if (null == list2 || list2.size() <= 0) {
+                    //"JSFW.SX_JN_XXXX_XX_XX_XX_XXX_CI0144"	"山西限电停机台数(明细)"
+
+                    qusb.append("JSFW.").append(c.getId()).append("_");
+                    qusb.append(r.getId()).append("_");
+                    stationpoint = new ProBasicWppoint();
+                    stationpoint.setCode(gssb.toString() + "XX_XX_XX_XXX_" + p.getPoint());
+                    stationpoint.setName(c.getName() + p.getName());
+                    stationpoint.setUniformCode(p.getUniformcode());
+                    stationpoint.setWindpowerstationId(r.getId());
+                    stationpoint.setRealtimeId("JSFW");
+                    stationList.add(stationpoint);
+                }
+
+                for (String gf : gflist) {
+                    List<ProBasicWppoint> list2df = proBasicWppointService.getStationpointByUniformcode(r.getId() + "_" + gf, p.getUniformcode());
+                    if (null == list2df || list2df.size() <= 0) {
+                        //"JSFW.SX_JN_SXG_XX_XX_XX_XXX_CI0144"	"山西光伏限电停机台数(明细)"
+                        //"JSFW.SX_JN_SXF_XX_XX_XX_XXX_CI0144"	"山西风场限电停机台数(明细)"
+                        StringBuilder qugfsb = new StringBuilder(qusb);
+                        qugfsb.append(gf)
+                                .append("_XX_XX_XX_XXX_")
+                                .append(p.getPoint());
+                        stationpoint = new ProBasicWppoint();
+                        stationpoint.setCode(qugfsb.toString());
+                        stationpoint.setName(c.getName() + p.getName());
+                        stationpoint.setUniformCode(p.getUniformcode());
+                        stationpoint.setWindpowerstationId(r.getId() + "_" + gf);
+                        stationpoint.setRealtimeId("JSFW");
+                        stationList.add(stationpoint);
+
+                    }
+                }
+
+
+                List<ProBasicWindpowerstation> windpowerstationList = proBasicWindpowerstationService.getList(r.getId());
+                for (ProBasicWindpowerstation station : windpowerstationList) {
+                    List<ProBasicWppoint> list3 = proBasicWppointService.getStationpointByUniformcode(station.getId(), p.getUniformcode());
+                    if (null != list3 && list3.size() > 0) {
+                        continue;
+                    }
+                    stationpoint = new ProBasicWppoint();
+                    //BHBFCJSFW.SX_JN_BHBF_JS_XX_XX_XXX_CI0079
+                    //SYGCJSFW.SX_JN_SYG_JS_XX_XX_XXX_CI0001
+                    //HSMFCJSFW.SX_JN_HSMF_JS_XX_XX_XXX_AI0002
+
+                    //场站测点
+                    StringBuilder stationsb = new StringBuilder();
+                    String substaion = station.getId().substring(0, station.getId().indexOf("_"));
+                    stationsb.append(substaion).append(station.getId().endsWith("_FDC") ? "FCJSFW." : "GCJSFW.");
+                    stationsb.append(c.getId()).append("_").append(r.getId()).append("_").append(substaion);
+                    stationsb.append(station.getId().endsWith("_FDC") ? "F" : "G").append("_");
+
+                    stationpoint.setCode(stationsb.toString() + "XX_XX_XXX_" + p.getPoint());
+                    stationpoint.setName(station.getName() + p.getName());
+                    stationpoint.setUniformCode(p.getUniformcode());
+                    stationpoint.setWindpowerstationId(station.getId());
+                    stationpoint.setRealtimeId(substaion + (station.getId().endsWith("_FDC") ? "FCJSFW" : "GCJSFW"));
+                    stationList.add(stationpoint);
+
+                    List<ProBasicProject> projectList = proBasicProjectService.getList(station.getId());
+                    for (ProBasicProject project : projectList) {
+                        List<ProBasicWppoint> list4 = proBasicWppointService.getStationpointByUniformcode(project.getId(), p.getUniformcode());
+                        if (null != list4 && list4.size() > 0) {
+                            continue;
+                        }
+                        //期次测点
+                        stationpoint = new ProBasicWppoint();
+                        StringBuilder projectsb = new StringBuilder(stationsb);
+                        Integer pnum = Integer.valueOf(project.getId().substring(substaion.length(), project.getId().indexOf("_"))) * 1;
+                        projectsb.append("P")
+                                .append(pnum);
+
+                        stationpoint.setCode(projectsb.toString() + "_XX_XXX_" + p.getPoint());
+                        stationpoint.setName(project.getName() + p.getName());
+                        stationpoint.setUniformCode(p.getUniformcode());
+                        stationpoint.setWindpowerstationId(project.getId());
+                        stationpoint.setRealtimeId(substaion + (station.getId().endsWith("_FDC") ? "FCJSFW" : "GCJSFW"));
+                        stationList.add(stationpoint);
+
+                        List<ProBasicLine> lineList = proBasicLineService.getList(project.getId());
+                        for (ProBasicLine l : lineList) {
+
+                            List<ProBasicWppoint> list5 = proBasicWppointService.getStationpointByUniformcode(l.getId(), p.getUniformcode());
+                            if (null != list5 && list5.size() > 0) {
+                                continue;
+                            }
+                            stationpoint = new ProBasicWppoint();
+                            //线路测点
+                            StringBuilder linesb = new StringBuilder(projectsb);
+
+                            Integer lnum = Integer.valueOf(l.getId().substring(substaion.length(), project.getId().indexOf("_"))) * 1;
+                            linesb.append("_L").append(lnum)
+                                    .append("_XXX_").append(p.getPoint());
+
+                            stationpoint.setCode(linesb.toString());
+                            stationpoint.setName(l.getName() + p.getName());
+                            stationpoint.setUniformCode(p.getUniformcode());
+                            stationpoint.setWindpowerstationId(l.getId());
+                            stationpoint.setRealtimeId(substaion + (station.getId().endsWith("_FDC") ? "FCJSFW" : "GCJSFW"));
+                            stationList.add(stationpoint);
+
+                        }
+                    }
+                }
+            }
+        }
+
+        return stationList;
+
+    }
+
+
+    /**
+     * @param p
+     * @param windpowerstationList
+     * @return
+     */
+    private List<ProBasicEquipmentPoint> czd(Standardpoint p, List<ProBasicWindpowerstation> windpowerstationList,ProBasicRegion region) {
+        ProBasicEquipmentPoint testing = null;
+        List<ProBasicEquipmentPoint> testingList = new ArrayList<>();
+        for (ProBasicWindpowerstation station : windpowerstationList) {
+
+
+            List<ProBasicWindturbine> windturbineList = proBasicWindturbineService.getWindturbineGyLine(station.getId(), "", "");
+            for (ProBasicWindturbine w : windturbineList) {
+                List<ProBasicEquipmentPoint> list = proBasicEquipmentPointService.list(w.getId(), p.getUniformcode());
+                if (null != list && list.size() > 0) {
+                    continue;
+                }
+                testing = new ProBasicEquipmentPoint();
+                //fjjs
+                //fjjcd
+                String substaion = station.getId().substring(0, station.getId().indexOf("_"));
+                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(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);
+                    Integer lnum = Integer.valueOf(w.getLineId().substring(substaion.length(), w.getLineId().indexOf("_"))) * 1;
+                    stationsb.append("_L").append(lnum);
+                    String wnum = w.getId().substring(w.getId().indexOf("_") + 1, w.getId().length());
+                    stationsb.append("_").append(wnum).append("_");
+
+                    //BHB3FJJSFW.SX_JN_BHB3F_JS_P1_L30_001_CI0060
+                    //SYGFJSFW.SX_JN_SYG_JS_P2_L3_NBQ0061_CI0174
+                    testing.setCode(stationsb.toString() + p.getPoint());
+                    testing.setRealtimeId(substaion + (station.getId().endsWith("_FDC") ? "FJJSFW" : "GFJSFW"));
+                } else if ("fjjcd".equals(p.getType())) {
+                    testing.setCode("INITIAL");
+                    testing.setRealtimeId(substaion + (station.getId().endsWith("_FDC") ? "FJ" : "GF"));
+                }
+
+                testing.setName(w.getName() + p.getName());
+                testing.setUniformCode(p.getUniformcode());
+                testing.setWindpowerstationId(w.getId());
+                testingList.add(testing);
+            }
+        }
+
+        return testingList;
+
+    }
+}

+ 19 - 10
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/service/auto/SttreeService.java

@@ -11,14 +11,15 @@ import java.util.stream.Collectors;
 
 @Service
 public class SttreeService {
-    public List<ProBasicEnergyGroup>  energytree(String tag) {
+    public List<ProBasicEnergyGroup> energytree(String tag) {
 
         List<ProBasicEnergyGroup> energyls = CacheContext.energy;//集团
         List<ProBasicRegion> regionsls = CacheContext.regions;//区域
         List<ProBasicCompany> cpls = CacheContext.cpls;//公司
         List<ProBasicWindpowerstation> wpls = CacheContext.wpls;//场站
         List<ProBasicProject> prols = CacheContext.prols;//期次
-        List<ProBasicLine> list = CacheContext.lines;//期次
+        List<ProBasicLine> list = CacheContext.lines;//线路
+        List<ProBasicWindturbine> wbls = CacheContext.windturbines;//线路
 
 //        if (energyls.get(0).getChildren().size() > 0) return energyls;
 
@@ -28,49 +29,49 @@ public class SttreeService {
             if (null != regls.getChildren()) {
                 regls.getChildren().clear();
             }
-            collect.stream().forEach(c->{
+            collect.stream().forEach(c -> {
                 c.getChildren().clear();
             });
             regls.getChildren().addAll(collect);
         });
 
-        if("1".equals(tag)){
+        if ("1".equals(tag)) {
             return energyls;
         }
 
         //区域-公司
         regionsls.forEach(cp -> {
             List<ProBasicCompany> region = cpls.stream().filter(c -> null != c.getRegionId() && c.getRegionId().equals(cp.getId())).collect(Collectors.toList());
-            region.stream().forEach(r->{
+            region.stream().forEach(r -> {
                 r.getChildren().clear();
             });
             cp.getChildren().addAll(region);
         });
-        if("2".equals(tag)){
+        if ("2".equals(tag)) {
             return energyls;
         }
 
         //公司-场站
         cpls.forEach(wp -> {
             List<ProBasicWindpowerstation> co = wpls.stream().filter(w -> null != w.getCompanyId() && w.getCompanyId().equals(wp.getId())).collect(Collectors.toList());
-            co.stream().forEach(c->{
+            co.stream().forEach(c -> {
                 c.getChildren().clear();
             });
             wp.getChildren().addAll(co);
         });
-        if("3".equals(tag)){
+        if ("3".equals(tag)) {
             return energyls;
         }
 
         //场站-期次
         wpls.forEach(pl -> {
             List<ProBasicProject> cz = prols.stream().filter(p -> null != p.getWindpowerstationId() && p.getWindpowerstationId().equals(pl.getId())).collect(Collectors.toList());
-            cz.stream().forEach(c->{
+            cz.stream().forEach(c -> {
                 c.getChildren().clear();
             });
             pl.getChildren().addAll(cz);
         });
-        if("4".equals(tag)){
+        if ("4".equals(tag)) {
             return energyls;
         }
 
@@ -79,6 +80,14 @@ public class SttreeService {
             List<ProBasicLine> lis = list.stream().filter(l -> null != l.getProjectId() && l.getProjectId().equals(ll.getId())).collect(Collectors.toList());
             ll.getChildren().addAll(lis);
         });
+        if ("5".equals(tag)) {
+            return energyls;
+        }
+        //线路-风机
+        list.forEach(fj -> {
+            List<ProBasicWindturbine> fjls = wbls.stream().filter(f -> null != f.getLineId() && f.getLineId().equals(fj.getId())).collect(Collectors.toList());
+            fj.getChildren().addAll(fjls);
+        });
 
         return energyls;
     }

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

@@ -11,6 +11,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 集团 服务实现类
@@ -43,4 +45,14 @@ public class ProBasicEnergyGroupServiceImpl extends ServiceImpl<ProBasicEnergyGr
         return pageData;
 
     }
+
+    @Override
+    public List<ProBasicEnergyGroup> getCompanysByidAndRid(String id) {
+        QueryWrapper<ProBasicEnergyGroup> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(id)){
+            qw.like("id",id);
+        }
+        List<ProBasicEnergyGroup> list = baseMapper.selectList(qw);
+        return list;
+    }
 }

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

@@ -1,11 +1,18 @@
 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.ProBasicEquipmentPoint;
 import com.gyee.backconfig.mapper.auto.ProBasicEquipmentPointMapper;
 import com.gyee.backconfig.service.auto.IProBasicEquipmentPointService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * <p>
  * 设备测点 服务实现类
@@ -17,4 +24,62 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProBasicEquipmentPointServiceImpl extends ServiceImpl<ProBasicEquipmentPointMapper, ProBasicEquipmentPoint> implements IProBasicEquipmentPointService {
 
+    @Override
+    public IPage<ProBasicEquipmentPoint> list(String id, String code, String name, String model, String uniformCode, String pageNum, String pageSize) {
+        QueryWrapper<ProBasicEquipmentPoint> 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);
+        }
+
+        if (StringUtils.isNotEmpty(model)){
+            qw.like("model",model);
+        }
+
+        if (StringUtils.isNotEmpty(uniformCode)){
+            qw.eq("uniformCode",uniformCode);
+        }
+
+        Page<ProBasicEquipmentPoint> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
+        IPage<ProBasicEquipmentPoint> EquipmentPage = getBaseMapper().selectPage(page, qw);
+        return EquipmentPage;
+    }
+
+    @Override
+    public ProBasicEquipmentPoint getOne(String id) {
+        ProBasicEquipmentPoint pointnew =  this.getById(id);
+        return pointnew;
+    }
+
+    @Override
+    public boolean addOrUpdate(ProBasicEquipmentPoint pointnew) {
+        boolean b = this.saveOrUpdate(pointnew);
+        return b;
+    }
+
+    @Override
+    public boolean removeByIds(String ids) {
+        String[] strings = ids.split(",");
+        boolean b = this.removeByIds(Arrays.asList(strings));
+        return b;
+    }
+
+    @Override
+    public List<ProBasicEquipmentPoint> list(String windpowerstationId, String uniformCode) {
+        QueryWrapper<ProBasicEquipmentPoint> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(uniformCode)){
+            qw.eq("uniformCode",uniformCode);
+        }
+        if (StringUtils.isNotEmpty(windpowerstationId)){
+            qw.eq("windpowerstationId",windpowerstationId);
+        }
+        List<ProBasicEquipmentPoint> list = baseMapper.selectList(qw);
+        return list;
+    }
 }

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

@@ -44,4 +44,16 @@ public class ProBasicLineServiceImpl extends ServiceImpl<ProBasicLineMapper, Pro
         return ProBasicLine;
     }
 
+    @Override
+    public List<ProBasicLine> getList(String projectId) {
+        QueryWrapper<ProBasicLine> qw = new QueryWrapper<>();
+
+
+        if (StringUtils.isNotEmpty(projectId)){
+            qw.eq("projectid",projectId);
+        }
+        List<ProBasicLine> list = baseMapper.selectList(qw);
+        return list;
+    }
+
 }

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

@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 工程表 服务实现类
@@ -45,4 +47,16 @@ public class ProBasicProjectServiceImpl extends ServiceImpl<ProBasicProjectMappe
         IPage<ProBasicProject> ProjectPage = getBaseMapper().selectPage(page, qw);
         return ProjectPage;
     }
+
+    @Override
+    public List<ProBasicProject> getList(String windpowerstationId) {
+        QueryWrapper<ProBasicProject> qw = new QueryWrapper<>();
+
+
+        if (StringUtils.isNotEmpty(windpowerstationId)){
+            qw.like("windpowerstationId",windpowerstationId);
+        }
+        List<ProBasicProject> list = baseMapper.selectList(qw);
+        return list;
+    }
 }

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

@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 区域 服务实现类
@@ -45,4 +47,15 @@ public class ProBasicRegionServiceImpl extends ServiceImpl<ProBasicRegionMapper,
         IPage<ProBasicRegion> pageData = baseMapper.selectPage(page, qw);
         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;
+    }
 }

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

@@ -7,9 +7,12 @@ 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.vo.WindpowerstationAdmVo;
 import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 场站表 服务实现类
@@ -47,4 +50,21 @@ public class ProBasicWindpowerstationServiceImpl extends ServiceImpl<ProBasicWin
         return companysPage;
 
     }
+
+    @Override
+    public List<ProBasicWindpowerstation> getList(String regionId) {
+        QueryWrapper<ProBasicWindpowerstation> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(regionId)){
+            qw.eq("regionid",regionId);
+        }
+
+        List<ProBasicWindpowerstation> list = baseMapper.selectList(qw);
+        return list;
+    }
+
+    @Override
+    public List<WindpowerstationAdmVo> getList(String regionid, String companyid) throws Exception {
+        return null;
+    }
 }

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

@@ -10,6 +10,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  * 风机 服务实现类
@@ -49,4 +51,23 @@ public class ProBasicWindturbineServiceImpl extends ServiceImpl<ProBasicWindturb
         return companysPage;
 
     }
+
+    @Override
+    public List<ProBasicWindturbine> getWindturbineGyLine(String windpowerstationId, String projectId, String lineId) {
+        QueryWrapper<ProBasicWindturbine> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(windpowerstationId)){
+            qw.eq("windpowerstationId",windpowerstationId);
+        }
+        if (StringUtils.isNotEmpty(lineId)){
+            qw.eq("lineId",lineId);
+        }
+        if (StringUtils.isNotEmpty(projectId)){
+            qw.eq("projectId",projectId);
+        }
+
+        List<ProBasicWindturbine> list =  baseMapper.selectList(qw);
+
+        return list;
+    }
 }

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

@@ -1,11 +1,19 @@
 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.ProBasicEquipmentPoint;
 import com.gyee.backconfig.model.auto.ProBasicWppoint;
 import com.gyee.backconfig.mapper.auto.ProBasicWppointMapper;
 import com.gyee.backconfig.service.auto.IProBasicWppointService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
 import org.springframework.stereotype.Service;
 
+import java.util.Arrays;
+import java.util.List;
+
 /**
  * <p>
  * 场站测点 服务实现类
@@ -17,4 +25,63 @@ import org.springframework.stereotype.Service;
 @Service
 public class ProBasicWppointServiceImpl extends ServiceImpl<ProBasicWppointMapper, ProBasicWppoint> implements IProBasicWppointService {
 
+    @Override
+    public IPage<ProBasicWppoint> list(String id, String code, String name, String model, String uniformCode, String pageNum, String pageSize) {
+        QueryWrapper<ProBasicWppoint> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(id)) {
+            qw.like("id", id);
+        }
+        if (StringUtils.isNotEmpty(code)) {
+            qw.like(code, "code");
+        }
+        if (StringUtils.isNotEmpty(model)) {
+            qw.like(model, "model");
+        }
+        if (StringUtils.isNotEmpty(uniformCode)) {
+            qw.eq(uniformCode, "uniformCode");
+        }
+
+        Page<ProBasicWppoint> page = new Page<>(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
+        IPage<ProBasicWppoint> companysPage = getBaseMapper().selectPage(page, qw);
+        return companysPage;
+    }
+
+    @Override
+    public boolean addOrUpdate(ProBasicWppoint pointnew) {
+        boolean b = this.saveOrUpdate(pointnew);
+        return b;
+    }
+
+    @Override
+    public ProBasicWppoint getOne(String id) {
+        ProBasicWppoint pointnew =  this.getById(id);
+        return pointnew;
+    }
+
+    @Override
+    public boolean removeByIds(String ids) {
+        String[] strings = ids.split(",");
+        boolean b = this.removeByIds(Arrays.asList(strings));
+        return b;
+
+    }
+
+    @Override
+    public List<ProBasicWppoint> getStationpointByUniformcode(String windpowerstationId, String uniformCode) {
+        QueryWrapper<ProBasicWppoint> qw = new QueryWrapper<>();
+
+
+        if (StringUtils.isNotEmpty(uniformCode)){
+            qw.eq("uniformCode",uniformCode);
+        }
+
+        if (StringUtils.isNotEmpty(windpowerstationId)){
+            qw.eq("windpowerstationId",windpowerstationId);
+        }
+
+        List<ProBasicWppoint> list = baseMapper.selectList(qw);
+
+        return list;
+    }
+
 }

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

@@ -0,0 +1,118 @@
+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.Standardpoint;
+import com.gyee.backconfig.mapper.auto.StandardpointMapper;
+import com.gyee.backconfig.service.auto.IStandardpointService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gyee.common.model.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-24
+ */
+@Service
+public class StandardpointServiceImpl extends ServiceImpl<StandardpointMapper, Standardpoint> implements IStandardpointService {
+
+    @Override
+    public IPage<Standardpoint> list(String id, String uniformcode, String name, String type, String pageNum, String pageSize) {
+        QueryWrapper<Standardpoint> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(id)){
+            qw.eq("id",id);
+        }
+
+        if (StringUtils.isNotEmpty(uniformcode)){
+            qw.like("uniformcode",uniformcode);
+        }
+
+        if (StringUtils.isNotEmpty(name)){
+            qw.like("name",name);
+        }
+        if (StringUtils.isNotEmpty(type)){
+            qw.eq("type",type);
+        }
+
+        Page<Standardpoint> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
+        IPage<Standardpoint> companysPage = getBaseMapper().selectPage(page, qw);
+        return companysPage;
+    }
+
+    @Override
+    public Standardpoint getOne(String id) {
+        Standardpoint standardpoint =  this.getById(id);
+        return standardpoint;
+    }
+
+    @Override
+    public boolean addOrUpdate(Standardpoint standardpoint) {
+        boolean b = this.saveOrUpdate(standardpoint);
+        return b;
+    }
+
+    @Override
+    public boolean removeByIds(String ids) {
+        String[] strings = ids.split(",");
+        boolean b = this.removeByIds(Arrays.asList(strings));
+        return b;
+    }
+
+    @Override
+    public List<Standardpoint> list(String[] uniformcodes) {
+        QueryWrapper<Standardpoint> qw = new QueryWrapper<>();
+
+
+
+        if (StringUtils.isNotEmpty(uniformcodes)){
+            qw.in("uniformcode",uniformcodes);
+        }
+        List<Standardpoint> list = baseMapper.selectList(qw);
+        return list;
+    }
+
+    @Override
+    public String getPointCode(String type) {
+
+        String code = "CI";
+
+        if (!type.endsWith("js")){
+            return "0000";
+        }
+        QueryWrapper<Standardpoint> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(type)){
+            qw.eq("type",type);
+        }
+        int count = baseMapper.selectCount(qw)+1;
+        if (count <= 0){
+            count = 1;
+        }
+
+        String strcount = String.valueOf(count);
+        for(int i=0;i<5-strcount.length();i++){
+
+            code = code+"0";
+        }
+        return code+strcount;
+    }
+
+    @Override
+    public List<Standardpoint> list(String uniformcode) {
+        QueryWrapper<Standardpoint> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(uniformcode)){
+            qw.eq("uniformcode",uniformcode);
+        }
+        List<Standardpoint> list = baseMapper.selectList(qw);
+        return list;
+    }
+}

+ 75 - 0
web/backmanagerconfig-xktj/src/main/java/com/gyee/backconfig/vo/WindpowerstationAdmVo.java

@@ -0,0 +1,75 @@
+package com.gyee.backconfig.vo;
+
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+public class WindpowerstationAdmVo {
+
+    private String id;
+
+    /**
+     * 编码
+     */
+    private String code;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 电话
+     */
+    private String telephone;
+
+    /**
+     * 装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 容量单位
+     */
+    private String capacityUnit;
+
+    /**
+     * 装机数量
+     */
+    private Integer quantity;
+
+    /**
+     * 别名
+     */
+    private String aname;
+
+    /**
+     * 公司编号
+     */
+    private String companyId;
+
+    /**
+     * 系统厂家
+     */
+    private String systemManufact;
+    /**
+     * 机型
+     */
+    private String model;
+    /**
+     * 场站编号
+     */
+    private String windpowerstationId;
+
+    private double rpjfs;
+
+    private double rfdl;
+
+
+}

+ 4 - 0
web/backmanagerconfig/pom.xml

@@ -63,6 +63,10 @@
             <artifactId>jedis</artifactId>
             <version>3.2.0</version>
         </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 126 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/ProjectstudyController.java

@@ -0,0 +1,126 @@
+package com.gyee.backconfig.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.config.R;
+import com.gyee.backconfig.model.auto.Projectstudy;
+import com.gyee.backconfig.service.auto.IProjectstudyService;
+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>
+ * 前端控制器
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-25
+ */
+@RestController
+@RequestMapping("//projectstudy")
+public class ProjectstudyController {
+    @Resource
+    private IProjectstudyService projectstudyService;
+
+    /**
+     * 查询
+     *
+     * @param id
+     * @param projectid
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    @GetMapping(value = "/List")
+    public R findList(@RequestParam(value = "id", required = false) String id,
+                      @RequestParam(value = "projectid", required = false) String projectid,
+                      @RequestParam(value = "pageNum", required = true) String pageNum,
+                      @RequestParam(value = "pageSize", required = true) String pageSize) {
+        IPage<Projectstudy> list = projectstudyService.getList(id, projectid, pageNum, pageSize);
+        if (null != list) {
+            return R.ok().data(list);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+
+    /**
+     * 根据id查询
+     *
+     * @param id
+     * @return
+     */
+    @GetMapping(value = "/study/{id}")
+    public R findOne(@PathVariable("id") String id) {
+        QueryWrapper<Projectstudy> qw = new QueryWrapper<>();
+        qw.eq("id", id);
+        Projectstudy Inverter = projectstudyService.getOne(qw);
+        if (StringUtils.isNotNull(Inverter)) {
+            return R.ok().data(Inverter);
+        } else {
+            return R.error().data("查询失败!");
+        }
+    }
+
+
+    /**
+     * 插入(批量)
+     *
+     * @param project
+     * @return
+     */
+    @PostMapping(value = "/add")
+    public R addAll(@RequestBody Projectstudy project) {
+
+        boolean b = projectstudyService.saveOrUpdate(project);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("保存失败!");
+        }
+
+    }
+
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @DeleteMapping(value = "/remove-study/{ids}")
+    public R deleteAll(@PathVariable("ids") String ids) {
+        String[] strings = ids.split(",");
+        boolean b = projectstudyService.removeByIds(Arrays.asList(strings));
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("删除失败!");
+        }
+    }
+
+    /**
+     * 批量修改
+     *
+     * @param list
+     * @return
+     */
+    @PutMapping(value = "/editRegions")
+    public R update(@RequestBody List<Projectstudy> list) {
+        boolean b = projectstudyService.updateBatchById(list);
+        if (b) {
+            return R.ok().data(b);
+        } else {
+            return R.error().data("更新失败!");
+        }
+    }
+
+}

+ 3 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/RealtimedatabaseconfigurationController.java

@@ -11,6 +11,7 @@ import javax.annotation.Resource;
 import java.util.Arrays;
 
 /**
+ * 实时库配置
  * <p>
  * 前端控制器
  * </p>
@@ -50,6 +51,7 @@ public class RealtimedatabaseconfigurationController {
 
     /**
      * 批量插入
+     *
      * @param realtimedatabaseconfiguration
      * @return
      */
@@ -65,6 +67,7 @@ public class RealtimedatabaseconfigurationController {
 
     /**
      * 批量删除
+     *
      * @param ids
      * @return
      */

+ 20 - 3
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/RegionController.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gyee.backconfig.config.R;
 import com.gyee.backconfig.model.auto.Region;
+import com.gyee.backconfig.model.auto.Square;
 import com.gyee.backconfig.service.auto.IRegionService;
 import com.gyee.common.model.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -80,17 +81,33 @@ public class RegionController {
      * @param region
      * @return
      */
-    @PostMapping(value = "/save")
+    @PostMapping(value = "/save2")
+    @ResponseBody
     @CrossOrigin(origins = "*", maxAge = 3600)
-    public R addAll(@RequestBody Region region) {
+    public R addAll(@RequestBody List<Region> region) {
+
+        boolean b = regionService.saveBatch(region);
+        if (b) {
+            return R.ok().data("保存成功");
+        } else {
+            return R.error().data("保存失败!");
+        }
+
+    }
 
+    /**
+     * 更新保存
+     * @param region
+     * @return
+     */
+    @PostMapping(value = "/save")
+    public R addAll(@RequestBody Region region) {
         boolean b = regionService.saveOrUpdate(region);
         if (b) {
             return R.ok().data(b);
         } else {
             return R.error().data("保存失败!");
         }
-
     }
 
 

+ 42 - 5
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/WindpowerstationController.java

@@ -7,12 +7,15 @@ import com.gyee.backconfig.config.R;
 import com.gyee.backconfig.model.auto.Windpowerstation;
 import com.gyee.backconfig.service.BackConfigService;
 import com.gyee.backconfig.service.auto.IWindpowerstationService;
+import com.gyee.backconfig.vo.PersisVo;
 import com.gyee.backconfig.vo.WindpowerstationAdmVo;
 import com.gyee.backconfig.vo.Windpowerstationvo;
 import com.gyee.common.model.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -216,16 +219,18 @@ public class WindpowerstationController {
     }
 
 
+
     /**
-     * 查询
+     * 行政管理区域风电场列表
      * @param regionid
      * @param companyid
      * @return
      */
-    @GetMapping(value = "/getList")
-    public R getList(
-                      @RequestParam(value = "regionid",required = false) String regionid,
-                      @RequestParam(value = "companyid",required = false) String companyid){
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    @GetMapping(value = "/getAdmList")
+    public R getAdmList(
+            @RequestParam(value = "regionid",required = false) String regionid,
+            @RequestParam(value = "companyid",required = false) String companyid){
         try {
             List<WindpowerstationAdmVo> list = windpowerstationService.getList(regionid,companyid);
             if (null != list){
@@ -239,6 +244,38 @@ public class WindpowerstationController {
         }
     }
 
+    /**
+     * 场站性能分析
+     * @param station
+     * @param startdate
+     * @param enddate
+     */
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    @GetMapping(value = "/getStationPersis")
+    public R  getStationPersis(
+            @RequestParam(value = "station",required = false) String station,
+            @RequestParam(value = "startdate",required = false) String startdate,
+            @RequestParam(value = "enddate",required = false) String enddate){
+        try {
+
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date startdt = simpleDateFormat.parse(startdate);
+            Date enddt = simpleDateFormat.parse(enddate);
+
+            List<PersisVo> list =   windpowerstationService.getPersis(station,startdt,enddt);
+
+            if (null != list){
+                return R.ok().data(list);
+            }else {
+                return R.error().data("查询失败!");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            return R.error().data("查询失败!");
+        }
+    }
+
+
 
 
 }

+ 1 - 1
web/backmanagerconfig/src/main/java/com/gyee/backconfig/controller/WindpowerstationpointnewController.java

@@ -56,7 +56,7 @@ public class WindpowerstationpointnewController {
 
 
     /**
-     * 根据id查询c
+     * 根据id查询
      *
      * @param id
      * @return

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

@@ -0,0 +1,16 @@
+package com.gyee.backconfig.mapper.auto;
+
+import com.gyee.backconfig.model.auto.Projectstudy;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-25
+ */
+public interface ProjectstudyMapper extends BaseMapper<Projectstudy> {
+
+}

+ 37 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Projectstudy.java

@@ -0,0 +1,37 @@
+package com.gyee.backconfig.model.auto;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Projectstudy extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String projectid;
+
+    private String generatingcapacity;
+
+    private BigDecimal outagehours;
+
+    private String year;
+
+    private String month;
+
+    private String windpower;
+
+
+}

+ 4 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Realtimedatabaseconfiguration.java

@@ -26,6 +26,8 @@ public class Realtimedatabaseconfiguration extends Model {
 
     private String namecmcfg;
 
+    private String namerts;
+
     private String label;
 
     private String windpowerstationid;
@@ -34,6 +36,8 @@ public class Realtimedatabaseconfiguration extends Model {
 
     private String portrts;
 
+    private String porthist;
+
     private String iphist;
 
     private String ipcmcfg;

+ 24 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/model/auto/Region.java

@@ -1,6 +1,7 @@
 package com.gyee.backconfig.model.auto;
 
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -22,50 +23,73 @@ public class Region extends Model {
 
     private static final long serialVersionUID = 1L;
 
+    @TableId("ID")
     private String id;
 
+    @TableField("COMPANYID")
     private String companyid;
 
+    @TableField("NAME")
     private String name;
 
+    @TableField("ANAME")
     private String aname;
 
+    @TableField("WINDCAPACITY")
     private Integer windcapacity;
 
+    @TableField("WINDCAPACITYUNIT")
     private String windcapacityunit;
 
+    @TableField("WINDQUANTITY")
     private Integer windquantity;
 
+    @TableField("CAPACITY")
     private Double capacity;
 
+    @TableField("CAPACITYUNIT")
     private String capacityunit;
 
+    @TableField("QUANTITYJZ")
     private Integer quantityjz;
 
+    @TableField("QUANTITYZC")
     private Integer quantityzc;
 
+    @TableField("JRWINDCAPACITY")
     private Integer jrwindcapacity;
 
+    @TableField("JRWINDCAPACITYUNIT")
     private String jrwindcapacityunit;
 
+    @TableField("JRWINDQUANTITY")
     private Integer jrwindquantity;
 
+    @TableField("JRCAPACITY")
     private Integer jrcapacity;
 
+    @TableField("JRCAPACITYUNIT")
     private String jrcapacityunit;
 
+    @TableField("JRQUANTITYJZ")
     private Integer jrquantityjz;
 
+    @TableField("JRQUANTITYZC")
     private Integer jrquantityzc;
 
+    @TableField("ORDERNUM")
     private Integer ordernum;
 
+    @TableField("WINDNUMBER")
     private Integer windnumber;
 
+    @TableField("NUMBER")
     private Integer  number;
 
+    @TableField("JRWINDNUMBER")
     private Integer  jrwindnumber;
 
+    @TableField("JRNUMBER")
     private Integer  jrnumber;
 
     @TableField(exist = false)

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

@@ -0,0 +1,18 @@
+package com.gyee.backconfig.service.auto;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gyee.backconfig.model.auto.Project;
+import com.gyee.backconfig.model.auto.Projectstudy;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author wang
+ * @since 2022-10-25
+ */
+public interface IProjectstudyService extends IService<Projectstudy> {
+    IPage<Projectstudy> getList(String id, String projectid, String pageNum, String pageSize);
+}

+ 43 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/service/auto/impl/ProjectstudyServiceImpl.java

@@ -0,0 +1,43 @@
+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.Project;
+import com.gyee.backconfig.model.auto.Projectstudy;
+import com.gyee.backconfig.mapper.auto.ProjectstudyMapper;
+import com.gyee.backconfig.service.auto.IProjectstudyService;
+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-10-25
+ */
+@Service
+public class ProjectstudyServiceImpl extends ServiceImpl<ProjectstudyMapper, Projectstudy> implements IProjectstudyService {
+
+    @Override
+    public IPage<Projectstudy> getList(String id, String projectid, String pageNum, String pageSize) {
+        QueryWrapper<Projectstudy> qw = new QueryWrapper<>();
+
+        if (StringUtils.isNotEmpty(id)){
+            qw.eq("id",id);
+        }
+
+        if (StringUtils.isNotEmpty(projectid)){
+            qw.like("projectid",projectid);
+        }
+
+        Page<Projectstudy> page = new Page<>(Integer.parseInt(pageNum),Integer.parseInt(pageSize));
+        IPage<Projectstudy> companysPage = getBaseMapper().selectPage(page, qw);
+//        List<Project> list = companysPage.getRecords();
+
+        return companysPage;
+    }
+}

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

@@ -159,24 +159,31 @@ public class WindpowerstationServiceImpl extends ServiceImpl<WindpowerstationMap
     }
 
     @Override
-    public List<PersisVo> getPersis(String station , Date startdate, Date enddate) throws Exception {
+    public List<PersisVo> getPersis(String station, Date startdate, Date enddate) throws Exception {
 
+
+        List<PersisVo> list = new ArrayList<>();
         String wpString = redisService.get(station);
         Map<String, Windpowerstationpointnew> stringMapMap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Windpowerstationpointnew>>() {
-
         });
-        if(null !=stringMapMap){
+        if (null != stringMapMap) {
             String fs = stringMapMap.get("RPJFS").getCode();//日平局风速
-            List<PointData> fss =   goldenUtil.getHistoryDatasSnap(fs,startdate.getTime()*1000,enddate.getTime()*1000,null,30L);
+            List<PointData> fss = goldenUtil.getHistoryDatasSnap(fs, startdate.getTime(), enddate.getTime(), null, 60000L);
             String gl = stringMapMap.get("SSZGL").getCode();//功率
-            List<PointData> gls =   goldenUtil.getHistoryDatasSnap(gl,startdate.getTime()*1000,enddate.getTime()*1000,null,30L);
-            if(!fss.isEmpty() && !gls.isEmpty()){
-
+            List<PointData> gls = goldenUtil.getHistoryDatasSnap(gl, startdate.getTime(), enddate.getTime(), null, 60000L);
+            if (!fss.isEmpty() && !gls.isEmpty()) {
+
+                for (int i =0; i <= fss.size()-1; i++) {
+                    PersisVo vo = new PersisVo();
+                    vo.setDatatime(fss.get(i).getPointTime());
+                    vo.setRpjfs(fss.get(i).getPointValueInDouble());
+                    vo.setSszgl(gls.get(i).getPointValueInDouble());
+                    list.add(vo);
+                }
             }
         }
 
-
-        return null;
+        return list;
     }
 
 

+ 8 - 0
web/backmanagerconfig/src/main/java/com/gyee/backconfig/vo/PersisVo.java

@@ -1,4 +1,12 @@
 package com.gyee.backconfig.vo;
 
+
+import lombok.Data;
+
+@Data
 public class PersisVo {
+
+    private long datatime;//时间戳
+    private double rpjfs;//风速
+    private double sszgl;//功率
 }

+ 10 - 10
web/gdsx-ghost/src/main/java/com/gyee/ghost/config/GeneratorCodeConfig.java

@@ -48,11 +48,11 @@ public class GeneratorCodeConfig {
 
         // 数据源配置
         DataSourceConfig dsc = new DataSourceConfig();
-//        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
-//        dsc.setDriverName("com.mysql.jdbc.Driver");
-//        dsc.setUsername("root");
-//        dsc.setPassword("root");
-//        mpg.setDataSource(dsc);
+        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
+        dsc.setDriverName("com.mysql.jdbc.Driver");
+        dsc.setUsername("root");
+        dsc.setPassword("root");
+        mpg.setDataSource(dsc);
 
 //        dsc.setDriverName("oracle.jdbc.driver.OracleDriver");
 //        dsc.setUsername("gdprod");
@@ -60,11 +60,11 @@ public class GeneratorCodeConfig {
 //        dsc.setUrl("jdbc:oracle:thin:@10.83.68.165:1521:gdsj");
 //        mpg.setDataSource(dsc);
 
-        dsc.setDriverName("org.postgresql.Driver");
-        dsc.setUsername("gdprod");
-        dsc.setPassword("gd123");
-        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/wisdom");
-        mpg.setDataSource(dsc);
+//        dsc.setDriverName("org.postgresql.Driver");
+//        dsc.setUsername("gdprod");
+//        dsc.setPassword("gd123");
+//        dsc.setUrl("jdbc:postgresql://10.81.3.151:5432/wisdom");
+//        mpg.setDataSource(dsc);
 
 
 

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconStationStatusmxController.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@RestController
+@RequestMapping("//pro-econ-station-statusmx")
+public class ProEconStationStatusmxController {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconStatusmxController.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@RestController
+@RequestMapping("//pro-econ-statusmx")
+public class ProEconStatusmxController {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ProEconWindturbineStatus2Controller.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@RestController
+@RequestMapping("//pro-econ-windturbine-status2")
+public class ProEconWindturbineStatus2Controller {
+
+}

+ 23 - 2
web/gdsx-ghost/src/main/java/com/gyee/ghost/init/CacheContext.java

@@ -3,7 +3,9 @@ package com.gyee.ghost.init;
 
 
 import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.DateUtils;
 import com.gyee.ghost.model.auto.*;
+import com.gyee.ghost.service.RealtimeService;
 import com.gyee.ghost.service.auto.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -27,7 +29,8 @@ import java.util.Map;
 public class CacheContext implements CommandLineRunner {
 
 
-
+    @Resource
+    private RealtimeService realtimeService;
     @Resource
     private IWindturbineService windturbineService;
     @Resource
@@ -42,6 +45,8 @@ public class CacheContext implements CommandLineRunner {
     private IFreedomService freedomService;
     @Resource
     private IEquipmentmodelService equipmentmodelService;
+    @Resource
+    private IProEconStatusmxService proEconStatusmxService;
 
     public static List<Windturbine> wtls = new ArrayList<>();
     public static Map<String,Windturbine> wtmap = new HashMap<>();
@@ -51,7 +56,9 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String,String> stopmap = new HashMap<>();
 
     public static Map<String,Map<String, Windturbinetestingpointai>> wtpAimap = new HashMap();
-    public static Map<String,Double> wtcap = new HashMap();
+    public static Map<String,Double> wtcap = new HashMap<>();
+
+    public static Map<Integer,String> statusmxMap = new HashMap<>();
 
 //    public static Map<String,String> freedomMap = new HashMap<>();
 
@@ -99,9 +106,23 @@ public class CacheContext implements CommandLineRunner {
             promap.put(project.getId(),project);
         });
 
+        List<ProEconStatusmx> statusmxList = proEconStatusmxService.list();
+        statusmxList.stream().forEach(mx->{
+            statusmxMap.put(mx.getId(),mx.getName());
+        });
+
 //        List<Freedom> freedoms = freedomService.list();
 //        freedoms.stream().forEach(f->{
 //            freedomMap.put(f.getId(),f.getName());
 //        });
+
+
+//        String yesterday = DateUtils.getYesterdayStr("yyyy-MM-dd");
+//        try {
+////            realtimeService.saveWindturbineStatus2();
+//            realtimeService.saveWindstationStatus(yesterday,yesterday);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
     }
 }

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconStationStatusmxMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.mapper.auto;
+
+import com.gyee.ghost.model.auto.ProEconStationStatusmx;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface ProEconStationStatusmxMapper extends BaseMapper<ProEconStationStatusmx> {
+
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconStatusmxMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.mapper.auto;
+
+import com.gyee.ghost.model.auto.ProEconStatusmx;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface ProEconStatusmxMapper extends BaseMapper<ProEconStatusmx> {
+
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/ProEconWindturbineStatus2Mapper.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.mapper.auto;
+
+import com.gyee.ghost.model.auto.ProEconWindturbineStatus2;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface ProEconWindturbineStatus2Mapper extends BaseMapper<ProEconWindturbineStatus2> {
+
+}

+ 62 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconStationStatusmx.java

@@ -0,0 +1,62 @@
+package com.gyee.ghost.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 java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconStationStatusmx extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    @TableField("windPowerStation_Id")
+    private String windpowerstationId;
+
+    @TableField("windTurbine_Id")
+    private String windturbineId;
+
+    @TableField("recorddate")
+    private Date recorddate;
+
+
+
+    @TableField("stop_Hours")
+    private Double stopHours;
+
+    @TableField("loss_Power")
+    private Double lossPower;
+
+
+
+    @TableField("project_Id")
+    private String projectId;
+
+    @TableField("satus_Code")
+    private Integer satusCode;
+
+    @TableField("status_Desc")
+    private String statusDesc;
+    @TableField("avg_speed")
+    private Double avgSpeed;
+
+
+}

+ 26 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconStatusmx.java

@@ -0,0 +1,26 @@
+package com.gyee.ghost.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconStatusmx extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private Integer id;
+
+    private String name;
+
+
+}

+ 63 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/ProEconWindturbineStatus2.java

@@ -0,0 +1,63 @@
+package com.gyee.ghost.model.auto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ProEconWindturbineStatus2 extends Model {
+
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "ID",type = IdType.INPUT)
+    private String id;
+
+    @TableField("windPowerStation_Id")
+    private String windpowerstationId;
+
+    @TableField("windTurbine_Id")
+    private String windturbineId;
+
+    @TableField("stop_Time")
+    private Date stopTime;
+
+    @TableField("start_Time")
+    private Date startTime;
+
+    @TableField("stop_Hours")
+    private Double stopHours;
+
+    @TableField("loss_Power")
+    private Double lossPower;
+
+    @TableField("shutdown_Event_Id")
+    private String shutdownEventId;
+
+    @TableField("project_Id")
+    private String projectId;
+
+    @TableField("satus_Code")
+    private Integer satusCode;
+
+    @TableField("status_Desc")
+    private String statusDesc;
+
+    private Double speed;
+
+    private Double avgSpeed;
+
+
+}

+ 266 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/RealtimeService.java

@@ -0,0 +1,266 @@
+package com.gyee.ghost.service;/*
+@author   谢生杰
+@date   2022/10/25-10:33
+*/
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.gyee.common.contant.Contant;
+import com.gyee.common.model.PointData;
+import com.gyee.common.model.StringUtils;
+import com.gyee.common.util.CommonUtils;
+import com.gyee.common.util.DateUtils;
+import com.gyee.common.util.DoubleUtils;
+import com.gyee.ghost.init.CacheContext;
+import com.gyee.ghost.model.auto.ProEconStationStatusmx;
+import com.gyee.ghost.model.auto.ProEconWindturbineStatus2;
+import com.gyee.ghost.model.auto.Windturbine;
+import com.gyee.ghost.model.auto.Windturbinetestingpointai;
+import com.gyee.ghost.service.auto.IProEconStationStatusmxService;
+import com.gyee.ghost.service.auto.IProEconStatusmxService;
+import com.gyee.ghost.service.auto.IProEconWindturbineStatus2Service;
+import com.gyee.ghost.util.realtimesource.IEdosUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.annotations.Update;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Service
+@Slf4j
+public class RealtimeService {
+
+    @Resource
+    private IProEconWindturbineStatus2Service proEconWindturbineStatus2Service;
+    @Resource
+    private IProEconStationStatusmxService proEconStationStatusmxService;
+    @Resource
+    private IEdosUtil edosUtil;
+
+    public void saveWindturbineStatus2() {
+
+        List<ProEconWindturbineStatus2> resultList = new ArrayList<>();
+
+        List<Windturbine> wtls = CacheContext.wtls;
+        Map<Integer, String> statusmxMap = CacheContext.statusmxMap;
+
+        Map<String, Map<String, Windturbinetestingpointai>> wtpAimap = CacheContext.wtpAimap;
+
+        Date samedayZero = DateUtils.getSamedayZero();
+        Date currentDate = DateUtils.getCurrentDate();
+//        Date befroeDate = DateUtils.addSeconds(currentDate, -1);
+        Date befroeDate = DateUtils.addMinutes(currentDate,-5);
+
+        wtls.stream().forEach(wt->{
+
+            Map<String, Windturbinetestingpointai> stringWindturbinetestingpointaiMap = wtpAimap.get(wt.getId());
+            Windturbinetestingpointai windturbinetestingpointai = stringWindturbinetestingpointaiMap.get(Contant.ZTMX);
+            Windturbinetestingpointai windturbinetestingpointaifs = stringWindturbinetestingpointaiMap.get(Contant.AI022);
+            try {
+                PointData realData = edosUtil.getRealData(windturbinetestingpointai);
+
+                double aDouble = realData.getPointValueInDouble();
+
+                PointData sectionData = edosUtil.getSectionData(windturbinetestingpointai, befroeDate.getTime());
+                double tempDouble = sectionData.getPointValueInDouble();
+                double speed = edosUtil.getRealData(windturbinetestingpointaifs).getPointValueInDouble();
+                if (aDouble != tempDouble){
+                    ProEconWindturbineStatus2 proEconWindturbineStatus2 = new ProEconWindturbineStatus2();
+                    proEconWindturbineStatus2.setId(CommonUtils.getUUID());
+                    proEconWindturbineStatus2.setWindpowerstationId(wt.getWindpowerstationid());
+                    proEconWindturbineStatus2.setWindturbineId(wt.getId());
+                    proEconWindturbineStatus2.setStopTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                    proEconWindturbineStatus2.setStartTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                    proEconWindturbineStatus2.setStopHours(DateUtils.hoursDiff2(proEconWindturbineStatus2.getStopTime(), proEconWindturbineStatus2.getStartTime()));
+                    proEconWindturbineStatus2.setLossPower(0.0);
+                    proEconWindturbineStatus2.setShutdownEventId("");
+                    proEconWindturbineStatus2.setProjectId(wt.getProjectid());
+                    proEconWindturbineStatus2.setSatusCode(new Double(aDouble).intValue());
+                    proEconWindturbineStatus2.setSpeed(speed);
+                    proEconWindturbineStatus2.setAvgSpeed(0.0);
+                    String statusName = statusmxMap.get(new Double(aDouble).intValue());
+                    proEconWindturbineStatus2.setStatusDesc(statusName);
+                    resultList.add(proEconWindturbineStatus2);
+
+                    QueryWrapper<ProEconWindturbineStatus2> qw = new QueryWrapper<>();
+                    qw.eq("windTurbine_Id",wt.getId());
+                    qw.orderByDesc("start_Time");
+                    ProEconWindturbineStatus2 proEconWindturbineStatus21 = proEconWindturbineStatus2Service.getBaseMapper().selectOne(qw);
+                    if (StringUtils.isNotNull(proEconWindturbineStatus21)){
+                        proEconWindturbineStatus21.setStopTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                        proEconWindturbineStatus21.setLossPower(0.0);
+                        proEconWindturbineStatus21.setSpeed(speed);
+                        proEconWindturbineStatus21.setAvgSpeed(0.0);
+                        resultList.add(proEconWindturbineStatus21);
+                    }
+
+                }else {
+                    QueryWrapper<ProEconWindturbineStatus2> qw = new QueryWrapper<>();
+                    qw.eq("windTurbine_Id",wt.getId());
+                    qw.orderByDesc("start_Time");
+                    ProEconWindturbineStatus2 proEconWindturbineStatus21 = proEconWindturbineStatus2Service.getBaseMapper().selectOne(qw);
+                    if (StringUtils.isNotNull(proEconWindturbineStatus21)){
+                        proEconWindturbineStatus21.setStopTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                        proEconWindturbineStatus21.setStopHours(DateUtils.hoursDiff2(proEconWindturbineStatus21.getStopTime(), proEconWindturbineStatus21.getStartTime()));
+                        proEconWindturbineStatus21.setLossPower(0.0);
+                        proEconWindturbineStatus21.setSpeed(speed);
+                        proEconWindturbineStatus21.setAvgSpeed(0.0);
+                        resultList.add(proEconWindturbineStatus21);
+                    }else{
+                        ProEconWindturbineStatus2 proEconWindturbineStatus2 = new ProEconWindturbineStatus2();
+                        proEconWindturbineStatus2.setId(CommonUtils.getUUID());
+                        proEconWindturbineStatus2.setWindpowerstationId(wt.getWindpowerstationid());
+                        proEconWindturbineStatus2.setWindturbineId(wt.getId());
+                        proEconWindturbineStatus2.setStopTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                        proEconWindturbineStatus2.setStartTime(DateUtils.parseLongToDate(realData.getPointTime()*1000));
+                        proEconWindturbineStatus2.setStopHours(DateUtils.hoursDiff2(proEconWindturbineStatus2.getStopTime(), proEconWindturbineStatus2.getStartTime()));
+                        proEconWindturbineStatus2.setLossPower(0.0);
+                        proEconWindturbineStatus2.setShutdownEventId("");
+                        proEconWindturbineStatus2.setProjectId(wt.getProjectid());
+                        proEconWindturbineStatus2.setSatusCode(new Double(aDouble).intValue());
+                        proEconWindturbineStatus2.setSpeed(speed);
+                        proEconWindturbineStatus2.setAvgSpeed(0.0);
+                        String statusName = statusmxMap.get(new Double(aDouble).intValue());
+                        proEconWindturbineStatus2.setStatusDesc(statusName);
+                        resultList.add(proEconWindturbineStatus2);
+                    }
+
+                }
+
+
+
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+
+        });
+
+        proEconWindturbineStatus2Service.saveOrUpdateBatch(resultList);
+
+    }
+
+    public void saveWindstationStatus(String beginDate,String endDate) {
+        List<ProEconStationStatusmx> resultList = new ArrayList<>();
+        List<String> days = DateUtils.getDays(beginDate, endDate);
+        List<Windturbine> wtls = CacheContext.wtls;
+        Map<Integer, String> statusmxMap = CacheContext.statusmxMap;
+        Set<Integer> status = statusmxMap.keySet();
+
+        Map<String, Map<String, Windturbinetestingpointai>> wtpAimap = CacheContext.wtpAimap;
+
+        Date samedayZero = DateUtils.getSamedayZero();
+        Date currentDate = DateUtils.getCurrentDate();
+//        Date befroeDate = DateUtils.addSeconds(currentDate,-1);
+//        Date befroeDate = DateUtils.addMinutes(currentDate,-5);
+        days.forEach(day->{
+            Date date = DateUtils.parseDate(day);
+            Date addday = DateUtils.addMinutes(date, 1);
+            wtls.stream().forEach(wt->{
+                Map<String, Windturbinetestingpointai> stringWindturbinetestingpointaiMap = wtpAimap.get(wt.getId());
+                Windturbinetestingpointai windturbinetestingpointai = stringWindturbinetestingpointaiMap.get(Contant.ZTMX);
+                Windturbinetestingpointai windturbinetestingpointaifs = stringWindturbinetestingpointaiMap.get(Contant.AI022);
+                try {
+                    List<PointData> historyDatasSnap = edosUtil.getHistoryDatasSnap(windturbinetestingpointai, date.getTime() / 1000, addday.getTime() / 1000, null, 60l);
+                    status.stream().forEach(sta->{
+                        int minutes = historyDatasSnap.stream().filter(i -> i.getPointValueInDouble() == sta).collect(Collectors.toList()).size();
+                        ProEconStationStatusmx proEconStationStatusmx = new ProEconStationStatusmx();
+                        proEconStationStatusmx.setId(CommonUtils.getUUID());
+                        proEconStationStatusmx.setProjectId(wt.getProjectid());
+                        proEconStationStatusmx.setWindpowerstationId(wt.getWindpowerstationid());
+                        proEconStationStatusmx.setWindturbineId(wt.getId());
+                        proEconStationStatusmx.setRecorddate(date);
+                        proEconStationStatusmx.setStopHours(DoubleUtils.keepPrecision(new Double(minutes).intValue()/60,2));
+                        proEconStationStatusmx.setLossPower(0.0);
+                        proEconStationStatusmx.setSatusCode(sta);
+                        proEconStationStatusmx.setStatusDesc(statusmxMap.get(sta));
+                        proEconStationStatusmx.setAvgSpeed(0.0);
+//                        proEconStationStatusmxService.save(proEconStationStatusmx);
+                        resultList.add(proEconStationStatusmx);
+                    });
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+
+            });
+        });
+
+        proEconStationStatusmxService.saveBatch(resultList);
+
+
+
+//        List<Windturbine> wtls = CacheContext.wtls;
+//        Map<Integer, String> statusmxMap = CacheContext.statusmxMap;
+//        Set<Integer> status = statusmxMap.keySet();
+//        List<String> days = DateUtils.getDays(beginDate, endDate);
+//        days.forEach(day->{
+//            Date date = DateUtils.parseDate1(day);
+//            Date addDay = DateUtils.addDays(date, 1);
+//
+//            wtls.stream().forEach(wt->{
+//                QueryWrapper<ProEconWindturbineStatus2> qw = new QueryWrapper<>();
+//                qw.eq("windTurbine_Id",wt.getId());
+//                qw.ge("start_Time",date).lt("start_Time",addDay);
+//                List<ProEconWindturbineStatus2> proEconWindturbineStatus2s = proEconWindturbineStatus2Service.list(qw);
+//                if (StringUtils.isNotNull(proEconWindturbineStatus2s)){
+//                    status.stream().forEach(sta->{
+//                        List<ProEconWindturbineStatus2> collect = proEconWindturbineStatus2s.stream().filter(i -> i.getSatusCode() == sta).collect(Collectors.toList());
+//                        if (StringUtils.isNotNull(collect)){
+//                            double sum = collect.stream().mapToDouble(ProEconWindturbineStatus2::getStopHours).sum();
+//                            ProEconStationStatusmx proEconStationStatusmx = new ProEconStationStatusmx();
+//                            proEconStationStatusmx.setId(CommonUtils.getUUID());
+//                            proEconStationStatusmx.setProjectId(wt.getProjectid());
+//                            proEconStationStatusmx.setWindpowerstationId(wt.getWindpowerstationid());
+//                            proEconStationStatusmx.setWindturbineId(wt.getId());
+//                            proEconStationStatusmx.setRecorddate(date);
+//                            proEconStationStatusmx.setStopHours(sum);
+//                            proEconStationStatusmx.setLossPower(0.0);
+//                            proEconStationStatusmx.setSatusCode(sta);
+//                            proEconStationStatusmx.setStatusDesc(statusmxMap.get(sta));
+//                            proEconStationStatusmx.setAvgSpeed(0.0);
+//                        }else{
+//
+//                        }
+//                    });
+//                }else{
+//
+//                }
+//                qw.clear();
+//                qw.eq("windTurbine_Id",wt.getId());
+//                qw.ge("stop_Time",date).lt("start_Time",addDay);
+//
+//                proEconWindturbineStatus2s.stream().forEach(data->{
+//
+//                });
+//
+//
+//            });
+//
+//        });
+
+
+
+
+
+
+    }
+
+    /**
+     * 获取两日期间日期list
+     *
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    private List<String> getDays(String beginDate, String endDate) {
+        List<String> days = null;
+        if (StringUtils.isNotEmpty(beginDate) && StringUtils.isNotEmpty(endDate)) {
+            days = DateUtils.getDays(beginDate, endDate);
+        } else {
+            days = new ArrayList<>();
+            days.add(DateUtils.getYesterdayStr("yyyy-MM-dd"));
+        }
+        return days;
+    }
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconStationStatusmxService.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.service.auto;
+
+import com.gyee.ghost.model.auto.ProEconStationStatusmx;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface IProEconStationStatusmxService extends IService<ProEconStationStatusmx> {
+
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconStatusmxService.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.service.auto;
+
+import com.gyee.ghost.model.auto.ProEconStatusmx;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface IProEconStatusmxService extends IService<ProEconStatusmx> {
+
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IProEconWindturbineStatus2Service.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.service.auto;
+
+import com.gyee.ghost.model.auto.ProEconWindturbineStatus2;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+public interface IProEconWindturbineStatus2Service extends IService<ProEconWindturbineStatus2> {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconStationStatusmxServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.service.auto.impl;
+
+import com.gyee.ghost.model.auto.ProEconStationStatusmx;
+import com.gyee.ghost.mapper.auto.ProEconStationStatusmxMapper;
+import com.gyee.ghost.service.auto.IProEconStationStatusmxService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Service
+public class ProEconStationStatusmxServiceImpl extends ServiceImpl<ProEconStationStatusmxMapper, ProEconStationStatusmx> implements IProEconStationStatusmxService {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconStatusmxServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.service.auto.impl;
+
+import com.gyee.ghost.model.auto.ProEconStatusmx;
+import com.gyee.ghost.mapper.auto.ProEconStatusmxMapper;
+import com.gyee.ghost.service.auto.IProEconStatusmxService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Service
+public class ProEconStatusmxServiceImpl extends ServiceImpl<ProEconStatusmxMapper, ProEconStatusmx> implements IProEconStatusmxService {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/ProEconWindturbineStatus2ServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.service.auto.impl;
+
+import com.gyee.ghost.model.auto.ProEconWindturbineStatus2;
+import com.gyee.ghost.mapper.auto.ProEconWindturbineStatus2Mapper;
+import com.gyee.ghost.service.auto.IProEconWindturbineStatus2Service;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-10-25
+ */
+@Service
+public class ProEconWindturbineStatus2ServiceImpl extends ServiceImpl<ProEconWindturbineStatus2Mapper, ProEconWindturbineStatus2> implements IProEconWindturbineStatus2Service {
+
+}

+ 26 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/task/SaticScheduleTask.java

@@ -2,6 +2,7 @@ package com.gyee.ghost.task;
 
 
 import com.gyee.common.util.DateUtils;
+import com.gyee.ghost.service.RealtimeService;
 import com.gyee.ghost.service.auto.GhostService;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
@@ -21,6 +22,8 @@ public class SaticScheduleTask {
 
     @Resource
     private GhostService ghostService;
+    @Resource
+    private RealtimeService realtimeService;
 
     /**
      * 风电统计分析
@@ -50,4 +53,27 @@ public class SaticScheduleTask {
     }
 
 
+    //或直接指定时间间隔,例如:5秒
+    @Scheduled(fixedRate=300000)
+    private void status() {
+        try {
+            realtimeService.saveWindturbineStatus2();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Scheduled(cron = "0 0 1 * * ?")
+    //或直接指定时间间隔,例如:5秒
+    //@Scheduled(fixedRate=5000)
+    private void statustj() {
+        String yesterday = DateUtils.getYesterdayStr("yyyy-MM-dd");
+        try {
+            realtimeService.saveWindstationStatus(yesterday,yesterday);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
 }

+ 17 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/EdosUtil.java

@@ -320,6 +320,23 @@ public class EdosUtil implements IEdosUtil {
     }
 
     @Override
+    public PointData getSectionData(Windturbinetestingpointai point, Long date) throws Exception {
+        String rawUrl = baseURL + "/history/section?null=0&tagNames=" + point.getId() + "&ts=" + date;
+
+        ResponseEntity<JSONObject> resp = restTemplate.getForEntity(rawUrl, JSONObject.class);
+        JSONObject jsonArray = resp.getBody();
+        if (StringUtils.isNotEmpty(jsonArray)){
+            List<PointData> list = JsonObjectHelper.phrasePointData(jsonArray);
+            if (list.size() > 0)
+                return list.get(0);
+            else
+                return ErrorRequest.RequestError(point.getCode());
+        } else {
+            return ErrorRequest.RequestError(point.getCode());
+        }
+    }
+
+    @Override
     public List<PointData> getHistoryDatasSnap(Windturbinetestingpointai point, Long beginDate, Long endDate, Long count, Long pried) throws Exception {
         if (point==null){
             System.out.println(1111);

+ 8 - 1
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/IEdosUtil.java

@@ -50,7 +50,14 @@ public interface IEdosUtil {
      * @throws Exception
      */
     public PointData getRealData(Windturbinetestingpointai point) throws Exception;
-
+    /**
+     * 通过风机测点获得测点切面数据
+     * @param point 只是用了code字段,作为唯一标识
+     * @param date 时间
+     * @return
+     * @throws Exception
+     */
+    public PointData getSectionData(Windturbinetestingpointai point,Long date) throws Exception;
     /**
      * 通过风机测点获得历史快照
      * @param point  只是用了id字段,作为唯一标识

+ 1 - 0
web/gdsx-ghost/src/main/resources/application-dev.yml

@@ -106,3 +106,4 @@ db:
   url: http://11.0.118.58:8011/ts
 
 
+

+ 2 - 1
web/gdsx-ghost/src/test/java/com/gyee/ghost/GhostTest.java

@@ -22,6 +22,7 @@ public class GhostTest {
 
     @Test
     public void test1(){
-        ghostService.saveNature("2021-07-01","2021-07-01");
+        double a = 1/2;
+        System.out.println();
     }
 }

+ 96 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/FreedomMapper.java

@@ -0,0 +1,96 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.Freedom;
+import com.gyee.frame.model.auto.FreedomExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface FreedomMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    long countByExample(FreedomExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(FreedomExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int insert(Freedom record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int insertSelective(Freedom record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    List<Freedom> selectByExample(FreedomExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    Freedom selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") Freedom record, @Param("example") FreedomExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") Freedom record, @Param("example") FreedomExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(Freedom record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(Freedom record);
+}

+ 64 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/mapper/auto/RegionPGMapper.java

@@ -0,0 +1,64 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.RegionPG;
+import com.gyee.frame.model.auto.RegionPGExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface RegionPGMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    long countByExample(RegionPGExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(RegionPGExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    int insert(RegionPG record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    int insertSelective(RegionPG record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    List<RegionPG> selectByExample(RegionPGExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") RegionPG record, @Param("example") RegionPGExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") RegionPG record, @Param("example") RegionPGExample example);
+}

+ 79 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/Freedom.java

@@ -0,0 +1,79 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+
+public class Freedom implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column freedom.id
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column freedom.name
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column freedom.id
+     *
+     * @return the value of freedom.id
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column freedom.id
+     *
+     * @param id the value for freedom.id
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column freedom.name
+     *
+     * @return the value of freedom.name
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column freedom.name
+     *
+     * @param name the value for freedom.name
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+}

+ 442 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/FreedomExample.java

@@ -0,0 +1,442 @@
+package com.gyee.frame.model.auto;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FreedomExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public FreedomExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table freedom
+     *
+     * @mbg.generated do_not_delete_during_merge
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table freedom
+     *
+     * @mbg.generated
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 773 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/RegionPG.java

@@ -0,0 +1,773 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class RegionPG implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.id
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.companyid
+     *
+     * @mbg.generated
+     */
+    private String companyid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.name
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.aname
+     *
+     * @mbg.generated
+     */
+    private String aname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.windcapacity
+     *
+     * @mbg.generated
+     */
+    private BigDecimal windcapacity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.windcapacityunit
+     *
+     * @mbg.generated
+     */
+    private String windcapacityunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.windquantity
+     *
+     * @mbg.generated
+     */
+    private Integer windquantity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.capacity
+     *
+     * @mbg.generated
+     */
+    private BigDecimal capacity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.capacityunit
+     *
+     * @mbg.generated
+     */
+    private String capacityunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.quantityjz
+     *
+     * @mbg.generated
+     */
+    private Integer quantityjz;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.quantityzc
+     *
+     * @mbg.generated
+     */
+    private Integer quantityzc;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrwindcapacity
+     *
+     * @mbg.generated
+     */
+    private BigDecimal jrwindcapacity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrwindcapacityunit
+     *
+     * @mbg.generated
+     */
+    private String jrwindcapacityunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrwindquantity
+     *
+     * @mbg.generated
+     */
+    private Integer jrwindquantity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrcapacity
+     *
+     * @mbg.generated
+     */
+    private BigDecimal jrcapacity;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrcapacityunit
+     *
+     * @mbg.generated
+     */
+    private String jrcapacityunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrquantityjz
+     *
+     * @mbg.generated
+     */
+    private Integer jrquantityjz;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrquantityzc
+     *
+     * @mbg.generated
+     */
+    private Integer jrquantityzc;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.ordernum
+     *
+     * @mbg.generated
+     */
+    private Integer ordernum;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.windnumber
+     *
+     * @mbg.generated
+     */
+    private Integer windnumber;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.number
+     *
+     * @mbg.generated
+     */
+    private Integer number;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrwindnumber
+     *
+     * @mbg.generated
+     */
+    private Integer jrwindnumber;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column region.jrnumber
+     *
+     * @mbg.generated
+     */
+    private Integer jrnumber;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table region
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.id
+     *
+     * @return the value of region.id
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.id
+     *
+     * @param id the value for region.id
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.companyid
+     *
+     * @return the value of region.companyid
+     *
+     * @mbg.generated
+     */
+    public String getCompanyid() {
+        return companyid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.companyid
+     *
+     * @param companyid the value for region.companyid
+     *
+     * @mbg.generated
+     */
+    public void setCompanyid(String companyid) {
+        this.companyid = companyid == null ? null : companyid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.name
+     *
+     * @return the value of region.name
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.name
+     *
+     * @param name the value for region.name
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.aname
+     *
+     * @return the value of region.aname
+     *
+     * @mbg.generated
+     */
+    public String getAname() {
+        return aname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.aname
+     *
+     * @param aname the value for region.aname
+     *
+     * @mbg.generated
+     */
+    public void setAname(String aname) {
+        this.aname = aname == null ? null : aname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.windcapacity
+     *
+     * @return the value of region.windcapacity
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getWindcapacity() {
+        return windcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.windcapacity
+     *
+     * @param windcapacity the value for region.windcapacity
+     *
+     * @mbg.generated
+     */
+    public void setWindcapacity(BigDecimal windcapacity) {
+        this.windcapacity = windcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.windcapacityunit
+     *
+     * @return the value of region.windcapacityunit
+     *
+     * @mbg.generated
+     */
+    public String getWindcapacityunit() {
+        return windcapacityunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.windcapacityunit
+     *
+     * @param windcapacityunit the value for region.windcapacityunit
+     *
+     * @mbg.generated
+     */
+    public void setWindcapacityunit(String windcapacityunit) {
+        this.windcapacityunit = windcapacityunit == null ? null : windcapacityunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.windquantity
+     *
+     * @return the value of region.windquantity
+     *
+     * @mbg.generated
+     */
+    public Integer getWindquantity() {
+        return windquantity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.windquantity
+     *
+     * @param windquantity the value for region.windquantity
+     *
+     * @mbg.generated
+     */
+    public void setWindquantity(Integer windquantity) {
+        this.windquantity = windquantity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.capacity
+     *
+     * @return the value of region.capacity
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getCapacity() {
+        return capacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.capacity
+     *
+     * @param capacity the value for region.capacity
+     *
+     * @mbg.generated
+     */
+    public void setCapacity(BigDecimal capacity) {
+        this.capacity = capacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.capacityunit
+     *
+     * @return the value of region.capacityunit
+     *
+     * @mbg.generated
+     */
+    public String getCapacityunit() {
+        return capacityunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.capacityunit
+     *
+     * @param capacityunit the value for region.capacityunit
+     *
+     * @mbg.generated
+     */
+    public void setCapacityunit(String capacityunit) {
+        this.capacityunit = capacityunit == null ? null : capacityunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.quantityjz
+     *
+     * @return the value of region.quantityjz
+     *
+     * @mbg.generated
+     */
+    public Integer getQuantityjz() {
+        return quantityjz;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.quantityjz
+     *
+     * @param quantityjz the value for region.quantityjz
+     *
+     * @mbg.generated
+     */
+    public void setQuantityjz(Integer quantityjz) {
+        this.quantityjz = quantityjz;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.quantityzc
+     *
+     * @return the value of region.quantityzc
+     *
+     * @mbg.generated
+     */
+    public Integer getQuantityzc() {
+        return quantityzc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.quantityzc
+     *
+     * @param quantityzc the value for region.quantityzc
+     *
+     * @mbg.generated
+     */
+    public void setQuantityzc(Integer quantityzc) {
+        this.quantityzc = quantityzc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrwindcapacity
+     *
+     * @return the value of region.jrwindcapacity
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getJrwindcapacity() {
+        return jrwindcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrwindcapacity
+     *
+     * @param jrwindcapacity the value for region.jrwindcapacity
+     *
+     * @mbg.generated
+     */
+    public void setJrwindcapacity(BigDecimal jrwindcapacity) {
+        this.jrwindcapacity = jrwindcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrwindcapacityunit
+     *
+     * @return the value of region.jrwindcapacityunit
+     *
+     * @mbg.generated
+     */
+    public String getJrwindcapacityunit() {
+        return jrwindcapacityunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrwindcapacityunit
+     *
+     * @param jrwindcapacityunit the value for region.jrwindcapacityunit
+     *
+     * @mbg.generated
+     */
+    public void setJrwindcapacityunit(String jrwindcapacityunit) {
+        this.jrwindcapacityunit = jrwindcapacityunit == null ? null : jrwindcapacityunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrwindquantity
+     *
+     * @return the value of region.jrwindquantity
+     *
+     * @mbg.generated
+     */
+    public Integer getJrwindquantity() {
+        return jrwindquantity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrwindquantity
+     *
+     * @param jrwindquantity the value for region.jrwindquantity
+     *
+     * @mbg.generated
+     */
+    public void setJrwindquantity(Integer jrwindquantity) {
+        this.jrwindquantity = jrwindquantity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrcapacity
+     *
+     * @return the value of region.jrcapacity
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getJrcapacity() {
+        return jrcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrcapacity
+     *
+     * @param jrcapacity the value for region.jrcapacity
+     *
+     * @mbg.generated
+     */
+    public void setJrcapacity(BigDecimal jrcapacity) {
+        this.jrcapacity = jrcapacity;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrcapacityunit
+     *
+     * @return the value of region.jrcapacityunit
+     *
+     * @mbg.generated
+     */
+    public String getJrcapacityunit() {
+        return jrcapacityunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrcapacityunit
+     *
+     * @param jrcapacityunit the value for region.jrcapacityunit
+     *
+     * @mbg.generated
+     */
+    public void setJrcapacityunit(String jrcapacityunit) {
+        this.jrcapacityunit = jrcapacityunit == null ? null : jrcapacityunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrquantityjz
+     *
+     * @return the value of region.jrquantityjz
+     *
+     * @mbg.generated
+     */
+    public Integer getJrquantityjz() {
+        return jrquantityjz;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrquantityjz
+     *
+     * @param jrquantityjz the value for region.jrquantityjz
+     *
+     * @mbg.generated
+     */
+    public void setJrquantityjz(Integer jrquantityjz) {
+        this.jrquantityjz = jrquantityjz;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrquantityzc
+     *
+     * @return the value of region.jrquantityzc
+     *
+     * @mbg.generated
+     */
+    public Integer getJrquantityzc() {
+        return jrquantityzc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrquantityzc
+     *
+     * @param jrquantityzc the value for region.jrquantityzc
+     *
+     * @mbg.generated
+     */
+    public void setJrquantityzc(Integer jrquantityzc) {
+        this.jrquantityzc = jrquantityzc;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.ordernum
+     *
+     * @return the value of region.ordernum
+     *
+     * @mbg.generated
+     */
+    public Integer getOrdernum() {
+        return ordernum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.ordernum
+     *
+     * @param ordernum the value for region.ordernum
+     *
+     * @mbg.generated
+     */
+    public void setOrdernum(Integer ordernum) {
+        this.ordernum = ordernum;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.windnumber
+     *
+     * @return the value of region.windnumber
+     *
+     * @mbg.generated
+     */
+    public Integer getWindnumber() {
+        return windnumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.windnumber
+     *
+     * @param windnumber the value for region.windnumber
+     *
+     * @mbg.generated
+     */
+    public void setWindnumber(Integer windnumber) {
+        this.windnumber = windnumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.number
+     *
+     * @return the value of region.number
+     *
+     * @mbg.generated
+     */
+    public Integer getNumber() {
+        return number;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.number
+     *
+     * @param number the value for region.number
+     *
+     * @mbg.generated
+     */
+    public void setNumber(Integer number) {
+        this.number = number;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrwindnumber
+     *
+     * @return the value of region.jrwindnumber
+     *
+     * @mbg.generated
+     */
+    public Integer getJrwindnumber() {
+        return jrwindnumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrwindnumber
+     *
+     * @param jrwindnumber the value for region.jrwindnumber
+     *
+     * @mbg.generated
+     */
+    public void setJrwindnumber(Integer jrwindnumber) {
+        this.jrwindnumber = jrwindnumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column region.jrnumber
+     *
+     * @return the value of region.jrnumber
+     *
+     * @mbg.generated
+     */
+    public Integer getJrnumber() {
+        return jrnumber;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column region.jrnumber
+     *
+     * @param jrnumber the value for region.jrnumber
+     *
+     * @mbg.generated
+     */
+    public void setJrnumber(Integer jrnumber) {
+        this.jrnumber = jrnumber;
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1763 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/auto/RegionPGExample.java


+ 224 - 0
web/monitor-web-sxjn/src/main/resources/mybatis/auto/FreedomMapper.xml

@@ -0,0 +1,224 @@
+<?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.gyee.frame.mapper.auto.FreedomMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Freedom">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, name
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.FreedomExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from freedom
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from freedom
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from freedom
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.FreedomExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from freedom
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Freedom">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into freedom (id, name)
+    values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Freedom">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into freedom
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.FreedomExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from freedom
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update freedom
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update freedom
+    set id = #{record.id,jdbcType=VARCHAR},
+      name = #{record.name,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Freedom">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update freedom
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Freedom">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update freedom
+    set name = #{name,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 432 - 0
web/monitor-web-sxjn/src/main/resources/mybatis/auto/RegionPGMapper.xml

@@ -0,0 +1,432 @@
+<?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.gyee.frame.mapper.auto.RegionPGMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.RegionPG">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <result column="id" jdbcType="VARCHAR" property="id" />
+    <result column="companyid" jdbcType="VARCHAR" property="companyid" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="aname" jdbcType="VARCHAR" property="aname" />
+    <result column="windcapacity" jdbcType="NUMERIC" property="windcapacity" />
+    <result column="windcapacityunit" jdbcType="VARCHAR" property="windcapacityunit" />
+    <result column="windquantity" jdbcType="INTEGER" property="windquantity" />
+    <result column="capacity" jdbcType="NUMERIC" property="capacity" />
+    <result column="capacityunit" jdbcType="VARCHAR" property="capacityunit" />
+    <result column="quantityjz" jdbcType="INTEGER" property="quantityjz" />
+    <result column="quantityzc" jdbcType="INTEGER" property="quantityzc" />
+    <result column="jrwindcapacity" jdbcType="NUMERIC" property="jrwindcapacity" />
+    <result column="jrwindcapacityunit" jdbcType="VARCHAR" property="jrwindcapacityunit" />
+    <result column="jrwindquantity" jdbcType="INTEGER" property="jrwindquantity" />
+    <result column="jrcapacity" jdbcType="NUMERIC" property="jrcapacity" />
+    <result column="jrcapacityunit" jdbcType="VARCHAR" property="jrcapacityunit" />
+    <result column="jrquantityjz" jdbcType="INTEGER" property="jrquantityjz" />
+    <result column="jrquantityzc" jdbcType="INTEGER" property="jrquantityzc" />
+    <result column="ordernum" jdbcType="INTEGER" property="ordernum" />
+    <result column="windnumber" jdbcType="INTEGER" property="windnumber" />
+    <result column="number" jdbcType="INTEGER" property="number" />
+    <result column="jrwindnumber" jdbcType="INTEGER" property="jrwindnumber" />
+    <result column="jrnumber" jdbcType="INTEGER" property="jrnumber" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    id, companyid, name, aname, windcapacity, windcapacityunit, windquantity, capacity, 
+    capacityunit, quantityjz, quantityzc, jrwindcapacity, jrwindcapacityunit, jrwindquantity, 
+    jrcapacity, jrcapacityunit, jrquantityjz, jrquantityzc, ordernum, windnumber, number, 
+    jrwindnumber, jrnumber
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.RegionPGExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.RegionPGExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.RegionPG">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into region (id, companyid, name, 
+      aname, windcapacity, windcapacityunit, 
+      windquantity, capacity, capacityunit, 
+      quantityjz, quantityzc, jrwindcapacity, 
+      jrwindcapacityunit, jrwindquantity, jrcapacity, 
+      jrcapacityunit, jrquantityjz, jrquantityzc, 
+      ordernum, windnumber, number, 
+      jrwindnumber, jrnumber)
+    values (#{id,jdbcType=VARCHAR}, #{companyid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{aname,jdbcType=VARCHAR}, #{windcapacity,jdbcType=NUMERIC}, #{windcapacityunit,jdbcType=VARCHAR}, 
+      #{windquantity,jdbcType=INTEGER}, #{capacity,jdbcType=NUMERIC}, #{capacityunit,jdbcType=VARCHAR}, 
+      #{quantityjz,jdbcType=INTEGER}, #{quantityzc,jdbcType=INTEGER}, #{jrwindcapacity,jdbcType=NUMERIC}, 
+      #{jrwindcapacityunit,jdbcType=VARCHAR}, #{jrwindquantity,jdbcType=INTEGER}, #{jrcapacity,jdbcType=NUMERIC}, 
+      #{jrcapacityunit,jdbcType=VARCHAR}, #{jrquantityjz,jdbcType=INTEGER}, #{jrquantityzc,jdbcType=INTEGER}, 
+      #{ordernum,jdbcType=INTEGER}, #{windnumber,jdbcType=INTEGER}, #{number,jdbcType=INTEGER}, 
+      #{jrwindnumber,jdbcType=INTEGER}, #{jrnumber,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.RegionPG">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into region
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="companyid != null">
+        companyid,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="aname != null">
+        aname,
+      </if>
+      <if test="windcapacity != null">
+        windcapacity,
+      </if>
+      <if test="windcapacityunit != null">
+        windcapacityunit,
+      </if>
+      <if test="windquantity != null">
+        windquantity,
+      </if>
+      <if test="capacity != null">
+        capacity,
+      </if>
+      <if test="capacityunit != null">
+        capacityunit,
+      </if>
+      <if test="quantityjz != null">
+        quantityjz,
+      </if>
+      <if test="quantityzc != null">
+        quantityzc,
+      </if>
+      <if test="jrwindcapacity != null">
+        jrwindcapacity,
+      </if>
+      <if test="jrwindcapacityunit != null">
+        jrwindcapacityunit,
+      </if>
+      <if test="jrwindquantity != null">
+        jrwindquantity,
+      </if>
+      <if test="jrcapacity != null">
+        jrcapacity,
+      </if>
+      <if test="jrcapacityunit != null">
+        jrcapacityunit,
+      </if>
+      <if test="jrquantityjz != null">
+        jrquantityjz,
+      </if>
+      <if test="jrquantityzc != null">
+        jrquantityzc,
+      </if>
+      <if test="ordernum != null">
+        ordernum,
+      </if>
+      <if test="windnumber != null">
+        windnumber,
+      </if>
+      <if test="number != null">
+        number,
+      </if>
+      <if test="jrwindnumber != null">
+        jrwindnumber,
+      </if>
+      <if test="jrnumber != null">
+        jrnumber,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null">
+        #{companyid,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="aname != null">
+        #{aname,jdbcType=VARCHAR},
+      </if>
+      <if test="windcapacity != null">
+        #{windcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="windcapacityunit != null">
+        #{windcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="windquantity != null">
+        #{windquantity,jdbcType=INTEGER},
+      </if>
+      <if test="capacity != null">
+        #{capacity,jdbcType=NUMERIC},
+      </if>
+      <if test="capacityunit != null">
+        #{capacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="quantityjz != null">
+        #{quantityjz,jdbcType=INTEGER},
+      </if>
+      <if test="quantityzc != null">
+        #{quantityzc,jdbcType=INTEGER},
+      </if>
+      <if test="jrwindcapacity != null">
+        #{jrwindcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="jrwindcapacityunit != null">
+        #{jrwindcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="jrwindquantity != null">
+        #{jrwindquantity,jdbcType=INTEGER},
+      </if>
+      <if test="jrcapacity != null">
+        #{jrcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="jrcapacityunit != null">
+        #{jrcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="jrquantityjz != null">
+        #{jrquantityjz,jdbcType=INTEGER},
+      </if>
+      <if test="jrquantityzc != null">
+        #{jrquantityzc,jdbcType=INTEGER},
+      </if>
+      <if test="ordernum != null">
+        #{ordernum,jdbcType=INTEGER},
+      </if>
+      <if test="windnumber != null">
+        #{windnumber,jdbcType=INTEGER},
+      </if>
+      <if test="number != null">
+        #{number,jdbcType=INTEGER},
+      </if>
+      <if test="jrwindnumber != null">
+        #{jrwindnumber,jdbcType=INTEGER},
+      </if>
+      <if test="jrnumber != null">
+        #{jrnumber,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.RegionPGExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from region
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update region
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyid != null">
+        companyid = #{record.companyid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.aname != null">
+        aname = #{record.aname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windcapacity != null">
+        windcapacity = #{record.windcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="record.windcapacityunit != null">
+        windcapacityunit = #{record.windcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windquantity != null">
+        windquantity = #{record.windquantity,jdbcType=INTEGER},
+      </if>
+      <if test="record.capacity != null">
+        capacity = #{record.capacity,jdbcType=NUMERIC},
+      </if>
+      <if test="record.capacityunit != null">
+        capacityunit = #{record.capacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.quantityjz != null">
+        quantityjz = #{record.quantityjz,jdbcType=INTEGER},
+      </if>
+      <if test="record.quantityzc != null">
+        quantityzc = #{record.quantityzc,jdbcType=INTEGER},
+      </if>
+      <if test="record.jrwindcapacity != null">
+        jrwindcapacity = #{record.jrwindcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="record.jrwindcapacityunit != null">
+        jrwindcapacityunit = #{record.jrwindcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.jrwindquantity != null">
+        jrwindquantity = #{record.jrwindquantity,jdbcType=INTEGER},
+      </if>
+      <if test="record.jrcapacity != null">
+        jrcapacity = #{record.jrcapacity,jdbcType=NUMERIC},
+      </if>
+      <if test="record.jrcapacityunit != null">
+        jrcapacityunit = #{record.jrcapacityunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.jrquantityjz != null">
+        jrquantityjz = #{record.jrquantityjz,jdbcType=INTEGER},
+      </if>
+      <if test="record.jrquantityzc != null">
+        jrquantityzc = #{record.jrquantityzc,jdbcType=INTEGER},
+      </if>
+      <if test="record.ordernum != null">
+        ordernum = #{record.ordernum,jdbcType=INTEGER},
+      </if>
+      <if test="record.windnumber != null">
+        windnumber = #{record.windnumber,jdbcType=INTEGER},
+      </if>
+      <if test="record.number != null">
+        number = #{record.number,jdbcType=INTEGER},
+      </if>
+      <if test="record.jrwindnumber != null">
+        jrwindnumber = #{record.jrwindnumber,jdbcType=INTEGER},
+      </if>
+      <if test="record.jrnumber != null">
+        jrnumber = #{record.jrnumber,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update region
+    set id = #{record.id,jdbcType=VARCHAR},
+      companyid = #{record.companyid,jdbcType=VARCHAR},
+      name = #{record.name,jdbcType=VARCHAR},
+      aname = #{record.aname,jdbcType=VARCHAR},
+      windcapacity = #{record.windcapacity,jdbcType=NUMERIC},
+      windcapacityunit = #{record.windcapacityunit,jdbcType=VARCHAR},
+      windquantity = #{record.windquantity,jdbcType=INTEGER},
+      capacity = #{record.capacity,jdbcType=NUMERIC},
+      capacityunit = #{record.capacityunit,jdbcType=VARCHAR},
+      quantityjz = #{record.quantityjz,jdbcType=INTEGER},
+      quantityzc = #{record.quantityzc,jdbcType=INTEGER},
+      jrwindcapacity = #{record.jrwindcapacity,jdbcType=NUMERIC},
+      jrwindcapacityunit = #{record.jrwindcapacityunit,jdbcType=VARCHAR},
+      jrwindquantity = #{record.jrwindquantity,jdbcType=INTEGER},
+      jrcapacity = #{record.jrcapacity,jdbcType=NUMERIC},
+      jrcapacityunit = #{record.jrcapacityunit,jdbcType=VARCHAR},
+      jrquantityjz = #{record.jrquantityjz,jdbcType=INTEGER},
+      jrquantityzc = #{record.jrquantityzc,jdbcType=INTEGER},
+      ordernum = #{record.ordernum,jdbcType=INTEGER},
+      windnumber = #{record.windnumber,jdbcType=INTEGER},
+      number = #{record.number,jdbcType=INTEGER},
+      jrwindnumber = #{record.jrwindnumber,jdbcType=INTEGER},
+      jrnumber = #{record.jrnumber,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+</mapper>