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 220b243..096f91c 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 @@ -240,7 +240,6 @@ public class BigScreenController extends BaseController { public AjaxResult policeSituationStatisticsList() { try { List metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); - return AjaxResult.success(metaAlarmInfos); } catch (Exception e) { logger.info(StringKit.toString(e)); diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.java index e10f007..1b7ca30 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.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.annotation.Log; import com.ruoyi.common.core.controller.BaseController; @@ -34,24 +35,22 @@ public class MetaHuntersInfoController extends BaseController { private final MetaHuntersInfoService metaHuntersInfoService; + @GetMapping @ApiOperation("查询非法狩猎人员信息表") public TableDataInfo list(MetaHuntersInfo metaHuntersInfo) { startPage(); - - List list = new ArrayList<>(); - if(metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null){ - list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo) - .between("registration_time", metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime()) - ); - }else { - list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(metaHuntersInfo); + if (metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null) { + queryWrapper.between(MetaHuntersInfo::getRegistrationTime, metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime()); } - -// List list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)); + // 添加排序条件:根据 userPic 倒序排序 + queryWrapper.orderByDesc(MetaHuntersInfo::getUserPic); + List list = metaHuntersInfoService.list(queryWrapper); return getDataTable(list); } + @PostMapping @ApiOperation("新增非法狩猎人员信息表") @Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT) diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java index 3287628..9b739f2 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java @@ -37,6 +37,13 @@ public class MetaHuntersInfo extends BaseEntity { @TableField(condition = SqlCondition.LIKE_RIGHT) private String hunterName; + /** + * 图片 + */ + @ApiModelProperty("图片") + @Excel(name = "图片") + private String userPic; + /** * 性别 */ diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java index 140f06b..d417f16 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java @@ -73,4 +73,15 @@ public class MetaWharfInfo extends BaseEntity { @Excel(name = "码头主证件号码") private String wharfOwnerIdCard; + /** + * 经度 + */ + @ApiModelProperty("经度") + private String longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + private String latitude; } diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java index 6106884..ffaa6f9 100644 --- a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaAlarmInfoMapper.java @@ -39,18 +39,9 @@ public interface MetaAlarmInfoMapper extends BaseMapper { "a.informant_time jjxx_informant_time, " + "a.alarm_address jjxx_alarm_address, " + "a.longitude jjxx_longitude, " + - "a.latitude jjxx_latitude, " + - "b.alarm_code cjxx_alarm_code, " + - "b.handle_alarm_unit cjxx_handle_alarm_unit, " + - "b.handle_alarm_time cjxx_handle_alarm_time, " + - "b.handle_alarm_content cjxx_handle_alarm_content, " + - "b.handle_alarm_address cjxx_handle_alarm_address, " + - "b.handle_alarm_user cjxx_handle_alarm_user, " + - "b.handle_alarm_user_code cjxx_handle_alarm_user_code, " + - "b.handle_alarm_result cjxx_handle_alarm_result from ( " + + "a.latitude jjxx_latitude from ( " + "select * from meta_alarm_info order by informant_time desc limit 100 " + - ") a " + - "left join meta_handle_alarm_info b on a.alarm_code = b.alarm_code ") + ") a " ) public List listAlarmAndHandleAlarm();