diff --git a/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java b/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java index 4166c34..0c4abf0 100644 --- a/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java +++ b/src/main/java/com/xkrs/straw/controller/DispatchFirePointController.java @@ -27,11 +27,17 @@ public class DispatchFirePointController { return firePointService.debug(); } + /** + * 普通渠道推送火点到秸秆系统 + */ @PostMapping("/insertFirePointChannelOrdinary") public String insertFirePointChannelOrdinary(@RequestBody AllFirePointQo firePointQo) { return firePointService.insertFirePointChannelOrdinary(firePointQo); } + /** + * 精准渠道推送火点到秸秆系统 + */ @PostMapping("/insertFirePointChannelPrecise") public String insertFirePointChannelPrecise(@RequestBody AllFirePointQo firePointQo) { return firePointService.insertFirePointChannelPrecise(firePointQo); diff --git a/src/main/java/com/xkrs/straw/service/DispatchFirePointService.java b/src/main/java/com/xkrs/straw/service/DispatchFirePointService.java index 3ac0e55..194664a 100644 --- a/src/main/java/com/xkrs/straw/service/DispatchFirePointService.java +++ b/src/main/java/com/xkrs/straw/service/DispatchFirePointService.java @@ -6,8 +6,14 @@ public interface DispatchFirePointService { String debug(); + /** + * 普通渠道推送火点到秸秆系统 + */ String insertFirePointChannelOrdinary(AllFirePointQo firePointQo); + /** + * 精准渠道推送火点到秸秆系统 + */ String insertFirePointChannelPrecise(AllFirePointQo firePointQo); } diff --git a/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java b/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java index 07bbff6..7e505fe 100644 --- a/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java +++ b/src/main/java/com/xkrs/straw/service/impl/DispatchFirePointServiceImpl.java @@ -71,6 +71,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { return "null"; } + /** + * 普通渠道推送火点到秸秆系统 + */ @Override public String insertFirePointChannelOrdinary(AllFirePointQo firePointQo) { @@ -134,6 +137,9 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale); } + /** + * 精准渠道推送火点到秸秆系统 + */ @Override public String insertFirePointChannelPrecise(AllFirePointQo firePointQo) { @@ -179,6 +185,14 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功", locale); } + /** + * 绑定火点位置 + * 如果能接收到TownCode(山东省内),会判断CountyCode、CountyName、TownCode, + * 如果不能接收到TownCode(其他省份),会判断CountyCode、CountyName, + *
+ * 如果根据经纬度反算出来的变量都一致,就更新TownCode、TownName、FirePointAddress,无备注。 + * 如果不一致,就只更新FirePointAddress,备注存储差异信息 + */ private void bindFirePointAddress(FirePointPreciseEntity firePointPreciseEntity) { String countyCode = firePointPreciseEntity.getCountyCode(); String countyName = firePointPreciseEntity.getCountyName(); @@ -198,6 +212,14 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService { } } + /** + * 绑定火点位置 + * 如果能接收到TownCode(山东省内),会判断CountyCode、CountyName、TownCode, + * 如果不能接收到TownCode(其他省份),会判断CountyCode、CountyName, + *
+ * 如果根据经纬度反算出来的变量都一致,就更新TownCode、TownName、FirePointAddress,无备注。
+ * 如果不一致,就只更新FirePointAddress,备注存储差异信息
+ */
private void bindFirePointAddress(FirePointOrdinaryEntity firePointOrdinaryEntity) {
String countyCode = firePointOrdinaryEntity.getCountyCode();
String countyName = firePointOrdinaryEntity.getCountyName();
diff --git a/src/main/java/com/xkrs/straw/utils/DispatchFirePointUtils.java b/src/main/java/com/xkrs/straw/utils/DispatchFirePointUtils.java
index 22afefa..f72b8af 100644
--- a/src/main/java/com/xkrs/straw/utils/DispatchFirePointUtils.java
+++ b/src/main/java/com/xkrs/straw/utils/DispatchFirePointUtils.java
@@ -19,6 +19,9 @@ public class DispatchFirePointUtils {
private DispatchFirePointUtils() {
}
+ /**
+ * 检查火点卫星时间是否在精准渠道配置时间范围内
+ */
public static boolean checkIfInPreciseTimeRange(String fireCode, LocalDateTime satelliteLocalDateTime, List