修改定时报文,平安报水价同步
This commit is contained in:
parent
ee536f7386
commit
6eae096ba7
@ -62,7 +62,7 @@ server:
|
||||
spring:
|
||||
# 环境配置,dev=开发环境,prod=生产环境
|
||||
profiles:
|
||||
active: dev # 环境配置,dev=开发环境,prod=生产环境
|
||||
active: prod # 环境配置,dev=开发环境,prod=生产环境
|
||||
# 资源信息
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user