fixed
This commit is contained in:
parent
30326c94f3
commit
cee7211f2e
@ -39,7 +39,7 @@ class TaskController extends BaseApiController
|
|||||||
// $where[] = ['type', '=', 33];
|
// $where[] = ['type', '=', 33];
|
||||||
// $where[] = ['director_uid', '=', $this->userId];
|
// $where[] = ['director_uid', '=', $this->userId];
|
||||||
// }
|
// }
|
||||||
// $where[] = ['company_id', '=', $this->userInfo['company_id']];
|
$where[] = ['company_id', '=', $this->userInfo['company_id']];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($userCompanyInfo['company_type'] == 41) {
|
if ($userCompanyInfo['company_type'] == 41) {
|
||||||
@ -76,7 +76,6 @@ class TaskController extends BaseApiController
|
|||||||
->page($page, 25)
|
->page($page, 25)
|
||||||
->order(['id' => 'desc', 'status' => 'asc'])
|
->order(['id' => 'desc', 'status' => 'asc'])
|
||||||
->select()->toArray();
|
->select()->toArray();
|
||||||
|
|
||||||
foreach ($res as $k => $item) {
|
foreach ($res as $k => $item) {
|
||||||
if ($item['type'] == 33) {
|
if ($item['type'] == 33) {
|
||||||
$company = Company::where('id', $item['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade,responsible_area')->find(); // 可能要判断预存金是否满足
|
$company = Company::where('id', $item['company_id'])->field('id,deposit,company_money,user_id,day_count,company_type,province,city,area,street,village,brigade,responsible_area')->find(); // 可能要判断预存金是否满足
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user