|
@@ -0,0 +1,22 @@
|
|
|
+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;
|
|
|
+
|
|
|
+@Component
|
|
|
+public class alarmLinkageJob {
|
|
|
+ /**
|
|
|
+ * 烟感联动
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ //异步多线程调用
|
|
|
+ @Async("asyncServiceExecutor")
|
|
|
+ public JSONObject addLinkage(String requestBody) {
|
|
|
+ JSONObject eventVO = JSONObject.parseObject(requestBody);
|
|
|
+ String resultString = HttpClientUtils.doPostJson(eventVO.get("linkageAddress").toString(),eventVO.toJSONString());
|
|
|
+ JSONObject resultVO = JSONObject.parseObject(resultString);
|
|
|
+ return resultVO;
|
|
|
+ }
|
|
|
+}
|