Ver código fonte

工单统计

whitefang 1 ano atrás
pai
commit
49fb764bf2
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      app/workerapi/lists/IssueWorkLists.php

+ 3 - 3
app/workerapi/lists/IssueWorkLists.php

@@ -23,13 +23,12 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
     public function setSearch(): array
     {
         return [
-            '=' => ['work_sn', 'service_work_id', 'master_worker_id', 'issue_approval', 'complaint_status', 'responsible', 'complaint_details', 'finished_time', 'approval_admin_id', 'approval_time', 'create_time', 'update_time'],
+            '=' => ['work_sn', 'service_work_id', 'complaint_status', 'responsible', 'complaint_details', 'finished_time', 'approval_admin_id', 'approval_time', 'create_time', 'update_time'],
         ];
     }
 
     public function querySearch(): array
     {
-        $where['issue_approval'] = ['<>',0];
         $where['master_worker_id'] = ['=',$this->userId];
         return $where;
     }
@@ -51,6 +50,7 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
         }])
         ->where($this->searchWhere)
             ->where($this->querySearch())
+            ->where('issue_approval','>',0)
             ->field(['id', 'work_sn', 'service_work_id', 'issue_approval', 'complaint_status', 'responsible', 'complaint_details', 'complaint_images', 'finished_time', 'create_time', 'update_time'])
             ->limit($this->limitOffset, $this->limitLength)
             ->order(['id' => 'desc'])
@@ -66,7 +66,7 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
      */
     public function count(): int
     {
-        return IssueWork::where($this->searchWhere)->where($this->querySearch())->count();
+        return IssueWork::where($this->searchWhere)->where($this->querySearch())->where('issue_approval','>',0)->count();
     }
 
 }