Commit 105cea97 by 朱继来

temp

parent 5b9a1cd1
......@@ -675,36 +675,36 @@ Class OrderController extends Controller
$return_url = '/self_order';
}
$info['map']['p'] = 1;
$potrol = $_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http';
$params = [
"type" => 2, // 类型 1:模板调用 2: api回调 (必填)
"source_items_id" => $source_items_id, //设置来源明细id:http://data.ichunt.net/database/1199(必填)
"file_name" => $file_name,//导出后文件名称(必填)
"excel_suf" => "csv", //导出文件格式 csv,xls(必填)
"header" => $headerCell, //导出文件头部 (必填,不得用 ID 做头部,数据顺序必须一致)
"query_param" => $info['map'], //p 第几页,limit每页多少条 占位符,照抄不需要改 (必填)
"callbackurl" => $potrol."://".$_SERVER['HTTP_HOST']."/hprose/service", //hrpose 数据提供网址(提供导出脚本分页回调获取数据,必填)
"callbackfuc" => "orderExport", //hrpose 回调函数(必填)
"create_uid" => $request->user->userId, #创建人id(必填)
];
// $info['map']['p'] = 1;
// $potrol = $_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http';
// $params = [
// "type" => 2, // 类型 1:模板调用 2: api回调 (必填)
// "source_items_id" => $source_items_id, //设置来源明细id:http://data.ichunt.net/database/1199(必填)
// "file_name" => $file_name,//导出后文件名称(必填)
// "excel_suf" => "csv", //导出文件格式 csv,xls(必填)
// "header" => $headerCell, //导出文件头部 (必填,不得用 ID 做头部,数据顺序必须一致)
// "query_param" => $info['map'], //p 第几页,limit每页多少条 占位符,照抄不需要改 (必填)
// "callbackurl" => $potrol."://".$_SERVER['HTTP_HOST']."/hprose/service", //hrpose 数据提供网址(提供导出脚本分页回调获取数据,必填)
// "callbackfuc" => "orderExport", //hrpose 回调函数(必填)
// "create_uid" => $request->user->userId, #创建人id(必填)
// ];
// 调用导出系统
$url = Config('website.export_url');
$client = new \Hprose\Http\Client($url."/insertExport", false);
$res = $client->insertExport(json_encode($params));
// print_r($res);
$res = json_decode($res, true);
// // 调用导出系统
// $url = Config('website.export_url');
// $client = new \Hprose\Http\Client($url."/insertExport", false);
// $res = $client->insertExport(json_encode($params));
// // print_r($res);
// $res = json_decode($res, true);
if ($res['err_code'] == 0) return ['err_code'=>0, 'err_msg'=>'推入到导出系统成功', 'data'=>$res['data']];
// if ($res['err_code'] == 0) return ['err_code'=>0, 'err_msg'=>'推入到导出系统成功', 'data'=>$res['data']];
return ['err_code'=>1, 'err_msg'=>'推入到导出系统失败'];
// return ['err_code'=>1, 'err_msg'=>'推入到导出系统失败'];
// $orderModel = new OrderModel();
$orderModel = new OrderModel();
// return $orderModel->orderExport($info['map']);
return $orderModel->orderExport($info['map']);
}
// 下载合同
......
......@@ -237,7 +237,7 @@ class OrderModel extends Model
})
->where('it.status', 1)
->where('o.order_goods_type', '=', $map['order_goods_type'])
->select('o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'o.advance_pay_time', 'o.pay_time', 'it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'it.goods_class', 'it.self_supplier_type', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'oe.erp_sn', 'oe.order_type as extend_order_type', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate', 'oe.sample_demand_desc')
->select('o.order_id', 'o.order_sn', 'o.order_type', 'o.order_pay_type', 'o.order_goods_type', 'o.order_source', 'o.create_time', 'o.status', 'o.order_amount', 'o.sale_type', 'o.currency', 'o.sale_id', 'o.cancel_reason', 'o.advance_pay_time', 'o.pay_time', 'it.goods_id', 'it.goods_name', 'it.goods_number', 'it.goods_price', 'it.single_pre_price', 'it.brand_name', 'it.supplier_name', 'it.goods_class', 'it.self_supplier_type', 'it.extra_price', 'it.goods_discount_amount', 'i.tax_title', 'i.inv_type', 'i.invoice_status', 'i.tax_title', 'i.company_address', 'i.company_phone', 'i.tax_no', 'i.bank_name', 'i.bank_account', 'u.user_id', 'u.mobile', 'u.email', 'u.client_source', 'u.is_new', 'u.is_test', 'oe.erp_sn', 'oe.order_type as extend_order_type', 'oe.send_remark', 'oe.is_new as is_new_order', 'oe.business_type', 'oe.jd_order_id', 'oe.exchange_rate', 'oe.sample_demand_desc')
->groupBy('it.rec_id')
->orderBy('o.create_time', 'DESC')
// ->get()
......@@ -337,7 +337,7 @@ class OrderModel extends Model
// 获取所有价格
$OrderPriceModel = new OrderPriceModel();
$order_price = $OrderPriceModel->whereIn('order_id', $all_order_id)->select('order_id', 'price_type', 'price')->get()->keyBy('order_id')->toArray();
dd($order_price);
// 获取用户公司名称
$UserCompanyModel = new UserCompanyModel();
$company_info = $UserCompanyModel->whereIn('user_id', $all_user_id)->lists('com_name', 'user_id')->toArray();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment