沿海平台代码迭代

develop
fengchunyu 11 months ago
parent e7705f6ab4
commit c649b0c53a

@ -6,18 +6,24 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.business.domain.vo.*; import com.ruoyi.business.domain.vo.*;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.NumKit;
import com.ruoyi.common.utils.StringKit; import com.ruoyi.common.utils.StringKit;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.database.domain.*; import com.ruoyi.database.domain.*;
import com.ruoyi.database.service.*; import com.ruoyi.database.service.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
@ -68,7 +74,18 @@ public class BigScreenController extends BaseController {
//实有单位总数 //实有单位总数
int countSydw = actualUnitInfoService.count(); int countSydw = actualUnitInfoService.count();
// 常驻人员查询
// QueryWrapper<MetaActualUserInfo> queryCzryWrapper = new QueryWrapper<>();
// queryCzryWrapper.ne("actual_user_type", 102);
// int actualUserCzryCount = actualUserInfoService.count(queryCzryWrapper);
int actualUserCzryCount = actualUserSyrkCount - actualUserLdrkCount;
//重点人员
int zdryCount = impUserInfoService.count();
OverviewResourcesVo bean = new OverviewResourcesVo(); OverviewResourcesVo bean = new OverviewResourcesVo();
bean.setCountCzry(StringKit.toString(actualUserCzryCount));
bean.setCountZdry(StringKit.toString(zdryCount));
bean.setActualUserLdrkCount(StringKit.toString(actualUserLdrkCount)); bean.setActualUserLdrkCount(StringKit.toString(actualUserLdrkCount));
bean.setActualUserSyrkCount(StringKit.toString(actualUserSyrkCount)); bean.setActualUserSyrkCount(StringKit.toString(actualUserSyrkCount));
bean.setCountSyfw(StringKit.toString(countSyfw)); bean.setCountSyfw(StringKit.toString(countSyfw));
@ -81,6 +98,20 @@ public class BigScreenController extends BaseController {
} }
} }
@GetMapping
@ApiOperation("常驻人员列表")
public TableDataInfo<MetaActualUserInfo> list(MetaActualUserInfo metaActualUserInfo) {
startPage();
// List<MetaActualUserInfo> list = metaActualUserInfoService.list(new QueryWrapper<>(metaActualUserInfo));
// 常驻人员查询
QueryWrapper<MetaActualUserInfo> queryCzryWrapper = new QueryWrapper<>();
queryCzryWrapper.ne("actual_user_type", 102);
List<MetaActualUserInfo> list = actualUserInfoService.list(queryCzryWrapper);
return getDataTable(list);
}
@PostMapping("/keyPersonnel") @PostMapping("/keyPersonnel")
@ApiOperation("重点人员") @ApiOperation("重点人员")
public AjaxResult keyPersonnel() { public AjaxResult keyPersonnel() {
@ -249,9 +280,13 @@ public class BigScreenController extends BaseController {
@PostMapping("/realTimeAlarmSituation") @PostMapping("/realTimeAlarmSituation")
@ApiOperation("实时警情") @ApiOperation("实时警情")
public AjaxResult realTimeAlarmSituation() { public AjaxResult realTimeAlarmSituation(@ApiParam @Param("时间") String time) {
try { try {
Date thirtyMinutesAgo = DateUtil.offsetMinute(new Date(), -30); if (0 == NumKit.checkInt(time)) {
time = "30";
}
Date thirtyMinutesAgo = DateUtil.offsetMinute(new Date(), -NumKit.checkInt(time));
QueryWrapper<MetaAlarmInfo> queryWrapper = new QueryWrapper<>(); QueryWrapper<MetaAlarmInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.gt("alarm_response_time", DateUtil.format(thirtyMinutesAgo, "yyyyMMddHHmmss")); queryWrapper.gt("alarm_response_time", DateUtil.format(thirtyMinutesAgo, "yyyyMMddHHmmss"));
List<MetaAlarmInfo> metaAlarmInfos = alarmInfoService.list(queryWrapper); List<MetaAlarmInfo> metaAlarmInfos = alarmInfoService.list(queryWrapper);
@ -397,17 +432,16 @@ public class BigScreenController extends BaseController {
queryWrapper.like("real_estate_address", para); queryWrapper.like("real_estate_address", para);
queryWrapper.eq("unit_name", unit); queryWrapper.eq("unit_name", unit);
List<MetaRealEstateInfo> estateInfoList = realEstateInfoService.list(queryWrapper); List<MetaRealEstateInfo> estateInfoList = realEstateInfoService.list(queryWrapper);
// 提取规则如果home_name 是3位则取第一位当map中的键
// 如果home_name是4位则取第二位当map中的键如果低于3位或者大于4位则不取 List<MetaRealEstateInfoVo> modifiedEstateInfoList = estateInfoList.stream()
// Map<String, List<String>> resultMap = estateInfoList.stream() .map(info -> {
// .filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4) MetaRealEstateInfoVo modifiedInfo = new MetaRealEstateInfoVo();
// .collect(Collectors.groupingBy( BeanUtils.copyProperties(info, modifiedInfo);
// info -> info.getHomeName().length() == 3 ? String.valueOf(info.getHomeName().charAt(0)) : modifiedInfo.setHomeNameCn(modifiedInfo.getHomeName());
// String.valueOf(info.getHomeName().charAt(1)), return modifiedInfo;
// Collectors.mapping(MetaRealEstateInfo::getHomeName, Collectors.toList()) })
// )); .collect(Collectors.toList());
Map<String, List<Map<String, String>>> resultMap = modifiedEstateInfoList.stream()
Map<String, List<String>> resultMap = estateInfoList.stream()
.filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4) .filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4)
.collect(Collectors.groupingBy( .collect(Collectors.groupingBy(
info -> { info -> {
@ -415,9 +449,18 @@ public class BigScreenController extends BaseController {
return homeName.length() == 3 ? String.valueOf(homeName.charAt(0)) : return homeName.length() == 3 ? String.valueOf(homeName.charAt(0)) :
homeName.length() == 4 ? homeName.substring(0, 2) : null; homeName.length() == 4 ? homeName.substring(0, 2) : null;
}, },
Collectors.mapping(MetaRealEstateInfo::getHomeName, Collectors.toList()) Collectors.mapping(
info -> {
Map<String, String> entryMap = new HashMap<>();
entryMap.put("homeName", info.getHomeName());
entryMap.put("address", info.getRealEstateAddress());
return entryMap;
},
Collectors.toList()
)
)); ));
return AjaxResult.success(resultMap); return AjaxResult.success(resultMap);
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.toString(e)); logger.info(StringKit.toString(e));
@ -472,10 +515,10 @@ public class BigScreenController extends BaseController {
buildUserInformationVo.setActualUserInfo(actHzUserInfos.get(0)); buildUserInformationVo.setActualUserInfo(actHzUserInfos.get(0));
} }
List<MetaActualUserInfo> syrkUserInfos = actualUserInfos.stream() // List<MetaActualUserInfo> syrkUserInfos = actualUserInfos.stream()
.filter(userInfo -> "101".equals(StringKit.toString(userInfo.getActualUserType()))) // .filter(userInfo -> "101".equals(StringKit.toString(userInfo.getActualUserType())))
.collect(Collectors.toList()); // .collect(Collectors.toList());
buildUserInformationVo.setUserInfos(syrkUserInfos); buildUserInformationVo.setUserInfos(actualUserInfos);
} }

@ -1,10 +1,13 @@
package com.ruoyi.business.controller; package com.ruoyi.business.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.business.domain.vo.PersonStatissticsVo;
import com.ruoyi.business.domain.vo.PoachingVo; import com.ruoyi.business.domain.vo.PoachingVo;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringKit; import com.ruoyi.common.utils.StringKit;
import com.ruoyi.database.domain.MetaHuntersInfo;
import com.ruoyi.database.service.DevopsDeviceInfoService; import com.ruoyi.database.service.DevopsDeviceInfoService;
import com.ruoyi.database.service.MetaHuntersInfoService; import com.ruoyi.database.service.MetaHuntersInfoService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -36,9 +39,7 @@ public class PoachingController extends BaseController {
@ApiOperation("资源概况") @ApiOperation("资源概况")
public AjaxResult overviewResources() { public AjaxResult overviewResources() {
try { try {
// 流口查询
int deviceCount = deviceInfoService.count(); int deviceCount = deviceInfoService.count();
//实有房屋总数 todo 等表创建好了之后
int personCuont = huntersInfoService.count(); int personCuont = huntersInfoService.count();
PoachingVo bean = new PoachingVo(); PoachingVo bean = new PoachingVo();
@ -55,30 +56,47 @@ public class PoachingController extends BaseController {
@ApiOperation("人员统计") @ApiOperation("人员统计")
public AjaxResult personnelStatistics() { public AjaxResult personnelStatistics() {
try { try {
//非法狩猎人员总数
int count = huntersInfoService.count();
//非法捕捞水产品案
int ffblscCount = huntersInfoService.count(new QueryWrapper<MetaHuntersInfo>().eq("hunters_user_type", 1));
//非法狩猎案
int ffslaCount = huntersInfoService.count(new QueryWrapper<MetaHuntersInfo>().eq("hunters_user_type", 2));
//非法猎捕杀害珍贵、濒危野生动物案
int ffslbsCount = huntersInfoService.count(new QueryWrapper<MetaHuntersInfo>().eq("hunters_user_type", 3));
double ffblscPerce = (double) ffblscCount / count * 100;
ffblscPerce = Double.isNaN(ffblscPerce) ? 0 : ffblscPerce;
String ffblscPerceStr = String.format("%.0f%%", ffblscPerce);
double ffslaPerce = (double) ffslaCount / count * 100;
ffslaPerce = Double.isNaN(ffslaPerce) ? 0 : ffslaPerce;
String ffslaPerceStr = String.format("%.0f%%", ffslaPerce);
double ffslbsPerce = (double) ffslbsCount / count * 100;
ffslbsPerce = Double.isNaN(ffslbsPerce) ? 0 : ffslbsPerce;
String ffslbsPerceStr = String.format("%.0f%%", ffslbsPerce);
PersonStatissticsVo bean = new PersonStatissticsVo();
bean.setCount(count);
Map ffblscMap = new HashMap();
ffblscMap.put("name","非法捕捞水产品案");
ffblscMap.put("value",ffblscCount);
ffblscMap.put("percentage",ffblscPerceStr);
bean.setFfblsc(ffblscMap);
Map ffslaMap = new HashMap();
ffslaMap.put("name","非法狩猎案");
ffslaMap.put("value",ffslaCount);
ffslaMap.put("percentage",ffslaPerceStr);
bean.setFfsla(ffslaMap);
Map ffslbsMap = new HashMap();
ffslbsMap.put("name","非法猎捕杀害珍贵、濒危野生动物案");
ffslbsMap.put("value",ffslbsCount);
ffslbsMap.put("percentage",ffslbsPerceStr);
bean.setFfslbs(ffslbsMap);
Map parMap = new HashMap(); return AjaxResult.success(bean);
parMap.put("ffslryCount","7644");
Map map1 = new HashMap();
map1.put("XX人员","34%");
parMap.put("xx1",map1);
Map map2 = new HashMap();
map2.put("XX人员","23%");
parMap.put("xx2",map2);
Map map3 = new HashMap();
map3.put("XX人员","17%");
parMap.put("xx3",map3);
Map map4 = new HashMap();
map4.put("XX人员","12%");
parMap.put("xx4",map4);
Map map5 = new HashMap();
map5.put("XX人员","14%");
parMap.put("xx5",map5);
return AjaxResult.success(parMap);
} catch (Exception e) { } catch (Exception e) {
logger.info(StringKit.toString(e)); logger.info(StringKit.toString(e));
return AjaxResult.error("请求失败,请联系管理员"); return AjaxResult.error("请求失败,请联系管理员");

@ -0,0 +1,95 @@
package com.ruoyi.business.domain.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
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;
/**
* (MetaRealEstateInfo)Domain
*
* @author makejava
* @since 2023-12-06 15:01:30
*/
@Data
@ApiModel(value = "MetaRealEstateInfo", description = "实有房屋信息表Vo")
public class MetaRealEstateInfoVo extends BaseEntity {
/**
*
*/
@ApiModelProperty("主键")
private Long id;
/**
* ID
*/
@ApiModelProperty("房屋ID")
private String homeId;
/**
*
*/
@ApiModelProperty("派出所代码")
private String policeStationCode;
/**
*
*/
@ApiModelProperty("警务区编码")
private String policeDistrictCode;
/**
*
*/
@ApiModelProperty("实有房屋地址简称")
private String realEstateBriefAddress;
/**
*
*/
@ApiModelProperty("实有房屋地址")
private String realEstateAddress;
/**
*
*/
@ApiModelProperty("单元名称")
private String unitName;
/**
*
*/
@ApiModelProperty("楼栋名称")
private String buildingName;
/**
*
*/
@ApiModelProperty("房屋名称")
private String homeName;
/**
*
*/
@ApiModelProperty("房屋名称")
private String homeNameCn;
/**
*
*/
@ApiModelProperty("经度")
private Double longitude;
/**
*
*/
@ApiModelProperty("纬度")
private Double latitude;
}

@ -39,5 +39,16 @@ public class OverviewResourcesVo {
@ApiModelProperty("实有单位总数") @ApiModelProperty("实有单位总数")
private String countSydw; private String countSydw;
/**
*
*/
@ApiModelProperty("常驻人员总数")
private String countCzry;
/**
*
*/
@ApiModelProperty("重点人员总数")
private String countZdry;
} }

@ -0,0 +1,56 @@
package com.ruoyi.business.domain.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Map;
/**
* @Auther: cyFeng
* @Date: 2023/12/13 16:23
* @Description:
*/
@Data
public class PersonStatissticsVo {
/**
*
*/
@ApiModelProperty("总数")
private Integer count;
/**
*
*/
@ApiModelProperty("非法捕捞水产品案总数")
private Map ffblsc;
// /**
// * 非法捕捞水产品案百分比
// */
// @ApiModelProperty("非法捕捞水产品案百分比")
// private String ffblscbfb;
/**
*
*/
@ApiModelProperty("非法狩猎案总数")
private Map ffsla;
// /**
// * 非法狩猎案百分比
// */
// @ApiModelProperty("非法狩猎案百分比")
// private String ffslabfb;
/**
*
*/
@ApiModelProperty("非法猎捕杀害珍贵、濒危野生动物案总数")
private Map ffslbs;
// /**
// * 非法猎捕杀害珍贵、濒危野生动物案百分比
// */
// @ApiModelProperty("非法猎捕杀害珍贵、濒危野生动物案百分比")
// private String ffslbsbfb;
}

@ -0,0 +1,207 @@
package com.ruoyi.business.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.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;
/**
* (TransitHuntersUserModelRecord)Domain
*
* @author makejava
* @since 2023-12-14 13:59:05
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "TransitHuntersUserModelRecord", description = "非法狩猎人员模型记录表Vo")
public class TransitHuntersUserModelRecordVo extends BaseEntity {
/**
*
*/
@ApiModelProperty("主键")
private Long id;
/**
*
*/
@ApiModelProperty("车主姓名")
private String huntersUserName;
/**
*
*/
@ApiModelProperty("证件号码")
private String huntersUserIdCard;
/**
*
*/
@ApiModelProperty("狩猎人员类别")
private Integer huntersUserType;
private String huntersUserTypeCn;
/**
*
*/
@ApiModelProperty("预警类型")
private Integer warningType;
private String warningTypeCn;
/**
*
*/
@ApiModelProperty("预警级别")
private Integer warningLevel;
private String warningLevelCn;
/**
*
*/
@ApiModelProperty("预警时间")
private String warningTime;
/**
*
*/
@ApiModelProperty("预警内容")
private String warningContent;
/**
*
*/
@ApiModelProperty("首次抓拍全景图")
private String firstGlobalPic;
/**
*
*/
@ApiModelProperty("首次抓拍人脸图")
private String firstUserPic;
/**
*
*/
@ApiModelProperty("首次经过时间")
private Long firstPassTime;
private String firstPassTimeCn;
/**
*
*/
@ApiModelProperty("首次抓拍点位编码")
private String firstDeviceCode;
/**
*
*/
@ApiModelProperty("首次抓拍经过位置")
private String firstDeviceAddress;
/**
*
*/
@ApiModelProperty("首次抓拍点位经度")
private Double firstLongitude;
/**
*
*/
@ApiModelProperty("首次抓拍点位纬度")
private Double firstLatitude;
/**
*
*/
@ApiModelProperty("末次抓拍全景图")
private String endGlobalPic;
/**
*
*/
@ApiModelProperty("末次经过时间")
private Long endPassTime;
private String endPassTimeCn;
/**
*
*/
@ApiModelProperty("末次抓拍人脸图")
private String endUserPic;
/**
*
*/
@ApiModelProperty("末次抓拍点位编码")
private String endDeviceCode;
/**
*
*/
@ApiModelProperty("末次抓拍经过位置")
private String endDeviceAddress;
/**
*
*/
@ApiModelProperty("末次抓拍点位经度")
private Double endLongitude;
/**
*
*/
@ApiModelProperty("末次抓拍点位纬度")
private Double endLatitude;
/**
*
*/
@ApiModelProperty("抓拍次数")
private Integer captureFrequency;
private String captureFrequencyCn;
/**
*
*/
@ApiModelProperty("户籍地派出所编码")
private String houseHoldPoliceStationCode;
/**
*
*/
@ApiModelProperty("户籍地派出所名称")
private String houseHoldPoliceStationName;
/**
*
*/
@ApiModelProperty("现住地派出所编码")
private String habitationPoliceStationCode;
/**
*
*/
@ApiModelProperty("现住地派出所名称")
private String habitationPoliceStationName;
/**
*
*/
@ApiModelProperty("预警时间(分区)")
private Date partitionField;
/**
*
*/
@ApiModelProperty("滞留时间")
private String residenceTime;
}

@ -0,0 +1,146 @@
package com.ruoyi.database.controller;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.business.domain.vo.TransitHuntersUserModelRecordVo;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
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.NumKit;
import com.ruoyi.common.utils.StringKit;
import com.ruoyi.common.utils.bean.BeanUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitHuntersUserModelRecord;
import com.ruoyi.database.domain.TransitHuntersUserRecord;
import com.ruoyi.database.domain.TransitVehicleRecord;
import com.ruoyi.database.service.TransitHuntersUserModelRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* (TransitHuntersUserModelRecord)Controller
*
* @author makejava
* @since 2023-12-14 13:59:04
*/
@Api(tags = "非法狩猎人员模型记录表")
@RestController
@RequiredArgsConstructor
@RequestMapping("/base/transitHuntersUserModelRecord")
public class TransitHuntersUserModelRecordController extends BaseController {
private final TransitHuntersUserModelRecordService transitHuntersUserModelRecordService;
@GetMapping
@ApiOperation("查询非法狩猎人员模型记录表")
public TableDataInfo<TransitHuntersUserModelRecord> list(TransitHuntersUserModelRecord transitHuntersUserModelRecord) {
startPage();
QueryWrapper<TransitHuntersUserModelRecord> queryWrapper = new QueryWrapper<>(transitHuntersUserModelRecord);
if (transitHuntersUserModelRecord.getFirstTime() != null && transitHuntersUserModelRecord.getEndTime() != null) {
queryWrapper.between("partition_field", transitHuntersUserModelRecord.getFirstTime(), transitHuntersUserModelRecord.getEndTime());
}
List<TransitHuntersUserModelRecord> list = transitHuntersUserModelRecordService.list(queryWrapper);
List<TransitHuntersUserModelRecordVo> listVo = list.stream()
.map(record -> {
TransitHuntersUserModelRecordVo modelRecordVo = new TransitHuntersUserModelRecordVo();
BeanUtils.copyProperties(record,modelRecordVo);
Long firstTime = modelRecordVo.getFirstPassTime();
Long endTime = modelRecordVo.getEndPassTime();
if( !"".equals(StringKit.toString(firstTime)) && !"".equals(StringKit.toString(endTime)) ){
// int firstTimeI = NumKit.checkInt(firstTime);
// int endTimeI = NumKit.checkInt(endTime);
Long difference = endTime - firstTime;
java.time.Duration duration = java.time.Duration.ofSeconds(difference);
String formattedDuration = DateUtil.formatBetween(duration.toMillis());
modelRecordVo.setResidenceTime(formattedDuration);
}
return modelRecordVo;
})
.collect(Collectors.toList());
return getDataTable(listVo);
}
@PostMapping
@ApiOperation("新增非法狩猎人员模型记录表")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.INSERT)
public AjaxResult insert(@RequestBody TransitHuntersUserModelRecord transitHuntersUserModelRecord) {
return toAjax(transitHuntersUserModelRecordService.save(transitHuntersUserModelRecord));
}
@PutMapping
@ApiOperation("修改非法狩猎人员模型记录表")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.UPDATE)
public AjaxResult update(@RequestBody TransitHuntersUserModelRecord transitHuntersUserModelRecord) {
return toAjax(transitHuntersUserModelRecordService.updateById(transitHuntersUserModelRecord));
}
@DeleteMapping
@ApiOperation("删除非法狩猎人员模型记录表")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.DELETE)
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return toAjax(transitHuntersUserModelRecordService.removeByIds(idList));
}
@PostMapping("/export")
@ApiOperation("导出非法狩猎人员模型记录表")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.EXPORT)
public void export(HttpServletResponse response, TransitHuntersUserModelRecord transitHuntersUserModelRecord) {
List<TransitHuntersUserModelRecord> list = transitHuntersUserModelRecordService.list(new QueryWrapper<>(transitHuntersUserModelRecord));
ExcelUtil<TransitHuntersUserModelRecord> util = new ExcelUtil<>(TransitHuntersUserModelRecord.class);
util.exportExcel(response, list, "非法狩猎人员模型记录表");
}
@PostMapping("/importTemplate")
@ApiOperation("导入非法狩猎人员模型记录表模板")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.IMPORT)
public void importTemplate(HttpServletResponse response) {
ExcelUtil<TransitHuntersUserModelRecord> util = new ExcelUtil<>(TransitHuntersUserModelRecord.class);
util.importTemplateExcel(response, "场所基础信息模板");
}
@PostMapping("/importData")
@ApiOperation("导入非法狩猎人员模型记录表")
@Log(title = "非法狩猎人员模型记录表", businessType = BusinessType.IMPORT)
public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception {
ExcelUtil<TransitHuntersUserModelRecord> util = new ExcelUtil<>(TransitHuntersUserModelRecord.class);
List<TransitHuntersUserModelRecord> list = util.importExcel(file.getInputStream());
Object result = transitHuntersUserModelRecordService.importData(list);
if (result instanceof List) {
util.exportExcel(response, (List) result, "非法狩猎人员模型记录表错误数据");
return null;
}
return AjaxResult.success(result);
}
public static void main(String[] args) {
int firstTimeI = NumKit.checkInt("1699663702");
int endTimeI = NumKit.checkInt("1699663703");
int difference = endTimeI - firstTimeI;
// Convert seconds to Duration
java.time.Duration duration = java.time.Duration.ofSeconds(difference);
// Format the duration using Hutool
String formattedDuration = DateUtil.formatBetween(duration.toMillis());
System.out.println("Formatted Duration: " + formattedDuration);
}
}

@ -40,15 +40,14 @@ public class TransitHuntersUserRecordController extends BaseController {
public TableDataInfo<TransitHuntersUserRecord> list(TransitHuntersUserRecord transitHuntersUserRecord) { public TableDataInfo<TransitHuntersUserRecord> list(TransitHuntersUserRecord transitHuntersUserRecord) {
startPage(); startPage();
List<TransitHuntersUserRecord> list = new ArrayList<>(); QueryWrapper<TransitHuntersUserRecord> queryWrapper = new QueryWrapper<>(transitHuntersUserRecord);
if(transitHuntersUserRecord.getFirstTime() != null && transitHuntersUserRecord.getEndTime() != null){
list = transitHuntersUserRecordService.list(new QueryWrapper<>(transitHuntersUserRecord) if (transitHuntersUserRecord.getFirstTime() != null && transitHuntersUserRecord.getEndTime() != null) {
.between("partition_field", transitHuntersUserRecord.getFirstTime(), transitHuntersUserRecord.getEndTime()) queryWrapper.between("partition_field", transitHuntersUserRecord.getFirstTime(), transitHuntersUserRecord.getEndTime());
);
}else {
list = transitHuntersUserRecordService.list(new QueryWrapper<>(transitHuntersUserRecord));
} }
List<TransitHuntersUserRecord> list = transitHuntersUserRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -2,15 +2,14 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.TransitHuntersUserRecord;
import com.ruoyi.database.domain.TransitHuntersVehicleRecord;
import com.ruoyi.database.service.TransitHuntersVehicleRecordService;
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;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitHuntersVehicleRecord;
import com.ruoyi.database.service.TransitHuntersVehicleRecordService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -18,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -39,17 +37,14 @@ public class TransitHuntersVehicleRecordController extends BaseController {
@ApiOperation("查询非法狩猎人员车辆记录表") @ApiOperation("查询非法狩猎人员车辆记录表")
public TableDataInfo<TransitHuntersVehicleRecord> list(TransitHuntersVehicleRecord transitHuntersVehicleRecord) { public TableDataInfo<TransitHuntersVehicleRecord> list(TransitHuntersVehicleRecord transitHuntersVehicleRecord) {
startPage(); startPage();
// List<TransitHuntersVehicleRecord> list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord));
List<TransitHuntersVehicleRecord> list = new ArrayList<>(); QueryWrapper<TransitHuntersVehicleRecord> queryWrapper = new QueryWrapper<>(transitHuntersVehicleRecord);
if(transitHuntersVehicleRecord.getFirstTime() != null && transitHuntersVehicleRecord.getEndTime() != null){ if (transitHuntersVehicleRecord.getFirstTime() != null && transitHuntersVehicleRecord.getEndTime() != null) {
list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord) queryWrapper.between("partition_field", transitHuntersVehicleRecord.getFirstTime(), transitHuntersVehicleRecord.getEndTime());
.between("partition_field", transitHuntersVehicleRecord.getFirstTime(), transitHuntersVehicleRecord.getEndTime())
);
}else {
list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord));
} }
List<TransitHuntersVehicleRecord> list = transitHuntersVehicleRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -2,14 +2,14 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.TransitImpUserRecord;
import com.ruoyi.database.service.TransitImpUserRecordService;
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;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitImpUserRecord;
import com.ruoyi.database.service.TransitImpUserRecordService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -37,7 +37,12 @@ public class TransitImpUserRecordController extends BaseController {
@ApiOperation("查询涉稳列管人员人脸抓拍记录表") @ApiOperation("查询涉稳列管人员人脸抓拍记录表")
public TableDataInfo<TransitImpUserRecord> list(TransitImpUserRecord transitImpUserRecord) { public TableDataInfo<TransitImpUserRecord> list(TransitImpUserRecord transitImpUserRecord) {
startPage(); startPage();
List<TransitImpUserRecord> list = transitImpUserRecordService.list(new QueryWrapper<>(transitImpUserRecord));
QueryWrapper<TransitImpUserRecord> queryWrapper = new QueryWrapper<>(transitImpUserRecord);
if (transitImpUserRecord.getFirstTime() != null && transitImpUserRecord.getEndTime() != null) {
queryWrapper.between("partition_field", transitImpUserRecord.getFirstTime(), transitImpUserRecord.getEndTime());
}
List<TransitImpUserRecord> list = transitImpUserRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -2,14 +2,14 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.TransitImpVehicleRecord;
import com.ruoyi.database.service.TransitImpVehicleRecordService;
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;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitImpVehicleRecord;
import com.ruoyi.database.service.TransitImpVehicleRecordService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -37,7 +37,11 @@ public class TransitImpVehicleRecordController extends BaseController {
@ApiOperation("查询重点人车辆记录表") @ApiOperation("查询重点人车辆记录表")
public TableDataInfo<TransitImpVehicleRecord> list(TransitImpVehicleRecord transitImpVehicleRecord) { public TableDataInfo<TransitImpVehicleRecord> list(TransitImpVehicleRecord transitImpVehicleRecord) {
startPage(); startPage();
List<TransitImpVehicleRecord> list = transitImpVehicleRecordService.list(new QueryWrapper<>(transitImpVehicleRecord)); QueryWrapper<TransitImpVehicleRecord> queryWrapper = new QueryWrapper<>(transitImpVehicleRecord);
if (transitImpVehicleRecord.getFirstTime() != null && transitImpVehicleRecord.getEndTime() != null) {
queryWrapper.between("partition_field", transitImpVehicleRecord.getFirstTime(), transitImpVehicleRecord.getEndTime());
}
List<TransitImpVehicleRecord> list = transitImpVehicleRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -2,14 +2,14 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.TransitUserRecord;
import com.ruoyi.database.service.TransitUserRecordService;
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;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitUserRecord;
import com.ruoyi.database.service.TransitUserRecordService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -37,7 +37,11 @@ public class TransitUserRecordController extends BaseController {
@ApiOperation("查询人脸记录表") @ApiOperation("查询人脸记录表")
public TableDataInfo<TransitUserRecord> list(TransitUserRecord transitUserRecord) { public TableDataInfo<TransitUserRecord> list(TransitUserRecord transitUserRecord) {
startPage(); startPage();
List<TransitUserRecord> list = transitUserRecordService.list(new QueryWrapper<>(transitUserRecord)); QueryWrapper<TransitUserRecord> queryWrapper = new QueryWrapper<>(transitUserRecord);
if (transitUserRecord.getFirstTime() != null && transitUserRecord.getEndTime() != null) {
queryWrapper.between("partition_field", transitUserRecord.getFirstTime(), transitUserRecord.getEndTime());
}
List<TransitUserRecord> list = transitUserRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -2,14 +2,14 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.TransitVehicleRecord;
import com.ruoyi.database.service.TransitVehicleRecordService;
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;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.database.domain.TransitVehicleRecord;
import com.ruoyi.database.service.TransitVehicleRecordService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -37,7 +37,11 @@ public class TransitVehicleRecordController extends BaseController {
@ApiOperation("查询车辆记录表") @ApiOperation("查询车辆记录表")
public TableDataInfo<TransitVehicleRecord> list(TransitVehicleRecord transitVehicleRecord) { public TableDataInfo<TransitVehicleRecord> list(TransitVehicleRecord transitVehicleRecord) {
startPage(); startPage();
List<TransitVehicleRecord> list = transitVehicleRecordService.list(new QueryWrapper<>(transitVehicleRecord)); QueryWrapper<TransitVehicleRecord> queryWrapper = new QueryWrapper<>(transitVehicleRecord);
if (transitVehicleRecord.getFirstTime() != null && transitVehicleRecord.getEndTime() != null) {
queryWrapper.between("partition_field", transitVehicleRecord.getFirstTime(), transitVehicleRecord.getEndTime());
}
List<TransitVehicleRecord> list = transitVehicleRecordService.list(queryWrapper);
return getDataTable(list); return getDataTable(list);
} }

@ -16,7 +16,7 @@ import lombok.EqualsAndHashCode;
* (MetaFishingBoatInfo)Domain * (MetaFishingBoatInfo)Domain
* *
* @author makejava * @author makejava
* @since 2023-12-02 11:30:28 * @since 2023-12-15 15:23:37
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ -32,10 +32,24 @@ public class MetaFishingBoatInfo extends BaseEntity {
private Long id; private Long id;
/** /**
* *
*/ */
@ApiModelProperty("渔船类型") @ApiModelProperty("码头编码")
@Excel(name = "渔船类型") @Excel(name = "码头编码")
private String wharfCode;
/**
*
*/
@ApiModelProperty("码头名称")
@Excel(name = "码头名称")
private String wharfName;
/**
*
*/
@ApiModelProperty("船舶类型")
@Excel(name = "船舶类型")
private String fishingBoatTypeName; private String fishingBoatTypeName;
/** /**
@ -87,6 +101,20 @@ public class MetaFishingBoatInfo extends BaseEntity {
@Excel(name = "船主姓名") @Excel(name = "船主姓名")
private String crewName; private String crewName;
/**
*
*/
@ApiModelProperty("船主证件号码")
@Excel(name = "船主证件号码")
private String crewIdCard;
/**
*
*/
@ApiModelProperty("船主联系方式")
@Excel(name = "船主联系方式")
private String crewPhone;
/** /**
* *
*/ */
@ -101,4 +129,11 @@ public class MetaFishingBoatInfo extends BaseEntity {
@Excel(name = "派出所名称") @Excel(name = "派出所名称")
private String policeStationName; private String policeStationName;
/**
*
*/
@ApiModelProperty("船舶地段名称")
@Excel(name = "船舶地段名称")
private String fishingBoatLocationName;
} }

@ -1,8 +1,9 @@
package com.ruoyi.database.domain; package com.ruoyi.database.domain;
import java.util.Date; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -14,7 +15,7 @@ import lombok.EqualsAndHashCode;
* (MetaHuntersInfo)Domain * (MetaHuntersInfo)Domain
* *
* @author makejava * @author makejava
* @since 2023-12-09 17:22:06 * @since 2023-12-14 13:57:52
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ -29,21 +30,20 @@ public class MetaHuntersInfo extends BaseEntity {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/**
*
*/
@ApiModelProperty("照片")
@Excel(name = "照片")
private String userPic;
/** /**
* *
*/ */
@ApiModelProperty("姓名") @ApiModelProperty("姓名")
@Excel(name = "姓名") @Excel(name = "姓名")
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String hunterName; private String hunterName;
/**
*
*/
@ApiModelProperty("图片")
@Excel(name = "图片")
private String userPic;
/** /**
* *
*/ */
@ -58,7 +58,6 @@ public class MetaHuntersInfo extends BaseEntity {
*/ */
@ApiModelProperty("联系方式") @ApiModelProperty("联系方式")
@Excel(name = "联系方式") @Excel(name = "联系方式")
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String phone; private String phone;
/** /**
@ -66,7 +65,6 @@ public class MetaHuntersInfo extends BaseEntity {
*/ */
@ApiModelProperty("证件号码") @ApiModelProperty("证件号码")
@Excel(name = "证件号码") @Excel(name = "证件号码")
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String idCard; private String idCard;
/** /**
@ -81,7 +79,6 @@ public class MetaHuntersInfo extends BaseEntity {
*/ */
@ApiModelProperty("户籍地址详情") @ApiModelProperty("户籍地址详情")
@Excel(name = "户籍地址详情") @Excel(name = "户籍地址详情")
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String houseHoldAddress; private String houseHoldAddress;
/** /**
@ -89,7 +86,6 @@ public class MetaHuntersInfo extends BaseEntity {
*/ */
@ApiModelProperty("现住地详址") @ApiModelProperty("现住地详址")
@Excel(name = "现住地详址") @Excel(name = "现住地详址")
@TableField(condition = SqlCondition.LIKE_RIGHT)
private String habitationAddress; private String habitationAddress;
/** /**
@ -131,4 +127,9 @@ public class MetaHuntersInfo extends BaseEntity {
@Excel(name = "登记时间") @Excel(name = "登记时间")
private String registrationTime; private String registrationTime;
@ApiModelProperty("人员类别")
@Excel(name = "人员类别")
private Integer huntersUserType;
@TableField(exist = false)
private String huntersUserTypeCn;
} }

@ -16,7 +16,7 @@ import lombok.EqualsAndHashCode;
* (MetaWharfInfo)Domain * (MetaWharfInfo)Domain
* *
* @author makejava * @author makejava
* @since 2023-12-12 09:01:15 * @since 2023-12-15 15:23:37
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ -74,14 +74,17 @@ public class MetaWharfInfo extends BaseEntity {
private String wharfOwnerIdCard; private String wharfOwnerIdCard;
/** /**
* *
*/ */
@ApiModelProperty("经度") @ApiModelProperty("纬度")
private String longitude; @Excel(name = "纬度")
private Double latitude;
/** /**
* *
*/ */
@ApiModelProperty("纬度") @ApiModelProperty("经度")
private String latitude; @Excel(name = "经度")
private Double longitude;
} }

@ -0,0 +1,236 @@
package com.ruoyi.database.domain;
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.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;
/**
* (TransitHuntersUserModelRecord)Domain
*
* @author makejava
* @since 2023-12-14 13:59:05
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "transit_hunters_user_model_record")
@ApiModel(value = "TransitHuntersUserModelRecord", description = "非法狩猎人员模型记录表")
public class TransitHuntersUserModelRecord extends BaseEntity {
/**
*
*/
@ApiModelProperty("主键")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
*
*/
@ApiModelProperty("车主姓名")
@Excel(name = "车主姓名")
private String huntersUserName;
/**
*
*/
@ApiModelProperty("证件号码")
@Excel(name = "证件号码")
private String huntersUserIdCard;
/**
*
*/
@ApiModelProperty("狩猎人员类别")
@Excel(name = "狩猎人员类别")
private Integer huntersUserType;
@TableField(exist = false)
private String huntersUserTypeCn;
/**
*
*/
@ApiModelProperty("预警类型")
@Excel(name = "预警类型")
private Integer warningType;
@TableField(exist = false)
private String warningTypeCn;
/**
*
*/
@ApiModelProperty("预警级别")
@Excel(name = "预警级别")
private Integer warningLevel;
@TableField(exist = false)
private String warningLevelCn;
/**
*
*/
@ApiModelProperty("预警时间")
@Excel(name = "预警时间")
private String warningTime;
/**
*
*/
@ApiModelProperty("预警内容")
@Excel(name = "预警内容")
private String warningContent;
/**
*
*/
@ApiModelProperty("首次抓拍全景图")
@Excel(name = "首次抓拍全景图")
private String firstGlobalPic;
/**
*
*/
@ApiModelProperty("首次抓拍人脸图")
@Excel(name = "首次抓拍人脸图")
private String firstUserPic;
/**
*
*/
@ApiModelProperty("首次经过时间")
@Excel(name = "首次经过时间")
private Long firstPassTime;
@TableField(exist = false)
private String firstPassTimeCn;
/**
*
*/
@ApiModelProperty("首次抓拍点位编码")
@Excel(name = "首次抓拍点位编码")
private String firstDeviceCode;
/**
*
*/
@ApiModelProperty("首次抓拍经过位置")
@Excel(name = "首次抓拍经过位置")
private String firstDeviceAddress;
/**
*
*/
@ApiModelProperty("首次抓拍点位经度")
@Excel(name = "首次抓拍点位经度")
private Double firstLongitude;
/**
*
*/
@ApiModelProperty("首次抓拍点位纬度")
@Excel(name = "首次抓拍点位纬度")
private Double firstLatitude;
/**
*
*/
@ApiModelProperty("末次抓拍全景图")
@Excel(name = "末次抓拍全景图")
private String endGlobalPic;
/**
*
*/
@ApiModelProperty("末次经过时间")
@Excel(name = "末次经过时间")
private Long endPassTime;
@TableField(exist = false)
private String endPassTimeCn;
/**
*
*/
@ApiModelProperty("末次抓拍人脸图")
@Excel(name = "末次抓拍人脸图")
private String endUserPic;
/**
*
*/
@ApiModelProperty("末次抓拍点位编码")
@Excel(name = "末次抓拍点位编码")
private String endDeviceCode;
/**
*
*/
@ApiModelProperty("末次抓拍经过位置")
@Excel(name = "末次抓拍经过位置")
private String endDeviceAddress;
/**
*
*/
@ApiModelProperty("末次抓拍点位经度")
@Excel(name = "末次抓拍点位经度")
private Double endLongitude;
/**
*
*/
@ApiModelProperty("末次抓拍点位纬度")
@Excel(name = "末次抓拍点位纬度")
private Double endLatitude;
/**
*
*/
@ApiModelProperty("抓拍次数")
@Excel(name = "抓拍次数")
private Integer captureFrequency;
@TableField(exist = false)
private String captureFrequencyCn;
/**
*
*/
@ApiModelProperty("户籍地派出所编码")
@Excel(name = "户籍地派出所编码")
private String houseHoldPoliceStationCode;
/**
*
*/
@ApiModelProperty("户籍地派出所名称")
@Excel(name = "户籍地派出所名称")
private String houseHoldPoliceStationName;
/**
*
*/
@ApiModelProperty("现住地派出所编码")
@Excel(name = "现住地派出所编码")
private String habitationPoliceStationCode;
/**
*
*/
@ApiModelProperty("现住地派出所名称")
@Excel(name = "现住地派出所名称")
private String habitationPoliceStationName;
/**
*
*/
@ApiModelProperty("预警时间(分区)")
@Excel(name = "预警时间(分区)")
private Date partitionField;
}

@ -2,9 +2,7 @@ package com.ruoyi.database.domain;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -36,6 +34,7 @@ public class TransitImpUserRecord extends BaseEntity {
*/ */
@ApiModelProperty("设备编码") @ApiModelProperty("设备编码")
@Excel(name = "设备编码") @Excel(name = "设备编码")
@TableField(condition = SqlCondition.LIKE)
private String deviceCode; private String deviceCode;
/** /**

@ -2,9 +2,7 @@ package com.ruoyi.database.domain;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
@ -37,6 +35,7 @@ public class TransitImpVehicleRecord extends BaseEntity {
*/ */
@ApiModelProperty("设备编码") @ApiModelProperty("设备编码")
@Excel(name = "设备编码") @Excel(name = "设备编码")
@TableField(condition = SqlCondition.LIKE)
private String deviceCode; private String deviceCode;
/** /**

@ -30,14 +30,14 @@ public interface MetaRealEstateInfoMapper extends BaseMapper<MetaRealEstateInfo>
")") ")")
int countRentalHousing(@Param("bean") MetaRealEstateInfo bean); int countRentalHousing(@Param("bean") MetaRealEstateInfo bean);
@Select("select * from ( " + @Select("select *,count(1) count from ( " +
"SELECT " + "SELECT " +
" CASE " + " CASE " +
" WHEN CONCAT(real_estate_brief_address, building_name) REGEXP '[0-9]$' THEN CONCAT(real_estate_brief_address, building_name, '幢') " + " WHEN CONCAT(real_estate_brief_address, building_name) REGEXP '[0-9]$' THEN CONCAT(real_estate_brief_address, building_name, '幢') " +
" ELSE CONCAT(real_estate_brief_address, building_name) " + " ELSE CONCAT(real_estate_brief_address, building_name) " +
" END AS real_estate_brief_address, " + " END AS real_estate_brief_address, " +
" longitude, " + " longitude, " +
" latitude,count(1) count " + " latitude " +
"FROM meta_real_estate_info where real_estate_brief_address !='' and longitude!=0 " + "FROM meta_real_estate_info where real_estate_brief_address !='' and longitude!=0 " +
") a group by a.real_estate_brief_address") ") a group by a.real_estate_brief_address")
List<BuildEstateInfoVo> buildLocationStatistics(); List<BuildEstateInfoVo> buildLocationStatistics();

@ -0,0 +1,16 @@
package com.ruoyi.database.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.database.domain.TransitHuntersUserModelRecord;
import org.apache.ibatis.annotations.Mapper;
/**
* (TransitHuntersUserModelRecord)Mapper
*
* @author makejava
* @since 2023-12-14 13:59:05
*/
@Mapper
public interface TransitHuntersUserModelRecordMapper extends BaseMapper<TransitHuntersUserModelRecord> {
}

@ -0,0 +1,32 @@
package com.ruoyi.database.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.database.domain.TransitHuntersUserModelRecord;
import java.util.List;
/**
* (TransitHuntersUserModelRecord)Service
*
* @author makejava
* @since 2023-12-14 13:59:04
*/
public interface TransitHuntersUserModelRecordService extends IService<TransitHuntersUserModelRecord> {
/**
*
*
* @param transitHuntersUserModelRecord
* @return
*/
boolean insertOrUpdate(TransitHuntersUserModelRecord transitHuntersUserModelRecord);
/**
*
*
* @param list
* @return
*/
Object importData(List<TransitHuntersUserModelRecord> list);
}

@ -0,0 +1,54 @@
package com.ruoyi.database.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.database.domain.TransitHuntersUserModelRecord;
import com.ruoyi.database.mapper.TransitHuntersUserModelRecordMapper;
import com.ruoyi.database.service.TransitHuntersUserModelRecordService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* (TransitHuntersUserModelRecord)ServiceImpl
*
* @author makejava
* @since 2023-12-14 13:59:04
*/
@Service
public class TransitHuntersUserModelRecordServiceImpl extends ServiceImpl<TransitHuntersUserModelRecordMapper, TransitHuntersUserModelRecord> implements TransitHuntersUserModelRecordService {
@Override
public boolean insertOrUpdate(TransitHuntersUserModelRecord transitHuntersUserModelRecord) {
return false;
}
@Override
public Object importData(List<TransitHuntersUserModelRecord> list) {
int successNum = 0;
int failureNum = 0;
StringBuilder successMsg = new StringBuilder();
StringBuilder failureMsg = new StringBuilder();
for (TransitHuntersUserModelRecord transitHuntersUserModelRecord : list) {
try {
insertOrUpdate(transitHuntersUserModelRecord);
successNum++;
successMsg.append(StrUtil.format("<br/>{}、待替换 {} 导入成功", successNum, "待替换"));
} catch (Exception e) {
failureNum++;
failureMsg.append(StrUtil.format("<br/>{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage()));
}
}
if (failureNum > 0) {
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
throw new ServiceException(failureMsg.toString());
} else {
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
return successMsg.toString();
}
}
}

@ -52,14 +52,14 @@ public class DictionaryInterceptor implements Interceptor {
} }
// 判断字段名是否为passTime // 判断字段名是否为passTime
if (StrUtil.equals(field.getName(), "passTime")) { if (StrUtil.equals(field.getName(), "passTime") || StrUtil.equals(field.getName(), "firstPassTime")
|| StrUtil.equals(field.getName(), "endPassTime") ) {
field.setAccessible(true); field.setAccessible(true);
Long passTime = (Long) field.get(obj); Long passTime = (Long) field.get(obj);
try { try {
ReflectUtil.setFieldValue(obj, field.getName() + "Cn", DateUtil.format(DateUtil.date(passTime * 1000), DatePattern.NORM_DATETIME_PATTERN)); ReflectUtil.setFieldValue(obj, field.getName() + "Cn", DateUtil.format(DateUtil.date(passTime * 1000), DatePattern.NORM_DATETIME_PATTERN));
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }
if (field.getName().equals("structuredCameraType")) { if (field.getName().equals("structuredCameraType")) {

Loading…
Cancel
Save