Commit 970cc4a0 authored by chenhao's avatar chenhao

更改联系人的数据帅选

parent 8e3d3463
......@@ -403,14 +403,14 @@ public class AlertCalledController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "警情填报联系人模糊查询", notes = "警情填报联系人模糊查询")
public ResponseModel<Object> getContact() {
if (redisUtils.hasKey(RedisKey.CONTACT_USER)) {
Object obj = redisUtils.get(RedisKey.CONTACT_USER);
return ResponseHelper.buildResponse(obj);
} else {
// if (redisUtils.hasKey(RedisKey.CONTACT_USER)) {
// Object obj = redisUtils.get(RedisKey.CONTACT_USER);
// return ResponseHelper.buildResponse(obj);
// } else {
List<Map<String, String>> contactName = iAlertCalledService.getContactName();
redisUtils.set(RedisKey.CONTACT_USER, contactName, time);
// redisUtils.set(RedisKey.CONTACT_USER, contactName, time);
return ResponseHelper.buildResponse(contactName);
}
}
/**
......
......@@ -67,6 +67,8 @@ import com.yeejoin.amos.boot.module.jcs.api.mapper.TemplateMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import com.yeejoin.amos.component.rule.config.RuleConfig;
import ch.qos.logback.core.joran.conditional.IfAction;
/**
* 警情接警记录 服务实现类
*
......@@ -845,8 +847,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
// firefightersName.addAll(contactNames);
List<Map<String, String>> list = orgUsrServiceImpl.getPersonSimpleDetail();
list.stream().forEach(i->{
String phone = QRCodeUtil.generateQRCode()+"@"+ i.get("phone").toString();
String phone="";
if(i.containsKey("phone")) {
phone = QRCodeUtil.generateQRCode()+"@"+ i.get("phone").toString();
i.replace("phone", phone);
}else {
phone = QRCodeUtil.generateQRCode()+"@"+ phone;
i.put("phone", phone);
}
});
return list;
}
......
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