新增排程接口

This commit is contained in:
fengjignqi
2026-05-25 09:52:26 +08:00
parent f86fedd6f1
commit 819965faec
13 changed files with 264 additions and 24 deletions

View File

@@ -229,10 +229,38 @@ public class ZYTimeUtils {
public static String getStrTimeData(Date date) {
String timeString = null;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
timeString = sdf.format(new Date());//单位秒
timeString = sdf.format(date);//单位秒
return timeString;
}
/**
* yyyy-MM-dd HH:mm 转换为 HH:mm显示
* @param date
* @return
*/
public static String yyyyMMdd2HH_mm(String date) {
if (TextUtils.isEmpty(date)) {
return "";
}
try {
SimpleDateFormat sourceFormat =
new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault());
SimpleDateFormat targetFormat =
new SimpleDateFormat("HH:mm", Locale.getDefault());
Date parseDate = sourceFormat.parse(date);
return parseDate == null ? "" : targetFormat.format(parseDate);
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
public static String getStrTimeData_H_M(Date date) {
String timeString = null;
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");