Commit a15f0218 by huangjy

fix:告警类型取值问题

parent beeb01be
package com.makeit.external.huineng;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -78,7 +79,7 @@ public class HuiNengService {
reportInfo.setTurnState(bodymove.equals("0") ? "0" : "1");
data.add(reportInfo);
dto.setData(data);
String reqJson = JSON.toJSONString(dto);
String reqJson = JSONUtil.toJsonStr(dto);
String url = platTenant.getOpenApiUrl() + "/admin-api/v1/HealthMonitoringEquipment/TimingdataPush?token=aHVpbmVuZ2dhbnpoaV9wdXNoc2V0";
log.info("请求url:{},参数:{}",url,reqJson);
String result = HttpUtil.createPost(url)
......
......@@ -51,7 +51,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
dto.setDeviceType("健康监测设备");
dto.setDeviceModel(platDevice.getProductId());
dto.setDtype("实时上报");
dto.setUid(platDevice.getOriDeviceId());
dto.setUid("");
dto.setPk(platDevice.getProductId());
dto.setDid(platDevice.getOriDeviceId());
dto.setSite("");
......@@ -109,9 +109,9 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
HuinengBodyReportDTO dto = new HuinengBodyReportDTO();
dto.setId(platDevice.getOriDeviceId());
dto.setDeviceType("人体感应探测器\"");
dto.setDeviceType("人体感应探测器");
dto.setDtype("报警上报");
dto.setUid(platDevice.getOriDeviceId());
dto.setUid("");
dto.setPk(platDevice.getProductId());
dto.setDeviceModel(platDevice.getProductId());
dto.setDid(platDevice.getOriDeviceId());
......@@ -129,7 +129,7 @@ public class HuiNengStrategy implements OpenApiBaseStrategy {
alarmInfo.setPerson(jsonObject.getString("person"));
alarmInfo.setAlarmReason("跌倒触发报警");
alarmInfo.setAlarmType("3");
alarmInfo.setAlarmType("4");
alarmInfo.setAlarmTime(currentDate);
alarmInfo.setEventName("设备告警");
alarmInfo.setEventType("1");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment