-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":766,"versionName":"2103192133","enabled":true,"outputFile":"ICSer_V766_2103192133_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V766_2103192133_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":767,"versionName":"2103201024","enabled":true,"outputFile":"ICSer_V767_2103201024_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V767_2103201024_release.apk","properties":{}}]
\ No newline at end of file
ContentResolver pcr = this.cr;
Uri table = ICContentProvider.PROTOCOL_CMD_RECORDS_URI;
StringBuilder where = new StringBuilder();
- where.append("FLAG=0 and ( TOPIC == 'AL' or TOPIC == 'AP10' ) ");
+ where.append("FLAG=0 and ( TOPIC='AL' or TOPIC='AP10' ) ");
ICLogger.i("Query1 cmdRecords "+where);
Cursor cmdrecords = pcr.query(table, null, where.toString(), null, null);
StringMessage msg = null;
}
cmdrecords.close();
- }else{ //没有警报,就查询其他消息发送
- where = new StringBuilder("FLAG=0");
+ }else{ //没有警报,就查询 UD 消息发送 //当前数据优先于 UD2数据
+ cmdrecords.close();
+ where = new StringBuilder("FLAG=0 and TOPIC='UD' ");
cmdrecords = pcr.query(table, null, where.toString(), null, null);
ICLogger.i("Query2 cmdRecords "+where);
msg = null;
msg.setIndex(index);
ICLogger.i("get cmd Record not sent _id " + index + " " + date + time + " topic " + topic + " cmd " + cmd);
}
- }
- cmdrecords.close();
- }
- }
- }else{
- where = new StringBuilder("FLAG=0");
- cmdrecords = pcr.query(table, null, where.toString(), null, null);
- ICLogger.i("Query3 cmdRecords "+where);
- msg = null;
- if (cmdrecords != null) {
- int score = 0;
- if (cmdrecords.getCount() > 0) {
- if (cmdrecords.moveToFirst()) {
- String topic = cmdrecords.getString(cmdrecords.getColumnIndex("TOPIC"));
- String cmd = cmdrecords.getString(cmdrecords.getColumnIndex("CMD"));
- String date = cmdrecords.getString(cmdrecords.getColumnIndex("DATE"));
- String time = cmdrecords.getString(cmdrecords.getColumnIndex("TIME"));
- int flag = cmdrecords.getInt(cmdrecords.getColumnIndex("FLAG"));
- int index = cmdrecords.getInt(cmdrecords.getColumnIndex("_id"));
- msg = new StringMessage(new String[]{topic});
- msg.refresh(cmd);
- msg.setDate(date, time);
- msg.setSentFlag(flag);
- msg.setIndex(index);
- ICLogger.i("get cmd Record not sent _id " + index + " " + date + time + " topic " + topic + " cmd " + cmd);
+ cmdrecords.close();
+
+ }else{ //最后轮到 除了 AL,AP10,UD 以外的其他缓存数据
+ cmdrecords.close();
+ where = new StringBuilder("FLAG=0");
+ cmdrecords = pcr.query(table, null, where.toString(), null, null);
+ ICLogger.i("Query3 cmdRecords "+where);
+ msg = null;
+ if (cmdrecords != null) {
+ score = 0;
+ if (cmdrecords.getCount() > 0) {
+ if (cmdrecords.moveToFirst()) {
+ String topic = cmdrecords.getString(cmdrecords.getColumnIndex("TOPIC"));
+ String cmd = cmdrecords.getString(cmdrecords.getColumnIndex("CMD"));
+ String date = cmdrecords.getString(cmdrecords.getColumnIndex("DATE"));
+ String time = cmdrecords.getString(cmdrecords.getColumnIndex("TIME"));
+ int flag = cmdrecords.getInt(cmdrecords.getColumnIndex("FLAG"));
+ int index = cmdrecords.getInt(cmdrecords.getColumnIndex("_id"));
+ msg = new StringMessage(new String[]{topic});
+ msg.refresh(cmd);
+ msg.setDate(date, time);
+ msg.setSentFlag(flag);
+ msg.setIndex(index);
+ ICLogger.i("get cmd Record not sent _id " + index + " " + date + time + " topic " + topic + " cmd " + cmd);
+ }
+ }
+ cmdrecords.close();
+ }
}
}
- cmdrecords.close();
}
}