cqp 9 月之前
父節點
當前提交
41ab5c0d6e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Http/Controllers/Api/ScreenController.php

+ 2 - 2
app/Http/Controllers/Api/ScreenController.php

@@ -34,9 +34,9 @@ class ScreenController extends BaseController
 
         $totalValueAllTime = SaleOrdersProduct::where('del_time',0)->sum('finished_num');
         $totalValueLastYear = SaleOrdersProduct::where('del_time',0)->whereRaw("YEAR(FROM_UNIXTIME(crt_time)) = $lastYear")->sum('finished_num');
-        $totalValueCurrentYearMonth = DispatchSub::where('del_time',0)->whereRaw("YEAR(FROM_UNIXTIME(crt_time)) = $currentYear AND MONTH(FROM_UNIXTIME(crt_time)) = $currentMonth")->sum('finished_num');
+        $totalValueCurrentYearMonth = SaleOrdersProduct::where('del_time',0)->whereRaw("YEAR(FROM_UNIXTIME(crt_time)) = $currentYear AND MONTH(FROM_UNIXTIME(crt_time)) = $currentMonth")->sum('finished_num');
 
-        return $this->json_return(200,'',['total_time'=>$totalValueAllTime + 80234.000, 'total_last_year'=>$totalValueLastYear + 10012.000, 'total_current_month'=>$totalValueCurrentYearMonth]);
+        return $this->json_return(200,'',['total_time'=>$totalValueAllTime, 'total_last_year'=>$totalValueLastYear, 'total_current_month'=>$totalValueCurrentYearMonth]);
     }
 
     /**