From 2cdda92b9c949785983fa018d5b3e6b04d8b13c4 Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Tue, 30 Jan 2024 04:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BigScreenController.java | 1 + .../MetaActualUserInfoController.java | 1 + .../MetaImpUserModelInfoController.java | 60 +++++++++++++++++++ .../TransitUserRecordController.java | 12 ++-- .../TransitVehicleRecordController.java | 11 ++-- .../domain/vo/MetaImpUserModelInfoVO.java | 3 + 6 files changed, 76 insertions(+), 12 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 ec2ff40..3948b8e 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 @@ -131,6 +131,7 @@ public class BigScreenController extends BaseController { // 常驻人员查询 QueryWrapper queryCzryWrapper = new QueryWrapper<>(); queryCzryWrapper.ne("actual_user_type", 102); + queryCzryWrapper.orderByDesc("house_hold_address"); List list = actualUserInfoService.list(queryCzryWrapper); return getDataTable(list); } diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaActualUserInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaActualUserInfoController.java index 920d3ed..bca80ff 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaActualUserInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaActualUserInfoController.java @@ -39,6 +39,7 @@ public class MetaActualUserInfoController extends BaseController { startPage(); QueryWrapper querySyrkWrapper = new QueryWrapper<>(); querySyrkWrapper.ne("actual_user_type", 101); + querySyrkWrapper.orderByDesc("house_hold_address"); List list = metaActualUserInfoService.list(querySyrkWrapper); return getDataTable(list); } diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java index 3d6c466..f0ed601 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaImpUserModelInfoController.java @@ -115,6 +115,7 @@ public class MetaImpUserModelInfoController extends BaseController { LocalDateTime now = LocalDateTime.now(); LocalDateTime minusDay = now.minusDays(1); QueryWrapper metaImpUserModelInfoQueryWrapper = new QueryWrapper<>(); +// metaImpUserModelInfoQueryWrapper.groupBy("data_type"); metaImpUserModelInfoQueryWrapper.in("sign_police_code", strings); metaImpUserModelInfoQueryWrapper.between("warning_time", formatter.format(minusDay), formatter.format(now)); List list = metaImpUserModelInfoService.list(metaImpUserModelInfoQueryWrapper); @@ -131,28 +132,87 @@ public class MetaImpUserModelInfoController extends BaseController { metaImpUserModelInfoVO.setWarningTime(metaImpUserModelInfo.getWarningTime()); metaImpUserModelInfoVO.setDataId(metaImpUserModelInfo.getId()); metaImpUserModelInfoVO.setType("重点人员"); + HashMap map = new HashMap<>(); if (Objects.equals(metaImpUserModelInfo.getDataType(), "101003")) { metaImpUserModelInfoVO.setValue(metaImpUserModelInfo.getValue3()); metaImpUserModelInfoVO.setSubType("人脸抓拍"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null) { + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getSignPoliceStation()!=null) { + map.put("接收单位", metaImpUserModelInfo.getSignPoliceStation()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "060001")) { metaImpUserModelInfoVO.setValue(metaImpUserModelInfo.getValue4()); metaImpUserModelInfoVO.setSubType("车辆抓拍"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null) { + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getSignPoliceStation()!=null) { + map.put("接收单位", metaImpUserModelInfo.getSignPoliceStation()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "500002")) { metaImpUserModelInfoVO.setSubType("技侦定位"); + if (metaImpUserModelInfo.getKey2()!=null && metaImpUserModelInfo.getValue2()!=null){ + map.put(metaImpUserModelInfo.getKey2(), metaImpUserModelInfo.getValue2()); + } + if (metaImpUserModelInfo.getKey5()!=null && metaImpUserModelInfo.getValue5()!=null){ + map.put(metaImpUserModelInfo.getKey5(), metaImpUserModelInfo.getValue5()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "100086")) { metaImpUserModelInfoVO.setSubType("汽车客运"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null){ + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getKey2()!=null && metaImpUserModelInfo.getValue2()!=null){ + map.put(metaImpUserModelInfo.getKey2(), metaImpUserModelInfo.getValue2()); + } + if (metaImpUserModelInfo.getKey4()!=null && metaImpUserModelInfo.getValue4()!=null){ + map.put(metaImpUserModelInfo.getKey4(), metaImpUserModelInfo.getValue4()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "900018")) { metaImpUserModelInfoVO.setSubType("民航进港"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null){ + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getKey2()!=null && metaImpUserModelInfo.getValue2()!=null){ + map.put(metaImpUserModelInfo.getKey2(), metaImpUserModelInfo.getValue2()); + } + if (metaImpUserModelInfo.getKey4()!=null && metaImpUserModelInfo.getValue4()!=null){ + map.put(metaImpUserModelInfo.getKey4(), metaImpUserModelInfo.getValue4()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "102011")) { metaImpUserModelInfoVO.setSubType("铁路订票"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null){ + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getKey2()!=null && metaImpUserModelInfo.getValue2()!=null){ + map.put(metaImpUserModelInfo.getKey2(), metaImpUserModelInfo.getValue2()); + } + if (metaImpUserModelInfo.getKey5()!=null && metaImpUserModelInfo.getValue5()!=null){ + map.put(metaImpUserModelInfo.getKey5(), metaImpUserModelInfo.getValue5()); + } + metaImpUserModelInfoVO.setKV(map); } if (Objects.equals(metaImpUserModelInfo.getDataType(), "101005")) { metaImpUserModelInfoVO.setSubType("旅馆住宿"); + if (metaImpUserModelInfo.getKey1()!=null && metaImpUserModelInfo.getValue1()!=null){ + map.put(metaImpUserModelInfo.getKey1(), metaImpUserModelInfo.getValue1()); + } + if (metaImpUserModelInfo.getKey3()!=null && metaImpUserModelInfo.getValue3()!=null){ + map.put(metaImpUserModelInfo.getKey3(), metaImpUserModelInfo.getValue3()); + } + metaImpUserModelInfoVO.setKV(map); } metaImpUserModelInfoVOS.add(metaImpUserModelInfoVO); diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java index 4ac95f6..b78d278 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java @@ -61,17 +61,17 @@ public class TransitUserRecordController extends BaseController { DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); DateTimeFormatter formatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); QueryWrapper queryWrapper = new QueryWrapper<>(transitUserRecord); - if (transitUserRecord == null) { - LocalDateTime now = LocalDateTime.now(); - LocalDateTime minusDay = now.minusDays(1); - queryWrapper.in("device_code",collect); - queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now)); - } if (transitUserRecord.getFirstTime() != null){ queryWrapper.in("device_code",collect); String firstTime = transitUserRecord.getFirstTime(); LocalDate parse = LocalDate.parse(firstTime, formatter1); queryWrapper.between("partition_field", firstTime, parse.plusDays(1).format(formatter1)); + }else if (transitUserRecord.getDeviceCode() == null){ + LocalDateTime now = LocalDateTime.now(); + LocalDateTime minusDay = now.minusDays(1); + queryWrapper.in("device_code",collect) + .and(wrapper -> wrapper.isNotNull("id_card").or().isNotNull("user_name")); + queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now)); } queryWrapper.orderByDesc("partition_field"); PageUtils.startPage(); diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java index 3b1f01c..ff77070 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java @@ -59,17 +59,16 @@ public class TransitVehicleRecordController extends BaseController { List collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList()); QueryWrapper queryWrapper = new QueryWrapper<>(transitVehicleRecord); - if (transitVehicleRecord == null) { - LocalDateTime now = LocalDateTime.now(); - LocalDateTime minusDay = now.minusDays(1); - queryWrapper.in("doorway_code",collect); - queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now)); - } if (transitVehicleRecord.getFirstTime() != null){ queryWrapper.in("doorway_code",collect); String firstTime = transitVehicleRecord.getFirstTime(); LocalDate parse = LocalDate.parse(firstTime, formatter1); queryWrapper.between("partition_field", firstTime, parse.plusDays(1).format(formatter1)); + } else if (transitVehicleRecord.getDoorwayCode() == null) { + LocalDateTime now = LocalDateTime.now(); + LocalDateTime minusDay = now.minusDays(1); + queryWrapper.in("doorway_code",collect); + queryWrapper.between("partition_field", formatter.format(minusDay), formatter.format(now)); } queryWrapper.orderByDesc("partition_field"); PageUtils.startPage(); diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java b/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java index f65bbda..736f519 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/vo/MetaImpUserModelInfoVO.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.math.BigDecimal; +import java.util.Map; /** * @TableName meta_imp_user_model_info @@ -33,6 +34,8 @@ public class MetaImpUserModelInfoVO extends BaseEntity { private String subType; + private Map KV; + private Long dataId; } \ No newline at end of file