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

线路预警

上级 8abffb2c
......@@ -79,7 +79,7 @@ public class LineWarnLoadWarnServiceImpl implements LineWarnLoadWarnService {
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).intValue();
// 未达到时间占比
if (pendingOrderTime.plusMinutes(time).isBefore(LocalDateTime.now())){return;}
if (pendingOrderTime.plusMinutes(time).isAfter(LocalDateTime.now())){return;}
// 达到任务占比
if (lineWarnConfig.getTaskCompleteRatio().compareTo(taskCompleteRatio) >= 0) {return;}
......
......@@ -119,12 +119,15 @@ public class LineWarnMqHandlerServiceImpl implements LineWarnMqHandlerService {
lineWarnCommonInfo.setPendingOrderTime(lineWarnOrderGoods.getPendingOrderTime());
lineWarnCommonInfo.setArriveReceiveExpectTime(lineWarnOrderGoods.getArriveReceiveExpectTime());
// 任务量
lineWarnCommonInfo.setTaskWeight(orderGoods.getExtractWeight());
// 装卸车时间
Integer loadTimeAvg = orderChildDao.loadTimeAvg(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId(),
Integer loadTimeAvg = orderChildDao
.loadTimeAvg(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId(),
orderGoods.getSendSystemAddressId(), orderGoods.getReceiveSystemAddressId(),
LocalDateTimeUtils.formatTime(LocalDateTime.now().minusDays(DEFAULT_LOAD_UNLOAD_DAY)));
Integer unloadTimeAvg = orderChildDao.unloadTimeAvg(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId(),
Integer unloadTimeAvg = orderChildDao
.unloadTimeAvg(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId(),
orderGoods.getSendSystemAddressId(), orderGoods.getReceiveSystemAddressId(),
LocalDateTimeUtils.formatTime(LocalDateTime.now().minusDays(DEFAULT_LOAD_UNLOAD_DAY)));
lineWarnCommonInfo.setLoadTimeAvg(loadTimeAvg!=null? loadTimeAvg:DEFAULT_LOAD_UNLOAD_TIME);
......@@ -277,6 +280,9 @@ public class LineWarnMqHandlerServiceImpl implements LineWarnMqHandlerService {
.getByOrderGoodsNo(mq.getOrderGoodsNo()).orElseThrow(ResultEnum.DATA_NOT_FIND);
OrderGoods orderGoods = orderGoodsDao
.getByOrderGoodsNo(mq.getOrderGoodsNo()).orElseThrow(ResultEnum.DATA_NOT_FIND);
if (Objects.equals(lineWarnOrderGoods.getWarnStatus(), LineWarnOrderGoodsEnum.WarnStatus.DISABLE.getCode())) {
return;
}
// 运单异常
try{
......
......@@ -81,7 +81,7 @@ public class LineWarnTakeWarnServiceImpl implements LineWarnTakeWarnService {
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).intValue();
// 未达到时间占比
if (pendingOrderTime.plusMinutes(time).isBefore(LocalDateTime.now())){return;}
if (pendingOrderTime.plusMinutes(time).isAfter(LocalDateTime.now())){return;}
// 达到任务占比
if (lineWarnConfig.getTaskCompleteRatio().compareTo(taskCompleteRatio) >= 0) {return;}
......
......@@ -74,7 +74,7 @@ public class LineWarnUnloadServiceImpl implements LineWarnUnloadWarnService {
int time = lineWarnConfig.getTimeRatio().multiply(new BigDecimal(difTime)).intValue();
// 未达到时间占比
if (pendingOrderTime.plusMinutes(time).isBefore(LocalDateTime.now())){return;}
if (pendingOrderTime.plusMinutes(time).isAfter(LocalDateTime.now())){return;}
// 达到任务占比
if (lineWarnConfig.getTaskCompleteRatio().compareTo(taskCompleteRatio) >= 0) {return;}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论