diff --git a/app/adminapi/controller/works/finance/ExpenseController.php b/app/adminapi/controller/works/finance/ExpenseController.php index d23e3eb4c..38c1922a4 100644 --- a/app/adminapi/controller/works/finance/ExpenseController.php +++ b/app/adminapi/controller/works/finance/ExpenseController.php @@ -236,13 +236,13 @@ $where[] = ['create_time','between',[strtotime($params['start_time']),strtotime($params['end_time'])]]; } if(!empty($params['status'])){ - $where[] = match ((int)$params['status']){ - 1=> ['check_status','=',0], //待审核 - 2=> ['check_status','=',1], //审核中 - 3=> [['check_status','=',2],['pay_admin_id','=',0],['pay_time','=',0]], //审批通过,待打款 - 4=> ['check_status','=',3], //审核不通过 - 5=> ['check_status','=',4], //撤销审核 - 6=> [['check_status','=',2],['pay_admin_id','>',0],['pay_time','>',0]], //审批通过,已打款 + $where[] = match ($params['status']){ + '1'=> ['check_status','=',0], //待审核 + '2'=> ['check_status','=',1], //审核中 + '3'=> [['check_status','=',2],['pay_admin_id','=',0],['pay_time','=',0]], //审批通过,待打款 + '4'=> ['check_status','=',3], //审核不通过 + '5'=> ['check_status','=',4], //撤销审核 + '6'=> [['check_status','=',2],['pay_admin_id','>',0],['pay_time','>',0]], //审批通过,已打款 }; }else{ $where[] = ['check_status','in','0,1,2,3,4']; @@ -693,9 +693,9 @@ $where[] = ['create_time','between',[strtotime($params['start_time']),strtotime($params['end_time'])]]; } if(!empty($params['status'])){ - $where[] = match ((int)$params['status']){ - 1=> [['check_status','=',2],['pay_admin_id','=',0],['pay_time','=',0]], //审批通过,待打款 - 2=> [['check_status','=',2],['pay_admin_id','>',0],['pay_time','>',0]], //审批通过,已打款 + $where[] = match ($params['status']){ + '1'=> [['check_status','=',2],['pay_admin_id','=',0],['pay_time','=',0]], //审批通过,待打款 + '2'=> [['check_status','=',2],['pay_admin_id','>',0],['pay_time','>',0]], //审批通过,已打款 }; }else{ $where[] = ['check_status','=',2]; diff --git a/app/adminapi/controller/works/finance/InvoiceController.php b/app/adminapi/controller/works/finance/InvoiceController.php index d412a1adf..827872008 100644 --- a/app/adminapi/controller/works/finance/InvoiceController.php +++ b/app/adminapi/controller/works/finance/InvoiceController.php @@ -169,14 +169,14 @@ $where[] = ['create_time','between',[strtotime($params['start_time']),strtotime($params['end_time'])]]; } if(!empty($params['status'])){ - $where[] = match ((int)$params['status']){ - 1=> ['check_status','=',0], //待审核 - 2=> ['check_status','=',1], //审核中 - 3=> [['check_status','=',2]], //审批通过,待开具 - 4=> ['check_status','=',3], //审核不通过 - 5=> ['check_status','=',4], //撤销审核 - 6=> [['check_status','=',5]], //审批通过,已开具 - 7=> [['check_status','=',10]], //已作废 + $where[] = match ($params['status']){ + '1'=> ['check_status','=',0], //待审核 + '2'=> ['check_status','=',1], //审核中 + '3'=> [['check_status','=',2]], //审批通过,待开具 + '4'=> ['check_status','=',3], //审核不通过 + '5'=> ['check_status','=',4], //撤销审核 + '6'=> [['check_status','=',5]], //审批通过,已开具 + '7'=> [['check_status','=',10]], //已作废 }; }else{ $where[] = ['check_status','in','0,1,2,3,4,5,10']; @@ -680,10 +680,10 @@ $where[] = ['create_time','between',[strtotime($params['start_time']),strtotime($params['end_time'])]]; } if(!empty($params['status'])){ - $where[] = match ((int)$params['status']){ - 1=> ['check_status','=',2], //审批通过,待开具 - 2=> ['check_status','=',5], //审批通过,已开具 - 3=> [['check_status','=',10]], //已作废 + $where[] = match ($params['status']){ + '1'=> ['check_status','=',2], //审批通过,待开具 + '2'=> ['check_status','=',5], //审批通过,已开具 + '3'=> [['check_status','=',10]], //已作废 }; }else{ $where[] = ['check_status','in','2,5,10'];