刘韬 2 лет назад
Родитель
Сommit
4314185e43
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      DataFusion/src/com/zskk/control/ViewController.java

+ 2 - 4
DataFusion/src/com/zskk/control/ViewController.java

@@ -134,7 +134,7 @@ public class ViewController extends Controller {
 								.set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime())
 								.set("device", deviceString);
 						Db.use("local").save("study", studyinfo);
-					} else if(studyidfind.getStr("device").isBlank()){
+					} else if(studyidfind != null && studyidfind.getStr("device").isBlank()){
 						String deviceString = "";
 						Record dRecord = Db.use("connected").findFirst("select * from reportinfo where STUDYUID = ?",
 								studyuidString);
@@ -144,9 +144,7 @@ public class ViewController extends Controller {
 						studyidfind.set("device", deviceString);
 						studyidfind.set("updateAt", parseStringToDateTime());
 						Db.use("local").update("study", studyidfind);
-					}
-						
-					
+					}			
 				}
 				renderText("succeed");
 			} catch (Exception e) {