From c03ff842a6cb37e32fce180dce9686db7119e585 Mon Sep 17 00:00:00 2001 From: win10 Date: Thu, 21 May 2020 14:37:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/keti/controller/KetiInfo.php | 4 +- app/keti/model/KetiInfo.php | 96 +++++++++++++------------- app/rongyu/controller/JsRongyuInfo.php | 4 +- app/rongyu/model/JsRongyuInfo.php | 92 ++++++++++++------------ 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/app/keti/controller/KetiInfo.php b/app/keti/controller/KetiInfo.php index bd8ee9fb..f40ff5bf 100644 --- a/app/keti/controller/KetiInfo.php +++ b/app/keti/controller/KetiInfo.php @@ -429,10 +429,10 @@ class KetiInfo extends BaseController // 下载课题信息表 - public function outXlsx($ketice) + public function outXlsx($ketice_id) { $ketiinfo = new ktinfo(); - $list = $ketiinfo->srcKeti($ketice); + $list = $ketiinfo->srcKeti($ketice_id); if($list->isEmpty()) { diff --git a/app/keti/model/KetiInfo.php b/app/keti/model/KetiInfo.php index be69160f..1dc59f2a 100644 --- a/app/keti/model/KetiInfo.php +++ b/app/keti/model/KetiInfo.php @@ -147,55 +147,55 @@ class KetiInfo extends BaseModel } - // //搜索课题册 - // public function srcKeti($ketice_id) - // { - // $data = $this - // ->where('ketice_id', $ketice_id) - // ->with( - // [ - // 'fzSchool' => function($query){ - // $query->field('id, jiancheng'); - // }, - // 'KtCe' => function($query){ - // $query->field('id, title, lxdanwei_id, category_id, lxshijian') - // ->with([ - // 'ktCategory' => function($q){ - // $q->field('id, title'); - // }, - // 'ktLxdanwei' => function($q){ - // $q->field('id, jiancheng_id, title'); - // } - // ]); - // }, - // 'ktCategory'=>function($query){ - // $query->field('id, title'); - // }, - // 'ktSubject'=>function($query){ - // $query->field('id, title'); - // }, - // 'ktZcr'=>function($query){ - // $query->field('ketiinfo_id, teacher_id') - // ->with([ - // 'teacher'=>function($q){ - // $q->field('id, xingming'); - // } - // ]); - // }, - // 'ktCy'=>function($query){ - // $query->field('ketiinfo_id, teacher_id') - // ->with([ - // 'teacher'=>function($q){ - // $q->field('id, xingming'); - // } - // ]); - // } - // ] - // ) - // ->select(); + //搜索课题册 + public function srcKeti($ketice_id) + { + $data = $this + ->where('ketice_id', $ketice_id) + ->with( + [ + 'fzSchool' => function($query){ + $query->field('id, jiancheng'); + }, + 'KtCe' => function($query){ + $query->field('id, title, lxdanwei_id, category_id, lxshijian') + ->with([ + 'ktCategory' => function($q){ + $q->field('id, title'); + }, + 'ktLxdanwei' => function($q){ + $q->field('id, jiancheng, title'); + } + ]); + }, + 'ktCategory'=>function($query){ + $query->field('id, title'); + }, + 'ktSubject'=>function($query){ + $query->field('id, title'); + }, + 'ktZcr'=>function($query){ + $query->field('ketiinfo_id, teacher_id') + ->with([ + 'teacher'=>function($q){ + $q->field('id, xingming'); + } + ]); + }, + 'ktCy'=>function($query){ + $query->field('ketiinfo_id, teacher_id') + ->with([ + 'teacher'=>function($q){ + $q->field('id, xingming'); + } + ]); + } + ] + ) + ->select(); - // return $data; - // } + return $data; + } // 课题主持人关联 diff --git a/app/rongyu/controller/JsRongyuInfo.php b/app/rongyu/controller/JsRongyuInfo.php index b4ab7a96..93ce85e1 100644 --- a/app/rongyu/controller/JsRongyuInfo.php +++ b/app/rongyu/controller/JsRongyuInfo.php @@ -419,10 +419,10 @@ class JsRongyuInfo extends BaseController // 下载荣誉信息 - public function outXlsx($rongyuce) + public function outXlsx($rongyuce_id) { $ryinfo = new ryinfo(); - $list = $ryinfo->srcTuceRy($rongyuce); + $list = $ryinfo->srcTuceRy($rongyuce_id); if($list->isEmpty()) { diff --git a/app/rongyu/model/JsRongyuInfo.php b/app/rongyu/model/JsRongyuInfo.php index b1c0fc5e..c60a5054 100644 --- a/app/rongyu/model/JsRongyuInfo.php +++ b/app/rongyu/model/JsRongyuInfo.php @@ -110,53 +110,53 @@ class JsRongyuInfo extends BaseModel } - // // 获取需要下载的荣誉信息 - // public function srcTuceRy($id) - // { - // // 查询数据 - // $data =$this->where('rongyuce', $id) - // ->field('id, rongyuce_id, title, bianhao, hjschool_id, subject_id, jiangxiang_id, hjshijian, pic') - // ->with([ - // 'hjJsry' => function($query){ - // $query->field('rongyu_id, teacher_id') - // ->with([ - // 'teacher' => function($query){ - // $query->field('id, xingming'); - // } - // ]); - // }, - // 'cyJsry' => function($query){ - // $query->field('rongyu_id, teacher_id') - // ->with([ - // 'teacher' => function($query){ - // $query->field('id, xingming'); - // }] - // ); - // }, - // 'ryTuce' => function($query){ - // $query->field('id, title, fzshijian, fzschool_id') - // ->with([ - // 'fzSchool' => function($q){ - // $q->field('id, title'); - // } - // ]); - // }, - // 'rySubject' => function($query){ - // $query->field('id,title'); - // }, - // 'hjSchool' => function($query){ - // $query->field('id, jiancheng'); - // }, - // 'jxCategory' => function($query){ - // $query->field('id, title'); - // } - // ]) - // ->order(['hjschool']) - // ->append(['hjJsName', 'cyJsName']) - // ->select(); + // 获取需要下载的荣誉信息 + public function srcTuceRy($id) + { + // 查询数据 + $data =$this->where('rongyuce_id', $id) + ->field('id, rongyuce_id, title, bianhao, hjschool_id, subject_id, jiangxiang_id, hjshijian, pic') + ->with([ + 'hjJsry' => function($query){ + $query->field('rongyu_id, teacher_id') + ->with([ + 'teacher' => function($query){ + $query->field('id, xingming'); + } + ]); + }, + 'cyJsry' => function($query){ + $query->field('rongyu_id, teacher_id') + ->with([ + 'teacher' => function($query){ + $query->field('id, xingming'); + }] + ); + }, + 'ryTuce' => function($query){ + $query->field('id, title, fzshijian, fzschool_id') + ->with([ + 'fzSchool' => function($q){ + $q->field('id, title'); + } + ]); + }, + 'rySubject' => function($query){ + $query->field('id,title'); + }, + 'hjSchool' => function($query){ + $query->field('id, jiancheng'); + }, + 'jxCategory' => function($query){ + $query->field('id, title'); + } + ]) + ->order(['hjschool_id']) + ->append(['hjJsName', 'cyJsName']) + ->select(); - // return $data; - // } + return $data; + } //搜索教师荣誉