From 99346390718fca7fa8c605450035570e09f18dd4 Mon Sep 17 00:00:00 2001 From: Angel <1050374295@qq.com> Date: Mon, 29 Jan 2024 17:10:34 +0800 Subject: [PATCH] DDDDD --- .../controller/BigScreenController.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java index 61f77d7..e53699e 100644 --- a/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java +++ b/gather-app/src/main/java/com/ruoyi/business/controller/BigScreenController.java @@ -109,7 +109,7 @@ public class BigScreenController extends BaseController { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.between("longitude", startLongitude, endLongitude) .between("latitude", startLatitude, endLatitude); - queryWrapper.groupBy("real_estate_brief_address","building_name"); + queryWrapper.groupBy("real_estate_brief_address", "building_name"); List list = realEstateInfoService.list(queryWrapper); List resultList = new ArrayList<>(); for (MetaRealEstateInfo info : list) { @@ -296,20 +296,20 @@ public class BigScreenController extends BaseController { try { List metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); ArrayList alarmVos = new ArrayList<>(); - for (MetaAlarmInfoAndHandleAlarmVo metaAlarmInfoAndHandleAlarmVo : metaAlarmInfos){ + for (MetaAlarmInfoAndHandleAlarmVo metaAlarmInfoAndHandleAlarmVo : metaAlarmInfos) { SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - if (metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime()!=null) { + if (metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime() != null) { String cjxxHandleAlarmTime = metaAlarmInfoAndHandleAlarmVo.getCjxxHandleAlarmTime(); Date cjxxHandleAlarm = outputSdf.parse(cjxxHandleAlarmTime); metaAlarmInfoAndHandleAlarmVo.setCjxxHandleAlarmTime(dateFormat.format(cjxxHandleAlarm)); } - if (metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime()!=null) { + if (metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime() != null) { String jjxxInformantTime = metaAlarmInfoAndHandleAlarmVo.getJjxxInformantTime(); Date jjxxInformant = outputSdf.parse(jjxxInformantTime); metaAlarmInfoAndHandleAlarmVo.setJjxxInformantTime(dateFormat.format(jjxxInformant)); } - if (metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime()!=null) { + if (metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime() != null) { String jjxxAlarmResponseTime = metaAlarmInfoAndHandleAlarmVo.getJjxxAlarmResponseTime(); Date jjxxAlarmResponse = outputSdf.parse(jjxxAlarmResponseTime); metaAlarmInfoAndHandleAlarmVo.setJjxxAlarmResponseTime(dateFormat.format(jjxxAlarmResponse)); @@ -317,7 +317,7 @@ public class BigScreenController extends BaseController { alarmVos.add(metaAlarmInfoAndHandleAlarmVo); } List sortedList = alarmVos.stream() - .sorted(Comparator.comparing(MetaAlarmInfoAndHandleAlarmVo::getJjxxInformantTime)) + .sorted(Comparator.comparing(MetaAlarmInfoAndHandleAlarmVo::getJjxxAlarmResponseTime).reversed()) .collect(Collectors.toList()); return AjaxResult.success(sortedList); } catch (Exception e) { @@ -604,10 +604,10 @@ public class BigScreenController extends BaseController { .collect(Collectors.groupingBy( info -> { String homeName = info.getHomeName(); - return info.getRealEstateAddress().contains("商铺")? "商铺" : - homeName.length() == 3 ? homeName.charAt(0) +"楼" : - homeName.length() == 4 ? homeName.substring(0, 2) +"楼": - homeName.length() < 3 ? "1楼" : null; + return info.getRealEstateAddress().contains("商铺") ? "商铺" : + homeName.length() == 3 ? homeName.charAt(0) + "楼" : + homeName.length() == 4 ? homeName.substring(0, 2) + "楼" : + homeName.length() < 3 ? "1楼" : null; }, Collectors.mapping( info -> { @@ -620,7 +620,7 @@ public class BigScreenController extends BaseController { entryMap.put("type", "空置"); } Integer integer = housingInfoService.lambdaQuery().eq(MetaRentalHousingInfo::getRentalHousingAddress, info.getRealEstateAddress()).count(); - if (integer != 0){ + if (integer != 0) { entryMap.put("type", "出租"); } return entryMap;