This commit is contained in:
weiz 2023-11-13 11:46:11 +08:00
parent 30326c94f3
commit cee7211f2e
2 changed files with 6 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class TaskController extends BaseApiController
// $where[] = ['type', '=', 33];
// $where[] = ['director_uid', '=', $this->userId];
// }
// $where[] = ['company_id', '=', $this->userInfo['company_id']];
$where[] = ['company_id', '=', $this->userInfo['company_id']];
}
if ($userCompanyInfo['company_type'] == 41) {
@ -76,7 +76,6 @@ class TaskController extends BaseApiController
->page($page, 25)
->order(['id' => 'desc', 'status' => 'asc'])
->select()->toArray();
foreach ($res as $k => $item) {
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(); // 可能要判断预存金是否满足

View File

@ -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;
}