作者 潘浩文
1 个管道 的构建 通过 耗费 3 秒

更新 AdminFaultAuditController.php

... ... @@ -96,12 +96,13 @@ class AdminFaultAuditController extends AdminBaseController{
$fault=Db::name('fault')->where('id',$id)->find();
$order=Db::name('order')->where(['users_id'=>$fault['users_id'],'state'=>1])->find();
$equipment=Db::name('equipment')->where('name',$order['eq_name'])->find();
if (empty($order)){
$this->error('没有未完成订单');
}else{
$time=ceil(($fault['create_time']-$order['start_time'])/3600);
$getPrice=new OrderController();
$price=$getPrice->getPrice($fault['users_id'],$order['start_time'],$fault['create_time']);
$price=$getPrice->getPrice($fault['users_id'],$order['start_time'],$fault['create_time'],$equipment['hospital']);
$data=[
'end_time'=>$fault['create_time'],
'time'=>$time,
... ...