|
|
|
|
@ -18,8 +18,10 @@ class QuestionLogController extends Controller
|
|
|
|
|
public function Export()
|
|
|
|
|
{
|
|
|
|
|
$q_type = request('q_type');
|
|
|
|
|
$dateRange = request('dateRange');
|
|
|
|
|
if(!isset($dateRange) or count($dateRange)<>2) return \Yz::echoError1("请选择日期");
|
|
|
|
|
$q_list=DB::table('questions')->where(['q_type'=>2,'is_del'=>0,'status'=>1])->orderBy('order','asc')->get();
|
|
|
|
|
$log_list = DB::table('questions_log')->where(['q_type' => $q_type])->get();
|
|
|
|
|
$log_list = DB::table('questions_log')->whereBetween('created_at',$dateRange)->where(['q_type' => $q_type])->get();
|
|
|
|
|
if(count($log_list)==0) return \Yz::echoError1("暂无数据可导出");
|
|
|
|
|
|
|
|
|
|
$cols_SN = $this->generateSequence(400);
|
|
|
|
|
|