修改定时报文,平安报水价同步
This commit is contained in:
@ -62,7 +62,7 @@ server:
|
|||||||
spring:
|
spring:
|
||||||
# 环境配置,dev=开发环境,prod=生产环境
|
# 环境配置,dev=开发环境,prod=生产环境
|
||||||
profiles:
|
profiles:
|
||||||
active: dev # 环境配置,dev=开发环境,prod=生产环境
|
active: prod # 环境配置,dev=开发环境,prod=生产环境
|
||||||
# 资源信息
|
# 资源信息
|
||||||
messages:
|
messages:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
|
@ -135,7 +135,7 @@ public class DeviceOtherMsgConsumer {
|
|||||||
Integer addr = data1.getInt("meterAddr");
|
Integer addr = data1.getInt("meterAddr");
|
||||||
|
|
||||||
//获取水单价
|
//获取水单价
|
||||||
Float waterFees = data1.getFloat("waterFees");
|
BigDecimal waterFees = data1.getBigDecimal("waterFees");
|
||||||
Integer runStatus = null;
|
Integer runStatus = null;
|
||||||
if(valveState==0){
|
if(valveState==0){
|
||||||
runStatus=2;
|
runStatus=2;
|
||||||
@ -152,7 +152,7 @@ public class DeviceOtherMsgConsumer {
|
|||||||
up.set(DeviceReportInfo::getAddr,addr);
|
up.set(DeviceReportInfo::getAddr,addr);
|
||||||
}
|
}
|
||||||
if(waterFees!=null){
|
if(waterFees!=null){
|
||||||
up.set(DeviceReportInfo::getWaterFree,waterFees);
|
up.set(DeviceReportInfo::getWaterFree,waterFees.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
if(meterIns!=null){
|
if(meterIns!=null){
|
||||||
up.set(DeviceReportInfo::getInsFlow,meterIns);
|
up.set(DeviceReportInfo::getInsFlow,meterIns);
|
||||||
@ -199,7 +199,7 @@ public class DeviceOtherMsgConsumer {
|
|||||||
Integer addr = data1.getInt("meterAddr");
|
Integer addr = data1.getInt("meterAddr");
|
||||||
|
|
||||||
//获取水单价
|
//获取水单价
|
||||||
Float waterFees = data1.getFloat("waterFees");
|
BigDecimal waterFees = data1.getBigDecimal("waterFees");
|
||||||
Integer runStatus = null;
|
Integer runStatus = null;
|
||||||
if(valveState==0){
|
if(valveState==0){
|
||||||
runStatus=2;
|
runStatus=2;
|
||||||
@ -216,7 +216,7 @@ public class DeviceOtherMsgConsumer {
|
|||||||
up.set(DeviceReportInfo::getAddr,addr);
|
up.set(DeviceReportInfo::getAddr,addr);
|
||||||
}
|
}
|
||||||
if(waterFees!=null){
|
if(waterFees!=null){
|
||||||
up.set(DeviceReportInfo::getWaterFree,waterFees);
|
up.set(DeviceReportInfo::getWaterFree,waterFees.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
if(meterIns!=null){
|
if(meterIns!=null){
|
||||||
up.set(DeviceReportInfo::getInsFlow,meterIns);
|
up.set(DeviceReportInfo::getInsFlow,meterIns);
|
||||||
|
Reference in New Issue
Block a user