Kaynağa Gözat

修改网格化接口

qiuzijian 11 ay önce
ebeveyn
işleme
1db4ebd061
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      Modules/Admin/Services/ApiService.php

+ 2 - 2
Modules/Admin/Services/ApiService.php

@@ -367,7 +367,7 @@ class ApiService{
         if ($start_date == $end_date) {
             $query = $query->where('lrsj', 'like', $start_date . '%');
         } else {
-            $query = $query->where('lrsj', '>=', $start_date)->where('lrsj', '<=', $end_date);
+            $query = $query->where('lrsj', '>=', $start_date . ' 00:00:00')->where('lrsj', '<=', $end_date . ' 23:59:59');
         }
 
         if ($depart) {
@@ -378,7 +378,7 @@ class ApiService{
             $query = $query->where('lrr', $person_id);
         }
 
-        $query = $query->orderBy('lrsj', 'desc')->groupBy('lrdate', 'xjdw', 'lrr')
+        $query = $query->orderBy('lrdate', 'desc')->groupBy('lrdate', 'xjdw', 'lrr')
                        ->select(
                            [
                                DB::raw('DATE(lrsj) as lrdate'),