wugg 2 yıl önce
ebeveyn
işleme
2c2836444a
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      app/command/good.php

+ 1 - 1
app/command/good.php

@@ -51,7 +51,7 @@ class good extends Command
 	//各部门统计数据
     public  function GetData($uid,$departid=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'=>Db::raw('YEAR(NOW())') ,"month"=>Db::raw('month(NOW())'),"depart_id"=>$departid])
+    	$tips = Db::name("depart_tips")->where(['year'=>date("Y") ,"month"=>date("m"),"depart_id"=>$departid])
     	->column("department,total_tips");
 		$temp['p']= $tips['department']??"";
 		$temp['tips']= sprintf( "%.2f",$tips['total_tips']??0);