From 9a7ff8d67ea4b4ef8c12d4f719820e918f021b3a Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 16 Sep 2022 14:05:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=89=B9=E6=AE=8A=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E7=81=AB=E7=82=B9=E8=BF=87=E6=BB=A4=E6=B7=B7?= =?UTF-8?q?=E4=B9=B1=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/controller/FirePointController.java | 6 +++--- src/main/java/com/xkrs/service/FirePointService.java | 10 ++++++++++ .../com/xkrs/service/impl/FirePointServiceImpl.java | 10 ++++++++++ src/main/java/com/xkrs/utils/FirePointQueryHelper.java | 10 ++++++++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/xkrs/controller/FirePointController.java b/src/main/java/com/xkrs/controller/FirePointController.java index 7a7549c..6080a2c 100644 --- a/src/main/java/com/xkrs/controller/FirePointController.java +++ b/src/main/java/com/xkrs/controller/FirePointController.java @@ -186,11 +186,11 @@ public class FirePointController { * @param endTime 过滤火点结束卫星时间,不传代表不指定结束时间。 * @param satelliteType 过滤传感器类型,不传代表查询全部类型的传感器 * @param landType 过滤地物类型,不传代表查询全部地物类型 - * @return 符合条件的火点列表 */ @GetMapping("/queryFirePoint") - public List queryFirePoint(@RequestParam(value = "code", required = false) String code, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "satelliteType", required = false) String satelliteType, @RequestParam(value = "landType", required = false) String landType) { - return firePointService.queryFirePoint(code, startTime, endTime, satelliteType, landType); + public String queryFirePoint(@RequestParam(value = "code", required = false) String code, @RequestParam(value = "startTime", required = false) String startTime, @RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "satelliteType", required = false) String satelliteType, @RequestParam(value = "landType", required = false) String landType) { + List firePointList= firePointService.queryFirePoint(code, startTime, endTime, satelliteType, landType); + return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale); } /** diff --git a/src/main/java/com/xkrs/service/FirePointService.java b/src/main/java/com/xkrs/service/FirePointService.java index 2bd2e7b..7b2eb75 100644 --- a/src/main/java/com/xkrs/service/FirePointService.java +++ b/src/main/java/com/xkrs/service/FirePointService.java @@ -126,6 +126,16 @@ public interface FirePointService { */ String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response); + /** + * 动态多条件查询火点列表 + * + * @param code 区划编码,可以是省市区县街道任意编码,如果传需要至少两位。不传代表查询全国火点 + * @param startTime 过滤火点开始卫星时间,不传代表不指定开始时间。后台会有限制。 + * @param endTime 过滤火点结束卫星时间,不传代表不指定结束时间。 + * @param satelliteType 过滤传感器类型,不传代表查询全部类型的传感器 + * @param landType 过滤地物类型,不传代表查询全部地物类型 + * @return 符合条件的火点列表 + */ List queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType); } diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index face48a..1a73e2a 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -476,6 +476,16 @@ public class FirePointServiceImpl implements FirePointService { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "ok", locale); } + /** + * 动态多条件查询火点列表 + * + * @param code 区划编码,可以是省市区县街道任意编码,如果传需要至少两位。不传代表查询全国火点 + * @param startTime 过滤火点开始卫星时间,不传代表不指定开始时间。后台会有限制。 + * @param endTime 过滤火点结束卫星时间,不传代表不指定结束时间。 + * @param satelliteType 过滤传感器类型,不传代表查询全部类型的传感器 + * @param landType 过滤地物类型,不传代表查询全部地物类型 + * @return 符合条件的火点列表 + */ @Override public List queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) { return firePointQueryHelper.queryFirePoint(code, startTime, endTime, satelliteType, landType); diff --git a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java index e108b8a..4a5f1a2 100644 --- a/src/main/java/com/xkrs/utils/FirePointQueryHelper.java +++ b/src/main/java/com/xkrs/utils/FirePointQueryHelper.java @@ -22,6 +22,16 @@ public class FirePointQueryHelper { @Resource private FirePointDao firePointDao; + /** + * 动态多条件查询火点列表 + * + * @param code 区划编码,可以是省市区县街道任意编码,如果传需要至少两位。不传代表查询全国火点 + * @param startTime 过滤火点开始卫星时间,不传代表不指定开始时间。后台会有限制。 + * @param endTime 过滤火点结束卫星时间,不传代表不指定结束时间。 + * @param satelliteType 过滤传感器类型,不传代表查询全部类型的传感器 + * @param landType 过滤地物类型,不传代表查询全部地物类型 + * @return 符合条件的火点列表 + */ public List queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) { Specification specification = (root, criteriaQuery, criteriaBuilder) -> { //查询条件集合