This commit is contained in:
liuchengqian 2023-03-08 13:59:27 +08:00
parent ea4f0a824b
commit 5394ccc40a
6 changed files with 54 additions and 62 deletions

View File

@ -1,29 +1,30 @@
package com.xkrs.service;
/**
* @author XinYi Song
*/
public interface FirePointService {
// /**
// * download vip user's fire point
// */
// String downloadVipUserFilePoint(HttpServletRequest request, HttpServletResponse response);
// String downloadFirePoint(HttpServletRequest request, HttpServletResponse response, String ids);
/**
* (Complete)
* 查询火点播报无token
*
* @param limit 最大数量
*/
String queryFirePointBroadcast(Integer limit);
/**
* 动态多条件查询
*/
String queryFirePoint(String token, String code, String startTime, String endTime, String satelliteType, String landType);
/**
* 查询今天的火点信息 (Complete)
* 查询今天的火点信息
*/
String selectTodayFirePoint(String token, String countyCode);
/**
* 根据火点编码查询火点信息 (Complete)
* 根据火点编码查询火点信息
*/
String selectFirePointByCode(String fireCode);
}

View File

@ -1,20 +1,20 @@
package com.xkrs.service.impl;
import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.straw.dao.CountyCodeWeiXinDao;
import com.xkrs.straw.dao.StreetDao;
import com.xkrs.service.FirePointService;
import com.xkrs.straw.service.StreetService;
import com.xkrs.straw.dao.CountyCodeWeiXinDao;
import com.xkrs.straw.dao.FirePointOrdinaryDao;
import com.xkrs.straw.dao.StreetDao;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.helper.FirePointQueryManager;
import com.xkrs.straw.model.bean.FirePointQueryResultBean;
import com.xkrs.straw.model.entity.FirePointOrdinaryEntity;
import com.xkrs.straw.model.entity.SysUserEntity;
import com.xkrs.straw.model.helper.PushHelper;
import com.xkrs.straw.model.vo.AllFirePointVo;
import com.xkrs.straw.utilsnew.FirePointConvertUtils;
import com.xkrs.straw.helper.FirePointQueryManager;
import com.xkrs.straw.service.StreetService;
import com.xkrs.straw.utilsnew.DateTimeUtils;
import com.xkrs.straw.utilsnew.FirePointConvertUtils;
import com.xkrs.straw.utilsnew.TokenUtil;
import org.apache.hc.core5.util.TextUtils;
import org.slf4j.Logger;
@ -131,7 +131,22 @@ public class FirePointServiceImpl implements FirePointService {
// }
/**
* Complete
* 查询火点播报无token
*
* @param limit 最大数量
*/
@Override
public String queryFirePointBroadcast(Integer limit) {
FirePointQueryResultBean firePointQueryResult = firePointQueryManager.queryFirePointBroadcast(limit);
if (firePointQueryResult.isSuccess()) {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointQueryResult.getList(), locale);
} else {
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, firePointQueryResult.getErrorMessage(), locale);
}
}
/**
* 动态多条件查询
*/
@Override
public String queryFirePoint(String token, String code, String startTime, String endTime, String satelliteType, String landType) {
@ -154,7 +169,7 @@ public class FirePointServiceImpl implements FirePointService {
}
/**
* Complete
* 查询今天的火点信息
*/
// @Cacheable(keyGenerator = "keyGenerator", unless = "#result == null")
@Override
@ -187,7 +202,7 @@ public class FirePointServiceImpl implements FirePointService {
}
/**
* 根据火点编码查询火点信息 (Complete)
* 根据火点编码查询火点信息
*/
@Override
public String selectFirePointByCode(String fireCode) {

View File

@ -2,12 +2,15 @@ package com.xkrs.straw.controller;
import com.xkrs.service.impl.FirePointServiceImpl;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.helper.FirePointSubscribeManager;
import com.xkrs.straw.model.qo.AllFirePointQo;
import com.xkrs.straw.service.DispatchFirePointService;
import com.xkrs.straw.helper.FirePointSubscribeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@ -70,15 +73,4 @@ public class DispatchFirePointController {
return firePointService.insertFirePointChannelPrecise(firePointQo);
}
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
@GetMapping("/queryFirePointBroadcast")
public String queryFirePointBroadcast(@RequestParam("limit") Integer limit) {
return firePointService.queryFirePointBroadcast(limit);
}
}

View File

@ -2,10 +2,10 @@ package com.xkrs.straw.controller;
import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.service.FirePointService;
import com.xkrs.straw.service.StreetService;
import com.xkrs.service.impl.FirePointServiceImpl;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.helper.FirePointQueryManager;
import com.xkrs.straw.service.StreetService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.i18n.LocaleContextHolder;
@ -75,6 +75,16 @@ public class FirePointController {
// return firePointService.downloadFirePoint(request, response, ids);
// }
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
@GetMapping("/queryFirePointBroadcast")
public String queryFirePointBroadcast(@RequestParam("limit") Integer limit) {
return firePointService.queryFirePointBroadcast(limit);
}
/**
* 动态多条件查询火点列表(Complete)
*/

View File

@ -14,10 +14,4 @@ public interface DispatchFirePointService {
*/
String insertFirePointChannelPrecise(AllFirePointQo firePointQo);
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
String queryFirePointBroadcast(Integer limit);
}

View File

@ -1,25 +1,20 @@
package com.xkrs.straw.service.impl;
import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.straw.dao.StreetDao;
import com.xkrs.straw.model.entity.StreetEntity;
import com.xkrs.straw.dao.FirePointChannelConfigDao;
import com.xkrs.straw.dao.FirePointOrdinaryDao;
import com.xkrs.straw.dao.FirePointPreciseDao;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.dao.*;
import com.xkrs.straw.helper.FirePointPushManager;
import com.xkrs.straw.helper.FirePointQueryManager;
import com.xkrs.straw.helper.GeoCodeHelper;
import com.xkrs.straw.model.bean.DataWrapper2;
import com.xkrs.straw.model.bean.FirePointQueryResultBean;
import com.xkrs.straw.model.entity.FirePointChannelConfigEntity;
import com.xkrs.straw.model.entity.FirePointOrdinaryEntity;
import com.xkrs.straw.model.entity.FirePointPreciseEntity;
import com.xkrs.straw.model.entity.StreetEntity;
import com.xkrs.straw.model.qo.AllFirePointQo;
import com.xkrs.straw.service.DispatchFirePointService;
import com.xkrs.straw.utilsnew.DateTimeUtils;
import com.xkrs.straw.utilsnew.FirePointDispatchUtils;
import com.xkrs.straw.utilsnew.FirePointFilterUtils;
import com.xkrs.straw.helper.FirePointPushManager;
import com.xkrs.straw.helper.FirePointQueryManager;
import com.xkrs.straw.utilsnew.DateTimeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.i18n.LocaleContextHolder;
@ -302,19 +297,4 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
}
}
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
@Override
public String queryFirePointBroadcast(Integer limit) {
FirePointQueryResultBean firePointQueryResult = firePointQueryManager.queryFirePointBroadcast(limit);
if (firePointQueryResult.isSuccess()) {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointQueryResult.getList(), locale);
} else {
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, firePointQueryResult.getErrorMessage(), locale);
}
}
}