commit
f9bd236d49
@ -1613,8 +1613,8 @@ class Auth extends BaseController
|
|||||||
if ($status == 1) {
|
if ($status == 1) {
|
||||||
$datas['business_status']=2;
|
$datas['business_status']=2;
|
||||||
$datas['mer_settlement_agree_status']=1;
|
$datas['mer_settlement_agree_status']=1;
|
||||||
$datas['financial_bank']=json_encode(['name'=>$merchant_intention['bank_username'],
|
$datas['financial_bank']=json_encode(['name'=>$merchant_intention['company_name'],
|
||||||
'bank_code'=>$merchant_intention['bank_code'],'bank'=>$merchant_intention['bank_opening'],'bank_branch'=>""]);
|
'bank_code'=>$merchant_intention['bank_code'],'bank'=>$merchant_intention['bank_username'],'bank_branch'=>$merchant_intention['bank_opening']]);
|
||||||
}else{
|
}else{
|
||||||
$datas['business_status']=3;
|
$datas['business_status']=3;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace app\controller\api\dataview;
|
namespace app\controller\api\dataview;
|
||||||
|
|
||||||
use app\common\model\Company;
|
use app\common\model\Company;
|
||||||
|
use app\common\model\store\order\StoreOrderProduct;
|
||||||
use app\common\repositories\BaseRepository;
|
use app\common\repositories\BaseRepository;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
use think\App;
|
use think\App;
|
||||||
@ -115,6 +116,52 @@ class Logistics extends BaseController
|
|||||||
return app('json')->success(compact('count', 'list'));
|
return app('json')->success(compact('count', 'list'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 三轮车订单排行榜
|
||||||
|
public function vehicleOrderRanking()
|
||||||
|
{
|
||||||
|
// 查区县的镇农科公司
|
||||||
|
$list = [];
|
||||||
|
|
||||||
|
// 先从供销系统 查出镇下边的所有配送员-小组服务公司的负责人
|
||||||
|
$serviceGroupCompanyIds = Db::connect('work_task')->name('company')
|
||||||
|
->where(['area'=> $this->areaCode, 'company_type'=>18])
|
||||||
|
->column('id');
|
||||||
|
|
||||||
|
if (empty($serviceGroupCompanyIds)) {
|
||||||
|
return app('json')->success($list);
|
||||||
|
}
|
||||||
|
$userIdList = Db::connect('work_task')->name('user')
|
||||||
|
->whereIn('company_id', $serviceGroupCompanyIds)
|
||||||
|
->where(['group_id'=>5])
|
||||||
|
->field('id, nickname')->select()->toArray();
|
||||||
|
|
||||||
|
// 从物流系统 查物流订单排序
|
||||||
|
$topCourierList = Db::connect('logistics')->name('logistics')
|
||||||
|
->field(['courier_id','courier_name','COUNT(order_id) AS order_count'])
|
||||||
|
->whereIn('courier_id', array_column($userIdList, 'id'))
|
||||||
|
->group('courier_id')
|
||||||
|
->order('order_count DESC')
|
||||||
|
->select();
|
||||||
|
|
||||||
|
|
||||||
|
foreach ($topCourierList as $topCourier) {
|
||||||
|
// 三轮车车牌号 根据配送员id反查公司id,公司id反查车牌号
|
||||||
|
$courier = Db::connect('work_task')->name('user')->where(['id'=>$topCourier['courier_id']])->find();
|
||||||
|
|
||||||
|
$vehicleRent = Db::connect('work_task')->name('vehicle_rent')->where(['rent_company_id'=>$courier['company_id']])->find();
|
||||||
|
if (empty($vehicleRent)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$topCourier['id'] = $vehicleRent['car_id'];
|
||||||
|
$topCourier['license'] = $vehicleRent['car_license'];
|
||||||
|
$topCourier['area_code'] = $courier['area'];
|
||||||
|
$topCourier['street_code'] = $courier['street'];
|
||||||
|
$list[] = $topCourier;
|
||||||
|
}
|
||||||
|
|
||||||
|
return app('json')->success($list);
|
||||||
|
}
|
||||||
|
|
||||||
// 镇级最新物流配送详情
|
// 镇级最新物流配送详情
|
||||||
public function latestLogistics()
|
public function latestLogistics()
|
||||||
{
|
{
|
||||||
@ -267,6 +314,11 @@ class Logistics extends BaseController
|
|||||||
$query->whereBetween('ps_time', [$startTime, $endTime]);
|
$query->whereBetween('ps_time', [$startTime, $endTime]);
|
||||||
})->count();
|
})->count();
|
||||||
}
|
}
|
||||||
|
$list = $list->toArray();
|
||||||
|
foreach ($list as &$item) {
|
||||||
|
$item['product_name'] = StoreOrderProduct::alias('o')->join('store_product p', 'o.product_id=p.product_id')->where('o.order_id', $item['order_id'])->value('p.store_name');
|
||||||
|
}
|
||||||
|
|
||||||
return app('json')->success(compact('count', 'list'));
|
return app('json')->success(compact('count', 'list'));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -328,9 +328,10 @@ class Merchant extends BaseController
|
|||||||
'extract_minimum_line' => $extract_minimum_line, //提现最低额度
|
'extract_minimum_line' => $extract_minimum_line, //提现最低额度
|
||||||
'extract_minimum_num' => $extract_minimum_num, //提现最低次数
|
'extract_minimum_num' => $extract_minimum_num, //提现最低次数
|
||||||
'extract_money' => $_extract, //可提现金额
|
'extract_money' => $_extract, //可提现金额
|
||||||
'financial_bank_bank' => $merchant->financial_bank->name ?? '', //银行账户姓名
|
'financial_bank_name' => $merchant->financial_bank->name ?? '', //银行账户姓名
|
||||||
'financial_bank_opening' => $merchant->financial_bank->bank ?? '', //开户行
|
'financial_bank_bank' => $merchant->financial_bank->bank ?? '', //开户行
|
||||||
'financial_bank_code' => $merchant->financial_bank->bank_code ?? '', //银行账号
|
'financial_bank_code' => $merchant->financial_bank->bank_code ?? '', //银行账号
|
||||||
|
'financial_bank_branch' => $merchant->financial_bank->bank_branch ?? '', //开户行地址
|
||||||
'financial_type' => $merchant->financial_type, //提现方式
|
'financial_type' => $merchant->financial_type, //提现方式
|
||||||
'ot_margin' => $merchant->ot_margin, //提现方式
|
'ot_margin' => $merchant->ot_margin, //提现方式
|
||||||
|
|
||||||
|
@ -768,6 +768,8 @@ Route::group('api/', function () {
|
|||||||
Route::get('logistics_count', 'Logistics/logisticsCount');
|
Route::get('logistics_count', 'Logistics/logisticsCount');
|
||||||
Route::get('logistics_map_count', 'Logistics/logisticsMapCount');
|
Route::get('logistics_map_count', 'Logistics/logisticsMapCount');
|
||||||
Route::get('logistics_list', 'Logistics/logisticsList');
|
Route::get('logistics_list', 'Logistics/logisticsList');
|
||||||
|
Route::get('vehicle_order_ranking', 'Logistics/vehicleOrderRanking');
|
||||||
|
|
||||||
/**---------------------物流溯源监控大屏api---------------------- end **/
|
/**---------------------物流溯源监控大屏api---------------------- end **/
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user