|
@@ -11,10 +11,8 @@ import java.util.HashMap;
|
|
|
@Component
|
|
|
public class AlarmLinkageJob {
|
|
|
|
|
|
- private String URL = "";
|
|
|
-
|
|
|
/**
|
|
|
- * 添加事件信息
|
|
|
+ * 烟感联动
|
|
|
* @return
|
|
|
*/
|
|
|
//异步多线程调用
|
|
@@ -22,10 +20,10 @@ public class AlarmLinkageJob {
|
|
|
public JSONObject addLinkage(String requestBody) {
|
|
|
JSONObject eventVO = JSONObject.parseObject(requestBody);
|
|
|
HashMap map = new HashMap();
|
|
|
- map.put("productId", eventVO.get("productId"));
|
|
|
- map.put("tcDeviceId", eventVO.get("tcDeviceId"));
|
|
|
- map.put("deviceId", eventVO.get("deviceId"));
|
|
|
- map.put("deviceType", eventVO.get("deviceType"));
|
|
|
+ map.put("productId", eventVO.get("productId").toString());
|
|
|
+ map.put("tcDeviceId", eventVO.get("tcDeviceId").toString());
|
|
|
+ map.put("deviceId", eventVO.get("deviceId").toString());
|
|
|
+ map.put("deviceType", eventVO.get("deviceType").toString());
|
|
|
String resultString = HttpClientUtils.doPost(eventVO.get("linkageAddress").toString(),map);
|
|
|
JSONObject resultVO = JSONObject.parseObject(resultString);
|
|
|
return resultVO;
|