Merge pull request 'update' (#58) from zhangwei into master
Reviewed-on: http://git.excellentkk.cn/mkm/TaskSystem/pulls/58
This commit is contained in:
commit
5374165f6d
@ -15,7 +15,7 @@ use think\response\Json;
|
||||
class VehicleController extends BaseApiController
|
||||
{
|
||||
//镇街公司想物流平台申请租赁车辆
|
||||
public function setContractByTownCompany():Json
|
||||
public function setContractByTownCompany()
|
||||
{
|
||||
//获取参数
|
||||
$params = $this->request->post(['num']);
|
||||
@ -214,6 +214,8 @@ class VehicleController extends BaseApiController
|
||||
$villageCompany = Contract::where('party_a',$company_id)->where('signing_timer',2)->select();
|
||||
//系统车辆数量
|
||||
$rentCar = VehicleRent::field('id')->where('type',0)->select();
|
||||
//可租赁车辆
|
||||
$canRentCar = VehicleRent::field('id')->where('type',0)->where('status',0)->select();
|
||||
//自有车辆数量
|
||||
$selfCar = VehicleRent::field('id')->where('type',1)->select();
|
||||
//设置数据
|
||||
@ -222,6 +224,7 @@ class VehicleController extends BaseApiController
|
||||
'car_list' => $carList->toArray(),
|
||||
'monitor_num' => $villageCompany->count(),
|
||||
'rent_num' => $rentCar->count(),
|
||||
'can_rent_num' => $canRentCar->count(),
|
||||
'self_num' => $selfCar->count(),
|
||||
];
|
||||
//返回
|
||||
|
Loading…
x
Reference in New Issue
Block a user