修改定时报文,平安报水价同步

This commit is contained in:
蒾酒
2025-01-08 07:58:31 +08:00
parent ee536f7386
commit 6eae096ba7
2 changed files with 5 additions and 5 deletions

View File

@ -135,7 +135,7 @@ public class DeviceOtherMsgConsumer {
Integer addr = data1.getInt("meterAddr");
//获取水单价
Float waterFees = data1.getFloat("waterFees");
BigDecimal waterFees = data1.getBigDecimal("waterFees");
Integer runStatus = null;
if(valveState==0){
runStatus=2;
@ -152,7 +152,7 @@ public class DeviceOtherMsgConsumer {
up.set(DeviceReportInfo::getAddr,addr);
}
if(waterFees!=null){
up.set(DeviceReportInfo::getWaterFree,waterFees);
up.set(DeviceReportInfo::getWaterFree,waterFees.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
}
if(meterIns!=null){
up.set(DeviceReportInfo::getInsFlow,meterIns);
@ -199,7 +199,7 @@ public class DeviceOtherMsgConsumer {
Integer addr = data1.getInt("meterAddr");
//获取水单价
Float waterFees = data1.getFloat("waterFees");
BigDecimal waterFees = data1.getBigDecimal("waterFees");
Integer runStatus = null;
if(valveState==0){
runStatus=2;
@ -216,7 +216,7 @@ public class DeviceOtherMsgConsumer {
up.set(DeviceReportInfo::getAddr,addr);
}
if(waterFees!=null){
up.set(DeviceReportInfo::getWaterFree,waterFees);
up.set(DeviceReportInfo::getWaterFree,waterFees.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
}
if(meterIns!=null){
up.set(DeviceReportInfo::getInsFlow,meterIns);