|
@@ -27,6 +27,11 @@ public class DBDataTask implements ITask {
|
|
|
for (Object object : jsonArray) {
|
|
|
try {
|
|
|
JSONObject jsonObject = JSON.parseObject(object.toString());
|
|
|
+ Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?", jsonObject.getString("studyuid"));
|
|
|
+ if (studyidfind != null && studyidfind.getInt("status")==1 || studyidfind.getInt("status")==2) {
|
|
|
+ studyidfind.set("status", 5);
|
|
|
+ Db.use("local").update("study", studyidfind);
|
|
|
+ }
|
|
|
Record record = Db.use("connected").findFirst("select * from reportinfo where STUDYSTATUS = '诊断完成' and STUDYUID=?", jsonObject.getString("studyuid"));
|
|
|
if (record == null) {
|
|
|
continue;
|
|
@@ -100,11 +105,7 @@ public class DBDataTask implements ITask {
|
|
|
tService.execute(() -> {
|
|
|
dService.saveReport(params);
|
|
|
});
|
|
|
- Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?", jsonObject.getString("studyuid"));
|
|
|
- if (studyidfind != null) {
|
|
|
- studyidfind.set("status", 5);
|
|
|
- Db.use("local").update("study", studyidfind);
|
|
|
- }
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
// TODO: handle exception
|
|
|
continue;
|