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

Merge branch 'refs/heads/v16.3_line_warn_20240528' into test

Former-commit-id: 54678ed4
......@@ -68,4 +68,18 @@ public class LineWarnCommonServiceImpl implements LineWarnCommonService {
lineWarnMqService.lineWarnNotice(lineWarnInfo.getId());
}
/**
* 暂停检测
*/
@Override
public boolean suspendCheck(LineWarnInfo lineWarnInfo){
if (lineWarnInfo == null) {return false;}
if (lineWarnInfo.getSuspendTime() != null && lineWarnInfo.getSuspendTime().isAfter(LocalDateTime.now())){
return true;
}
return false;
}
}
......@@ -57,6 +57,10 @@ public class LineWarnCongestionWarnServiceImpl implements LineWarnCongestionWarn
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
// 检测是否拥堵
Boolean flag = internalReportService.checkLineJam(orderGoods.getSendSystemAddressId(),
orderGoods.getReceiveSystemAddressId(),
......
......@@ -55,6 +55,10 @@ public class LineWarnLineWarnServiceImpl implements LineWarnLineWarnService {
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
// 检测线路是否异常
Boolean flag = internalReportService.checkLineAbnormal(orderGoods.getSendSystemAddressId(),
orderGoods.getReceiveSystemAddressId(),
......
......@@ -80,6 +80,10 @@ public class LineWarnLoadWarnServiceImpl implements LineWarnLoadWarnService {
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).movePointLeft(2).intValue();
// 未达到时间占比
......
......@@ -46,6 +46,10 @@ public class LineWarnOrderChildWarnServiceImpl implements LineWarnOrderChildWarn
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
// 更新
lineWarnCommonService.lineWarnInfoUpdate(orderGoods, lineWarnInfo, lineWarnConfig);
}
......
......@@ -82,6 +82,10 @@ public class LineWarnTakeWarnServiceImpl implements LineWarnTakeWarnService {
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).movePointLeft(2).intValue();
// 未达到时间占比
......
......@@ -75,6 +75,10 @@ public class LineWarnUnloadServiceImpl implements LineWarnUnloadWarnService {
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).movePointLeft(2).intValue();
// 未达到时间占比
......
......@@ -61,6 +61,10 @@ public class LineWarnWeatherWarnServiceImpl implements LineWarnWeatherWarnServic
return;
}
// 暂停检测
boolean suspend = lineWarnCommonService.suspendCheck(lineWarnInfo);
if (suspend) {return;}
Optional<FeignAddressVO> addressOptional = addressService
.getSendAndReceiveAddress(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId());
if (addressOptional.isEmpty()) {return;}
......
......@@ -9,4 +9,6 @@ public interface LineWarnCommonService {
void lineWarnInfoUpdate(OrderGoods orderGoods, LineWarnInfo lineWarnInfo, LineWarnConfig lineWarnConfig);
void lineWarnInfoUpdate(OrderGoods orderGoods, LineWarnInfo lineWarnInfo, LineWarnConfig lineWarnConfig, String weather);
boolean suspendCheck(LineWarnInfo lineWarnInfo);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论