补充注释

This commit is contained in:
liuchengqian 2023-02-03 15:00:07 +08:00
parent 6eebae91e9
commit bde50770ca
4 changed files with 40 additions and 0 deletions

View File

@ -27,11 +27,17 @@ public class DispatchFirePointController {
return firePointService.debug(); return firePointService.debug();
} }
/**
* 普通渠道推送火点到秸秆系统
*/
@PostMapping("/insertFirePointChannelOrdinary") @PostMapping("/insertFirePointChannelOrdinary")
public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) { public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) {
return firePointService.insertFirePointChannelOrdinary(firePointQo); return firePointService.insertFirePointChannelOrdinary(firePointQo);
} }
/**
* 精准渠道推送火点到秸秆系统
*/
@PostMapping("/insertFirePointChannelPrecise") @PostMapping("/insertFirePointChannelPrecise")
public String insertFirePointChannelPrecise(@RequestBody AllFirePointQo firePointQo) { public String insertFirePointChannelPrecise(@RequestBody AllFirePointQo firePointQo) {
return firePointService.insertFirePointChannelPrecise(firePointQo); return firePointService.insertFirePointChannelPrecise(firePointQo);

View File

@ -6,8 +6,14 @@ public interface DispatchFirePointService {
String debug(); String debug();
/**
* 普通渠道推送火点到秸秆系统
*/
String insertFirePointChannelOrdinary(AllFirePointQo firePointQo); String insertFirePointChannelOrdinary(AllFirePointQo firePointQo);
/**
* 精准渠道推送火点到秸秆系统
*/
String insertFirePointChannelPrecise(AllFirePointQo firePointQo); String insertFirePointChannelPrecise(AllFirePointQo firePointQo);
} }

View File

@ -71,6 +71,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
return "null"; return "null";
} }
/**
* 普通渠道推送火点到秸秆系统
*/
@Override @Override
public String insertFirePointChannelOrdinary(AllFirePointQo firePointQo) { public String insertFirePointChannelOrdinary(AllFirePointQo firePointQo) {
@ -134,6 +137,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale);
} }
/**
* 精准渠道推送火点到秸秆系统
*/
@Override @Override
public String insertFirePointChannelPrecise(AllFirePointQo firePointQo) { public String insertFirePointChannelPrecise(AllFirePointQo firePointQo) {
@ -179,6 +185,14 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale);
} }
/**
* 绑定火点位置
* 如果能接收到TownCode山东省内会判断CountyCodeCountyNameTownCode
* 如果不能接收到TownCode其他省份会判断CountyCodeCountyName
* <p>
* 如果根据经纬度反算出来的变量都一致就更新TownCodeTownNameFirePointAddress无备注
* 如果不一致就只更新FirePointAddress备注存储差异信息
*/
private void bindFirePointAddress(FirePointPreciseEntity firePointPreciseEntity) { private void bindFirePointAddress(FirePointPreciseEntity firePointPreciseEntity) {
String countyCode = firePointPreciseEntity.getCountyCode(); String countyCode = firePointPreciseEntity.getCountyCode();
String countyName = firePointPreciseEntity.getCountyName(); String countyName = firePointPreciseEntity.getCountyName();
@ -198,6 +212,14 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
} }
} }
/**
* 绑定火点位置
* 如果能接收到TownCode山东省内会判断CountyCodeCountyNameTownCode
* 如果不能接收到TownCode其他省份会判断CountyCodeCountyName
* <p>
* 如果根据经纬度反算出来的变量都一致就更新TownCodeTownNameFirePointAddress无备注
* 如果不一致就只更新FirePointAddress备注存储差异信息
*/
private void bindFirePointAddress(FirePointOrdinaryEntity firePointOrdinaryEntity) { private void bindFirePointAddress(FirePointOrdinaryEntity firePointOrdinaryEntity) {
String countyCode = firePointOrdinaryEntity.getCountyCode(); String countyCode = firePointOrdinaryEntity.getCountyCode();
String countyName = firePointOrdinaryEntity.getCountyName(); String countyName = firePointOrdinaryEntity.getCountyName();

View File

@ -19,6 +19,9 @@ public class DispatchFirePointUtils {
private DispatchFirePointUtils() { private DispatchFirePointUtils() {
} }
/**
* 检查火点卫星时间是否在精准渠道配置时间范围内
*/
public static boolean checkIfInPreciseTimeRange(String fireCode, LocalDateTime satelliteLocalDateTime, List<FirePointChannelConfigEntity> firePointChannelConfigEntityList) { public static boolean checkIfInPreciseTimeRange(String fireCode, LocalDateTime satelliteLocalDateTime, List<FirePointChannelConfigEntity> firePointChannelConfigEntityList) {
if (firePointChannelConfigEntityList == null || firePointChannelConfigEntityList.size() == 0) { if (firePointChannelConfigEntityList == null || firePointChannelConfigEntityList.size() == 0) {
int resValue1 = 0; int resValue1 = 0;
@ -107,6 +110,9 @@ public class DispatchFirePointUtils {
} }
/** /**
* 将formattedTime转化为LocalDateTime格式并将年字段设置为targetYear
* 转化失败返回null
*
* @param formattedTime 2022-01-01 00:00:00 * @param formattedTime 2022-01-01 00:00:00
*/ */
private static LocalDateTime obtainLocalDateTimeSameYear(int targetYear, String formattedTime) { private static LocalDateTime obtainLocalDateTimeSameYear(int targetYear, String formattedTime) {