Commit 0a075dd0 authored by zhangyingbin's avatar zhangyingbin

1、96333应急处置系统,警情接警之后正常填报警情,点击警情处置,查看详情,未关联通话记录

2、去掉地图滚动消息中,预警消息
parent 25de7421
......@@ -77,29 +77,29 @@ public class MsgLogServiceImpl extends BaseService<MsgLogDto, MsgLog, MsgLogMapp
alertMsgDtoList.add(alertMsgDto);
});
}
// 查询气瓶预警消息
LambdaQueryWrapper<MsgLog> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(MsgLog::getTerminalType, "WEB");
//企业根据企业名称筛选,监管机构根据区域筛选
ReginParams reginParams = citInfoService.getReginParams();
if(!"company".equals(reginParams.getCompany().getLevel())){
wrapper.like(MsgLog::getRegionCode,reginParams.getCompany().getRegionCode());
} else {
wrapper.eq(MsgLog::getCompanyName,reginParams.getCompany().getCompanyName());
}
List<MsgLog> msgLogList = this.list(wrapper);
if (!ValidationUtil.isEmpty(msgLogList)) {
msgLogList.forEach(msg -> {
AlertMsgDto alertMsgDto = new AlertMsgDto();
alertMsgDto.setBody(msg.getBody());
alertMsgDto.setFrom("cylinder");
alertMsgDto.setRelationId(String.valueOf(msg.getSequenceNbr()));
alertMsgDto.setTime(msg.getSendTime());
alertMsgDto.setType(msg.getMsgTypeName());
alertMsgDtoList.add(alertMsgDto);
});
}
// // 查询气瓶预警消息
// LambdaQueryWrapper<MsgLog> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(MsgLog::getTerminalType, "WEB");
// //企业根据企业名称筛选,监管机构根据区域筛选
// ReginParams reginParams = citInfoService.getReginParams();
// if(!"company".equals(reginParams.getCompany().getLevel())){
// wrapper.like(MsgLog::getRegionCode,reginParams.getCompany().getRegionCode());
// } else {
// wrapper.eq(MsgLog::getCompanyName,reginParams.getCompany().getCompanyName());
// }
// List<MsgLog> msgLogList = this.list(wrapper);
// if (!ValidationUtil.isEmpty(msgLogList)) {
// msgLogList.forEach(msg -> {
// AlertMsgDto alertMsgDto = new AlertMsgDto();
// alertMsgDto.setBody(msg.getBody());
// alertMsgDto.setFrom("cylinder");
// alertMsgDto.setRelationId(String.valueOf(msg.getSequenceNbr()));
// alertMsgDto.setTime(msg.getSendTime());
// alertMsgDto.setType(msg.getMsgTypeName());
//
// alertMsgDtoList.add(alertMsgDto);
// });
// }
return alertMsgDtoList;
}
......
......@@ -83,7 +83,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
// 首先查找未完成 且失败次数少于5 的 记录
List<VoiceRecordLog> logList = this.list(new LambdaQueryWrapper<VoiceRecordLog>().eq(VoiceRecordLog::getIsDeal,false).lt(VoiceRecordLog::getDealTimes,5));
if(logList != null && logList.size() >0) {
logList.stream().forEach(l -> {
for(VoiceRecordLog l : logList){
// 保存录音 修改状态 发送mqtt 通知
// 获取通话人信息
Integer dealTimes = 1;
......@@ -91,10 +91,15 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
dealTimes += l.getDealTimes();
}
l.setDealTimes(dealTimes);
JSONArray ctiInfos = ctiService.getCallInfo(l.getConnectId());
JSONArray ctiInfos = new JSONArray();
try {
ctiInfos = ctiService.getCallInfo(l.getConnectId());
}catch (Exception e) {
continue;
}
if(ctiInfos == null || ctiInfos.size() == 0) {
this.updateById(l);
return;
continue;
}
VoiceRecordFileDto model = new VoiceRecordFileDto();
JSONObject recordInfo = ctiInfos.getJSONObject(0);
......@@ -108,7 +113,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
telEndTime = DateUtils.longStr2Date(recordInfo.getString("hangupTime"));
} catch (Exception e) {
this.updateById(l);
return;
continue;
}
int times = recordInfo.getIntValue("times");
model.setTelTime(DateUtils.secondsToTimeStr(times));
......@@ -126,11 +131,11 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
} catch (Exception e) {
e.printStackTrace();
this.updateById(l);
return;
continue;
}
if(downloadFile.isEmpty()) {
this.updateById(l);
return;
continue;
}
for(Map.Entry<String,String> file : downloadFile.entrySet()) {
model.setFilePath(file.getKey());
......@@ -138,7 +143,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
AlertCalledFormDto alertDto = iAlertCalledService.selectAlertCalledByIdNoCache(model.getAlertId());
if(alertDto == null || alertDto.getAlertCalledDto() == null) {
this.updateById(l);
return;
continue;
}
model.setAlertStage(alertDto.getAlertCalledDto().getAlertStage());
model.setAlertStageCode(alertDto.getAlertCalledDto().getAlertStageCode());
......@@ -159,7 +164,7 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
}
l.setIsDeal(true);
this.updateById(l);
});
};
}
System.out.println("执行通话记录任务");
......
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 to comment