Browse Source

fix:exa接口变化

pull/31/head
肖晋飞 1 month ago
parent
commit
c354cdefa5
  1. 26
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/exa/vo/Point.java
  2. 2
      yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/utils/EXAUtils.java

26
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/controller/admin/exa/vo/Point.java

@ -27,29 +27,29 @@ public class Point {
public String GroupName; public String GroupName;
@ExcelProperty("数据类型") @ExcelProperty("数据类型")
public Integer ItemType; public Integer ItemType=5;
@ExcelProperty("描述") @ExcelProperty("描述")
@Schema(description = "描述", example = "芋道") @Schema(description = "描述", example = "芋道")
public String Descriptor; public String Descriptor="";
@ExcelProperty("单位") @ExcelProperty("单位")
@Schema(description = "单位", example = "芋道") @Schema(description = "单位", example = "芋道")
public String EngUnits; public String EngUnits="";
@ExcelProperty("数据来源") @ExcelProperty("数据来源")
public String Source; public String Source="EXA";
@ExcelProperty("自动保存") @ExcelProperty("自动保存")
public Boolean AutoSave; public Boolean AutoSave=true;
public Double UpperBound; public Double UpperBound=9999999.0;
public Double LowerBound; public Double LowerBound=-9999999.0;
public Double UpperLimit; public Double UpperLimit=9999999.0;
public Double LowerLimit; public Double LowerLimit=-9999999.0;
public Double UpperUpperLimit; public Double UpperUpperLimit=9999999.0;
public Double LowerLowerLimit; public Double LowerLowerLimit=-9999999.0;
public String Comment; public String Comment="";
public String Note; public String Note="";
} }

2
yudao-module-alert/yudao-module-alert-biz/src/main/java/cn/iocoder/yudao/module/alert/utils/EXAUtils.java

@ -251,7 +251,7 @@ public class EXAUtils {
//写入点号 //写入点号
public String setPoint(String EXA_IP, Point point) throws IOException { public String setPoint(String EXA_IP, Point point) throws IOException {
String requestPathAddItem = "http://" + EXA_IP + ":9000/exawebapi/exaitem/AddItem"; String requestPathAddItem = "http://" + EXA_IP + ":9000/exawebapi/EXAItem/AddItemStd";
String param = JSON.toJSONString(point); String param = JSON.toJSONString(point);
String result = Request.Post(requestPathAddItem) String result = Request.Post(requestPathAddItem)
.addHeader("Content-type", "application/json") .addHeader("Content-type", "application/json")

Loading…
Cancel
Save