|
@@ -111,13 +111,13 @@ public class DataSyncThread implements Runnable {
|
|
String subjectCode = subject.getString(SUBJECT_CODE);
|
|
String subjectCode = subject.getString(SUBJECT_CODE);
|
|
String subjectName = subject.getString(SUBJECT_NAME);
|
|
String subjectName = subject.getString(SUBJECT_NAME);
|
|
Long startId = 0L;
|
|
Long startId = 0L;
|
|
- if (null != sync.getNextId()) {
|
|
|
|
- startId = sync.getNextId();
|
|
|
|
- }
|
|
|
|
ExamSubject examSubject = subjectService.find(exam.getId(), subjectCode);
|
|
ExamSubject examSubject = subjectService.find(exam.getId(), subjectCode);
|
|
if (examSubject != null && !subjectCode.equals(sync.getSubjectCode())) {
|
|
if (examSubject != null && !subjectCode.equals(sync.getSubjectCode())) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ if (null != sync.getNextId()) {
|
|
|
|
+ startId = sync.getNextId();
|
|
|
|
+ }
|
|
while (startId != null) {
|
|
while (startId != null) {
|
|
datas.put(SUBJECT_CODE, subjectCode);
|
|
datas.put(SUBJECT_CODE, subjectCode);
|
|
datas.put(START_ID, startId);
|
|
datas.put(START_ID, startId);
|
|
@@ -134,6 +134,9 @@ public class DataSyncThread implements Runnable {
|
|
}
|
|
}
|
|
Object obj = studentJson.get(DATA_LIST);
|
|
Object obj = studentJson.get(DATA_LIST);
|
|
if (obj instanceof JSONObject && ((JSONObject) obj).isNullObject()) {
|
|
if (obj instanceof JSONObject && ((JSONObject) obj).isNullObject()) {
|
|
|
|
+ sync.setUpdateTime(new Date());
|
|
|
|
+ sync.setNextId(startId);
|
|
|
|
+ dataSyncService.save(sync);
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
JSONArray studentArray = studentJson.getJSONArray(DATA_LIST);
|
|
JSONArray studentArray = studentJson.getJSONArray(DATA_LIST);
|