mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
计算站点订单日报
This commit is contained in:
@@ -218,6 +218,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
|
||||
/**
|
||||
* 计算相差天数 (会显示负值)
|
||||
*
|
||||
* @param endDate
|
||||
* @param nowDate
|
||||
* @return
|
||||
@@ -574,6 +575,14 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
return simpleDateFormat.format(date);
|
||||
}
|
||||
|
||||
public static String formatDateTime(LocalDateTime localDateTime) {
|
||||
if (localDateTime == null) {
|
||||
return "";
|
||||
}
|
||||
Date date = Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
|
||||
return formatDateTime(date);
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@@ -788,11 +797,12 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
|
||||
/**
|
||||
* 秒 转 天时分秒
|
||||
* 时分秒HoursMinutesSeconds
|
||||
*
|
||||
* @param mss 秒数
|
||||
* @return xx天xx小时xx分钟xx秒
|
||||
*/
|
||||
public static String formatDateTime(long mss) {
|
||||
public static String formatHoursMinutesSeconds(long mss) {
|
||||
String DateTimes = null;
|
||||
long days = mss / (60 * 60 * 24);
|
||||
long hours = (mss % (60 * 60 * 24)) / (60 * 60);
|
||||
@@ -828,7 +838,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
|
||||
if (time.compareTo(beginTime) == 0 || time.compareTo(endTime) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (beginTime.isBefore(time) && endTime.isAfter(time)){
|
||||
if (beginTime.isBefore(time) && endTime.isAfter(time)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user