|
|
@ -537,6 +537,32 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> heatList(BusinessAlertBo businessAlertBo) { |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
|
/* //生成近一周开始时间、结束时间
|
|
|
|
List<String> dayList = getLastSixDays(); |
|
|
|
String startTime = dayList.get(dayList.size() - 1); |
|
|
|
String endTime = dayList.get(0); |
|
|
|
|
|
|
|
result.put("date", startTime + "~" + endTime);*/ |
|
|
|
|
|
|
|
//查看的是总览的预警信息
|
|
|
|
if (ObjectUtil.isEmpty(businessAlertBo.getPostCode())) { |
|
|
|
|
|
|
|
List<BusinessAlertVo> businessAlerts = this.baseMapper.heatList(businessAlertBo, businessAlertBo.getStartTime(), businessAlertBo.getEndTime()); |
|
|
|
Map<String, List<BusinessAlertVo>> listMap = businessAlerts.stream().collect(Collectors.groupingBy(BusinessAlertVo::getLabelCn)); |
|
|
|
result.putAll(listMap); |
|
|
|
return result; |
|
|
|
} |
|
|
|
//不是空的话查看是对应各局的
|
|
|
|
businessAlertBo.setAiLabelEnList(List.of(businessAlertBo.getLabelEn())); |
|
|
|
List<BusinessAlertVo> alertList = this.baseMapper.heatList(businessAlertBo,businessAlertBo.getStartTime(), businessAlertBo.getEndTime()); |
|
|
|
Map<String, List<BusinessAlertVo>> listMap = alertList.stream().collect(Collectors.groupingBy(BusinessAlertVo::getLabelCn)); |
|
|
|
result.putAll(listMap); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> cityListAlert(BusinessAlertBo businessAlertBo) { |
|
|
|
if (ObjectUtil.hasEmpty(businessAlertBo.getPostCode(),businessAlertBo.getAiName())) { |
|
|
@ -603,6 +629,28 @@ public class BusinessAlertServiceImpl implements IBusinessAlertService { |
|
|
|
return infoMap; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String, Object> cityHeatList(BusinessAlertBo businessAlertBo) { |
|
|
|
if (ObjectUtil.hasEmpty(businessAlertBo.getPostCode(),businessAlertBo.getAiName())) { |
|
|
|
throw new ServiceException("参数为空!"); |
|
|
|
} |
|
|
|
Map<String,Object> infoMap = new HashMap<>(); |
|
|
|
|
|
|
|
//不是空的话查看是对应各局的
|
|
|
|
List<RemoteAiLabelPostVo> postVoList = remoteLablePostService.selectLabelByList(businessAlertBo.getPostCode(), LoginHelper.getDeptId()); |
|
|
|
|
|
|
|
Map<String, List<RemoteAiLabelPostVo>> aiNameMap = postVoList.stream().collect(Collectors.groupingBy(RemoteAiLabelPostVo::getAiName)); |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(postVoList)){ |
|
|
|
return infoMap; |
|
|
|
} |
|
|
|
businessAlertBo.setAiLabelEnList(aiNameMap.get(businessAlertBo.getAiName()).stream().map(RemoteAiLabelPostVo::getLabelEn).distinct().toList()); |
|
|
|
List<BusinessAlertVo> alertList = this.baseMapper.heatList(businessAlertBo, businessAlertBo.getStartTime(), businessAlertBo.getEndTime()); |
|
|
|
Map<String, List<BusinessAlertVo>> listMap = alertList.stream().collect(Collectors.groupingBy(BusinessAlertVo::getLabelCn)); |
|
|
|
infoMap.putAll(listMap); |
|
|
|
return infoMap; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<BusinessAlertVo> listVerifyAlert(RemoteBusinessAlertBo businessAlertBo) { |
|
|
|
LambdaQueryWrapper<BusinessAlert> wrapper = new LambdaQueryWrapper<>(); |
|
|
|