提交 15dfa76a authored 作者: 艾庆国's avatar 艾庆国

线路预警

上级 744f62a3
...@@ -3,10 +3,14 @@ package com.clx.performance.extranal.order; ...@@ -3,10 +3,14 @@ package com.clx.performance.extranal.order;
public interface InternalReportService { public interface InternalReportService {
Boolean checkLineJam(Integer sendSystemAddressId, Boolean checkLineJam(Integer sendSystemAddressId,
Integer receiveSystemAddressId, Integer receiveSystemAddressId,
Integer sendAddressId,
Integer receiveAddressId,
String beginTime, String beginTime,
Integer duration); Integer duration);
Boolean checkLineAbnormal(Integer sendSystemAddressId, Boolean checkLineAbnormal(Integer sendSystemAddressId,
Integer receiveSystemAddressId, Integer receiveSystemAddressId,
Integer sendAddressId,
Integer receiveAddressId,
String beginTime); String beginTime);
} }
...@@ -18,10 +18,15 @@ public class InternalReportServiceImpl implements InternalReportService { ...@@ -18,10 +18,15 @@ public class InternalReportServiceImpl implements InternalReportService {
@Override @Override
public Boolean checkLineJam(Integer sendSystemAddressId, public Boolean checkLineJam(Integer sendSystemAddressId,
Integer receiveSystemAddressId, Integer receiveSystemAddressId,
Integer sendAddressId,
Integer receiveAddressId,
String beginTime, String beginTime,
Integer duration) { Integer duration) {
return Optional.of(internalReportFeign.checkLineJam(sendSystemAddressId, return Optional.of(internalReportFeign.checkLineJam(sendSystemAddressId,
receiveSystemAddressId,beginTime,duration)) receiveSystemAddressId,
sendAddressId,
receiveAddressId,
beginTime,duration))
.filter(Result::succeed) .filter(Result::succeed)
.map(Result::getData) .map(Result::getData)
.orElse(false); .orElse(false);
...@@ -29,9 +34,14 @@ public class InternalReportServiceImpl implements InternalReportService { ...@@ -29,9 +34,14 @@ public class InternalReportServiceImpl implements InternalReportService {
@Override @Override
public Boolean checkLineAbnormal(Integer sendSystemAddressId, public Boolean checkLineAbnormal(Integer sendSystemAddressId,
Integer receiveSystemAddressId, Integer receiveSystemAddressId,
Integer sendAddressId,
Integer receiveAddressId,
String beginTime) { String beginTime) {
return Optional.of(internalReportFeign.checkLineAbnormal(sendSystemAddressId, return Optional.of(internalReportFeign.checkLineAbnormal(sendSystemAddressId,
receiveSystemAddressId,beginTime)) receiveSystemAddressId,
sendAddressId,
receiveAddressId,
beginTime))
.filter(Result::succeed) .filter(Result::succeed)
.map(Result::getData) .map(Result::getData)
.orElse(false); .orElse(false);
......
...@@ -60,6 +60,8 @@ public class LineWarnCongestionWarnServiceImpl implements LineWarnCongestionWarn ...@@ -60,6 +60,8 @@ public class LineWarnCongestionWarnServiceImpl implements LineWarnCongestionWarn
// 检测是否拥堵 // 检测是否拥堵
Boolean flag = internalReportService.checkLineJam(orderGoods.getSendSystemAddressId(), Boolean flag = internalReportService.checkLineJam(orderGoods.getSendSystemAddressId(),
orderGoods.getReceiveSystemAddressId(), orderGoods.getReceiveSystemAddressId(),
orderGoods.getSendAddressId(),
orderGoods.getReceiveAddressId(),
LocalDateTimeUtils.formatTime(beginTime), lineWarnConfig.getCongestionTime()); LocalDateTimeUtils.formatTime(beginTime), lineWarnConfig.getCongestionTime());
if (!flag) {return;} if (!flag) {return;}
......
...@@ -58,6 +58,8 @@ public class LineWarnLineWarnServiceImpl implements LineWarnLineWarnService { ...@@ -58,6 +58,8 @@ public class LineWarnLineWarnServiceImpl implements LineWarnLineWarnService {
// 检测线路是否异常 // 检测线路是否异常
Boolean flag = internalReportService.checkLineAbnormal(orderGoods.getSendSystemAddressId(), Boolean flag = internalReportService.checkLineAbnormal(orderGoods.getSendSystemAddressId(),
orderGoods.getReceiveSystemAddressId(), orderGoods.getReceiveSystemAddressId(),
orderGoods.getSendAddressId(),
orderGoods.getReceiveAddressId(),
LocalDateTimeUtils.formatTime(beginTime)); LocalDateTimeUtils.formatTime(beginTime));
if (!flag) {return;} if (!flag) {return;}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论