|
|
@@ -24,10 +24,16 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
|
|
|
{
|
|
|
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'],
|
|
|
-
|
|
|
];
|
|
|
}
|
|
|
|
|
|
+ public function querySearch(): array
|
|
|
+ {
|
|
|
+ $where['issue_approval'] = ['<>',0];
|
|
|
+ $where['master_worker_id'] = ['=',$this->userId];
|
|
|
+ return $where;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @notes 获取列表
|
|
|
@@ -41,7 +47,8 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
|
|
|
public function lists(): array
|
|
|
{
|
|
|
return IssueWork::where($this->searchWhere)
|
|
|
- ->field(['id', 'work_sn', 'service_work_id', 'master_worker_id', 'issue_approval', 'complaint_status', 'responsible', 'complaint_details', 'complaint_images', 'finished_time', 'approval_admin_id', 'approval_time', 'create_time', 'update_time'])
|
|
|
+ ->where($this->querySearch())
|
|
|
+ ->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'])
|
|
|
->select()
|
|
|
@@ -57,7 +64,7 @@ class IssueWorkLists extends BaseWorkerDataLists implements ListsSearchInterface
|
|
|
*/
|
|
|
public function count(): int
|
|
|
{
|
|
|
- return IssueWork::where($this->searchWhere)->count();
|
|
|
+ return IssueWork::where($this->searchWhere)->where($this->querySearch())->count();
|
|
|
}
|
|
|
|
|
|
}
|