This commit is contained in:
chenbo 2023-11-13 11:50:32 +08:00
parent bb686752ef
commit 75d3818820

View File

@ -224,16 +224,20 @@ class TaskController extends BaseApiController
{
$parmas = $this->request->param();
$task = Task::where('id', $parmas['id'])->find()->toArray();
$VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
$VehicleRent = VehicleRent::where('rent_company_id', $this->userInfo['company_id'])->find();
if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车');
return false;
}
// $object_id=CompanyProperty::where('company_id',$this->userInfo['company_id'])->value('object_id');
// if(!$object_id){
// return $this->fail('该公司没有三轮车,请先租赁三轮车');
// }
$start_time = date('Y-m-d');
$time=strtotime($start_time)+86399;
$end_time=date('Y-m-d H:i:s',$time);
$datas=[
'car_id'=>$object_id,
'car_id'=>$VehicleRent['car_id'],
'start_time'=>$start_time.' 00:00:00',
'end_time'=>$end_time
];