|
@@ -613,7 +613,7 @@ public class OnlineMonitorImpl implements OnlineMonitorService {
|
|
if(attributeEntity != null) {
|
|
if(attributeEntity != null) {
|
|
//赋值
|
|
//赋值
|
|
monData.setDataValue(attributeEntity.getDataValue());
|
|
monData.setDataValue(attributeEntity.getDataValue());
|
|
- monData.setUnit(attributeEntity.getUnit());
|
|
|
|
|
|
+ //monData.setUnit(attributeEntity.getUnit());
|
|
if (monData.getAttributeType() != null && (monData.getAttributeType().equals("1") || monData.getAttributeType().equals("2"))) {//如果是状态值 需转换
|
|
if (monData.getAttributeType() != null && (monData.getAttributeType().equals("1") || monData.getAttributeType().equals("2"))) {//如果是状态值 需转换
|
|
DecimalFormat decimalFormat = new DecimalFormat("###################.###########");//去掉末尾小数点
|
|
DecimalFormat decimalFormat = new DecimalFormat("###################.###########");//去掉末尾小数点
|
|
String specsValue = attributeEntity.getDataValue() == null ? null : decimalFormat.format(attributeEntity.getDataValue());
|
|
String specsValue = attributeEntity.getDataValue() == null ? null : decimalFormat.format(attributeEntity.getDataValue());
|
|
@@ -714,7 +714,7 @@ public class OnlineMonitorImpl implements OnlineMonitorService {
|
|
if (attributeEntity != null) {
|
|
if (attributeEntity != null) {
|
|
//实时数据
|
|
//实时数据
|
|
monitorData.setDataValue(attributeEntity.getDataValue());
|
|
monitorData.setDataValue(attributeEntity.getDataValue());
|
|
- monitorData.setUnit(attributeEntity.getUnit());
|
|
|
|
|
|
+ //monitorData.setUnit(attributeEntity.getUnit());
|
|
SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式
|
|
SimpleDateFormat formatdate = new SimpleDateFormat("YYYY-MM-dd");//日期算换格式
|
|
//计算今日数据
|
|
//计算今日数据
|
|
if(formatdate.format(new Date()).equals(formatdate.format(monitorDataEntity.getCollectDate()))) {
|
|
if(formatdate.format(new Date()).equals(formatdate.format(monitorDataEntity.getCollectDate()))) {
|