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

线路预警

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