|
|
|
@ -421,6 +421,13 @@ class api extends CI_Controller{
|
|
|
|
|
//参数
|
|
|
|
|
$from_date = $this->input->post("from_date");
|
|
|
|
|
$to_date = $this->input->post("to_date");
|
|
|
|
|
$examine = $this->input->post("examine");
|
|
|
|
|
|
|
|
|
|
$reback=array();//返回的数据
|
|
|
|
|
$reback["from_date"] = $from_date;
|
|
|
|
|
$reback["to_date"] = $to_date;
|
|
|
|
|
$reback["examine"] = $examine;
|
|
|
|
|
|
|
|
|
|
if(!empty($from_date) && !empty($to_date)){
|
|
|
|
|
//拼接发送的报文
|
|
|
|
|
$PostData = new stdClass();
|
|
|
|
@ -472,12 +479,19 @@ class api extends CI_Controller{
|
|
|
|
|
|
|
|
|
|
//print_r($arr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(empty($examine)){
|
|
|
|
|
//写入excel模板
|
|
|
|
|
header("Content-type:application/vnd.ms-excel;charset=utf-8");
|
|
|
|
|
header("Content-Disposition:attachment;filename=juhe_train.xls");
|
|
|
|
|
$string_r= $this->load->view("lanhai_transaction_excel",array("arr"=>$arr),TRUE);
|
|
|
|
|
echo $string_r;die;
|
|
|
|
|
header("Content-type:application/vnd.ms-excel;charset=utf-8");
|
|
|
|
|
header("Content-Disposition:attachment;filename=lanhai_train.xls");
|
|
|
|
|
$string_r= $this->load->view("lanhai_transaction_excel",array("arr"=>$arr),TRUE);
|
|
|
|
|
echo $string_r;die;
|
|
|
|
|
}else{
|
|
|
|
|
krsort($arr);//数组倒序
|
|
|
|
|
$reback["data"]=$arr;
|
|
|
|
|
$this->load->view('header');
|
|
|
|
|
$this->load->view('export_lanhai',$reback);
|
|
|
|
|
$this->load->view('footer');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|