|
@@ -21,39 +21,39 @@ public class CMoveTask implements ITask {
|
|
|
// if (flag >= 5) {
|
|
|
// return;
|
|
|
// }
|
|
|
- //延迟10分钟获取影像,并且查找状态为待CMOVE和错误状态的检查
|
|
|
- List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 or status =2 and createAt<? order by createAt asc limit 1",parseStringToDate());
|
|
|
- if (studyidfinds == null) {
|
|
|
- return;
|
|
|
- }
|
|
|
- for (Record studyidfind : studyidfinds) {
|
|
|
-// flag++;
|
|
|
-// if (flag <= 5) {
|
|
|
- //状态4:下载中
|
|
|
- studyidfind.set("status", 4);
|
|
|
- studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
- Db.use("local").update("study", studyidfind);
|
|
|
-
|
|
|
-// ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
-// tService.execute(() -> {
|
|
|
- String execCmd = ExecUtil.execCmd("/zskk_system/other/cmove.sh " + studyidfind.getStr("studyuid"));
|
|
|
- if (execCmd.contains("Connection refused")) {
|
|
|
- //状态2:错误
|
|
|
- studyidfind.set("status", 2);
|
|
|
- studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
- Db.use("local").update("study", studyidfind);
|
|
|
- }else {
|
|
|
- //状态2:完成
|
|
|
- studyidfind.set("status", 3);
|
|
|
- studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
- Db.use("local").update("study", studyidfind);
|
|
|
- }
|
|
|
-
|
|
|
-// });
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+// //延迟10分钟获取影像,并且查找状态为待CMOVE和错误状态的检查
|
|
|
+// List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 or status =2 and createAt<? order by createAt asc limit 1",parseStringToDate());
|
|
|
+// if (studyidfinds == null) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// for (Record studyidfind : studyidfinds) {
|
|
|
+//// flag++;
|
|
|
+//// if (flag <= 5) {
|
|
|
+// //状态4:下载中
|
|
|
+// studyidfind.set("status", 4);
|
|
|
+// studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
+// Db.use("local").update("study", studyidfind);
|
|
|
+//
|
|
|
+//// ThreadPoolService tService = ServiceFactory.getService(ThreadPoolService.class);
|
|
|
+//// tService.execute(() -> {
|
|
|
+// String execCmd = ExecUtil.execCmd("/zskk_system/other/cmove.sh " + studyidfind.getStr("studyuid"));
|
|
|
+// if (execCmd.contains("Connection refused")) {
|
|
|
+// //状态2:错误
|
|
|
+// studyidfind.set("status", 2);
|
|
|
+// studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
+// Db.use("local").update("study", studyidfind);
|
|
|
+// }else {
|
|
|
+// //状态2:完成
|
|
|
+// studyidfind.set("status", 3);
|
|
|
+// studyidfind.set("updateAt", parseStringToDateTime());
|
|
|
+// Db.use("local").update("study", studyidfind);
|
|
|
+// }
|
|
|
+//
|
|
|
+//// });
|
|
|
+//// }
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|
|
|
|
|
|
//延迟10分钟获取影像,并且查找状态为待CMOVE和错误状态的检查
|
|
|
List<Record> studyidfindsde = Db.use("local").find("select * from study where status =1 or status =2 and createAt<? order by createAt desc limit 1",parseStringToDate());
|