...
|
...
|
@@ -123,7 +123,7 @@ class OrderController extends HomeBaseController{ |
|
|
|
|
|
//用了多少天
|
|
|
$day=floor(($end_time-$start_time)/86400);
|
|
|
$price=$day*$dayPrice;
|
|
|
$dayPrice=$day*$dayPrice;
|
|
|
//去掉整天的金额
|
|
|
$new_start_time=$start_time+$day*86400;//时间戳
|
|
|
$new_end_time= $end_time;//时间戳
|
...
|
...
|
@@ -133,6 +133,7 @@ class OrderController extends HomeBaseController{ |
|
|
$stateTime=strtotime($interval['start_time']);
|
|
|
$endTime=strtotime($interval['end_time']);
|
|
|
//判断预设时间段是否跨天
|
|
|
$price=0;
|
|
|
if ($endTime < $stateTime){
|
|
|
//设备使用时间段是否跨天(不跨天)
|
|
|
if ($hours_end_time > $hours_start_time){
|
...
|
...
|
@@ -219,7 +220,12 @@ class OrderController extends HomeBaseController{ |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return $price;
|
|
|
|
|
|
if ($price > $cost['ceiling']){
|
|
|
$price = $cost['ceiling'];
|
|
|
}
|
|
|
$numPrice = $dayPrice+$price;
|
|
|
return $numPrice;
|
|
|
}
|
|
|
|
|
|
//获取整天的价格
|
...
|
...
|
@@ -235,6 +241,10 @@ class OrderController extends HomeBaseController{ |
|
|
}else{
|
|
|
$price=($time * $interval['price']) + ((24-$time) * $cost['cost']);
|
|
|
}
|
|
|
|
|
|
if ($price > $cost['ceiling']){
|
|
|
$price = $cost['ceiling'];
|
|
|
}
|
|
|
return $price;
|
|
|
}
|
|
|
|
...
|
...
|
|