This commit is contained in:
chenbo 2023-11-13 11:48:48 +08:00
parent 3764507e39
commit bb686752ef

@ -13,6 +13,7 @@ use app\common\model\informationg\UserInformationg;
use app\common\model\task\Task;
use app\common\model\task_template\TaskTemplate;
use app\common\model\user\User;
use app\common\model\vehicle\VehicleRent;
use think\Exception;
use think\facade\Db;
@ -223,9 +224,10 @@ class TaskController extends BaseApiController
{
$parmas = $this->request->param();
$task = Task::where('id', $parmas['id'])->find()->toArray();
$object_id=CompanyProperty::where('company_id',$this->userInfo['company_id'])->value('object_id');
if(!$object_id){
return $this->fail('该公司没有三轮车,请先租赁三轮车');
$VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车');
return false;
}
$start_time = date('Y-m-d');
$time=strtotime($start_time)+86399;