From 5b795029434cbbb7a265a6d65600902d613903a4 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 13 Nov 2023 11:06:09 +0800 Subject: [PATCH] fixed --- app/common/logic/task_template/TaskTemplateLogic.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/common/logic/task_template/TaskTemplateLogic.php b/app/common/logic/task_template/TaskTemplateLogic.php index 03353f24f..4d5648872 100644 --- a/app/common/logic/task_template/TaskTemplateLogic.php +++ b/app/common/logic/task_template/TaskTemplateLogic.php @@ -23,6 +23,7 @@ use app\common\model\company\CompanyProperty; use app\common\model\informationg\UserInformationg; use app\common\model\task_scheduling\TaskScheduling; use app\common\model\user\User; +use app\common\model\vehicle\VehicleRent; use think\facade\Db; @@ -80,8 +81,8 @@ class TaskTemplateLogic extends BaseLogic return false; } if($params['type']==32){ - $object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id'); - if(!$object_id){ + $VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find(); + if(empty($VehicleRent)){ self::setError('该公司没有三轮车,请先租赁三轮车'); return false; } @@ -169,8 +170,8 @@ class TaskTemplateLogic extends BaseLogic return false; } if($params['type']==32){ - $object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id'); - if(!$object_id){ + $VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find(); + if(empty($VehicleRent)){ self::setError('该公司没有三轮车,请先租赁三轮车'); return false; }