Commit 5c5ace26 authored by jichao's avatar jichao

修改bug

parent 4d420786
......@@ -222,13 +222,15 @@ public class SystemServiceImpl implements SystemService {
// 默认值为0
paramStatus.setValue(0);
// 获得数据
JSONObject jsonObject = (JSONObject) json.get(devNum);
if (jsonObject != null) {
JSONObject valueObject = (JSONObject) jsonObject.get("REG_VAL");
if (valueObject != null) {
Object value = valueObject.get(param);
if (value != null) {
paramStatus.setValue(value);
if (json != null) {
JSONObject jsonObject = (JSONObject) json.get(devNum);
if (jsonObject != null) {
JSONObject valueObject = (JSONObject) jsonObject.get("REG_VAL");
if (valueObject != null) {
Object value = valueObject.get(param);
if (value != null) {
paramStatus.setValue(value);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment