Commit ab1f0f33 authored by clone's avatar clone

Merge branch '0618-v3.3.2' of https://gitee.com/zwyjjc/tl_estate into 0618-v3.3.2

parents 70c2ac6a a1f4bb89
......@@ -39,7 +39,7 @@ class Statement extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
// big_log('日报周报获取新增数据-dayStatement');
// big_log(json_encode($params));
big_log($params);
if (!isset($params["agent_id"]) || !isset($params["time_start"]) || !isset($params["time_end"])) {
return $this->response("101", "请求参数错误");
......@@ -259,8 +259,7 @@ class Statement extends Basic
case 10:
#业务员
$agent_level = 0;
$result = $this->service_->selectStatementForClerk($params["agent_id"], $agent_level, $store_id,
$district_id);
$result = $this->service_->selectStatementForClerk($params["agent_id"],$this->siteId);
break;
case 20:
#店长
......
......@@ -572,48 +572,51 @@ class StatementService
}
/**
* 查询业务员日报数据
* @param $agent_id
* @param $agent_level
* @param $store_id
* @param $district_id
* @return mixed user 朱伟
* @param $site_id
* @return mixed
* http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=698
*/
public function selectStatementForClerk($agent_id, $agent_level, $store_id, $district_id)
public function selectStatementForClerk($agent_id, $site_id)
{
$time_ = date("Y-m-d", time());
$conditions['agent_id'] = $agent_id;
$conditions['create_time'] = array( 'between', array( $time_ . " 00:00:00", $time_ . " 23:59:59" ) );
/*** 日数据 **/
// 房源
$result["house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
// 客源
$result["user_num"] = $this->userModel->getAddUserNumByAgentId($conditions);
$result["user_num"] = $this->userModel->getAddUserNumByAgentIdV2($conditions);
// 带看 (报备)
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions);
$result["follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0;
//跟进
$m_phone_follow_up = new UPhoneFollowUpTemporary($site_id);
$result["phone_follow_up_num"] = $m_phone_follow_up->getFollowTotal($conditions);
// 业绩
$performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收
$result["performance"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
// 本月-业绩
/*** 月数据 **/
$start_time = date("Y-m-01", time());
$end_time = date("Y-m-d", time());
$conditions['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
// 房源
$result["month_house_num"] = $this->housesToAgents->getAddHouseNumByAgentId($conditions);
// 客源
$result["month_user_num"] = $this->userModel->getAddUserNumByAgentIdV2($conditions);
// 带看 (报备)
$addMarchInNum = $this->marchInModel->getAddMarchInNum($conditions);
$result["month_follow_up_num"] = isset($addMarchInNum[0]["num"]) ? $addMarchInNum[0]["num"] : 0;
//业绩
$performanceSum = $this->bargainModel->getAddBargainNum($conditions, 1);//1表示业绩 2表示实收
$result["performance_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
// 本月-成交单数
$result["month_performance"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
//成交单数
$performanceSum = $this->bargainModel->getAddBargainNumV2($conditions, 3);//1表示业绩 2表示实收
$result["bargain_sum_for_month"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
$result["month_bargain_sum"] = isset($performanceSum[0]["num"]) ? $performanceSum[0]["num"] : 0;
return $result;
}
......
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/3/13
* Time: 15:48
*/
namespace app\index\controller;
use app\api\service\ConvertCouponService;
use app\api\service\CouponService;
use app\api_broker\service\OrderLogService;
use app\api_broker\service\PayLogOpenService;
use app\api_broker\service\PayLogService;
use app\api_broker\service\RedisCacheService;
use app\api_broker\service\VipService;
use app\index\extend\Basic;
use app\index\untils\ExportExcelUntil;
use app\model\AAgents;
use app\model\AStore;
use app\model\GHouses;
use app\model\GHousesToAgents;
use app\model\OBargainLogModel;
use app\model\OBargainModel;
use app\model\ODaily;
use app\model\OfficeOImg;
use app\model\OfficeOPartialCommission;
use app\model\OfficeOPayLogModel;
use app\model\OImg;
use app\model\OMarchInModel;
use app\model\OPayLogAdjustment;
use app\model\OPayLogOpen;
use app\model\OPayLogOpenLog;
use app\model\OrderModel;
use app\model\ORealIncome;
use app\model\ORefundLogModel;
use app\model\OReportModel;
use app\model\OTaxes;
use app\model\OFinancialAudit;
use app\model\OPartialCommission;
use app\model\OPayLogModel;
use app\model\ORefundModel;
use app\model\TAgentTotalModel;
use app\model\Users;
use app\task\controller\ResultsSummaryNewTask;
use think\Exception;
use think\Request;
class OfficeFinance extends Basic
{
public function __construct(Request $request = null)
{
parent::__construct($request);
}
/**
* 分佣提成明细表
*
* @return \think\Response|\think\response\View
*/
public function partialCommissionList()
{
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where = [];
$where['a.confirm_status'] = 1;
$where['a.is_del'] = $select = 0;
$where['b.status'] = ['in','10,11,13'];
if (!empty($this->params['create_time']) && empty($this->params['end_time'])) {
$where['f.income_time'] = [ '>= time', $this->params['create_time'] . ' 00:00:00' ];
$select = 1;
}
if (!empty($this->params['end_time']) && empty($this->params['create_time'])) {
$where['f.income_time'] = [ '<= time', $this->params['end_time'] . ' 23:59:59' ];
$select = 1;
}
if (!empty($this->params['end_time']) && !empty($this->params['create_time'])) {
$where['f.income_time'] = [ 'between time', [ $this->params['create_time'] . ' 00:00:00', $this->params['end_time'] . ' 23:59:59' ] ];
$select = 1;
}
if (!empty($this->params['internal_address'])) {
$where['d.internal_address'] = [ 'like', '%' . $this->params['internal_address'] . '%' ];
$select = 1;
}
if (!empty($this->params['partial_id'])) {
$where['e.id'] = $this->params['partial_id'];
$select = 1;
}
if (!empty($this->params['house_number'])) {
$where['b.house_number'] = [ 'like', '%' . $this->params['house_number'] . '%' ];
$select = 1;
}
if (!empty($this->params['bargain_id'])) {
$where[] = [ 'EXP', 'b.id =' . $this->params['bargain_id'] . ' or father_id=' . $this->params['bargain_id'] ];
$select = 1;
}
if (!empty($this->params['store_id'])) {
$where['e.store_id'] = $this->params['store_id'];
$select = 1;
}
if (!empty($this->params['district_id'])) {
$where['e.district_id'] = $this->params['district_id'];
$select = 1;
}
$field = 'a.id,b.id as bargain_id,f.income_time,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,';
$field .= 'b.house_number,b.father_id,b.order_id,a.real_income_id,a.role,b.scale';
// $m_commission = new OPartialCommission();
$m_Office_commission = new OfficeOPartialCommission();
try {
$data['data']['list'] = $m_Office_commission->getCommissionBargainList($pageNo, $pageSize, 'a.id desc', $field, $where);
//dump($data['data']['list']);exit;
$data['data']['total'] = $m_Office_commission->getCommissionBargainListTotal($where);
if ($select) {
$data['data']['total_money'] = $m_Office_commission->totalMoney($where); //实收总计
} else {
$data['data']['total_money'] = '';
}
} catch (\Exception $e) {
return $this->response(101, '内部错误,获取分佣提成明细列表失败!请联系运营。'.$e->getMessage());
}
return $this->response("200", "request success", $data);
}
}
<?php
namespace app\index\controller;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/7/31
* Time: 上午10:18
*/
use app\index\extend\Basic;
use app\index\service\PerformanceService;
use app\index\untils\ExportExcelUntil;
use think\Request;
use \think\Session;
class OfficePerformance extends Basic
{
private $service_;
private $pageSize;
function __construct(Request $request = null)
{
parent::__construct($request);
$this->service_ = new PerformanceService();
$this->pageSize = 20;
}
/**
* 区域业绩排行
*/
public function selectDistrictPerformance()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"type" => 3, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" =>"",
);*/
$checkResult = $this->validate($params, "PerformanceServiceValidate.selectStorePerformance");
if (true !== $checkResult) {
return $this->response(101, $checkResult);
}
$params["type"] = 3;
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
//默认排序一周 2018-07-18改为本月
$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$end_day = !empty($params["end_day"]) ? $params["end_day"] : date("Y-m-d", time());
$father_id = !empty($params["father_id"]) ? $params["father_id"] : '' ;
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
//dump($list);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
$result["performance_total"] = $list['performance_total'];
$result["start_time"] = $start_day;
$result["end_time"] = $end_day;
return $this->response("200", "request success", $result);
}
return $this->response("200", "request null");
}
/**
* 门店排行
*/
public function selectStorePerformance()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
"start_day" => '2018-08-08',
"end_day" => '2018-08-08',
);*/
$checkResult = $this->validate($params, "PerformanceServiceValidate.selectStorePerformance");
if (true !== $checkResult) {
return $this->response(101, $checkResult);
}
$params["type"] = 2;
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
//默认排序一周 2018-07-18改为本月
$end_day = !empty($params["end_day"]) ? $params["end_day"] : date("Y-m-d", time());
$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$father_id = !empty($params["father_id"]) ? $params["father_id"] : '' ;
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
$result["performance_total"] = $list['performance_total'];
$result["start_time"] = $start_day;
$result["end_time"] = $end_day;
return $this->response("200", "request success", $result);
}
return $this->response("200", "request null");
}
/**
* 个人业绩排行
*/
public function selectIndividualPerformance()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"type" => 1, //1表示个人业绩排行 2门店 3区域
"end_day" => "",
"start_day" => "",
);*/
$checkResult = $this->validate($params, "PerformanceServiceValidate.selectStorePerformance");
if (true !== $checkResult) {
return $this->response(101, $checkResult);
}
$params["type"] = 1;
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
//默认排序一周 2018-07-18改为本月
$end_day = !empty($params["end_day"]) ? $params["end_day"] : date("Y-m-d", time());
$start_day = !empty($params["start_day"]) ? $params["start_day"] : date("Y-m-01", time());
$father_id = !empty($params["father_id"]) ? $params["father_id"] : '' ;
//判断是否是导出EXCEL
$is_excel = !empty($params["is_excel"]) ? $params["is_excel"] : '' ;
if($is_excel == 1){
$list = $this->service_->totalAgentExcel($params["type"], $end_day, $start_day,$father_id,$params);
}
$list = $this->service_->totalAgent($params["type"], $end_day, $start_day,$pageNo,$pageSize,$father_id,$params);
//dump($list);
if (count($list) > 0) {
$result["list"] = $list['list'];
$result["total"] = $list['total'];
$result["performance_total"] = $list['performance_total'];
$result["start_time"] = $start_day;
$result["end_time"] = $end_day;
return $this->response("200", "request success", $result);
}
return $this->response("200", "request null");
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/4/24
* Time: 16:55
*/
namespace app\index\controller;
use app\api_broker\service\RedisCacheService;
use app\api_broker\service\VipService;
use app\index\extend\Basic;
use app\index\untils\ExportExcelUntil;
use app\model\OBargainModel;
use app\model\OPartialCommission;
use think\Session;
class OfficePerformanceInfo extends Basic
{
protected $oBargainModel;
protected $status;
protected $redis_service;
public function __construct($request = null)
{
parent::__construct($request);
$this->oBargainModel = new OBargainModel();
$this->status = array('in','10,11,13');
$this->redis_service = new RedisCacheService();
}
/**
* 业绩明细
*/
public function performanceInfo() {
if ($this->request->isAjax()) {
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where['Obargain.status'] = $this->status;
/*开始结束时间*/
if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) {
$where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']];
}
if ($this->params['shop_type'] != NULL) {
$where['Houses.shop_type'] = $this->params['shop_type'];
}
// 成交类型
if ($this->params['trade_type'] != NULL) {
$where['Obargain.trade_type'] = $this->params['trade_type'];
}
// 商铺地址
if ($this->params['landmark'] != NULL) {
$where['Houses.internal_address'] = ['like', '%'.$this->params['landmark'].'%'];
}
// 商铺编号
if ($this->params['house_id'] != NULL) {
$where['Oorder.house_id'] = $this->params['house_id'];
}
// 部门
if ($this->params['district_id'] != NULL) {
$where['Agent.district_id'] = $this->params['district_id'] ;
}
// 门店
if ($this->params['store_id'] != NULL) {
$where['Agent.store_id'] = $this->params['store_id'] ;
}
// 经纪人ID
if ($this->params['agents_id'] != NULL) {
$where['Agent.id'] = $this->params['agents_id'];
}
// 姓名
if ($this->params['name'] != NULL) {
$where['Agent.name'] = ['like', '%'.$this->params['name'].'%'];
}
// 手机号
if ($this->params['phone'] != NULL) {
$where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%'];
}
// 成交报告id
if ($this->params['bargain_id'] != NULL) {
$exp ='(Obargain.id = '.$this->params['bargain_id'] .' and Obargain.father_id = 0) or (Obargain.father_id = '.$this->params['bargain_id'] .' and Obargain.father_id > 0)';
$where[] = ['EXP',$exp];
}
//dump($where);
$field = 'Obargain.create_time,';
$field .= 'Obargain.id,';
$field .= 'Obargain.father_id,';
$field .= 'Obargain.trade_type,';
$field .= 'Obargain.agent_id,';//分佣方ID,前端做权限判断用
$field .= 'Obargain.scale,';
$field .= 'Obargain.scale_fee,';
$field .= 'Obargain.order_id,';
$field .= 'Obargain.role,';
$field .= 'Obargain.price,';//pricec成交价格
$field .= 'Agent.name,';
$field .= 'Agent.phone,';
// $field .= 'Store.store_name,';
// $field .= 'District.district_name,';
$field .= 'Houses.internal_address,';
$field .= 'PartialCommission.practical_fee,';
$field .= 'Oorder.house_id';
$return = $this->oBargainModel->performancelInfo($where,$field,$pageSize,$pageNo);
foreach ($return as $key => $val) {
//成交报告ID
$return[$key]['bargain_id'] = $val["father_id"] == 0 ? $val["id"] : $val["father_id"];
//分佣ID
$return[$key]['commission_id'] = $val["id"] ;
$return[$key]['practical_fee'] = $val["practical_fee"] ? $val["practical_fee"] : 0 ;
//商铺地址只显示前3位,后面*替代
$return[$key]['landmark'] = $val["internal_address"] ? mb_substr($val["internal_address"],0,3,'utf-8').'****' : '';
$agent_data = $this->redis_service->getRedisCache(2, $val['agent_id']);
$return[$key]['store_name'] = $agent_data['store_name'];
$return[$key]['district_name'] = $agent_data['district_name'];
}
$return_total = $this->oBargainModel->performancelInfoTotal($where,$field);
/*计算业绩总计 即应分佣金 根据分佣ID去重*/
/*real_fee o_partial_commission数据表对应备注为'实分佣金字段' 作为 '预分业绩总计' */
$field = 'Obargain.scale_fee,Obargain.id,Obargain.father_id,PartialCommission.real_fee';
$return_sum = $this->oBargainModel->performancelInfoScaleFee($where,$field);
foreach ($return_sum as $key1 => $val1) {
//成交报告ID
$return_sum[$key1]['bargain_id'] = $val1["father_id"] == 0 ? $val1["id"] : $val1["father_id"];
//分佣ID
$return_sum[$key1]['commission_id'] = $val1["id"] ;
}
$return_sum_unique = $this->arr_unset($return_sum,'commission_id');
$return_sum = 0;
$real_fee = 0;
foreach ($return_sum_unique as $key12 => $val2) {
$return_sum += $val2["scale_fee"];
$real_fee += $val2["real_fee"];
}
/*计算业绩总计 即应分佣金 根据分佣ID去重*/
$data['data'] = $return;
$data['total'] = $return_total;
$data['scale_fee_sum'] = $return_sum;
$data['real_fee'] = $real_fee;
return $this->response(200, '', $data);
} else {
return view('performanceInfo');
}
}
/**
* 导出分佣提成明细表
*
* @return string
*/
public function getPerformanceInfoExcel()
{
//查询当前登录人权限
$vip_services = new VipService();
$get_group_res = $vip_services->getGroup($this->userId, '2,3,4,5');
$where['Obargain.status'] = $this->status;
/*开始结束时间*/
if (($this->params['create_time_start'] != NULL) && ($this->params['create_time_end'] != NULL)) {
$where['Obargain.create_time'] = ['between time', [$this->params['create_time_start']. ' 00:00:00', $this->params['create_time_end'] . ' 23:59:59']];
}
if ($this->params['shop_type'] != NULL) {
$where['Houses.shop_type'] = $this->params['shop_type'];
}
// 成交类型
if ($this->params['trade_type'] != NULL) {
$where['Obargain.trade_type'] = $this->params['trade_type'];
}
// 商铺地址
if ($this->params['landmark'] != NULL) {
$where['Houses.internal_address'] = ['like', '%'.$this->params['landmark'].'%'];
}
// 商铺编号
if ($this->params['house_id'] != NULL) {
$where['Oorder.house_id'] = $this->params['house_id'];
}
// 部门
if ($this->params['district_id'] != NULL) {
$where['Agent.district_id'] = $this->params['district_id'] ;
}
// 门店
if ($this->params['store_id'] != NULL) {
$where['Agent.store_id'] = $this->params['store_id'] ;
}
// 姓名
if ($this->params['name'] != NULL) {
$where['Agent.name'] = ['like', '%'.$this->params['name'].'%'];
}
// 手机号
if ($this->params['phone'] != NULL) {
$where['Agent.phone'] = ['like', '%'.$this->params['phone'].'%'];
}
// 成交报告id
if ($this->params['bargain_id'] != NULL) {
$exp ='(Obargain.id = '.$this->params['bargain_id'] .' and Obargain.father_id = 0) or (Obargain.father_id = '.$this->params['bargain_id'] .' and Obargain.father_id > 0)';
$where[] = ['EXP',$exp];
}
$field = 'Obargain.create_time,';
$field .= 'Obargain.id,';
$field .= 'Obargain.father_id,';
$field .= 'Obargain.trade_type,';
$field .= 'Obargain.agent_id,';//分佣方ID
$field .= 'Houses.internal_address,';
$field .= 'Oorder.house_id,';
$field .= 'Obargain.price,';//pricec成交价格
$field .= 'Agent.name,';
$field .= 'Agent.phone,';
// $field .= 'Store.store_name,';
// $field .= 'District.district_name,';
$field .= 'Obargain.scale,';
$field .= 'Obargain.scale_fee,';
$field .= 'PartialCommission.practical_fee,';
$field .= 'Obargain.role';
$return = $this->oBargainModel->performancelInfoExcel($where,$field);
if(!$return){
return $this->response("101","无数据");
}
$export = new ExportExcelUntil();
$e_data_new = [];
$role_arr = [1=>'盘方',2=>'客方',3=>'反签',4=>'独家',5=>'合作方',6=>'APP盘下载方',7=>'APP客下载方'];
foreach ($return as $key => $v) {
$e_data_old['bargain_id'] = $v["father_id"] == 0 ? $v["id"] : $v["father_id"];
$e_data_old['commission_id'] = $v["id"] ;
$e_data_old['create_time'] = $v['create_time'];//提交时间
if($v['trade_type'] == 10){
$e_data_old['trade_type'] = "出租";
}elseif($v['trade_type'] == 20){
$e_data_old['trade_type'] = "增佣";
}elseif($v['trade_type'] == 30){
$e_data_old['trade_type'] = "代理";
}else{
$e_data_old['trade_type'] = "好处费";
}
//商铺地址截取字符串前3位,角色'2,3,4,5'的做隐藏
if($v["internal_address"] && $get_group_res){
$landmark = mb_substr($v["internal_address"],0,3,'utf-8').'****';
}else{
$landmark = $v["internal_address"] ;
}
$e_data_old['landmark'] = $landmark;//商铺地址
$e_data_old['house_id'] = $v['house_id'];//商铺编号
$e_data_old['role_name'] = $role_arr[$v['role']];//分佣提成方
$e_data_old['name_phone'] = $v['name'].'-'.$v['phone'];//分佣提成方
$agent_data = $this->redis_service->getRedisCache(2, $v['agent_id']);
$e_data_old['store_name'] = $agent_data['store_name'];//所属门店
$e_data_old['scale'] = $v['scale'];//分佣比例
$e_data_old['scale_fee'] = $v['scale_fee'] ? $v['scale_fee'] : 0;//应收佣金
$e_data_old['practical_fee'] = $v['practical_fee'] ? $v['practical_fee'] : 0;//实收佣金
$e_data_old['price'] = $v['price'];//成交价
$e_data_new[]=$e_data_old;
}
$title = [ '成交报告ID', '分佣ID','提交时间', '成交类型', '商铺地址', '商铺编号','角色', '分佣提成方', '所属部门门店', '分佣比例', '应分佣金', '实收佣金' ,'成交价'];
$export->exportTable('业绩明细', $e_data_new, count($e_data_new[0]) - 1, '业绩明细表', $title);
return '';
}
//对一个二维数组的某个键进行去重
private function arr_unset($arr,$key){
$res = array();
foreach ($arr as $value) {
if(isset($res[$value[$key]])){//查看有没有重复项
unset($value[$key]); //有:销毁
}
else{
$res[$value[$key]] = $value;
}
}
return $res;
}
}
\ No newline at end of file
......@@ -1103,6 +1103,12 @@ Route::group('office_index', [
'backOutToOne' => ['index/OfficeBargain/backOutToOne', ['method' => 'POST']], //财务 成交报告-撤销成交报告
'recoveryBargain' => ['index/OfficeBargain/recoveryBargain', ['method' => 'POST']],//撤销列表-恢复成交报告
'partialCommissionList' => ['index/OfficeFinance/partialCommissionList', ['method' => 'get']], //分佣提成明细表
'performanceInfo' => [ 'index/OfficePerformanceInfo/performanceInfo', [ 'method' => 'GET|POST' ] ],//业绩明细办公楼
'selectDistrictPerformance' => [ 'index/OfficePerformance/selectDistrictPerformance', [ 'method' => 'GET|POST' ] ],//区域业绩排行
'selectStorePerformance' => [ 'index/OfficePerformance/selectStorePerformance', [ 'method' => 'GET|POST' ] ],//门店排行
'selectIndividualPerformance' => [ 'index/OfficePerformance/selectIndividualPerformance', [ 'method' => 'GET|POST' ] ],//个人业绩排行
]);
Route::group('office_api', [
......@@ -1113,4 +1119,7 @@ Route::group('office_api', [
'getOfficeBuildingInfo' => ['api/OfficeBuilding/getOfficeBuildingInfo', ['method' => 'GET|POST']],//办公楼详情
]);
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
//Route::miss('api/index/miss');//处理错误的url
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment