修改定时报文,平安报水价同步
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user