|
@@ -21,6 +21,8 @@ import com.jfinal.plugin.activerecord.Record;
|
|
|
import com.jfinal.plugin.activerecord.dialect.OracleDialect;
|
|
|
import com.jfinal.plugin.activerecord.dialect.SqlServerDialect;
|
|
|
import com.jfinal.plugin.druid.DruidPlugin;
|
|
|
+import com.zskk.service.ServiceFactory;
|
|
|
+import com.zskk.service.ThreadPoolService;
|
|
|
import com.zskk.tools.ExecUtil;
|
|
|
import com.zskk.tools.XmlHelper;
|
|
|
|
|
@@ -115,32 +117,45 @@ public class ViewController extends Controller {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- String deviceString = "";
|
|
|
- Record dRecord = Db.use("connected").findFirst("select * from reportinfo where STUDYUID = ?",
|
|
|
- studyuidString);
|
|
|
- if (dRecord!=null && dRecord.getStr("DEVICE")!=null) {
|
|
|
- deviceString= dRecord.getStr("DEVICE");
|
|
|
+ if (modalitiesString.equals("SC")) {
|
|
|
+ continue;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
Record studyidfind = Db.use("local").findFirst("select * from study where studyuid = ?",
|
|
|
studyuidString);
|
|
|
if (studyidfind == null) {
|
|
|
- Record studyinfo = new Record().set("studyuid", studyuidString).set("modalities", modalitiesString)
|
|
|
- .set("status", 1).set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime()).set("device", deviceString);
|
|
|
+ String deviceString = "";
|
|
|
+ Record dRecord = Db.use("connected").findFirst("select * from reportinfo where STUDYUID = ?",
|
|
|
+ studyuidString);
|
|
|
+ if (dRecord != null && dRecord.getStr("DEVICE") != null) {
|
|
|
+ deviceString = dRecord.getStr("DEVICE");
|
|
|
+ }
|
|
|
+ Record studyinfo = new Record().set("studyuid", studyuidString)
|
|
|
+ .set("modalities", modalitiesString).set("status", 1)
|
|
|
+ .set("createAt", parseStringToDateTime()).set("updateAt", parseStringToDateTime())
|
|
|
+ .set("device", deviceString);
|
|
|
Db.use("local").save("study", studyinfo);
|
|
|
- }else {
|
|
|
+ } else if(studyidfind.getStr("device")==null){
|
|
|
+ String deviceString = "";
|
|
|
+ Record dRecord = Db.use("connected").findFirst("select * from reportinfo where STUDYUID = ?",
|
|
|
+ studyuidString);
|
|
|
+ if (dRecord != null && dRecord.getStr("DEVICE") != null) {
|
|
|
+ deviceString = dRecord.getStr("DEVICE");
|
|
|
+ }
|
|
|
studyidfind.set("device", deviceString);
|
|
|
- studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
- Db.use("local").update("study", studyidfind);
|
|
|
+ studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
+ Db.use("local").update("study", studyidfind);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
- renderNull();
|
|
|
+ renderText("succeed");
|
|
|
} catch (IOException e) {
|
|
|
// TODO Auto-generated catch block
|
|
|
e.printStackTrace();
|
|
|
renderText(e.toString());
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|