|
@@ -23,12 +23,14 @@ class good extends Command
|
|
$sttime = Cache::get("departTips");
|
|
$sttime = Cache::get("departTips");
|
|
if($sttime==1) return '';
|
|
if($sttime==1) return '';
|
|
Cache::set("departTips",1,1800);
|
|
Cache::set("departTips",1,1800);
|
|
- $daprtid = [56,64,52,57];
|
|
|
|
|
|
+ $daprtid = [52,53,56,57];
|
|
$temp=["p"=>"总计","thtotal"=>0,"mtotal"=>0,"mthfee"=>0,"wtotal"=>0,"wthfee"=>0,"dtotal"=>0,"thfee"=>0,"tips"=>0,"rate"=>0,"thrate"=>0];
|
|
$temp=["p"=>"总计","thtotal"=>0,"mtotal"=>0,"mthfee"=>0,"wtotal"=>0,"wthfee"=>0,"dtotal"=>0,"thfee"=>0,"tips"=>0,"rate"=>0,"thrate"=>0];
|
|
$data=[];
|
|
$data=[];
|
|
- $uidArr =Db::name("depart_user")->where(['itemid'=>$daprtid])->column("uid","itemid");
|
|
|
|
|
|
+
|
|
foreach ($daprtid as $itmeid){
|
|
foreach ($daprtid as $itmeid){
|
|
- $data[]=$this->GetData($uidArr[$itmeid]??[],$itmeid);
|
|
|
|
|
|
+ $uidArr =Db::name("depart_user")->where(['itemid'=>$itmeid])->column("uid");
|
|
|
|
+ var_dump($uidArr);
|
|
|
|
+ $data[]=$this->GetData($uidArr,$itmeid);
|
|
}
|
|
}
|
|
$temp['thtotal'] = sprintf( "%.2f",array_sum(array_column($data,'thtotal')));
|
|
$temp['thtotal'] = sprintf( "%.2f",array_sum(array_column($data,'thtotal')));
|
|
$temp['mtotal'] = sprintf( "%.2f",array_sum(array_column($data,'mtotal')));
|
|
$temp['mtotal'] = sprintf( "%.2f",array_sum(array_column($data,'mtotal')));
|
|
@@ -53,7 +55,6 @@ class good extends Command
|
|
$temp=["p"=>"","thtotal"=>0,"mtotal"=>0,"mthfee"=>0,"wtotal"=>0,"wthfee"=>0,"dtotal"=>0,"thfee"=>0,"tips"=>0,"rate"=>0,"thrate"=>0];
|
|
$temp=["p"=>"","thtotal"=>0,"mtotal"=>0,"mthfee"=>0,"wtotal"=>0,"wthfee"=>0,"dtotal"=>0,"thfee"=>0,"tips"=>0,"rate"=>0,"thrate"=>0];
|
|
$tips = Db::name("depart_tips")->where(['year'=>date("Y") ,"month"=>date("m"),"depart_id"=>$departid])
|
|
$tips = Db::name("depart_tips")->where(['year'=>date("Y") ,"month"=>date("m"),"depart_id"=>$departid])
|
|
->field("depart_item,total_tips")->findOrEmpty();
|
|
->field("depart_item,total_tips")->findOrEmpty();
|
|
- var_dump($tips);
|
|
|
|
$temp['p']= $tips['depart_item']??"";
|
|
$temp['p']= $tips['depart_item']??"";
|
|
$temp['tips']= sprintf( "%.2f",$tips['total_tips']??0);
|
|
$temp['tips']= sprintf( "%.2f",$tips['total_tips']??0);
|
|
$month_total =Db::name("sale")->where([["apply_id","in",$uid],["is_del","=",0]])->whereMonth("addtime","this month")
|
|
$month_total =Db::name("sale")->where([["apply_id","in",$uid],["is_del","=",0]])->whereMonth("addtime","this month")
|