['bid_security_apply_id', 'project_id', 'bank_account_id'], ]; } /** * @notes 获取列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2023/12/18 10:29 */ public function lists(): array { return BidSecurityRefund::where($this->searchWhere) ->field('id,project_id,bid_security_apply_id,refund_amount,refund_date,remark,annex,bank_account_id,create_time') ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ $project = Project::field('custom_id,name,project_code')->where('id',$data['project_id'])->findOrEmpty(); $custom = Custom::field('name')->where('id',$project['custom_id'])->findOrEmpty(); $bid_security_apply = BidSecurityApply::field('bidding_decision_id')->where('id',$data['bid_security_apply_id'])->findOrEmpty(); $bidding_decision = BidBiddingDecision::field('code,bidding_time')->where('id',$bid_security_apply['bidding_decision_id'])->findOrEmpty(); $data['bidding_decision_code'] = $bidding_decision['code']; $data['custom_name'] = $custom['name']; $data['project_name'] = $project['name']; $data['project_code'] = $project['project_code']; $data['bidding_time'] = $bidding_decision['bidding_time']; $data['bank_account_info'] = BankAccount::field('account_sn,deposit_bank,account_name,account')->where('id',$data['bank_account_id'])->findOrEmpty(); return $data; }) ->toArray(); } /** * @notes 获取数量 * @return int * @author likeadmin * @date 2023/12/18 10:29 */ public function count(): int { return BidSecurityRefund::where($this->searchWhere)->count(); } }