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

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

......@@ -47,6 +47,7 @@ public class LineWarnMqHandlerServiceImpl implements LineWarnMqHandlerService {
// 缺省装卸车时间
private static final int DEFAULT_LOAD_UNLOAD_TIME = 60;
private static final int DEFAULT_LOAD_UNLOAD_DAY = 7;
private static final int SECOND_PER_MIN = 60;
@Autowired
private ClxMessageConfig clxMessageConfig;
......@@ -126,12 +127,18 @@ public class LineWarnMqHandlerServiceImpl implements LineWarnMqHandlerService {
.loadTimeAvg(orderGoods.getSendAddressId(), orderGoods.getReceiveAddressId(),
orderGoods.getSendSystemAddressId(), orderGoods.getReceiveSystemAddressId(),
LocalDateTimeUtils.formatTime(LocalDateTime.now().minusDays(DEFAULT_LOAD_UNLOAD_DAY)));
if (loadTimeAvg == null) {loadTimeAvg = DEFAULT_LOAD_UNLOAD_TIME;}
else {loadTimeAvg = loadTimeAvg/SECOND_PER_MIN;}
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);
lineWarnCommonInfo.setUnloadTimeAvg(unloadTimeAvg!=null? unloadTimeAvg:DEFAULT_LOAD_UNLOAD_TIME);
if (unloadTimeAvg == null) {unloadTimeAvg = DEFAULT_LOAD_UNLOAD_TIME;}
else {unloadTimeAvg = unloadTimeAvg/SECOND_PER_MIN;}
lineWarnCommonInfo.setLoadTimeAvg(loadTimeAvg);
lineWarnCommonInfo.setUnloadTimeAvg(unloadTimeAvg);
log.info("线路预警, lineWarnCommonInfo:{}", lineWarnCommonInfo);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论