沿海平台代码迭代

develop
fengchunyu 11 months ago
parent 47aff1c05c
commit e7705f6ab4

@ -240,7 +240,6 @@ public class BigScreenController extends BaseController {
public AjaxResult policeSituationStatisticsList() { public AjaxResult policeSituationStatisticsList() {
try { try {
List<MetaAlarmInfoAndHandleAlarmVo> metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); List<MetaAlarmInfoAndHandleAlarmVo> metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm();
return AjaxResult.success(metaAlarmInfos); return AjaxResult.success(metaAlarmInfos);
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.toString(e)); logger.info(StringKit.toString(e));

@ -1,6 +1,7 @@
package com.ruoyi.database.controller; package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
@ -34,24 +35,22 @@ public class MetaHuntersInfoController extends BaseController {
private final MetaHuntersInfoService metaHuntersInfoService; private final MetaHuntersInfoService metaHuntersInfoService;
@GetMapping @GetMapping
@ApiOperation("查询非法狩猎人员信息表") @ApiOperation("查询非法狩猎人员信息表")
public TableDataInfo<MetaHuntersInfo> list(MetaHuntersInfo metaHuntersInfo) { public TableDataInfo<MetaHuntersInfo> list(MetaHuntersInfo metaHuntersInfo) {
startPage(); startPage();
LambdaQueryWrapper<MetaHuntersInfo> queryWrapper = new LambdaQueryWrapper<>(metaHuntersInfo);
List<MetaHuntersInfo> list = new ArrayList<>(); if (metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null) {
if(metaHuntersInfo.getFirstTime() != null && metaHuntersInfo.getEndTime() != null){ queryWrapper.between(MetaHuntersInfo::getRegistrationTime, metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime());
list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)
.between("registration_time", metaHuntersInfo.getFirstTime(), metaHuntersInfo.getEndTime())
);
}else {
list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo));
} }
// 添加排序条件:根据 userPic 倒序排序
// List<MetaHuntersInfo> list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)); queryWrapper.orderByDesc(MetaHuntersInfo::getUserPic);
List<MetaHuntersInfo> list = metaHuntersInfoService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }
@PostMapping @PostMapping
@ApiOperation("新增非法狩猎人员信息表") @ApiOperation("新增非法狩猎人员信息表")
@Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT) @Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT)

@ -37,6 +37,13 @@ public class MetaHuntersInfo extends BaseEntity {
@TableField(condition = SqlCondition.LIKE_RIGHT) @TableField(condition = SqlCondition.LIKE_RIGHT)
private String hunterName; private String hunterName;
/**
*
*/
@ApiModelProperty("图片")
@Excel(name = "图片")
private String userPic;
/** /**
* *
*/ */

@ -73,4 +73,15 @@ public class MetaWharfInfo extends BaseEntity {
@Excel(name = "码头主证件号码") @Excel(name = "码头主证件号码")
private String wharfOwnerIdCard; private String wharfOwnerIdCard;
/**
*
*/
@ApiModelProperty("经度")
private String longitude;
/**
*
*/
@ApiModelProperty("纬度")
private String latitude;
} }

@ -39,18 +39,9 @@ public interface MetaAlarmInfoMapper extends BaseMapper<MetaAlarmInfo> {
"a.informant_time jjxx_informant_time, " + "a.informant_time jjxx_informant_time, " +
"a.alarm_address jjxx_alarm_address, " + "a.alarm_address jjxx_alarm_address, " +
"a.longitude jjxx_longitude, " + "a.longitude jjxx_longitude, " +
"a.latitude jjxx_latitude, " + "a.latitude jjxx_latitude from ( " +
"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 ( " +
"select * from meta_alarm_info order by informant_time desc limit 100 " + "select * from meta_alarm_info order by informant_time desc limit 100 " +
") a " + ") a " )
"left join meta_handle_alarm_info b on a.alarm_code = b.alarm_code ")
public List<MetaAlarmInfoAndHandleAlarmVo> listAlarmAndHandleAlarm(); public List<MetaAlarmInfoAndHandleAlarmVo> listAlarmAndHandleAlarm();

Loading…
Cancel
Save