Merge branch 'feature/add_item' of wmtx/platform into master

聚合结算单导出个人与公司导出不相同
master
廖金灵 4 years ago committed by Gogs
commit e916641647

@ -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) {
@ -757,7 +780,7 @@ class AggregateFinanceStatementController extends ThinkController
$objPHPExcel = new \PHPExcel();
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
//设置模板文件
$objPHPExcel = $objReader->load("Public/Admin/excel/aggregate_stream.xls");
$objPHPExcel = $objReader->load("Public/Admin/excel/aggregate_person_stream.xls");
$statement_begin_time = date('Y.m.d', $data['begintime']);//对账开始时间
$statement_end_time = date('Y.m.d',$data['endtime']);//对账截止时间

Loading…
Cancel
Save