From 47aff1c05c4fdf587ed0a13b5e0d4a823560f236 Mon Sep 17 00:00:00 2001 From: fengchunyu Date: Wed, 13 Dec 2023 09:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=BF=E6=B5=B7=E5=B9=B3=E5=8F=B0=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=BF=AD=E4=BB=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BigScreenController.java | 380 ++++++++++++++++-- .../PerceptionDeviceController.java | 121 ++++++ .../controller/PoachingController.java | 89 ++++ .../business/domain/vo/BuildEstateInfoVo.java | 43 ++ .../business/domain/vo/BuildInfoActualVo.java | 63 +++ .../domain/vo/BuildInformationVo.java | 51 +++ .../domain/vo/BuildUserInformationVo.java | 33 ++ .../business/domain/vo/DevopsVideoInfoVo.java | 145 +++++++ .../ruoyi/business/domain/vo/HomeInfoVo.java | 18 + .../domain/vo/HumanVehicleStatisticsVo.java | 29 ++ .../ruoyi/business/domain/vo/PoachingVo.java | 30 ++ .../controller/MetaHuntersInfoController.java | 106 +++++ .../controller/MetaPortInfoController.java | 95 +++++ .../MetaRealEstateInfoController.java | 95 +++++ .../MetaRentalHousingInfoController.java | 95 +++++ .../controller/MetaWharfInfoController.java | 95 +++++ .../TransitHuntersUserRecordController.java | 106 +++++ ...TransitHuntersVehicleRecordController.java | 107 +++++ .../TransitImpUserRecordController.java | 95 +++++ .../TransitImpVehicleRecordController.java | 95 +++++ .../TransitUserRecordController.java | 95 +++++ .../TransitVehicleRecordController.java | 95 +++++ .../database/domain/DevopsDeviceInfo.java | 7 +- .../database/domain/DevopsDeviceStatus.java | 7 +- .../database/domain/DevopsVideoInfo.java | 7 +- .../database/domain/DevopsVideoStatus.java | 21 +- .../database/domain/MetaActualUserInfo.java | 11 + .../database/domain/MetaHuntersInfo.java | 127 ++++++ .../database/domain/MetaImpUserInfo.java | 4 + .../ruoyi/database/domain/MetaPortInfo.java | 69 ++++ .../database/domain/MetaRealEstateInfo.java | 104 +++++ .../domain/MetaRentalHousingInfo.java | 225 +++++++++++ .../ruoyi/database/domain/MetaWharfInfo.java | 76 ++++ .../domain/TransitHuntersUserRecord.java | 119 ++++++ .../domain/TransitHuntersVehicleRecord.java | 127 ++++++ .../database/domain/TransitImpUserRecord.java | 153 +++++++ .../domain/TransitImpVehicleRecord.java | 162 ++++++++ .../database/domain/TransitUserRecord.java | 262 ++++++++++++ .../database/domain/TransitVehicleRecord.java | 295 ++++++++++++++ .../mapper/DevopsVideoInfoMapper.java | 10 + .../mapper/DevopsVideoStatusMapper.java | 4 + .../database/mapper/MetaAlarmInfoMapper.java | 2 +- .../mapper/MetaHuntersInfoMapper.java | 16 + .../database/mapper/MetaPortInfoMapper.java | 16 + .../mapper/MetaRealEstateInfoMapper.java | 45 +++ .../mapper/MetaRentalHousingInfoMapper.java | 16 + .../database/mapper/MetaWharfInfoMapper.java | 16 + .../TransitHuntersUserRecordMapper.java | 16 + .../TransitHuntersVehicleRecordMapper.java | 16 + .../mapper/TransitImpUserRecordMapper.java | 16 + .../mapper/TransitImpVehicleRecordMapper.java | 16 + .../mapper/TransitUserRecordMapper.java | 16 + .../mapper/TransitVehicleRecordMapper.java | 16 + .../service/DevopsVideoInfoService.java | 3 + .../service/DevopsVideoStatusService.java | 2 + .../service/MetaHuntersInfoService.java | 32 ++ .../database/service/MetaPortInfoService.java | 32 ++ .../service/MetaRealEstateInfoService.java | 41 ++ .../service/MetaRentalHousingInfoService.java | 32 ++ .../service/MetaWharfInfoService.java | 32 ++ .../TransitHuntersUserRecordService.java | 32 ++ .../TransitHuntersVehicleRecordService.java | 32 ++ .../service/TransitImpUserRecordService.java | 32 ++ .../TransitImpVehicleRecordService.java | 32 ++ .../service/TransitUserRecordService.java | 32 ++ .../service/TransitVehicleRecordService.java | 32 ++ .../impl/DevopsVideoInfoServiceImpl.java | 153 ++++--- .../impl/DevopsVideoStatusServiceImpl.java | 11 + .../impl/MetaHuntersInfoServiceImpl.java | 54 +++ .../service/impl/MetaPortInfoServiceImpl.java | 54 +++ .../impl/MetaRealEstateInfoServiceImpl.java | 80 ++++ .../MetaRentalHousingInfoServiceImpl.java | 54 +++ .../impl/MetaWharfInfoServiceImpl.java | 54 +++ .../TransitHuntersUserRecordServiceImpl.java | 54 +++ ...ransitHuntersVehicleRecordServiceImpl.java | 54 +++ .../impl/TransitImpUserRecordServiceImpl.java | 54 +++ .../TransitImpVehicleRecordServiceImpl.java | 54 +++ .../impl/TransitUserRecordServiceImpl.java | 54 +++ .../impl/TransitVehicleRecordServiceImpl.java | 54 +++ .../interceptor/DictionaryInterceptor.java | 30 ++ .../ruoyi/interceptor/EncryptInterceptor.java | 200 ++++----- .../main/resources/mybatis/mybatis-config.xml | 4 +- ruoyi-ui/vue.config.js | 4 +- 83 files changed, 5252 insertions(+), 214 deletions(-) create mode 100644 gather-app/src/main/java/com/ruoyi/business/controller/PerceptionDeviceController.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildEstateInfoVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInfoActualVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInformationVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildUserInformationVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/DevopsVideoInfoVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/HomeInfoVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/HumanVehicleStatisticsVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/business/domain/vo/PoachingVo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaPortInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaRealEstateInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaRentalHousingInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaWharfInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersVehicleRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaPortInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaRealEstateInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaRentalHousingInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersVehicleRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitUserRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/TransitVehicleRecord.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaHuntersInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaRealEstateInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaRentalHousingInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaWharfInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersUserRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersVehicleRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpUserRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpVehicleRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitUserRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/TransitVehicleRecordMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaHuntersInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaPortInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaRealEstateInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaRentalHousingInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaWharfInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersUserRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersVehicleRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitImpUserRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitImpVehicleRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitUserRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/TransitVehicleRecordService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaHuntersInfoServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortInfoServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRealEstateInfoServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRentalHousingInfoServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaWharfInfoServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersUserRecordServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersVehicleRecordServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpUserRecordServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpVehicleRecordServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitUserRecordServiceImpl.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/TransitVehicleRecordServiceImpl.java 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 ce0df27..220b243 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 @@ -1,26 +1,28 @@ package com.ruoyi.business.controller; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.business.domain.vo.*; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.StringKit; -import com.ruoyi.database.domain.MetaActualUserInfo; -import com.ruoyi.database.domain.MetaAlarmInfo; -import com.ruoyi.database.domain.MetaImpUserInfo; -import com.ruoyi.database.domain.MetaPoliceStationInfo; +import com.ruoyi.database.domain.*; import com.ruoyi.database.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Date; import java.util.List; import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; /** * 大屏查询接口 @@ -40,8 +42,13 @@ public class BigScreenController extends BaseController { private final MetaPoliceOfficeInfoService policeOfficeInfoService; private final MetaPoliceStationInfoService policeStationInfoService; private final MetaAlarmInfoService alarmInfoService; - - + private final MetaRealEstateInfoService realEstateInfoService; + private final DevopsVideoStatusService videoStatusService; + private final MetaRentalHousingInfoService housingInfoService; + private final MetaWharfInfoService wharfInfoService; + private final MetaPortInfoService portInfoService; + private final MetaFishingBoatInfoService fishingBoatInfoService; + private final DevopsVideoInfoService videoInfoService; @PostMapping("/overviewResources") @ApiOperation("资源概况") @@ -52,11 +59,11 @@ public class BigScreenController extends BaseController { queryLdrkWrapper.eq("actual_user_type", 102); int actualUserLdrkCount = actualUserInfoService.count(queryLdrkWrapper); //实有人口总数 - QueryWrapper querySyrkWrapper = new QueryWrapper<>(); - querySyrkWrapper.ne("actual_user_type", 102); - int actualUserSyrkCount = actualUserInfoService.count(querySyrkWrapper); - //实有房屋总数 todo 等表创建好了之后 - int countSyfw = 20000; +// QueryWrapper querySyrkWrapper = new QueryWrapper<>(); +// querySyrkWrapper.ne("actual_user_type", 101); + int actualUserSyrkCount = actualUserInfoService.count(); + //实有房屋总数 + int countSyfw = realEstateInfoService.countSyfw(new MetaRealEstateInfo()); //实有单位总数 int countSydw = actualUnitInfoService.count(); @@ -81,35 +88,35 @@ public class BigScreenController extends BaseController { // 涉稳人员 QueryWrapper swryQueryWrapper = new QueryWrapper<>(); - swryQueryWrapper.like("imp_user_sub_type", "0101000000"); + swryQueryWrapper.like("imp_user_sub_type", "0101"); int swryCount = impUserInfoService.count(swryQueryWrapper); // 涉军访人员 QueryWrapper sjfryQueryWrapper = new QueryWrapper<>(); - sjfryQueryWrapper.like("imp_user_sub_type", "0102000000"); + sjfryQueryWrapper.like("imp_user_sub_type", "0102"); int sjfryCount = impUserInfoService.count(sjfryQueryWrapper); // 治安管控人员 QueryWrapper zagkryQueryWrapper = new QueryWrapper<>(); - zagkryQueryWrapper.like("imp_user_sub_type", "0105000000"); + zagkryQueryWrapper.like("imp_user_sub_type", "0105"); int zagkryCount = impUserInfoService.count(zagkryQueryWrapper); // 民代幼教师群体 QueryWrapper mdyjsqtQueryWrapper = new QueryWrapper<>(); - mdyjsqtQueryWrapper.like("imp_user_sub_type", "0106000000"); + mdyjsqtQueryWrapper.like("imp_user_sub_type", "0106"); int mdyjsqtCount = impUserInfoService.count(mdyjsqtQueryWrapper); // 内保重点人员 QueryWrapper nbzdryQueryWrapper = new QueryWrapper<>(); - nbzdryQueryWrapper.like("imp_user_sub_type", "0107000000"); + nbzdryQueryWrapper.like("imp_user_sub_type", "0107"); int nbzdryCount = impUserInfoService.count(nbzdryQueryWrapper); // 涉信访人员 QueryWrapper sxfryQueryWrapper = new QueryWrapper<>(); - sxfryQueryWrapper.like("imp_user_sub_type", "0109000000"); + sxfryQueryWrapper.like("imp_user_sub_type", "0109"); int sxfryCount = impUserInfoService.count(sxfryQueryWrapper); // 涉众型经济犯罪涉稳人员 QueryWrapper szxjjfzswryQueryWrapper = new QueryWrapper<>(); - szxjjfzswryQueryWrapper.like("imp_user_sub_type", "0110000000"); + szxjjfzswryQueryWrapper.like("imp_user_sub_type", "0110"); int szxjjfzswryCount = impUserInfoService.count(szxjjfzswryQueryWrapper); // 其他利益群体 QueryWrapper qtlyqtQueryWrapper = new QueryWrapper<>(); - qtlyqtQueryWrapper.like("imp_user_sub_type", "0103000000"); + qtlyqtQueryWrapper.like("imp_user_sub_type", "0103"); int qtlyqtCount = impUserInfoService.count(qtlyqtQueryWrapper); int totalCount = swryCount + sjfryCount + zagkryCount + mdyjsqtCount + nbzdryCount + sxfryCount + szxjjfzswryCount + qtlyqtCount; @@ -122,6 +129,16 @@ public class BigScreenController extends BaseController { double szxjjfzswryPercentage = (double) szxjjfzswryCount / totalCount * 100; double qtlyqtPercentage = (double) qtlyqtCount / totalCount * 100; + // 检查 NaN 并替换为 0 + swryPercentage = Double.isNaN(swryPercentage) ? 0 : swryPercentage; + sjfryPercentage = Double.isNaN(sjfryPercentage) ? 0 : sjfryPercentage; + zagkryPercentage = Double.isNaN(zagkryPercentage) ? 0 : zagkryPercentage; + mdyjsqtPercentage = Double.isNaN(mdyjsqtPercentage) ? 0 : mdyjsqtPercentage; + nbzdryPercentage = Double.isNaN(nbzdryPercentage) ? 0 : nbzdryPercentage; + sxfryPercentage = Double.isNaN(sxfryPercentage) ? 0 : sxfryPercentage; + szxjjfzswryPercentage = Double.isNaN(szxjjfzswryPercentage) ? 0 : szxjjfzswryPercentage; + qtlyqtPercentage = Double.isNaN(qtlyqtPercentage) ? 0 : qtlyqtPercentage; + // Store the percentages as strings String swryPercentageString = String.format("%.0f%%", swryPercentage); String sjfryPercentageString = String.format("%.0f%%", sjfryPercentage); @@ -151,7 +168,6 @@ public class BigScreenController extends BaseController { } - @PostMapping("/policeForceDistribution") @ApiOperation("警力分布") public AjaxResult policeForceDistribution() { @@ -159,9 +175,9 @@ public class BigScreenController extends BaseController { //派出所信息表 int pcs = policeStationInfoService.count(); //警务室信息表 - int jws= policeOfficeInfoService.count(); - // todo 执法警员统计 gbs获取的数据中 在线的执法记录仪设备 - int countZfjy = 6234; + int jws = policeOfficeInfoService.count(); + // 执法警员统计 gbs获取的数据中 在线的执法记录仪设备 + int countZfjy = videoStatusService.getGbsListOnline(); PoliceForceDistributionVo bean = new PoliceForceDistributionVo(); bean.setPcsCount(StringKit.toString(pcs)); @@ -179,12 +195,23 @@ public class BigScreenController extends BaseController { @ApiOperation("涉海要素") public AjaxResult seaRelatedElements() { try { - //todo 先写死 没数据源 SeaRelatedElementsVo bean = new SeaRelatedElementsVo(); - bean.setGkCount(StringKit.toString("34")); - bean.setMtCount(StringKit.toString("32")); - bean.setCzCount(StringKit.toString("12")); + + //码头 + int wharfCount = wharfInfoService.count(); + //港口 + int portCount = portInfoService.count(); + //渔船 + int fishingBoatCount = fishingBoatInfoService.count(); + + //港口 + bean.setGkCount(StringKit.toString(portCount)); + //码头 + bean.setMtCount(StringKit.toString(wharfCount)); + //船只 + bean.setCzCount(StringKit.toString(fishingBoatCount)); + //船员 bean.setCyCount(StringKit.toString("121")); return AjaxResult.success(bean); @@ -199,7 +226,7 @@ public class BigScreenController extends BaseController { @ApiOperation("警情统计") public AjaxResult policeSituationStatistics() { try { - List metaAlarmInfos = alarmInfoService.selectTop3AlarmInfo(); + List metaAlarmInfos = alarmInfoService.selectTop3AlarmInfo(); return AjaxResult.success(metaAlarmInfos); } catch (Exception e) { logger.info(StringKit.toString(e)); @@ -209,13 +236,9 @@ public class BigScreenController extends BaseController { @PostMapping("/policeSituationStatisticsList") - @ApiOperation("警情统计列表") + @ApiOperation("警情统计列表,重点警情") public AjaxResult policeSituationStatisticsList() { try { -// LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); -// queryWrapper.orderByDesc(MetaAlarmInfo::getCreateTime); // Assuming ws_rksj is the field for sorting -// queryWrapper.last("LIMIT 100"); // Limit to 100 records - List metaAlarmInfos = alarmInfoService.listAlarmAndHandleAlarm(); return AjaxResult.success(metaAlarmInfos); @@ -225,4 +248,293 @@ public class BigScreenController extends BaseController { } } + @PostMapping("/realTimeAlarmSituation") + @ApiOperation("实时警情") + public AjaxResult realTimeAlarmSituation() { + try { + Date thirtyMinutesAgo = DateUtil.offsetMinute(new Date(), -30); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.gt("alarm_response_time", DateUtil.format(thirtyMinutesAgo, "yyyyMMddHHmmss")); + List metaAlarmInfos = alarmInfoService.list(queryWrapper); + return AjaxResult.success(metaAlarmInfos); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + + @PostMapping("/buildLocationStatistics") + @ApiOperation("楼栋信息:楼栋点位统计") + public AjaxResult buildLocationStatistics() { + try { + List buildEstateInfoVos = realEstateInfoService.buildLocationStatistics(); + return AjaxResult.success(buildEstateInfoVos); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + + @PostMapping("/buildingInformation") + @ApiOperation("楼栋信息") + public AjaxResult overviewResources(@ApiParam("楼栋地址") String para) { + try { + para = para.substring(0, para.indexOf("号")); + MetaRealEstateInfo estateInfo = new MetaRealEstateInfo(); + estateInfo.setRealEstateAddress(para); + MetaRealEstateInfo estateInfo1 = realEstateInfoService.listByLimit1(estateInfo); + return AjaxResult.success(estateInfo1); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/buildRealEstate") + @ApiOperation("楼栋信息:实有房屋统计") + public AjaxResult buildRealEstate(@ApiParam("楼栋地址") String para) { + try { + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like("real_estate_address", para); + int a = realEstateInfoService.count(queryWrapper); + + //todo 目前都是写死的 + BuildInformationVo buildInformationVo = new BuildInformationVo(); + buildInformationVo.setCount(StringKit.toString(a)); + + MetaRealEstateInfo metaPara = new MetaRealEstateInfo(); + metaPara.setRealEstateAddress(para); + int countRental = realEstateInfoService.countRentalHousing(metaPara); + buildInformationVo.setCzfCount(StringKit.toString(countRental)); + buildInformationVo.setQzfCount("0"); + buildInformationVo.setZzCount("0"); + buildInformationVo.setSpCount("0"); + buildInformationVo.setSzlyCount("0"); + buildInformationVo.setKzCount("0"); + + return AjaxResult.success(buildInformationVo); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/buildRealActual") + @ApiOperation("楼栋信息:实有人口统计") + public AjaxResult buildRealActual(@ApiParam("楼栋地址") String para) { + try { + + // 创建查询条件,使用模糊查询 + QueryWrapper queryWrapperEstate = new QueryWrapper<>(); + queryWrapperEstate.like("real_estate_address", para); // 你需要替换成实际的模糊查询条件 + // 执行查询 + List realEstateInfos = realEstateInfoService.list(queryWrapperEstate); + + // 提取符合条件的 realEstateAddress 字段 + List realEstateAddressList = realEstateInfos.stream() + .map(MetaRealEstateInfo::getRealEstateAddress) + .collect(Collectors.toList()); + + + // 创建查询条件,使用 in 条件 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.in("habitation_address", realEstateAddressList); + // 执行查询 + List lists = actualUserInfoService.list(queryWrapper); + +// QueryWrapper queryWrapper = new QueryWrapper<>(); +// queryWrapper.like("habitation_address", para); +// List lists = actualUserInfoService.list(queryWrapper); + + //人户一致 101 + //流动人口 102 + //人在户不在 124 + int actualType = 101; + List rhyzCount = filterListByType(lists, actualType); + actualType = 102; + List ldrkCount = filterListByType(lists, actualType); + actualType = 101; + List rzhbzCount = filterListByType(lists, actualType); + + + //todo 重点人需要关联表 + BuildInfoActualVo actualVo = new BuildInfoActualVo(); + actualVo.setCount(StringKit.toString(lists.size())); + actualVo.setRhyzCount(StringKit.toString(rhyzCount.size())); + actualVo.setRhbyzCount(StringKit.toString(rzhbzCount.size())); + actualVo.setHzrbzCount("0"); + actualVo.setJwryCount("0"); + actualVo.setZdryCount("0"); + actualVo.setGaryCount("0"); + actualVo.setCzryCount("0"); + actualVo.setZzryCount("0"); + actualVo.setLdCount(StringKit.toString(ldrkCount.size())); + + return AjaxResult.success(actualVo); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + private List filterListByType(List lists, int actualType) { + // 使用流筛选出 actualUserType 为 101 的结果 + List filteredList = lists.stream() + .filter(info -> info.getActualUserType() == actualType) + .collect(Collectors.toList()); + return filteredList; + } + + @PostMapping("/buildStructure") + @ApiOperation("楼栋信息:房屋结构") + public AjaxResult buildStructure(@ApiParam("楼栋地址") String para, @ApiParam("单元") String unit) { + try { + //获取到房屋数据的实际地址 + para = para.substring(0, para.indexOf("号")); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like("real_estate_address", para); + queryWrapper.eq("unit_name", unit); + List estateInfoList = realEstateInfoService.list(queryWrapper); + // 提取规则:如果home_name 是3位则取第一位当map中的键, + // 如果home_name是4位则取第二位当map中的键,如果低于3位或者大于4位则不取 +// Map> resultMap = estateInfoList.stream() +// .filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4) +// .collect(Collectors.groupingBy( +// info -> info.getHomeName().length() == 3 ? String.valueOf(info.getHomeName().charAt(0)) : +// String.valueOf(info.getHomeName().charAt(1)), +// Collectors.mapping(MetaRealEstateInfo::getHomeName, Collectors.toList()) +// )); + + Map> resultMap = estateInfoList.stream() + .filter(info -> info.getHomeName().length() >= 3 && info.getHomeName().length() <= 4) + .collect(Collectors.groupingBy( + info -> { + String homeName = info.getHomeName(); + return homeName.length() == 3 ? String.valueOf(homeName.charAt(0)) : + homeName.length() == 4 ? homeName.substring(0, 2) : null; + }, + Collectors.mapping(MetaRealEstateInfo::getHomeName, Collectors.toList()) + )); + + return AjaxResult.success(resultMap); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/buildInformation") + @ApiOperation("楼栋信息:户室信息") + public AjaxResult buildInformation(@ApiParam("楼栋地址") String para) { + try { + + QueryWrapper addQueryWrapper = new QueryWrapper<>(); + addQueryWrapper.eq("real_estate_address", para); + List realEstateInfos = realEstateInfoService.list(addQueryWrapper); + MetaRealEstateInfo estateInfo = new MetaRealEstateInfo(); + if (realEstateInfos != null && realEstateInfos.size() > 0) { + estateInfo = realEstateInfos.get(0); + } + + + BuildUserInformationVo buildUserInformationVo = new BuildUserInformationVo(); + HomeInfoVo homeInfoVo = new HomeInfoVo(); + //地址 + homeInfoVo.setAddress(para); + //网格 没有 + homeInfoVo.setGrid(""); + homeInfoVo.setType("住宅"); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("rental_housing_address", para); + long count = housingInfoService.count(queryWrapper); + //是否出租 + homeInfoVo.setIsRent(count > 0 ? "" : "出租"); + // + homeInfoVo.setPoliceDistrictCode(estateInfo.getPoliceDistrictCode()); + buildUserInformationVo.setHomeInfo(homeInfoVo); + + + QueryWrapper actualQueryWrapper = new QueryWrapper<>(); + actualQueryWrapper.eq("home_id", estateInfo == null ? null : estateInfo.getId()); + List actualUserInfos = actualUserInfoService.list(actualQueryWrapper); + + + if (actualUserInfos != null && actualUserInfos.size() > 0) { + // 使用流过滤 householder_relation 是 1 的数据 + List actHzUserInfos = actualUserInfos.stream() + .filter(userInfo -> "1".equals(StringKit.toString(userInfo.getHouseholderRelation()))) + .collect(Collectors.toList()); + if (actHzUserInfos != null && actHzUserInfos.size() > 0) { + //户主数据 + buildUserInformationVo.setActualUserInfo(actHzUserInfos.get(0)); + } + + List syrkUserInfos = actualUserInfos.stream() + .filter(userInfo -> "101".equals(StringKit.toString(userInfo.getActualUserType()))) + .collect(Collectors.toList()); + buildUserInformationVo.setUserInfos(syrkUserInfos); + } + + + // todo 目前没有户在人不在的数据 直接null + buildUserInformationVo.setHouseholdInUserInfos(null); + + // 使用流获取所有 idcard 字段 + List idcardList = actualUserInfos.stream() + .map(MetaActualUserInfo::getIdCard) + .collect(Collectors.toList()); + if (idcardList != null && idcardList.size() > 0) { + QueryWrapper impQueryWrapper = new QueryWrapper<>(); + impQueryWrapper.in("id_card", idcardList); + List impUserInfos = impUserInfoService.list(impQueryWrapper); + //重点人员 + buildUserInformationVo.setImpUserInfos(impUserInfos); + } + return AjaxResult.success(buildUserInformationVo); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + + private static List extractAndDistinctFloorNumbers(List estateInfoList) { + // 使用正则表达式匹配楼层信息 + Pattern pattern = Pattern.compile("\\d+"); + + // 提取楼层信息并去重 + List uniqueFloorNumbers = estateInfoList.stream() + .map(info -> { + Matcher matcher = pattern.matcher(info.getBuildingName()); + return matcher.find() ? Integer.parseInt(matcher.group()) : null; + }) + .filter(floorNumber -> floorNumber != null) + .distinct() + .collect(Collectors.toList()); + + return uniqueFloorNumbers; + } + + + @PostMapping("/policeVehicleList") + @ApiOperation("警车数据") + public AjaxResult policeVehicleList() { + try { + + + List videoInfos = videoInfoService.listPoliceVehicle(new DevopsVideoInfo()); + + + return AjaxResult.success(videoInfos); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + } diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/PerceptionDeviceController.java b/gather-app/src/main/java/com/ruoyi/business/controller/PerceptionDeviceController.java new file mode 100644 index 0000000..3723eff --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/controller/PerceptionDeviceController.java @@ -0,0 +1,121 @@ +package com.ruoyi.business.controller; + + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.business.domain.vo.HumanVehicleStatisticsVo; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.StringKit; +import com.ruoyi.database.domain.TransitImpUserRecord; +import com.ruoyi.database.domain.TransitImpVehicleRecord; +import com.ruoyi.database.service.TransitImpUserRecordService; +import com.ruoyi.database.service.TransitImpVehicleRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.time.LocalDate; +import java.util.Map; +import java.util.TreeMap; + +/** + * 大屏感知设备查询接口 + * + * @author makejava + * @since 2023-11-29 09:34:47 + */ +@Api(tags = "大屏感知设备查询接口") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/perceptionDevice") +public class PerceptionDeviceController extends BaseController { + + private final TransitImpUserRecordService userRecordService; + private final TransitImpVehicleRecordService vehicleRecordService; + + + @PostMapping("/humanVehicleStatistics") + @ApiOperation("人车统计") + public AjaxResult overviewResources() { + try { + // 人流量统计 + String todayDateString = DateUtil.today(); + QueryWrapper userQueryWrapper = new QueryWrapper<>(); + userQueryWrapper.eq("DATE(partition_field)", todayDateString); + int userCount = userRecordService.count(userQueryWrapper); + //车流量统计 + QueryWrapper vehicleQueryWrapper = new QueryWrapper<>(); + vehicleQueryWrapper.eq("DATE(partition_field)", todayDateString); + int vehicleCount = vehicleRecordService.count(vehicleQueryWrapper); + + HumanVehicleStatisticsVo bean = new HumanVehicleStatisticsVo(); + bean.setUserCount(StringKit.toString(userCount)); + bean.setVehicleCount(StringKit.toString(vehicleCount)); + + return AjaxResult.success(bean); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/humanTrafficStatistics") + @ApiOperation("人流量统计(前7天)") + public AjaxResult humanTrafficStatistics() { + try { + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + // 创建一个 TreeMap 用于存储每天的数据量 + Map dailyCountsMap = new TreeMap<>(); + // 循环迭代前7天 + for (int i = 0; i < 7; i++) { + LocalDate date = currentDate.minusDays(i); + // 构造查询条件 + QueryWrapper userQueryWrapper = new QueryWrapper<>(); + userQueryWrapper.between("partition_field", date, date.plusDays(1)); + // 查询当前日期的记录数据总数 + long userCount = userRecordService.count(userQueryWrapper); + // 存储结果到 TreeMap 中 + dailyCountsMap.put(date, userCount); + } + + return AjaxResult.success(dailyCountsMap); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/vehicleTrafficStatistics") + @ApiOperation("车流量统计(前7天)") + public AjaxResult vehicleTrafficStatistics() { + try { + // 获取当前日期 + LocalDate currentDate = LocalDate.now(); + // 创建一个 TreeMap 用于存储每天的数据量 + Map dailyCountsMap = new TreeMap<>(); + // 循环迭代前7天 + for (int i = 0; i < 7; i++) { + LocalDate date = currentDate.minusDays(i); + // 构造查询条件 + QueryWrapper vehicleQueryWrapper = new QueryWrapper<>(); + vehicleQueryWrapper.between("partition_field", date, date.plusDays(1)); + // 查询当前日期的记录数据总数 + long vehicleCount = vehicleRecordService.count(vehicleQueryWrapper); + // 存储结果到 TreeMap 中 + dailyCountsMap.put(date, vehicleCount); + } + + return AjaxResult.success(dailyCountsMap); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java b/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java new file mode 100644 index 0000000..4addc84 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/controller/PoachingController.java @@ -0,0 +1,89 @@ +package com.ruoyi.business.controller; + + +import com.ruoyi.business.domain.vo.PoachingVo; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.StringKit; +import com.ruoyi.database.service.DevopsDeviceInfoService; +import com.ruoyi.database.service.MetaHuntersInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.Map; + +/** + * 大屏查询接口 + * + * @author makejava + * @since 2023-11-29 09:34:47 + */ +@Api(tags = "非法狩猎大屏查询接口") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/poaching") +public class PoachingController extends BaseController { + + private final DevopsDeviceInfoService deviceInfoService; + private final MetaHuntersInfoService huntersInfoService; + + @PostMapping("/overviewResources") + @ApiOperation("资源概况") + public AjaxResult overviewResources() { + try { + // 流口查询 + int deviceCount = deviceInfoService.count(); + //实有房屋总数 todo 等表创建好了之后 + int personCuont = huntersInfoService.count(); + + PoachingVo bean = new PoachingVo(); + bean.setPersonCount(StringKit.toString(personCuont)); + bean.setDeviceCount(StringKit.toString(deviceCount)); + return AjaxResult.success(bean); + } catch (Exception e) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + @PostMapping("/personnelStatistics") + @ApiOperation("人员统计") + public AjaxResult personnelStatistics() { + try { + + Map parMap = new HashMap(); + 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) { + logger.info(StringKit.toString(e)); + return AjaxResult.error("请求失败,请联系管理员"); + } + } + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildEstateInfoVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildEstateInfoVo.java new file mode 100644 index 0000000..6f360f4 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildEstateInfoVo.java @@ -0,0 +1,43 @@ +package com.ruoyi.business.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 重点人员vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "KeyPersonnelVo", description = "重点人员vo") +public class BuildEstateInfoVo { + + + /** + * 点位名称 + */ + @ApiModelProperty("点位名称") + private String realEstateBriefAddress; + + /** + * 经度 + */ + @ApiModelProperty("经度") + private String longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + private String latitude; + + /** + * 总数 + */ + @ApiModelProperty("总数") + private String count; + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInfoActualVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInfoActualVo.java new file mode 100644 index 0000000..42a91c1 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInfoActualVo.java @@ -0,0 +1,63 @@ +package com.ruoyi.business.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 重点人员vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "KeyPersonnelVo", description = "重点人员vo") +public class BuildInfoActualVo { + + + /** + * 总数 + */ + @ApiModelProperty("总数") + private String count; + + + /** 人户一致 */ + @ApiModelProperty("人户一致") + private String rhyzCount; + + + /** 人户不一致 */ + @ApiModelProperty("人户不一致") + private String rhbyzCount; + + /** 户在人不在 */ + @ApiModelProperty("户在人不在") + private String hzrbzCount; + + /** 境外人员 */ + @ApiModelProperty("境外人员") + private String jwryCount; + + /** 重点人员 */ + @ApiModelProperty("重点人员") + private String zdryCount; + + /** 关爱人员 */ + @ApiModelProperty("关爱人员") + private String garyCount; + + /** 常驻人员 */ + @ApiModelProperty("常驻人员") + private String czryCount; + + /** 暂住人员 */ + @ApiModelProperty("暂住人员") + private String zzryCount; + + /** 流动人员 */ + @ApiModelProperty("流动人员") + private String ldCount; + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInformationVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInformationVo.java new file mode 100644 index 0000000..0c1691b --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildInformationVo.java @@ -0,0 +1,51 @@ +package com.ruoyi.business.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 重点人员vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "KeyPersonnelVo", description = "重点人员vo") +public class BuildInformationVo { + + + /** + * 总数 + */ + @ApiModelProperty("总数") + private String count; + + + /** 住宅 */ + @ApiModelProperty("住宅数量") + private String zzCount; + + + /** 商铺 */ + @ApiModelProperty("商铺数量") + private String spCount; + + /** 商住两用 */ + @ApiModelProperty("商住两用数量") + private String szlyCount; + + /** 空置 */ + @ApiModelProperty("空置数量") + private String kzCount; + + /** 出租房数量 */ + @ApiModelProperty("出租房数量") + private String czfCount; + + /** 群租房数量 */ + @ApiModelProperty("群租房数量") + private String qzfCount; + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildUserInformationVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildUserInformationVo.java new file mode 100644 index 0000000..86f0525 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/BuildUserInformationVo.java @@ -0,0 +1,33 @@ +package com.ruoyi.business.domain.vo; + +import com.ruoyi.database.domain.MetaActualUserInfo; +import com.ruoyi.database.domain.MetaImpUserInfo; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.List; + +/** + * 重点人员vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "KeyPersonnelVo", description = "重点人员vo") +public class BuildUserInformationVo { + + //房屋信息 + private HomeInfoVo homeInfo; + //户主 + private MetaActualUserInfo actualUserInfo; + //实有人口数据 + private List userInfos; + //户在人不在数据 + private List HouseholdInUserInfos; + //重点人数据 + private List impUserInfos; + + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/DevopsVideoInfoVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/DevopsVideoInfoVo.java new file mode 100644 index 0000000..354d733 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/DevopsVideoInfoVo.java @@ -0,0 +1,145 @@ +package com.ruoyi.business.domain.vo; + +import com.baomidou.mybatisplus.annotation.*; +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; + +/** + * 视频监控设备表(DevopsVideoInfo)Domain + * + * @author makejava + * @since 2023-12-01 20:06:03 + */ +@Data +public class DevopsVideoInfoVo extends BaseEntity { + + /** + * 主键 + */ + private Long id; + + /** + * 场所编码 + */ + private String placeCode; + + /** + * 场所名称 + */ + private String placeName; + + /** + * 设备编码 + */ + private String deviceCode; + + /** + * 设备名称 + */ + private String deviceName; + + /** + * 监控类型 + */ + private Integer monitoringType; + + /** + * 安装位置 + */ + private String deviceAddress; + + /** + * 设备方位 + */ + private Integer orientation; + + /** + * 设备SN编号 + */ + private String deviceSn; + + /** + * 设备品牌 + */ + private String deviceBrand; + + /** + * 设备ip + */ + private String deviceIp; + + /** + * 设备端口 + */ + private Integer devicePort; + + /** + * 设备MAC + */ + private String deviceMac; + + /** + * 设备经度 + */ + private Double longitude; + + /** + * 设备纬度 + */ + private Double latitude; + + /** + * U3D经度 + */ + private Double u3dLongitude; + + /** + * U3D纬度 + */ + private Double u3dLatitude; + + /** + * 设备高度 + */ + private String deviceHeight; + + /** + * 设备厂家 + */ + private String manufactor; + + /** + * 登陆帐号 + */ + private String account; + + /** + * 登陆密码 + */ + private String password; + + /** + * 通道国标编码 + */ + private String gbsChannelNo; + + /** + * NVR设备编码 + */ + private String gbsNvrNo; + + /** + * 通道号 + */ + private Integer channelNo; + + private String plateNo; + + + + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/HomeInfoVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/HomeInfoVo.java new file mode 100644 index 0000000..ff8c1de --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/HomeInfoVo.java @@ -0,0 +1,18 @@ +package com.ruoyi.business.domain.vo; + +import lombok.Data; + +@Data +public class HomeInfoVo { + //地址 + private String address; + //网格 + private String grid; + //房屋类型 + private String type; + //是否出租 + private String isRent; + //警务区 + private String policeDistrictCode; + +} \ No newline at end of file diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/HumanVehicleStatisticsVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/HumanVehicleStatisticsVo.java new file mode 100644 index 0000000..aca8f8c --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/HumanVehicleStatisticsVo.java @@ -0,0 +1,29 @@ +package com.ruoyi.business.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 人车统计Vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "HumanVehicleStatisticsVo", description = "人车统计Vo") +public class HumanVehicleStatisticsVo { + + /** + * 当天车辆统计 + */ + @ApiModelProperty("当天车辆统计") + private String vehicleCount; + + /** + * 当天人员统计 + */ + @ApiModelProperty("当天人员统计") + private String userCount; + +} diff --git a/gather-app/src/main/java/com/ruoyi/business/domain/vo/PoachingVo.java b/gather-app/src/main/java/com/ruoyi/business/domain/vo/PoachingVo.java new file mode 100644 index 0000000..19ed61b --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/business/domain/vo/PoachingVo.java @@ -0,0 +1,30 @@ +package com.ruoyi.business.domain.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 资源概况vo + * + * @author makejava + * @since 2023-11-29 09:33:22 + */ +@Data +@ApiModel(value = "OverviewResourcesVo", description = "资源概况vo") +public class PoachingVo { + + /** + * 人员总数 + */ + @ApiModelProperty("人员总数") + private String personCount; + + /** + * 设备总数 + */ + @ApiModelProperty("设备总数") + private String deviceCount; + + +} 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 new file mode 100644 index 0000000..e10f007 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaHuntersInfoController.java @@ -0,0 +1,106 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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.poi.ExcelUtil; +import com.ruoyi.database.domain.MetaHuntersInfo; +import com.ruoyi.database.service.MetaHuntersInfoService; +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; + +/** + * 非法狩猎人员信息表(MetaHuntersInfo)Controller + * + * @author makejava + * @since 2023-12-09 17:22:05 + */ +@Api(tags = "非法狩猎人员信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaHuntersInfo") +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)); + } + +// List list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增非法狩猎人员信息表") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody MetaHuntersInfo metaHuntersInfo) { + return toAjax(metaHuntersInfoService.save(metaHuntersInfo)); + } + + @PutMapping + @ApiOperation("修改非法狩猎人员信息表") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody MetaHuntersInfo metaHuntersInfo) { + return toAjax(metaHuntersInfoService.updateById(metaHuntersInfo)); + } + + @DeleteMapping + @ApiOperation("删除非法狩猎人员信息表") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(metaHuntersInfoService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出非法狩猎人员信息表") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, MetaHuntersInfo metaHuntersInfo) { + List list = metaHuntersInfoService.list(new QueryWrapper<>(metaHuntersInfo)); + ExcelUtil util = new ExcelUtil<>(MetaHuntersInfo.class); + util.exportExcel(response, list, "非法狩猎人员信息表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入非法狩猎人员信息表模板") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(MetaHuntersInfo.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入非法狩猎人员信息表") + @Log(title = "非法狩猎人员信息表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(MetaHuntersInfo.class); + List list = util.importExcel(file.getInputStream()); + Object result = metaHuntersInfoService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "非法狩猎人员信息表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortInfoController.java new file mode 100644 index 0000000..3719e20 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortInfoController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.database.domain.MetaPortInfo; +import com.ruoyi.database.service.MetaPortInfoService; +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.poi.ExcelUtil; +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.List; + +/** + * 港口信息表(MetaPortInfo)Controller + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +@Api(tags = "港口信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaPortInfo") +public class MetaPortInfoController extends BaseController { + + private final MetaPortInfoService metaPortInfoService; + + @GetMapping + @ApiOperation("查询港口信息表") + public TableDataInfo list(MetaPortInfo metaPortInfo) { + startPage(); + List list = metaPortInfoService.list(new QueryWrapper<>(metaPortInfo)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增港口信息表") + @Log(title = "港口信息表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody MetaPortInfo metaPortInfo) { + return toAjax(metaPortInfoService.save(metaPortInfo)); + } + + @PutMapping + @ApiOperation("修改港口信息表") + @Log(title = "港口信息表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody MetaPortInfo metaPortInfo) { + return toAjax(metaPortInfoService.updateById(metaPortInfo)); + } + + @DeleteMapping + @ApiOperation("删除港口信息表") + @Log(title = "港口信息表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(metaPortInfoService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出港口信息表") + @Log(title = "港口信息表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, MetaPortInfo metaPortInfo) { + List list = metaPortInfoService.list(new QueryWrapper<>(metaPortInfo)); + ExcelUtil util = new ExcelUtil<>(MetaPortInfo.class); + util.exportExcel(response, list, "港口信息表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入港口信息表模板") + @Log(title = "港口信息表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(MetaPortInfo.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入港口信息表") + @Log(title = "港口信息表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(MetaPortInfo.class); + List list = util.importExcel(file.getInputStream()); + Object result = metaPortInfoService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "港口信息表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaRealEstateInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaRealEstateInfoController.java new file mode 100644 index 0000000..5dd2192 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaRealEstateInfoController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.database.domain.MetaRealEstateInfo; +import com.ruoyi.database.service.MetaRealEstateInfoService; +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.poi.ExcelUtil; +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.List; + +/** + * 实有房屋信息表(MetaRealEstateInfo)Controller + * + * @author makejava + * @since 2023-12-05 09:24:09 + */ +@Api(tags = "实有房屋信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaRealEstateInfo") +public class MetaRealEstateInfoController extends BaseController { + + private final MetaRealEstateInfoService metaRealEstateInfoService; + + @GetMapping + @ApiOperation("查询实有房屋信息表") + public TableDataInfo list(MetaRealEstateInfo metaRealEstateInfo) { + startPage(); + List list = metaRealEstateInfoService.list(new QueryWrapper<>(metaRealEstateInfo)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增实有房屋信息表") + @Log(title = "实有房屋信息表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody MetaRealEstateInfo metaRealEstateInfo) { + return toAjax(metaRealEstateInfoService.save(metaRealEstateInfo)); + } + + @PutMapping + @ApiOperation("修改实有房屋信息表") + @Log(title = "实有房屋信息表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody MetaRealEstateInfo metaRealEstateInfo) { + return toAjax(metaRealEstateInfoService.updateById(metaRealEstateInfo)); + } + + @DeleteMapping + @ApiOperation("删除实有房屋信息表") + @Log(title = "实有房屋信息表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(metaRealEstateInfoService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出实有房屋信息表") + @Log(title = "实有房屋信息表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, MetaRealEstateInfo metaRealEstateInfo) { + List list = metaRealEstateInfoService.list(new QueryWrapper<>(metaRealEstateInfo)); + ExcelUtil util = new ExcelUtil<>(MetaRealEstateInfo.class); + util.exportExcel(response, list, "实有房屋信息表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入实有房屋信息表模板") + @Log(title = "实有房屋信息表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(MetaRealEstateInfo.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入实有房屋信息表") + @Log(title = "实有房屋信息表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(MetaRealEstateInfo.class); + List list = util.importExcel(file.getInputStream()); + Object result = metaRealEstateInfoService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "实有房屋信息表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaRentalHousingInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaRentalHousingInfoController.java new file mode 100644 index 0000000..556289e --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaRentalHousingInfoController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.database.domain.MetaRentalHousingInfo; +import com.ruoyi.database.service.MetaRentalHousingInfoService; +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.poi.ExcelUtil; +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.List; + +/** + * 出租房信息表(MetaRentalHousingInfo)Controller + * + * @author makejava + * @since 2023-12-04 10:08:14 + */ +@Api(tags = "出租房信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaRentalHousingInfo") +public class MetaRentalHousingInfoController extends BaseController { + + private final MetaRentalHousingInfoService metaRentalHousingInfoService; + + @GetMapping + @ApiOperation("查询出租房信息表") + public TableDataInfo list(MetaRentalHousingInfo metaRentalHousingInfo) { + startPage(); + List list = metaRentalHousingInfoService.list(new QueryWrapper<>(metaRentalHousingInfo)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增出租房信息表") + @Log(title = "出租房信息表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody MetaRentalHousingInfo metaRentalHousingInfo) { + return toAjax(metaRentalHousingInfoService.save(metaRentalHousingInfo)); + } + + @PutMapping + @ApiOperation("修改出租房信息表") + @Log(title = "出租房信息表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody MetaRentalHousingInfo metaRentalHousingInfo) { + return toAjax(metaRentalHousingInfoService.updateById(metaRentalHousingInfo)); + } + + @DeleteMapping + @ApiOperation("删除出租房信息表") + @Log(title = "出租房信息表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(metaRentalHousingInfoService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出出租房信息表") + @Log(title = "出租房信息表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, MetaRentalHousingInfo metaRentalHousingInfo) { + List list = metaRentalHousingInfoService.list(new QueryWrapper<>(metaRentalHousingInfo)); + ExcelUtil util = new ExcelUtil<>(MetaRentalHousingInfo.class); + util.exportExcel(response, list, "出租房信息表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入出租房信息表模板") + @Log(title = "出租房信息表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(MetaRentalHousingInfo.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入出租房信息表") + @Log(title = "出租房信息表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(MetaRentalHousingInfo.class); + List list = util.importExcel(file.getInputStream()); + Object result = metaRentalHousingInfoService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "出租房信息表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaWharfInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaWharfInfoController.java new file mode 100644 index 0000000..19dc693 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaWharfInfoController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.database.domain.MetaWharfInfo; +import com.ruoyi.database.service.MetaWharfInfoService; +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.poi.ExcelUtil; +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.List; + +/** + * 码头信息表(MetaWharfInfo)Controller + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +@Api(tags = "码头信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/metaWharfInfo") +public class MetaWharfInfoController extends BaseController { + + private final MetaWharfInfoService metaWharfInfoService; + + @GetMapping + @ApiOperation("查询码头信息表") + public TableDataInfo list(MetaWharfInfo metaWharfInfo) { + startPage(); + List list = metaWharfInfoService.list(new QueryWrapper<>(metaWharfInfo)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增码头信息表") + @Log(title = "码头信息表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody MetaWharfInfo metaWharfInfo) { + return toAjax(metaWharfInfoService.save(metaWharfInfo)); + } + + @PutMapping + @ApiOperation("修改码头信息表") + @Log(title = "码头信息表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody MetaWharfInfo metaWharfInfo) { + return toAjax(metaWharfInfoService.updateById(metaWharfInfo)); + } + + @DeleteMapping + @ApiOperation("删除码头信息表") + @Log(title = "码头信息表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(metaWharfInfoService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出码头信息表") + @Log(title = "码头信息表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, MetaWharfInfo metaWharfInfo) { + List list = metaWharfInfoService.list(new QueryWrapper<>(metaWharfInfo)); + ExcelUtil util = new ExcelUtil<>(MetaWharfInfo.class); + util.exportExcel(response, list, "码头信息表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入码头信息表模板") + @Log(title = "码头信息表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(MetaWharfInfo.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入码头信息表") + @Log(title = "码头信息表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(MetaWharfInfo.class); + List list = util.importExcel(file.getInputStream()); + Object result = metaWharfInfoService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "码头信息表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserRecordController.java new file mode 100644 index 0000000..3d0080c --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersUserRecordController.java @@ -0,0 +1,106 @@ +package com.ruoyi.database.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.database.domain.MetaHuntersInfo; +import com.ruoyi.database.domain.TransitHuntersUserRecord; +import com.ruoyi.database.service.TransitHuntersUserRecordService; +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.poi.ExcelUtil; +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; + +/** + * 非法狩猎人员人脸记录表(TransitHuntersUserRecord)Controller + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Api(tags = "非法狩猎人员人脸记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitHuntersUserRecord") +public class TransitHuntersUserRecordController extends BaseController { + + private final TransitHuntersUserRecordService transitHuntersUserRecordService; + + @GetMapping + @ApiOperation("查询非法狩猎人员人脸记录表") + public TableDataInfo list(TransitHuntersUserRecord transitHuntersUserRecord) { + startPage(); + + List list = new ArrayList<>(); + if(transitHuntersUserRecord.getFirstTime() != null && transitHuntersUserRecord.getEndTime() != null){ + list = transitHuntersUserRecordService.list(new QueryWrapper<>(transitHuntersUserRecord) + .between("partition_field", transitHuntersUserRecord.getFirstTime(), transitHuntersUserRecord.getEndTime()) + ); + }else { + list = transitHuntersUserRecordService.list(new QueryWrapper<>(transitHuntersUserRecord)); + } + + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增非法狩猎人员人脸记录表") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitHuntersUserRecord transitHuntersUserRecord) { + return toAjax(transitHuntersUserRecordService.save(transitHuntersUserRecord)); + } + + @PutMapping + @ApiOperation("修改非法狩猎人员人脸记录表") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitHuntersUserRecord transitHuntersUserRecord) { + return toAjax(transitHuntersUserRecordService.updateById(transitHuntersUserRecord)); + } + + @DeleteMapping + @ApiOperation("删除非法狩猎人员人脸记录表") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitHuntersUserRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出非法狩猎人员人脸记录表") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitHuntersUserRecord transitHuntersUserRecord) { + List list = transitHuntersUserRecordService.list(new QueryWrapper<>(transitHuntersUserRecord)); + ExcelUtil util = new ExcelUtil<>(TransitHuntersUserRecord.class); + util.exportExcel(response, list, "非法狩猎人员人脸记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入非法狩猎人员人脸记录表模板") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitHuntersUserRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入非法狩猎人员人脸记录表") + @Log(title = "非法狩猎人员人脸记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitHuntersUserRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitHuntersUserRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "非法狩猎人员人脸记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersVehicleRecordController.java b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersVehicleRecordController.java new file mode 100644 index 0000000..7665989 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitHuntersVehicleRecordController.java @@ -0,0 +1,107 @@ +package com.ruoyi.database.controller; + + +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.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.poi.ExcelUtil; +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; + +/** + * 非法狩猎人员车辆记录表(TransitHuntersVehicleRecord)Controller + * + * @author makejava + * @since 2023-12-08 22:40:46 + */ +@Api(tags = "非法狩猎人员车辆记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitHuntersVehicleRecord") +public class TransitHuntersVehicleRecordController extends BaseController { + + private final TransitHuntersVehicleRecordService transitHuntersVehicleRecordService; + + @GetMapping + @ApiOperation("查询非法狩猎人员车辆记录表") + public TableDataInfo list(TransitHuntersVehicleRecord transitHuntersVehicleRecord) { + startPage(); +// List list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord)); + + List list = new ArrayList<>(); + if(transitHuntersVehicleRecord.getFirstTime() != null && transitHuntersVehicleRecord.getEndTime() != null){ + list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord) + .between("partition_field", transitHuntersVehicleRecord.getFirstTime(), transitHuntersVehicleRecord.getEndTime()) + ); + }else { + list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord)); + } + + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增非法狩猎人员车辆记录表") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitHuntersVehicleRecord transitHuntersVehicleRecord) { + return toAjax(transitHuntersVehicleRecordService.save(transitHuntersVehicleRecord)); + } + + @PutMapping + @ApiOperation("修改非法狩猎人员车辆记录表") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitHuntersVehicleRecord transitHuntersVehicleRecord) { + return toAjax(transitHuntersVehicleRecordService.updateById(transitHuntersVehicleRecord)); + } + + @DeleteMapping + @ApiOperation("删除非法狩猎人员车辆记录表") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitHuntersVehicleRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出非法狩猎人员车辆记录表") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitHuntersVehicleRecord transitHuntersVehicleRecord) { + List list = transitHuntersVehicleRecordService.list(new QueryWrapper<>(transitHuntersVehicleRecord)); + ExcelUtil util = new ExcelUtil<>(TransitHuntersVehicleRecord.class); + util.exportExcel(response, list, "非法狩猎人员车辆记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入非法狩猎人员车辆记录表模板") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitHuntersVehicleRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入非法狩猎人员车辆记录表") + @Log(title = "非法狩猎人员车辆记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitHuntersVehicleRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitHuntersVehicleRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "非法狩猎人员车辆记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} 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 new file mode 100644 index 0000000..d15250a --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpUserRecordController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +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.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.poi.ExcelUtil; +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.List; + +/** + * 涉稳列管人员人脸抓拍记录表(TransitImpUserRecord)Controller + * + * @author makejava + * @since 2023-12-08 22:40:45 + */ +@Api(tags = "涉稳列管人员人脸抓拍记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitImpUserRecord") +public class TransitImpUserRecordController extends BaseController { + + private final TransitImpUserRecordService transitImpUserRecordService; + + @GetMapping + @ApiOperation("查询涉稳列管人员人脸抓拍记录表") + public TableDataInfo list(TransitImpUserRecord transitImpUserRecord) { + startPage(); + List list = transitImpUserRecordService.list(new QueryWrapper<>(transitImpUserRecord)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增涉稳列管人员人脸抓拍记录表") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitImpUserRecord transitImpUserRecord) { + return toAjax(transitImpUserRecordService.save(transitImpUserRecord)); + } + + @PutMapping + @ApiOperation("修改涉稳列管人员人脸抓拍记录表") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitImpUserRecord transitImpUserRecord) { + return toAjax(transitImpUserRecordService.updateById(transitImpUserRecord)); + } + + @DeleteMapping + @ApiOperation("删除涉稳列管人员人脸抓拍记录表") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitImpUserRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出涉稳列管人员人脸抓拍记录表") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitImpUserRecord transitImpUserRecord) { + List list = transitImpUserRecordService.list(new QueryWrapper<>(transitImpUserRecord)); + ExcelUtil util = new ExcelUtil<>(TransitImpUserRecord.class); + util.exportExcel(response, list, "涉稳列管人员人脸抓拍记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入涉稳列管人员人脸抓拍记录表模板") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitImpUserRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入涉稳列管人员人脸抓拍记录表") + @Log(title = "涉稳列管人员人脸抓拍记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitImpUserRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitImpUserRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "涉稳列管人员人脸抓拍记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} 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 new file mode 100644 index 0000000..ea09c21 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitImpVehicleRecordController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +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.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.poi.ExcelUtil; +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.List; + +/** + * 重点人车辆记录表(TransitImpVehicleRecord)Controller + * + * @author makejava + * @since 2023-12-04 14:25:46 + */ +@Api(tags = "重点人车辆记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitImpVehicleRecord") +public class TransitImpVehicleRecordController extends BaseController { + + private final TransitImpVehicleRecordService transitImpVehicleRecordService; + + @GetMapping + @ApiOperation("查询重点人车辆记录表") + public TableDataInfo list(TransitImpVehicleRecord transitImpVehicleRecord) { + startPage(); + List list = transitImpVehicleRecordService.list(new QueryWrapper<>(transitImpVehicleRecord)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增重点人车辆记录表") + @Log(title = "重点人车辆记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitImpVehicleRecord transitImpVehicleRecord) { + return toAjax(transitImpVehicleRecordService.save(transitImpVehicleRecord)); + } + + @PutMapping + @ApiOperation("修改重点人车辆记录表") + @Log(title = "重点人车辆记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitImpVehicleRecord transitImpVehicleRecord) { + return toAjax(transitImpVehicleRecordService.updateById(transitImpVehicleRecord)); + } + + @DeleteMapping + @ApiOperation("删除重点人车辆记录表") + @Log(title = "重点人车辆记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitImpVehicleRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出重点人车辆记录表") + @Log(title = "重点人车辆记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitImpVehicleRecord transitImpVehicleRecord) { + List list = transitImpVehicleRecordService.list(new QueryWrapper<>(transitImpVehicleRecord)); + ExcelUtil util = new ExcelUtil<>(TransitImpVehicleRecord.class); + util.exportExcel(response, list, "重点人车辆记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入重点人车辆记录表模板") + @Log(title = "重点人车辆记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitImpVehicleRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入重点人车辆记录表") + @Log(title = "重点人车辆记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitImpVehicleRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitImpVehicleRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "重点人车辆记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} 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 new file mode 100644 index 0000000..e1d3749 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitUserRecordController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +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.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.poi.ExcelUtil; +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.List; + +/** + * 人脸记录表(TransitUserRecord)Controller + * + * @author makejava + * @since 2023-12-04 14:25:44 + */ +@Api(tags = "人脸记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitUserRecord") +public class TransitUserRecordController extends BaseController { + + private final TransitUserRecordService transitUserRecordService; + + @GetMapping + @ApiOperation("查询人脸记录表") + public TableDataInfo list(TransitUserRecord transitUserRecord) { + startPage(); + List list = transitUserRecordService.list(new QueryWrapper<>(transitUserRecord)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增人脸记录表") + @Log(title = "人脸记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitUserRecord transitUserRecord) { + return toAjax(transitUserRecordService.save(transitUserRecord)); + } + + @PutMapping + @ApiOperation("修改人脸记录表") + @Log(title = "人脸记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitUserRecord transitUserRecord) { + return toAjax(transitUserRecordService.updateById(transitUserRecord)); + } + + @DeleteMapping + @ApiOperation("删除人脸记录表") + @Log(title = "人脸记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitUserRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出人脸记录表") + @Log(title = "人脸记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitUserRecord transitUserRecord) { + List list = transitUserRecordService.list(new QueryWrapper<>(transitUserRecord)); + ExcelUtil util = new ExcelUtil<>(TransitUserRecord.class); + util.exportExcel(response, list, "人脸记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入人脸记录表模板") + @Log(title = "人脸记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitUserRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入人脸记录表") + @Log(title = "人脸记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitUserRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitUserRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "人脸记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} 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 new file mode 100644 index 0000000..d9d7e94 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/TransitVehicleRecordController.java @@ -0,0 +1,95 @@ +package com.ruoyi.database.controller; + + +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.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.poi.ExcelUtil; +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.List; + +/** + * 车辆记录表(TransitVehicleRecord)Controller + * + * @author makejava + * @since 2023-12-04 14:25:45 + */ +@Api(tags = "车辆记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/transitVehicleRecord") +public class TransitVehicleRecordController extends BaseController { + + private final TransitVehicleRecordService transitVehicleRecordService; + + @GetMapping + @ApiOperation("查询车辆记录表") + public TableDataInfo list(TransitVehicleRecord transitVehicleRecord) { + startPage(); + List list = transitVehicleRecordService.list(new QueryWrapper<>(transitVehicleRecord)); + return getDataTable(list); + } + + @PostMapping + @ApiOperation("新增车辆记录表") + @Log(title = "车辆记录表", businessType = BusinessType.INSERT) + public AjaxResult insert(@RequestBody TransitVehicleRecord transitVehicleRecord) { + return toAjax(transitVehicleRecordService.save(transitVehicleRecord)); + } + + @PutMapping + @ApiOperation("修改车辆记录表") + @Log(title = "车辆记录表", businessType = BusinessType.UPDATE) + public AjaxResult update(@RequestBody TransitVehicleRecord transitVehicleRecord) { + return toAjax(transitVehicleRecordService.updateById(transitVehicleRecord)); + } + + @DeleteMapping + @ApiOperation("删除车辆记录表") + @Log(title = "车辆记录表", businessType = BusinessType.DELETE) + public AjaxResult delete(@RequestParam("idList") List idList) { + return toAjax(transitVehicleRecordService.removeByIds(idList)); + } + + @PostMapping("/export") + @ApiOperation("导出车辆记录表") + @Log(title = "车辆记录表", businessType = BusinessType.EXPORT) + public void export(HttpServletResponse response, TransitVehicleRecord transitVehicleRecord) { + List list = transitVehicleRecordService.list(new QueryWrapper<>(transitVehicleRecord)); + ExcelUtil util = new ExcelUtil<>(TransitVehicleRecord.class); + util.exportExcel(response, list, "车辆记录表"); + } + + @PostMapping("/importTemplate") + @ApiOperation("导入车辆记录表模板") + @Log(title = "车辆记录表", businessType = BusinessType.IMPORT) + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(TransitVehicleRecord.class); + util.importTemplateExcel(response, "场所基础信息模板"); + } + + @PostMapping("/importData") + @ApiOperation("导入车辆记录表") + @Log(title = "车辆记录表", businessType = BusinessType.IMPORT) + public AjaxResult importData(HttpServletResponse response, MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(TransitVehicleRecord.class); + List list = util.importExcel(file.getInputStream()); + Object result = transitVehicleRecordService.importData(list); + if (result instanceof List) { + util.exportExcel(response, (List) result, "车辆记录表错误数据"); + return null; + } + return AjaxResult.success(result); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceInfo.java index 7993d3b..a706059 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceInfo.java @@ -2,10 +2,7 @@ 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.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; @@ -51,6 +48,7 @@ public class DevopsDeviceInfo extends BaseEntity { */ @ApiModelProperty("设备名称") @Excel(name = "设备名称") + @TableField(condition = SqlCondition.LIKE) private String deviceName; /** @@ -65,6 +63,7 @@ public class DevopsDeviceInfo extends BaseEntity { */ @ApiModelProperty("通道国标编码") @Excel(name = "通道国标编码") + @TableField(condition = SqlCondition.LIKE) private String gbsChannelNo; /** diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceStatus.java b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceStatus.java index cdc48c4..7c0acf5 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceStatus.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsDeviceStatus.java @@ -2,10 +2,7 @@ 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.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; @@ -58,6 +55,7 @@ public class DevopsDeviceStatus extends BaseEntity { */ @ApiModelProperty("通道国标编码") @Excel(name = "通道国标编码") + @TableField(condition = SqlCondition.LIKE) private String gbsChannelNo; /** @@ -65,6 +63,7 @@ public class DevopsDeviceStatus extends BaseEntity { */ @ApiModelProperty("设备名称") @Excel(name = "设备名称") + @TableField(condition = SqlCondition.LIKE) private String deviceName; /** diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoInfo.java index c6d0d6f..35c75ab 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoInfo.java @@ -2,10 +2,7 @@ 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.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; @@ -58,6 +55,7 @@ public class DevopsVideoInfo extends BaseEntity { */ @ApiModelProperty("设备名称") @Excel(name = "设备名称") + @TableField(condition = SqlCondition.LIKE) private String deviceName; /** @@ -181,6 +179,7 @@ public class DevopsVideoInfo extends BaseEntity { */ @ApiModelProperty("通道国标编码") @Excel(name = "通道国标编码") + @TableField(condition = SqlCondition.LIKE) private String gbsChannelNo; /** diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoStatus.java b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoStatus.java index e5b379f..0a9ac37 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoStatus.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/DevopsVideoStatus.java @@ -2,10 +2,7 @@ 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.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; @@ -65,6 +62,7 @@ public class DevopsVideoStatus extends BaseEntity { */ @ApiModelProperty("通道国标编码") @Excel(name = "通道国标编码") + @TableField(condition = SqlCondition.LIKE) private String gbsChannelNo; /** @@ -72,6 +70,7 @@ public class DevopsVideoStatus extends BaseEntity { */ @ApiModelProperty("设备名称") @Excel(name = "设备名称") + @TableField(condition = SqlCondition.LIKE) private String deviceName; /** @@ -106,4 +105,18 @@ public class DevopsVideoStatus extends BaseEntity { @TableField(exist = false) private String isOnlineCn; + /** + * 设备经度 + */ + @ApiModelProperty("设备经度") + @Excel(name = "设备经度") + private Double longitude; + + /** + * 设备纬度 + */ + @ApiModelProperty("设备纬度") + @Excel(name = "设备纬度") + private Double latitude; + } diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaActualUserInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaActualUserInfo.java index b8c3b17..df63d1c 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/MetaActualUserInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaActualUserInfo.java @@ -82,6 +82,7 @@ public class MetaActualUserInfo extends BaseEntity { @ApiModelProperty("实有人口类型") @Excel(name = "实有人口类型") private Integer actualUserType; + @TableField(exist = false) private String actualUserTypeCn; @@ -176,4 +177,14 @@ public class MetaActualUserInfo extends BaseEntity { @Excel(name = "元数据更新时间") private String metaUpdateTime; + + /** + * 关系 + */ + @ApiModelProperty("关系") + @Excel(name = "关系") + private Integer householderRelation; + @TableField(exist = false) + private String householderRelationCn; + } 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 new file mode 100644 index 0000000..3287628 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaHuntersInfo.java @@ -0,0 +1,127 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +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; + +/** + * 非法狩猎人员信息表(MetaHuntersInfo)Domain + * + * @author makejava + * @since 2023-12-09 17:22:06 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_hunters_info") +@ApiModel(value = "MetaHuntersInfo", description = "非法狩猎人员信息表") +public class MetaHuntersInfo extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 姓名 + */ + @ApiModelProperty("姓名") + @Excel(name = "姓名") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String hunterName; + + /** + * 性别 + */ + @ApiModelProperty("性别") + @Excel(name = "性别") + private Integer sex; + @TableField(exist = false) + private String sexCn; + + /** + * 联系方式 + */ + @ApiModelProperty("联系方式") + @Excel(name = "联系方式") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String phone; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String idCard; + + /** + * 户籍所属辖区 + */ + @ApiModelProperty("户籍所属辖区") + @Excel(name = "户籍所属辖区") + private String houseHoldRegister; + + /** + * 户籍地址详情 + */ + @ApiModelProperty("户籍地址详情") + @Excel(name = "户籍地址详情") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String houseHoldAddress; + + /** + * 现住地详址 + */ + @ApiModelProperty("现住地详址") + @Excel(name = "现住地详址") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String habitationAddress; + + /** + * 涉案情况 + */ + @ApiModelProperty("涉案情况") + @Excel(name = "涉案情况") + private String caseSituation; + + /** + * 案件处理情况 + */ + @ApiModelProperty("案件处理情况") + @Excel(name = "案件处理情况") + private String caseHandlingSituation; + + /** + * 管控状态 + */ + @ApiModelProperty("管控状态") + @Excel(name = "管控状态") + private Integer controlStatus; + @TableField(exist = false) + private String controlStatusCn; + + /** + * 数据有效性 + */ + @ApiModelProperty("数据有效性") + @Excel(name = "数据有效性") + private Integer dataStatus; + @TableField(exist = false) + private String dataStatusCn; + + /** + * 登记时间 + */ + @ApiModelProperty("登记时间") + @Excel(name = "登记时间") + private String registrationTime; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserInfo.java index cc45836..759a837 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserInfo.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaImpUserInfo.java @@ -75,6 +75,8 @@ public class MetaImpUserInfo extends BaseEntity { @ApiModelProperty("重点人大类") @Excel(name = "重点人大类") private String impUserType; + @TableField(exist = false) + private String impUserTypeCn; /** * 重点人小类 @@ -82,6 +84,8 @@ public class MetaImpUserInfo extends BaseEntity { @ApiModelProperty("重点人小类") @Excel(name = "重点人小类") private String impUserSubType; + @TableField(exist = false) + private String impUserSubTypeCn; /** * 户籍地区号 diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortInfo.java new file mode 100644 index 0000000..6837b30 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortInfo.java @@ -0,0 +1,69 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +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; + +/** + * 港口信息表(MetaPortInfo)Domain + * + * @author makejava + * @since 2023-12-12 09:01:16 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_port_info") +@ApiModel(value = "MetaPortInfo", description = "港口信息表") +public class MetaPortInfo extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 港口编号 + */ + @ApiModelProperty("港口编号") + @Excel(name = "港口编号") + private String portCode; + + /** + * 港口名称 + */ + @ApiModelProperty("港口名称") + @Excel(name = "港口名称") + private String portName; + + /** + * 港口地址 + */ + @ApiModelProperty("港口地址") + @Excel(name = "港口地址") + private String portAddress; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaRealEstateInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaRealEstateInfo.java new file mode 100644 index 0000000..46c9ef2 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaRealEstateInfo.java @@ -0,0 +1,104 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +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 +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_real_estate_info") +@ApiModel(value = "MetaRealEstateInfo", description = "实有房屋信息表") +public class MetaRealEstateInfo extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 房屋ID + */ + @ApiModelProperty("房屋ID") + @Excel(name = "房屋ID") + private String homeId; + + /** + * 派出所代码 + */ + @ApiModelProperty("派出所代码") + @Excel(name = "派出所代码") + private String policeStationCode; + + /** + * 警务区编码 + */ + @ApiModelProperty("警务区编码") + @Excel(name = "警务区编码") + private String policeDistrictCode; + + /** + * 实有房屋地址简称 + */ + @ApiModelProperty("实有房屋地址简称") + @Excel(name = "实有房屋地址简称") + private String realEstateBriefAddress; + + /** + * 实有房屋地址 + */ + @ApiModelProperty("实有房屋地址") + @Excel(name = "实有房屋地址") + private String realEstateAddress; + + /** + * 单元名称 + */ + @ApiModelProperty("单元名称") + @Excel(name = "单元名称") + private String unitName; + + /** + * 楼栋名称 + */ + @ApiModelProperty("楼栋名称") + @Excel(name = "楼栋名称") + private String buildingName; + + /** + * 房屋名称 + */ + @ApiModelProperty("房屋名称") + @Excel(name = "房屋名称") + private String homeName; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaRentalHousingInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaRentalHousingInfo.java new file mode 100644 index 0000000..680465f --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaRentalHousingInfo.java @@ -0,0 +1,225 @@ +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; + +/** + * 出租房信息表(MetaRentalHousingInfo)Domain + * + * @author makejava + * @since 2023-12-04 10:08:15 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_rental_housing_info") +@ApiModel(value = "MetaRentalHousingInfo", description = "出租房信息表") +public class MetaRentalHousingInfo extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 出租房屋地址 + */ + @ApiModelProperty("出租房屋地址") + @Excel(name = "出租房屋地址") + private String rentalHousingAddress; + + /** + * 房主 + */ + @ApiModelProperty("房主") + @Excel(name = "房主") + private String homeowner; + + /** + * 房主身份证 + */ + @ApiModelProperty("房主身份证") + @Excel(name = "房主身份证") + private String homeownerIdCard; + + /** + * 房主户籍地区县 + */ + @ApiModelProperty("房主户籍地区县") + @Excel(name = "房主户籍地区县") + private String homeownerHouseHoldRegister; + + /** + * 户籍地址详情 + */ + @ApiModelProperty("户籍地址详情") + @Excel(name = "户籍地址详情") + private String homeownerHouseHoldAddress; + + /** + * 房主现居住地区县 + */ + @ApiModelProperty("房主现居住地区县") + @Excel(name = "房主现居住地区县") + private String homeownerHabitationRegister; + + /** + * 房主现居住地 + */ + @ApiModelProperty("房主现居住地") + @Excel(name = "房主现居住地") + private String homeownerHabitationAddress; + + /** + * 房主联系方式 + */ + @ApiModelProperty("房主联系方式") + @Excel(name = "房主联系方式") + private String homeownerPhone; + + /** + * 状态标识:0有效,1无效 + */ + @ApiModelProperty("状态标识:0有效,1无效") + @Excel(name = "状态标识:0有效,1无效") + private Integer stateFlag; + @TableField(exist = false) + private String stateFlagCn; + + /** + * 出租房到期时间 + */ + @ApiModelProperty("出租房到期时间") + @Excel(name = "出租房到期时间") + private String rentalHousingEndDate; + + /** + * 派出所代码 + */ + @ApiModelProperty("派出所代码") + @Excel(name = "派出所代码") + private String policeStationCode; + + /** + * 警务区编码 + */ + @ApiModelProperty("警务区编码") + @Excel(name = "警务区编码") + private String policeDistrictCode; + + /** + * 流动人口标准地址ID + */ + @ApiModelProperty("流动人口标准地址ID") + @Excel(name = "流动人口标准地址ID") + private String floatingPopulationStandardAddressId; + + /** + * 流动人口标准地址 + */ + @ApiModelProperty("流动人口标准地址") + @Excel(name = "流动人口标准地址") + private String floatingPopulationStandardAddress; + + /** + * 出租房状态 + */ + @ApiModelProperty("出租房状态") + @Excel(name = "出租房状态") + private Integer rentalHousingStatus; + @TableField(exist = false) + private Integer rentalHousingStatusCn; + + /** + * 是否出租 + */ + @ApiModelProperty("是否出租") + @Excel(name = "是否出租") + private Integer isRentalHousing; + @TableField(exist = false) + private String isRentalHousingCn; + + /** + * 居住类型 + */ + @ApiModelProperty("居住类型") + @Excel(name = "居住类型") + private Integer residentialType; + @TableField(exist = false) + private String residentialTypeCn; + + /** + * 房屋等级 + */ + @ApiModelProperty("房屋等级") + @Excel(name = "房屋等级") + private Integer rentalHousingGrade; + @TableField(exist = false) + private String rentalHousingGradeCn; + + /** + * 重点房屋 + */ + @ApiModelProperty("重点房屋") + @Excel(name = "重点房屋") + private Integer impRentalHousing; + @TableField(exist = false) + private String impRentalHousingCn; + + /** + * 重点人员 + */ + @ApiModelProperty("重点人员") + @Excel(name = "重点人员") + private Integer impUserRentalHousing; + @TableField(exist = false) + private String impUserRentalHousingCn; + + /** + * 是否群租房 + */ + @ApiModelProperty("是否群租房") + @Excel(name = "是否群租房") + private Integer isGroupRentalHousing; + @TableField(exist = false) + private String isGroupRentalHousingCn; + + /** + * 住房类型 + */ + @ApiModelProperty("住房类型") + @Excel(name = "住房类型") + private Integer rentalHousingType; + @TableField(exist = false) + private String rentalHousingTypeCn; + + /** + * 租房人姓名 + */ + @ApiModelProperty("租房人姓名") + @Excel(name = "租房人姓名") + private String rentingHouseUserName; + + /** + * 租房人联系方式 + */ + @ApiModelProperty("租房人联系方式") + @Excel(name = "租房人联系方式") + private String rentingHouseUserPhone; + + /** + * 租房人证件号码 + */ + @ApiModelProperty("租房人证件号码") + @Excel(name = "租房人证件号码") + private String rentingHouseUserIdCard; +} 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 new file mode 100644 index 0000000..140f06b --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaWharfInfo.java @@ -0,0 +1,76 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +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; + +/** + * 码头信息表(MetaWharfInfo)Domain + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_wharf_info") +@ApiModel(value = "MetaWharfInfo", description = "码头信息表") +public class MetaWharfInfo extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 码头编码 + */ + @ApiModelProperty("码头编码") + @Excel(name = "码头编码") + private String wharfCode; + + /** + * 码头名称 + */ + @ApiModelProperty("码头名称") + @Excel(name = "码头名称") + private String wharfName; + + /** + * 船舶地段名称 + */ + @ApiModelProperty("船舶地段名称") + @Excel(name = "船舶地段名称") + private String fishingBoatLocationName; + + /** + * 码头负责人 + */ + @ApiModelProperty("码头负责人") + @Excel(name = "码头负责人") + private String wharfOwner; + + /** + * 码头主联系方式 + */ + @ApiModelProperty("码头主联系方式") + @Excel(name = "码头主联系方式") + private String wharfOwnerPhone; + + /** + * 码头主证件号码 + */ + @ApiModelProperty("码头主证件号码") + @Excel(name = "码头主证件号码") + private String wharfOwnerIdCard; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserRecord.java new file mode 100644 index 0000000..8f01585 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersUserRecord.java @@ -0,0 +1,119 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +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; + +/** + * 非法狩猎人员人脸记录表(TransitHuntersUserRecord)Domain + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_hunters_user_record") +@ApiModel(value = "TransitHuntersUserRecord", description = "非法狩猎人员人脸记录表") +public class TransitHuntersUserRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备国标编码 + */ + @ApiModelProperty("设备国标编码") + @Excel(name = "设备国标编码") + private String deviceCode; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + + /** + * 经过位置 + */ + @ApiModelProperty("经过位置") + @Excel(name = "经过位置") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String deviceAddress; + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 人脸图 + */ + @ApiModelProperty("人脸图") + @Excel(name = "人脸图") + private String platePic; + + /** + * 相似度 + */ + @ApiModelProperty("相似度") + @Excel(name = "相似度") + private String similarity; + + /** + * 姓名 + */ + @ApiModelProperty("姓名") + @Excel(name = "姓名") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String userName; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + private Date partitionField; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersVehicleRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersVehicleRecord.java new file mode 100644 index 0000000..d7c4b5e --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitHuntersVehicleRecord.java @@ -0,0 +1,127 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.*; +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; + +/** + * 非法狩猎人员车辆记录表(TransitHuntersVehicleRecord)Domain + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_hunters_vehicle_record") +@ApiModel(value = "TransitHuntersVehicleRecord", description = "非法狩猎人员车辆记录表") +public class TransitHuntersVehicleRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备国标编码 + */ + @ApiModelProperty("设备国标编码") + @Excel(name = "设备国标编码") + private String deviceCode; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + + /** + * 经过位置 + */ + @ApiModelProperty("经过位置") + @Excel(name = "经过位置") + private String deviceAddress; + + /** + * 车牌号码 + */ + @ApiModelProperty("车牌号码") + @Excel(name = "车牌号码") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String plateNo; + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 车牌图 + */ + @ApiModelProperty("车牌图") + @Excel(name = "车牌图") + private String platePic; + + /** + * 相似度 + */ + @ApiModelProperty("相似度") + @Excel(name = "相似度") + private String similarity; + + /** + * 车主姓名 + */ + @ApiModelProperty("车主姓名") + @Excel(name = "车主姓名") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String ownerName; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + @TableField(condition = SqlCondition.LIKE_RIGHT) + private String phone; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + private Date partitionField; + +} 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 new file mode 100644 index 0000000..b86fb37 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpUserRecord.java @@ -0,0 +1,153 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +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; + +/** + * 涉稳列管人员人脸抓拍记录表(TransitImpUserRecord)Domain + * + * @author makejava + * @since 2023-12-08 22:40:46 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_imp_user_record") +@ApiModel(value = "TransitImpUserRecord", description = "涉稳列管人员人脸抓拍记录表") +public class TransitImpUserRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备编码 + */ + @ApiModelProperty("设备编码") + @Excel(name = "设备编码") + private String deviceCode; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + + /** + * 经过位置 + */ + @ApiModelProperty("经过位置") + @Excel(name = "经过位置") + private String deviceAddress; + + /** + * 方位 + */ + @ApiModelProperty("方位") + @Excel(name = "方位") + private String orientation; + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 人脸图 + */ + @ApiModelProperty("人脸图") + @Excel(name = "人脸图") + private String userPic; + + /** + * 相似度 + */ + @ApiModelProperty("相似度") + @Excel(name = "相似度") + private String similarity; + + /** + * 姓名 + */ + @ApiModelProperty("姓名") + @Excel(name = "姓名") + private String ownerName; + + /** + * 号码 + */ + @ApiModelProperty("号码") + @Excel(name = "号码") + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + private Date partitionField; + + /** + * 派出所名称 + */ + @ApiModelProperty("派出所名称") + @Excel(name = "派出所名称") + private String policeStationName; + + /** + * 管控依据 + */ + @ApiModelProperty("管控依据") + @Excel(name = "管控依据") + private String controlBasis; + + /** + * 管控依据备注 + */ + @ApiModelProperty("管控依据备注") + @Excel(name = "管控依据备注") + private String controlBasisNotes; + + /** + * 重点类型名称 + */ + @ApiModelProperty("重点类型名称") + @Excel(name = "重点类型名称") + private String impUserTypeName; + +} 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 new file mode 100644 index 0000000..9b8deab --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitImpVehicleRecord.java @@ -0,0 +1,162 @@ +package com.ruoyi.database.domain; + +import java.util.Date; + +import com.baomidou.mybatisplus.annotation.IdType; +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; + +/** + * 重点人车辆记录表(TransitImpVehicleRecord)Domain + * + * @author makejava + * @since 2023-12-04 14:25:47 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_imp_vehicle_record") +@ApiModel(value = "TransitImpVehicleRecord", description = "重点人车辆记录表") +public class TransitImpVehicleRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 设备编码 + */ + @ApiModelProperty("设备编码") + @Excel(name = "设备编码") + private String deviceCode; + + /** + * 经度 + */ + @ApiModelProperty("经度") + @Excel(name = "经度") + private Double longitude; + + /** + * 纬度 + */ + @ApiModelProperty("纬度") + @Excel(name = "纬度") + private Double latitude; + + /** + * 经过位置 + */ + @ApiModelProperty("经过位置") + @Excel(name = "经过位置") + private String deviceAddress; + + /** + * 方位 + */ + @ApiModelProperty("方位") + @Excel(name = "方位") + private String orientation; + + /** + * 车牌号码 + */ + @ApiModelProperty("车牌号码") + @Excel(name = "车牌号码") + private String plateNo; + + /** + * 全景图 + */ + @ApiModelProperty("全景图") + @Excel(name = "全景图") + private String globalPic; + + /** + * 车牌图 + */ + @ApiModelProperty("车牌图") + @Excel(name = "车牌图") + private String platePic; + + /** + * 人像图 + */ + @ApiModelProperty("人像图") + @Excel(name = "人像图") + private String userPic; + + /** + * 车主姓名 + */ + @ApiModelProperty("车主姓名") + @Excel(name = "车主姓名") + private String ownerName; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date partitionField; + + /** + * 派出所名称 + */ + @ApiModelProperty("派出所名称") + @Excel(name = "派出所名称") + private String policeStationName; + + /** + * 管控依据 + */ + @ApiModelProperty("管控依据") + @Excel(name = "管控依据") + private String controlBasis; + + /** + * 管控依据备注 + */ + @ApiModelProperty("管控依据备注") + @Excel(name = "管控依据备注") + private String controlBasisNotes; + + /** + * 重点类型名称 + */ + @ApiModelProperty("重点类型名称") + @Excel(name = "重点类型名称") + private String impUserTypeName; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitUserRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitUserRecord.java new file mode 100644 index 0000000..4c6e855 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitUserRecord.java @@ -0,0 +1,262 @@ +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.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; + +/** + * 人脸记录表(TransitUserRecord)Domain + * + * @author makejava + * @since 2023-12-04 14:25:45 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_user_record") +@ApiModel(value = "TransitUserRecord", description = "人脸记录表") +public class TransitUserRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 场所编码 + */ + @ApiModelProperty("场所编码") + @Excel(name = "场所编码") + private String placeCode; + + /** + * 场所名称 + */ + @ApiModelProperty("场所名称") + @Excel(name = "场所名称") + private String placeName; + + /** + * 设备编码 + */ + @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 Integer orientation; + @TableField(exist = false) + private String orientationCn; + + /** + * 设备ip + */ + @ApiModelProperty("设备ip") + @Excel(name = "设备ip") + private String deviceIp; + + /** + * 全景图 + */ + @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 dossierCode; + + /** + * 证件号码 + */ + @ApiModelProperty("证件号码") + @Excel(name = "证件号码") + private String idCard; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + @Excel(name = "联系电话") + private String phone; + + /** + * 记录唯一标识 + */ + @ApiModelProperty("记录唯一标识") + @Excel(name = "记录唯一标识") + private String recordId; + + /** + * 人车同拍唯一记录 + */ + @ApiModelProperty("人车同拍唯一记录") + @Excel(name = "人车同拍唯一记录") + private String userVehicleRecordId; + + /** + * 人体关联ID + */ + @ApiModelProperty("人体关联ID") + @Excel(name = "人体关联ID") + private String userBodyRecordId; + + /** + * 商汤人脸记录 + */ + @ApiModelProperty("商汤人脸记录") + @Excel(name = "商汤人脸记录") + private String stUserRecordId; + + /** + * 数据来源唯一ID + */ + @ApiModelProperty("数据来源唯一ID") + @Excel(name = "数据来源唯一ID") + private String sourceId; + + /** + * 人脸小图唯一ID + */ + @ApiModelProperty("人脸小图唯一ID") + @Excel(name = "人脸小图唯一ID") + private String personImageId; + + /** + * 人脸大图唯一ID + */ + @ApiModelProperty("人脸大图唯一ID") + @Excel(name = "人脸大图唯一ID") + private String globalImageId; + + /** + * 相似度 + */ + @ApiModelProperty("相似度") + @Excel(name = "相似度") + private String similarity; + + /** + * 是否已比对人脸 + */ + @ApiModelProperty("是否已比对人脸") + @Excel(name = "是否已比对人脸") + private Integer isCompare; + @TableField(exist = false) + private String isCompareCn; + + /** + * 进出方向 + */ + @ApiModelProperty("进出方向") + @Excel(name = "进出方向") + private Integer direction; + @TableField(exist = false) + private String directionCn; + + /** + * 抓拍时间 + */ + @ApiModelProperty("抓拍时间") + @Excel(name = "抓拍时间") + private Long passTime; + + /** + * 抓拍时间(分区) + */ + @ApiModelProperty("抓拍时间(分区)") + @Excel(name = "抓拍时间(分区)") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date partitionField; + + /** + * 轴系坐标 + */ + @ApiModelProperty("轴系坐标") + @Excel(name = "轴系坐标") + private String axis; + + /** + * 数据来源 + */ + @ApiModelProperty("数据来源") + @Excel(name = "数据来源") + private Integer dataSrc; + @TableField(exist = false) + private String dataSrcCn; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/TransitVehicleRecord.java b/gather-app/src/main/java/com/ruoyi/database/domain/TransitVehicleRecord.java new file mode 100644 index 0000000..b67bb8f --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/TransitVehicleRecord.java @@ -0,0 +1,295 @@ +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.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; + +/** + * 车辆记录表(TransitVehicleRecord)Domain + * + * @author makejava + * @since 2023-12-04 14:25:46 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "transit_vehicle_record") +@ApiModel(value = "TransitVehicleRecord", description = "车辆记录表") +public class TransitVehicleRecord extends BaseEntity { + + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 场所编码 + */ + @ApiModelProperty("场所编码") + @Excel(name = "场所编码") + private String placeCode; + + /** + * 场所名称 + */ + @ApiModelProperty("场所名称") + @Excel(name = "场所名称") + private String placeName; + + /** + * 设备编码 + */ + @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 Integer orientation; + @TableField(exist = false) + private String orientationCn; + + /** + * 设备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; + + /** + * 记录唯一ID + */ + @ApiModelProperty("记录唯一ID") + @Excel(name = "记录唯一ID") + private String recordId; + + /** + * 数据来源唯一ID + */ + @ApiModelProperty("数据来源唯一ID") + @Excel(name = "数据来源唯一ID") + private String sourceId; + + /** + * 车牌号小图唯一ID + */ + @ApiModelProperty("车牌号小图唯一ID") + @Excel(name = "车牌号小图唯一ID") + private String plateImageId; + + /** + * 车辆全景图唯一ID + */ + @ApiModelProperty("车辆全景图唯一ID") + @Excel(name = "车辆全景图唯一ID") + private String globalImageId; + + /** + * 人车同拍唯一记录 + */ + @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 copilotPersonPic; + + /** + * 副驾驶全景图 + */ + @ApiModelProperty("副驾驶全景图") + @Excel(name = "副驾驶全景图") + private String copilotGlobalPic; + + /** + * 副驾驶姓名 + */ + @ApiModelProperty("副驾驶姓名") + @Excel(name = "副驾驶姓名") + private String copilotOwnerName; + + /** + * 副驾驶证件号码 + */ + @ApiModelProperty("副驾驶证件号码") + @Excel(name = "副驾驶证件号码") + private String copilotIdcard; + + /** + * 副驾驶联系电话 + */ + @ApiModelProperty("副驾驶联系电话") + @Excel(name = "副驾驶联系电话") + private String copilotPhone; + + /** + * 进出方向 + */ + @ApiModelProperty("进出方向") + @Excel(name = "进出方向") + private Integer direction; + @TableField(exist = false) + private String directionCn; + + /** + * 卡口编码 + */ + @ApiModelProperty("卡口编码") + @Excel(name = "卡口编码") + private String doorwayCode; + + /** + * 车道编码 + */ + @ApiModelProperty("车道编码") + @Excel(name = "车道编码") + private String roadCode; + + /** + * 过车时间 + */ + @ApiModelProperty("过车时间") + @Excel(name = "过车时间") + private Long passTime; + + /** + * 过车时间(分区) + */ + @ApiModelProperty("过车时间(分区)") + @Excel(name = "过车时间(分区)") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date partitionField; + + /** + * 车牌颜色 + */ + @ApiModelProperty("车牌颜色") + @Excel(name = "车牌颜色") + private String plateColor; + + /** + * 车身颜色 + */ + @ApiModelProperty("车身颜色") + @Excel(name = "车身颜色") + private String vehicleColor; + + /** + * 车辆类型 + */ + @ApiModelProperty("车辆类型") + @Excel(name = "车辆类型") + private String vehicleType; + + /** + * 车辆品牌 + */ + @ApiModelProperty("车辆品牌") + @Excel(name = "车辆品牌") + private String vehicleBrand; + + /** + * 数据来源 + */ + @ApiModelProperty("数据来源") + @Excel(name = "数据来源") + private Integer dataSrc; + @TableField(exist = false) + private String dataSrcCn; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoInfoMapper.java index d4530a5..0afeeea 100644 --- a/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoInfoMapper.java +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoInfoMapper.java @@ -1,8 +1,12 @@ package com.ruoyi.database.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.business.domain.vo.DevopsVideoInfoVo; import com.ruoyi.database.domain.DevopsVideoInfo; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; + +import java.util.List; /** * 视频监控设备表(DevopsVideoInfo)Mapper @@ -13,4 +17,10 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface DevopsVideoInfoMapper extends BaseMapper { + @Select(" select " + + " *, " + + " CONCAT('苏',SUBSTRING_INDEX(SUBSTRING_INDEX(device_name, '苏', -1), ' ', 1) ) AS plate_no " + + " from devops_video_info where device_name like '%苏J%' ") + public List listPoliceVehicle(DevopsVideoInfo bean) ; + } diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoStatusMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoStatusMapper.java index b7b9a25..8bf323a 100644 --- a/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoStatusMapper.java +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/DevopsVideoStatusMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.database.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.database.domain.DevopsVideoStatus; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; /** * 视频监控状态表(DevopsVideoStatus)Mapper @@ -13,4 +14,7 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface DevopsVideoStatusMapper extends BaseMapper { + + @Select("select count(1) from devops_video_status where device_name like '%执法记录仪%' and is_online = '1' ") + public int getGbsListOnline(); } 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 7aacb36..6106884 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 @@ -48,7 +48,7 @@ public interface MetaAlarmInfoMapper extends BaseMapper { "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 create_time desc limit 100 " + + "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 ") public List listAlarmAndHandleAlarm(); diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaHuntersInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaHuntersInfoMapper.java new file mode 100644 index 0000000..310ea46 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaHuntersInfoMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.MetaHuntersInfo; +import org.apache.ibatis.annotations.Mapper; + +/** + * 非法狩猎人员信息表(MetaHuntersInfo)Mapper + * + * @author makejava + * @since 2023-12-09 17:22:06 + */ +@Mapper +public interface MetaHuntersInfoMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortInfoMapper.java new file mode 100644 index 0000000..904f45d --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortInfoMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.MetaPortInfo; +import org.apache.ibatis.annotations.Mapper; + +/** + * 港口信息表(MetaPortInfo)Mapper + * + * @author makejava + * @since 2023-12-12 09:01:16 + */ +@Mapper +public interface MetaPortInfoMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRealEstateInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRealEstateInfoMapper.java new file mode 100644 index 0000000..81baa22 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRealEstateInfoMapper.java @@ -0,0 +1,45 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.business.domain.vo.BuildEstateInfoVo; +import com.ruoyi.database.domain.MetaRealEstateInfo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * 实有房屋信息表(MetaRealEstateInfo)Mapper + * + * @author makejava + * @since 2023-12-05 09:24:09 + */ +@Mapper +public interface MetaRealEstateInfoMapper extends BaseMapper { + + @Select("SELECT * FROM meta_real_estate_info WHERE real_estate_address LIKE CONCAT('%',#{bean.realEstateAddress},'%') limit 1") + MetaRealEstateInfo listByLimit1(@Param("bean") MetaRealEstateInfo bean); + + @Select("SELECT count(1) FROM meta_real_estate_info WHERE real_estate_address LIKE '%室%'") + int countSyfw( MetaRealEstateInfo bean); + + @Select("select count(*) from meta_rental_housing_info " + + "where rental_housing_address in ( " + + "select real_estate_address from meta_real_estate_info where real_estate_address LIKE CONCAT('%',#{bean.realEstateAddress},'%') " + + ")") + int countRentalHousing(@Param("bean") MetaRealEstateInfo bean); + + @Select("select * from ( " + + "SELECT " + + " CASE " + + " 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) " + + " END AS real_estate_brief_address, " + + " longitude, " + + " latitude,count(1) count " + + "FROM meta_real_estate_info where real_estate_brief_address !='' and longitude!=0 " + + ") a group by a.real_estate_brief_address") + List buildLocationStatistics(); + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRentalHousingInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRentalHousingInfoMapper.java new file mode 100644 index 0000000..555ac71 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaRentalHousingInfoMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.MetaRentalHousingInfo; +import org.apache.ibatis.annotations.Mapper; + +/** + * 出租房信息表(MetaRentalHousingInfo)Mapper + * + * @author makejava + * @since 2023-12-04 10:08:15 + */ +@Mapper +public interface MetaRentalHousingInfoMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaWharfInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaWharfInfoMapper.java new file mode 100644 index 0000000..e39c32f --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaWharfInfoMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.MetaWharfInfo; +import org.apache.ibatis.annotations.Mapper; + +/** + * 码头信息表(MetaWharfInfo)Mapper + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +@Mapper +public interface MetaWharfInfoMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersUserRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersUserRecordMapper.java new file mode 100644 index 0000000..f4591f7 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersUserRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitHuntersUserRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 非法狩猎人员人脸记录表(TransitHuntersUserRecord)Mapper + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Mapper +public interface TransitHuntersUserRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersVehicleRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersVehicleRecordMapper.java new file mode 100644 index 0000000..b022b55 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitHuntersVehicleRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitHuntersVehicleRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 非法狩猎人员车辆记录表(TransitHuntersVehicleRecord)Mapper + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Mapper +public interface TransitHuntersVehicleRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpUserRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpUserRecordMapper.java new file mode 100644 index 0000000..c751f87 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpUserRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitImpUserRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 涉稳列管人员人脸抓拍记录表(TransitImpUserRecord)Mapper + * + * @author makejava + * @since 2023-12-08 22:40:46 + */ +@Mapper +public interface TransitImpUserRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpVehicleRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpVehicleRecordMapper.java new file mode 100644 index 0000000..7c9726f --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitImpVehicleRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitImpVehicleRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 重点人车辆记录表(TransitImpVehicleRecord)Mapper + * + * @author makejava + * @since 2023-12-04 14:25:47 + */ +@Mapper +public interface TransitImpVehicleRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitUserRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitUserRecordMapper.java new file mode 100644 index 0000000..8159d98 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitUserRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitUserRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 人脸记录表(TransitUserRecord)Mapper + * + * @author makejava + * @since 2023-12-04 14:25:45 + */ +@Mapper +public interface TransitUserRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/TransitVehicleRecordMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitVehicleRecordMapper.java new file mode 100644 index 0000000..968acd8 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/TransitVehicleRecordMapper.java @@ -0,0 +1,16 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.TransitVehicleRecord; +import org.apache.ibatis.annotations.Mapper; + +/** + * 车辆记录表(TransitVehicleRecord)Mapper + * + * @author makejava + * @since 2023-12-04 14:25:46 + */ +@Mapper +public interface TransitVehicleRecordMapper extends BaseMapper { + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoInfoService.java index 4670fef..8d4b256 100644 --- a/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoInfoService.java +++ b/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoInfoService.java @@ -3,6 +3,7 @@ package com.ruoyi.database.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ruoyi.business.domain.dto.DevopsVideoInfoDto; +import com.ruoyi.business.domain.vo.DevopsVideoInfoVo; import com.ruoyi.database.domain.DevopsVideoInfo; import java.util.List; @@ -32,4 +33,6 @@ public interface DevopsVideoInfoService extends IService { Object importData(List list); public String yjdr(DevopsVideoInfoDto bean); + + public List listPoliceVehicle(DevopsVideoInfo bean); } diff --git a/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoStatusService.java b/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoStatusService.java index 6df0524..cc0b36c 100644 --- a/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoStatusService.java +++ b/gather-app/src/main/java/com/ruoyi/database/service/DevopsVideoStatusService.java @@ -29,4 +29,6 @@ public interface DevopsVideoStatusService extends IService { * @return 结果 */ Object importData(List list); + + int getGbsListOnline(); } diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaHuntersInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaHuntersInfoService.java new file mode 100644 index 0000000..a3b9319 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaHuntersInfoService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.MetaHuntersInfo; + +import java.util.List; + +/** + * 非法狩猎人员信息表(MetaHuntersInfo)Service + * + * @author makejava + * @since 2023-12-09 17:22:06 + */ +public interface MetaHuntersInfoService extends IService { + + /** + * 新增或者更新非法狩猎人员信息表 + * + * @param metaHuntersInfo 非法狩猎人员信息表对象 + * @return 结果 + */ + boolean insertOrUpdate(MetaHuntersInfo metaHuntersInfo); + + /** + * 导入非法狩猎人员信息表 + * + * @param list 非法狩猎人员信息表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaPortInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaPortInfoService.java new file mode 100644 index 0000000..cfdcc80 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaPortInfoService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.MetaPortInfo; + +import java.util.List; + +/** + * 港口信息表(MetaPortInfo)Service + * + * @author makejava + * @since 2023-12-12 09:01:16 + */ +public interface MetaPortInfoService extends IService { + + /** + * 新增或者更新港口信息表 + * + * @param metaPortInfo 港口信息表对象 + * @return 结果 + */ + boolean insertOrUpdate(MetaPortInfo metaPortInfo); + + /** + * 导入港口信息表 + * + * @param list 港口信息表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaRealEstateInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaRealEstateInfoService.java new file mode 100644 index 0000000..8b0d69d --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaRealEstateInfoService.java @@ -0,0 +1,41 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.business.domain.vo.BuildEstateInfoVo; +import com.ruoyi.database.domain.MetaRealEstateInfo; + +import java.util.List; + +/** + * 实有房屋信息表(MetaRealEstateInfo)Service + * + * @author makejava + * @since 2023-12-05 09:24:09 + */ +public interface MetaRealEstateInfoService extends IService { + + /** + * 新增或者更新实有房屋信息表 + * + * @param metaRealEstateInfo 实有房屋信息表对象 + * @return 结果 + */ + boolean insertOrUpdate(MetaRealEstateInfo metaRealEstateInfo); + + /** + * 导入实有房屋信息表 + * + * @param list 实有房屋信息表列表 + * @return 结果 + */ + Object importData(List list); + + public MetaRealEstateInfo listByLimit1(MetaRealEstateInfo bean); + + public int countSyfw(MetaRealEstateInfo bean); + + public int countRentalHousing(MetaRealEstateInfo bean); + + public List buildLocationStatistics(); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaRentalHousingInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaRentalHousingInfoService.java new file mode 100644 index 0000000..4cebfb6 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaRentalHousingInfoService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.MetaRentalHousingInfo; + +import java.util.List; + +/** + * 出租房信息表(MetaRentalHousingInfo)Service + * + * @author makejava + * @since 2023-12-04 10:08:15 + */ +public interface MetaRentalHousingInfoService extends IService { + + /** + * 新增或者更新出租房信息表 + * + * @param metaRentalHousingInfo 出租房信息表对象 + * @return 结果 + */ + boolean insertOrUpdate(MetaRentalHousingInfo metaRentalHousingInfo); + + /** + * 导入出租房信息表 + * + * @param list 出租房信息表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaWharfInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaWharfInfoService.java new file mode 100644 index 0000000..f4ce370 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaWharfInfoService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.MetaWharfInfo; + +import java.util.List; + +/** + * 码头信息表(MetaWharfInfo)Service + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +public interface MetaWharfInfoService extends IService { + + /** + * 新增或者更新码头信息表 + * + * @param metaWharfInfo 码头信息表对象 + * @return 结果 + */ + boolean insertOrUpdate(MetaWharfInfo metaWharfInfo); + + /** + * 导入码头信息表 + * + * @param list 码头信息表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersUserRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersUserRecordService.java new file mode 100644 index 0000000..0949da8 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersUserRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitHuntersUserRecord; + +import java.util.List; + +/** + * 非法狩猎人员人脸记录表(TransitHuntersUserRecord)Service + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +public interface TransitHuntersUserRecordService extends IService { + + /** + * 新增或者更新非法狩猎人员人脸记录表 + * + * @param transitHuntersUserRecord 非法狩猎人员人脸记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitHuntersUserRecord transitHuntersUserRecord); + + /** + * 导入非法狩猎人员人脸记录表 + * + * @param list 非法狩猎人员人脸记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersVehicleRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersVehicleRecordService.java new file mode 100644 index 0000000..ede1068 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitHuntersVehicleRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitHuntersVehicleRecord; + +import java.util.List; + +/** + * 非法狩猎人员车辆记录表(TransitHuntersVehicleRecord)Service + * + * @author makejava + * @since 2023-12-08 22:40:46 + */ +public interface TransitHuntersVehicleRecordService extends IService { + + /** + * 新增或者更新非法狩猎人员车辆记录表 + * + * @param transitHuntersVehicleRecord 非法狩猎人员车辆记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitHuntersVehicleRecord transitHuntersVehicleRecord); + + /** + * 导入非法狩猎人员车辆记录表 + * + * @param list 非法狩猎人员车辆记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitImpUserRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitImpUserRecordService.java new file mode 100644 index 0000000..2d9f370 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitImpUserRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitImpUserRecord; + +import java.util.List; + +/** + * 涉稳列管人员人脸抓拍记录表(TransitImpUserRecord)Service + * + * @author makejava + * @since 2023-12-08 22:40:45 + */ +public interface TransitImpUserRecordService extends IService { + + /** + * 新增或者更新涉稳列管人员人脸抓拍记录表 + * + * @param transitImpUserRecord 涉稳列管人员人脸抓拍记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitImpUserRecord transitImpUserRecord); + + /** + * 导入涉稳列管人员人脸抓拍记录表 + * + * @param list 涉稳列管人员人脸抓拍记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitImpVehicleRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitImpVehicleRecordService.java new file mode 100644 index 0000000..0d28bc5 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitImpVehicleRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitImpVehicleRecord; + +import java.util.List; + +/** + * 重点人车辆记录表(TransitImpVehicleRecord)Service + * + * @author makejava + * @since 2023-12-04 14:25:47 + */ +public interface TransitImpVehicleRecordService extends IService { + + /** + * 新增或者更新重点人车辆记录表 + * + * @param transitImpVehicleRecord 重点人车辆记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitImpVehicleRecord transitImpVehicleRecord); + + /** + * 导入重点人车辆记录表 + * + * @param list 重点人车辆记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitUserRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitUserRecordService.java new file mode 100644 index 0000000..f7e27b7 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitUserRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitUserRecord; + +import java.util.List; + +/** + * 人脸记录表(TransitUserRecord)Service + * + * @author makejava + * @since 2023-12-04 14:25:44 + */ +public interface TransitUserRecordService extends IService { + + /** + * 新增或者更新人脸记录表 + * + * @param transitUserRecord 人脸记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitUserRecord transitUserRecord); + + /** + * 导入人脸记录表 + * + * @param list 人脸记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/TransitVehicleRecordService.java b/gather-app/src/main/java/com/ruoyi/database/service/TransitVehicleRecordService.java new file mode 100644 index 0000000..e51578d --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/TransitVehicleRecordService.java @@ -0,0 +1,32 @@ +package com.ruoyi.database.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.TransitVehicleRecord; + +import java.util.List; + +/** + * 车辆记录表(TransitVehicleRecord)Service + * + * @author makejava + * @since 2023-12-04 14:25:45 + */ +public interface TransitVehicleRecordService extends IService { + + /** + * 新增或者更新车辆记录表 + * + * @param transitVehicleRecord 车辆记录表对象 + * @return 结果 + */ + boolean insertOrUpdate(TransitVehicleRecord transitVehicleRecord); + + /** + * 导入车辆记录表 + * + * @param list 车辆记录表列表 + * @return 结果 + */ + Object importData(List list); +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoInfoServiceImpl.java index 3a4a11a..1adce8e 100644 --- a/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoInfoServiceImpl.java +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoInfoServiceImpl.java @@ -8,13 +8,21 @@ import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.business.domain.dto.DevopsVideoInfoDto; +import com.ruoyi.business.domain.vo.DevopsVideoInfoVo; import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.*; +import com.ruoyi.common.utils.JsoupUtils; +import com.ruoyi.common.utils.NumKit; +import com.ruoyi.common.utils.PropertiesUtil; +import com.ruoyi.common.utils.StringKit; import com.ruoyi.common.utils.bean.BeanUtils; import com.ruoyi.database.domain.DevopsVideoInfo; +import com.ruoyi.database.domain.DevopsVideoStatus; import com.ruoyi.database.mapper.DevopsVideoInfoMapper; import com.ruoyi.database.service.DevopsVideoInfoService; +import com.ruoyi.database.service.DevopsVideoStatusService; import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import java.util.List; @@ -29,7 +37,11 @@ import java.util.List; @RequiredArgsConstructor public class DevopsVideoInfoServiceImpl extends ServiceImpl implements DevopsVideoInfoService { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + + private final DevopsVideoInfoMapper videoInfoMapper; + private final DevopsVideoStatusService videoStatusService; @Override @@ -74,31 +86,38 @@ public class DevopsVideoInfoServiceImpl extends ServiceImpl 0) { - for (Object o : channelJsonArr) { + String gbsip = PropertiesUtil.queryPropertiesByKey("gbsIp"); + String gbsport = PropertiesUtil.queryPropertiesByKey("gbsPort"); + + String loginurl = "http://" + gbsip + ":" + gbsport + "/api/v1/login?username=admin&password=af7548eedff8e737c0e4b2a669497290#&url_token_only=true"; + + String res = JsoupUtils.getJsoupDocGet(loginurl); + JSONObject loginResJson = JSON.parseObject(res); + String urlToken = ""; + if (loginResJson != null) { + urlToken = StringKit.toString(loginResJson.get("URLToken")); + } + //如果urltoken获取失败直接结束方法 + if ("".equals(urlToken)) { + return "urltoken 获取失败!请检查配置文件是否正确"; + } + String channellistUrl = "http://" + gbsip + ":" + gbsport + "/api/v1/device/channellist?token=" + urlToken + "&url_token_only=true&start=0&limit=20000"; + + logger.info("channellistUrl:"+ channellistUrl); + + String channellistRes = JsoupUtils.getJsoupDocGet(channellistUrl); + if ("".equals(StringKit.toString(channellistRes))) { + return "调用设备列表失败!请检查配置文件是否正确"; + } + JSONObject channelObj = JSONObject.parseObject(channellistRes); + String channelJsonArrStr = StringKit.toString(channelObj.get("ChannelList")); + JSONArray channelJsonArr = JSONArray.parseArray(channelJsonArrStr); + if (channelJsonArr != null && channelJsonArr.size() > 0) { + + logger.info("channelJsonArr size = " + channelJsonArr.size()); + + for (Object o : channelJsonArr) { + try { bean = new DevopsVideoInfoDto(); count = 1; String channelStr = StringKit.toString(o); @@ -106,26 +125,17 @@ public class DevopsVideoInfoServiceImpl extends ServiceImpl checklists = videoInfoMapper.selectList(new LambdaQueryWrapper() .eq(DevopsVideoInfo::getGbsChannelNo, bean.getGbsChannelNo())); -// List checklists = videoInfoMapper.checkDevice(bean); if (checklists != null && checklists.size() > 0) { - log.debug("设备国标已存在:" + bean.getGbsChannelNo()); + logger.info("设备国标已存在:" + bean.getGbsChannelNo()); continue; } } else { - log.debug("国标编码为空:" + bean.getGbsChannelNo()); + logger.info("国标编码为空:" + bean.getGbsChannelNo()); continue; } - try { - DevopsVideoInfo videoInfo = new DevopsVideoInfo(); - BeanUtils.copyProperties(bean, videoInfo); - int b = videoInfoMapper.insert(videoInfo); - log.debug("保存成功"); - } catch (Exception e) { - log.debug("保存失败," + StringKit.getTrace(e)); + + DevopsVideoInfo videoInfo = new DevopsVideoInfo(); + BeanUtils.copyProperties(bean, videoInfo); + int b = videoInfoMapper.insert(videoInfo); + //默认离线 + int isOnline = 2; + if ("ON".equals(Status)) { + isOnline = 1; } + + //如果设备插入成功 + DevopsVideoStatus videoStatus = new DevopsVideoStatus(); + videoStatus.setGbsNvrNo(StringKit.toString(videoInfo.getGbsNvrNo())); + videoStatus.setGbsChannelNo(StringKit.toString(videoInfo.getGbsChannelNo())); + videoStatus.setDeviceName(StringKit.toString(videoInfo.getDeviceName())); + videoStatus.setDeviceIp(StringKit.toString(videoInfo.getDeviceIp())); + videoStatus.setMonitoringType(videoInfo.getMonitoringType()); + videoStatus.setHeartbeatTime(System.currentTimeMillis() / 1000); + videoStatus.setIsOnline(isOnline); + videoStatusService.save(videoStatus); + logger.info("保存成功:" + videoInfo.getGbsChannelNo()); + } catch (Exception e) { + logger.info("保存失败," + StringKit.getTrace(e)); + continue; } - } else { - return "结果集为空,请检查gbs是否配置。"; } - - return "success-" + count; - } catch (Exception e) { - log.debug(StringKit.getTrace(e)); - return "error,请联系管理员查看!"; + } else { + return "结果集为空,请检查gbs是否配置。"; } + return "success-" + count; } else if ("nvr".equals(type)) { //调用nvr插入设备 } else { @@ -194,5 +224,10 @@ public class DevopsVideoInfoServiceImpl extends ServiceImpl listPoliceVehicle(DevopsVideoInfo bean) { + return videoInfoMapper.listPoliceVehicle(bean); + } + } diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoStatusServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoStatusServiceImpl.java index 2aa6d28..f39ea46 100644 --- a/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoStatusServiceImpl.java +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/DevopsVideoStatusServiceImpl.java @@ -7,6 +7,7 @@ import com.ruoyi.common.exception.ServiceException; import com.ruoyi.database.domain.DevopsVideoStatus; import com.ruoyi.database.mapper.DevopsVideoStatusMapper; import com.ruoyi.database.service.DevopsVideoStatusService; +import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.List; @@ -18,8 +19,11 @@ import java.util.List; * @since 2023-11-29 09:33:21 */ @Service +@RequiredArgsConstructor public class DevopsVideoStatusServiceImpl extends ServiceImpl implements DevopsVideoStatusService { + private final DevopsVideoStatusMapper videoStatusMapper; + @Override public boolean insertOrUpdate(DevopsVideoStatus devopsVideoStatus) { return false; @@ -51,4 +55,11 @@ public class DevopsVideoStatusServiceImpl extends ServiceImpl implements MetaHuntersInfoService { + + @Override + public boolean insertOrUpdate(MetaHuntersInfo metaHuntersInfo) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (MetaHuntersInfo metaHuntersInfo : list) { + try { + insertOrUpdate(metaHuntersInfo); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortInfoServiceImpl.java new file mode 100644 index 0000000..32910f6 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortInfoServiceImpl.java @@ -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.MetaPortInfo; +import com.ruoyi.database.mapper.MetaPortInfoMapper; +import com.ruoyi.database.service.MetaPortInfoService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 港口信息表(MetaPortInfo)ServiceImpl + * + * @author makejava + * @since 2023-12-12 09:01:16 + */ +@Service +public class MetaPortInfoServiceImpl extends ServiceImpl implements MetaPortInfoService { + + @Override + public boolean insertOrUpdate(MetaPortInfo metaPortInfo) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (MetaPortInfo metaPortInfo : list) { + try { + insertOrUpdate(metaPortInfo); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRealEstateInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRealEstateInfoServiceImpl.java new file mode 100644 index 0000000..5d8683a --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRealEstateInfoServiceImpl.java @@ -0,0 +1,80 @@ +package com.ruoyi.database.service.impl; + + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.business.domain.vo.BuildEstateInfoVo; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.database.domain.MetaRealEstateInfo; +import com.ruoyi.database.mapper.MetaRealEstateInfoMapper; +import com.ruoyi.database.service.MetaRealEstateInfoService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 实有房屋信息表(MetaRealEstateInfo)ServiceImpl + * + * @author makejava + * @since 2023-12-05 09:24:09 + */ +@Service +@RequiredArgsConstructor +public class MetaRealEstateInfoServiceImpl extends ServiceImpl implements MetaRealEstateInfoService { + + private final MetaRealEstateInfoMapper metaRealEstateInfoMapper; + + @Override + public boolean insertOrUpdate(MetaRealEstateInfo metaRealEstateInfo) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (MetaRealEstateInfo metaRealEstateInfo : list) { + try { + insertOrUpdate(metaRealEstateInfo); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } + + @Override + public MetaRealEstateInfo listByLimit1(MetaRealEstateInfo bean) { + return metaRealEstateInfoMapper.listByLimit1(bean); + } + + @Override + public int countSyfw(MetaRealEstateInfo bean){ + return metaRealEstateInfoMapper.countSyfw(bean); + } + + @Override + public int countRentalHousing(MetaRealEstateInfo bean){ + return metaRealEstateInfoMapper.countRentalHousing(bean); + } + + @Override + public List buildLocationStatistics(){ + return metaRealEstateInfoMapper.buildLocationStatistics(); + } + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRentalHousingInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRentalHousingInfoServiceImpl.java new file mode 100644 index 0000000..02d7156 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaRentalHousingInfoServiceImpl.java @@ -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.MetaRentalHousingInfo; +import com.ruoyi.database.mapper.MetaRentalHousingInfoMapper; +import com.ruoyi.database.service.MetaRentalHousingInfoService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 出租房信息表(MetaRentalHousingInfo)ServiceImpl + * + * @author makejava + * @since 2023-12-04 10:08:15 + */ +@Service +public class MetaRentalHousingInfoServiceImpl extends ServiceImpl implements MetaRentalHousingInfoService { + + @Override + public boolean insertOrUpdate(MetaRentalHousingInfo metaRentalHousingInfo) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (MetaRentalHousingInfo metaRentalHousingInfo : list) { + try { + insertOrUpdate(metaRentalHousingInfo); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaWharfInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaWharfInfoServiceImpl.java new file mode 100644 index 0000000..bd7d4ac --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaWharfInfoServiceImpl.java @@ -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.MetaWharfInfo; +import com.ruoyi.database.mapper.MetaWharfInfoMapper; +import com.ruoyi.database.service.MetaWharfInfoService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 码头信息表(MetaWharfInfo)ServiceImpl + * + * @author makejava + * @since 2023-12-12 09:01:15 + */ +@Service +public class MetaWharfInfoServiceImpl extends ServiceImpl implements MetaWharfInfoService { + + @Override + public boolean insertOrUpdate(MetaWharfInfo metaWharfInfo) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (MetaWharfInfo metaWharfInfo : list) { + try { + insertOrUpdate(metaWharfInfo); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersUserRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersUserRecordServiceImpl.java new file mode 100644 index 0000000..e5a8ab1 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersUserRecordServiceImpl.java @@ -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.TransitHuntersUserRecord; +import com.ruoyi.database.mapper.TransitHuntersUserRecordMapper; +import com.ruoyi.database.service.TransitHuntersUserRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 非法狩猎人员人脸记录表(TransitHuntersUserRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-08 22:40:47 + */ +@Service +public class TransitHuntersUserRecordServiceImpl extends ServiceImpl implements TransitHuntersUserRecordService { + + @Override + public boolean insertOrUpdate(TransitHuntersUserRecord transitHuntersUserRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitHuntersUserRecord transitHuntersUserRecord : list) { + try { + insertOrUpdate(transitHuntersUserRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersVehicleRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersVehicleRecordServiceImpl.java new file mode 100644 index 0000000..bcf9a3d --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitHuntersVehicleRecordServiceImpl.java @@ -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.TransitHuntersVehicleRecord; +import com.ruoyi.database.mapper.TransitHuntersVehicleRecordMapper; +import com.ruoyi.database.service.TransitHuntersVehicleRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 非法狩猎人员车辆记录表(TransitHuntersVehicleRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-08 22:40:46 + */ +@Service +public class TransitHuntersVehicleRecordServiceImpl extends ServiceImpl implements TransitHuntersVehicleRecordService { + + @Override + public boolean insertOrUpdate(TransitHuntersVehicleRecord transitHuntersVehicleRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitHuntersVehicleRecord transitHuntersVehicleRecord : list) { + try { + insertOrUpdate(transitHuntersVehicleRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpUserRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpUserRecordServiceImpl.java new file mode 100644 index 0000000..d4e7425 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpUserRecordServiceImpl.java @@ -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.TransitImpUserRecord; +import com.ruoyi.database.mapper.TransitImpUserRecordMapper; +import com.ruoyi.database.service.TransitImpUserRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 涉稳列管人员人脸抓拍记录表(TransitImpUserRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-08 22:40:45 + */ +@Service +public class TransitImpUserRecordServiceImpl extends ServiceImpl implements TransitImpUserRecordService { + + @Override + public boolean insertOrUpdate(TransitImpUserRecord transitImpUserRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitImpUserRecord transitImpUserRecord : list) { + try { + insertOrUpdate(transitImpUserRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpVehicleRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpVehicleRecordServiceImpl.java new file mode 100644 index 0000000..3cfcd07 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitImpVehicleRecordServiceImpl.java @@ -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.TransitImpVehicleRecord; +import com.ruoyi.database.mapper.TransitImpVehicleRecordMapper; +import com.ruoyi.database.service.TransitImpVehicleRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 重点人车辆记录表(TransitImpVehicleRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-04 14:25:47 + */ +@Service +public class TransitImpVehicleRecordServiceImpl extends ServiceImpl implements TransitImpVehicleRecordService { + + @Override + public boolean insertOrUpdate(TransitImpVehicleRecord transitImpVehicleRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitImpVehicleRecord transitImpVehicleRecord : list) { + try { + insertOrUpdate(transitImpVehicleRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitUserRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitUserRecordServiceImpl.java new file mode 100644 index 0000000..aee93b0 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitUserRecordServiceImpl.java @@ -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.TransitUserRecord; +import com.ruoyi.database.mapper.TransitUserRecordMapper; +import com.ruoyi.database.service.TransitUserRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 人脸记录表(TransitUserRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-04 14:25:44 + */ +@Service +public class TransitUserRecordServiceImpl extends ServiceImpl implements TransitUserRecordService { + + @Override + public boolean insertOrUpdate(TransitUserRecord transitUserRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitUserRecord transitUserRecord : list) { + try { + insertOrUpdate(transitUserRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitVehicleRecordServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitVehicleRecordServiceImpl.java new file mode 100644 index 0000000..67eb71a --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/TransitVehicleRecordServiceImpl.java @@ -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.TransitVehicleRecord; +import com.ruoyi.database.mapper.TransitVehicleRecordMapper; +import com.ruoyi.database.service.TransitVehicleRecordService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 车辆记录表(TransitVehicleRecord)ServiceImpl + * + * @author makejava + * @since 2023-12-04 14:25:46 + */ +@Service +public class TransitVehicleRecordServiceImpl extends ServiceImpl implements TransitVehicleRecordService { + + @Override + public boolean insertOrUpdate(TransitVehicleRecord transitVehicleRecord) { + return false; + } + + @Override + public Object importData(List list) { + int successNum = 0; + int failureNum = 0; + StringBuilder successMsg = new StringBuilder(); + StringBuilder failureMsg = new StringBuilder(); + + for (TransitVehicleRecord transitVehicleRecord : list) { + try { + insertOrUpdate(transitVehicleRecord); + successNum++; + successMsg.append(StrUtil.format("
{}、待替换 {} 导入成功", successNum, "待替换")); + } catch (Exception e) { + failureNum++; + failureMsg.append(StrUtil.format("
{}、待替换 {} 导入失败:{}", failureNum, "待替换", e.getMessage())); + } + } + + if (failureNum > 0) { + failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); + throw new ServiceException(failureMsg.toString()); + } else { + successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); + return successMsg.toString(); + } + } +} diff --git a/gather-app/src/main/java/com/ruoyi/interceptor/DictionaryInterceptor.java b/gather-app/src/main/java/com/ruoyi/interceptor/DictionaryInterceptor.java index 99098ca..7362283 100644 --- a/gather-app/src/main/java/com/ruoyi/interceptor/DictionaryInterceptor.java +++ b/gather-app/src/main/java/com/ruoyi/interceptor/DictionaryInterceptor.java @@ -92,6 +92,36 @@ public class DictionaryInterceptor implements Interceptor { } } + if (field.getName().equals("impUserType") || field.getName().equals("impUserSubType")) { + field.setAccessible(true); + String fieldName = field.getName(); + Object dictValue = field.get(obj); + String dictValueStr = StringKit.toString(dictValue); + String dictType = StrUtil.toUnderlineCase(fieldName); + String dictLabel = ""; + if (StrUtil.isNotBlank(dictValueStr)) { + if (!"".equals(dictValueStr)) { + if (!dictValueStr.contains("")) { + dictLabel = DictCache.getDictLabel(StrUtil.format("{}-{}", dictType, dictValue)); + } else { + String dictLabels[] = dictValueStr.split(","); + for (String label : dictLabels) { + if ("".equals(dictLabel)) { + dictLabel = DictCache.getDictLabel(StrUtil.format("{}-{}", dictType, label)); + } else { + dictLabel = dictLabel + "," + DictCache.getDictLabel(StrUtil.format("{}-{}", dictType, label)); + } + } + } + } + } + + try { + ReflectUtil.setFieldValue(obj, fieldName + "Cn", dictLabel); + } catch (Exception ignored) { + } + } + if (StrUtil.endWith(field.getName(), "Time") && field.getType().equals(Long.class)) { field.setAccessible(true); field.setAccessible(true); diff --git a/gather-app/src/main/java/com/ruoyi/interceptor/EncryptInterceptor.java b/gather-app/src/main/java/com/ruoyi/interceptor/EncryptInterceptor.java index 48b678d..239c59e 100644 --- a/gather-app/src/main/java/com/ruoyi/interceptor/EncryptInterceptor.java +++ b/gather-app/src/main/java/com/ruoyi/interceptor/EncryptInterceptor.java @@ -1,100 +1,100 @@ -package com.ruoyi.interceptor; - -import cn.hutool.core.util.ReflectUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.SecureUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.ibatis.executor.parameter.ParameterHandler; -import org.apache.ibatis.plugin.*; - -import java.lang.reflect.Field; -import java.sql.PreparedStatement; -import java.util.HashMap; -import java.util.Properties; - -/** - * Mybatis加密拦截器 - * - * @since 2023-09-14 9:34 - */ - -@Intercepts({@Signature(type = ParameterHandler.class, method = "setParameters", args = {PreparedStatement.class})}) -public class EncryptInterceptor implements Interceptor { - - private final static String AES_ID_CARD = "idCardG409WaTuNj"; - private final static String AES_PHONE = "phoneG409WaTuNj1"; - - @Override - public Object intercept(Invocation invocation) throws Throwable { - ParameterHandler parameterHandler = (ParameterHandler) invocation.getTarget(); - // 获取查询语句的参数值 - Object parameterObject = parameterHandler.getParameterObject(); - // 如果参数值为空,则直接返回 - if (parameterObject == null) { - return invocation.proceed(); - } - Object currentObject = parameterObject; - // 获取入参类型 - Class aClass = parameterObject.getClass(); - - //若为查询语句,则获取实体类类型 - if ("org.apache.ibatis.binding.MapperMethod$ParamMap".equals(aClass.getName())) { - HashMap map = (HashMap) parameterObject; - try { - Object param1 = null; - try { - param1 = map.get("param1"); - }catch (Exception e){ - } - if (param1 != null && param1 instanceof QueryWrapper) { - QueryWrapper queryWrapper = (QueryWrapper) param1; - Object entity = queryWrapper.getEntity(); - if (entity == null) { - return invocation.proceed(); - } - aClass = entity.getClass(); - currentObject = entity; - } - - } catch (Exception e) { - e.printStackTrace(); - return invocation.proceed(); - } - } - - // 遍历实体类的字段 - for (Field field : aClass.getDeclaredFields()) { - String fieldName = field.getName(); - // 判断字段是否为电话号码或身份证号码,并对其进行加密 - if (StrUtil.containsIgnoreCase(fieldName, "idcard")) { - field.setAccessible(true); - String value = String.valueOf(field.get(currentObject)); - try { - ReflectUtil.setFieldValue(currentObject, fieldName, SecureUtil.aes(AES_ID_CARD.getBytes()).encryptBase64(value)); - } catch (Exception ignored) { - } - } - - if (StrUtil.containsIgnoreCase(fieldName, "phone")) { - field.setAccessible(true); - String value = String.valueOf(field.get(currentObject)); - try { - ReflectUtil.setFieldValue(currentObject, fieldName, SecureUtil.aes(AES_PHONE.getBytes()).encryptBase64(value)); - } catch (Exception ignored) { - } - } - } - - // 继续执行原来的 setParameters 方法 - return invocation.proceed(); - } - - @Override - public Object plugin(Object target) { - return Plugin.wrap(target, this); - } - - @Override - public void setProperties(Properties properties) { - } -} +//package com.ruoyi.interceptor; +// +//import cn.hutool.core.util.ReflectUtil; +//import cn.hutool.core.util.StrUtil; +//import cn.hutool.crypto.SecureUtil; +//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +//import org.apache.ibatis.executor.parameter.ParameterHandler; +//import org.apache.ibatis.plugin.*; +// +//import java.lang.reflect.Field; +//import java.sql.PreparedStatement; +//import java.util.HashMap; +//import java.util.Properties; +// +///** +// * Mybatis加密拦截器 +// * +// * @since 2023-09-14 9:34 +// */ +// +//@Intercepts({@Signature(type = ParameterHandler.class, method = "setParameters", args = {PreparedStatement.class})}) +//public class EncryptInterceptor implements Interceptor { +// +// private final static String AES_ID_CARD = "idCardG409WaTuNj"; +// private final static String AES_PHONE = "phoneG409WaTuNj1"; +// +// @Override +// public Object intercept(Invocation invocation) throws Throwable { +// ParameterHandler parameterHandler = (ParameterHandler) invocation.getTarget(); +// // 获取查询语句的参数值 +// Object parameterObject = parameterHandler.getParameterObject(); +// // 如果参数值为空,则直接返回 +// if (parameterObject == null) { +// return invocation.proceed(); +// } +// Object currentObject = parameterObject; +// // 获取入参类型 +// Class aClass = parameterObject.getClass(); +// +// //若为查询语句,则获取实体类类型 +// if ("org.apache.ibatis.binding.MapperMethod$ParamMap".equals(aClass.getName())) { +// HashMap map = (HashMap) parameterObject; +// try { +// Object param1 = null; +// try { +// param1 = map.get("param1"); +// }catch (Exception e){ +// } +// if (param1 != null && param1 instanceof QueryWrapper) { +// QueryWrapper queryWrapper = (QueryWrapper) param1; +// Object entity = queryWrapper.getEntity(); +// if (entity == null) { +// return invocation.proceed(); +// } +// aClass = entity.getClass(); +// currentObject = entity; +// } +// +// } catch (Exception e) { +// e.printStackTrace(); +// return invocation.proceed(); +// } +// } +// +// // 遍历实体类的字段 +// for (Field field : aClass.getDeclaredFields()) { +// String fieldName = field.getName(); +// // 判断字段是否为电话号码或身份证号码,并对其进行加密 +// if (StrUtil.containsIgnoreCase(fieldName, "idcard")) { +// field.setAccessible(true); +// String value = String.valueOf(field.get(currentObject)); +// try { +// ReflectUtil.setFieldValue(currentObject, fieldName, SecureUtil.aes(AES_ID_CARD.getBytes()).encryptBase64(value)); +// } catch (Exception ignored) { +// } +// } +// +// if (StrUtil.containsIgnoreCase(fieldName, "phone")) { +// field.setAccessible(true); +// String value = String.valueOf(field.get(currentObject)); +// try { +// ReflectUtil.setFieldValue(currentObject, fieldName, SecureUtil.aes(AES_PHONE.getBytes()).encryptBase64(value)); +// } catch (Exception ignored) { +// } +// } +// } +// +// // 继续执行原来的 setParameters 方法 +// return invocation.proceed(); +// } +// +// @Override +// public Object plugin(Object target) { +// return Plugin.wrap(target, this); +// } +// +// @Override +// public void setProperties(Properties properties) { +// } +//} diff --git a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml index 18dfcb3..ddd16bf 100644 --- a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml +++ b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml @@ -23,9 +23,9 @@ - + - + diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 8ef3afd..8008fbe 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || 'yhzafk' // 网页标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 1129 // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8008/hjapi`, + target: `http://localhost:1129/hjapi`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''