Browse Source

first commit

songwenbin 1 year ago
commit
22bcc1995b
100 changed files with 3553 additions and 0 deletions
  1. 52 0
      .gitignore
  2. 40 0
      README.md
  3. 30 0
      build.gradle
  4. 5 0
      common/data/build.gradle
  5. 87 0
      common/data/src/main/java/com/gyee/wisdom/common/data/BaseResult.java
  6. 9 0
      common/data/src/main/java/com/gyee/wisdom/common/data/CodeValue.java
  7. 23 0
      common/data/src/main/java/com/gyee/wisdom/common/data/DataUtil.java
  8. 84 0
      common/data/src/main/java/com/gyee/wisdom/common/data/RestResponse.java
  9. 5 0
      common/data/src/main/java/com/gyee/wisdom/common/data/ToData.java
  10. 30 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertRule.java
  11. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alerthistory.java
  12. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlerthistoryNew.java
  13. 39 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Alertsnap.java
  14. 39 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertsnapNew.java
  15. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ElectricalTestingPointAI.java
  16. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ElectricalTestingPointDI.java
  17. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultHistory.java
  18. 31 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/FaultSnap.java
  19. 19 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeLine.java
  20. 30 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeePowerStation.java
  21. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeProject.java
  22. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeWindturbine.java
  23. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Gyeetopic.java
  24. 30 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ScadaBJ.java
  25. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ScadaFault.java
  26. 31 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warning.java
  27. 14 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WarningClassify.java
  28. 27 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningfj.java
  29. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningrecords.java
  30. 19 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningsyz.java
  31. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WindturbineTestingpointAi.java
  32. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WindturbineTestingpointDi.java
  33. 36 0
      common/data/src/main/java/com/gyee/wisdom/common/data/control/AlarmSnapData.java
  34. 40 0
      common/data/src/main/java/com/gyee/wisdom/common/data/control/ControlLog.java
  35. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/control/GycpCmdInfo.java
  36. 22 0
      common/data/src/main/java/com/gyee/wisdom/common/data/control/InputOrOutputSpeedTotal.java
  37. 58 0
      common/data/src/main/java/com/gyee/wisdom/common/data/exception/Result.java
  38. 37 0
      common/data/src/main/java/com/gyee/wisdom/common/data/feature/FeatureStat.java
  39. 60 0
      common/data/src/main/java/com/gyee/wisdom/common/data/job/model/JobAndTrigger.java
  40. 20 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertHistory.java
  41. 32 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertRule.java
  42. 43 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertSnap.java
  43. 23 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemLob.java
  44. 22 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemTestingPoint.java
  45. 22 0
      common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemThingEntity.java
  46. 20 0
      common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/Inverter.java
  47. 34 0
      common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/InverterBasicData.java
  48. 34 0
      common/data/src/main/java/com/gyee/wisdom/common/data/point/ElectricalTestingPoint.java
  49. 39 0
      common/data/src/main/java/com/gyee/wisdom/common/data/point/LevelTypeTestingPoint.java
  50. 31 0
      common/data/src/main/java/com/gyee/wisdom/common/data/point/PowerStationTestingPoint.java
  51. 47 0
      common/data/src/main/java/com/gyee/wisdom/common/data/point/TestingPoint.java
  52. 44 0
      common/data/src/main/java/com/gyee/wisdom/common/data/point/WindturbineTestingPoint.java
  53. 17 0
      common/data/src/main/java/com/gyee/wisdom/common/data/power/Status8Snap.java
  54. 14 0
      common/data/src/main/java/com/gyee/wisdom/common/data/power/WindturbinePowerCurvefitting.java
  55. 72 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/BootstrapTreeNode.java
  56. 78 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MenuCreateCommand.java
  57. 65 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MenuUpdateCommond.java
  58. 35 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MyProfile.java
  59. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/ProfileCommand.java
  60. 74 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/UserCommond.java
  61. 99 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/UserDto.java
  62. 22 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/DataDictionary.java
  63. 40 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Menu.java
  64. 85 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Resource.java
  65. 36 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Role.java
  66. 47 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectMenu.java
  67. 47 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectResource.java
  68. 49 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectRole.java
  69. 49 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectStation.java
  70. 68 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SysLog.java
  71. 263 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/TreeModel.java
  72. 43 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/User.java
  73. 15 0
      common/data/src/main/java/com/gyee/wisdom/common/data/system/model/VerifyCode.java
  74. 46 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BaseTsQuery.java
  75. 38 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsData.java
  76. 62 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsPoint.java
  77. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobTsData.java
  78. 22 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BlobWriteTsData.java
  79. 19 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanTsData.java
  80. 19 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanWriteTsData.java
  81. 18 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Coordinate.java
  82. 26 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateTsData.java
  83. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateWriteTsData.java
  84. 30 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleStatData.java
  85. 33 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleTsData.java
  86. 19 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/DoubleWriteTsData.java
  87. 28 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/GeneralTsData.java
  88. 18 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/IntegerTsData.java
  89. 8 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/Interpolation.java
  90. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongTsData.java
  91. 20 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/LongWriteTsData.java
  92. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringTsData.java
  93. 20 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/StringWriteTsData.java
  94. 15 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsData.java
  95. 15 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsDataType.java
  96. 24 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPoint.java
  97. 62 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPointData.java
  98. 23 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPointDataList.java
  99. 21 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsQuery.java
  100. 0 0
      common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/websocket/SubscribeMessaage.java

+ 52 - 0
.gitignore

@@ -0,0 +1,52 @@
+/.idea
+/.gradle
+/admin/out
+/alarm/custom/out
+/alarm/qswindnew/out
+/alarm/scadafault/out
+/alarm/scadasnew/out
+/alarm/sharding/out
+/alarm/sharding-mysql/out
+/alarm/windturbinenew/out
+/calculate/feature/out
+/calculate/status8/out
+/control-calc/out
+/controlnetwork/out
+/data-adapter/out
+/data-adapter-client-demo/out
+/external-interface/out
+/dao/*/out
+/alarm/*/out
+/alarm/*/build
+/common/data/build
+/common/utils/build
+/admin/build
+/alarm/custom/build
+/alarm/qswindnew/build
+/alarm/scadafault/build
+/alarm/scadasnew/build
+/alarm/sharding/build
+/alarm/alarmstatistic/build
+/alarm/sharding-mysql/build
+/alarm/sharding-mysql2/build
+/alarm/windturbinenew/build
+/calculate/feature/build
+/calculate/status8/build
+/control-calc/build
+/controlnetwork/build
+/data-adapter/build
+/data-adapter-client-demo/build
+/external-interface/build
+/dao/*/build
+/common/data/build
+/common/utils/build
+/warning-web/build
+/risk-calc/build
+/risk-calc/out
+/logs
+/*.class
+.DS_Store
+build/
+!gradle/wrapper/gradle-wrapper.jar
+!**/src/main/**/build/
+!**/src/test/**/build/

File diff suppressed because it is too large
+ 40 - 0
README.md


+ 30 - 0
build.gradle

@@ -0,0 +1,30 @@
+subprojects {
+    apply plugin: "java-library"
+    apply plugin: "idea"
+    apply plugin: "eclipse"
+    apply plugin: "maven-publish"
+
+
+    [compileJava, compileTestJava, javadoc]*.options*.encoding = "UTF-8"
+
+    configurations {
+        all*.exclude module: "spring-boot-starter-tomcat"
+        all*.exclude module: "spring-boot-starter-logging"
+    }
+
+    dependencies {
+        compileOnly("org.projectlombok:lombok:$lombokVersion")
+        annotationProcessor("org.projectlombok:lombok:$lombokVersion")
+    }
+
+    repositories {
+        mavenLocal()
+        maven {
+            allowInsecureProtocol = true
+            url "http://maven.aliyun.com/nexus/content/groups/public/"
+        }
+        mavenCentral()
+    }
+
+}
+

+ 5 - 0
common/data/build.gradle

@@ -0,0 +1,5 @@
+buildscript {
+}
+
+dependencies {
+}

+ 87 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/BaseResult.java

@@ -0,0 +1,87 @@
+package com.gyee.wisdom.common.data;
+
+import java.io.Serializable;
+
+public class BaseResult<T> implements Serializable {
+
+    private static final long serialVersionUID = -4185151304730685014L;
+
+    protected boolean success;
+    protected String error;
+    /**
+     * 处理结果状态码
+     * 200表示成功
+     */
+    protected int code;
+    protected int total;
+    private T data;
+
+    public BaseResult() {
+    }
+
+    public BaseResult(boolean success, String error, int code) {
+        this.success = success;
+        this.error = error;
+        this.code = success?200:code;
+    }
+
+    public BaseResult(boolean success, String error) {
+        this.success = success;
+        this.error = error;
+    }
+
+    public BaseResult(boolean success, T data) {
+        this.success = success;
+        this.data = data;
+        this.code = 200;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    public String getError() {
+        return error;
+    }
+
+    public void setError(String error) {
+        this.error = error;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+
+
+    public int getTotal() {
+        return total;
+    }
+
+    public void setTotal(int total) {
+        this.total = total;
+    }
+
+    @Override
+    public String toString() {
+        return "BaseResult [success=" + success + ", data=" + data + ", error="
+                + error + "]";
+    }
+
+}

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

@@ -0,0 +1,9 @@
+package com.gyee.wisdom.common.data;
+
+import lombok.Data;
+
+@Data
+public class CodeValue {
+    private  String Code;
+    private String Value;
+}

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

@@ -0,0 +1,23 @@
+package com.gyee.wisdom.common.data;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Optional;
+import java.util.stream.Collectors;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public abstract class DataUtil {
+
+    private DataUtil() {
+    }
+
+    public static <T> List<T> convertDataList(Collection<? extends ToData<T>> toDataList) {
+        return toDataList.stream().map(ToData::toData).collect(Collectors.toList());
+    }
+
+    public static <T> T getData(ToData<T> data) {
+        return Optional.ofNullable(data).isPresent() ? data.toData() : null;
+    }
+}

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

@@ -0,0 +1,84 @@
+package com.gyee.wisdom.common.data;
+
+import java.io.Serializable;
+
+@SuppressWarnings("unchecked")
+public class RestResponse<T> implements Serializable {
+
+    private boolean success;
+
+    private String code;
+
+    private String msg;
+
+    private T data;
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+
+    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;
+        return rep;
+    }
+
+    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;
+        return rep;
+    }
+
+    public static RestResponse fail(String code, String msg){
+        RestResponse rep=new RestResponse();
+        rep.success=false;
+        rep.msg=msg;
+        rep.code=code;
+        return rep;
+    }
+
+
+}

+ 5 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/ToData.java

@@ -0,0 +1,5 @@
+package com.gyee.wisdom.common.data;
+
+public interface ToData<T> {
+    T toData();
+}

+ 30 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/AlertRule.java

@@ -0,0 +1,30 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class AlertRule implements Serializable{
+
+    private static final long serialVersionUID = -9116357102786246553L;
+
+    private String id;     //编码
+    private String name;   //名称
+    private String expression;     //表达式
+    private String description;    //描述
+    private String tag;    //标签
+    private String rank;      //级别
+    private boolean enabled;  //是否启用
+    private String modelId;    //设备类型
+    private int ednaValue;    //报警值
+    private String category;      //报警类别
+    private String range;      //范围
+    private String station;    //场站
+    private String windturbine;    //风机
+    private String line;           //线路
+    private String project;        //工程
+    private String electrical;     //电气
+    private String relatedParts;//关联部件
+}

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

@@ -0,0 +1,21 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class Alerthistory implements Serializable{
+
+    private static final long serialVersionUID = -9116357102786246345L;
+    private Long id;
+    private Date alertTime;
+    private int messageType;
+    private String operator;
+    private Long snapId;
+    private Integer isConfirmed;
+    private Date confirmTime;
+    private String confirmPerson;
+    private String dataInfo;
+}

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

@@ -0,0 +1,21 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class AlerthistoryNew implements Serializable{
+
+    private static final long serialVersionUID = -9116357102786246345L;
+    private Long id;
+    private Date alertTime;
+    private int messageType;
+    private String operator;
+    private Long snapId;
+    private Integer isConfirmed;
+    private Date confirmTime;
+    private String confirmPerson;
+    private String dataInfo;
+}

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

@@ -0,0 +1,39 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class Alertsnap implements Serializable{
+    private static final long serialVersionUID = -8348826240826071549L;
+    private Long id;
+    private String stationId;
+    private String projectId;
+    private String lineId;
+    private String windturbineId;
+    private int alertValue;
+    private String cateGory1;
+    private String cateGory2;
+    private String cateGory3;
+    private String rank;
+    private int isOpened;
+    private int isConfirmed;
+    private Date confirmTime;
+    private String confirmPerson;
+    private Date lastUpdateTime;
+    private String lastUpdatePerson;
+    private String stationName;
+    private String projectName;
+    private String lineName;
+    private String windturbineName;
+    private String alertText;
+    private String modelId;
+    private String testingpointKey;
+    private String ifixPicture;
+    private String ifixTag;
+    private Date lastCloseTime;
+    private String lastClosePerson;
+    private String dataInfo;
+}

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

@@ -0,0 +1,39 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class AlertsnapNew implements Serializable{
+    private static final long serialVersionUID = -8348826240826071549L;
+    private Long id;
+    private String stationId;
+    private String projectId;
+    private String lineId;
+    private String windturbineId;
+    private int alertValue;
+    private String cateGory1;
+    private String cateGory2;
+    private String cateGory3;
+    private String rank;
+    private int isOpened;
+    private int isConfirmed;
+    private Date confirmTime;
+    private String confirmPerson;
+    private Date lastUpdateTime;
+    private String lastUpdatePerson;
+    private String stationName;
+    private String projectName;
+    private String lineName;
+    private String windturbineName;
+    private String alertText;
+    private String modelId;
+    private String testingpointKey;
+    private String ifixPicture;
+    private String ifixTag;
+    private Date lastCloseTime;
+    private String lastClosePerson;
+    private String dataInfo;
+}

+ 28 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ElectricalTestingPointAI.java

@@ -0,0 +1,28 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ElectricalTestingPointAI implements Serializable {
+    private static final long serialVersionUID = -7009408032434108640L;
+    private String id;
+    private String code;
+    private String name;
+    private String model;
+    private String valueUnit;
+    private String englishName;
+    private String typeId;
+    private String modelId;
+    private String maxVal;
+    private String minVal;
+    private String reasonablemaxval;
+    private String reasonableminval;
+    private String electricalId;
+    private String uniformCode;
+    private String shortId;
+    private String longId;
+    private String windPowerStationId;
+    private String realtimeId;
+}

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

@@ -0,0 +1,28 @@
+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;
+
+    private String id;
+    private String code;
+    private String name;
+    private String model;
+    private String valueUnit;
+    private String englishName;
+    private String typeId;
+    private String modelId;
+    private String maxVal;
+    private String minVal;
+    private String reasonablemaxval;
+    private String reasonableminval;
+    private String electricalId;
+    private String uniformCode;
+    private String shortId;
+    private String longId;
+    private String windPowerStationId;
+    private String realtimeId;
+}

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

@@ -0,0 +1,21 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class FaultHistory implements Serializable{
+
+    private static final long serialVersionUID = -9116357102786246345L;
+    private Long id;
+    private Date faultTime;
+    private String operator;
+    private Long snapId;
+    private Integer confirmType;
+    private Date confirmTime;
+    private String confirmPerson;
+    private int messageType;
+
+}

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

@@ -0,0 +1,31 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class FaultSnap implements Serializable{
+    private static final long serialVersionUID = -8348826240826071549L;
+    private Long id;
+    private String stationId;
+    private String projectId;
+    private String lineId;
+    private String windturbineId;
+    private int alertValue;
+    private String cateGory1;
+    private String cateGory2;
+    private String cateGory3;
+    private String rank;
+    private int isOpened;
+    private Date lastUpdateTime;
+    private String lastUpdatePerson;
+    private String stationName;
+    private String projectName;
+    private String lineName;
+    private String windturbineName;
+    private String alertText;
+    private String modelId;
+    private String testingpointKey;
+}

+ 19 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeLine.java

@@ -0,0 +1,19 @@
+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;
+}

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

@@ -0,0 +1,30 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+//电场(风场)
+@Data
+public class GyeePowerStation implements Serializable{
+    private String id;
+    private String code;
+    private String name;
+    private String address;
+    private String telephone;
+    private double capacity;
+    private String capacityUnit;
+    private int quantity;
+    private String aname;
+    private double longitude;
+    private double latitude;
+    private String photo;
+    private String companyId;
+    private String systemManuFact;
+    private String headFarm;
+    private String headFarmPhone;
+    private String model;
+    private int orderNum;
+    private double altitude;
+
+}

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

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class GyeeProject implements Serializable{
+    private String id;
+    private String code;
+    private String name;
+    private String aname;
+    private String windpowerstationid;
+    private Double capacity;
+    private String capacityUnit;
+    private Integer quantity;
+    private String model;
+    private Date commissionDate;
+    private String masterPhone;
+    private String shiftForeman;
+    private String shiftForemanPhone;
+    private Integer orderNum;
+}

+ 28 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/GyeeWindturbine.java

@@ -0,0 +1,28 @@
+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{
+    private String id;
+    private String code;
+    private String windPowerStationId;
+    private Double longitude;
+    private Double latitude;
+    private String modelId;
+    private String status;
+    private String projectId;
+    private String lineId;
+    private Date firstIntegratedTime;
+    private String photo;
+    private String name;
+    private String standardid;
+    private GyeeLine gyeeLine;
+    private GyeeProject gyeeProject;
+    private GyeePowerStation gyeePowerStation;
+}

+ 21 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Gyeetopic.java

@@ -0,0 +1,21 @@
+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;
+}

+ 30 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/ScadaBJ.java

@@ -0,0 +1,30 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ScadaBJ implements Serializable {
+
+    private static final long serialVersionUID = -9116357102786246553L;
+    private long id;     //编码
+    //名称
+    private String pointkey;
+    private String description;    //描述
+    private String rank;      //级别
+    private boolean enabled;  //是否启用
+    private String category1;      //报警类别
+    private String category2;      //报警类别
+    private String category3;      //报警类别
+    private String category4;      //报警类别
+    private String stationId;    //场站
+    private String deviceId;    //设备
+    //报警方式
+    //0-值为0触发,值为1解除
+    //1-值为1触发,值为0解除
+    //2-变化即触发报警
+    private int alarmType;
+
+
+}

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

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ScadaFault implements Serializable{
+
+    private static final long serialVersionUID = -9116357102786246522L;
+    private int id;     //编码
+    //名称
+    private String pointkey;
+    private String description;    //描述
+    private String rank;      //级别
+    private boolean enabled;  //是否启用
+    private String category1;      //报警类别
+    private String category2;      //报警类别
+    private String category3;      //报警类别
+    private String category4;      //报警类别
+    private String stationId;    //场站
+    private String deviceId;    //设备
+
+}

+ 31 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warning.java

@@ -0,0 +1,31 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Warning implements Serializable {
+
+    private static final long serialVersionUID = -3888921205274103285L;
+    private String id;
+    private String levelId;
+    private String manuFactureRcode;
+    private String englishText;
+    private String chineseText;
+    private String parentId;
+    private Integer isLeaf;
+    private Integer sequenceNumber;
+    private String characterIstic;
+    private String modelId;
+    private String codeName;
+    private Integer ednaValue;
+    private Integer display;
+    private String warningClassifyId;
+    private Double standardTime;
+    private Integer isReset;
+    private String warningTypeId;
+    private String relatedParts;
+    private int enabled;
+
+}

+ 14 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WarningClassify.java

@@ -0,0 +1,14 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class WarningClassify implements Serializable{
+
+
+    private String id;
+    private String name;
+
+}

+ 27 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningfj.java

@@ -0,0 +1,27 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Warningfj implements Serializable{
+    private static final long serialVersionUID = 7771114461759044095L;
+    private String id;
+    private String levelId;
+    private String manuFactureRcode;
+    private String englishText;
+    private String chineseText;
+    private String parentId;
+    private Integer isLeaf;
+    private Integer sequenceNumber;
+    private String characterIstic;
+    private String modelId;
+    private String codeName;
+    private Integer ednaValue;
+    private Integer display;
+    private String warningClassifyId;
+    private Double standardTime;
+    private Integer isReset;
+    private String warningTypeId;
+}

+ 24 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningrecords.java

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.alarm;
+
+
+import lombok.Data;
+
+import java.util.Date;
+@Data
+public class Warningrecords {
+
+  private Long id;
+  private String windpowerstationid;
+  private String windturbineid;
+  private String warningid;
+  private Date warningtime;
+  private String isconfirm;
+  private String ishandle;
+  private String handle;
+  private String shutdowneventid;
+  private String levelid;
+  private String wtaiid;
+  private String durationhour;
+  private String isfilter;
+
+}

+ 19 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/Warningsyz.java

@@ -0,0 +1,19 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Warningsyz implements Serializable{
+
+    private static final long serialVersionUID = 2837638875098082094L;
+    private String id;
+    private String pointkey;
+    private String description;
+    private String area1;
+    private String area2;
+    private String stationid;
+    private String levelid;
+    private int enabled;
+}

+ 28 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WindturbineTestingpointAi.java

@@ -0,0 +1,28 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class WindturbineTestingpointAi implements Serializable {
+  private static final long serialVersionUID = -7009408032434108640L;
+  private String id;
+  private String code;
+  private String name;
+  private String model;
+  private String valueunit;
+  private String englishname;
+  private String typeid;
+  private String modelid;
+  private String maxval;
+  private String minval;
+  private String reasonablemaxval;
+  private String reasonableminval;
+  private String windturbineid;
+  private String uniformcode;
+  private String shortid;
+  private String longid;
+  private String windpowerstationid;
+  private String realtimeid;
+}

+ 28 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/alarm/WindturbineTestingpointDi.java

@@ -0,0 +1,28 @@
+package com.gyee.wisdom.common.data.alarm;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class WindturbineTestingpointDi implements Serializable{
+    private static final long serialVersionUID = -7009408032434108640L;
+    private String id;
+    private String code;
+    private String name;
+    private String model;
+    private String valueunit;
+    private String englishName;
+    private String typeId;
+    private String modelId;
+    private Double maxval;
+    private Double minval;
+    private Double reasonableMaxVal;
+    private Double reasonableMinVal;
+    private String windturbineId;
+    private String uniformcode;
+    private String shortId;
+    private String longId;
+    private String windpowerstationId;
+    private String realTimeId;
+}

+ 36 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/control/AlarmSnapData.java

@@ -0,0 +1,36 @@
+package com.gyee.wisdom.common.data.control;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @descrition:当前风机报警
+ * @author:Wanghs
+ * @date:2019-09-12
+ */
+@Data
+public class AlarmSnapData implements Serializable {
+
+    private Long id;
+    private String stationId;
+    private String projectId;
+    private String lineId;
+    private String windturbineId;
+    private int alertValue;
+    private String category1;
+    private String category2;
+    private String category3;
+    private String rank;
+    private int isOpened;
+    private Date lastUpdateTime;
+    private String stationName;
+    private String projectName;
+    private String lineName;
+    private String windturbineName;
+    private String alertText;
+    private String modelId;
+    private String testingpointKey;
+    private String dataInfo;
+}

+ 40 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/control/ControlLog.java

@@ -0,0 +1,40 @@
+package com.gyee.wisdom.common.data.control;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @descrition:控制日志
+ * @author:Wanghs
+ * @date:2019-09-03
+ */
+@Data
+public class ControlLog {
+
+    private int id;
+
+    //控制类型
+    private int type;
+
+    //控制时间
+    private Date time;
+
+    //用户Id
+    private int userId;
+
+    //风机编号
+    private String windturbineId;
+
+    //风场编号
+    private String stationId;
+
+    //命令地址
+    private int cmdId;
+
+    //是否成功
+    private boolean success;
+
+    //错误码
+    private String controlErrorsCode;
+}

+ 24 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/control/GycpCmdInfo.java

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.control;
+
+import lombok.Data;
+
+/**
+ * @descrition:控制命令映射地址
+ * @author:Wanghs
+ * @date:2019-09-02
+ */
+@Data
+public class GycpCmdInfo {
+
+    private int id;
+
+    private int type;
+
+    private int cmdId;
+
+    private int cmdValue;
+
+    private String windturbineId;
+
+
+}

+ 22 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/control/InputOrOutputSpeedTotal.java

@@ -0,0 +1,22 @@
+package com.gyee.wisdom.common.data.control;
+
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @descrition: 风机切入风
+ * @author:Wanghs
+ * @date:2019-09-06
+ */
+@Data
+public class InputOrOutputSpeedTotal {
+
+    private int id;
+    //风机编号
+    private String windturbineId;
+    //风机最小切入风
+    private double inputSmall;
+    //日期
+    private Date recordDate;
+}

+ 58 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/exception/Result.java

@@ -0,0 +1,58 @@
+package com.gyee.wisdom.common.data.exception;
+
+
+import com.gyee.wisdom.common.enums.ResultCode;
+
+/**
+ * Package: com.gyee.wisdom.admin.advice
+ * Description: 产品化
+ * Author:  ShiLin
+ * Date: Created in 2018/4/10 16:52
+ * Company: 公司
+ * Copyright: Copyright (c) 2018
+ * Version: 0.0.1
+ * Modified By:
+ */
+public class Result<T> {
+
+    private int code;
+    private String msg;
+    private T data;
+
+    public Result() {
+    }
+
+    public Result(ResultCode resultCode, T data) {
+        this(resultCode);
+        this.data = data;
+    }
+
+    public Result(ResultCode resultCode) {
+        this.code = resultCode.getCode();
+        this.msg = resultCode.getMsg();
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    public void setData(T data) {
+        this.data = data;
+    }
+}

+ 37 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/feature/FeatureStat.java

@@ -0,0 +1,37 @@
+package com.gyee.wisdom.common.data.feature;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @descrition: 液压泵运行统计
+ * @author:Wanghs
+ * @date:2019-11-18
+ */
+@Data
+public class FeatureStat implements Serializable {
+    //id
+    private Long id;
+    //风机编号
+    private String windturbineId;
+    //风场编号
+    private String stationId;
+    //统计日期
+    private Date statTime;
+    //发生次数
+    private int total;
+    //总时长(秒)
+    private double totalSeconds;
+    //平均时长(秒)
+    private double avgSeconds;
+    //最大时长
+    private double maxSeconds;
+    //最小时长
+    private double minSeconds;
+    //类型 YYBYX-液压泵运行,LWYC-滤网压差故障,ZPH-偏航,YPH-右偏航,JLDZ-解缆动作
+    private String typeCode;
+    //类型名称
+    private String typeName;
+}

+ 60 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/job/model/JobAndTrigger.java

@@ -0,0 +1,60 @@
+package com.gyee.wisdom.common.data.job.model;
+
+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;
+	}
+
+}

+ 20 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertHistory.java

@@ -0,0 +1,20 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class SystemAlertHistory implements Serializable {
+    private static final long serialVersionUID = -6938621835773304400L;
+
+    private String id;
+
+    private Date alerttime;
+
+    private Character messagetype;
+
+    private String operator;
+}

+ 32 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertRule.java

@@ -0,0 +1,32 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+@Data
+public class SystemAlertRule implements Serializable {
+
+    private static final long serialVersionUID = -8179509263998627170L;
+
+    private String id;
+
+    private String name;
+
+    private String description;
+
+    private String expression;
+
+    private String tag;
+
+    private String rank;
+
+    private Integer enabled;
+
+    private Integer ednavalue;
+
+    private String category;
+
+    private String modelid;
+}

+ 43 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemAlertSnap.java

@@ -0,0 +1,43 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class SystemAlertSnap implements Serializable {
+    private static final long serialVersionUID = -7534866988275191900L;
+
+    private String id;
+
+    private String thingtype;
+
+    private String thingid;
+
+    private Integer alertvalue;
+
+    private String category1;
+
+    private String category2;
+
+    private String rank;
+
+    private Integer isopened;
+
+    private Integer isconfirmed;
+
+    private Date confirmtime;
+
+    private String confirmperson;
+
+    private Date lastupdatetime;
+
+    private String lastupdateperson;
+
+    private String thingname;
+
+    private String alerttext;
+
+
+}

+ 23 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemLob.java

@@ -0,0 +1,23 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+@Data
+public class SystemLob implements Serializable {
+
+    private static final long serialVersionUID = -5471366591428717842L;
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private String orderno;
+
+    private String descritiion;
+
+}

+ 22 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemTestingPoint.java

@@ -0,0 +1,22 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class SystemTestingPoint implements Serializable {
+    private static final long serialVersionUID = -4498998038201402432L;
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private String uniformcode;
+
+    private String datatype;
+
+    private String modelid;
+}

+ 22 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/lobsystem/SystemThingEntity.java

@@ -0,0 +1,22 @@
+package com.gyee.wisdom.common.data.lobsystem;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class SystemThingEntity implements Serializable {
+    private static final long serialVersionUID = 7899576180373254941L;
+
+    private String id;
+
+    private String code;
+
+    private String name;
+
+    private String lobsystemid;
+
+    private String modelid;
+
+    private String description;
+}

+ 20 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/Inverter.java

@@ -0,0 +1,20 @@
+package com.gyee.wisdom.common.data.photovoltaic;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @descrition:逆变器基本信息
+ * @author:WXW
+ * @date:2020-04-28
+ */
+@Data
+public class Inverter implements Serializable {
+    private String station;
+    private String project;
+    private String line;
+    private String model;
+    private String id;
+    //private String name;
+}

+ 34 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/photovoltaic/InverterBasicData.java

@@ -0,0 +1,34 @@
+package com.gyee.wisdom.common.data.photovoltaic;
+
+import lombok.Data;
+
+/**
+ * @descrition:光伏逆变器基础数据
+ * @author:WXW
+ * @date:2020-04-29
+ */
+@Data
+public class InverterBasicData {
+
+    private String station;
+    private String project;
+    private String line;
+    private String model;
+    private String id;
+    //private String name;
+
+    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();
+    }
+}

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

@@ -0,0 +1,34 @@
+package com.gyee.wisdom.common.data.point;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *Author:Wanghs
+ */
+
+//电气测点
+@Data
+public class ElectricalTestingPoint implements Serializable {
+    //编号(主键)
+    private String id;
+    //编码
+    private String code;
+    //名称
+    private String name;
+    //单位
+    private String valueUnit;
+    //英文名称
+    private String englishName;
+    //统一编码
+    private String uniformCode;
+    //风场编码
+    private String stationId;
+    //数据类型
+    private String dataType;
+    //测点类型
+    private int typeId;
+
+
+}

+ 39 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/point/LevelTypeTestingPoint.java

@@ -0,0 +1,39 @@
+package com.gyee.wisdom.common.data.point;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *Author:Wanghs
+ */
+
+//风电场抽象测点
+@Data
+public class LevelTypeTestingPoint implements Serializable {
+    //编号(主键)
+    private String id;
+    //编码
+    private String code;
+    //名称
+    private String name;
+    //型号
+    private String model;
+    //单位
+    private String valueUnit;
+    //英文名称
+    private String englishName;
+    //最大值
+    private double maxVal;
+    //最小值
+    private double minVal;
+    //合理最大值
+    private double reasonableMaxVal;
+    //合理最小值
+    private double reasonableMinVal;
+    //统一编码
+    private String uniformCode;
+    //数据类型
+    private String dataType;
+}

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

@@ -0,0 +1,31 @@
+package com.gyee.wisdom.common.data.point;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *Author:Wanghs
+ */
+
+@Data
+//风电场测点
+public class PowerStationTestingPoint implements Serializable {
+
+    //编号
+    private String id;
+    //编码
+    private String code;
+    //名称
+    private String name;
+    //单位
+    private String valueUnit;
+    //英文名称
+    private String englishName;
+    //统一编码
+    private String uniformCode;
+    //对象编码(电场编码)
+    private String stationId;
+    //分类(1遥测、2遥信、3遥调、4遥控、5计算)
+    private int category;
+}

+ 47 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/point/TestingPoint.java

@@ -0,0 +1,47 @@
+package com.gyee.wisdom.common.data.point;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ *Author:Wanghs
+ */
+
+//测点
+@Data
+public class TestingPoint implements Serializable {
+
+    //编号(主键)
+    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 uniformCode;
+    //数据类型
+    private String dataType;
+    //分类(1遥测、2遥信、3遥调、4遥控、5计算)
+    private int category;
+
+}

+ 44 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/point/WindturbineTestingPoint.java

@@ -0,0 +1,44 @@
+package com.gyee.wisdom.common.data.point;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ *Author:Wanghs
+ */
+
+//风机测点
+@Data
+public class WindturbineTestingPoint implements Serializable {
+
+    //编号(主键)
+    private String id;
+    //编码
+    private String code;
+    //名称
+    private String name;
+    //型号名称
+    private String model;
+    //单位
+    private String valueUnit;
+    //英文名称
+    private String englishName;
+    //所属型号
+    private String modelId;
+    //风机编号
+    private String windturbineId;
+    //统一编码
+    private String uniformCode;
+    //风场编码
+    private String stationId;
+    //数据类型
+    private String dataType;
+    //工程编号
+    private String projectId;
+    //风电线编号
+    private String lineId;
+    // 分类(1遥测、2遥信、3遥调、4遥控、5计算)
+    private int category;
+
+}

+ 17 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/power/Status8Snap.java

@@ -0,0 +1,17 @@
+package com.gyee.wisdom.common.data.power;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class Status8Snap implements Serializable {
+    private String wtId;
+    private long ts;
+    private int status;
+}

+ 14 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/power/WindturbinePowerCurvefitting.java

@@ -0,0 +1,14 @@
+package com.gyee.wisdom.common.data.power;
+
+import lombok.Data;
+import java.io.Serializable;
+
+
+@Data
+public class WindturbinePowerCurvefitting implements Serializable {
+    private String id;
+    private String windturbineId;
+    private double speed;
+    private double actualPower;
+    private double optimalPower;
+}

+ 72 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/BootstrapTreeNode.java

@@ -0,0 +1,72 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+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
+ *
+ */
+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;
+	}
+
+	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;
+	}
+
+	
+
+}

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

@@ -0,0 +1,78 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class MenuCreateCommand {
+
+    private String id;
+
+    private String label;
+
+    private String path="0";  //父节点的路径与父节点的id路径,用","分开,0表示父节点是根节点
+
+    private int order=1;  //排序
+
+    private String url;
+
+    private int type = 1;//扩展字段。菜单类型,供不同业务区分
+
+    private String style;//样式,方便ui展现
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public int getOrder() {
+        return order;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+}

+ 65 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MenuUpdateCommond.java

@@ -0,0 +1,65 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class MenuUpdateCommond {
+
+    private String label;
+    private String url;
+    private int orderNo;
+    private int type;//扩展字段。菜单类型,供不同业务区分
+
+    private String style;//样式,方便ui展现
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    private String path; //菜单层级路径
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public int getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(int orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+}

+ 35 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/MyProfile.java

@@ -0,0 +1,35 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+/**
+ * 用户个人信息
+ *
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class MyProfile {
+
+    private String username;
+
+    private String email;
+
+    public MyProfile(String username, String email) {
+        this.username = username;
+        this.email = email;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+}

+ 28 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/ProfileCommand.java

@@ -0,0 +1,28 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class ProfileCommand {
+
+    private String email;
+
+    private String password;
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+}

+ 74 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/UserCommond.java

@@ -0,0 +1,74 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class UserCommond {
+
+
+    /** 登录名称 */
+    private String userName;
+
+    /** 密码 */
+    private String password;
+
+    /** 邮箱 */
+    private String email;
+
+    /** 中文名称 */
+    private String chineseName;
+
+    /** 联系电话 */
+    private String contractTel;
+    private String registionId;//
+
+
+    public String getChineseName() {
+        return chineseName;
+    }
+
+    public void setChineseName(String chineseName) {
+        this.chineseName = chineseName;
+    }
+
+    public String getContractTel() {
+        return contractTel;
+    }
+
+    public void setContractTel(String contractTel) {
+        this.contractTel = contractTel;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String username) {
+        this.userName = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public String getRegistionId() {
+        return registionId;
+    }
+
+    public void setRegistionId(String registionId) {
+        this.registionId = registionId;
+    }
+}

+ 99 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/dto/UserDto.java

@@ -0,0 +1,99 @@
+package com.gyee.wisdom.common.data.system.dto;
+
+import java.util.Date;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class UserDto {
+
+    /** 主键ID */
+    private String id;
+
+    /** 登录名称 */
+    private String userName;
+
+
+    /** 邮箱 */
+    private String email;
+
+    /** 是否禁用 */
+    private boolean disabled;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 最后登录时间 */
+    private Date lastTime;
+
+    /** 中文名称 */
+    private String chineseName;
+
+    /** 联系电话 */
+    private String contractTel;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    public boolean isDisabled() {
+        return disabled;
+    }
+
+    public void setDisabled(boolean disabled) {
+        this.disabled = disabled;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getLastTime() {
+        return lastTime;
+    }
+
+    public void setLastTime(Date lastTime) {
+        this.lastTime = lastTime;
+    }
+
+    public String getChineseName() {
+        return chineseName;
+    }
+
+    public void setChineseName(String chineseName) {
+        this.chineseName = chineseName;
+    }
+
+    public String getContractTel() {
+        return contractTel;
+    }
+
+    public void setContractTel(String contractTel) {
+        this.contractTel = contractTel;
+    }
+}

+ 22 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/DataDictionary.java

@@ -0,0 +1,22 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class DataDictionary implements Serializable {
+
+    /** 主键ID */
+    private int id;
+    /** 类型 */
+    private String category;
+    /** 编码 */
+    private String code;
+    /** 名称 */
+    private String name;
+    /** 排列顺序 */
+    private int orderNo;
+    /** 是否启用 */
+    private boolean enabled;
+}

+ 40 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Menu.java

@@ -0,0 +1,40 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.List;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ * 菜单
+ */
+@Data
+public class Menu extends TreeModel {
+
+    /**链接*/
+    private String url;
+
+    private int layer;
+
+    private List<Role> roles;
+
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+    @Override
+	public int getLayer() {
+		return layer;
+	}
+
+	public void setLayer(int layer) {
+		this.layer = layer;
+	}
+
+}

+ 85 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Resource.java

@@ -0,0 +1,85 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import java.io.Serializable;
+import java.util.UUID;
+
+/**
+ *
+ * url资源
+ */
+public class Resource implements Serializable {
+
+	/** 唯一资源编码 */
+	private String id = UUID.randomUUID().toString();
+
+	/** 资源名称 */
+	private String title;
+
+	/** 状态 是否禁用*/
+	private boolean disabled;
+
+	/** 地址 */
+	private String url;
+
+	/** 描述 */
+	private String description;
+
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+
+	public boolean isDisabled() {
+		return disabled;
+	}
+
+	public void setDisabled(boolean disabled) {
+		this.disabled = disabled;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+
+	public void setUrl(String url) {
+		this.url = url;
+	}
+
+	public String getId() {
+		return id;
+	}
+
+	public void setId(String id) {
+		this.id = id;
+	}
+
+	public String getDescription() {
+		return 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;
+
+		Resource resource = (Resource) o;
+
+		return id != null ? id.equals(resource.id) : resource.id == null;
+
+	}
+
+	@Override
+	public int hashCode() {
+		return id != null ? id.hashCode() : 0;
+	}
+}

+ 36 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/Role.java

@@ -0,0 +1,36 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ * 角色
+ *
+ */
+@Data
+public class Role implements Serializable {
+
+	private String id ;
+
+	/** 角色名*/
+	private String name;
+
+	/** 描述 */
+	private String description;
+
+	/** 状态 是否禁用*/
+	private boolean disabled;
+
+	/**用户集合*/
+	private List<User> userList;
+
+	/**菜单集合**/
+	private List<Menu> menuList;
+
+
+
+}
+

+ 47 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectMenu.java

@@ -0,0 +1,47 @@
+package com.gyee.wisdom.common.data.system.model;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class SelectMenu {
+
+    private String mid;//菜单id
+
+    private String label;
+
+    private boolean checked;//角色是否有此菜单权限
+
+    public SelectMenu() {
+    }
+
+    public SelectMenu(String mid, String label, boolean checked) {
+        this.mid = mid;
+        this.label = label;
+        this.checked = checked;
+    }
+
+    public String getMid() {
+        return mid;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setMid(String mid) {
+        this.mid = mid;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+}

+ 47 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectResource.java

@@ -0,0 +1,47 @@
+package com.gyee.wisdom.common.data.system.model;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class SelectResource {
+
+    private String rid;//resource id
+
+    private String label;
+
+    private boolean checked;
+
+    public SelectResource() {
+    }
+
+    public SelectResource(String rid, String label, boolean checked) {
+        this.rid = rid;
+        this.label = label;
+        this.checked = checked;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+}

+ 49 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectRole.java

@@ -0,0 +1,49 @@
+package com.gyee.wisdom.common.data.system.model;
+
+/**
+ * 用户分配角色功能中列出角色,用户已经具备的角色checked=true
+ *
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class SelectRole {
+
+    private String rid;//role id
+
+    private String name;//role name
+
+    private boolean checked;
+
+    public SelectRole() {
+    }
+
+    public SelectRole(String rid, String name, boolean checked) {
+        this.rid = rid;
+        this.name = name;
+        this.checked = checked;
+    }
+
+    public String getRid() {
+        return rid;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setRid(String rid) {
+        this.rid = rid;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+}

+ 49 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SelectStation.java

@@ -0,0 +1,49 @@
+package com.gyee.wisdom.common.data.system.model;
+
+/**
+ * 用户分配角色功能中列出角色,用户已经具备的角色checked=true
+ *
+ * @author northriver
+ * @date 2017/5/11
+ */
+public class SelectStation {
+
+    private String sid;//role id
+
+    private String name;//role name
+
+    private boolean checked;
+
+    public SelectStation() {
+    }
+
+    public SelectStation(String sid, String name, boolean checked) {
+        this.sid = sid;
+        this.name = name;
+        this.checked = checked;
+    }
+
+    public String getSid() {
+        return sid;
+    }
+
+    public boolean isChecked() {
+        return checked;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setSid(String sid) {
+        this.sid = sid;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setChecked(boolean checked) {
+        this.checked = checked;
+    }
+}

+ 68 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/SysLog.java

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

+ 263 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/TreeModel.java

@@ -0,0 +1,263 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @author northriver
+ * @date 2017/5/11
+ * id   label   path        level order
+ * 1    水果      0           1   1
+ * 2    苹果      0,1         2   1
+ * 3    梨子      0,1         2   2
+ * 4    雪梨      0,1,3       3   1
+ * 5    鸭梨      0,1,3       3   2
+ */
+public class TreeModel {
+
+    private String id;
+
+    private String label;
+
+    private String path="0";  //父节点的路径与父节点的id路径,用","分开,0表示父节点是根节点
+
+    private int orderNo=1;  //排序
+
+    private int type;//扩展字段。菜单类型,供不同业务区分
+
+    private String style;//样式,方便ui展现
+
+    /** 状态 是否禁用*/
+    private boolean disabled;
+
+    private List<? extends TreeModel> childNodes=new ArrayList<>();
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getLabel() {
+        return label;
+    }
+
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public int getLayer() {
+        if(path==null){
+            return 1;
+        }
+        return path.split(",").length;
+    }
+
+
+    public int getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(int orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public boolean isDisabled() {
+        return disabled;
+    }
+
+    public void setDisabled(boolean disabled) {
+        this.disabled = disabled;
+    }
+
+    public String getStyle() {
+        return style;
+    }
+
+    public void setStyle(String style) {
+        this.style = style;
+    }
+
+    public int getType() {
+        return type;
+    }
+
+    public void setType(int type) {
+        this.type = type;
+    }
+
+    public TreeModel newChildNode(String nodeId, String label, int order){
+        TreeModel node=new TreeModel();
+        node.path =this.path +","+this.id;
+        node.id=nodeId;
+        node.orderNo=order;
+        node.label=label;
+        return node;
+    }
+
+    public List<? extends TreeModel> getChildNodes() {
+        return childNodes;
+    }
+
+    @Override
+    public String toString() {
+        return label+"-"+ path +"-"+id+"-"+orderNo;
+    }
+
+    /***
+     * 以level==1的节点作为开始节点构建树结构
+     * @param nodes
+     * @return
+     */
+    public static List<? extends TreeModel> buildTree(List<? extends TreeModel> nodes){
+        if (isEmpty(nodes)){
+            return null;
+        }
+        List<? extends TreeModel> firstLevels=nodes.stream().filter(node->!node.isDisabled() && node.getLayer()==1).collect(Collectors.toList());
+        sortByOrder(firstLevels);
+        firstLevels.stream().forEach(node-> setChildren(node,nodes));
+        return firstLevels;
+    }
+
+
+    private static  void setChildren(TreeModel currentNode, List<? extends TreeModel> nodeList){
+        List<? extends TreeModel> childrens=nodeList.stream().filter(node->(!node.isDisabled() && node.getPath().equals(currentNode.getPath()+","+currentNode.getId()))).collect(Collectors.toList());
+        currentNode.childNodes=childrens;
+        if (isEmpty(childrens)){
+            return;
+        }
+        sortByOrder(childrens);
+        childrens.stream().forEach(node-> setChildren(node,nodeList));
+
+    }
+
+    private static void sortByOrder(List<? extends TreeModel> firstLevels) {
+        firstLevels.sort((node1,node2)->Integer.valueOf(node1.getOrderNo()).compareTo(Integer.valueOf(node2.getOrderNo())));
+    }
+
+
+    /***
+     * 按数结构给节点排序
+     * @param nodes
+     */
+    public static void sortByTree(List<? extends TreeModel> nodes) {
+        if(isEmpty(nodes)){
+            return;
+        }
+        sortByOrder(nodes);
+        nodes.sort((o1, o2) -> (o1.getPath()+","+o1.getId()).compareTo(o2.getPath()+","+o2.getId()));
+    }
+
+    private static boolean isEmpty(List nodes) {
+        return nodes == null || nodes.isEmpty();
+    }
+
+
+    //按节点的父子层次顺序展示
+    private static void printTreeToConsole(List<TreeModel> nodes){
+        if (isEmpty(nodes)){
+            return;
+        }
+
+        sortByTree(nodes);
+
+        nodes.stream().forEach(node->{
+            if(node.isDisabled()){
+                return;
+            }
+            for(int i=1;i<node.getLayer();i++){
+                System.out.print("\t");
+            }
+            System.out.println(node);
+        });
+    }
+
+
+    //以第一层为起点,递归方式展示父子层次树
+    private static void printFirstLevelTreeToConsole(List<? extends TreeModel> nodes){
+        if (isEmpty(nodes)){
+            return;
+        }
+        nodes.forEach(item->{
+            if(item.isDisabled()){
+                return;
+            }
+            for(int i=1;i<item.getLayer();i++){
+                System.out.print("\t");
+            }
+            System.out.println(item);
+
+            printFirstLevelTreeToConsole(item.getChildNodes());
+        });
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        TreeModel treeModel = (TreeModel) o;
+
+        return id != null ? id.equals(treeModel.id) : treeModel.id == null;
+
+    }
+
+    @Override
+    public int hashCode() {
+        return id != null ? id.hashCode() : 0;
+    }
+
+    public static void main1(String[] arg){
+        List<TreeModel> nodes=new ArrayList<>();
+        TreeModel fruit=new TreeModel();
+        fruit.setId("1");
+        fruit.setLabel("水果");
+        fruit.setOrderNo(2);
+        nodes.add(fruit);
+
+        TreeModel apple=fruit.newChildNode("7","苹果",2);
+        nodes.add(apple);
+        nodes.add(apple.newChildNode("4","红富士",2));
+        nodes.add(apple.newChildNode("15","山东苹果",1));
+
+        TreeModel lizi=fruit.newChildNode("e8","梨子",1);
+        nodes.add(lizi);
+        nodes.add(lizi.newChildNode("7r7","雪梨",1));
+        nodes.add(lizi.newChildNode("t31o","鸭梨",2));
+
+        TreeModel shucai=new TreeModel();
+        shucai.setId("a101");
+        shucai.setLabel("蔬菜");
+        shucai.setOrderNo(1);
+        shucai.setDisabled(true);
+         nodes.add(shucai);
+        nodes.add(shucai.newChildNode("213","白菜",2));
+        printTreeToConsole(nodes);
+
+        System.out.println("====================");
+        List<? extends TreeModel> tree= TreeModel.buildTree(nodes);
+        printFirstLevelTreeToConsole(tree);
+
+
+
+
+
+
+    }
+
+}

+ 43 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/User.java

@@ -0,0 +1,43 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class User implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/** 主键ID */
+	private String id ;
+	/** 登录名称 */
+	private String userName;
+	/** 密码 */
+	private String password;
+	/**密码加密的盐*/
+	private String salt;
+	/** 邮箱 */
+	private String email;
+	/** 是否禁用 */
+	private boolean disabled;
+	/** 创建时间 */
+	private Date createTime;
+	/** 最后登录时间 */
+	private Date lastTime;
+	/** 中文名称 */
+	private String chineseName;
+	/** 联系电话 */
+	private String contractTel;
+	/** app注册ID */
+	private String registionId;
+
+	private List<Role> roles;
+
+	public boolean isRoot(){
+		return "admin".equals(userName);
+	}
+
+}

+ 15 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/system/model/VerifyCode.java

@@ -0,0 +1,15 @@
+package com.gyee.wisdom.common.data.system.model;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class VerifyCode implements Serializable {
+
+	private String phone;
+	private String vCode;
+	private long generateTime;
+
+}
+

+ 46 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BaseTsQuery.java

@@ -0,0 +1,46 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class BaseTsQuery implements TsQuery {
+
+    private final TsPoint tsPoint;
+    private final long startTs;
+    private final long endTs;
+    private final int interval;
+    private final int limit ;
+    private final Interpolation interpolation;
+
+
+    public BaseTsQuery(TsPoint tsPoint, long startTs, long endTs, int interval, int limit, Interpolation interpolation) {
+        this.tsPoint = tsPoint;
+        this.startTs = startTs;
+        this.endTs = endTs;
+        this.interval = interval;
+        this.limit = limit;
+        this.interpolation = interpolation;
+    }
+
+    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);
+            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;
+                result[i] = new Date(ts);
+            }
+
+            return result;
+        }
+        return  null;
+    }
+
+}

+ 38 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsData.java

@@ -0,0 +1,38 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public abstract class BasicTsData implements TsData, Comparable<BasicTsData>{
+
+    private final long ts;
+
+    private final short status;
+
+    public BasicTsData(long ts, short status) {
+        this.ts = ts;
+        this.status = status;
+    }
+    @Override
+    public long getTs() {
+        return ts;
+    }
+    @Override
+    public short getStatus() {
+        return status;
+    }
+
+    @Override
+    public int compareTo(BasicTsData o) {
+        return Long.compare(ts, o.ts);
+    }
+
+    @Override
+    public String toString() {
+        return "BasicTsData{ts='" + ts +
+                "', status='" + this.getStatus() +
+                "'}";
+    }
+
+}
+

+ 62 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BasicTsPoint.java

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

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

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import java.util.Base64;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class BlobTsData extends BasicTsData {
+
+    private final byte[] blob;
+
+    public BlobTsData(long ts, short status, byte[] blob) {
+        super(ts, status);
+        this.blob = blob;
+    }
+
+    //public byte[] getBlob() { return  blob ;}
+
+    public String getBlobValue() {
+        return Base64.getEncoder().encodeToString(blob);
+    }
+
+}
+

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

@@ -0,0 +1,22 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+import java.util.Base64;
+
+/**
+ * @descrition:
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class BlobWriteTsData {
+    private String tagName;
+    private long ts;
+    private  byte[]blob;
+
+    public String getValue() {
+        return Base64.getEncoder().encodeToString(blob);
+    }
+
+}

+ 19 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/BooleanTsData.java

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

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

@@ -0,0 +1,19 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+/**
+ * @descrition:
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class BooleanWriteTsData  {
+    private String tagName;
+    private long ts;
+    private boolean actualValue;
+
+    public boolean getValue() {
+        return this.actualValue;
+    }
+}

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

@@ -0,0 +1,18 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+@Data
+@AllArgsConstructor
+public class Coordinate {
+
+    private double latitude;
+
+    private double longitude;
+
+}
+

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

@@ -0,0 +1,26 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class CoordinateTsData extends BasicTsData {
+
+    private final Coordinate coordinate;
+
+    public CoordinateTsData(long ts, short status, double latitude, double longitude) {
+        super(ts, status);
+        this.coordinate = new Coordinate(latitude, longitude);
+    }
+
+    public CoordinateTsData(long ts, short status, Coordinate coordinate) {
+        super(ts, status);
+        this.coordinate = coordinate;
+    }
+
+    public Coordinate getCoordinateValue() {
+        return coordinate;
+        //return String.format("{\"longitude\":%f,\"latitude\":\"%f\"}", longitude, latitude);
+    }
+
+}
+

+ 21 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/CoordinateWriteTsData.java

@@ -0,0 +1,21 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+/**
+ * @descrition:
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class CoordinateWriteTsData  {
+
+    private String tagName;
+    private long ts;
+    private  double latitude;
+    private  double longitude;
+
+    public double getLatitude() { return  latitude ;}
+    public double getLongitude() {return  longitude; }
+
+}

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

@@ -0,0 +1,30 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class DoubleStatData {
+
+    private DoubleTsData avg;
+    private DoubleTsData max;
+    private DoubleTsData min;
+
+    public DoubleStatData(DoubleTsData avg, DoubleTsData max, DoubleTsData min) {
+        this.avg = avg;
+        this.max = max;
+        this.min = min;
+    }
+
+    public DoubleTsData getAvg() {
+        return avg;
+    }
+
+    public DoubleTsData getMax() {
+        return max;
+    }
+
+    public DoubleTsData getMin() {
+        return min;
+    }
+}
+

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

@@ -0,0 +1,33 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class DoubleTsData extends BasicTsData {
+
+    private final double actualValue;
+
+    public DoubleTsData(long ts, short status, double actualValue) {
+        super(ts, status);
+        this.actualValue = actualValue;
+    }
+
+
+    public double getDoubleValue() {
+        return actualValue;
+    }
+
+//    public String getValue() {
+//        return Double.toString(actualValue);
+//    }
+
+    @Override
+    public String toString() {
+        return "DoubleTsData{ts='" + this.getTs() +
+                "', status='" + this.getStatus() +
+                "', value='" + this.getDoubleValue() +
+                "'}";
+    }
+
+}
+

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

@@ -0,0 +1,19 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+/**
+ * @descrition:
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class DoubleWriteTsData  {
+    private String tagName;
+    private long ts;
+    private double actualValue;
+
+    public double getValue() {
+        return this.actualValue;
+    }
+}

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

@@ -0,0 +1,28 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Optional;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class GeneralTsData implements TsData {
+
+    private long ts;
+    private short status;
+    private Optional<Double> doubleValue;
+    private Optional<Long> longValue;
+    private Optional<Boolean> booleanValue;
+    private Optional<String> stringValue;
+    private Optional<String> blobValue;
+    private Optional<Coordinate> coordinateValue;
+
+
+}
+

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

@@ -0,0 +1,18 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @Auther: ruyuan
+ * @Date: 2019-05-04 17:26
+ * @Description:
+ */
+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;
+    }
+}

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

@@ -0,0 +1,8 @@
+
+package com.gyee.wisdom.common.data.timeseries;
+
+public enum Interpolation {
+    SNAP,   // 历史快照数据
+    INTERPOLATION, //插值
+    RAW    //原始数据
+}

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

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class LongTsData extends BasicTsData {
+
+    private final long actualValue;
+
+    public LongTsData(long ts, short status, long actualValue) {
+        super(ts, status);
+        this.actualValue = actualValue;
+    }
+
+    public long getLongValue() {
+        return actualValue;
+    }
+
+//    public String getValue() {
+//        return Long.toString(actualValue);
+//    }
+
+}
+

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

@@ -0,0 +1,20 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+/**
+ * @descrition:
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class LongWriteTsData  {
+
+    private String tagName;
+    private long ts;
+    private long actualValue;
+
+    public long getValue() {
+        return this.actualValue;
+    }
+}

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

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public class StringTsData extends BasicTsData {
+
+    private final String actualValue;
+
+    public StringTsData(long ts, short status, String actualValue) {
+        super(ts, status);
+        this.actualValue = actualValue;
+    }
+
+//    public String getActualValue() {
+//        return actualValue;
+//    }
+
+    public String getStringValue() {
+        return actualValue;
+    }
+
+}
+

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

@@ -0,0 +1,20 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.Data;
+
+/**
+ * @descrition:String类型写入实体类
+ * @author:Wanghs
+ * @date:2018-05-04
+ */
+@Data
+public class StringWriteTsData  {
+    private String tagName;
+    private long ts;
+    private String actualValue;
+
+    public String getValue() {
+        return this.actualValue;
+    }
+
+}

+ 15 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsData.java

@@ -0,0 +1,15 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public interface TsData {
+
+    long getTs();
+
+    short getStatus();
+
+    //double getValue();
+
+}
+

+ 15 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsDataType.java

@@ -0,0 +1,15 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+public enum TsDataType {
+    LONG,
+    DOUBLE,
+    BOOLEAN,
+    STRING,
+    BLOB,
+    COORDINATE
+
+}
+

+ 24 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPoint.java

@@ -0,0 +1,24 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+/**
+ * @author songwb<songwb @ aliyun.com>
+ */
+public interface TsPoint {
+
+    String getId();
+
+    String getThingId();
+
+    String getThingType();
+
+    String getUniformCode();
+
+    TsDataType getTsDataType();
+
+    //reids库
+    String getTag();
+}
+

+ 62 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPointData.java

@@ -0,0 +1,62 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Optional;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TsPointData {
+
+    private String tagName;
+    private GeneralTsData tsData;
+
+    public TsDataType findDataType() {
+        if (tsData.getDoubleValue().isPresent()){
+            return TsDataType.DOUBLE;
+        }
+        else if (tsData.getBooleanValue().isPresent()){
+            return TsDataType.BOOLEAN;
+        }
+        else if (tsData.getLongValue().isPresent()){
+            return TsDataType.LONG;
+        }
+
+        else if (tsData.getStringValue().isPresent()){
+            return TsDataType.STRING;
+        }
+
+        else if (tsData.getBlobValue().isPresent()){
+            return TsDataType.BLOB;
+        }
+
+        else if (tsData.getCoordinateValue().isPresent()){
+            return TsDataType.COORDINATE;
+        }
+
+
+        return TsDataType.DOUBLE;
+    }
+    /**
+     * 获取 double 类型值
+     * @return
+     */
+    public double getValue() {
+        if (tsData.getDoubleValue().isPresent()) {
+            return tsData.getDoubleValue().get();
+        } else if (tsData.getBooleanValue().isPresent()) {
+            return tsData.getBooleanValue().get() ? 1.0 : 0.0;
+        } else if (tsData.getLongValue().isPresent()) {
+            return tsData.getLongValue().get();
+        }
+        return 0.0;
+    }
+}
+

+ 23 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsPointDataList.java

@@ -0,0 +1,23 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @author songwb<songwb@aliyun.com>
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class TsPointDataList {
+
+    private String tagName;
+
+    private List<GeneralTsData> tsDataList;
+
+}
+

+ 21 - 0
common/data/src/main/java/com/gyee/wisdom/common/data/timeseries/TsQuery.java

@@ -0,0 +1,21 @@
+package com.gyee.wisdom.common.data.timeseries;
+
+import java.util.Date;
+
+public interface TsQuery {
+
+    TsPoint getTsPoint();
+
+    long getStartTs();
+
+    long getEndTs();
+
+    // 单位秒
+    int getInterval();
+
+    int getLimit();
+
+    Interpolation getInterpolation();
+
+    Date[] getDateArray();
+}

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


Some files were not shown because too many files changed in this diff