소스 검색

部分实体类修改4

xushili 2 년 전
부모
커밋
5bada7ffde
100개의 변경된 파일2551개의 추가작업 그리고 1177개의 파일을 삭제
  1. 1 2
      common/data/src/main/java/com/gyee/wisdom/common/data/BaseResult.java
  2. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/CodeValue.java
  3. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/DataUtil.java
  4. 19 19
      common/data/src/main/java/com/gyee/wisdom/common/data/RestResponse.java
  5. 1 2
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertRule.java
  6. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alerthistory.java
  7. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlerthistoryNew.java
  8. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alertsnap.java
  9. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertsnapNew.java
  10. 1 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ElectricalTestingPointDI.java
  11. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultHistory.java
  12. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultSnap.java
  13. 9 10
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeLine.java
  14. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeePowerStation.java
  15. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeProject.java
  16. 1 3
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeWindturbine.java
  17. 11 12
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Gyeetopic.java
  18. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ScadaFault.java
  19. 65 52
      common/data/src/main/java/com/gyee/wisdom/common/data/job/model/JobAndTrigger.java
  20. 11 12
      common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/InverterBasicData.java
  21. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/point/ElectricalTestingPoint.java
  22. 1 2
      common/data/src/main/java/com/gyee/wisdom/common/data/point/LevelTypeTestingPoint.java
  23. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/point/PowerStationTestingPoint.java
  24. 227 29
      common/data/src/main/java/com/gyee/wisdom/common/data/point/TestingPoint.java
  25. 57 58
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/BootstrapTreeNode.java
  26. 2 2
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MenuCreateCommand.java
  27. 18 6
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/DataDictionary.java
  28. 10 8
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Menu.java
  29. 61 52
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Resource.java
  30. 21 14
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Role.java
  31. 47 41
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SysLog.java
  32. 7 6
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BaseTsQuery.java
  33. 4 2
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsData.java
  34. 20 14
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsPoint.java
  35. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobTsData.java
  36. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobWriteTsData.java
  37. 2 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanTsData.java
  38. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanWriteTsData.java
  39. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Coordinate.java
  40. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateTsData.java
  41. 10 5
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateWriteTsData.java
  42. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleStatData.java
  43. 4 4
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleTsData.java
  44. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleWriteTsData.java
  45. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/GeneralTsData.java
  46. 2 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/IntegerTsData.java
  47. 0 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Interpolation.java
  48. 4 4
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongTsData.java
  49. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongWriteTsData.java
  50. 4 4
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringTsData.java
  51. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringWriteTsData.java
  52. 1 4
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/websocket/SubscribeMessaage.java
  53. 216 17
      common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/Line.java
  54. 686 18
      common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/PowerStation.java
  55. 292 14
      common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/Project.java
  56. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/enums/ResultCode.java
  57. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/page/Page.java
  58. 1 1
      common/data/src/main/java/com/gyee/wisdom/common/page/PageLink.java
  59. 22 29
      common/utils/src/main/java/com/gyee/wisdom/common/utils/ByteUtil.java
  60. 31 31
      common/utils/src/main/java/com/gyee/wisdom/common/utils/DateUtil.java
  61. 12 12
      common/utils/src/main/java/com/gyee/wisdom/common/utils/EncryptUtil.java
  62. 40 40
      common/utils/src/main/java/com/gyee/wisdom/common/utils/Hex.java
  63. 3 3
      common/utils/src/main/java/com/gyee/wisdom/common/utils/RequestMapToJsonUtil.java
  64. 32 32
      common/utils/src/main/java/com/gyee/wisdom/common/utils/StringUtil.java
  65. 1 1
      electricity/meter/src/main/java/com/gyee/gaia/Bootstrap.java
  66. 0 1
      electricity/meter/src/main/java/com/gyee/gaia/meter/config/NacosConfig.java
  67. 0 1
      electricity/meter/src/main/java/com/gyee/gaia/meter/controller/ConfigController.java
  68. 0 2
      electricity/meter/src/main/java/com/gyee/gaia/meter/controller/NacosController.java
  69. 2 2
      electricity/meter/src/main/java/com/gyee/gaia/meter/job/MyJobHandler.java
  70. 4 3
      state/wind/src/main/java/com/gyee/gaia/Bootstrap.java
  71. 0 1
      state/wind/src/main/java/com/gyee/gaia/state/wind/config/NacosConfig.java
  72. 1 7
      state/wind/src/main/java/com/gyee/gaia/state/wind/controller/ConfigController.java
  73. 0 2
      state/wind/src/main/java/com/gyee/gaia/state/wind/controller/NacosController.java
  74. 0 44
      timeseries/dao-redis-taos/src/main/java/com/gyee/wisdom/dao/redistaos/TaosCovertUtil.java
  75. 22 17
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/config/Knife4jRedisConfiguration.java
  76. 1 1
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/manager/Knife4jRedisManager.java
  77. 10 7
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/register/Knife4jRedisRegister.java
  78. 7 7
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/serializer/CustomFastJsonRedisSerializer.java
  79. 1 1
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/serializer/CustomStringRedisSerializer.java
  80. 28 16
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisBaseUtil.java
  81. 89 61
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisHashUtil.java
  82. 68 47
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisListUtil.java
  83. 130 86
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisSetUtil.java
  84. 103 85
      timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisValUtil.java
  85. 0 15
      timeseries/dao-sql/src/main/java/com/gyee/wisdom/dao/sql/Windturbine/repsoitory/PowerStationRepository.java
  86. 0 44
      timeseries/dao-taos/src/main/java/com/gyee/wisdom/dao/taos/TaosCovertUtil.java
  87. 1 1
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/Bootstrap.java
  88. 5 5
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/configuration/FilePathConfig.java
  89. 4 6
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/controller/thing/CategoryController.java
  90. 9 12
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/controller/thing/ElectricalTestingPointController.java
  91. 1 3
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/DataDictionaryService.java
  92. 6 6
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ElectricalTestingPointService.java
  93. 6 8
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/LineService.java
  94. 4 6
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ModelService.java
  95. 9 15
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ProjectService.java
  96. 0 5
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/StationService.java
  97. 21 29
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/help/Constant.java
  98. 2 4
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/infrastructure/config/JsonConfig.java
  99. 35 35
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/runner/SpringStartAfter.java
  100. 0 0
      timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/websocket/PublishConfig.java

+ 1 - 2
common/data/src/main/java/com/gyee/wisdom/common/data/BaseResult.java

@@ -22,7 +22,7 @@ public class BaseResult<T> implements Serializable {
     public BaseResult(boolean success, String error, int code) {
         this.success = success;
         this.error = error;
-        this.code = success?200:code;
+        this.code = success ? 200 : code;
     }
 
     public BaseResult(boolean success, String error) {
@@ -69,7 +69,6 @@ public class BaseResult<T> implements Serializable {
     }
 
 
-
     public int getTotal() {
         return total;
     }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/CodeValue.java

@@ -4,6 +4,6 @@ import lombok.Data;
 
 @Data
 public class CodeValue {
-    private  String Code;
+    private String Code;
     private String Value;
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/DataUtil.java

@@ -6,7 +6,7 @@ import java.util.Optional;
 import java.util.stream.Collectors;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public abstract class DataUtil {
 

+ 19 - 19
common/data/src/main/java/com/gyee/wisdom/common/data/RestResponse.java

@@ -45,38 +45,38 @@ public class RestResponse<T> implements Serializable {
         this.data = data;
     }
 
-    public static RestResponse ok(){
-        RestResponse rep=new RestResponse();
-        rep.success=true;
+    public static RestResponse ok() {
+        RestResponse rep = new RestResponse();
+        rep.success = true;
         return rep;
     }
 
 
-    public static RestResponse ok(Object data){
-        RestResponse rep=new RestResponse();
-        rep.success=true;
-        rep.data=data;
+    public static RestResponse ok(Object data) {
+        RestResponse rep = new RestResponse();
+        rep.success = true;
+        rep.data = data;
         return rep;
     }
 
-    public static RestResponse fail(){
-        RestResponse rep=new RestResponse();
-        rep.success=false;
+    public static RestResponse fail() {
+        RestResponse rep = new RestResponse();
+        rep.success = false;
         return rep;
     }
 
-    public static RestResponse fail(String msg){
-        RestResponse rep=new RestResponse();
-        rep.success=false;
-        rep.msg=msg;
+    public static RestResponse fail(String msg) {
+        RestResponse rep = new RestResponse();
+        rep.success = false;
+        rep.msg = msg;
         return rep;
     }
 
-    public static RestResponse fail(String code, String msg){
-        RestResponse rep=new RestResponse();
-        rep.success=false;
-        rep.msg=msg;
-        rep.code=code;
+    public static RestResponse fail(String code, String msg) {
+        RestResponse rep = new RestResponse();
+        rep.success = false;
+        rep.msg = msg;
+        rep.code = code;
         return rep;
     }
 

+ 1 - 2
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertRule.java

@@ -3,10 +3,9 @@ package com.gyee.wisdom.common.data.alarm;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.Date;
 
 @Data
-public class AlertRule implements Serializable{
+public class AlertRule implements Serializable {
 
     private static final long serialVersionUID = -9116357102786246553L;
 

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alerthistory.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class Alerthistory implements Serializable{
+public class Alerthistory implements Serializable {
 
     private static final long serialVersionUID = -9116357102786246345L;
     private Long id;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlerthistoryNew.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class AlerthistoryNew implements Serializable{
+public class AlerthistoryNew implements Serializable {
 
     private static final long serialVersionUID = -9116357102786246345L;
     private Long id;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alertsnap.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class Alertsnap implements Serializable{
+public class Alertsnap implements Serializable {
     private static final long serialVersionUID = -8348826240826071549L;
     private Long id;
     private String stationId;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertsnapNew.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class AlertsnapNew implements Serializable{
+public class AlertsnapNew implements Serializable {
     private static final long serialVersionUID = -8348826240826071549L;
     private Long id;
     private String stationId;

+ 1 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ElectricalTestingPointDI.java

@@ -3,6 +3,7 @@ package com.gyee.wisdom.common.data.alarm;
 import lombok.Data;
 
 import java.io.Serializable;
+
 @Data
 public class ElectricalTestingPointDI implements Serializable {
     private static final long serialVersionUID = -7009408032434108640L;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultHistory.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class FaultHistory implements Serializable{
+public class FaultHistory implements Serializable {
 
     private static final long serialVersionUID = -9116357102786246345L;
     private Long id;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultSnap.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class FaultSnap implements Serializable{
+public class FaultSnap implements Serializable {
     private static final long serialVersionUID = -8348826240826071549L;
     private Long id;
     private String stationId;

+ 9 - 10
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeLine.java

@@ -3,17 +3,16 @@ package com.gyee.wisdom.common.data.alarm;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.util.List;
 
 @Data
 public class GyeeLine implements Serializable {
-      private String id;
-      private String code;
-      private String name;
-      private String aname;
-      private String projectId;
-      private Integer orderNum;
-      private String capacityUnit;
-      private Double capacity;
-      private Integer quantity;
+    private String id;
+    private String code;
+    private String name;
+    private String aname;
+    private String projectId;
+    private Integer orderNum;
+    private String capacityUnit;
+    private Double capacity;
+    private Integer quantity;
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeePowerStation.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 
 //电场(风场)
 @Data
-public class GyeePowerStation implements Serializable{
+public class GyeePowerStation implements Serializable {
     private String id;
     private String code;
     private String name;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeProject.java

@@ -6,7 +6,7 @@ import java.io.Serializable;
 import java.util.Date;
 
 @Data
-public class GyeeProject implements Serializable{
+public class GyeeProject implements Serializable {
     private String id;
     private String code;
     private String name;

+ 1 - 3
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeWindturbine.java

@@ -1,14 +1,12 @@
 package com.gyee.wisdom.common.data.alarm;
 
-import com.gyee.wisdom.common.data.windturbine.EquipmentModel;
 import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
-import java.util.List;
 
 @Data
-public class GyeeWindturbine implements Serializable{
+public class GyeeWindturbine implements Serializable {
     private String id;
     private String code;
     private String windPowerStationId;

+ 11 - 12
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Gyeetopic.java

@@ -1,21 +1,20 @@
 package com.gyee.wisdom.common.data.alarm;
 
 import lombok.Data;
-import lombok.NoArgsConstructor;
 
 import java.util.Date;
 
 @Data
 public class Gyeetopic {
-private String id;
-private String topic;
-private String thingType;
-private String thingId;
-private String uniformcodes;
-private String description;
-private Integer enabled;
-private Integer dataType;
-private Integer orderNo;
-private Date createTime;
-private String stationId;
+    private String id;
+    private String topic;
+    private String thingType;
+    private String thingId;
+    private String uniformcodes;
+    private String description;
+    private Integer enabled;
+    private Integer dataType;
+    private Integer orderNo;
+    private Date createTime;
+    private String stationId;
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ScadaFault.java

@@ -5,7 +5,7 @@ import lombok.Data;
 import java.io.Serializable;
 
 @Data
-public class ScadaFault implements Serializable{
+public class ScadaFault implements Serializable {
 
     private static final long serialVersionUID = -9116357102786246522L;
     private int id;     //编码

+ 65 - 52
common/data/src/main/java/com/gyee/wisdom/common/data/job/model/JobAndTrigger.java

@@ -4,57 +4,70 @@ import java.io.Serializable;
 
 public class JobAndTrigger implements Serializable {
 
-	private static final long serialVersionUID = 8809101560720973267L;
-
-	private String JOB_NAME;
-	private String JOB_GROUP;
-	private String JOB_CLASS_NAME;
-	private String TRIGGER_NAME;
-	private String TRIGGER_GROUP;
-	private String CRON_EXPRESSION;
-	private String TIME_ZONE_ID;
-
-	public String getJOB_NAME() {
-		return JOB_NAME;
-	}
-	public void setJOB_NAME(String jOB_NAME) {
-		JOB_NAME = jOB_NAME;
-	}
-	public String getJOB_GROUP() {
-		return JOB_GROUP;
-	}
-	public void setJOB_GROUP(String jOB_GROUP) {
-		JOB_GROUP = jOB_GROUP;
-	}
-	public String getJOB_CLASS_NAME() {
-		return JOB_CLASS_NAME;
-	}
-	public void setJOB_CLASS_NAME(String jOB_CLASS_NAME) {
-		JOB_CLASS_NAME = jOB_CLASS_NAME;
-	}
-	public String getTRIGGER_NAME() {
-		return TRIGGER_NAME;
-	}
-	public void setTRIGGER_NAME(String tRIGGER_NAME) {
-		TRIGGER_NAME = tRIGGER_NAME;
-	}
-	public String getTRIGGER_GROUP() {
-		return TRIGGER_GROUP;
-	}
-	public void setTRIGGER_GROUP(String tRIGGER_GROUP) {
-		TRIGGER_GROUP = tRIGGER_GROUP;
-	}
-	public String getCRON_EXPRESSION() {
-		return CRON_EXPRESSION;
-	}
-	public void setCRON_EXPRESSION(String cRON_EXPRESSION) {
-		CRON_EXPRESSION = cRON_EXPRESSION;
-	}
-	public String getTIME_ZONE_ID() {
-		return TIME_ZONE_ID;
-	}
-	public void setTIME_ZONE_ID(String tIME_ZONE_ID) {
-		TIME_ZONE_ID = tIME_ZONE_ID;
-	}
+    private static final long serialVersionUID = 8809101560720973267L;
+
+    private String JOB_NAME;
+    private String JOB_GROUP;
+    private String JOB_CLASS_NAME;
+    private String TRIGGER_NAME;
+    private String TRIGGER_GROUP;
+    private String CRON_EXPRESSION;
+    private String TIME_ZONE_ID;
+
+    public String getJOB_NAME() {
+        return JOB_NAME;
+    }
+
+    public void setJOB_NAME(String jOB_NAME) {
+        JOB_NAME = jOB_NAME;
+    }
+
+    public String getJOB_GROUP() {
+        return JOB_GROUP;
+    }
+
+    public void setJOB_GROUP(String jOB_GROUP) {
+        JOB_GROUP = jOB_GROUP;
+    }
+
+    public String getJOB_CLASS_NAME() {
+        return JOB_CLASS_NAME;
+    }
+
+    public void setJOB_CLASS_NAME(String jOB_CLASS_NAME) {
+        JOB_CLASS_NAME = jOB_CLASS_NAME;
+    }
+
+    public String getTRIGGER_NAME() {
+        return TRIGGER_NAME;
+    }
+
+    public void setTRIGGER_NAME(String tRIGGER_NAME) {
+        TRIGGER_NAME = tRIGGER_NAME;
+    }
+
+    public String getTRIGGER_GROUP() {
+        return TRIGGER_GROUP;
+    }
+
+    public void setTRIGGER_GROUP(String tRIGGER_GROUP) {
+        TRIGGER_GROUP = tRIGGER_GROUP;
+    }
+
+    public String getCRON_EXPRESSION() {
+        return CRON_EXPRESSION;
+    }
+
+    public void setCRON_EXPRESSION(String cRON_EXPRESSION) {
+        CRON_EXPRESSION = cRON_EXPRESSION;
+    }
+
+    public String getTIME_ZONE_ID() {
+        return TIME_ZONE_ID;
+    }
+
+    public void setTIME_ZONE_ID(String tIME_ZONE_ID) {
+        TIME_ZONE_ID = tIME_ZONE_ID;
+    }
 
 }

+ 11 - 12
common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/InverterBasicData.java

@@ -17,18 +17,17 @@ public class InverterBasicData {
     private String id;
     //private String name;
 
-    double I= 0;//电流  (A相电流)
-    double U= 0;//电压 (A相电压)
-    double P= 0;//有功功率
-    double statue =-1;               //状态
-    double ts=0;
+    double I = 0;//电流  (A相电流)
+    double U = 0;//电压 (A相电压)
+    double P = 0;//有功功率
+    double statue = -1;               //状态
+    double ts = 0;
 
-    public InverterBasicData(Inverter inverter)
-    {
-        station=inverter.getStation();
-        project=inverter.getProject();
-        line=inverter.getLine();
-        model=inverter.getModel();
-        id=inverter.getId();
+    public InverterBasicData(Inverter inverter) {
+        station = inverter.getStation();
+        project = inverter.getProject();
+        line = inverter.getLine();
+        model = inverter.getModel();
+        id = inverter.getId();
     }
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/point/ElectricalTestingPoint.java

@@ -5,7 +5,7 @@ import lombok.Data;
 import java.io.Serializable;
 
 /**
- *Author:Wanghs
+ * Author:Wanghs
  */
 
 //电气测点

+ 1 - 2
common/data/src/main/java/com/gyee/wisdom/common/data/point/LevelTypeTestingPoint.java

@@ -3,10 +3,9 @@ package com.gyee.wisdom.common.data.point;
 import lombok.Data;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 /**
- *Author:Wanghs
+ * Author:Wanghs
  */
 
 //风电场抽象测点

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/point/PowerStationTestingPoint.java

@@ -5,7 +5,7 @@ import lombok.Data;
 import java.io.Serializable;
 
 /**
- *Author:Wanghs
+ * Author:Wanghs
  */
 
 @Data

+ 227 - 29
common/data/src/main/java/com/gyee/wisdom/common/data/point/TestingPoint.java

@@ -1,47 +1,245 @@
 package com.gyee.wisdom.common.data.point;
 
-import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 /**
- *Author:Wanghs
+ * <p>
+ * 逻辑测点
+ * </p>
+ *
+ * @author gfhd
+ * @since 2023-04-24
  */
-
-//测点
-@Data
+@TableName("pro_econ_testing_point")
 public class TestingPoint implements Serializable {
 
-    //编号(主键)
+    private static final long serialVersionUID = 1L;
+
     private String id;
-    //编码
+
+    /**
+     * 测点
+     */
     private String code;
-    //名称
+
+    /**
+     * 描述
+     */
     private String name;
-    //型号
+
+    /**
+     * 机型
+     */
     private String model;
-    //单位
-    private String valueUnit;
-    //英文名称
-    private String englishName;
-    //类型编号
+
     private String typeId;
-    //最大值
-    private double maxVal;
-    //最小值
-    private double minVal;
-    //合理最大值
-    private double reasonableMaxVal;
-    //合理最小值
-    private double reasonableMinVal;
-    //风机型号编号
-    private String modelId;
-    //统一编码
+
+    /**
+     * 原始统一编码
+     */
+    private String originalUniformCode;
+
+    /**
+     * 统一编码
+     */
     private String uniformCode;
-    //数据类型
+
+    /**
+     * 统一编码备用
+     */
+    private String ucv1;
+
+    private String ucv2;
+
+    private String ucv3;
+
+    /**
+     * 设备id
+     */
+    private String thingId;
+
+    /**
+     * 场站,风机,部件
+     */
+    private String thingType;
+
+    /**
+     * 数据类型
+     */
     private String dataType;
-    //分类(1遥测、2遥信、3遥调、4遥控、5计算)
-    private int category;
 
+    /**
+     * 场站
+     */
+    private String stationId;
+
+    /**
+     * 部件编号
+     */
+    private String logicalUnitId;
+
+    private Boolean isDisplay;
+
+    private String spare;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getModel() {
+        return model;
+    }
+
+    public void setModel(String model) {
+        this.model = model;
+    }
+
+    public String getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(String typeId) {
+        this.typeId = typeId;
+    }
+
+    public String getOriginalUniformCode() {
+        return originalUniformCode;
+    }
+
+    public void setOriginalUniformCode(String originalUniformCode) {
+        this.originalUniformCode = originalUniformCode;
+    }
+
+    public String getUniformCode() {
+        return uniformCode;
+    }
+
+    public void setUniformCode(String uniformCode) {
+        this.uniformCode = uniformCode;
+    }
+
+    public String getUcv1() {
+        return ucv1;
+    }
+
+    public void setUcv1(String ucv1) {
+        this.ucv1 = ucv1;
+    }
+
+    public String getUcv2() {
+        return ucv2;
+    }
+
+    public void setUcv2(String ucv2) {
+        this.ucv2 = ucv2;
+    }
+
+    public String getUcv3() {
+        return ucv3;
+    }
+
+    public void setUcv3(String ucv3) {
+        this.ucv3 = ucv3;
+    }
+
+    public String getThingId() {
+        return thingId;
+    }
+
+    public void setThingId(String thingId) {
+        this.thingId = thingId;
+    }
+
+    public String getThingType() {
+        return thingType;
+    }
+
+    public void setThingType(String thingType) {
+        this.thingType = thingType;
+    }
+
+    public String getDataType() {
+        return dataType;
+    }
+
+    public void setDataType(String dataType) {
+        this.dataType = dataType;
+    }
+
+    public String getStationId() {
+        return stationId;
+    }
+
+    public void setStationId(String stationId) {
+        this.stationId = stationId;
+    }
+
+    public String getLogicalUnitId() {
+        return logicalUnitId;
+    }
+
+    public void setLogicalUnitId(String logicalUnitId) {
+        this.logicalUnitId = logicalUnitId;
+    }
+
+    public Boolean getIsDisplay() {
+        return isDisplay;
+    }
+
+    public void setIsDisplay(Boolean isDisplay) {
+        this.isDisplay = isDisplay;
+    }
+
+    public String getSpare() {
+        return spare;
+    }
+
+    public void setSpare(String spare) {
+        this.spare = spare;
+    }
+
+    @Override
+    public String toString() {
+        return "TestingPoint{" +
+                "id = " + id +
+                ", code = " + code +
+                ", name = " + name +
+                ", model = " + model +
+                ", typeId = " + typeId +
+                ", originalUniformCode  = " + originalUniformCode +
+                ", uniformCode = " + uniformCode +
+                ", ucv1 = " + ucv1 +
+                ", ucv2 = " + ucv2 +
+                ", ucv3 = " + ucv3 +
+                ", thingId = " + thingId +
+                ", thingType = " + thingType +
+                ", dataType = " + dataType +
+                ", stationId = " + stationId +
+                ", logicalUnitId = " + logicalUnitId +
+                ", isDisplay = " + isDisplay +
+                ", spare = " + spare +
+                "}";
+    }
 }

+ 57 - 58
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/BootstrapTreeNode.java

@@ -4,69 +4,68 @@ import java.util.List;
 
 /**
  * Bootstrap TreeView插件对应的后台数据结构,格式如下:
-{
-  text: "Node 1",
-  icon: "glyphicon glyphicon-stop",
-  selectedIcon: "glyphicon glyphicon-stop",
-  color: "#000000",
-  backColor: "#FFFFFF",
-  href: "#node-1",
-  selectable: true,
-  state: {
-    checked: true,
-    disabled: true,
-    expanded: true,
-    selected: true
-  },
-  tags: ['available'],
-  nodes: [
-    {},
-    ...
-  ]
-}
- * @author northriver
+ * {
+ * text: "Node 1",
+ * icon: "glyphicon glyphicon-stop",
+ * selectedIcon: "glyphicon glyphicon-stop",
+ * color: "#000000",
+ * backColor: "#FFFFFF",
+ * href: "#node-1",
+ * selectable: true,
+ * state: {
+ * checked: true,
+ * disabled: true,
+ * expanded: true,
+ * selected: true
+ * },
+ * tags: ['available'],
+ * nodes: [
+ * {},
+ * ...
+ * ]
+ * }
  *
+ * @author northriver
  */
 public class BootstrapTreeNode {
-	
-	private String id;
-	private String text;
-	private String[] tags;
-	private List<BootstrapTreeNode> nodes;
-	
-	
-	public String getId() {
-		return id;
-	}
 
-	public void setId(String id) {
-		this.id = id;
-	}
+    private String id;
+    private String text;
+    private String[] tags;
+    private List<BootstrapTreeNode> nodes;
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    public String[] getTags() {
+        return tags;
+    }
+
+    public void setTags(String[] tags) {
+        this.tags = tags;
+    }
+
+    public List<BootstrapTreeNode> getNodes() {
+        return nodes;
+    }
 
-	public String getText() {
-		return text;
-	}
-	
-	public void setText(String text) {
-		this.text = text;
-	}
-	
-	public String[] getTags() {
-		return tags;
-	}
-	
-	public void setTags(String[] tags) {
-		this.tags = tags;
-	}
-	
-	public List<BootstrapTreeNode> getNodes() {
-		return nodes;
-	}
-	
-	public void setNodes(List<BootstrapTreeNode> nodes) {
-		this.nodes = nodes;
-	}
+    public void setNodes(List<BootstrapTreeNode> nodes) {
+        this.nodes = nodes;
+    }
 
-	
 
 }

+ 2 - 2
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MenuCreateCommand.java

@@ -10,9 +10,9 @@ public class MenuCreateCommand {
 
     private String label;
 
-    private String path="0";  //父节点的路径与父节点的id路径,用","分开,0表示父节点是根节点
+    private String path = "0";  //父节点的路径与父节点的id路径,用","分开,0表示父节点是根节点
 
-    private int order=1;  //排序
+    private int order = 1;  //排序
 
     private String url;
 

+ 18 - 6
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/DataDictionary.java

@@ -7,16 +7,28 @@ import java.io.Serializable;
 @Data
 public class DataDictionary implements Serializable {
 
-    /** 主键ID */
+    /**
+     * 主键ID
+     */
     private int id;
-    /** 类型 */
+    /**
+     * 类型
+     */
     private String category;
-    /** 编码 */
+    /**
+     * 编码
+     */
     private String code;
-    /** 名称 */
+    /**
+     * 名称
+     */
     private String name;
-    /** 排列顺序 */
+    /**
+     * 排列顺序
+     */
     private int orderNo;
-    /** 是否启用 */
+    /**
+     * 是否启用
+     */
     private boolean enabled;
 }

+ 10 - 8
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Menu.java

@@ -1,7 +1,6 @@
 package com.gyee.wisdom.common.data.system.model;
 
 import lombok.Data;
-import lombok.EqualsAndHashCode;
 
 import java.util.List;
 
@@ -13,7 +12,9 @@ import java.util.List;
 @Data
 public class Menu extends TreeModel {
 
-    /**链接*/
+    /**
+     * 链接
+     */
     private String url;
 
     private int layer;
@@ -28,13 +29,14 @@ public class Menu extends TreeModel {
     public void setUrl(String url) {
         this.url = url;
     }
+
     @Override
-	public int getLayer() {
-		return layer;
-	}
+    public int getLayer() {
+        return layer;
+    }
 
-	public void setLayer(int layer) {
-		this.layer = layer;
-	}
+    public void setLayer(int layer) {
+        this.layer = layer;
+    }
 
 }

+ 61 - 52
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Resource.java

@@ -4,82 +4,91 @@ import java.io.Serializable;
 import java.util.UUID;
 
 /**
- *
  * url资源
  */
 public class Resource implements Serializable {
 
-	/** 唯一资源编码 */
-	private String id = UUID.randomUUID().toString();
+    /**
+     * 唯一资源编码
+     */
+    private String id = UUID.randomUUID().toString();
 
-	/** 资源名称 */
-	private String title;
+    /**
+     * 资源名称
+     */
+    private String title;
 
-	/** 状态 是否禁用*/
-	private boolean disabled;
+    /**
+     * 状态 是否禁用
+     */
+    private boolean disabled;
 
-	/** 地址 */
-	private String url;
+    /**
+     * 地址
+     */
+    private String url;
 
-	/** 描述 */
-	private String description;
+    /**
+     * 描述
+     */
+    private String description;
 
 
-	public String getTitle() {
-		return title;
-	}
+    public String getTitle() {
+        return title;
+    }
 
-	public void setTitle(String title) {
-		this.title = title;
-	}
+    public void setTitle(String title) {
+        this.title = title;
+    }
 
 
-	public boolean isDisabled() {
-		return disabled;
-	}
+    public boolean isDisabled() {
+        return disabled;
+    }
 
-	public void setDisabled(boolean disabled) {
-		this.disabled = disabled;
-	}
+    public void setDisabled(boolean disabled) {
+        this.disabled = disabled;
+    }
 
-	public String getUrl() {
-		return url;
-	}
+    public String getUrl() {
+        return url;
+    }
 
-	public void setUrl(String url) {
-		this.url = url;
-	}
+    public void setUrl(String url) {
+        this.url = url;
+    }
 
-	public String getId() {
-		return id;
-	}
+    public String getId() {
+        return id;
+    }
 
-	public void setId(String id) {
-		this.id = id;
-	}
+    public void setId(String id) {
+        this.id = id;
+    }
 
-	public String getDescription() {
-		return description;
-	}
+    public String getDescription() {
+        return description;
+    }
 
-	public void setDescription(String description) {
-		this.description = description;
-	}
+    public void setDescription(String description) {
+        this.description = description;
+    }
 
 
-	@Override
-	public boolean equals(Object o) {
-		if (this == o) return true;
-		if (o == null || getClass() != o.getClass()) return false;
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
 
-		Resource resource = (Resource) o;
+        Resource resource = (Resource) o;
 
-		return id != null ? id.equals(resource.id) : resource.id == null;
+        return id != null ? id.equals(resource.id) : resource.id == null;
 
-	}
+    }
 
-	@Override
-	public int hashCode() {
-		return id != null ? id.hashCode() : 0;
-	}
+    @Override
+    public int hashCode() {
+        return id != null ? id.hashCode() : 0;
+    }
 }

+ 21 - 14
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Role.java

@@ -6,30 +6,37 @@ import java.io.Serializable;
 import java.util.List;
 
 /**
- *
  * 角色
- *
  */
 @Data
 public class Role implements Serializable {
 
-	private String id ;
+    private String id;
 
-	/** 角色名*/
-	private String name;
+    /**
+     * 角色名
+     */
+    private String name;
 
-	/** 描述 */
-	private String description;
+    /**
+     * 描述
+     */
+    private String description;
 
-	/** 状态 是否禁用*/
-	private boolean disabled;
+    /**
+     * 状态 是否禁用
+     */
+    private boolean disabled;
 
-	/**用户集合*/
-	private List<User> userList;
-
-	/**菜单集合**/
-	private List<Menu> menuList;
+    /**
+     * 用户集合
+     */
+    private List<User> userList;
 
+    /**
+     * 菜单集合
+     **/
+    private List<Menu> menuList;
 
 
 }

+ 47 - 41
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SysLog.java

@@ -4,65 +4,71 @@ import java.io.Serializable;
 import java.util.Date;
 
 /**
- *
  * 操作日志
- *
  */
 public class SysLog implements Serializable {
 
 
-	/** 用户ID */
-	private int uid;
+    /**
+     * 用户ID
+     */
+    private int uid;
 
-	private String user;
+    private String user;
 
-	/** 日志内容 */
-	private String content;
+    /**
+     * 日志内容
+     */
+    private String content;
 
-	/** 用户操作 */
-	private String operation;
+    /**
+     * 用户操作
+     */
+    private String operation;
 
-	/** 创建时间 */
-	private Date createTime;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
 
 
-	public int getUid() {
-		return uid;
-	}
+    public int getUid() {
+        return uid;
+    }
 
-	public void setUid(int uid) {
-		this.uid = uid;
-	}
+    public void setUid(int uid) {
+        this.uid = uid;
+    }
 
-	public String getContent() {
-		return content;
-	}
+    public String getContent() {
+        return content;
+    }
 
-	public void setContent(String content) {
-		this.content = content;
-	}
+    public void setContent(String content) {
+        this.content = content;
+    }
 
-	public String getOperation() {
-		return operation;
-	}
+    public String getOperation() {
+        return operation;
+    }
 
-	public void setOperation(String operation) {
-		this.operation = operation;
-	}
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
 
-	public Date getCreateTime() {
-		return createTime;
-	}
+    public Date getCreateTime() {
+        return createTime;
+    }
 
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
 
-	public String getUser() {
-		return user;
-	}
+    public String getUser() {
+        return user;
+    }
 
-	public void setUser(String user) {
-		this.user = user;
-	}
+    public void setUser(String user) {
+        this.user = user;
+    }
 }

+ 7 - 6
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BaseTsQuery.java

@@ -11,7 +11,7 @@ public class BaseTsQuery implements TsQuery {
     private final long startTs;
     private final long endTs;
     private final int interval;
-    private final int limit ;
+    private final int limit;
     private final Interpolation interpolation;
 
 
@@ -27,20 +27,21 @@ public class BaseTsQuery implements TsQuery {
     public BaseTsQuery(TsPoint tsPoint, long startTs, long endTs) {
         this(tsPoint, startTs, endTs, 1, 1, Interpolation.RAW);
     }
+
     @Override
     public Date[] getDateArray() {
-        if (interpolation == Interpolation.SNAP && startTs > 0 && endTs >0 && interval > 0 && endTs > startTs ) {
-            int count = Math.round ((endTs - startTs)/interval/1000);
+        if (interpolation == Interpolation.SNAP && startTs > 0 && endTs > 0 && interval > 0 && endTs > startTs) {
+            int count = Math.round((endTs - startTs) / interval / 1000);
             int length = count;// <= limit ? count : limit;
             Date[] result = new Date[length];
-            for (int i=0;i<length;i++) {
-                long ts = startTs + (long)i*interval*1000;
+            for (int i = 0; i < length; i++) {
+                long ts = startTs + (long) i * interval * 1000;
                 result[i] = new Date(ts);
             }
 
             return result;
         }
-        return  null;
+        return null;
     }
 
 }

+ 4 - 2
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsData.java

@@ -1,9 +1,9 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
-public abstract class BasicTsData implements TsData, Comparable<BasicTsData>{
+public abstract class BasicTsData implements TsData, Comparable<BasicTsData> {
 
     private final long ts;
 
@@ -13,10 +13,12 @@ public abstract class BasicTsData implements TsData, Comparable<BasicTsData>{
         this.ts = ts;
         this.status = status;
     }
+
     @Override
     public long getTs() {
         return ts;
     }
+
     @Override
     public short getStatus() {
         return status;

+ 20 - 14
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsPoint.java

@@ -3,45 +3,51 @@ package com.gyee.wisdom.common.data.timeseries;
 import lombok.Data;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 @Data
-public class BasicTsPoint implements TsPoint{
+public class BasicTsPoint implements TsPoint {
 
     private final String id;
 
-    private  TsDataType tsDataType;
+    private TsDataType tsDataType;
 
-    private  String thingId;
+    private String thingId;
 
-    private  String thingType;
+    private String thingType;
 
-    private  String uniformCode;
+    private String uniformCode;
 
     private String tag;
 
-    public BasicTsPoint(String id,  TsDataType tsDataType) {
+    public BasicTsPoint(String id, TsDataType tsDataType) {
         this.id = id;
         this.tsDataType = tsDataType;
     }
+
     @Override
-    public String getId() { return id; }
+    public String getId() {
+        return id;
+    }
+
     @Override
-    public TsDataType getTsDataType() {return tsDataType; }
+    public TsDataType getTsDataType() {
+        return tsDataType;
+    }
 
     @Override
-    public String getUniformCode(){
-       return uniformCode;
+    public String getUniformCode() {
+        return uniformCode;
     }
 
 
     @Override
-    public String getThingId(){
+    public String getThingId() {
         return thingId;
     }
 
     @Override
-    public String getThingType(){
+    public String getThingType() {
         return thingType;
     }
 
@@ -54,7 +60,7 @@ public class BasicTsPoint implements TsPoint{
 
 
     @Override
-    public String getTag(){
+    public String getTag() {
         return tag;
     }
 

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobTsData.java

@@ -3,7 +3,7 @@ package com.gyee.wisdom.common.data.timeseries;
 import java.util.Base64;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class BlobTsData extends BasicTsData {
 

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobWriteTsData.java

@@ -13,7 +13,7 @@ import java.util.Base64;
 public class BlobWriteTsData {
     private String tagName;
     private long ts;
-    private  byte[]blob;
+    private byte[] blob;
 
     public String getValue() {
         return Base64.getEncoder().encodeToString(blob);

+ 2 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanTsData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class BooleanTsData extends BasicTsData {
 
@@ -11,6 +11,7 @@ public class BooleanTsData extends BasicTsData {
         super(ts, status);
         this.actualValue = actualValue;
     }
+
     public boolean getBooleanValue() {
         return actualValue;
     }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanWriteTsData.java

@@ -8,7 +8,7 @@ import lombok.Data;
  * @date:2018-05-04
  */
 @Data
-public class BooleanWriteTsData  {
+public class BooleanWriteTsData {
     private String tagName;
     private long ts;
     private boolean actualValue;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Coordinate.java

@@ -4,7 +4,7 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 @Data
 @AllArgsConstructor

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateTsData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class CoordinateTsData extends BasicTsData {
 

+ 10 - 5
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateWriteTsData.java

@@ -8,14 +8,19 @@ import lombok.Data;
  * @date:2018-05-04
  */
 @Data
-public class CoordinateWriteTsData  {
+public class CoordinateWriteTsData {
 
     private String tagName;
     private long ts;
-    private  double latitude;
-    private  double longitude;
+    private double latitude;
+    private double longitude;
 
-    public double getLatitude() { return  latitude ;}
-    public double getLongitude() {return  longitude; }
+    public double getLatitude() {
+        return latitude;
+    }
+
+    public double getLongitude() {
+        return longitude;
+    }
 
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleStatData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class DoubleStatData {
 

+ 4 - 4
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleTsData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class DoubleTsData extends BasicTsData {
 
@@ -17,9 +17,9 @@ public class DoubleTsData extends BasicTsData {
         return actualValue;
     }
 
-//    public String getValue() {
-//        return Double.toString(actualValue);
-//    }
+    //    public String getValue() {
+    //        return Double.toString(actualValue);
+    //    }
 
     @Override
     public String toString() {

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleWriteTsData.java

@@ -8,7 +8,7 @@ import lombok.Data;
  * @date:2018-05-04
  */
 @Data
-public class DoubleWriteTsData  {
+public class DoubleWriteTsData {
     private String tagName;
     private long ts;
     private double actualValue;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/GeneralTsData.java

@@ -7,7 +7,7 @@ import lombok.NoArgsConstructor;
 import java.util.Optional;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 @Data
 @AllArgsConstructor

+ 2 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/IntegerTsData.java

@@ -8,10 +8,12 @@ package com.gyee.wisdom.common.data.timeseries;
 public class IntegerTsData extends BasicTsData {
 
     private final Integer actualValue;
+
     public IntegerTsData(long ts, short status, Integer actualValue) {
         super(ts, status);
         this.actualValue = actualValue;
     }
+
     public Integer getIntegerValue() {
         return actualValue;
     }

+ 0 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Interpolation.java

@@ -1,4 +1,3 @@
-
 package com.gyee.wisdom.common.data.timeseries;
 
 public enum Interpolation {

+ 4 - 4
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongTsData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class LongTsData extends BasicTsData {
 
@@ -16,9 +16,9 @@ public class LongTsData extends BasicTsData {
         return actualValue;
     }
 
-//    public String getValue() {
-//        return Long.toString(actualValue);
-//    }
+    //    public String getValue() {
+    //        return Long.toString(actualValue);
+    //    }
 
 }
 

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongWriteTsData.java

@@ -8,7 +8,7 @@ import lombok.Data;
  * @date:2018-05-04
  */
 @Data
-public class LongWriteTsData  {
+public class LongWriteTsData {
 
     private String tagName;
     private long ts;

+ 4 - 4
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringTsData.java

@@ -1,7 +1,7 @@
 package com.gyee.wisdom.common.data.timeseries;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 public class StringTsData extends BasicTsData {
 
@@ -12,9 +12,9 @@ public class StringTsData extends BasicTsData {
         this.actualValue = actualValue;
     }
 
-//    public String getActualValue() {
-//        return actualValue;
-//    }
+    //    public String getActualValue() {
+    //        return actualValue;
+    //    }
 
     public String getStringValue() {
         return actualValue;

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringWriteTsData.java

@@ -8,7 +8,7 @@ import lombok.Data;
  * @date:2018-05-04
  */
 @Data
-public class StringWriteTsData  {
+public class StringWriteTsData {
     private String tagName;
     private long ts;
     private String actualValue;

+ 1 - 4
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/websocket/SubscribeMessaage.java

@@ -1,8 +1,5 @@
 package com.gyee.wisdom.common.data.timeseries.websocket;
 
-import com.gyee.wisdom.common.data.timeseries.Coordinate;
-import com.gyee.wisdom.common.data.timeseries.TsData;
-import com.gyee.wisdom.common.data.timeseries.TsDataType;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -10,7 +7,7 @@ import lombok.NoArgsConstructor;
 import java.util.Optional;
 
 /**
- * @author songwb<songwb@aliyun.com>
+ * @author songwb<songwb @ aliyun.com>
  */
 @Data
 @AllArgsConstructor

+ 216 - 17
common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/Line.java

@@ -1,23 +1,222 @@
 package com.gyee.wisdom.common.data.windturbine;
 
-import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.List;
-
-@Data
-public class Line  implements Serializable {
-      private String id;
-      private String code;
-      private String name;
-      private String aname;
-      private String projectId;
-      private Integer orderNum;
-      private String capacityUnit;
-      private Double capacity;
-      private Integer quantity;
-      private String stationCode;
-      private List<Windturbine> listwindturbine;
-      private Project project;
+
+/**
+ * <p>
+ * 集电线路
+ * </p>
+ *
+ * @author gfhd
+ * @since 2023-04-23
+ */
+@TableName("pro_basic_line")
+public class Line implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
+    private String id;
+
+    /**
+     * 编码
+     */
+    private String nemCode;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 别名
+     */
+    private String aname;
+
+    /**
+     * 工程编号
+     */
+    private String projectId;
+
+    /**
+     * 顺序
+     */
+    private Integer orderNum;
+
+    /**
+     * 装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 容量单位
+     */
+    private String capacityUnit;
+
+    /**
+     * 装机数量
+     */
+    private Integer quantity;
+
+    /**
+     * 是否可用
+     */
+    private Integer isAble;
+
+    /**
+     * 备用1
+     */
+    private String spare1;
+
+    /**
+     * 备用2
+     */
+    private String spare2;
+
+    /**
+     * 备用3
+     */
+    private String spare3;
+
+    /**
+     * 备用4
+     */
+    private String spare4;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getNemCode() {
+        return nemCode;
+    }
+
+    public void setNemCode(String nemCode) {
+        this.nemCode = nemCode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public BigDecimal getCapacity() {
+        return capacity;
+    }
+
+    public void setCapacity(BigDecimal capacity) {
+        this.capacity = capacity;
+    }
+
+    public String getCapacityUnit() {
+        return capacityUnit;
+    }
+
+    public void setCapacityUnit(String capacityUnit) {
+        this.capacityUnit = capacityUnit;
+    }
+
+    public Integer getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(Integer quantity) {
+        this.quantity = quantity;
+    }
+
+    public Integer getIsAble() {
+        return isAble;
+    }
+
+    public void setIsAble(Integer isAble) {
+        this.isAble = isAble;
+    }
+
+    public String getSpare1() {
+        return spare1;
+    }
+
+    public void setSpare1(String spare1) {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare2() {
+        return spare2;
+    }
+
+    public void setSpare2(String spare2) {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare3() {
+        return spare3;
+    }
+
+    public void setSpare3(String spare3) {
+        this.spare3 = spare3;
+    }
+
+    public String getSpare4() {
+        return spare4;
+    }
+
+    public void setSpare4(String spare4) {
+        this.spare4 = spare4;
+    }
+
+    @Override
+    public String toString() {
+        return "Line{" +
+                "id = " + id +
+                ", nemCode = " + nemCode +
+                ", name = " + name +
+                ", aname = " + aname +
+                ", projectId = " + projectId +
+                ", orderNum = " + orderNum +
+                ", capacity = " + capacity +
+                ", capacityUnit = " + capacityUnit +
+                ", quantity = " + quantity +
+                ", isAble = " + isAble +
+                ", spare1 = " + spare1 +
+                ", spare2 = " + spare2 +
+                ", spare3 = " + spare3 +
+                ", spare4 = " + spare4 +
+                "}";
+    }
 }

+ 686 - 18
common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/PowerStation.java

@@ -1,29 +1,697 @@
 package com.gyee.wisdom.common.data.windturbine;
 
-import lombok.Data;
+
+import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
-//电场(风场)
-@Data
-public class PowerStation  implements Serializable{
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+/**
+ * <p>
+ * 场站表
+ * </p>
+ *
+ * @author gfhd
+ * @since 2023-04-23
+ */
+@TableName("pro_basic_powerstation")
+public class Powerstation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
     private String id;
-    private String code;
-    private String stationName;
+
+    /**
+     * 编码
+     */
+    private String nemCode;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
     private String address;
+
+    /**
+     * 电话
+     */
     private String telephone;
-    private double capacity;
+
+    /**
+     * 风电装机容量
+     */
+    private BigDecimal windCapacity;
+
+    /**
+     * 风电容量单位
+     */
+    private String windCapacityUnit;
+
+    /**
+     * 风电装机数量海上
+     */
+    private Integer windQuantityHs;
+
+    /**
+     * 风电装机数量陆地
+     */
+    private Integer windQuantityLd;
+
+    /**
+     * 光伏装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 光伏容量单位
+     */
     private String capacityUnit;
-    private int quantity;
-    private String shortName;
-    private double longitude;
-    private double latitude;
+
+    /**
+     * 光伏装机数量集中
+     */
+    private Integer quantityJz;
+
+    /**
+     * 光伏装机数量组串
+     */
+    private Integer quantityZc;
+
+    /**
+     * 接入风电装机容量
+     */
+    private BigDecimal jrwindCapacity;
+
+    /**
+     * 接入风电容量单位
+     */
+    private String jrwindCapacityUnit;
+
+    /**
+     * 接入风电装机数量海上
+     */
+    private Integer jrwindQuantityHs;
+
+    /**
+     * 接入风电装机数量陆地
+     */
+    private Integer jrwindQuantityLd;
+
+    /**
+     * 接入光伏装机容量
+     */
+    private BigDecimal jrCapacity;
+
+    /**
+     * 接入光伏容量单位
+     */
+    private String jrCapacityUnit;
+
+    /**
+     * 接入光伏装机数量集中
+     */
+    private Integer jrquantityJz;
+
+    /**
+     * 接入光伏装机数量组串
+     */
+    private Integer jrquantityZc;
+
+    /**
+     * 别名
+     */
+    private String aname;
+
+    /**
+     * 地球经度
+     */
+    private BigDecimal longitude;
+
+    /**
+     * 地球纬度
+     */
+    private BigDecimal latitude;
+
+    /**
+     * 图片
+     */
     private String photo;
-    private String companyId;
-    private String systemManuFact;
-    private String headFarm;
-    private String headFarmPhone;
+
+    /**
+     * 系统厂家
+     */
+    private String systemManufact;
+
+    /**
+     * 场长
+     */
+    private String headfarm;
+
+    /**
+     * 场长电话
+     */
+    private String headfarmPhone;
+
+    /**
+     * 机型
+     */
     private String model;
-    private int orderNum;
-    private double height;
 
-}
+    /**
+     * 顺序
+     */
+    private Integer orderNum;
+
+    /**
+     * 海拔高度
+     */
+    private BigDecimal height;
+
+    /**
+     * 场站类型(-1:风电;-2:光伏)
+     */
+    private String windType;
+
+    /**
+     * 公司编号
+     */
+    private String companyId;
+
+    /**
+     * 区域编号
+     */
+    private String regionId;
+
+    /**
+     * 集团编号
+     */
+    private String groupId;
+
+    /**
+     * 是否可用(0:待建;1:投产)(0:不参与计算;1:参与计算)
+     */
+    private Integer isAble;
+
+    /**
+     * 备用1
+     */
+    private String spare1;
+
+    /**
+     * 备用2
+     */
+    private String spare2;
+
+    /**
+     * 备用3
+     */
+    private String spare3;
+
+    /**
+     * 备用4
+     */
+    private String spare4;
+
+    /**
+     * 核准容量
+     */
+    private BigDecimal appCapacity;
+
+    /**
+     * 在建容量
+     */
+    private BigDecimal conCapacity;
+
+    /**
+     * 并网容量
+     */
+    private BigDecimal gridCapacity;
+
+    private Long hoiCapacity;
+
+    /**
+     * 首批并网时间
+     */
+    private LocalDate firstGridTime;
+
+    /**
+     * 整场投运时间
+     */
+    private LocalDate wholeGridTime;
+
+    /**
+     * 测风塔数量
+     */
+    private Integer anemoNumber;
+
+    /**
+     * 升压站数量
+     */
+    private Integer stationNumber;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getNemCode() {
+        return nemCode;
+    }
+
+    public void setNemCode(String nemCode) {
+        this.nemCode = nemCode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getTelephone() {
+        return telephone;
+    }
+
+    public void setTelephone(String telephone) {
+        this.telephone = telephone;
+    }
+
+    public BigDecimal getWindCapacity() {
+        return windCapacity;
+    }
+
+    public void setWindCapacity(BigDecimal windCapacity) {
+        this.windCapacity = windCapacity;
+    }
+
+    public String getWindCapacityUnit() {
+        return windCapacityUnit;
+    }
+
+    public void setWindCapacityUnit(String windCapacityUnit) {
+        this.windCapacityUnit = windCapacityUnit;
+    }
+
+    public Integer getWindQuantityHs() {
+        return windQuantityHs;
+    }
+
+    public void setWindQuantityHs(Integer windQuantityHs) {
+        this.windQuantityHs = windQuantityHs;
+    }
+
+    public Integer getWindQuantityLd() {
+        return windQuantityLd;
+    }
+
+    public void setWindQuantityLd(Integer windQuantityLd) {
+        this.windQuantityLd = windQuantityLd;
+    }
+
+    public BigDecimal getCapacity() {
+        return capacity;
+    }
+
+    public void setCapacity(BigDecimal capacity) {
+        this.capacity = capacity;
+    }
+
+    public String getCapacityUnit() {
+        return capacityUnit;
+    }
+
+    public void setCapacityUnit(String capacityUnit) {
+        this.capacityUnit = capacityUnit;
+    }
+
+    public Integer getQuantityJz() {
+        return quantityJz;
+    }
+
+    public void setQuantityJz(Integer quantityJz) {
+        this.quantityJz = quantityJz;
+    }
+
+    public Integer getQuantityZc() {
+        return quantityZc;
+    }
+
+    public void setQuantityZc(Integer quantityZc) {
+        this.quantityZc = quantityZc;
+    }
+
+    public BigDecimal getJrwindCapacity() {
+        return jrwindCapacity;
+    }
+
+    public void setJrwindCapacity(BigDecimal jrwindCapacity) {
+        this.jrwindCapacity = jrwindCapacity;
+    }
+
+    public String getJrwindCapacityUnit() {
+        return jrwindCapacityUnit;
+    }
+
+    public void setJrwindCapacityUnit(String jrwindCapacityUnit) {
+        this.jrwindCapacityUnit = jrwindCapacityUnit;
+    }
+
+    public Integer getJrwindQuantityHs() {
+        return jrwindQuantityHs;
+    }
+
+    public void setJrwindQuantityHs(Integer jrwindQuantityHs) {
+        this.jrwindQuantityHs = jrwindQuantityHs;
+    }
+
+    public Integer getJrwindQuantityLd() {
+        return jrwindQuantityLd;
+    }
+
+    public void setJrwindQuantityLd(Integer jrwindQuantityLd) {
+        this.jrwindQuantityLd = jrwindQuantityLd;
+    }
+
+    public BigDecimal getJrCapacity() {
+        return jrCapacity;
+    }
+
+    public void setJrCapacity(BigDecimal jrCapacity) {
+        this.jrCapacity = jrCapacity;
+    }
+
+    public String getJrCapacityUnit() {
+        return jrCapacityUnit;
+    }
+
+    public void setJrCapacityUnit(String jrCapacityUnit) {
+        this.jrCapacityUnit = jrCapacityUnit;
+    }
+
+    public Integer getJrquantityJz() {
+        return jrquantityJz;
+    }
+
+    public void setJrquantityJz(Integer jrquantityJz) {
+        this.jrquantityJz = jrquantityJz;
+    }
+
+    public Integer getJrquantityZc() {
+        return jrquantityZc;
+    }
+
+    public void setJrquantityZc(Integer jrquantityZc) {
+        this.jrquantityZc = jrquantityZc;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public BigDecimal getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(BigDecimal longitude) {
+        this.longitude = longitude;
+    }
+
+    public BigDecimal getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(BigDecimal latitude) {
+        this.latitude = latitude;
+    }
+
+    public String getPhoto() {
+        return photo;
+    }
+
+    public void setPhoto(String photo) {
+        this.photo = photo;
+    }
+
+    public String getSystemManufact() {
+        return systemManufact;
+    }
+
+    public void setSystemManufact(String systemManufact) {
+        this.systemManufact = systemManufact;
+    }
+
+    public String getHeadfarm() {
+        return headfarm;
+    }
+
+    public void setHeadfarm(String headfarm) {
+        this.headfarm = headfarm;
+    }
+
+    public String getHeadfarmPhone() {
+        return headfarmPhone;
+    }
+
+    public void setHeadfarmPhone(String headfarmPhone) {
+        this.headfarmPhone = headfarmPhone;
+    }
+
+    public String getModel() {
+        return model;
+    }
+
+    public void setModel(String model) {
+        this.model = model;
+    }
+
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public BigDecimal getHeight() {
+        return height;
+    }
+
+    public void setHeight(BigDecimal height) {
+        this.height = height;
+    }
+
+    public String getWindType() {
+        return windType;
+    }
+
+    public void setWindType(String windType) {
+        this.windType = windType;
+    }
+
+    public String getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(String companyId) {
+        this.companyId = companyId;
+    }
+
+    public String getRegionId() {
+        return regionId;
+    }
+
+    public void setRegionId(String regionId) {
+        this.regionId = regionId;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public Integer getIsAble() {
+        return isAble;
+    }
+
+    public void setIsAble(Integer isAble) {
+        this.isAble = isAble;
+    }
+
+    public String getSpare1() {
+        return spare1;
+    }
+
+    public void setSpare1(String spare1) {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare2() {
+        return spare2;
+    }
+
+    public void setSpare2(String spare2) {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare3() {
+        return spare3;
+    }
+
+    public void setSpare3(String spare3) {
+        this.spare3 = spare3;
+    }
+
+    public String getSpare4() {
+        return spare4;
+    }
+
+    public void setSpare4(String spare4) {
+        this.spare4 = spare4;
+    }
+
+    public BigDecimal getAppCapacity() {
+        return appCapacity;
+    }
+
+    public void setAppCapacity(BigDecimal appCapacity) {
+        this.appCapacity = appCapacity;
+    }
+
+    public BigDecimal getConCapacity() {
+        return conCapacity;
+    }
+
+    public void setConCapacity(BigDecimal conCapacity) {
+        this.conCapacity = conCapacity;
+    }
+
+    public BigDecimal getGridCapacity() {
+        return gridCapacity;
+    }
+
+    public void setGridCapacity(BigDecimal gridCapacity) {
+        this.gridCapacity = gridCapacity;
+    }
+
+    public Long getHoiCapacity() {
+        return hoiCapacity;
+    }
+
+    public void setHoiCapacity(Long hoiCapacity) {
+        this.hoiCapacity = hoiCapacity;
+    }
+
+    public LocalDate getFirstGridTime() {
+        return firstGridTime;
+    }
+
+    public void setFirstGridTime(LocalDate firstGridTime) {
+        this.firstGridTime = firstGridTime;
+    }
+
+    public LocalDate getWholeGridTime() {
+        return wholeGridTime;
+    }
+
+    public void setWholeGridTime(LocalDate wholeGridTime) {
+        this.wholeGridTime = wholeGridTime;
+    }
+
+    public Integer getAnemoNumber() {
+        return anemoNumber;
+    }
+
+    public void setAnemoNumber(Integer anemoNumber) {
+        this.anemoNumber = anemoNumber;
+    }
+
+    public Integer getStationNumber() {
+        return stationNumber;
+    }
+
+    public void setStationNumber(Integer stationNumber) {
+        this.stationNumber = stationNumber;
+    }
+
+    @Override
+    public String toString() {
+        return "Powerstation{" +
+                "id = " + id +
+                ", nemCode = " + nemCode +
+                ", name = " + name +
+                ", address = " + address +
+                ", telephone = " + telephone +
+                ", windCapacity = " + windCapacity +
+                ", windCapacityUnit = " + windCapacityUnit +
+                ", windQuantityHs = " + windQuantityHs +
+                ", windQuantityLd = " + windQuantityLd +
+                ", capacity = " + capacity +
+                ", capacityUnit = " + capacityUnit +
+                ", quantityJz = " + quantityJz +
+                ", quantityZc = " + quantityZc +
+                ", jrwindCapacity = " + jrwindCapacity +
+                ", jrwindCapacityUnit = " + jrwindCapacityUnit +
+                ", jrwindQuantityHs = " + jrwindQuantityHs +
+                ", jrwindQuantityLd = " + jrwindQuantityLd +
+                ", jrCapacity = " + jrCapacity +
+                ", jrCapacityUnit = " + jrCapacityUnit +
+                ", jrquantityJz = " + jrquantityJz +
+                ", jrquantityZc = " + jrquantityZc +
+                ", aname = " + aname +
+                ", longitude = " + longitude +
+                ", latitude = " + latitude +
+                ", photo = " + photo +
+                ", systemManufact = " + systemManufact +
+                ", headfarm = " + headfarm +
+                ", headfarmPhone = " + headfarmPhone +
+                ", model = " + model +
+                ", orderNum = " + orderNum +
+                ", height = " + height +
+                ", windType = " + windType +
+                ", companyId = " + companyId +
+                ", regionId = " + regionId +
+                ", groupId = " + groupId +
+                ", isAble = " + isAble +
+                ", spare1 = " + spare1 +
+                ", spare2 = " + spare2 +
+                ", spare3 = " + spare3 +
+                ", spare4 = " + spare4 +
+                ", appCapacity = " + appCapacity +
+                ", conCapacity = " + conCapacity +
+                ", gridCapacity = " + gridCapacity +
+                ", hoiCapacity = " + hoiCapacity +
+                ", firstGridTime = " + firstGridTime +
+                ", wholeGridTime = " + wholeGridTime +
+                ", anemoNumber = " + anemoNumber +
+                ", stationNumber = " + stationNumber +
+                "}";
+    }
+}

+ 292 - 14
common/data/src/main/java/com/gyee/wisdom/common/data/windturbine/Project.java

@@ -1,29 +1,307 @@
 package com.gyee.wisdom.common.data.windturbine;
 
-import com.gyee.wisdom.common.data.windturbine.Line;
-import com.gyee.wisdom.common.data.windturbine.PowerStation;
-import lombok.Data;
+import com.baomidou.mybatisplus.annotation.TableName;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
-import java.util.Date;
-import java.util.List;
+import java.time.LocalDate;
 
-@Data
-public class Project implements Serializable{
+/**
+ * <p>
+ * 工程表
+ * </p>
+ *
+ * @author gfhd
+ * @since 2023-04-23
+ */
+@TableName("pro_basic_project")
+public class Project implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 编号
+     */
     private String id;
-    private String code;
+
+    /**
+     * 编码
+     */
+    private String nemCode;
+
+    /**
+     * 名称
+     */
     private String name;
+
+    /**
+     * 别名
+     */
     private String aname;
-    private String stationId;
-    private Double capacity;
+
+    /**
+     * 风场编号
+     */
+    private String windpowerstationId;
+
+    /**
+     * 装机容量
+     */
+    private BigDecimal capacity;
+
+    /**
+     * 容量单位
+     */
     private String capacityUnit;
+
+    /**
+     * 装机数量
+     */
     private Integer quantity;
+
+    /**
+     * 机型
+     */
     private String model;
-    private Date commissionDate;
+
+    /**
+     * 投产日期
+     */
+    private LocalDate commissionDate;
+
+    /**
+     * 主控电话
+     */
     private String masterPhone;
-    private String shiftForeman;
-    private String shiftForemanPhone;
+
+    /**
+     * 值长
+     */
+    private String shiftforeMan;
+
+    /**
+     * 值长电话
+     */
+    private String shiftforeManPhone;
+
+    /**
+     * 顺序
+     */
     private Integer orderNum;
-    private PowerStation powerStation;
+
+    /**
+     * 变电所ID
+     */
+    private String windsubStationId;
+
+    /**
+     * 是否可用
+     */
+    private Integer isAble;
+
+    /**
+     * 备用1
+     */
+    private String spare1;
+
+    /**
+     * 备用2
+     */
+    private String spare2;
+
+    /**
+     * 备用3
+     */
+    private String spare3;
+
+    /**
+     * 备用4
+     */
+    private String spare4;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getNemCode() {
+        return nemCode;
+    }
+
+    public void setNemCode(String nemCode) {
+        this.nemCode = nemCode;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAname() {
+        return aname;
+    }
+
+    public void setAname(String aname) {
+        this.aname = aname;
+    }
+
+    public String getWindpowerstationId() {
+        return windpowerstationId;
+    }
+
+    public void setWindpowerstationId(String windpowerstationId) {
+        this.windpowerstationId = windpowerstationId;
+    }
+
+    public BigDecimal getCapacity() {
+        return capacity;
+    }
+
+    public void setCapacity(BigDecimal capacity) {
+        this.capacity = capacity;
+    }
+
+    public String getCapacityUnit() {
+        return capacityUnit;
+    }
+
+    public void setCapacityUnit(String capacityUnit) {
+        this.capacityUnit = capacityUnit;
+    }
+
+    public Integer getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(Integer quantity) {
+        this.quantity = quantity;
+    }
+
+    public String getModel() {
+        return model;
+    }
+
+    public void setModel(String model) {
+        this.model = model;
+    }
+
+    public LocalDate getCommissionDate() {
+        return commissionDate;
+    }
+
+    public void setCommissionDate(LocalDate commissionDate) {
+        this.commissionDate = commissionDate;
+    }
+
+    public String getMasterPhone() {
+        return masterPhone;
+    }
+
+    public void setMasterPhone(String masterPhone) {
+        this.masterPhone = masterPhone;
+    }
+
+    public String getShiftforeMan() {
+        return shiftforeMan;
+    }
+
+    public void setShiftforeMan(String shiftforeMan) {
+        this.shiftforeMan = shiftforeMan;
+    }
+
+    public String getShiftforeManPhone() {
+        return shiftforeManPhone;
+    }
+
+    public void setShiftforeManPhone(String shiftforeManPhone) {
+        this.shiftforeManPhone = shiftforeManPhone;
+    }
+
+    public Integer getOrderNum() {
+        return orderNum;
+    }
+
+    public void setOrderNum(Integer orderNum) {
+        this.orderNum = orderNum;
+    }
+
+    public String getWindsubStationId() {
+        return windsubStationId;
+    }
+
+    public void setWindsubStationId(String windsubStationId) {
+        this.windsubStationId = windsubStationId;
+    }
+
+    public Integer getIsAble() {
+        return isAble;
+    }
+
+    public void setIsAble(Integer isAble) {
+        this.isAble = isAble;
+    }
+
+    public String getSpare1() {
+        return spare1;
+    }
+
+    public void setSpare1(String spare1) {
+        this.spare1 = spare1;
+    }
+
+    public String getSpare2() {
+        return spare2;
+    }
+
+    public void setSpare2(String spare2) {
+        this.spare2 = spare2;
+    }
+
+    public String getSpare3() {
+        return spare3;
+    }
+
+    public void setSpare3(String spare3) {
+        this.spare3 = spare3;
+    }
+
+    public String getSpare4() {
+        return spare4;
+    }
+
+    public void setSpare4(String spare4) {
+        this.spare4 = spare4;
+    }
+
+    @Override
+    public String toString() {
+        return "Project{" +
+                "id = " + id +
+                ", nemCode = " + nemCode +
+                ", name = " + name +
+                ", aname = " + aname +
+                ", windpowerstationId = " + windpowerstationId +
+                ", capacity = " + capacity +
+                ", capacityUnit = " + capacityUnit +
+                ", quantity = " + quantity +
+                ", model = " + model +
+                ", commissionDate = " + commissionDate +
+                ", masterPhone = " + masterPhone +
+                ", shiftforeMan = " + shiftforeMan +
+                ", shiftforeManPhone = " + shiftforeManPhone +
+                ", orderNum = " + orderNum +
+                ", windsubStationId = " + windsubStationId +
+                ", isAble = " + isAble +
+                ", spare1 = " + spare1 +
+                ", spare2 = " + spare2 +
+                ", spare3 = " + spare3 +
+                ", spare4 = " + spare4 +
+                "}";
+    }
 }

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/enums/ResultCode.java

@@ -10,7 +10,7 @@ package com.gyee.wisdom.common.enums;
  * Version: 0.0.1
  * Modified By:
  */
-public enum  ResultCode {
+public enum ResultCode {
 
     SUCCESS(0, "请求成功"),
     UNRECORDED_ERROR(1, "未记录错误,请联系管理员!"),

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/page/Page.java

@@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
 import java.util.List;
 
 /**
- * @author songwb<songwenbin@gyee-china.com>
+ * @author songwb<songwenbin @ gyee-china.com>
  */
 @Data
 @AllArgsConstructor

+ 1 - 1
common/data/src/main/java/com/gyee/wisdom/common/page/PageLink.java

@@ -6,7 +6,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 /**
- * @author songwb<songwenbin@gyee-china.com>
+ * @author songwb<songwenbin @ gyee-china.com>
  */
 @Data
 @AllArgsConstructor

+ 22 - 29
common/utils/src/main/java/com/gyee/wisdom/common/utils/ByteUtil.java

@@ -5,8 +5,7 @@ public class ByteUtil {
      * 转换short为byte
      *
      * @param b
-     * @param s
-     *            需要转换的short
+     * @param s     需要转换的short
      * @param index
      */
     public static void putShort(byte b[], short s, int index) {
@@ -18,8 +17,7 @@ public class ByteUtil {
      * 通过byte数组取到short
      *
      * @param b
-     * @param index
-     *            第几位开始取
+     * @param index 第几位开始取
      * @return
      */
     public static short getShort(byte[] b, int index) {
@@ -44,8 +42,7 @@ public class ByteUtil {
      * 通过byte数组取到int
      *
      * @param bb
-     * @param index
-     *            第几位开始
+     * @param index 第几位开始
      * @return
      */
     public static int getInt(byte[] bb, int index) {
@@ -102,7 +99,7 @@ public class ByteUtil {
                 | (((long) bb[index + 4] & 0xff) << 24)
                 | (((long) bb[index + 5] & 0xff) << 16)
                 | (((long) bb[index + 6] & 0xff) << 8)
-                | (((long) bb[index + 7] & 0xff) << 0) );
+                | (((long) bb[index + 7] & 0xff) << 0));
     }
 
     /**
@@ -114,7 +111,7 @@ public class ByteUtil {
     public static void putChar(byte[] bb, char ch, int index) {
         int temp = (int) ch;
         // byte[] b = new byte[2];
-        for (int i = 0; i < 2; i ++ ) {
+        for (int i = 0; i < 2; i++) {
             bb[index + i] = new Integer(temp & 0xff).byteValue(); // 将最高位保存在最低位
             temp = temp >> 8; // 向右移8位
         }
@@ -220,10 +217,10 @@ public class ByteUtil {
         return Double.longBitsToDouble(l);
     }
 
-    public static void putHexString(byte[] bb, String s, int index){
-        for (int i = 0; i < s.length(); i+=2) {
-            byte c= (byte)( charToByte(s.charAt(i))<<4 | charToByte(s.charAt(i+1)));
-            bb[index+(i>>1)] = c;
+    public static void putHexString(byte[] bb, String s, int index) {
+        for (int i = 0; i < s.length(); i += 2) {
+            byte c = (byte) (charToByte(s.charAt(i)) << 4 | charToByte(s.charAt(i + 1)));
+            bb[index + (i >> 1)] = c;
         }
     }
 
@@ -231,9 +228,9 @@ public class ByteUtil {
         return (byte) "0123456789ABCDEF".indexOf(c);
     }
 
-    public static String getHexString(byte[] b, int index, int count){
+    public static String getHexString(byte[] b, int index, int count) {
         StringBuilder stringBuilder = new StringBuilder("");
-        if (b == null || index < 0 || b.length < index + count ) {
+        if (b == null || index < 0 || b.length < index + count) {
             return null;
         }
         for (int i = index; i < count + index; i++) {
@@ -247,7 +244,7 @@ public class ByteUtil {
         return stringBuilder.toString();
     }
 
-    public static String getBinaryString(int d,int length){
+    public static String getBinaryString(int d, int length) {
         StringBuilder stringBuilder = new StringBuilder("");
         String hv = Integer.toBinaryString(d);
         for (int j = 0; j < length - hv.length(); j++) {
@@ -257,7 +254,7 @@ public class ByteUtil {
         return stringBuilder.toString();
     }
 
-    public static String getBinaryReverseString(int d,int length){
+    public static String getBinaryReverseString(int d, int length) {
         StringBuilder stringBuilder = new StringBuilder("");
         String hv = Integer.toBinaryString(d);
         for (int j = 0; j < length - hv.length(); j++) {
@@ -271,37 +268,33 @@ public class ByteUtil {
 
 
     //网络字节逆序
-    public static byte[] ReversEndian(byte b[],int count, boolean big)
-    {
+    public static byte[] ReversEndian(byte b[], int count, boolean big) {
         byte by;
         byte data[] = new byte[count];
-        for(int i=0;i<count;i++)
-        {
+        for (int i = 0; i < count; i++) {
             data[i] = b[i];
         }
-        if(big==false)
-        {
-            for(int i=0;i<count;i++)
-            {
+        if (big == false) {
+            for (int i = 0; i < count; i++) {
                 by = b[i];
-                data[count-i-1] = by;
+                data[count - i - 1] = by;
             }
         }
         return data;
     }
 
-    public static short htons(short s){
+    public static short htons(short s) {
         short rslt = 0;
-        byte [] bs1 = new byte[2];
+        byte[] bs1 = new byte[2];
         ByteUtil.putShort(bs1, s, 0);
         byte[] bs2 = ReversEndian(bs1, 2, false);
         rslt = ByteUtil.getShort(bs2, 0);
         return rslt;
     }
 
-    public static int htonl(int d){
+    public static int htonl(int d) {
         int rslt = 0;
-        byte [] bs1 = new byte[4];
+        byte[] bs1 = new byte[4];
         ByteUtil.putInt(bs1, d, 0);
         byte[] bs2 = ReversEndian(bs1, 4, false);
         rslt = ByteUtil.getInt(bs2, 0);

+ 31 - 31
common/utils/src/main/java/com/gyee/wisdom/common/utils/DateUtil.java

@@ -54,7 +54,7 @@ public class DateUtil {
         return df2;
 
     }
-    
+
     public static SimpleDateFormat getFormatGMT() {
 
         SimpleDateFormat df2 = (SimpleDateFormat) threadLocal.get();
@@ -69,10 +69,11 @@ public class DateUtil {
     /**
      * 字符串时间转换成 时间戳  毫秒
      * 2021-05-02 00:00:00     ===    168089860000
+     *
      * @param time
      * @return
      */
-    public static long coverTimeMillis(String time){
+    public static long coverTimeMillis(String time) {
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         Date date = null;
         try {
@@ -85,7 +86,7 @@ public class DateUtil {
 
     /**
      * 获取系统日期(无时分秒毫秒)
-     * 
+     *
      * @return
      */
     public static Date today() {
@@ -94,7 +95,7 @@ public class DateUtil {
 
     /**
      * 获取系统时间
-     * 
+     *
      * @return
      */
     public static Date now() {
@@ -103,7 +104,7 @@ public class DateUtil {
 
     /**
      * 根据年月日生成日期对象
-     * 
+     *
      * @param y
      * @param m
      * @param d
@@ -126,14 +127,14 @@ public class DateUtil {
     public static String toDate1(Date date) {
         return getFormat().format(date);
     }
-    
+
     public static String toDateGMT(Date date) {
         return getFormatGMT().format(date);
     }
 
     /**
      * 根据年月日时分秒生成日期对象
-     * 
+     *
      * @param y
      * @param m
      * @param d
@@ -150,7 +151,7 @@ public class DateUtil {
 
     /**
      * 将指定时间转化为 Calendar
-     * 
+     *
      * @param date
      * @return
      */
@@ -162,7 +163,7 @@ public class DateUtil {
 
     /**
      * 将时间的时分秒毫秒字段去掉
-     * 
+     *
      * @param date
      * @return
      */
@@ -178,7 +179,7 @@ public class DateUtil {
 
     /**
      * 去掉日期中日及下级字段
-     * 
+     *
      * @param date
      * @return
      */
@@ -195,7 +196,7 @@ public class DateUtil {
 
     /**
      * 去掉日期中的月及下级字段
-     * 
+     *
      * @param date
      * @return
      */
@@ -213,7 +214,7 @@ public class DateUtil {
 
     /**
      * 在指定时间上加指定的天数
-     * 
+     *
      * @param date
      * @param day
      * @return
@@ -227,7 +228,7 @@ public class DateUtil {
 
     /**
      * 在指定的时间上加指定的月数
-     * 
+     *
      * @param date
      * @param month
      * @return
@@ -264,7 +265,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的天数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -275,7 +276,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的小时数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -294,7 +295,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的分钟数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -305,7 +306,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的分钟数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -316,7 +317,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的毫秒数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -327,7 +328,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间差的秒数(取整后)
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -338,7 +339,7 @@ public class DateUtil {
 
     /**
      * 计算两个时间之间的月差
-     * 
+     *
      * @param d1
      * @param d2
      * @return
@@ -372,7 +373,7 @@ public class DateUtil {
 
     /**
      * 获得指定时间的月数
-     * 
+     *
      * @param date
      * @return
      */
@@ -384,7 +385,7 @@ public class DateUtil {
 
     /**
      * 获得指定时间的年数
-     * 
+     *
      * @param date
      * @return
      */
@@ -396,7 +397,7 @@ public class DateUtil {
 
     /**
      * 获取指定时间的天数
-     * 
+     *
      * @param date
      * @return
      */
@@ -423,7 +424,7 @@ public class DateUtil {
 
     /**
      * 获取当前月的第一天
-     * 
+     *
      * @return
      */
     public static String getCurrtenFirstDay() {
@@ -436,7 +437,7 @@ public class DateUtil {
 
     /**
      * 获取当前月的最后一天
-     * 
+     *
      * @return
      */
     public static String getCurrtenLastDay() {
@@ -448,7 +449,7 @@ public class DateUtil {
 
     /**
      * 获取当前月的第一天
-     * 
+     *
      * @return
      */
     public static Date getCurrtenFirstDate() {
@@ -463,7 +464,7 @@ public class DateUtil {
 
     /**
      * 获取当前月的最后一天
-     * 
+     *
      * @return
      */
     public static Date getCurrtenLastDate() {
@@ -503,7 +504,7 @@ public class DateUtil {
         }
         return null;
     }
-    
+
     public static Date parseDateGMT(String date) {
         try {
             return getFormatGMT().parse(date);
@@ -519,7 +520,7 @@ public class DateUtil {
 
     /**
      * 转换Edna时间格式为标准格式
-     * 
+     *
      * @param pointTime
      * @return
      */
@@ -565,7 +566,7 @@ public class DateUtil {
 
     /**
      * 转换Edna时间格式为标准格式
-     * 
+     *
      * @param pointTime
      * @return
      */
@@ -617,5 +618,4 @@ public class DateUtil {
     }
 
 
-
 }

+ 12 - 12
common/utils/src/main/java/com/gyee/wisdom/common/utils/EncryptUtil.java

@@ -17,7 +17,7 @@ public class EncryptUtil {
     public static final String KEY_MAC = "HmacMD5";
 
 
-// sun不推荐使用它们自己的base64,用apache的挺好
+    // sun不推荐使用它们自己的base64,用apache的挺好
 
     /**
      * BASE64解密
@@ -111,20 +111,20 @@ public class EncryptUtil {
     }
 
     public static void main(String[] args) throws Exception {
-// TODO Auto-generated method stub
+        // TODO Auto-generated method stub
         String data = "简单加密";
-//        System.out.println(new BigInteger(encryptBASE64(data.getBytes())).toString(16));
-//        System.out.println(new BigInteger(encryptBASE64(data.getBytes())).toString(32));
-//        System.out.println(new String(decryptBASE64(encryptBASE64(data.getBytes()))));
-//
-//        System.out.println(new BigInteger(encryptMD5(data.getBytes())).toString());
-//        System.out.println(encryptSHA(data.getBytes()).toString());
+        //        System.out.println(new BigInteger(encryptBASE64(data.getBytes())).toString(16));
+        //        System.out.println(new BigInteger(encryptBASE64(data.getBytes())).toString(32));
+        //        System.out.println(new String(decryptBASE64(encryptBASE64(data.getBytes()))));
+        //
+        //        System.out.println(new BigInteger(encryptMD5(data.getBytes())).toString());
+        //        System.out.println(encryptSHA(data.getBytes()).toString());
         System.out.println(EncryptUtil.encryptPwd(encryptMD5("123456".getBytes()).toString()));
         System.out.println(EncryptUtil.encryptPwd("123456"));
         System.out.println(EncryptUtil.encryptPwd("e10adc3949ba59abbe56e057f20f883e"));
         System.out.println(EncryptUtil.encryptPwd("e10adc3949ba59abbe56e057f20f883e"));
-//
-//        System.out.println(new BigInteger(encryptHMAC(data.getBytes(), initMacKey())).toString());
+        //
+        //        System.out.println(new BigInteger(encryptHMAC(data.getBytes(), initMacKey())).toString());
     }
 
     /**
@@ -207,7 +207,7 @@ public class EncryptUtil {
         Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");//"算法/模式/补码方式"
         cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
         byte[] encrypted = cipher.doFinal(sSrc.getBytes(StandardCharsets.UTF_8));
-        return  Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
+        return Base64.encodeBase64String(encrypted);//此处使用BASE64做转码功能,同时能起到2次加密的作用。
     }
 
     // 解密
@@ -230,7 +230,7 @@ public class EncryptUtil {
             byte[] encrypted1 = Base64.decodeBase64(sSrc);//先用base64解密
             try {
                 byte[] original = cipher.doFinal(encrypted1);
-                String originalString = new String(original,StandardCharsets.UTF_8);
+                String originalString = new String(original, StandardCharsets.UTF_8);
                 return originalString;
             } catch (Exception e) {
                 System.out.println(e.toString());

+ 40 - 40
common/utils/src/main/java/com/gyee/wisdom/common/utils/Hex.java

@@ -1,54 +1,54 @@
 package com.gyee.wisdom.common.utils;
 
 /**
- * @see byte数组与十六进制字符串互转
  * @author Herman.Xiong
  * @date 2014年5月5日 17:00:01
+ * @see byte数组与十六进制字符串互转
  */
 public class Hex {
 
     /**
      * 用于建立十六进制字符的输出的小写字符数组
      */
-    private static final char[] DIGITS_LOWER = { '0', '1', '2', '3', '4', '5',
-            '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+    private static final char[] DIGITS_LOWER = {'0', '1', '2', '3', '4', '5',
+            '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
 
     /**
      * 用于建立十六进制字符的输出的大写字符数组
      */
-    private static final char[] DIGITS_UPPER = { '0', '1', '2', '3', '4', '5',
-            '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+    private static final char[] DIGITS_UPPER = {'0', '1', '2', '3', '4', '5',
+            '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
 
     /**
-     * @see 将字节数组转换为十六进制字符数组
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:06:52
      * @param data byte[]
      * @return 十六进制char[]
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:06:52
+     * @see 将字节数组转换为十六进制字符数组
      */
     public static char[] encodeHex(byte[] data) {
         return encodeHex(data, true);
     }
 
     /**
-     * @see 将字节数组转换为十六进制字符数组
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:07:14
-     * @param data byte[]
+     * @param data        byte[]
      * @param toLowerCase true传换成小写格式 ,false传换成大写格式
      * @return 十六进制char[]
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:07:14
+     * @see 将字节数组转换为十六进制字符数组
      */
     public static char[] encodeHex(byte[] data, boolean toLowerCase) {
         return encodeHex(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
     }
 
     /**
-     * @see 将字节数组转换为十六进制字符数组
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:07:31
-     * @param data byte[]
+     * @param data     byte[]
      * @param toDigits 用于控制输出的char[]
      * @return 十六进制char[]
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:07:31
+     * @see 将字节数组转换为十六进制字符数组
      */
     protected static char[] encodeHex(byte[] data, char[] toDigits) {
         int l = data.length;
@@ -61,47 +61,47 @@ public class Hex {
     }
 
     /**
-     * @see 将字节数组转换为十六进制字符串
-     * @date 2014年5月5日 17:07:43
-     * @author Herman.Xiong
      * @param data byte[]
      * @return 十六进制String
+     * @date 2014年5月5日 17:07:43
+     * @author Herman.Xiong
+     * @see 将字节数组转换为十六进制字符串
      */
     public static String encodeHexStr(byte[] data) {
         return encodeHexStr(data, true);
     }
 
     /**
-     * @see 将字节数组转换为十六进制字符串
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:08:01
-     * @param data byte[]
+     * @param data        byte[]
      * @param toLowerCase true 传换成小写格式 , false 传换成大写格式
      * @return 十六进制String
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:08:01
+     * @see 将字节数组转换为十六进制字符串
      */
     public static String encodeHexStr(byte[] data, boolean toLowerCase) {
         return encodeHexStr(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
     }
 
     /**
-     * @see 将字节数组转换为十六进制字符串
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:08:15
-     * @param data byte[]
+     * @param data     byte[]
      * @param toDigits 用于控制输出的char[]
      * @return 十六进制String
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:08:15
+     * @see 将字节数组转换为十六进制字符串
      */
     protected static String encodeHexStr(byte[] data, char[] toDigits) {
         return new String(encodeHex(data, toDigits));
     }
 
     /**
-     * @see 将十六进制字符数组转换为字节数组
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:08:28
      * @param data 十六进制char[]
      * @return byte[]
      * @throws RuntimeException 如果源十六进制字符数组是一个奇怪的长度,将抛出运行时异常
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:08:28
+     * @see 将十六进制字符数组转换为字节数组
      */
     public static byte[] decodeHex(char[] data) {
         int len = data.length;
@@ -120,13 +120,13 @@ public class Hex {
     }
 
     /**
-     * @see 将十六进制字符转换成一个整数
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:08:46
-     * @param ch  十六进制char
+     * @param ch    十六进制char
      * @param index 十六进制字符在字符数组中的位置
      * @return 一个整数
      * @throws RuntimeException 当ch不是一个合法的十六进制字符时,抛出运行时异常
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:08:46
+     * @see 将十六进制字符转换成一个整数
      */
     protected static int toDigit(char ch, int index) {
         int digit = Character.digit(ch, 16);
@@ -138,16 +138,16 @@ public class Hex {
     }
 
     /**
-     * @see 将byte[]数组转换为String字符串
-     * @author Herman.Xiong
-     * @date 2014年5月5日 17:15:42
      * @param data byte数组
      * @return String 转换后的字符串
+     * @author Herman.Xiong
+     * @date 2014年5月5日 17:15:42
+     * @see 将byte[]数组转换为String字符串
      */
-    public static String byteToArray(byte[]data){
-        String result="";
+    public static String byteToArray(byte[] data) {
+        String result = "";
         for (int i = 0; i < data.length; i++) {
-            result+=Integer.toHexString((data[i] & 0xFF) | 0x100).toUpperCase().substring(1, 3);
+            result += Integer.toHexString((data[i] & 0xFF) | 0x100).toUpperCase().substring(1, 3);
         }
         return result;
     }

+ 3 - 3
common/utils/src/main/java/com/gyee/wisdom/common/utils/RequestMapToJsonUtil.java

@@ -9,12 +9,12 @@ import java.util.Map;
 public class RequestMapToJsonUtil {
 
     public static String toJson(Map<String, String[]> params) {
-        Map<String,String> dataMap=new HashedMap(params.size()-1);
-        for(String key : params.keySet()) {
+        Map<String, String> dataMap = new HashedMap(params.size() - 1);
+        for (String key : params.keySet()) {
             if (key.equals("_csrf")) {
                 continue;
             }
-            dataMap.put(key,params.get(key)[0]);
+            dataMap.put(key, params.get(key)[0]);
         }
         return JSON.toJSONString(dataMap);
     }

+ 32 - 32
common/utils/src/main/java/com/gyee/wisdom/common/utils/StringUtil.java

@@ -6,41 +6,41 @@ import java.util.UUID;
 
 /**
  * String辅助类
- * 
  */
 public class StringUtil extends StringUtils {
-	
-	/**
-	 * 非空判断
-	 * 
-	 * @param obj
-	 * @return
-	 */
-	public static boolean isNotBlank(Object obj) {
-		return !isBlank(obj);
-	}
 
-	/**
-	 * 为空判断
-	 * 
-	 * @param obj
-	 * @return
-	 */
-	public static boolean isBlank(Object obj) {
-		if (obj == null || StringUtils.isBlank(obj.toString())) {
-			return true;
-		}
-		return false;
-	}
+    /**
+     * 非空判断
+     *
+     * @param obj
+     * @return
+     */
+    public static boolean isNotBlank(Object obj) {
+        return !isBlank(obj);
+    }
 
-	/**
-	 * 获得一个UUID
-	 * @return String UUID
-	 */
-	public static String getUUID(){
-		String uuid = UUID.randomUUID().toString();
-		//去掉“-”符号
-		return uuid.replaceAll("-", "");
-	}
+    /**
+     * 为空判断
+     *
+     * @param obj
+     * @return
+     */
+    public static boolean isBlank(Object obj) {
+        if (obj == null || StringUtils.isBlank(obj.toString())) {
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * 获得一个UUID
+     *
+     * @return String UUID
+     */
+    public static String getUUID() {
+        String uuid = UUID.randomUUID().toString();
+        //去掉“-”符号
+        return uuid.replaceAll("-", "");
+    }
 
 }

+ 1 - 1
electricity/meter/src/main/java/com/gyee/gaia/Bootstrap.java

@@ -11,7 +11,7 @@ public class Bootstrap {
 
     public static void main(String[] args) {
 
-      SpringApplication.run(Bootstrap.class, args);
+        SpringApplication.run(Bootstrap.class, args);
 
     }
 }

+ 0 - 1
electricity/meter/src/main/java/com/gyee/gaia/meter/config/NacosConfig.java

@@ -2,7 +2,6 @@ package com.gyee.gaia.meter.config;
 
 import lombok.Data;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 

+ 0 - 1
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/ConfigController.java

@@ -4,7 +4,6 @@ import com.gyee.gaia.meter.config.AppConfig;
 import com.gyee.gaia.meter.entity.TestTb;
 import com.gyee.gaia.meter.service.TestTbService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;

+ 0 - 2
electricity/meter/src/main/java/com/gyee/gaia/meter/controller/NacosController.java

@@ -3,8 +3,6 @@ package com.gyee.gaia.meter.controller;
 
 import com.gyee.gaia.meter.config.NacosConfig;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 2 - 2
electricity/meter/src/main/java/com/gyee/gaia/meter/job/MyJobHandler.java

@@ -37,8 +37,8 @@ public class MyJobHandler {
                 int ii = v / 0;
 
             } catch (Exception e) {
-              t=  new ReturnT(FAIL_CODE, "调度失败111"+e);
-                XxlJobHelper.handleFail("调度失败"+e);
+                t = new ReturnT(FAIL_CODE, "调度失败111" + e);
+                XxlJobHelper.handleFail("调度失败" + e);
             } finally {
                 return t;
             }

+ 4 - 3
state/wind/src/main/java/com/gyee/gaia/Bootstrap.java

@@ -1,17 +1,18 @@
 package com.gyee.gaia;
 
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 
-
-@SpringBootApplication
 @EnableDiscoveryClient
+@MapperScan("com.gyee.gaia.dao")
+@SpringBootApplication(scanBasePackages = "com.gyee.gaia")
 public class Bootstrap {
 
     public static void main(String[] args) {
 
-      SpringApplication.run(Bootstrap.class, args);
+        SpringApplication.run(Bootstrap.class, args);
 
     }
 }

+ 0 - 1
state/wind/src/main/java/com/gyee/gaia/state/wind/config/NacosConfig.java

@@ -2,7 +2,6 @@ package com.gyee.gaia.state.wind.config;
 
 import lombok.Data;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.stereotype.Component;
 

+ 1 - 7
state/wind/src/main/java/com/gyee/gaia/state/wind/controller/ConfigController.java

@@ -2,9 +2,7 @@ package com.gyee.gaia.state.wind.controller;
 
 import com.gyee.gaia.state.wind.config.AppConfig;
 import com.gyee.gaia.state.wind.entity.TestTb;
-import com.gyee.gaia.state.wind.service.TestTbService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -18,10 +16,6 @@ public class ConfigController {
     @Autowired
     AppConfig appConfig;
 
-    @Autowired
-    TestTbService testTbService;
-
-
     @GetMapping("/all")
     public String getConfigString() {
         return appConfig.toString();
@@ -34,7 +28,7 @@ public class ConfigController {
 
     @GetMapping("/test")
     public List<TestTb> testDb() {
-        return testTbService.getAllTestTb();
+        return null;
     }
 
 }

+ 0 - 2
state/wind/src/main/java/com/gyee/gaia/state/wind/controller/NacosController.java

@@ -3,8 +3,6 @@ package com.gyee.gaia.state.wind.controller;
 
 import com.gyee.gaia.state.wind.config.NacosConfig;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 0 - 44
timeseries/dao-redis-taos/src/main/java/com/gyee/wisdom/dao/redistaos/TaosCovertUtil.java

@@ -1,44 +0,0 @@
-package com.gyee.wisdom.dao.redistaos;
-
-public class TaosCovertUtil {
-
-    /**
-     * 根据传过来的点分析出场站名
-     * @param point
-     * @return
-     */
-    public static String coverStationPrefix(String point) {
-        String station = null;
-
-        if(point.toUpperCase().contains("SBQ"))
-            station = "sbq";
-        else if(point.toUpperCase().contains("MHS"))
-            station = "mhs";
-        else if(point.toUpperCase().contains("NSS"))
-            station = "nss";
-        else if(point.toUpperCase().contains("XS"))
-            station = "xs";
-        else if(point.toUpperCase().contains("QS"))
-            station = "qs";
-        else if(point.toUpperCase().contains("DWK"))
-            station = "dwk";
-        else if(point.toUpperCase().contains("PL"))
-            station = "pl";
-        else if(point.toUpperCase().contains("MCH"))
-            station = "mch";
-        else if(point.toUpperCase().contains("SH"))
-            station = "sh";
-        else if(point.toUpperCase().contains("XH"))
-            station = "xh";
-        else if(point.toUpperCase().contains("NXDQ"))
-            station = "nxdq";
-        else if(point.toUpperCase().contains("JSFW"))
-            station = "jsfw";
-        else if(point.toUpperCase().contains("HZJ"))
-            station = "hzj";
-        else
-            station = "qs";
-
-        return station;
-    }
-}

+ 22 - 17
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/config/Knife4jRedisConfiguration.java

@@ -36,7 +36,7 @@ import java.util.NoSuchElementException;
 @Import(Knife4jRedisRegister.class)
 @EnableCaching
 @Configuration
-public class Knife4jRedisConfiguration implements EnvironmentAware , ApplicationContextAware {
+public class Knife4jRedisConfiguration implements EnvironmentAware, ApplicationContextAware {
 
     private static final Logger logger = LoggerFactory.getLogger(Knife4jRedisConfiguration.class);
 
@@ -53,8 +53,9 @@ public class Knife4jRedisConfiguration implements EnvironmentAware , Application
         this.environment = environment;
         this.binder = Binder.get(this.environment);
     }
+
     @PostConstruct
-    public Map<String,RedisTemplate> initRedisTemplate(){
+    public Map<String, RedisTemplate> initRedisTemplate() {
         RedisEntity redisEntity;
         try {
             redisEntity = binder.bind("knife4j.redis", RedisEntity.class).get();
@@ -64,7 +65,7 @@ public class Knife4jRedisConfiguration implements EnvironmentAware , Application
 
         //根据多个库实例化出多个连接池和Template
         List<Integer> databases = redisEntity.getDatabases();
-        if(databases == null || databases.size() == 0){
+        if (databases == null || databases.size() == 0) {
             logger.warn("no config property knife4j.redis.databases , default use db0!!!");
             databases.add(0);
         }
@@ -72,18 +73,18 @@ public class Knife4jRedisConfiguration implements EnvironmentAware , Application
         //根据指定的数据库个数来加载对应的RedisTemplate
         for (Integer database : databases) {
             String key = key1 + database;
-            RedisTemplate redisTemplate = applicationContext.getBean(key , RedisTemplate.class);
-            if(redisTemplate != null){
-                redisTemplateMap.put(key , redisTemplate);
+            RedisTemplate redisTemplate = applicationContext.getBean(key, RedisTemplate.class);
+            if (redisTemplate != null) {
+                redisTemplateMap.put(key, redisTemplate);
             }
 
             key = key2 + database;
-            if(stringRedisTemplateMap != null){
-                StringRedisTemplate stringRedisTemplate = applicationContext.getBean(key , StringRedisTemplate.class);
-                stringRedisTemplateMap.put(key , stringRedisTemplate);
+            if (stringRedisTemplateMap != null) {
+                StringRedisTemplate stringRedisTemplate = applicationContext.getBean(key, StringRedisTemplate.class);
+                stringRedisTemplateMap.put(key, stringRedisTemplate);
             }
         }
-        if(redisTemplateMap.size() == 0 && stringRedisTemplateMap.size() == 0){
+        if (redisTemplateMap.size() == 0 && stringRedisTemplateMap.size() == 0) {
             throw new RuntimeException("load redisTemplate failure , please check knife4j.redis property config!!!");
         }
         return redisTemplateMap;
@@ -98,28 +99,32 @@ public class Knife4jRedisConfiguration implements EnvironmentAware , Application
 
 
     @Bean
-    public Knife4jRedisManager knife4jRedisManager(){
-        return new Knife4jRedisManager(redisTemplateMap , stringRedisTemplateMap);
+    public Knife4jRedisManager knife4jRedisManager() {
+        return new Knife4jRedisManager(redisTemplateMap, stringRedisTemplateMap);
     }
 
     @Bean
-    public RedisBaseUtil redisBaseUtil(){
+    public RedisBaseUtil redisBaseUtil() {
         return new RedisBaseUtil();
     }
+
     @Bean
-    public RedisValUtil redisValUtil(){
+    public RedisValUtil redisValUtil() {
         return new RedisValUtil();
     }
+
     @Bean
-    public RedisListUtil redisListUtil(){
+    public RedisListUtil redisListUtil() {
         return new RedisListUtil();
     }
+
     @Bean
-    public RedisHashUtil redisHashUtil(){
+    public RedisHashUtil redisHashUtil() {
         return new RedisHashUtil();
     }
+
     @Bean
-    public RedisSetUtil redisSetUtil(){
+    public RedisSetUtil redisSetUtil() {
         return new RedisSetUtil();
     }
 

+ 1 - 1
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/manager/Knife4jRedisManager.java

@@ -17,7 +17,7 @@ public class Knife4jRedisManager {
 
     private Map<String, StringRedisTemplate> stringRedisTemplateMap;
 
-    public Knife4jRedisManager(Map<String, RedisTemplate> redisTemplateMap ,
+    public Knife4jRedisManager(Map<String, RedisTemplate> redisTemplateMap,
                                Map<String, StringRedisTemplate> stringRedisTemplateMap) {
         this.redisTemplateMap = redisTemplateMap;
         this.stringRedisTemplateMap = stringRedisTemplateMap;

+ 10 - 7
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/register/Knife4jRedisRegister.java

@@ -12,7 +12,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
 import org.springframework.beans.factory.config.ConstructorArgumentValues;
-import org.springframework.beans.factory.support.*;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.BeanDefinitionBuilder;
+import org.springframework.beans.factory.support.BeanDefinitionRegistry;
+import org.springframework.beans.factory.support.GenericBeanDefinition;
 import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
 import org.springframework.boot.context.properties.bind.Binder;
 import org.springframework.context.EnvironmentAware;
@@ -99,7 +102,7 @@ public class Knife4jRedisRegister implements EnvironmentAware, ImportBeanDefinit
                 }
                 LettucePoolingClientConfiguration.LettucePoolingClientConfigurationBuilder builder = LettucePoolingClientConfiguration.builder();
                 Duration shutdownTimeout = redisEntity.getLettuce().getShutdownTimeout();
-                if(shutdownTimeout == null){
+                if (shutdownTimeout == null) {
                     shutdownTimeout = binder.bind("knife4j.redis.shutdown-timeout", Duration.class).get();
                 }
                 if (shutdownTimeout != null) {
@@ -132,7 +135,7 @@ public class Knife4jRedisRegister implements EnvironmentAware, ImportBeanDefinit
             JsonSerialType jsonSerialType = redisEntity.getJsonSerialType();
             RedisSerializer stringRedisSerializer = null;
             Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = null;
-            if(jsonSerialType != null && jsonSerialType == JsonSerialType.Fastjson){
+            if (jsonSerialType != null && jsonSerialType == JsonSerialType.Fastjson) {
                 //若配置,则采用该方式
                 jackson2JsonRedisSerializer = new CustomFastJsonRedisSerializer<>(Object.class);
                 //ParserConfig.getGlobalInstance().setAutoTypeSupport(false);
@@ -147,10 +150,10 @@ public class Knife4jRedisRegister implements EnvironmentAware, ImportBeanDefinit
                 stringRedisSerializer = new StringRedisSerializer();
             }
             // key采用String的序列化方式,value采用json序列化方式
-            redisTemplate.getPropertyValues().add("keySerializer",stringRedisSerializer);
-            redisTemplate.getPropertyValues().add("hashKeySerializer",stringRedisSerializer);
-            redisTemplate.getPropertyValues().add("valueSerializer",jackson2JsonRedisSerializer);
-            redisTemplate.getPropertyValues().add("hashValueSerializer",jackson2JsonRedisSerializer);
+            redisTemplate.getPropertyValues().add("keySerializer", stringRedisSerializer);
+            redisTemplate.getPropertyValues().add("hashKeySerializer", stringRedisSerializer);
+            redisTemplate.getPropertyValues().add("valueSerializer", jackson2JsonRedisSerializer);
+            redisTemplate.getPropertyValues().add("hashValueSerializer", jackson2JsonRedisSerializer);
 
             //注册Bean
             beanDefinitionRegistry.registerBeanDefinition("redisTemplate" + database, redisTemplate);

+ 7 - 7
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/serializer/CustomFastJsonRedisSerializer.java

@@ -31,11 +31,11 @@ public class CustomFastJsonRedisSerializer<T> extends Jackson2JsonRedisSerialize
 
     @Override
     public byte[] serialize(Object object) {
-        if(object instanceof String){
+        if (object instanceof String) {
             String string = JSON.toJSONString(object);
             string = string.replace(target, replacement);
             return string.getBytes(DEFAULT_CHARSET);
-        }else{
+        } else {
             return super.serialize(object);
         }
     }
@@ -54,21 +54,21 @@ public class CustomFastJsonRedisSerializer<T> extends Jackson2JsonRedisSerialize
                 List<T> ts = new ArrayList<>();
                 JSONArray objects = JSONArray.parseArray(str);
                 for (Object object : objects) {
-                    ts.add(JSONObject.parseObject(JSON.toJSONString(object) ,clazz));
+                    ts.add(JSONObject.parseObject(JSON.toJSONString(object), clazz));
                 }
-                return (T)ts;
+                return (T) ts;
             } else if (typeObject instanceof JSONObject) {
                 //如果是对象类型则转换成JSONObject
                 T t = JSONObject.parseObject(str, clazz);
                 return t;
             } else {
                 //否则转换成String
-                return (T)str;
+                return (T) str;
             }
         } catch (Exception ex) {
-            try{
+            try {
                 return (T) str;
-            }catch (Exception e) {
+            } catch (Exception e) {
                 throw new SerializationException("Could not read JSON: " + ex.getMessage(), ex);
             }
         }

+ 1 - 1
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/serializer/CustomStringRedisSerializer.java

@@ -28,7 +28,7 @@ public class CustomStringRedisSerializer implements RedisSerializer<Object> {
     }
 
     public CustomStringRedisSerializer(Charset charset) {
-//        Assert.notNull(charset, "Charset must not be null!");
+        //        Assert.notNull(charset, "Charset must not be null!");
         this.charset = charset;
     }
 

+ 28 - 16
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisBaseUtil.java

@@ -21,16 +21,18 @@ public class RedisBaseUtil {
     protected int defaultDB = 0;
 
     public void delete(String key) {
-        delete(0,key);
+        delete(0, key);
     }
-    public void delete(int dbIndex ,String key) {
+
+    public void delete(int dbIndex, String key) {
         knife4jRedisManager.redisTemplate(dbIndex).delete(key);
     }
 
     public boolean set(String key, Object value) {
-        return set(0,key,value);
+        return set(0, key, value);
     }
-    public boolean set(int dbIndex ,String key, Object value) {
+
+    public boolean set(int dbIndex, String key, Object value) {
         try {
             knife4jRedisManager.redisTemplate(dbIndex).opsForValue().set(key, value);
             return true;
@@ -40,17 +42,19 @@ public class RedisBaseUtil {
         }
     }
 
-    public void delete(Collection<String> keys){
-        delete(defaultDB , keys);
+    public void delete(Collection<String> keys) {
+        delete(defaultDB, keys);
     }
-    public void delete(int dbIndex ,Collection<String> keys){
+
+    public void delete(int dbIndex, Collection<String> keys) {
         knife4jRedisManager.redisTemplate(dbIndex).delete(keys);
     }
 
     public Set<String> getKeys(String redisKey) {
-        return getKeys(0,redisKey);
+        return getKeys(0, redisKey);
     }
-    public Set<String> getKeys(int dbIndex ,String redisKey) {
+
+    public Set<String> getKeys(int dbIndex, String redisKey) {
         Set<Object> keys = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().keys(redisKey);
         Set<String> retKeys = new HashSet<>();
         for (Object key : keys) {
@@ -62,14 +66,16 @@ public class RedisBaseUtil {
     /**
      * 每个redis
      * 指定缓存失效时间
-     * @param key 键
+     *
+     * @param key  键
      * @param time 时间(秒)
      * @return
      */
     public boolean expire(String key, long time) {
-        return expire(defaultDB , key,time);
+        return expire(defaultDB, key, time);
     }
-    public boolean expire(int dbIndex ,String key, long time) {
+
+    public boolean expire(int dbIndex, String key, long time) {
         try {
             if (time > 0) {
                 knife4jRedisManager.redisTemplate(dbIndex).expire(key, time, TimeUnit.SECONDS);
@@ -80,26 +86,32 @@ public class RedisBaseUtil {
             return false;
         }
     }
+
     /**
      * 根据key 获取过期时间
+     *
      * @param key 键 不能为null
      * @return 时间(秒) 返回0代表为永久有效
      */
-    public long getExpire(int dbIndex , String key) {
+    public long getExpire(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).getExpire(key, TimeUnit.SECONDS);
     }
+
     public long getExpire(String key) {
-        return getExpire(defaultDB , key);
+        return getExpire(defaultDB, key);
     }
+
     /**
      * 判断key是否存在
+     *
      * @param key 键
      * @return true 存在 false不存在
      */
     public boolean hasKey(String key) {
-        return hasKey(defaultDB , key);
+        return hasKey(defaultDB, key);
     }
-    public boolean hasKey(int dbIndex ,String key) {
+
+    public boolean hasKey(int dbIndex, String key) {
         try {
             return knife4jRedisManager.redisTemplate(dbIndex).hasKey(key);
         } catch (Exception e) {

+ 89 - 61
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisHashUtil.java

@@ -1,7 +1,6 @@
 package com.gyee.wisdom.it235.util;
 
 
-
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -17,110 +16,127 @@ import java.util.*;
  * @date: Created in 2020/9/28 0:06
  */
 @ConditionalOnBean(RedisBaseUtil.class)
-public class RedisHashUtil extends RedisBaseUtil{
+public class RedisHashUtil extends RedisBaseUtil {
 
     /**
      * 存储单个值至map中
+     *
      * @param redisKey redisKey中的key
-     * @param mapKey  map所对应的key
-     * @param value map所对应的值
+     * @param mapKey   map所对应的key
+     * @param value    map所对应的值
      */
-    public void addMapOne(String redisKey , String mapKey , Object value) {
-        addMapOne(defaultDB , redisKey , mapKey , value);
+    public void addMapOne(String redisKey, String mapKey, Object value) {
+        addMapOne(defaultDB, redisKey, mapKey, value);
     }
-    public void addMapOne(int dbIndex ,String redisKey , String mapKey , Object value) {
-        knife4jRedisManager.redisTemplate(dbIndex).opsForHash().put(redisKey, mapKey,value);
+
+    public void addMapOne(int dbIndex, String redisKey, String mapKey, Object value) {
+        knife4jRedisManager.redisTemplate(dbIndex).opsForHash().put(redisKey, mapKey, value);
     }
 
     /**
      * 存储整个map至redis
+     *
      * @param key redis中存储的key
      * @param map 需缓存的Map
      */
-    public void addMapAll(String key , Map map) {
-        addMapAll(defaultDB ,key,map);
+    public void addMapAll(String key, Map map) {
+        addMapAll(defaultDB, key, map);
     }
-    public void addMapAll(int dbIndex ,String key , Map map) {
+
+    public void addMapAll(int dbIndex, String key, Map map) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForHash().putAll(key, map);
     }
 
     /**
      * 获取整个HashMap
-     * @param redisKey redis中存储的key
-     * @param keyType map中key的类型
+     *
+     * @param redisKey  redis中存储的key
+     * @param keyType   map中key的类型
      * @param valueType map中value的类型
      * @return 整个Map
      */
-    public <K,V> Map<K , V> getMapAll(String redisKey , Class<K> keyType , Class<V> valueType) {
-        return getMapAll(defaultDB , redisKey ,keyType , valueType);
+    public <K, V> Map<K, V> getMapAll(String redisKey, Class<K> keyType, Class<V> valueType) {
+        return getMapAll(defaultDB, redisKey, keyType, valueType);
     }
-    public <K,V> Map<K , V> getMapAll(int dbIndex ,String redisKey , Class<K> keyType , Class<V> valueType) {
-        Map<Object, Object> entries = getMapAll(dbIndex ,redisKey);
-        Type type = new TypeReference<Map<K, V>>(keyType, valueType) {}.getType();
-        Map<K,V> retEntries = JSONArray.parseObject(JSON.toJSONString(entries), type);
+
+    public <K, V> Map<K, V> getMapAll(int dbIndex, String redisKey, Class<K> keyType, Class<V> valueType) {
+        Map<Object, Object> entries = getMapAll(dbIndex, redisKey);
+        Type type = new TypeReference<Map<K, V>>(keyType, valueType) {
+        }.getType();
+        Map<K, V> retEntries = JSONArray.parseObject(JSON.toJSONString(entries), type);
         return retEntries;
     }
 
 
-    public Map<Object , Object> getMapAll(String redisKey) {
-        return getMapAll(defaultDB ,redisKey);
+    public Map<Object, Object> getMapAll(String redisKey) {
+        return getMapAll(defaultDB, redisKey);
     }
-    public Map<Object , Object> getMapAll(int dbIndex ,String redisKey) {
+
+    public Map<Object, Object> getMapAll(int dbIndex, String redisKey) {
         Map<Object, Object> entries = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().entries(redisKey);
         return entries;
     }
 
     /**
      * 获取redis中hash的所有value
+     *
      * @param redisKey
      * @return
      */
     public List<Object> getMapValues(String redisKey) {
-        return getMapValues(defaultDB ,redisKey);
+        return getMapValues(defaultDB, redisKey);
     }
-    public List<Object> getMapValues(int dbIndex ,String redisKey) {
+
+    public List<Object> getMapValues(int dbIndex, String redisKey) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().values(redisKey);
     }
 
     /**
      * 删除Map中的某个键值对
+     *
      * @param redisKey
      * @param mapKey
      * @return 返回影响数量
      */
-    public Long deleteMapVal(String redisKey , Object ... mapKey) {
-        return deleteMapVal(defaultDB , redisKey , mapKey);
+    public Long deleteMapVal(String redisKey, Object... mapKey) {
+        return deleteMapVal(defaultDB, redisKey, mapKey);
     }
-    public Long deleteMapVal(int dbIndex ,String redisKey , Object ... mapKey) {
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().delete(redisKey , mapKey);
+
+    public Long deleteMapVal(int dbIndex, String redisKey, Object... mapKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().delete(redisKey, mapKey);
     }
+
     /**
      * 确定hashkey是否存在
+     *
      * @param redisKey redis存储的key
-     * @param mapKey 需要确定的map对象key
+     * @param mapKey   需要确定的map对象key
      * @return
      */
-    public boolean hasKey(String redisKey , String mapKey) {
-        return hasKey(defaultDB ,redisKey ,mapKey);
+    public boolean hasKey(String redisKey, String mapKey) {
+        return hasKey(defaultDB, redisKey, mapKey);
     }
-    public boolean hasKey(int dbIndex ,String redisKey , String mapKey) {
-        return	knife4jRedisManager.redisTemplate(dbIndex).opsForHash().hasKey(redisKey , mapKey);
+
+    public boolean hasKey(int dbIndex, String redisKey, String mapKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().hasKey(redisKey, mapKey);
     }
 
     /**
      * 取出Map中的属性为JSONArray的值,并转换为List
+     *
      * @param redisKey
      * @param mapKey
      * @param t
      * @param <T>
      * @return
      */
-    public <T> List<T> getMapValAtList(String redisKey, String mapKey , Class<T> t){
-        return getMapValAtList(defaultDB , redisKey ,mapKey ,t);
+    public <T> List<T> getMapValAtList(String redisKey, String mapKey, Class<T> t) {
+        return getMapValAtList(defaultDB, redisKey, mapKey, t);
     }
-    public <T> List<T> getMapValAtList(int dbIndex ,String redisKey, String mapKey , Class<T> t){
+
+    public <T> List<T> getMapValAtList(int dbIndex, String redisKey, String mapKey, Class<T> t) {
         Object mapVal = getMapVal(redisKey, mapKey);
-        if(mapVal == null){
+        if (mapVal == null) {
             return null;
         }
         List<T> ts = JSONArray.parseArray(String.valueOf(mapVal), t);
@@ -129,75 +145,85 @@ public class RedisHashUtil extends RedisBaseUtil{
 
     /**
      * 取出Map中的属性为单值或Bean对象的数据,并转化成Bean
+     *
      * @param redisKey
      * @param mapKey
      * @param t
      * @param <T>
      * @return
      */
-    public <T> T getMapValAtBean(String redisKey, String mapKey , Class<T> t){
-        return getMapValAtBean(defaultDB , redisKey,mapKey,t);
+    public <T> T getMapValAtBean(String redisKey, String mapKey, Class<T> t) {
+        return getMapValAtBean(defaultDB, redisKey, mapKey, t);
     }
-    public <T> T getMapValAtBean(int dbIndex ,String redisKey, String mapKey , Class<T> t){
+
+    public <T> T getMapValAtBean(int dbIndex, String redisKey, String mapKey, Class<T> t) {
         Object mapVal = getMapVal(redisKey, mapKey);
-        if(mapVal == null){
+        if (mapVal == null) {
             return null;
         }
-        if(mapVal instanceof String){
-            return (T)String.valueOf(mapVal);
+        if (mapVal instanceof String) {
+            return (T) String.valueOf(mapVal);
         }
         return JSONObject.parseObject(String.valueOf(mapVal), t);
     }
 
     public Object getMapVal(String redisKey, String mapKey) {
-        return  getMapVal(defaultDB ,redisKey ,mapKey);
+        return getMapVal(defaultDB, redisKey, mapKey);
     }
-    public Object getMapVal(int dbIndex ,String redisKey, String mapKey) {
+
+    public Object getMapVal(int dbIndex, String redisKey, String mapKey) {
         Object o = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().get(redisKey, mapKey);
         return o;
     }
 
     public void setMapVal(String redisKey, String mapKey, String mapValue) {
-        setMapVal(defaultDB , redisKey , mapKey ,mapValue);
+        setMapVal(defaultDB, redisKey, mapKey, mapValue);
     }
-    public void setMapVal(int dbIndex ,String redisKey, String mapKey, String mapValue) {
+
+    public void setMapVal(int dbIndex, String redisKey, String mapKey, String mapValue) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForHash().put(redisKey, mapKey, mapValue);
     }
 
     /**
      * 从哈希中获取给定key的值
+     *
      * @param redisKey redis存储的key
-     * @param mapKeys 需要去出的key的集合
+     * @param mapKeys  需要去出的key的集合
      * @return 值列表
      */
-    public <T> List<T> multiGetHash(String redisKey , List<Object> mapKeys , Class<T> valueType) {
-        return multiGetHash(defaultDB , redisKey , mapKeys , valueType);
+    public <T> List<T> multiGetHash(String redisKey, List<Object> mapKeys, Class<T> valueType) {
+        return multiGetHash(defaultDB, redisKey, mapKeys, valueType);
     }
-    public <T> List<T> multiGetHash(int dbIndex ,String redisKey , List<Object> mapKeys , Class<T> valueType) {
+
+    public <T> List<T> multiGetHash(int dbIndex, String redisKey, List<Object> mapKeys, Class<T> valueType) {
         List<T> retList = new ArrayList<>();
         List<Object> objects = multiGetHash(redisKey, mapKeys);
         for (Object object : objects) {
             T t = JSONObject.parseObject(String.valueOf(object), valueType);
             retList.add(t);
         }
-        return  retList;
+        return retList;
     }
-    public List<Object> multiGetHash(String redisKey , List<Object> mapKeys) {
-        return multiGetHash(defaultDB , redisKey ,mapKeys);
+
+    public List<Object> multiGetHash(String redisKey, List<Object> mapKeys) {
+        return multiGetHash(defaultDB, redisKey, mapKeys);
     }
-    public List<Object> multiGetHash(int dbIndex ,String redisKey , List<Object> mapKeys) {
-        return  knife4jRedisManager.redisTemplate(dbIndex).opsForHash().multiGet(redisKey , mapKeys);
+
+    public List<Object> multiGetHash(int dbIndex, String redisKey, List<Object> mapKeys) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().multiGet(redisKey, mapKeys);
     }
 
     /**
      * 获取所有map中的key
+     *
      * @param redisKey
      * @return
      */
     public Set<String> getHashKeys(String redisKey) {
-        return getHashKeys(defaultDB , redisKey);
+        return getHashKeys(defaultDB, redisKey);
     }
-    public Set<String> getHashKeys(int dbIndex ,String redisKey) {
+
+    public Set<String> getHashKeys(int dbIndex, String redisKey) {
         Set<Object> keys = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().keys(redisKey);
         Set<String> retKeys = new HashSet<>();
         for (Object key : keys) {
@@ -208,15 +234,17 @@ public class RedisHashUtil extends RedisBaseUtil{
 
     /**
      * 获取所有map中的key的数量
+     *
      * @param redisKey redis中的key
      * @return key的数量
      */
     public int getHashSize(String redisKey) {
-        return getHashSize(defaultDB , redisKey);
+        return getHashSize(defaultDB, redisKey);
     }
-    public int getHashSize(int dbIndex ,String redisKey) {
+
+    public int getHashSize(int dbIndex, String redisKey) {
         Set<Object> keys = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().keys(redisKey);
-        if(keys == null){
+        if (keys == null) {
             return 0;
         }
         return keys.size();

+ 68 - 47
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisListUtil.java

@@ -18,62 +18,72 @@ public class RedisListUtil extends RedisBaseUtil {
 
     /**
      * 在list集合最前面插入数据
-     * @param key  需要操作的key
+     *
+     * @param key    需要操作的key
      * @param values 待添加的值
      * @return
      */
-    public Long insert(String key, Object ... values) {
-        return insert(defaultDB ,key , values);
+    public Long insert(String key, Object... values) {
+        return insert(defaultDB, key, values);
     }
-    public Long insert(int dbIndex ,String key, Object ... values) {
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPushAll(key ,values);
+
+    public Long insert(int dbIndex, String key, Object... values) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPushAll(key, values);
 
     }
+
     public Long insert(String key, Collection<?>... values) {
-        return insert(defaultDB , key ,values);
+        return insert(defaultDB, key, values);
     }
-    public Long insert(int dbIndex ,String key, Collection<?>... values) {
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPushAll(key,key);//values);
+
+    public Long insert(int dbIndex, String key, Collection<?>... values) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPushAll(key, key);//values);
     }
 
     /**
      * 在list集合最后面追加数据
-     * @param key  需要操作的key
+     *
+     * @param key    需要操作的key
      * @param values 待添加的值
      * @return
      */
     public Long append(String key, Object... values) {
-        return append(defaultDB , key , values);
+        return append(defaultDB, key, values);
     }
-    public Long append(int dbIndex ,String key, Object... values) {
+
+    public Long append(int dbIndex, String key, Object... values) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForList().rightPushAll(key, values);
     }
 
     /**
      * 在指定索引处添加数据,如果存在则为替换
-     * @param key 需要操作的key
+     *
+     * @param key   需要操作的key
      * @param index 指定索引,该索引从0开始
      * @param value 待添加的值
      */
     public void set(String key, long index, Object value) {
-        set(defaultDB , key ,index,value);
+        set(defaultDB, key, index, value);
     }
-    public void set(int dbIndex ,String key, long index, Object value) {
-        knife4jRedisManager.redisTemplate(dbIndex).opsForList().set(key , index ,value);
+
+    public void set(int dbIndex, String key, long index, Object value) {
+        knife4jRedisManager.redisTemplate(dbIndex).opsForList().set(key, index, value);
     }
 
 
     /**
      * 取出某个范围的集合数据
-     * @param key 需要操作的key
+     *
+     * @param key   需要操作的key
      * @param start 集合起点,索引从0开始
-     * @param end 集合终点,若为-1则表示取出所有
+     * @param end   集合终点,若为-1则表示取出所有
      * @return 返回所有对象
      */
-    public <T> List<T> getList(String key, long start, long end , Class<T> t) {
-        return getList(defaultDB , key , start , end , t);
+    public <T> List<T> getList(String key, long start, long end, Class<T> t) {
+        return getList(defaultDB, key, start, end, t);
     }
-    public <T> List<T> getList(int dbIndex ,String key, long start, long end , Class<T> t) {
+
+    public <T> List<T> getList(int dbIndex, String key, long start, long end, Class<T> t) {
         //此处返回的真实类型是JSONArray
         List<Object> list = knife4jRedisManager.redisTemplate(dbIndex).opsForList().range(key, start, end);
         List<T> ts = JSONArray.parseArray(String.valueOf(list), t);
@@ -82,15 +92,17 @@ public class RedisListUtil extends RedisBaseUtil {
 
     /**
      * 获取redis集合类型所有元素
+     *
      * @param key
      * @param t
      * @param <T>
      * @return
      */
-    public <T> List<T> getListAll(String key , Class<T> t) {
-        return getListAll(defaultDB , key , t);
+    public <T> List<T> getListAll(String key, Class<T> t) {
+        return getListAll(defaultDB, key, t);
     }
-    public <T> List<T> getListAll(int dbIndex ,String key , Class<T> t) {
+
+    public <T> List<T> getListAll(int dbIndex, String key, Class<T> t) {
         List<Object> list = knife4jRedisManager.redisTemplate(dbIndex).opsForList().range(key, 0, -1);
         List<T> ts = JSONArray.parseArray(JSONObject.toJSONString(list), t);
         return ts;
@@ -98,76 +110,85 @@ public class RedisListUtil extends RedisBaseUtil {
 
     /**
      * 返回list集合的大小
+     *
      * @param key 需要操作的key
      * @return
      */
     public Long size(String key) {
-        return size(defaultDB , key);
+        return size(defaultDB, key);
     }
-    public Long size(int dbIndex ,String key) {
+
+    public Long size(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForList().size(key);
     }
 
     /**
      * 返回某个索引处的数据
-     * @param key  需要操作的key
+     *
+     * @param key   需要操作的key
      * @param index 索引 下标从0开始
      * @return
      */
-    public <T> T getByIndex(String key , long index , Class<T> clazz) {
-        return getByIndex(defaultDB , key , index , clazz);
+    public <T> T getByIndex(String key, long index, Class<T> clazz) {
+        return getByIndex(defaultDB, key, index, clazz);
     }
-    public <T> T getByIndex(int dbIndex ,String key , long index , Class<T> clazz) {
+
+    public <T> T getByIndex(int dbIndex, String key, long index, Class<T> clazz) {
         Object obj = knife4jRedisManager.redisTemplate(dbIndex).opsForList().index(key, index);
-        return JSONObject.parseObject(String.valueOf(obj) , clazz);
+        return JSONObject.parseObject(String.valueOf(obj), clazz);
     }
 
     /**
      * 弹出最左边数据,弹出后集合将不存在该数据
+     *
      * @param key
      * @return
      */
-    public <T> T popLeft(String key , Class<T> clazz) {
-        return  popLeft(defaultDB , key , clazz);
+    public <T> T popLeft(String key, Class<T> clazz) {
+        return popLeft(defaultDB, key, clazz);
     }
-    public <T> T popLeft(int dbIndex ,String key , Class<T> clazz) {
+
+    public <T> T popLeft(int dbIndex, String key, Class<T> clazz) {
         Object obj = knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPop(key);
-        if(obj == null){
+        if (obj == null) {
             return null;
         }
-        return JSONObject.parseObject(String.valueOf(obj) , clazz);
+        return JSONObject.parseObject(String.valueOf(obj), clazz);
     }
 
     /**
      * 弹出最右边数据,弹出后集合将不存在该数据
+     *
      * @param key
      * @return
      */
-    public <T> T  popRight(String key , Class<T> clazz) {
-        return popRight(defaultDB , key , clazz);
+    public <T> T popRight(String key, Class<T> clazz) {
+        return popRight(defaultDB, key, clazz);
     }
-    public <T> T  popRight(int dbIndex ,String key , Class<T> clazz) {
+
+    public <T> T popRight(int dbIndex, String key, Class<T> clazz) {
         Object obj = knife4jRedisManager.redisTemplate(dbIndex).opsForList().rightPop(key);
-        if(obj == null){
+        if (obj == null) {
             return null;
         }
-        return JSONObject.parseObject(String.valueOf(obj) , clazz);
+        return JSONObject.parseObject(String.valueOf(obj), clazz);
     }
 
     /**
      * 直接删除数据,该数据从某个位置开始
+     *
      * @param key   删除的key
-     * @param count
-     *          大于0,表示删除从左往右数,值为value的第一个数据
-     *          小于0,表示删除从右往左数,值为value的第一个数据
-     *          等于0,表示删除值为value的所有数据
+     * @param count 大于0,表示删除从左往右数,值为value的第一个数据
+     *              小于0,表示删除从右往左数,值为value的第一个数据
+     *              等于0,表示删除值为value的所有数据
      * @param value 被删除的数据
      * @return
      */
     public Long remove(String key, long count, Object value) {
-        return remove(defaultDB , key , count , value);
+        return remove(defaultDB, key, count, value);
     }
-    public Long remove(int dbIndex ,String key, long count, Object value) {
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().remove(key, count , value);
+
+    public Long remove(int dbIndex, String key, long count, Object value) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForList().remove(key, count, value);
     }
 }

+ 130 - 86
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisSetUtil.java

@@ -14,106 +14,122 @@ import java.util.Set;
  * @date: Created in 2020/9/28 11:36
  */
 @ConditionalOnBean(RedisBaseUtil.class)
-public class RedisSetUtil extends RedisBaseUtil{
+public class RedisSetUtil extends RedisBaseUtil {
 
     /**
      * 向set中添加元素
-     * @param key  需要操作的key
+     *
+     * @param key    需要操作的key
      * @param values 返回添加的个数
      * @return
      */
-    public Long add(String key, Object ... values) {
-        return add(defaultDB , key ,values);
+    public Long add(String key, Object... values) {
+        return add(defaultDB, key, values);
     }
-    public Long add(int dbIndex ,String key, Object ... values) {
+
+    public Long add(int dbIndex, String key, Object... values) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().add(key, values);
     }
 
     /**
      * 获取set的size大小
+     *
      * @param key 键
      * @return
      */
     public Long size(String key) {
-        return size(defaultDB , key);
+        return size(defaultDB, key);
     }
-    public Long size(int dbIndex ,String key) {
+
+    public Long size(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().size(key);
     }
 
     /**
      * 判断 member 元素是否是集合 key 的成员
-     * @param key  需要操作的key
+     *
+     * @param key    需要操作的key
      * @param member 待确认的元素
      * @return
      */
-    public Boolean hasMember(String key , Object member){
-        return hasMember(defaultDB ,key ,member);
+    public Boolean hasMember(String key, Object member) {
+        return hasMember(defaultDB, key, member);
     }
-    public Boolean hasMember(int dbIndex ,String key , Object member){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().isMember(key , member);
+
+    public Boolean hasMember(int dbIndex, String key, Object member) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().isMember(key, member);
     }
 
     /**
      * 返回集合中的所有成员
+     *
      * @param key
      * @return
      */
-    public Set<Object> getAll(String key){
-        return getAll(defaultDB ,key);
+    public Set<Object> getAll(String key) {
+        return getAll(defaultDB, key);
     }
-    public Set<Object> getAll(int dbIndex ,String key){
+
+    public Set<Object> getAll(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().members(key);
     }
 
     /**
      * 随机获取key无序集合中的一个元素
+     *
      * @param key
      * @return
      */
-    public Object randomMember(String key){
-        return randomMember(defaultDB , key);
+    public Object randomMember(String key) {
+        return randomMember(defaultDB, key);
     }
-    public Object randomMember(int dbIndex ,String key){
+
+    public Object randomMember(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().randomMember(key);
     }
 
     /**
      * 随机获取多个无序集合中的元素
+     *
      * @param key
      * @param count 获取的个数
      * @return
      */
-    public List<Object> randomMembers(String key, long count){
-        return randomMembers(defaultDB ,key ,count);
+    public List<Object> randomMembers(String key, long count) {
+        return randomMembers(defaultDB, key, count);
     }
-    public List<Object> randomMembers(int dbIndex ,String key, long count){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().randomMembers(key , count);
+
+    public List<Object> randomMembers(int dbIndex, String key, long count) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().randomMembers(key, count);
     }
 
     /**
      * 随机获取多个无序集合中的元素(去重)
+     *
      * @param key
      * @param count 获取的个数
      * @return
      */
-    public Set<Object> distinctRandomMembers(String key, long count){
-        return distinctRandomMembers(defaultDB , key ,count);
+    public Set<Object> distinctRandomMembers(String key, long count) {
+        return distinctRandomMembers(defaultDB, key, count);
     }
-    public Set<Object> distinctRandomMembers(int dbIndex ,String key, long count){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().distinctRandomMembers(key , count);
+
+    public Set<Object> distinctRandomMembers(int dbIndex, String key, long count) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().distinctRandomMembers(key, count);
     }
 
     /**
      * 遍历set
+     *
      * @param key
      * @return
      */
-    public Cursor<Object> scan(String key){
-        return scan(defaultDB ,key);
+    public Cursor<Object> scan(String key) {
+        return scan(defaultDB, key);
     }
-    public Cursor<Object> scan(int dbIndex , String key){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().scan(key , ScanOptions.NONE);
+
+    public Cursor<Object> scan(int dbIndex, String key) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().scan(key, ScanOptions.NONE);
         /*
             while(curosr.hasNext()){
                 System.out.println(curosr.next());
@@ -123,191 +139,219 @@ public class RedisSetUtil extends RedisBaseUtil{
 
     /**
      * 移除集合中一个或多个成员
+     *
      * @param key
      * @param values
      * @return
      */
-    public Long remove(String key, Object... values){
-        return remove(defaultDB , key , values);
+    public Long remove(String key, Object... values) {
+        return remove(defaultDB, key, values);
     }
-    public Long remove(int dbIndex ,String key, Object... values){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().remove(key ,values);
+
+    public Long remove(int dbIndex, String key, Object... values) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().remove(key, values);
     }
 
     /**
      * 将 member 元素从 source 集合移动到 destination 集合
+     *
      * @param key
      * @param value
      * @param destKey
      * @return
      */
-    public Boolean move(String key, Object value, String destKey){
-        return move(defaultDB , key ,value ,destKey);
+    public Boolean move(String key, Object value, String destKey) {
+        return move(defaultDB, key, value, destKey);
     }
-    public Boolean move(int dbIndex ,String key, Object value, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().move(key ,value , destKey);
+
+    public Boolean move(int dbIndex, String key, Object value, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().move(key, value, destKey);
     }
 
     /**
      * 交集:返回2个集合的交集
+     *
      * @param key
      * @param otherKey
      * @return
      */
-    public Set<Object> intersect(String key, String otherKey){
-        return intersect(defaultDB , key , otherKey);
+    public Set<Object> intersect(String key, String otherKey) {
+        return intersect(defaultDB, key, otherKey);
     }
-    public Set<Object> intersect(int dbIndex ,String key, String otherKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersect(key , otherKey);
+
+    public Set<Object> intersect(int dbIndex, String key, String otherKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersect(key, otherKey);
     }
 
     /**
      * 交集:返回1个key和其他多个key的交集
+     *
      * @param key
      * @param otherKeys
      * @return
      */
-    public Set<Object> intersect(String key, Collection<String> otherKeys){
-        return intersect(defaultDB , key , otherKeys);
+    public Set<Object> intersect(String key, Collection<String> otherKeys) {
+        return intersect(defaultDB, key, otherKeys);
     }
-    public Set<Object> intersect(int dbIndex ,String key, Collection<String> otherKeys){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersect(key , otherKeys);
+
+    public Set<Object> intersect(int dbIndex, String key, Collection<String> otherKeys) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersect(key, otherKeys);
     }
 
     /**
      * 交集:key无序集合与otherkey无序集合的交集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKey
      * @param destKey
      * @return
      */
-    public Long intersectAndStore(String key, String otherKey, String destKey){
-        return intersectAndStore(defaultDB , key ,otherKey ,destKey);
+    public Long intersectAndStore(String key, String otherKey, String destKey) {
+        return intersectAndStore(defaultDB, key, otherKey, destKey);
     }
-    public Long intersectAndStore(int dbIndex ,String key, String otherKey, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersectAndStore(key , otherKey , destKey);
+
+    public Long intersectAndStore(int dbIndex, String key, String otherKey, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersectAndStore(key, otherKey, destKey);
     }
 
     /**
      * 交集:key对应的无序集合与多个otherKey对应的无序集合求交集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKeys
      * @param destKey
      * @return
      */
-    public Long intersectAndStore(String key, Collection<String> otherKeys, String destKey){
-        return intersectAndStore(defaultDB ,key , otherKeys ,destKey);
+    public Long intersectAndStore(String key, Collection<String> otherKeys, String destKey) {
+        return intersectAndStore(defaultDB, key, otherKeys, destKey);
     }
-    public Long intersectAndStore(int dbIndex ,String key, Collection<String> otherKeys, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersectAndStore(key , otherKeys , destKey);
+
+    public Long intersectAndStore(int dbIndex, String key, Collection<String> otherKeys, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().intersectAndStore(key, otherKeys, destKey);
     }
 
     /**
      * 并集:key无序集合与otherKey无序集合的并集
+     *
      * @param key
      * @param otherKey
      * @return
      */
-    public Set<Object> union(String key, String otherKey){
-        return union(defaultDB ,key ,otherKey);
+    public Set<Object> union(String key, String otherKey) {
+        return union(defaultDB, key, otherKey);
     }
-    public Set<Object> union(int dbIndex ,String key, String otherKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().union(key , otherKey);
+
+    public Set<Object> union(int dbIndex, String key, String otherKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().union(key, otherKey);
     }
 
     /**
      * 并集:key无序集合与多个otherKey无序集合的并集
+     *
      * @param key
      * @param otherKeys
      * @return
      */
-    public Set<Object> union(String key, Collection<String> otherKeys){
-        return union(defaultDB , key , otherKeys);
+    public Set<Object> union(String key, Collection<String> otherKeys) {
+        return union(defaultDB, key, otherKeys);
     }
-    public Set<Object> union(int dbIndex ,String key, Collection<String> otherKeys){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().union(key , otherKeys);
+
+    public Set<Object> union(int dbIndex, String key, Collection<String> otherKeys) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().union(key, otherKeys);
     }
 
     /**
      * 并集:key无序集合与otherkey无序集合的并集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKey
      * @param destKey
      * @return
      */
-    public Long unionAndStore(String key, String otherKey, String destKey){
-        return unionAndStore(defaultDB , key , otherKey , destKey);
+    public Long unionAndStore(String key, String otherKey, String destKey) {
+        return unionAndStore(defaultDB, key, otherKey, destKey);
     }
-    public Long unionAndStore(int dbIndex ,String key, String otherKey, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().unionAndStore(key , otherKey , destKey);
+
+    public Long unionAndStore(int dbIndex, String key, String otherKey, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().unionAndStore(key, otherKey, destKey);
     }
 
     /**
      * 并集:key无序集合与多个otherkey无序集合的并集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKeys
      * @param destKey
      * @return
      */
-    public Long unionAndStore(String key, Collection<String> otherKeys, String destKey){
-        return unionAndStore(defaultDB , key , otherKeys , destKey);
+    public Long unionAndStore(String key, Collection<String> otherKeys, String destKey) {
+        return unionAndStore(defaultDB, key, otherKeys, destKey);
     }
-    public Long unionAndStore(int dbIndex ,String key, Collection<String> otherKeys, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().unionAndStore(key , otherKeys , destKey);
+
+    public Long unionAndStore(int dbIndex, String key, Collection<String> otherKeys, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().unionAndStore(key, otherKeys, destKey);
     }
 
     /**
      * 差集:key无序集合与otherKey无序集合的差集
+     *
      * @param key
      * @param otherKey
      * @return
      */
-    public Set<Object> difference(String key, String otherKey){
-        return difference(defaultDB ,key ,otherKey);
+    public Set<Object> difference(String key, String otherKey) {
+        return difference(defaultDB, key, otherKey);
     }
-    public Set<Object> difference(int dbIndex ,String key, String otherKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().difference(key , otherKey);
+
+    public Set<Object> difference(int dbIndex, String key, String otherKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().difference(key, otherKey);
     }
 
     /**
      * 差集:key无序集合与多个otherKey无序集合的差集
+     *
      * @param key
      * @param otherKeys
      * @return
      */
-    public Set<Object> difference(String key, Collection<String> otherKeys){
-        return difference(defaultDB , key , otherKeys);
+    public Set<Object> difference(String key, Collection<String> otherKeys) {
+        return difference(defaultDB, key, otherKeys);
 
     }
-    public Set<Object> difference(int dbIndex ,String key, Collection<String> otherKeys){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().difference(key , otherKeys);
+
+    public Set<Object> difference(int dbIndex, String key, Collection<String> otherKeys) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().difference(key, otherKeys);
     }
 
     /**
      * 差集:key无序集合与otherkey无序集合的差集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKey
      * @param destKey
      * @return
      */
-    public Long differenceAndStore(String key, String otherKey, String destKey){
-        return differenceAndStore(defaultDB , key , otherKey , destKey);
+    public Long differenceAndStore(String key, String otherKey, String destKey) {
+        return differenceAndStore(defaultDB, key, otherKey, destKey);
     }
-    public Long differenceAndStore(int dbIndex ,String key, String otherKey, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().differenceAndStore(key , otherKey , destKey);
+
+    public Long differenceAndStore(int dbIndex, String key, String otherKey, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().differenceAndStore(key, otherKey, destKey);
     }
 
     /**
      * 差集:key无序集合与多个otherkey无序集合的差集存储到destKey无序集合中
+     *
      * @param key
      * @param otherKeys
      * @param destKey
      * @return
      */
-    public Long differenceAndStore(String key, Collection<String> otherKeys, String destKey){
-        return differenceAndStore(defaultDB , key , otherKeys , destKey);
+    public Long differenceAndStore(String key, Collection<String> otherKeys, String destKey) {
+        return differenceAndStore(defaultDB, key, otherKeys, destKey);
     }
-    public Long differenceAndStore(int dbIndex ,String key, Collection<String> otherKeys, String destKey){
-        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().differenceAndStore(key , otherKeys , destKey);
+
+    public Long differenceAndStore(int dbIndex, String key, Collection<String> otherKeys, String destKey) {
+        return knife4jRedisManager.redisTemplate(dbIndex).opsForSet().differenceAndStore(key, otherKeys, destKey);
     }
 }

+ 103 - 85
timeseries/dao-redis/src/main/java/com/gyee/wisdom/it235/util/RedisValUtil.java

@@ -7,7 +7,6 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
 import org.springframework.data.redis.connection.RedisConnection;
 
 import java.io.UnsupportedEncodingException;
-import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.ThreadLocalRandom;
 import java.util.concurrent.TimeUnit;
@@ -29,9 +28,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @return true成功 false失败
      */
     public boolean set(String key, Object value) {
-        return  set(defaultDB , key ,value);
+        return set(defaultDB, key, value);
     }
-    public boolean set(int dbIndex ,String key, Object value) {
+
+    public boolean set(int dbIndex, String key, Object value) {
         try {
             knife4jRedisManager.redisTemplate(dbIndex).opsForValue().set(key, value);
             return true;
@@ -48,9 +48,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @return
      */
     public String get(String key) {
-        return get(defaultDB ,key);
+        return get(defaultDB, key);
     }
-    public String get(int dbIndex ,String key) {
+
+    public String get(int dbIndex, String key) {
         Object result = knife4jRedisManager.redisTemplate(dbIndex).opsForValue().get(key);
         return result == null ? null : result.toString();
     }
@@ -58,79 +59,82 @@ public class RedisValUtil extends RedisBaseUtil {
     public byte[] getBytes(int dbIndex, String key) {
         try {
             byte[] bkey = key.getBytes("ascii");
-            return (byte[]) knife4jRedisManager.redisTemplate(dbIndex).execute((RedisConnection redisConnection) ->redisConnection.get(bkey));
-        } catch (Exception e) {}
+            return (byte[]) knife4jRedisManager.redisTemplate(dbIndex).execute((RedisConnection redisConnection) -> redisConnection.get(bkey));
+        } catch (Exception e) {
+        }
 
         return null;
 
     }
 
-    public List<byte[]> getBytesList(int dbIndex,List<String> keyList){
-        List<byte[]> resultList=new ArrayList<>();
+    public List<byte[]> getBytesList(int dbIndex, List<String> keyList) {
+        List<byte[]> resultList = new ArrayList<>();
         try {
             byte[][] rawKeys = new byte[keyList.size()][];
             for (int i = 0; i < keyList.size(); i++) {
-                rawKeys[i]=keyList.get(i).getBytes("ascii");
+                rawKeys[i] = keyList.get(i).getBytes("ascii");
             }
 
             resultList = knife4jRedisManager.redisTemplate(dbIndex).getConnectionFactory().getConnection().mGet(rawKeys);
-        }catch (Exception ex){
+        } catch (Exception ex) {
 
-        }finally {
+        } finally {
             return resultList;
         }
     }
 
     //将数据转化为二进制进行存储
-    public boolean setBytesList(int dbIndex,List<String> keyList) throws UnsupportedEncodingException {
+    public boolean setBytesList(int dbIndex, List<String> keyList) throws UnsupportedEncodingException {
         Map<byte[], byte[]> b = new HashMap<>();
-            byte[][] rawKeys = new byte[keyList.size()][];
-            double min = 1.0;
-            double max = 10.0;
-            for (int i = 0; i < keyList.size(); i++) {
-                rawKeys[i] = keyList.get(i).getBytes("ascii");
-                byte[] bb = {};
-                //随机生成double
-                double generatedDouble = ThreadLocalRandom.current().nextDouble(min, max);
-                byte[] bt1 = ByteUtil.putDouble(bb, generatedDouble, 0);
-                long time = new Date().getTime();
-                byte[] bt2 = ByteUtil.putLong(bb, time, 0);
-                byte[] bt3 = new byte[bt1.length+bt2.length];
-                bt3[0] = bt1[0];
-                bt3[1] = bt1[1];
-                bt3[2] = bt1[2];
-                bt3[3] = bt1[3];
-                bt3[4] = bt1[4];
-                bt3[5] = bt1[5];
-                bt3[6] = bt1[6];
-                bt3[7] = bt1[7];
-                bt3[8] = bt2[0];
-                bt3[9] = bt2[1];
-                bt3[10] = bt2[2];
-                bt3[11] = bt2[3];
-                bt3[12] = bt2[4];
-                bt3[13] = bt2[5];
-                bt3[14] = bt2[6];
-                bt3[15] = bt2[7];
-                b.put(rawKeys[i], bt3);
-            }
-           return knife4jRedisManager.redisTemplate(2).getConnectionFactory().getConnection().mSet(b);
+        byte[][] rawKeys = new byte[keyList.size()][];
+        double min = 1.0;
+        double max = 10.0;
+        for (int i = 0; i < keyList.size(); i++) {
+            rawKeys[i] = keyList.get(i).getBytes("ascii");
+            byte[] bb = {};
+            //随机生成double
+            double generatedDouble = ThreadLocalRandom.current().nextDouble(min, max);
+            byte[] bt1 = ByteUtil.putDouble(bb, generatedDouble, 0);
+            long time = new Date().getTime();
+            byte[] bt2 = ByteUtil.putLong(bb, time, 0);
+            byte[] bt3 = new byte[bt1.length + bt2.length];
+            bt3[0] = bt1[0];
+            bt3[1] = bt1[1];
+            bt3[2] = bt1[2];
+            bt3[3] = bt1[3];
+            bt3[4] = bt1[4];
+            bt3[5] = bt1[5];
+            bt3[6] = bt1[6];
+            bt3[7] = bt1[7];
+            bt3[8] = bt2[0];
+            bt3[9] = bt2[1];
+            bt3[10] = bt2[2];
+            bt3[11] = bt2[3];
+            bt3[12] = bt2[4];
+            bt3[13] = bt2[5];
+            bt3[14] = bt2[6];
+            bt3[15] = bt2[7];
+            b.put(rawKeys[i], bt3);
+        }
+        return knife4jRedisManager.redisTemplate(2).getConnectionFactory().getConnection().mSet(b);
     }
 
     /**
      * 获取单对象 redis<String,Clazz>
+     *
      * @param key
      * @param clazz
      * @param <T>
      * @return
      */
-    public <T> T get(String key , Class<T> clazz) {
-        return  get(defaultDB ,key , clazz);
+    public <T> T get(String key, Class<T> clazz) {
+        return get(defaultDB, key, clazz);
     }
-    public <T> T get(int dbIndex ,String key , Class<T> clazz) {
+
+    public <T> T get(int dbIndex, String key, Class<T> clazz) {
         Object o = knife4jRedisManager.redisTemplate(dbIndex).opsForValue().get(key);
-        if(o instanceof JSONObject){
-            JSONObject jo = (JSONObject)o;
+        if (o instanceof JSONObject) {
+            JSONObject jo = (JSONObject) o;
             T t = jo.toJavaObject(clazz);
             return t;
         }
@@ -146,9 +150,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @param timeout 失效时间(秒)
      */
     public void set(String key, Object value, long timeout) {
-        set(defaultDB , key ,value ,timeout);
+        set(defaultDB, key, value, timeout);
     }
-    public void set(int dbIndex ,String key, Object value, long timeout) {
+
+    public void set(int dbIndex, String key, Object value, long timeout) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForValue().set(key, value, timeout, TimeUnit.SECONDS);
     }
 
@@ -163,9 +168,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @param map
      */
     protected void multiSetObj(Map<String, Object> map) {
-        multiSetObj(defaultDB , map);
+        multiSetObj(defaultDB, map);
     }
-    protected void multiSetObj(int dbIndex ,Map<String, Object> map) {
+
+    protected void multiSetObj(int dbIndex, Map<String, Object> map) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForValue().multiSet(map);
     }
 
@@ -181,9 +187,10 @@ public class RedisValUtil extends RedisBaseUtil {
      *
      */
     protected List<Object> multiGetObj(List<String> keys) {
-        return multiGetObj(defaultDB ,keys);
+        return multiGetObj(defaultDB, keys);
     }
-    public List<Object> multiGetObj(int dbIndex ,List<String> keys) {
+
+    public List<Object> multiGetObj(int dbIndex, List<String> keys) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForValue().multiGet(keys);
     }
 
@@ -195,9 +202,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @return
      */
     public long incr(String key, long delta) {
-        return incr(defaultDB , key , delta);
+        return incr(defaultDB, key, delta);
     }
-    public long incr(int dbIndex ,String key, long delta) {
+
+    public long incr(int dbIndex, String key, long delta) {
         if (delta < 0) {
             throw new RuntimeException("递增因子必须大于0");
         }
@@ -205,9 +213,10 @@ public class RedisValUtil extends RedisBaseUtil {
     }
 
     public long incrFiled(String key, String filed) {
-        return incrFiled(defaultDB , key , filed);
+        return incrFiled(defaultDB, key, filed);
     }
-    public long incrFiled(int dbIndex ,String key, String filed) {
+
+    public long incrFiled(int dbIndex, String key, String filed) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForHash().increment(key, filed, 1);
     }
 
@@ -219,9 +228,10 @@ public class RedisValUtil extends RedisBaseUtil {
      * @return
      */
     public long decr(String key, long delta) {
-        return decr(defaultDB , key ,delta);
+        return decr(defaultDB, key, delta);
     }
-    public long decr(int dbIndex ,String key, long delta) {
+
+    public long decr(int dbIndex, String key, long delta) {
         if (delta < 0) {
             throw new RuntimeException("递减因子必须大于0");
         }
@@ -230,75 +240,83 @@ public class RedisValUtil extends RedisBaseUtil {
 
     //存hash
     public void setHash(String key, String filed, String value) {
-        setHash(defaultDB ,key , filed ,value);
+        setHash(defaultDB, key, filed, value);
     }
-    public void setHash(int dbIndex ,String key, String filed, String value) {
+
+    public void setHash(int dbIndex, String key, String filed, String value) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForHash().put(key, filed, value);
     }
 
     //取hash
     public String getHash(String key, String filed) {
-        return getHash(defaultDB ,key ,filed);
+        return getHash(defaultDB, key, filed);
     }
-    public String getHash(int dbIndex ,String key, String filed) {
+
+    public String getHash(int dbIndex, String key, String filed) {
         Object o = knife4jRedisManager.redisTemplate(dbIndex).opsForHash().get(key, filed);
         return (String) o;
     }
 
     public void setList(String key, List<String> list) {
-        setList(defaultDB , key , list);
+        setList(defaultDB, key, list);
     }
-    public void setList(int dbIndex ,String key, List<String> list) {
+
+    public void setList(int dbIndex, String key, List<String> list) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPush(key, list);
     }
 
     public List<String> getList(String key) {
-        return getList(defaultDB ,key);
+        return getList(defaultDB, key);
     }
-    public List<String> getList(int dbIndex ,String key) {
+
+    public List<String> getList(int dbIndex, String key) {
         return (List<String>) knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPop(key);
     }
 
-    public void lPush(String key, String value){
-        lPush(defaultDB , key , value);
+    public void lPush(String key, String value) {
+        lPush(defaultDB, key, value);
     }
-    public void lPush(int dbIndex ,String key, String value){
+
+    public void lPush(int dbIndex, String key, String value) {
         knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPush(key, value);
     }
 
-    public String lPop(String key){
-        return lPop(defaultDB ,key);
+    public String lPop(String key) {
+        return lPop(defaultDB, key);
     }
-    public String lPop(int dbIndex ,String key){
+
+    public String lPop(int dbIndex, String key) {
         return (String) knife4jRedisManager.redisTemplate(dbIndex).opsForList().leftPop(key);
     }
 
-    public Long listSize(String key){
-        return listSize(defaultDB , key);
+    public Long listSize(String key) {
+        return listSize(defaultDB, key);
     }
-    public Long listSize(int dbIndex ,String key){
+
+    public Long listSize(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForList().size(key);
     }
 
 
-
     //查询list中指定范围的内容
-    public List<String> range(String key){
-        return range(defaultDB , key);
+    public List<String> range(String key) {
+        return range(defaultDB, key);
     }
-    public List<String> range(int dbIndex ,String key){
+
+    public List<String> range(int dbIndex, String key) {
         List<Object> range = knife4jRedisManager.redisTemplate(dbIndex).opsForList().range(key, 0, -1);
         List<String> result = new ArrayList<>();
         for (Object o : range) {
-            result.add((String)o);
+            result.add((String) o);
         }
         return result;
     }
 
     public Long ttl(String key) {
-        return ttl(defaultDB , key);
+        return ttl(defaultDB, key);
     }
-    public Long ttl(int dbIndex ,String key) {
+
+    public Long ttl(int dbIndex, String key) {
         return knife4jRedisManager.redisTemplate(dbIndex).opsForValue().getOperations().getExpire(key);
     }
 }

+ 0 - 15
timeseries/dao-sql/src/main/java/com/gyee/wisdom/dao/sql/Windturbine/repsoitory/PowerStationRepository.java

@@ -1,15 +0,0 @@
-package com.gyee.wisdom.dao.sql.Windturbine.repsoitory;
-
-import com.gyee.wisdom.common.data.windturbine.PowerStation;
-import com.gyee.wisdom.dao.sql.Windturbine.entity.PowerStationEntity;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface PowerStationRepository extends JpaRepository<PowerStationEntity, String>, JpaSpecificationExecutor {
-    List<PowerStationEntity> findByIdIn(String[] ids);
-}

+ 0 - 44
timeseries/dao-taos/src/main/java/com/gyee/wisdom/dao/taos/TaosCovertUtil.java

@@ -1,44 +0,0 @@
-package com.gyee.wisdom.dao.taos;
-
-public class TaosCovertUtil {
-
-    /**
-     * 根据传过来的点分析出场站名
-     * @param point
-     * @return
-     */
-    public static String coverStationPrefix(String point) {
-        String station = null;
-
-        if(point.toUpperCase().contains("SBQ"))
-            station = "sbq";
-        else if(point.toUpperCase().contains("MHS"))
-            station = "mhs";
-        else if(point.toUpperCase().contains("NSS"))
-            station = "nss";
-        else if(point.toUpperCase().contains("XS"))
-            station = "xs";
-        else if(point.toUpperCase().contains("QS"))
-            station = "qs";
-        else if(point.toUpperCase().contains("DWK"))
-            station = "dwk";
-        else if(point.toUpperCase().contains("PL"))
-            station = "pl";
-        else if(point.toUpperCase().contains("MCH"))
-            station = "mch";
-        else if(point.toUpperCase().contains("SH"))
-            station = "sh";
-        else if(point.toUpperCase().contains("XH"))
-            station = "xh";
-        else if(point.toUpperCase().contains("NXDQ"))
-            station = "nxdq";
-        else if(point.toUpperCase().contains("JSFW"))
-            station = "jsfw";
-        else if(point.toUpperCase().contains("HZJ"))
-            station = "hzj";
-        else
-            station = "qs";
-
-        return station;
-    }
-}

+ 1 - 1
timeseries/data-adapter/src/main/java/com/gyee/wisdom/Bootstrap.java

@@ -15,7 +15,7 @@ public class Bootstrap {
 
     public static void main(String[] args) {
 
-      SpringApplication.run(Bootstrap.class, args);
+        SpringApplication.run(Bootstrap.class, args);
    /*     PointList.pointListInit();
         PointList.MapInit();
         Thread t = new ReadAndWrite();

+ 5 - 5
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/configuration/FilePathConfig.java

@@ -11,19 +11,19 @@ public class FilePathConfig {
     private static String excelPath;
 
     public static String getFilePath() {
-        if(filePath==null){
+        if (filePath == null) {
             ApplicationHome home = new ApplicationHome(FilePathConfig.class);
-            filePath=home.getSource().getParentFile().getAbsolutePath();
+            filePath = home.getSource().getParentFile().getAbsolutePath();
         }
         return filePath;
     }
 
     public static String getExcelPath() {
-        if(excelPath==null){
+        if (excelPath == null) {
             getFilePath();
-            excelPath = filePath+"\\excel\\";
+            excelPath = filePath + "\\excel\\";
             File file = new File(excelPath);
-            if(!file.exists()) file.mkdirs();
+            if (!file.exists()) file.mkdirs();
         }
         return excelPath;
     }

+ 4 - 6
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/controller/thing/CategoryController.java

@@ -1,16 +1,14 @@
 package com.gyee.wisdom.dataadapter.controller.thing;
 
 import com.gyee.wisdom.common.data.alarm.WarningClassify;
-import com.gyee.wisdom.common.data.windturbine.PowerStation;
-import com.gyee.wisdom.common.data.windturbine.Windturbine;
 import com.gyee.wisdom.dataadapter.domain.thing.DataDictionaryService;
-import com.gyee.wisdom.dataadapter.domain.thing.StationService;
-import com.gyee.wisdom.dataadapter.domain.thing.WindturbineService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
-import java.util.Optional;
 
 /*
  *

+ 9 - 12
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/controller/thing/ElectricalTestingPointController.java

@@ -2,8 +2,8 @@ package com.gyee.wisdom.dataadapter.controller.thing;
 
 
 import com.gyee.wisdom.common.utils.StringUtil;
-import com.gyee.wisdom.dataadapter.dto.ElectricalDto;
 import com.gyee.wisdom.dataadapter.domain.thing.ElectricalTestingPointService;
+import com.gyee.wisdom.dataadapter.dto.ElectricalDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -20,27 +20,24 @@ public class ElectricalTestingPointController {
 
     @GetMapping("/electricaltestingpoint")
     public List<ElectricalDto> getElectricalTestingPoint(
-//            @RequestParam(value = "pagenum",required = true) Integer pageNum,
-//            @RequestParam(value = "pagesize",required = true) Integer pageSize,
+            //            @RequestParam(value = "pagenum",required = true) Integer pageNum,
+            //            @RequestParam(value = "pagesize",required = true) Integer pageSize,
             @RequestParam(value = "windpowerstationid", required = true) String windpowerstationid,
             @RequestParam(value = "name", required = false) String name,
             @RequestParam(value = "uniformcode", required = false) String uniformcode,
             @RequestParam(value = "type", required = false) String type
     ) {
         List<ElectricalDto> list = new ArrayList<>();
-        if (StringUtil.isBlank(type)){
+        if (StringUtil.isBlank(type)) {
             list = electricalTestingPointService.getElectricalDtoAI(uniformcode, name, windpowerstationid);
             List<ElectricalDto> list2 = electricalTestingPointService.getElectricalDtoDI(uniformcode, name, windpowerstationid);
             list.addAll(list2);
-        }
-       else if (type.equals("AI")){
-           list = electricalTestingPointService.getElectricalDtoAI(uniformcode, name, windpowerstationid);
-        }
-       else if(type.equals("DI")){
-           list = electricalTestingPointService.getElectricalDtoDI(uniformcode, name, windpowerstationid);
+        } else if (type.equals("AI")) {
+            list = electricalTestingPointService.getElectricalDtoAI(uniformcode, name, windpowerstationid);
+        } else if (type.equals("DI")) {
+            list = electricalTestingPointService.getElectricalDtoDI(uniformcode, name, windpowerstationid);
 
-        }
-       else{
+        } else {
 
         }
 

+ 1 - 3
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/DataDictionaryService.java

@@ -1,9 +1,7 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
 
+import com.gyee.gaia.dao.alarm.WarningDao;
 import com.gyee.wisdom.common.data.alarm.WarningClassify;
-import com.gyee.wisdom.common.data.windturbine.Line;
-import com.gyee.wisdom.dao.alarm.WarningDao;
-import com.gyee.wisdom.dao.windturbine.ILineDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

+ 6 - 6
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ElectricalTestingPointService.java

@@ -1,9 +1,9 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
 
+import com.gyee.gaia.dao.alarm.ElectricalTestingPointAIDao;
+import com.gyee.gaia.dao.alarm.ElectricalTestingPointDIDao;
 import com.gyee.wisdom.common.data.alarm.ElectricalTestingPointAI;
 import com.gyee.wisdom.common.data.alarm.ElectricalTestingPointDI;
-import com.gyee.wisdom.dao.alarm.ElectricalTestingPointAIDao;
-import com.gyee.wisdom.dao.alarm.ElectricalTestingPointDIDao;
 import com.gyee.wisdom.dataadapter.dto.ElectricalDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -22,10 +22,10 @@ public class ElectricalTestingPointService {
 
 
     //uniformcode,name,windpowerstationid
-    public List<ElectricalDto>  getElectricalDtoAI(String uniformcode, String name, String windpowerstationid){
+    public List<ElectricalDto> getElectricalDtoAI(String uniformcode, String name, String windpowerstationid) {
         List<ElectricalDto> list = new ArrayList<>();
-        List<ElectricalTestingPointAI> electricalTestingPointAIS = electricalTestingPointAIDao.findByUniformcodeNameWindpowerstationid(uniformcode,name,windpowerstationid);
-        for (ElectricalTestingPointAI ElectricalTestingPointAI : electricalTestingPointAIS){
+        List<ElectricalTestingPointAI> electricalTestingPointAIS = electricalTestingPointAIDao.findByUniformcodeNameWindpowerstationid(uniformcode, name, windpowerstationid);
+        for (ElectricalTestingPointAI ElectricalTestingPointAI : electricalTestingPointAIS) {
             ElectricalDto data = new ElectricalDto();
             data.setId(ElectricalTestingPointAI.getId());
             data.setName(ElectricalTestingPointAI.getName());
@@ -36,7 +36,7 @@ public class ElectricalTestingPointService {
         return list;
     }
 
-    public List<ElectricalDto> getElectricalDtoDI(String uniformcode,String name,String windpowerstationid) {
+    public List<ElectricalDto> getElectricalDtoDI(String uniformcode, String name, String windpowerstationid) {
         List<ElectricalDto> list = new ArrayList<>();
         List<ElectricalTestingPointDI> electricalTestingPointDIS = electricalTestingPointDIDao.findByUniformcodeNameWindpowerstationid(uniformcode, name, windpowerstationid);
         for (ElectricalTestingPointDI electricalTestingPointDI : electricalTestingPointDIS) {

+ 6 - 8
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/LineService.java

@@ -1,35 +1,33 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
 
-import com.gyee.wisdom.common.data.windturbine.Line;
-import com.gyee.wisdom.dao.windturbine.ILineDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 
 @Service
-public class LineService{
+public class LineService {
 
     @Autowired
     protected ILineDao jpaLineDao;
 
-    public void save(Line line){
+    public void save(Line line) {
         jpaLineDao.save(line);
     }
 
-    public List<Line> findAll(){
+    public List<Line> findAll() {
         return jpaLineDao.findAll();
     }
 
-    public Line findById(String id){
+    public Line findById(String id) {
         return jpaLineDao.findById(id);
     }
 
-    public void delete(String id){
+    public void delete(String id) {
         jpaLineDao.deletebyid(id);
     }
 
-    public List<Line> findByprojectId(String id){
+    public List<Line> findByprojectId(String id) {
         return jpaLineDao.findByprojectId(id);
     }
 }

+ 4 - 6
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ModelService.java

@@ -1,7 +1,5 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
 
-import com.gyee.wisdom.common.data.windturbine.EquipmentModel;
-import com.gyee.wisdom.dao.windturbine.IModelDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -13,19 +11,19 @@ public class ModelService {
     @Autowired
     protected IModelDao jpaModelDao;
 
-    public void save(EquipmentModel equipmentModel){
+    public void save(EquipmentModel equipmentModel) {
         jpaModelDao.save(equipmentModel);
     }
 
-    public List<EquipmentModel> findAll(){
+    public List<EquipmentModel> findAll() {
         return jpaModelDao.findAll();
     }
 
-    public EquipmentModel findById(String id){
+    public EquipmentModel findById(String id) {
         return jpaModelDao.findById(id);
     }
 
-    public void delete(String id){
+    public void delete(String id) {
         jpaModelDao.deletebyid(id);
     }
 }

+ 9 - 15
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/ProjectService.java

@@ -1,12 +1,6 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
-import com.gyee.wisdom.common.data.windturbine.Line;
-import com.gyee.wisdom.common.data.windturbine.PowerStation;
+
 import com.gyee.wisdom.common.data.windturbine.Project;
-import com.gyee.wisdom.common.data.windturbine.Windturbine;
-import com.gyee.wisdom.dao.windturbine.ILineDao;
-import com.gyee.wisdom.dao.windturbine.IPowerStationDao;
-import com.gyee.wisdom.dao.windturbine.IProjectDao;
-import com.gyee.wisdom.dao.windturbine.IWindturbineDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -55,11 +49,11 @@ public class ProjectService {
         }
 
         List<Project> projectlist = jpaprojectDao.findAll();
-        for(Project project:projectlist){
-            projectmap.get(project.getStationId()).put(project.getId(),project.getName());
-        }
-            return projectmap;
+        for (Project project : projectlist) {
+            projectmap.get(project.getStationId()).put(project.getId(), project.getName());
         }
+        return projectmap;
+    }
 
 
     public Map<String, Map<String, String>> getLinemap() {
@@ -71,8 +65,8 @@ public class ProjectService {
         }
 
         List<Line> linelist = jpalineDao.findAll();
-        for(Line line:linelist){
-            linemap.get(line.getProjectId()).put(line.getId(),line.getName());
+        for (Line line : linelist) {
+            linemap.get(line.getProjectId()).put(line.getId(), line.getName());
         }
         return linemap;
     }
@@ -87,8 +81,8 @@ public class ProjectService {
         }
 
         List<Windturbine> windturbinelist = jpawindturbineDao.find();
-        for(Windturbine windturbine:windturbinelist){
-            windturbinemap.get(windturbine.getModelId()).put(windturbine.getId(),windturbine.getName());
+        for (Windturbine windturbine : windturbinelist) {
+            windturbinemap.get(windturbine.getModelId()).put(windturbine.getId(), windturbine.getName());
         }
         return windturbinemap;
     }

+ 0 - 5
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/domain/thing/StationService.java

@@ -1,15 +1,10 @@
 package com.gyee.wisdom.dataadapter.domain.thing;
 
-import com.gyee.wisdom.common.data.windturbine.PowerStation;
 import com.gyee.wisdom.common.utils.StringUtil;
-import com.gyee.wisdom.dao.windturbine.IPowerStationDao;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 @Service
 public class StationService {

+ 21 - 29
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/help/Constant.java

@@ -12,53 +12,45 @@ import java.util.Date;
  * @author:WXW
  * @date:2020-05-06
  */
-public class Constant
-{
-    public static SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//
+public class Constant {
+    public static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//
 
 
-
-    public static void d(String text)
-    {
+    public static void d(String text) {
         System.out.println(text);
     }
-    public static void dOneLine(String text)
-    {
+
+    public static void dOneLine(String text) {
         System.out.print(text);
     }
+
     /*** @description: 日志文件打印 */
-    public static void dd(String text)
-    {
-        SimpleDateFormat datef=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
-        Date date=new Date();
-        text=datef.format(date)+"\t"+text;
+    public static void dd(String text) {
+        SimpleDateFormat datef = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+        Date date = new Date();
+        text = datef.format(date) + "\t" + text;
         System.out.println(text);
     }
 
 
+    static String logPath = System.getProperty("userDataSet.dir") + "\\log\\";
+    static String logName = "log.txt";
 
-    static String logPath=System.getProperty("userDataSet.dir")+"\\log\\";
-    static String logName="log.txt";
     /*** @description: 日志文件写入 */
-    public static void j( String message)
-    {
+    public static void j(String message) {
         File testFile = new File(logPath);
-        if(!testFile .exists())
-        {
+        if (!testFile.exists()) {
             testFile.mkdirs();
         }
-        try
-        {
-            BufferedWriter writer = new BufferedWriter(new FileWriter(new File(logPath+logName),true));
-            SimpleDateFormat datef=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
-            Date date=new Date();
-            message=datef.format(date)+"\t"+message;
-            writer.write("\n"+message);
+        try {
+            BufferedWriter writer = new BufferedWriter(new FileWriter(new File(logPath + logName), true));
+            SimpleDateFormat datef = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+            Date date = new Date();
+            message = datef.format(date) + "\t" + message;
+            writer.write("\n" + message);
             writer.close();
             System.out.println(message);
-        }
-        catch(IOException e)
-        {
+        } catch (IOException e) {
             System.out.println(message);
         }
 

+ 2 - 4
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/infrastructure/config/JsonConfig.java

@@ -1,13 +1,10 @@
 package com.gyee.wisdom.dataadapter.infrastructure.config;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.core.Version;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.PropertyNamingStrategy;
 import com.fasterxml.jackson.databind.SerializationFeature;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -17,7 +14,8 @@ import java.text.SimpleDateFormat;
 import java.util.TimeZone;
 
 /**
- * Json 序列化和反序列化通用格式.*/
+ * Json 序列化和反序列化通用格式.
+ */
 
 
 @Configuration

+ 35 - 35
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/runner/SpringStartAfter.java

@@ -1,12 +1,11 @@
 package com.gyee.wisdom.dataadapter.runner;
 
+import com.gyee.gaia.dao.things.IThingsPointDao;
+import com.gyee.gaia.dao.timeseries.ILatestDao;
 import com.gyee.wisdom.common.data.timeseries.GeneralTsData;
 import com.gyee.wisdom.common.data.timeseries.TsDataType;
 import com.gyee.wisdom.common.data.timeseries.TsPoint;
 import com.gyee.wisdom.common.data.timeseries.TsPointData;
-import com.gyee.wisdom.common.data.windturbine.Windturbine;
-import com.gyee.wisdom.dao.things.IThingsPointDao;
-import com.gyee.wisdom.dao.timeseries.ILatestDao;
 import com.gyee.wisdom.dataadapter.domain.thing.WindturbineService;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -14,14 +13,15 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.stereotype.Component;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
 import java.sql.SQLException;
 import java.sql.Statement;
-import java.util.*;
+import java.util.Date;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
 import java.util.stream.Collectors;
 
 //@Component
@@ -59,33 +59,33 @@ public class SpringStartAfter implements ApplicationRunner {
 
         //牛首山风电场 taos库创建,taos库保存数据为90天
         //initDatabase("FS_FDC", 90);
-//        //牛首山风电场 ai测点表创建,超级表名为windturbineai,风机型号为UP82
+        //        //牛首山风电场 ai测点表创建,超级表名为windturbineai,风机型号为UP82
         //initTableAI("FS_FDC", "pointai", "UP82-1500");
-//        //牛首山风电场 di测点表创建,超级表名为windturbinedi,风机型号为UP82
+        //        //牛首山风电场 di测点表创建,超级表名为windturbinedi,风机型号为UP82
         //initTableDI("FS_FDC", "pointdi", "UP82-1500");
 
-//        Random r = new Random();
-//        Long ts = new Date().getTime();
-//        final List<TsPoint> allTsPoint = thingsPointDao.getAllTsPoint().stream().filter(s -> !s.getThingId().equals("BY_FDC")).collect(Collectors.toList());
-//        List<TsPointData> dataList = new ArrayList<>();
-//        for (TsPoint point :
-//                allTsPoint) {
-//            TsPointData tsPointData = new TsPointData();
-//            tsPointData.setTagName(point.getId());
-//            GeneralTsData generalTsData = new GeneralTsData();
-//            Double speed = r.nextDouble() * 6 + 3;
-//            generalTsData.setDoubleValue(java.util.Optional.of(speed));
-//            ts = ts + 1000;
-//            generalTsData.setTs(ts);
-//            tsPointData.setTsData(generalTsData);
-//            dataList.add(tsPointData);
-//        }
-//
-//        while (true) {
-//            Thread.sleep(999);
-//            writeThread(dataList).run();
-//
-//        }
+        //        Random r = new Random();
+        //        Long ts = new Date().getTime();
+        //        final List<TsPoint> allTsPoint = thingsPointDao.getAllTsPoint().stream().filter(s -> !s.getThingId().equals("BY_FDC")).collect(Collectors.toList());
+        //        List<TsPointData> dataList = new ArrayList<>();
+        //        for (TsPoint point :
+        //                allTsPoint) {
+        //            TsPointData tsPointData = new TsPointData();
+        //            tsPointData.setTagName(point.getId());
+        //            GeneralTsData generalTsData = new GeneralTsData();
+        //            Double speed = r.nextDouble() * 6 + 3;
+        //            generalTsData.setDoubleValue(java.util.Optional.of(speed));
+        //            ts = ts + 1000;
+        //            generalTsData.setTs(ts);
+        //            tsPointData.setTsData(generalTsData);
+        //            dataList.add(tsPointData);
+        //        }
+        //
+        //        while (true) {
+        //            Thread.sleep(999);
+        //            writeThread(dataList).run();
+        //
+        //        }
 
 
     }
@@ -143,9 +143,9 @@ public class SpringStartAfter implements ApplicationRunner {
 
         log.error("开始执行创建taos库");
         try {
-//            final List<Windturbine> windturbines = windturbineService.queryWindturbine(stationName, "MY-1500");
-//
-//            log.error("查询风机完毕" + windturbines.size());
+            //            final List<Windturbine> windturbines = windturbineService.queryWindturbine(stationName, "MY-1500");
+            //
+            //            log.error("查询风机完毕" + windturbines.size());
             // Class.forName("com.taosdata.jdbc.TSDBDriver");
             // String jdbcUrl = "jdbc:TAOS://" + serverIp + ":" + serverPort + "/" + dbName + "?user=" + userName + "&password=" + password;
 
@@ -224,7 +224,7 @@ public class SpringStartAfter implements ApplicationRunner {
             }*/
             for (TsPoint point : doublePointList) {
                 String createTableSql = "create table if not exists " + dbName + "." + point.getId() + " using " + dbName + "." + stableName +
-                        " tags('" + point.getId() +"','','',''" + ");";
+                        " tags('" + point.getId() + "','','',''" + ");";
 
                 statement.executeUpdate(createTableSql);
             }
@@ -289,7 +289,7 @@ public class SpringStartAfter implements ApplicationRunner {
             for (TsPoint point :
                     booleanPointList) {
                 String createTableSql = "create table if not exists " + dbName + "." + point.getId() + " using " + dbName + "." + stableName +
-                        " tags('" + point.getId() +"','','',''" + ");";
+                        " tags('" + point.getId() + "','','',''" + ");";
 
 
                 statement.executeUpdate(createTableSql);

+ 0 - 0
timeseries/data-adapter/src/main/java/com/gyee/wisdom/dataadapter/websocket/PublishConfig.java


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.