This commit is contained in:
chenbo 2023-11-13 11:06:09 +08:00
parent c7057e7697
commit 5b79502943

View File

@ -23,6 +23,7 @@ use app\common\model\company\CompanyProperty;
use app\common\model\informationg\UserInformationg; use app\common\model\informationg\UserInformationg;
use app\common\model\task_scheduling\TaskScheduling; use app\common\model\task_scheduling\TaskScheduling;
use app\common\model\user\User; use app\common\model\user\User;
use app\common\model\vehicle\VehicleRent;
use think\facade\Db; use think\facade\Db;
@ -80,8 +81,8 @@ class TaskTemplateLogic extends BaseLogic
return false; return false;
} }
if($params['type']==32){ if($params['type']==32){
$object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id'); $VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
if(!$object_id){ if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车'); self::setError('该公司没有三轮车,请先租赁三轮车');
return false; return false;
} }
@ -169,8 +170,8 @@ class TaskTemplateLogic extends BaseLogic
return false; return false;
} }
if($params['type']==32){ if($params['type']==32){
$object_id=CompanyProperty::where('company_id',$params['company_id'])->value('object_id'); $VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
if(!$object_id){ if(empty($VehicleRent)){
self::setError('该公司没有三轮车,请先租赁三轮车'); self::setError('该公司没有三轮车,请先租赁三轮车');
return false; return false;
} }