|
@@ -20,7 +20,7 @@ public class ReDownloadTask implements ITask {
|
|
|
public void run() {
|
|
|
// TODO Auto-generated method stub
|
|
|
DataService dService = ServiceFactory.getService(DataService.class);
|
|
|
- Record recordfind = Db.use("local").findFirst("select * from study where status=2 and modalities <>'US' and updateAt >'2025-04-20 00:00:00' and createAt < ? order by createAt asc", getDateStr());
|
|
|
+ Record recordfind = Db.use("local").findFirst("select * from study where status=2 and modalities <>'US' and updateAt >'2025-04-20 00:00:00' and createAt < ? order by createAt asc", getDateStrPass());
|
|
|
try {
|
|
|
JSONArray array = dService.getImage(recordfind.getStr("accessionNumber"));
|
|
|
if (array==null) {
|
|
@@ -55,13 +55,26 @@ public class ReDownloadTask implements ITask {
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 日期字符串格式转换
|
|
|
* @param dateStr
|
|
|
* @return
|
|
|
*/
|
|
|
private String getDateStr() {
|
|
|
+ SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Date date = new Date();
|
|
|
+ String timeString = null;
|
|
|
+ timeString = sdf.format(date);
|
|
|
+ return timeString;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 日期字符串格式转换
|
|
|
+ * @param dateStr
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private String getDateStrPass() {
|
|
|
//返回半天前的时间
|
|
|
return DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
|
|
|
.format(LocalDateTime.now().minusHours(12));
|