刘韬 2 anos atrás
pai
commit
db41d91e7d
1 arquivos alterados com 12 adições e 2 exclusões
  1. 12 2
      DataFusion/src/com/zskk/control/ViewController.java

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

@@ -73,7 +73,7 @@ public class ViewController extends Controller {
 //			return;
 //		}
 		//延迟10分钟获取影像,并且查找状态为待CMOVE和错误状态的检查
-		List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 and createAt<? order by createAt asc limit 1",parseStringToDate());
+		List<Record> studyidfinds = Db.use("local").find("select * from study where status =1 and createAt<? order by createAt asc limit 1",parseStringToDate2());
 		if (studyidfinds == null) {
 			return;
 		}
@@ -107,7 +107,7 @@ public class ViewController extends Controller {
 		}
 		
 		//延迟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());
+				List<Record> studyidfindsde = Db.use("local").find("select * from study where status =1 or status =2 and createAt<? order by createAt desc limit 1",parseStringToDate2());
 				if (studyidfindsde == null) {
 					return;
 				}
@@ -334,6 +334,16 @@ public class ViewController extends Controller {
 
 	}
 	
+	private String parseStringToDate2() {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+		Date date = new Date();
+		long dInteger = date.getTime() - 300000;
+		String daString = sdf.format(new Date(dInteger));
+		return daString;
+
+	}
+	
+	
 	/**
 	 * 日期字符串格式转换
 	 *