Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
This commit is contained in:
@@ -263,7 +263,7 @@ public class TbMeterRecordServiceImpl implements ITbMeterRecordService {
|
|||||||
boolean isDaytime = hour > 8 && hour <= 20;
|
boolean isDaytime = hour > 8 && hour <= 20;
|
||||||
BigDecimal threshold = isDaytime ? info.getDayWarning() : info.getNightWarning();
|
BigDecimal threshold = isDaytime ? info.getDayWarning() : info.getNightWarning();
|
||||||
// 如果阈值为0,则不处理(阈值不为0且读数大于阈值,自动上报)
|
// 如果阈值为0,则不处理(阈值不为0且读数大于阈值,自动上报)
|
||||||
if (threshold.compareTo(BigDecimal.ZERO) != 0 && record.getCurrentReading().compareTo(threshold) > 0) {
|
if (threshold.compareTo(BigDecimal.ZERO) != 0 && (record.getCurrentReading().subtract(record.getPreviousReading())).compareTo(threshold) > 0) {
|
||||||
// 根据仪表类型设置工单名称和类型
|
// 根据仪表类型设置工单名称和类型
|
||||||
String orderName = "能耗异常";
|
String orderName = "能耗异常";
|
||||||
Long orderType = 0L;
|
Long orderType = 0L;
|
||||||
|
Reference in New Issue
Block a user