diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java index d48f6f0..28459d5 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java @@ -50,6 +50,11 @@ public class DevopsVideoInfoController extends BaseController { for (DevopsVideoStatus devopsVideoStatus : list1) { strings.add(devopsVideoStatus.getGbsChannelNo()); } + if (!"".equals(devopsVideoInfo.getDeviceName()) && devopsVideoInfo.getDeviceName() != null){ + List list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings) + .like(DevopsVideoInfo::getDeviceName,devopsVideoInfo.getDeviceName()).list(); + return getDataTable(list); + } List list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list(); return getDataTable(list); } 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 a798373..42bee3e 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 @@ -18,13 +18,13 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; +import java.util.*; /** * 接警信息表(MetaAlarmInfo)Controller @@ -48,6 +48,33 @@ public class MetaAlarmInfoController extends BaseController { return getDataTable(list); } + @GetMapping("/time") + @ApiOperation("根据时间查询接警信息") + public TableDataInfo timeList(MetaAlarmInfo metaAlarmInfo) throws Exception { + startPage(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + Date parse = simpleDateFormat.parse(metaAlarmInfo.getInformantTime()); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(parse); + calendar.add(Calendar.DAY_OF_MONTH, 1); + SimpleDateFormat outputSdf = new SimpleDateFormat("yyyyMMddHHmmss"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + String resultDateString = outputSdf.format(calendar.getTime()); + String format = outputSdf.format(parse); + queryWrapper.between("informant_time", format, resultDateString); + List list = metaAlarmInfoService.list(queryWrapper); + ArrayList alarmInfos = new ArrayList<>(); + for (MetaAlarmInfo metaAlarmInfo1 : list){ + String informantTime = metaAlarmInfo1.getInformantTime(); + Date parse1 = outputSdf.parse(informantTime); + String format1 = dateFormat.format(parse1); + metaAlarmInfo1.setInformantName(format1); + alarmInfos.add(metaAlarmInfo1); + } + return getDataTable(alarmInfos); + } + @GetMapping("/filterByLongitude") @ApiOperation("根据经度过滤接警信息表") public TableDataInfo filterByLongitude() { diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java index 06ee644..652ea0e 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java @@ -17,6 +17,11 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.List; /** @@ -35,15 +40,29 @@ public class TransitImpUserRecordController extends BaseController { @GetMapping @ApiOperation("查询涉稳列管人员人脸抓拍记录表") - public TableDataInfo list(TransitImpUserRecord transitImpUserRecord) { + public TableDataInfo list(TransitImpUserRecord transitImpUserRecord) throws Exception{ startPage(); - + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); QueryWrapper queryWrapper = new QueryWrapper<>(transitImpUserRecord); if (transitImpUserRecord.getFirstTime() != null && transitImpUserRecord.getEndTime() != null) { queryWrapper.between("partition_field", transitImpUserRecord.getFirstTime(), transitImpUserRecord.getEndTime()); } + if (transitImpUserRecord.getFirstTime() != null){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(simpleDateFormat.parse(transitImpUserRecord.getFirstTime())); + calendar.add(Calendar.DAY_OF_MONTH, 1); + queryWrapper.between("partition_field", transitImpUserRecord.getFirstTime(),simpleDateFormat.format(calendar.getTime())); + } List list = transitImpUserRecordService.list(queryWrapper); - return getDataTable(list); + List impUserRecords = new ArrayList<>(); + for (TransitImpUserRecord transitImpUserRecord1 : list){ + Date partitionField = transitImpUserRecord1.getPartitionField(); + String format = dateFormat.format(partitionField); + transitImpUserRecord1.setElapsedTime(format); + impUserRecords.add(transitImpUserRecord1); + } + return getDataTable(impUserRecords); } @PostMapping diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java index 3cfc656..4c48d48 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java @@ -8,6 +8,7 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.database.domain.TransitImpUserRecord; import com.ruoyi.database.domain.TransitImpVehicleRecord; import com.ruoyi.database.service.TransitImpVehicleRecordService; import io.swagger.annotations.Api; @@ -17,6 +18,10 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.List; /** @@ -35,14 +40,29 @@ public class TransitImpVehicleRecordController extends BaseController { @GetMapping @ApiOperation("查询重点人车辆记录表") - public TableDataInfo list(TransitImpVehicleRecord transitImpVehicleRecord) { + public TableDataInfo list(TransitImpVehicleRecord transitImpVehicleRecord) throws Exception{ startPage(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); QueryWrapper queryWrapper = new QueryWrapper<>(transitImpVehicleRecord); if (transitImpVehicleRecord.getFirstTime() != null && transitImpVehicleRecord.getEndTime() != null) { queryWrapper.between("partition_field", transitImpVehicleRecord.getFirstTime(), transitImpVehicleRecord.getEndTime()); } + if (transitImpVehicleRecord.getFirstTime() != null){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(simpleDateFormat.parse(transitImpVehicleRecord.getFirstTime())); + calendar.add(Calendar.DAY_OF_MONTH, 1); + queryWrapper.between("partition_field", transitImpVehicleRecord.getFirstTime(),simpleDateFormat.format(calendar.getTime())); + } List list = transitImpVehicleRecordService.list(queryWrapper); - return getDataTable(list); + List impVehicleRecords = new ArrayList<>(); + for (TransitImpVehicleRecord transitImpVehicleRecord1 : list){ + Date partitionField = transitImpVehicleRecord1.getPartitionField(); + String format = dateFormat.format(partitionField); + transitImpVehicleRecord1.setElapsedTime(format); + impVehicleRecords.add(transitImpVehicleRecord1); + } + return getDataTable(impVehicleRecords); } @PostMapping 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 254953a..f67f1d0 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 @@ -8,7 +8,10 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.database.domain.TransitImpUserRecord; import com.ruoyi.database.domain.TransitUserRecord; +import com.ruoyi.database.domain.vo.TransitUserRecordVO; +import com.ruoyi.database.service.TransitImpUserRecordService; import com.ruoyi.database.service.TransitUserRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -17,6 +20,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import java.util.Date; import java.util.List; /** @@ -32,15 +36,23 @@ import java.util.List; public class TransitUserRecordController extends BaseController { private final TransitUserRecordService transitUserRecordService; + private final TransitImpUserRecordService transitImpUserRecordService; @GetMapping @ApiOperation("查询人脸记录表") public TableDataInfo list(TransitUserRecord transitUserRecord) { startPage(); QueryWrapper queryWrapper = new QueryWrapper<>(transitUserRecord); +// List impUserRecords = transitImpUserRecordService.lambdaQuery().eq(TransitImpUserRecord::getDeviceCode, transitUserRecord.getDeviceCode()).list(); if (transitUserRecord.getFirstTime() != null && transitUserRecord.getEndTime() != null) { queryWrapper.between("partition_field", transitUserRecord.getFirstTime(), transitUserRecord.getEndTime()); } +// if (impUserRecords != null && !impUserRecords.isEmpty()){ +// for (TransitImpUserRecord transitImpUserRecord : impUserRecords){ +// Date partitionField = transitImpUserRecord.getPartitionField(); +// } +// return getDataTable(impUserRecords); +// } List list = transitUserRecordService.list(queryWrapper); return getDataTable(list); } 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 aa0b9ac..a9603dd 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 @@ -12,9 +12,11 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.database.domain.BoneVehicle; +import com.ruoyi.database.domain.TransitImpVehicleRecord; import com.ruoyi.database.domain.TransitUserRecord; import com.ruoyi.database.domain.TransitVehicleRecord; import com.ruoyi.database.service.BoneVehicleService; +import com.ruoyi.database.service.TransitImpVehicleRecordService; import com.ruoyi.database.service.TransitVehicleRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -40,15 +42,20 @@ import java.util.List; public class TransitVehicleRecordController extends BaseController { private final TransitVehicleRecordService transitVehicleRecordService; + private final TransitImpVehicleRecordService transitImpVehicleRecordService; @GetMapping @ApiOperation("查询车辆记录表") public TableDataInfo list(TransitVehicleRecord transitVehicleRecord) { startPage(); QueryWrapper queryWrapper = new QueryWrapper<>(transitVehicleRecord); +// List vehicleRecords = transitImpVehicleRecordService.lambdaQuery().eq(TransitImpVehicleRecord::getDeviceCode, transitVehicleRecord.getDoorwayCode()).list(); if (transitVehicleRecord.getFirstTime() != null && transitVehicleRecord.getEndTime() != null) { queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), transitVehicleRecord.getEndTime()); } +// if (vehicleRecords != null && !vehicleRecords.isEmpty()){ +// return getDataTable(vehicleRecords); +// } List list = transitVehicleRecordService.list(queryWrapper); return getDataTable(list); } diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java index 353e2cc..2f422b4 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java @@ -149,4 +149,9 @@ public class TransitImpUserRecord extends BaseEntity { @Excel(name = "重点类型名称") private String impUserTypeName; + + @TableField(exist = false) + private String elapsedTime; + + } diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java index c98dfc7..7d7e760 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java @@ -158,4 +158,7 @@ public class TransitImpVehicleRecord extends BaseEntity { @Excel(name = "重点类型名称") private String impUserTypeName; + @TableField(exist = false) + private String elapsedTime; + } diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitUserRecordVO.java b/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitUserRecordVO.java new file mode 100644 index 0000000..f75efcf --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitUserRecordVO.java @@ -0,0 +1,141 @@ +package com.ruoyi.database.domain.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 人脸记录表(TransitUserRecord)Domain + * + * @author makejava + * @since 2023-12-04 14:25:45 + */ +@Data +public class TransitUserRecordVO extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备编码 + */ + @ApiModelProperty("设备编码") + @Excel(name = "设备编码") + private String deviceCode; + + /** + * 设备名称 + */ + @ApiModelProperty("设备名称") + @Excel(name = "设备名称") + private String deviceName; + + /** + * 通道国标编码 + */ + @ApiModelProperty("通道国标编码") + @Excel(name = "通道国标编码") + private String gbsChannelNo; + + /** + * 安装位置 + */ + @ApiModelProperty("安装位置") + @Excel(name = "安装位置") + private String deviceAddress; + + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 人脸图 + */ + @ApiModelProperty("人脸图") + @Excel(name = "人脸图") + private String personPic; + + /** + * 人体全景图 + */ + @ApiModelProperty("人体全景图") + @Excel(name = "人体全景图") + private String bodyGlobalPic; + + /** + * 人体小图 + */ + @ApiModelProperty("人体小图") + @Excel(name = "人体小图") + private String bodyPic; + + /** + * 常口库标准照片 + */ + @ApiModelProperty("常口库标准照片") + @Excel(name = "常口库标准照片") + private String userStandardPic; + + /** + * 人员姓名 + */ + @ApiModelProperty("人员姓名") + @Excel(name = "人员姓名") + private String userName; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + /** + * 相似度 + */ + @ApiModelProperty("相似度") + @Excel(name = "相似度") + private String similarity; + + /** + * 抓拍时间 + */ + @ApiModelProperty("抓拍时间") + @Excel(name = "抓拍时间") + private Long passTime; + + /** + * 抓拍时间(分区) + */ + @ApiModelProperty("抓拍时间(分区)") + @Excel(name = "抓拍时间(分区)") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date partitionField; + + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitVehicleRecordVO.java b/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitVehicleRecordVO.java new file mode 100644 index 0000000..a365ed4 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/vo/TransitVehicleRecordVO.java @@ -0,0 +1,155 @@ +package com.ruoyi.database.domain.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 车辆记录表(TransitVehicleRecord)Domain + * + * @author makejava + * @since 2023-12-04 14:25:46 + */ +@Data +public class TransitVehicleRecordVO extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备编码 + */ + @ApiModelProperty("设备编码") + @Excel(name = "设备编码") + private String deviceCode; + + /** + * 设备名称 + */ + @ApiModelProperty("设备名称") + @Excel(name = "设备名称") + private String deviceName; + + /** + * 通道国标编码 + */ + @ApiModelProperty("通道国标编码") + @Excel(name = "通道国标编码") + private String gbsChannelNo; + + /** + * 安装位置 + */ + @ApiModelProperty("安装位置") + @Excel(name = "安装位置") + private String deviceAddress; + + /** + * 设备ip + */ + @ApiModelProperty("设备ip") + @Excel(name = "设备ip") + private String deviceIp; + + /** + * 车牌号码 + */ + @ApiModelProperty("车牌号码") + @Excel(name = "车牌号码") + private String plateNo; + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 车牌图 + */ + @ApiModelProperty("车牌图") + @Excel(name = "车牌图") + private String platePic; + + /** + * 人车同拍唯一记录 + */ + @ApiModelProperty("人车同拍唯一记录") + @Excel(name = "人车同拍唯一记录") + private String userVehicleRecordId; + + /** + * 车主人脸图 + */ + @ApiModelProperty("车主人脸图") + @Excel(name = "车主人脸图") + private String ownerPersonPic; + + /** + * 车主全景图 + */ + @ApiModelProperty("车主全景图") + @Excel(name = "车主全景图") + private String ownerGlobalPic; + + /** + * 车主姓名 + */ + @ApiModelProperty("车主姓名") + @Excel(name = "车主姓名") + private String ownerName; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + + /** + * 卡口编码 + */ + @ApiModelProperty("卡口编码") + @Excel(name = "卡口编码") + private String doorwayCode; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date partitionField; + + +}