修复特殊情况下火点过滤混乱的错误

This commit is contained in:
liuchengqian 2022-09-16 14:05:21 +08:00
parent 19647254f8
commit 9a7ff8d67e
4 changed files with 33 additions and 3 deletions

View File

@ -186,11 +186,11 @@ public class FirePointController {
* @param endTime 过滤火点结束卫星时间不传代表不指定结束时间 * @param endTime 过滤火点结束卫星时间不传代表不指定结束时间
* @param satelliteType 过滤传感器类型不传代表查询全部类型的传感器 * @param satelliteType 过滤传感器类型不传代表查询全部类型的传感器
* @param landType 过滤地物类型不传代表查询全部地物类型 * @param landType 过滤地物类型不传代表查询全部地物类型
* @return 符合条件的火点列表
*/ */
@GetMapping("/queryFirePoint") @GetMapping("/queryFirePoint")
public List<FirePointEntity> 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) { 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) {
return firePointService.queryFirePoint(code, startTime, endTime, satelliteType, landType); List<FirePointEntity> firePointList= firePointService.queryFirePoint(code, startTime, endTime, satelliteType, landType);
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale);
} }
/** /**

View File

@ -126,6 +126,16 @@ public interface FirePointService {
*/ */
String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response); String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response);
/**
* 动态多条件查询火点列表
*
* @param code 区划编码可以是省市区县街道任意编码如果传需要至少两位不传代表查询全国火点
* @param startTime 过滤火点开始卫星时间不传代表不指定开始时间后台会有限制
* @param endTime 过滤火点结束卫星时间不传代表不指定结束时间
* @param satelliteType 过滤传感器类型不传代表查询全部类型的传感器
* @param landType 过滤地物类型不传代表查询全部地物类型
* @return 符合条件的火点列表
*/
List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType); List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType);
} }

View File

@ -476,6 +476,16 @@ public class FirePointServiceImpl implements FirePointService {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "ok", locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "ok", locale);
} }
/**
* 动态多条件查询火点列表
*
* @param code 区划编码可以是省市区县街道任意编码如果传需要至少两位不传代表查询全国火点
* @param startTime 过滤火点开始卫星时间不传代表不指定开始时间后台会有限制
* @param endTime 过滤火点结束卫星时间不传代表不指定结束时间
* @param satelliteType 过滤传感器类型不传代表查询全部类型的传感器
* @param landType 过滤地物类型不传代表查询全部地物类型
* @return 符合条件的火点列表
*/
@Override @Override
public List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) { public List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) {
return firePointQueryHelper.queryFirePoint(code, startTime, endTime, satelliteType, landType); return firePointQueryHelper.queryFirePoint(code, startTime, endTime, satelliteType, landType);

View File

@ -22,6 +22,16 @@ public class FirePointQueryHelper {
@Resource @Resource
private FirePointDao firePointDao; private FirePointDao firePointDao;
/**
* 动态多条件查询火点列表
*
* @param code 区划编码可以是省市区县街道任意编码如果传需要至少两位不传代表查询全国火点
* @param startTime 过滤火点开始卫星时间不传代表不指定开始时间后台会有限制
* @param endTime 过滤火点结束卫星时间不传代表不指定结束时间
* @param satelliteType 过滤传感器类型不传代表查询全部类型的传感器
* @param landType 过滤地物类型不传代表查询全部地物类型
* @return 符合条件的火点列表
*/
public List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) { public List<FirePointEntity> queryFirePoint(String code, String startTime, String endTime, String satelliteType, String landType) {
Specification<FirePointEntity> specification = (root, criteriaQuery, criteriaBuilder) -> { Specification<FirePointEntity> specification = (root, criteriaQuery, criteriaBuilder) -> {
//查询条件集合 //查询条件集合