['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(); } public function setFileName(): string { return '投标保证金退还列表'; } /** * @notes 导出字段 * @return string[] * @author 段誉 * @date 2022/11/24 16:17 */ public function setExcelFields(): array { return [ "id" => "id", "bidding_decision_code" => "投标编号", "custom_name" => "客户名称", "project_code" => "项目编码", "project_name" => "项目名称", "bidding_time" => "投标时间", "refund_amount" => "退款金额", "refund_date" => "退款日期", "remark" => "备注", ]; } }