Jelajahi Sumber

Merge branch 'wugg-dev' of wugg/phpstock into version1.5

wugg 2 tahun lalu
induk
melakukan
7a82f79ffc
2 mengubah file dengan 4 tambahan dan 4 penghapusan
  1. 1 1
      app/command/NowReportHandle.php
  2. 3 3
      app/command/good.php

+ 1 - 1
app/command/NowReportHandle.php

@@ -546,7 +546,7 @@ class NowReportHandle extends Command
     public function  GetWlb($start,$end){
         $db =Db::connect("mysql_cxinv");
         $list =$db->name("cgd_info")
-          ->where(['name'=>'网络部采购单'])->whereBetweenTime('createdTime',$start,$end)->field(
+          ->where(['cgdSource'=>10,"is_del"=>0])->whereBetweenTime('createdTime',$start,$end)->field(
             "year(createdTime) AS `年`,
 					month(createdTime) AS `月`,
 					dayofmonth(createdTime) AS `日`,

+ 3 - 3
app/command/good.php

@@ -89,11 +89,11 @@ class good extends Command
 	//网络部数据统计
     public function wlb(){
     	$Db=Db::connect("mysql_cxinv");
-    	$month_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo")
+    	$month_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo and b.qrdSource = 10 and  b.is_del = 0")
     	->whereMonth("a.addtime","this month")->where("b.companyNo","GS2203161855277894")->sum('totalPrice');
-    	$week_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo")
+    	$week_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo and b.qrdSource = 10 and  b.is_del = 0")
     	->whereWeek("a.addtime","this week")->where("b.companyNo","GS2203161855277894")->sum('totalPrice');
-    	$day_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo")
+    	$day_total =$Db->name("inter_order")->alias("a")->leftjoin("qrd_info b","a.orderCode=b.sequenceNo and b.qrdSource = 10 and  b.is_del = 0")
     	->whereDay("a.addtime","today")->where("b.companyNo","GS2203161855277894")->sum('totalPrice');
     	return ["month_total"=>$month_total,"week_total"=>$week_total,"day_total"=>$day_total] ;
     }