|
|
@ -25,6 +25,7 @@ import com.zc.business.utils.QYWXUtil; |
|
|
|
import com.zc.business.utils.StakeMarkUtils; |
|
|
|
import com.zc.common.core.httpclient.OkHttp; |
|
|
|
import com.zc.common.core.httpclient.exception.HttpException; |
|
|
|
import com.zc.common.core.httpclient.request.RequestParams; |
|
|
|
import com.zc.common.core.websocket.WebSocketService; |
|
|
|
import com.zc.common.core.websocket.constant.WebSocketEvent; |
|
|
|
import okhttp3.Response; |
|
|
@ -663,12 +664,14 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
String alarmId = otherConfig.getString("id"); |
|
|
|
if (StringUtils.isNotBlank(alarmId)) { |
|
|
|
try { |
|
|
|
AjaxResult alarmResult = dealWarning(alarmId); |
|
|
|
System.out.println(alarmResult); |
|
|
|
dealWarning(alarmId); |
|
|
|
//扫码报警接警反馈
|
|
|
|
addCodeScanningProcess(alarmId,"济菏运管中心接警"); |
|
|
|
} catch (IOException | HttpException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return AjaxResult.success(UniversalEnum.SUCCESSFUL_OPERATION.getValue()); |
|
|
|
|
|
|
@ -686,6 +689,27 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
return JSON.parseObject(response.body().string(), AjaxResult.class); |
|
|
|
} |
|
|
|
|
|
|
|
//扫码报警 处置记录
|
|
|
|
public AjaxResult addCodeScanningProcess(String alarmId,String content) throws IOException, HttpException { |
|
|
|
String url = configService.selectConfigByKey("alarmCode"); |
|
|
|
url = url + "/warning/addProcess"; |
|
|
|
|
|
|
|
RequestParams requestParams = new RequestParams(); |
|
|
|
requestParams.put("warningInfoId",alarmId); |
|
|
|
requestParams.put("processType","1"); |
|
|
|
requestParams.put("processTitle",content); |
|
|
|
requestParams.put("processTime",new Date()); |
|
|
|
|
|
|
|
OkHttp okHttp = new OkHttp(); |
|
|
|
Response response // 请求响应
|
|
|
|
= okHttp |
|
|
|
.headers(new HashMap<>()) |
|
|
|
.url(url) // 请求地址
|
|
|
|
.data(requestParams) |
|
|
|
.post(); // 请求方法
|
|
|
|
return JSON.parseObject(response.body().string(), AjaxResult.class); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public int deleteDcWarningByStringId(DcWarning dcWarning) { |
|
|
|
return dcWarningMapper.deleteDcWarningByStringId(dcWarning); |
|
|
@ -1013,6 +1037,21 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
} |
|
|
|
qywxUtil.sendMessageByWxUserId(wxUserIds,message); |
|
|
|
|
|
|
|
//扫码报警 处置记录
|
|
|
|
HashMap<String, Object> warningInfo = dcWarningMapper.selectDcWarningById(eventId); |
|
|
|
if (warningInfo != null && Objects.nonNull(warningInfo.get("warningSource")) && "5".equals(warningInfo.get("warningSource").toString())){ |
|
|
|
com.alibaba.fastjson.JSONObject otherConfig = com.alibaba.fastjson.JSONObject.parseObject(warningInfo.get("otherConfig").toString()); |
|
|
|
String alarmId = otherConfig.getString("id"); |
|
|
|
if (StringUtils.isNotBlank(alarmId)) { |
|
|
|
try { |
|
|
|
//扫码报警接警反馈
|
|
|
|
addCodeScanningProcess(alarmId,"调度路管人员现场处置"); |
|
|
|
} catch (IOException | HttpException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|
|
|
|
@ -1150,6 +1189,21 @@ public class DcWarningServiceImpl implements IDcWarningService { |
|
|
|
map.put("eventId",dcDispatchEventId.getEventId()); |
|
|
|
sendQYWXMessage(map); |
|
|
|
|
|
|
|
//扫码报警 处置记录
|
|
|
|
HashMap<String, Object> warningInfo = dcWarningMapper.selectDcWarningById(dcDispatchEventId.getEventId()); |
|
|
|
if (warningInfo != null && Objects.nonNull(warningInfo.get("warningSource")) && "5".equals(warningInfo.get("warningSource").toString())){ |
|
|
|
com.alibaba.fastjson.JSONObject otherConfig = com.alibaba.fastjson.JSONObject.parseObject(warningInfo.get("otherConfig").toString()); |
|
|
|
String alarmId = otherConfig.getString("id"); |
|
|
|
if (StringUtils.isNotBlank(alarmId)) { |
|
|
|
try { |
|
|
|
//扫码报警接警反馈
|
|
|
|
addCodeScanningProcess(alarmId,"调度路管人员现场处置"); |
|
|
|
} catch (IOException | HttpException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return UniversalEnum.ONE.getNumber(); |
|
|
|
} |
|
|
|
|
|
|
|