fixed
This commit is contained in:
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\Task;
|
||||||
use app\common\model\task_template\TaskTemplate;
|
use app\common\model\task_template\TaskTemplate;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
|
use app\common\model\vehicle\VehicleRent;
|
||||||
use think\Exception;
|
use think\Exception;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
|
|
||||||
@ -223,9 +224,10 @@ class TaskController extends BaseApiController
|
|||||||
{
|
{
|
||||||
$parmas = $this->request->param();
|
$parmas = $this->request->param();
|
||||||
$task = Task::where('id', $parmas['id'])->find()->toArray();
|
$task = Task::where('id', $parmas['id'])->find()->toArray();
|
||||||
$object_id=CompanyProperty::where('company_id',$this->userInfo['company_id'])->value('object_id');
|
$VehicleRent = VehicleRent::where('rent_company_id',$params['company_id'])->find();
|
||||||
if(!$object_id){
|
if(empty($VehicleRent)){
|
||||||
return $this->fail('该公司没有三轮车,请先租赁三轮车');
|
self::setError('该公司没有三轮车,请先租赁三轮车');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
$start_time = date('Y-m-d');
|
$start_time = date('Y-m-d');
|
||||||
$time=strtotime($start_time)+86399;
|
$time=strtotime($start_time)+86399;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user