补充注释
This commit is contained in:
parent
6eebae91e9
commit
bde50770ca
@ -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);
|
||||||
|
@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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(山东省内),会判断CountyCode、CountyName、TownCode,
|
||||||
|
* 如果不能接收到TownCode(其他省份),会判断CountyCode、CountyName,
|
||||||
|
* <p>
|
||||||
|
* 如果根据经纬度反算出来的变量都一致,就更新TownCode、TownName、FirePointAddress,无备注。
|
||||||
|
* 如果不一致,就只更新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(山东省内),会判断CountyCode、CountyName、TownCode,
|
||||||
|
* 如果不能接收到TownCode(其他省份),会判断CountyCode、CountyName,
|
||||||
|
* <p>
|
||||||
|
* 如果根据经纬度反算出来的变量都一致,就更新TownCode、TownName、FirePointAddress,无备注。
|
||||||
|
* 如果不一致,就只更新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();
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user