@ -644,7 +644,30 @@ class AggregateFinanceStatementController extends ThinkController
$data['pay_company'] = $data['first_party_info'];
}
$this->doAddOperationLog($id,"导出");
$this->excelDownStreamTemplate($data,$big_pay_money);
$relation = M("company_relation","tab_")->where("(first_company_id={$data['channel_id']} and first_company_type=3) or (second_company_id = {$data['channel_id']} and second_company_type=3)")->find();
$company_type = 0;
$company_info = [];
if ($relation['first_company_type'] == 3) {
$company_info = json_decode($relation['first_company_info'],true);
} elseif($relation['second_company_type'] == 3) {
$company_info = json_decode($relation['second_company_info'],true);
}
if ($company_info['company_type']=='个人') {
$company_type = 1;
} elseif($company_info['company_type']=='公司') {
$company_type = 2;
}
if ($company_type == 1) {
$this->excelDownStreamPersonTemplate($data,$big_pay_money);
} else {
$this->excelDownStreamTemplate($data,$big_pay_money);
}
}
public function excelDownStreamTemplate($data,$big_all_sum_money) {