通过行政区划下载excel新增
parent
1da721dc35
commit
584e8c42b7
|
|
@ -230,6 +230,7 @@ public class WarningController {
|
||||||
vo.setPublishTime(warning.getPublishTime());
|
vo.setPublishTime(warning.getPublishTime());
|
||||||
vo.setContent(warning.getContent());
|
vo.setContent(warning.getContent());
|
||||||
vo.setWarnSignalType(warning.getWarnSignalType());
|
vo.setWarnSignalType(warning.getWarnSignalType());
|
||||||
|
vo.setWarnSignalLevel(warning.getWarnSignalLevel());
|
||||||
vo.setAdnm(publishUnit.replace("气象台", ""));
|
vo.setAdnm(publishUnit.replace("气象台", ""));
|
||||||
vo.setAddressBooks(addressBookService.getListByAdnm(publishUnit.replace("气象台", "")));
|
vo.setAddressBooks(addressBookService.getListByAdnm(publishUnit.replace("气象台", "")));
|
||||||
respList.add(vo);
|
respList.add(vo);
|
||||||
|
|
@ -318,17 +319,18 @@ public class WarningController {
|
||||||
|
|
||||||
List<WarningHistoryListVo> typeList = Lists.newArrayList();
|
List<WarningHistoryListVo> typeList = Lists.newArrayList();
|
||||||
|
|
||||||
// 类型
|
// 类型 只要暴雨
|
||||||
Map<String, List<WarningData.Warning>> types = v.stream()
|
Map<String, List<WarningData.Warning>> types = v.stream()
|
||||||
|
.filter(o -> "暴雨".equals(o.getWarnSignalType()))
|
||||||
.collect(Collectors
|
.collect(Collectors
|
||||||
.groupingBy(WarningData.Warning::getWarnSignalType, Collectors.toList()));
|
.groupingBy(WarningData.Warning::getWarnSignalType, Collectors.toList()));
|
||||||
|
|
||||||
Set<String> warnSignalType = Sets.newHashSet("雷电", "暴雨", "大风", "冰雹", "雷雨大风");
|
// Set<String> warnSignalType = Sets.newHashSet("雷电", "暴雨", "大风", "冰雹", "雷雨大风");
|
||||||
types.forEach((kt, vt) -> {
|
types.forEach((kt, vt) -> {
|
||||||
|
|
||||||
WarningHistoryListVo voType = new WarningHistoryListVo();
|
WarningHistoryListVo voType = new WarningHistoryListVo();
|
||||||
voType.setWarnSignalType(kt);
|
voType.setWarnSignalType(kt);
|
||||||
warnSignalType.remove(kt);
|
// warnSignalType.remove(kt);
|
||||||
// 等级分组
|
// 等级分组
|
||||||
Map<String, Long> levels = vt.stream()
|
Map<String, Long> levels = vt.stream()
|
||||||
.collect(Collectors.groupingBy(WarningData.Warning::getWarnSignalLevel, Collectors.counting()));
|
.collect(Collectors.groupingBy(WarningData.Warning::getWarnSignalLevel, Collectors.counting()));
|
||||||
|
|
@ -361,11 +363,11 @@ public class WarningController {
|
||||||
});
|
});
|
||||||
|
|
||||||
// 保证完整数据
|
// 保证完整数据
|
||||||
warnSignalType.forEach(kt -> {
|
// warnSignalType.forEach(kt -> {
|
||||||
WarningHistoryListVo voType = new WarningHistoryListVo();
|
// WarningHistoryListVo voType = new WarningHistoryListVo();
|
||||||
voType.setWarnSignalType(kt);
|
// voType.setWarnSignalType(kt);
|
||||||
typeList.add(voType);
|
// typeList.add(voType);
|
||||||
});
|
// });
|
||||||
|
|
||||||
vo.setChild(typeList);
|
vo.setChild(typeList);
|
||||||
vo.setSumCount(v.size());
|
vo.setSumCount(v.size());
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,13 @@
|
||||||
FROM
|
FROM
|
||||||
ADDRESS_BOOK AB
|
ADDRESS_BOOK AB
|
||||||
LEFT JOIN ADINFO A ON AB.ADCD = A.ADCD
|
LEFT JOIN ADINFO A ON AB.ADCD = A.ADCD
|
||||||
|
LEFT JOIN AB_UD_R R ON R.AD_ID = AB.ID
|
||||||
<where>
|
<where>
|
||||||
<if test="adnm != null and adnm != '' ">
|
<if test="adnm != null and adnm != '' ">
|
||||||
A.ADNM = #{adnm}
|
A.ADNM = #{adnm}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY R.SORT
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue