|
@@ -1,32 +0,0 @@
|
|
|
-package com.usky.alarm.service.job;
|
|
|
-
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.usky.alarm.service.util.HttpClientUtils;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
-
|
|
|
-import java.util.HashMap;
|
|
|
-
|
|
|
-
|
|
|
-@Component
|
|
|
-public class AlarmLinkageJob {
|
|
|
-
|
|
|
- /**
|
|
|
- * 烟感联动
|
|
|
- * @return
|
|
|
- */
|
|
|
- //异步多线程调用
|
|
|
- @Async("asyncServiceExecutor")
|
|
|
- public JSONObject addLinkage(String requestBody) {
|
|
|
- JSONObject eventVO = JSONObject.parseObject(requestBody);
|
|
|
-// HashMap map = new HashMap();
|
|
|
-// 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.doPostJson(eventVO.get("linkageAddress").toString(),eventVO.toJSONString());
|
|
|
- JSONObject resultVO = JSONObject.parseObject(resultString);
|
|
|
- System.out.println("--------------------");
|
|
|
- return resultVO;
|
|
|
- }
|
|
|
-}
|