作者 shenhailong

添加 装货卸货时间计算 装货时间+15分钟 等于 卸货时间

@@ -523,4 +523,22 @@ public final class DateUtil { @@ -523,4 +523,22 @@ public final class DateUtil {
523 return format.format(date); 523 return format.format(date);
524 524
525 } 525 }
  526 +
  527 + /**
  528 + * 传入时间+15分钟
  529 + * @param date
  530 + * @return
  531 + * @throws ParseException
  532 + */
  533 + public Date dateTimeAddfifteen(Date date) throws ParseException {
  534 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  535 +
  536 + Calendar nowTime = Calendar.getInstance();
  537 +
  538 + nowTime.setTime(date);
  539 + nowTime.add(Calendar.MINUTE, 15);
  540 + Date time = nowTime.getTime();
  541 +
  542 + return time;
  543 + }
526 } 544 }