This commit is contained in:
ls
2025-04-08 00:39:45 +08:00
parent 1a4e228c7d
commit 2d15f98a41
2 changed files with 9 additions and 1 deletions

View File

@@ -701,6 +701,14 @@ public class DateUtils extends PropertyEditorSupport {
return null;
}
public static Date parseDatetimeShort(String str) {
try {
return time_sdf.get().parse(str);
} catch (Exception e) {
}
return null;
}
/**
* 判断两个时间是否是同一天
*

View File

@@ -87,7 +87,7 @@ public class ExperimentRadiationProcessServiceImpl extends ServiceImpl<Experimen
detailMap.forEach((key, value) -> value.forEach(v1 -> {
String startTime = v1.get("startTime");
String endTime = v1.get("endTime");
list.add(new TimeRange(DateUtils.parseDatetime(startTime), DateUtils.parseDatetime(endTime)));
list.add(new TimeRange(DateUtils.parseDatetimeShort(startTime), DateUtils.parseDatetimeShort(endTime)));
}));
}
}