From 5f44b4d75a5feafd648f6ae1a423f83bc92f4e14 Mon Sep 17 00:00:00 2001 From: Angel <1050374295@qq.com> Date: Mon, 29 Jan 2024 22:05:18 +0800 Subject: [PATCH] DDDDD --- .../controller/BigScreenController.java | 2 +- .../controller/MetaAlarmInfoController.java | 23 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 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 a9080e0..ec2ff40 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 @@ -584,7 +584,7 @@ public class BigScreenController extends BaseController { } QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("real_estate_brief_address", para); -// queryWrapper.like("real_estate_address", para); + //queryWrapper.like("real_estate_address", para); queryWrapper.eq("building_name", buildName); queryWrapper.eq("unit_name", unit); queryWrapper.orderByAsc("home_name"); diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaAlarmInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaAlarmInfoController.java index 4e1d48b..0f694b9 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaAlarmInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaAlarmInfoController.java @@ -1,6 +1,7 @@ package com.ruoyi.database.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.utils.PageUtils; import com.ruoyi.common.utils.StringKit; @@ -98,6 +99,15 @@ public class MetaAlarmInfoController extends BaseController { return dataTable; } + + @GetMapping("/policeName") + @ApiOperation("查询") + public AjaxResult selectlist(MetaAlarmInfo metaAlarmInfo) { + List list = metaAlarmInfoService.lambdaQuery().eq(MetaAlarmInfo::getPoliceReceiverName, metaAlarmInfo.getPoliceReceiverName()).list(); + return AjaxResult.success(list); + } + + @GetMapping("/filterByLongitude") @ApiOperation("根据经度过滤接警信息表") public TableDataInfo filterByLongitude() { @@ -118,7 +128,7 @@ public class MetaAlarmInfoController extends BaseController { // 创建一个 TreeMap 用于存储每天的数据量 Map dailyCountsMap = new TreeMap<>(); // 循环迭代前7天 - for (int i = 0; i < 7 ; i++) { + for (int i = 0; i < 7; i++) { LocalDate date = currentDate.minusDays(i); LocalDateTime startDateTime = date.atStartOfDay(); LocalDateTime endDateTime = date.atTime(LocalTime.MAX); @@ -141,6 +151,7 @@ public class MetaAlarmInfoController extends BaseController { return AjaxResult.error("请求失败,请联系管理员"); } } + @GetMapping("/filterByHour") @ApiOperation("当天接警信息表") public AjaxResult filterByHour(MetaAlarmInfo metaAlarmInfo) { @@ -160,12 +171,12 @@ public class MetaAlarmInfoController extends BaseController { LocalDateTime startOfHour = startOfCurrentHour.minusHours(currentHour - i); LocalDateTime endOfHour = startOfHour.plusHours(1); QueryWrapper queryWrapper = new QueryWrapper<>(metaAlarmInfo); - queryWrapper.between("alarm_response_time",startOfHour.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")), + queryWrapper.between("alarm_response_time", startOfHour.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")), endOfHour.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))); //查询当前小时的记录数据总数 long HourCount = metaAlarmInfoService.count(queryWrapper); //存 - hourlyCountsMap.put(endOfHour.format(DateTimeFormatter.ofPattern("HH:mm")),HourCount); + hourlyCountsMap.put(endOfHour.format(DateTimeFormatter.ofPattern("HH:mm")), HourCount); } return AjaxResult.success(hourlyCountsMap); @@ -175,6 +186,12 @@ public class MetaAlarmInfoController extends BaseController { } } +// @PostMapping("/unit") +// @ApiOperation("根据单位查") +// public AjaxResult selectUnit(){ +// +// } + @PostMapping @ApiOperation("新增接警信息表") @Log(title = "接警信息表", businessType = BusinessType.INSERT)