|
@@ -308,6 +308,45 @@ class Authcompany
|
|
$userinfo['company']['image'] = one_domain_image($userinfo['company']['image']);
|
|
$userinfo['company']['image'] = one_domain_image($userinfo['company']['image']);
|
|
$userinfo['money'] = model('walletcompany')->getWallet($this->company_id,'money');
|
|
$userinfo['money'] = model('walletcompany')->getWallet($this->company_id,'money');
|
|
|
|
|
|
|
|
+/////////////////////////////////////
|
|
|
|
+ //个人信息
|
|
|
|
+ $strattime = strtotime(date('Y-m-d'));
|
|
|
|
+ $endtime = $strattime + 86399;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //今日开单
|
|
|
|
+ $map = [
|
|
|
|
+ 'company_id' => $this->company_id,
|
|
|
|
+ 'finishtime' => ['BETWEEN',[$strattime,$endtime]], //开单时间用完成时间
|
|
|
|
+ 'status' => 3,
|
|
|
|
+ ];
|
|
|
|
+ if($this->type == 2){
|
|
|
|
+ //员工的
|
|
|
|
+ $map['staff_id'] = $this->id;
|
|
|
|
+ }
|
|
|
|
+ $today_pay_fee = Db::name('order')->where($map)->sum('pay_fee');
|
|
|
|
+ $today_appen_fee = Db::name('order')->where($map)->sum('appen_fee');
|
|
|
|
+ $userinfo['today_order_totalfee'] = $today_appen_fee + $today_pay_fee;
|
|
|
|
+
|
|
|
|
+ //今日新增客户
|
|
|
|
+ $map = [
|
|
|
|
+ 'company_id' => $this->company_id,
|
|
|
|
+ 'createtime'=>['BETWEEN',[$strattime,$endtime]],
|
|
|
|
+ ];
|
|
|
|
+ if($this->type == 2){
|
|
|
|
+ //员工的
|
|
|
|
+ $map['staff_id'] = $this->id;
|
|
|
|
+ }
|
|
|
|
+ $userinfo['today_newcus'] = Db::name('user_wallet')->where($map)->count();
|
|
|
|
+
|
|
|
|
+ //今日新增预约
|
|
|
|
+ $map = [
|
|
|
|
+ 'company_id' => $this->company_id,
|
|
|
|
+ 'createtime'=>['BETWEEN',[$strattime,$endtime]],
|
|
|
|
+ ];
|
|
|
|
+ $userinfo['today_newpre'] = Db::name('pre_order')->where($map)->count();
|
|
|
|
+
|
|
return $userinfo;
|
|
return $userinfo;
|
|
}
|
|
}
|
|
|
|
|