Kaynağa Gözat

大废品统计查询条件优化

qiuenguang 1 yıl önce
ebeveyn
işleme
095aa8fcb9

+ 9 - 3
application/api/controller/WasteStatistics.php

@@ -50,7 +50,13 @@ class WasteStatistics extends Api
         $this->success('成功',$data);
     }
 
-    //右侧数据
+    /**
+     * 右侧数据
+     * @return void
+     * @throws \think\exception\DbException
+     * @throws db\exception\DataNotFoundException
+     * @throws db\exception\ModelNotFoundException
+     */
     public function ReghtList()
     {
         if ($this->request->isGet() === false){
@@ -66,14 +72,14 @@ class WasteStatistics extends Api
         $mouth = $date->format('Y-m');
         $year = $date->format('Y');
         $where = [
-            'a.sys_rq' => ['like',$mouth.'%']
+            'a.sczl_rq' => ['like',$mouth.'%']
         ];
         if (isset($param['week']) && !empty($param['week'])){
             $week = $dateTime->setISODate($year,$param['week']);
             $startTime = $week->format('Y-m-d 00:00:00');
             $weekLast = $week->modify('+7 days');
             $endTime = $weekLast->format('Y-m-d 00:00:00');
-            $where['a.sys_rq'] = ['between',[$startTime,$endTime]];
+            $where['a.sczl_rq'] = ['between',[$startTime,$endTime]];
         }
         $query = \db('db_大废品')
             ->alias('a')