更新细节

This commit is contained in:
yaooo 2023-12-19 15:45:30 +08:00
parent 5b59ab25cc
commit 251407de86

View File

@ -18,6 +18,7 @@ namespace app\adminapi\lists\bid;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\bid\BidBiddingDecision;
use app\common\lists\ListsSearchInterface;
use think\facade\Db;
/**
@ -38,7 +39,7 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI
public function setSearch(): array
{
return [
'=' => ['project_id', 'bidding_project_fund_source', 'bid_type'],
'=' => ['bbd.project_id', 'bbd.bidding_project_fund_source', 'bbd.bid_type'],
];
}
@ -54,11 +55,20 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI
*/
public function lists(): array
{
return BidBiddingDecision::where($this->searchWhere)
->field(['*'])
return Db::name('BidBiddingDecision')->alias('bbd')
->where($this->searchWhere)
->whereNull('bbd.delete_time')
->leftJoin('project p','p.id = bbd.project_id')
->field('bbd.*, p.name as project_name, p.project_code')
->limit($this->limitOffset, $this->limitLength)
->order(['id' => 'desc'])
->select()
->order(['bbd.id' => 'desc'])
->select()->each(function($item, $key){
//关联数据后续添加
$item['approve_no'] = '付款单号';
$item['approve_step'] = '流程步骤';
$item['approve_settle_status'] = 1;
return $item;
})
->toArray();
}
@ -71,7 +81,10 @@ class BidBiddingDecisionLists extends BaseAdminDataLists implements ListsSearchI
*/
public function count(): int
{
return BidBiddingDecision::where($this->searchWhere)->count();
return Db::name('BidBiddingDecision')->alias('bbd')
->where($this->searchWhere)
->whereNull('bbd.delete_time')
->leftJoin('project p','p.id = bbd.project_id')->count();
}
}