update
This commit is contained in:
parent
17d94a5ecd
commit
1261d49889
@ -62,10 +62,6 @@ class CustomerDemandLists extends BaseAdminDataLists implements ListsSearchInter
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
@ -97,10 +93,6 @@ class CustomerDemandLists extends BaseAdminDataLists implements ListsSearchInter
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
|
@ -42,7 +42,7 @@ class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSea
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id','customer_demand_id'],
|
||||
'=' => ['project_id'],
|
||||
'%like%' => ['theme'],
|
||||
];
|
||||
}
|
||||
@ -61,10 +61,6 @@ class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSea
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
@ -101,10 +97,6 @@ class CustomerDemandSolutionLists extends BaseAdminDataLists implements ListsSea
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
|
@ -61,10 +61,6 @@ class CompetitorLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
@ -101,10 +97,6 @@ class CompetitorLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
|
@ -63,10 +63,6 @@ class ProjectEstimateLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
@ -124,10 +120,6 @@ class ProjectEstimateLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
|
@ -61,10 +61,6 @@ class ProjectFollowUpLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
@ -99,10 +95,6 @@ class ProjectFollowUpLists extends BaseAdminDataLists implements ListsSearchInte
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
|
@ -60,13 +60,7 @@ class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface,Li
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$condition = [];
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$condition[] = ['custom_id','in',$customIds];
|
||||
}
|
||||
return Project::where($this->searchWhere)->where($condition)
|
||||
return Project::where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()->each(function($item){
|
||||
@ -105,13 +99,7 @@ class ProjectLists extends BaseAdminDataLists implements ListsSearchInterface,Li
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$condition = [];
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$condition[] = ['custom_id','in',$customIds];
|
||||
}
|
||||
return Project::where($this->searchWhere)->where($condition)->count();
|
||||
return Project::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
public function setFileName(): string
|
||||
|
@ -42,7 +42,7 @@ class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSea
|
||||
public function setSearch(): array
|
||||
{
|
||||
return [
|
||||
'=' => ['project_id', 'technician_ids', 'business_people_ids', 'cross_departmental_personnel_ids'],
|
||||
'=' => ['project_id'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -58,18 +58,7 @@ class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSea
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
return ProjectPreSalesMembers::where($this->searchWhere)->where($where)
|
||||
return ProjectPreSalesMembers::where($this->searchWhere)
|
||||
->field(['id,project_id,technician_ids,business_people_ids,cross_departmental_personnel_ids,add_user,create_time'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
@ -100,18 +89,7 @@ class ProjectPreSalesMembersLists extends BaseAdminDataLists implements ListsSea
|
||||
*/
|
||||
public function count(): int
|
||||
{
|
||||
$params = $this->request->param();
|
||||
$where = [];
|
||||
if(isset($params['project_name']) && $params['project_name'] != ''){
|
||||
$projectIds = Project::where('name','like','%'.$params['project_name'].'%')->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
if(isset($params['custom_name']) && $params['custom_name'] != ''){
|
||||
$customIds = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id');
|
||||
$projectIds = Project::where('custom_id','in',$customIds)->column('id');
|
||||
$where[] = ['project_id','in',$projectIds];
|
||||
}
|
||||
return ProjectPreSalesMembers::where($this->searchWhere)->where($where)->count();
|
||||
return ProjectPreSalesMembers::where($this->searchWhere)->count();
|
||||
}
|
||||
|
||||
public function setFileName(): string
|
||||
|
Loading…
x
Reference in New Issue
Block a user