更新: 重构代码并优化财务统计逻辑中的统计功能
This commit is contained in:
parent
977987ebb2
commit
04993bdf33
@ -20,7 +20,8 @@
|
||||
use app\common\lists\ListsSearchInterface;
|
||||
use app\common\model\auth\Admin;
|
||||
use app\common\model\dept\Dept;
|
||||
use app\common\model\financial\FinancialInvoice;
|
||||
use app\common\model\dict\DictData;
|
||||
use app\common\model\financial\FinancialInvoice;
|
||||
use app\common\model\financial\FinancialRefund;
|
||||
use app\common\model\financial\FinancialSettlement;
|
||||
use app\common\model\marketing\MarketingContract;
|
||||
@ -62,11 +63,19 @@
|
||||
*/
|
||||
public function lists(): array
|
||||
{
|
||||
return MarketingContract::where($this->searchWhere)->where([
|
||||
$where=[
|
||||
['review_status','=', 1],
|
||||
['contract_type','=',0],
|
||||
['status','=',0]
|
||||
])
|
||||
];
|
||||
$types=$this->request->get('type_value');
|
||||
if($types){
|
||||
$data=DictData::where('type_value',$types)->column('value');
|
||||
if($data){
|
||||
$where[]=['business_nature','in',$data];
|
||||
}
|
||||
}
|
||||
return MarketingContract::where($this->searchWhere)->where($where)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
|
Loading…
x
Reference in New Issue
Block a user