From cd0daa277929721a2e56044e2332ba7cc8a03e51 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Mon, 5 Aug 2024 17:27:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=A2=9E=E5=8A=A0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/invoice/InvoiceIssuanceService.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/service/invoice/InvoiceIssuanceService.php b/app/service/invoice/InvoiceIssuanceService.php index f0608b8..0907136 100644 --- a/app/service/invoice/InvoiceIssuanceService.php +++ b/app/service/invoice/InvoiceIssuanceService.php @@ -27,6 +27,18 @@ class InvoiceIssuanceService ['delete_time', '=', 0] ]; + if (isset($param['start_date']) && !empty($param['start_date'])) { + $where[] = [ + 'create_time', '>=', strtotime($param['start_date'] . ' 00:00:00') + ]; + } + + if (isset($param['end_date']) && !empty($param['end_date'])) { + $where[] = [ + 'create_time', '<=', strtotime($param['end_date'] . ' 23:59:59') + ]; + } + $model = (new InvoiceIssuance()); $data = $model->where($where) ->field('project_id,invoice_head_id,amount,create_time,status')