develop
hanrenchun 10 months ago
parent 1b07330b49
commit 64ee8a111c

@ -20,6 +20,7 @@ import lombok.RequiredArgsConstructor;
import org.apache.commons.collections4.map.LinkedMap;
import org.springframework.web.bind.annotation.*;
import java.text.Collator;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
@ -627,7 +628,12 @@ public class BigScreenController extends BaseController {
));
LinkedMap<String, List<Map<String, String>>> linkedMap = new LinkedMap<>();
resultMap.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEachOrdered(entry->{linkedMap.put(entry.getKey(), entry.getValue());});
resultMap.entrySet().stream()
.sorted((entry1, entry2) -> {
Collator collator = Collator.getInstance(java.util.Locale.CHINA);
return collator.compare(entry1.getKey(), entry2.getKey());
})
.forEachOrdered(entry -> linkedMap.put(entry.getKey(), entry.getValue()));
return AjaxResult.success(linkedMap);
} catch (Exception e) {
logger.info(StringKit.toString(e));
@ -672,6 +678,7 @@ public class BigScreenController extends BaseController {
QueryWrapper<MetaActualUserInfo> actualQueryWrapper = new QueryWrapper<>();
actualQueryWrapper.eq("habitation_address", estateInfo == null ? null : estateInfo.getRealEstateAddress());
actualQueryWrapper.groupBy("id_card");
List<MetaActualUserInfo> actualUserInfos = actualUserInfoService.list(actualQueryWrapper);

@ -51,6 +51,7 @@ public class TransitHuntersUserModelRecordController extends BaseController {
QueryWrapper<TransitHuntersUserModelRecord> queryWrapper = new QueryWrapper<>(transitHuntersUserModelRecord);
SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
queryWrapper.orderByDesc("warning_time");
List<TransitHuntersUserModelRecord> list = transitHuntersUserModelRecordService.list(queryWrapper);
List<TransitHuntersUserModelRecordVo> listVo = list.stream()
.map(record -> {

@ -56,20 +56,11 @@ public class TransitUserRecordController extends BaseController {
startPage();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getParentMonitoringType, 1).list();
List<String> collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList());
QueryWrapper<TransitUserRecord> queryWrapper = new QueryWrapper<>(transitUserRecord);
queryWrapper.in("device_code",collect);
if (transitUserRecord.getFirstTime() == null) {
LocalDateTime now = LocalDateTime.now();
LocalDateTime minusDay = now.minusDays(1);
queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now));
}else {
LocalDate date = LocalDate.parse(transitUserRecord.getFirstTime(), formatter1);
LocalDate nextDay = date.plusDays(1);
String nextDayString = nextDay.format(formatter1);
queryWrapper.between("partition_field", transitUserRecord.getFirstTime(), nextDayString);
}
queryWrapper.orderByDesc("partition_field");
List<TransitUserRecord> list = transitUserRecordService.list(queryWrapper);
return getDataTable(list);

@ -54,20 +54,11 @@ public class TransitVehicleRecordController extends BaseController {
startPage();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd");
List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery().eq(DevopsDeviceInfo::getParentMonitoringType, 1).list();
List<String> collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList());
QueryWrapper<TransitVehicleRecord> queryWrapper = new QueryWrapper<>(transitVehicleRecord);
queryWrapper.in("doorway_code",collect);
if (transitVehicleRecord.getFirstTime() == null) {
LocalDateTime now = LocalDateTime.now();
LocalDateTime minusDay = now.minusDays(1);
queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now));
}else {
LocalDate date = LocalDate.parse(transitVehicleRecord.getFirstTime(), formatter1);
LocalDate nextDay = date.plusDays(1);
String nextDayString = nextDay.format(formatter1);
queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), nextDayString);
}
queryWrapper.orderByDesc("partition_field");
List<TransitVehicleRecord> list = transitVehicleRecordService.list(queryWrapper);
return getDataTable(list);

Loading…
Cancel
Save