|
|
|
@ -181,14 +181,19 @@ class CompanyStatementSetController extends Controller {
|
|
|
|
|
}
|
|
|
|
|
if(count($js_id) ==0 || count($cpList) == 0){return ;}
|
|
|
|
|
|
|
|
|
|
$cp_id = implode(",",array_flip(array_flip(array_keys($cpList))));
|
|
|
|
|
$cp_id = implode(",",array_flip(array_flip(array_keys($cpList))));//已绑定关系
|
|
|
|
|
$js_id = implode(",",array_unique($js_id));
|
|
|
|
|
//获取cp公司
|
|
|
|
|
$tmpp = M("Partner","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,channel_rate,invoice_rate,taxation_rate,company_type,ali_user,ali_account,has_advance_charge,has_server_fee,server_fee")->where(["id"=>['in',$cp_id]])->select();
|
|
|
|
|
$cpmap = [
|
|
|
|
|
"id"=>['in',$cp_id],
|
|
|
|
|
"_string"=>"(validity_start_time > 0 AND validity_end_time = 0 ) OR validity_end_time >= {$endtime}"
|
|
|
|
|
];
|
|
|
|
|
$tmpp = M("Partner","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,channel_rate,invoice_rate,taxation_rate,company_type,ali_user,ali_account,has_advance_charge,has_server_fee,server_fee")->where($cpmap)->select();
|
|
|
|
|
$cp =[];
|
|
|
|
|
foreach ($tmpp as $v) {
|
|
|
|
|
$cp[$v['id']]=$v;
|
|
|
|
|
}
|
|
|
|
|
$cp_id = implode(",",array_column($tmpp,"id")); //结算的id
|
|
|
|
|
unset($tmpp);
|
|
|
|
|
//获取己方公司
|
|
|
|
|
$our = [];
|
|
|
|
|