|
|
|
@ -127,6 +127,10 @@ public class AnalysisReceiveOrder485 {
|
|
|
|
|
data = bigDecimal.toString(); |
|
|
|
|
log.info("水表==>{},寄存器地址==>{},累计读数==>{}", cloudId, deviceCodeParam.getRegisterAddr(), data); |
|
|
|
|
} |
|
|
|
|
// 判断data大于99999999,就返回空
|
|
|
|
|
if (new BigDecimal(data).intValue() > 99999999) { |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
return data; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("保存水表数据失败!", e); |
|
|
|
@ -186,6 +190,10 @@ public class AnalysisReceiveOrder485 {
|
|
|
|
|
data = ExchangeStringUtil.hexToDec(data); |
|
|
|
|
log.info("电表==>{},寄存器地址==>{},累计读数==>{}", cloudId, deviceCodeParam.getRegisterAddr(), data); |
|
|
|
|
} |
|
|
|
|
// 判断data大于99999999,就返回空
|
|
|
|
|
if (new BigDecimal(data).intValue() > 99999999) { |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
return data; |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("保存电表数据失败!", e); |
|
|
|
|