|
@@ -504,13 +504,12 @@ public class RWDLoadUtil {
|
|
|
objectItem.put("报警数量", alarmCount);
|
|
|
if (use_sample) {
|
|
|
if (BKDRHash.getHashCode(objId) % 3 == 0) {
|
|
|
- JSONObject alarm = FastJsonReaderUtil.Instance()
|
|
|
- .ReadJSONObject(FileUtil.file("alarm_sample.json"));
|
|
|
+ JSONObject alarm = FastJsonReaderUtil.Instance().ReadJSONObject(FileUtil.file("alarm_sample.json"));
|
|
|
alarm.put("objId", objId);
|
|
|
try {
|
|
|
RWDAlarmUtil.modify_alarm(alarm);
|
|
|
} catch (Exception e) {
|
|
|
- log.error(e.getMessage(),e);
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
log.error(LogUtil.GetExceptionStackTrace(e));
|
|
|
}
|
|
|
RWDAlarmUtil.ProcessAlarm(alarm);
|
|
@@ -756,21 +755,21 @@ public class RWDLoadUtil {
|
|
|
itemInner.put("二级编组名称", level2_name);
|
|
|
SceneDataObject SELTCC = Repository.id2sdv.get(objId);
|
|
|
SceneDataValue SELTCUArray = SELTCC.get("被设备控制");
|
|
|
- if (SELTCUArray.value_array.set.size() == 1) {
|
|
|
+ if (SELTCUArray.value_array.set.size() > 0) {
|
|
|
SceneDataObject SELTCU = SELTCUArray.value_array.set.get(0);
|
|
|
String SELTCU_id = (String) SELTCU.get("id").value_prim.value;
|
|
|
String SELTCU_name = getValidName(SELTCU);
|
|
|
itemInner.put("模块编号", SELTCU_id);
|
|
|
itemInner.put("模块名称", SELTCU_name);
|
|
|
SceneDataValue SETDLSArray = SELTCU.get("被设备供电");
|
|
|
- if (SETDLSArray.value_array.set.size() == 1) {
|
|
|
+ if (SETDLSArray.value_array.set.size() > 0) {
|
|
|
SceneDataObject SETDLS = SETDLSArray.value_array.set.get(0);
|
|
|
String SETDLS_id = (String) SETDLS.get("id").value_prim.value;
|
|
|
String SETDLS_name = getValidName(SETDLS);
|
|
|
itemInner.put("配电箱编号", SETDLS_id);
|
|
|
itemInner.put("配电箱名称", SETDLS_name);
|
|
|
SceneDataValue GeneralZoneArray = SETDLS.get("所在物业空间");
|
|
|
- if (GeneralZoneArray.value_array.set.size() == 1) {
|
|
|
+ if (GeneralZoneArray.value_array.set.size() > 0) {
|
|
|
SceneDataObject GeneralZone = GeneralZoneArray.value_array.set.get(0);
|
|
|
String GeneralZone_id = (String) GeneralZone.get("id").value_prim.value;
|
|
|
String GeneralZone_name = getValidName(GeneralZone);
|