diff --git a/app/adminapi/lists/bid/BidBiddingDecisionLists.php b/app/adminapi/lists/bid/BidBiddingDecisionLists.php index 50c6f2270..58fdf93c2 100644 --- a/app/adminapi/lists/bid/BidBiddingDecisionLists.php +++ b/app/adminapi/lists/bid/BidBiddingDecisionLists.php @@ -60,10 +60,6 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI { $params = $this->request->get(['project_name','custom_name']); $where = []; - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } if(isset($params['custom_name']) && $params['custom_name'] != ''){ $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); @@ -100,10 +96,6 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI { $params = $this->request->get(['project_name','custom_name']); $where = []; - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } if(isset($params['custom_name']) && $params['custom_name'] != ''){ $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); diff --git a/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php b/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php index cbc84db0d..1347e8d46 100644 --- a/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php +++ b/app/adminapi/lists/bid/BidBuyBiddingDocumentLists.php @@ -60,21 +60,17 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear */ public function lists(): array { - $params = $this->request->get(['project_name','custom_name','custom_id']); + $params = $this->request->get(); $where = []; - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } if(isset($params['custom_name']) && $params['custom_name'] != ''){ $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); $where[] = ['project_id','in',$project_ids]; } - if(isset($params['custom_id']) && $params['custom_id'] != ''){ - $project_ids = Project::where('custom_id',$params['custom_id'])->column('id'); - $where[] = ['project_id','in',$project_ids]; - } + if(isset($params['bid_decision_code']) && $params['bid_decision_code'] != ''){ + $bid_decision_ids = BidBiddingDecision::where('code','like','%'.$params['bid_decision_code'].'%')->column('id'); + $where[] = ['bid_decision_id','in',$bid_decision_ids]; + } return BidBuyBiddingDocument::field('id,project_id,bid_decision_id,bid_document_no,invite_tenders_company_name,bid_company_name,buyer,amount,buy_date') ->where($this->searchWhere)->where($where) ->limit($this->limitOffset, $this->limitLength) @@ -108,20 +104,16 @@ class BidBuyBiddingDocumentLists extends BaseAdminDataLists implements ListsSear */ public function count(): int { - $params = $this->request->get(['project_name','custom_name','custom_id']); + $params = $this->request->get(); $where = []; - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } if(isset($params['custom_name']) && $params['custom_name'] != ''){ $custom_ids = Custom::where('name','like','%'.$params['custom_name'].'%')->column('id'); $project_ids = Project::where('custom_id','in',$custom_ids)->column('id'); $where[] = ['project_id','in',$project_ids]; } - if(isset($params['custom_id']) && $params['custom_id'] != ''){ - $project_ids = Project::where('custom_id',$params['custom_id'])->column('id'); - $where[] = ['project_id','in',$project_ids]; + if(isset($params['bid_decision_code']) && $params['bid_decision_code'] != ''){ + $bid_decision_ids = BidBiddingDecision::where('code','like','%'.$params['bid_decision_code'].'%')->column('id'); + $where[] = ['bid_decision_id','in',$bid_decision_ids]; } return BidBuyBiddingDocument::where($this->searchWhere)->where($where)->count(); } diff --git a/app/adminapi/lists/bid/BidDocumentExaminationLists.php b/app/adminapi/lists/bid/BidDocumentExaminationLists.php index 4f078d3be..fb670e4d8 100644 --- a/app/adminapi/lists/bid/BidDocumentExaminationLists.php +++ b/app/adminapi/lists/bid/BidDocumentExaminationLists.php @@ -68,10 +68,6 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea $bid_doc_ids = BidBuyBiddingDocument::where('bid_document_no','like','%'.$params['bid_document_no'].'%')->column('id'); $where[] = ['buy_bidding_document_id','in',$bid_doc_ids]; } - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } $field = 'id,code,project_id,buy_bidding_document_id'; return BidDocumentExamination::where($this->searchWhere)->where($where) ->field($field)->limit($this->limitOffset, $this->limitLength) @@ -116,10 +112,6 @@ class BidDocumentExaminationLists extends BaseAdminDataLists implements ListsSea $bid_doc_ids = BidBuyBiddingDocument::where('bid_document_no','like','%'.$params['bid_document_no'].'%')->column('id'); $where[] = ['buy_bidding_document_id','in',$bid_doc_ids]; } - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('name','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } return BidDocumentExamination::field('id')->where($this->searchWhere)->where($where)->count(); } diff --git a/app/adminapi/lists/bid/BidResultLists.php b/app/adminapi/lists/bid/BidResultLists.php index a5de474d3..893c81fe0 100644 --- a/app/adminapi/lists/bid/BidResultLists.php +++ b/app/adminapi/lists/bid/BidResultLists.php @@ -44,7 +44,7 @@ class BidResultLists extends BaseAdminDataLists implements ListsSearchInterface, public function setSearch(): array { return [ - '=' => ['bid_document_examination_id', 'project_id'], + '=' => ['project_id'], ]; } @@ -66,10 +66,6 @@ class BidResultLists extends BaseAdminDataLists implements ListsSearchInterface, $bid_document_examination_ids = BidDocumentExamination::where('code','like','%'.$params['bid_document_examination_code'].'%')->column('id'); $where[] = ['bid_document_examination_id','in',$bid_document_examination_ids]; } - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('code','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } return BidResult::where($this->searchWhere)->where($where) ->field('id,bid_document_examination_id,project_id,is_successful,bidder_company,bidder_amount') ->limit($this->limitOffset, $this->limitLength) @@ -106,10 +102,6 @@ class BidResultLists extends BaseAdminDataLists implements ListsSearchInterface, $bid_document_examination_ids = BidDocumentExamination::where('code','like','%'.$params['bid_document_examination_code'].'%')->column('id'); $where[] = ['bid_document_examination_id','in',$bid_document_examination_ids]; } - if(isset($params['project_name']) && $params['project_name'] != ''){ - $project_ids = Project::where('code','like','%'.$params['project_name'].'%')->column('id'); - $where[] = ['project_id','in',$project_ids]; - } return BidResult::where($this->searchWhere)->where($where)->count(); }