develop
Angel 10 months ago
parent a09b036dc3
commit 9934639071

@ -109,7 +109,7 @@ public class BigScreenController extends BaseController {
QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>(); QueryWrapper<MetaRealEstateInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.between("longitude", startLongitude, endLongitude) queryWrapper.between("longitude", startLongitude, endLongitude)
.between("latitude", startLatitude, endLatitude); .between("latitude", startLatitude, endLatitude);
queryWrapper.groupBy("real_estate_brief_address","building_name"); queryWrapper.groupBy("real_estate_brief_address", "building_name");
List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper); List<MetaRealEstateInfo> list = realEstateInfoService.list(queryWrapper);
List<MetaRealEstateInfoDTO> resultList = new ArrayList<>(); List<MetaRealEstateInfoDTO> resultList = new ArrayList<>();
for (MetaRealEstateInfo info : list) { for (MetaRealEstateInfo info : list) {
@ -296,20 +296,20 @@ public class BigScreenController extends BaseController {
try { try {
List<MetaAlarmInfoAndHandleAlarmVo> metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); List<MetaAlarmInfoAndHandleAlarmVo> metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm();
ArrayList<MetaAlarmInfoAndHandleAlarmVo> alarmVos = new ArrayList<>(); ArrayList<MetaAlarmInfoAndHandleAlarmVo> alarmVos = new ArrayList<>();
for (MetaAlarmInfoAndHandleAlarmVo metaAlarmInfoAndHandleAlarmVo : metaAlarmInfos){ for (MetaAlarmInfoAndHandleAlarmVo metaAlarmInfoAndHandleAlarmVo : metaAlarmInfos) {
SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
if (metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime()!=null) { if (metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime() != null) {
String cjxxHandleAlarmTime = metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime(); String cjxxHandleAlarmTime = metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime();
Date cjxxHandleAlarm = outputSdf.parse(cjxxHandleAlarmTime); Date cjxxHandleAlarm = outputSdf.parse(cjxxHandleAlarmTime);
metaAlarmInfoAndHandleAlarmVo.setCjxxHandleAlarmTime(dateFormat.format(cjxxHandleAlarm)); metaAlarmInfoAndHandleAlarmVo.setCjxxHandleAlarmTime(dateFormat.format(cjxxHandleAlarm));
} }
if (metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime()!=null) { if (metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime() != null) {
String jjxxInformantTime = metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime(); String jjxxInformantTime = metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime();
Date jjxxInformant = outputSdf.parse(jjxxInformantTime); Date jjxxInformant = outputSdf.parse(jjxxInformantTime);
metaAlarmInfoAndHandleAlarmVo.setJjxxInformantTime(dateFormat.format(jjxxInformant)); metaAlarmInfoAndHandleAlarmVo.setJjxxInformantTime(dateFormat.format(jjxxInformant));
} }
if (metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime()!=null) { if (metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime() != null) {
String jjxxAlarmResponseTime = metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime(); String jjxxAlarmResponseTime = metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime();
Date jjxxAlarmResponse = outputSdf.parse(jjxxAlarmResponseTime); Date jjxxAlarmResponse = outputSdf.parse(jjxxAlarmResponseTime);
metaAlarmInfoAndHandleAlarmVo.setJjxxAlarmResponseTime(dateFormat.format(jjxxAlarmResponse)); metaAlarmInfoAndHandleAlarmVo.setJjxxAlarmResponseTime(dateFormat.format(jjxxAlarmResponse));
@ -317,7 +317,7 @@ public class BigScreenController extends BaseController {
alarmVos.add(metaAlarmInfoAndHandleAlarmVo); alarmVos.add(metaAlarmInfoAndHandleAlarmVo);
} }
List<MetaAlarmInfoAndHandleAlarmVo> sortedList = alarmVos.stream() List<MetaAlarmInfoAndHandleAlarmVo> sortedList = alarmVos.stream()
.sorted(Comparator.comparing(MetaAlarmInfoAndHandleAlarmVo::getJjxxInformantTime)) .sorted(Comparator.comparing(MetaAlarmInfoAndHandleAlarmVo::getJjxxAlarmResponseTime).reversed())
.collect(Collectors.toList()); .collect(Collectors.toList());
return AjaxResult.success(sortedList); return AjaxResult.success(sortedList);
} catch (Exception e) { } catch (Exception e) {
@ -604,9 +604,9 @@ public class BigScreenController extends BaseController {
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
info -> { info -> {
String homeName = info.getHomeName(); String homeName = info.getHomeName();
return info.getRealEstateAddress().contains("商铺")? "商铺" : return info.getRealEstateAddress().contains("商铺") ? "商铺" :
homeName.length() == 3 ? homeName.charAt(0) +"楼" : homeName.length() == 3 ? homeName.charAt(0) + "楼" :
homeName.length() == 4 ? homeName.substring(0, 2) +"楼": homeName.length() == 4 ? homeName.substring(0, 2) + "楼" :
homeName.length() < 3 ? "1楼" : null; homeName.length() < 3 ? "1楼" : null;
}, },
Collectors.mapping( Collectors.mapping(
@ -620,7 +620,7 @@ public class BigScreenController extends BaseController {
entryMap.put("type", "空置"); entryMap.put("type", "空置");
} }
Integer integer = housingInfoService.lambdaQuery().eq(MetaRentalHousingInfo::getRentalHousingAddress, info.getRealEstateAddress()).count(); Integer integer = housingInfoService.lambdaQuery().eq(MetaRentalHousingInfo::getRentalHousingAddress, info.getRealEstateAddress()).count();
if (integer != 0){ if (integer != 0) {
entryMap.put("type", "出租"); entryMap.put("type", "出租");
} }
return entryMap; return entryMap;

Loading…
Cancel
Save