From dce3d3a14108f415dfb44a59b86d55d026e5cb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=BE=E6=A0=91?= Date: Tue, 22 Dec 2020 15:24:25 +0800 Subject: [PATCH] 0 --- app/chengji/model/Chengji.php | 10 ++++------ app/kaohao/model/SearchMore.php | 2 +- app/login/controller/Index.php | 10 ++++------ app/login/view/index/index.html | 4 ++-- app/studentSearchChengji/controller/Index.php | 7 ++----- app/studentSearchChengji/view/index/index.html | 4 ++-- app/teacherSearchChengji/controller/Index.php | 12 ++---------- app/teacherSearchChengji/view/index/index.html | 4 ++-- app/teacherSearchChengji/view/index/welcome.html | 2 +- database/migrations/20190430034853_chengji.php | 10 +--------- 10 files changed, 21 insertions(+), 44 deletions(-) diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index ad9da94b..4d836d4b 100755 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -46,7 +46,6 @@ class Chengji extends BaseModel ,'subject_id' => '' ,'searchval' => '' ,'user_id' => '' - ,'user_group' =>'' ); $src = array_cover($srcfrom, $src) ; $src['kaoshi_id'] = strToarray($src['kaoshi_id']); @@ -78,9 +77,8 @@ class Chengji extends BaseModel ->when(count($src['kaoshi_id']) == 0 && count($src['banji_id']) ==0, function($query) { $query->whereMonth('update_time'); }) - ->when(strlen($src['user_id']) > 0 && strlen($src['user_group']) > 0, function ($query) use($src){ - $query->where('user_id', $src['user_id']) - ->where('user_group', $src['user_group']); + ->when(strlen($src['user_id']) > 0, function ($query) use($src){ + $query->where('user_id', $src['user_id']); }) ->when(count($src['subject_id']) > 0, function ($query) use ($src) { $query->where('subject_id', 'in', $src['subject_id']); @@ -172,8 +170,8 @@ class Chengji extends BaseModel ,'subject_lieming' => $value->subjectName->lieming ,'defen' => $value->defen ,'defenlv' => $value->defenlv - ,'bweizhi' => $value->bweizhi - ,'xweizhi' => $value->xweizhi + ,'bpaixu' => $value->bpaixu + ,'njpaixu' => $value->njpaixu ]; $value->cjKaohao->cjStudent ? $data[$key]['student_name']=$value->cjKaohao->cjStudent->xingming : $data[$key]['student_name']= ''; } diff --git a/app/kaohao/model/SearchMore.php b/app/kaohao/model/SearchMore.php index 41c5effc..905c92cf 100755 --- a/app/kaohao/model/SearchMore.php +++ b/app/kaohao/model/SearchMore.php @@ -44,7 +44,7 @@ class SearchMore extends BaseModel }) ->with([ 'ksChengji' => function($query){ - $query->field('id, kaohao_id, subject_id, defen, bweizhi, xweizhi, qweizhi') + $query->field('id, kaohao_id, subject_id, defen, bpaixu, njpaixu') ->with([ 'subjectName' => function ($q) { $q->field('id, title, jiancheng, lieming'); diff --git a/app/login/controller/Index.php b/app/login/controller/Index.php index 9897ad55..5074fed7 100755 --- a/app/login/controller/Index.php +++ b/app/login/controller/Index.php @@ -17,14 +17,12 @@ class Index // 清除session(当前作用域) session(null); - // 获取系统名称和版本号 - $list['webtitle'] = config('shangma.webtitle'); - $list['version'] = config('shangma.version'); - // 获取信息 $sysbasemod = new \app\system\model\SystemBase; # 关键字 - $sys = $sysbasemod::sysInfo(); # 描述 - $list['webtitle'] = $sys->sys_title; + $list = $sysbasemod::sysInfo(); # 描述 + // 获取系统名称和版本号 + $list['version'] = config('shangma.version'); + View::assign('list',$list); diff --git a/app/login/view/index/index.html b/app/login/view/index/index.html index f9a74760..df1aa33f 100755 --- a/app/login/view/index/index.html +++ b/app/login/view/index/index.html @@ -2,7 +2,7 @@ - {$list['webtitle']} {$list['version']} + {$list['sys_title']} {$list['version']} @@ -32,7 +32,7 @@
-
{$list['webtitle']} {$list['version']}
+
{$list['sys_title']} {$list['version']}
diff --git a/app/studentSearchChengji/controller/Index.php b/app/studentSearchChengji/controller/Index.php index 072a82f6..4f0688b9 100755 --- a/app/studentSearchChengji/controller/Index.php +++ b/app/studentSearchChengji/controller/Index.php @@ -22,12 +22,9 @@ class Index extends StudentSearchBase // 获取信息 $sysbasemod = new \app\system\model\SystemBase; # 关键字 // 查询系统设置 - $list = $sysbasemod - ->order(['id'=>'desc']) - ->field('thinks, danwei') - ->find(); + $list = $sysbasemod::sysInfo(); # 描述 + $list['version'] = config('shangma.version'); # 版本号 // 设置要给模板赋值的信息 - $list['webtitle'] = config('shangma.webtitle'); # 系统名称 $stu = new \app\student\model\Student; $stuInfo = $stu->where('id', session('user_id')) diff --git a/app/studentSearchChengji/view/index/index.html b/app/studentSearchChengji/view/index/index.html index 5bd41d2e..0f7ae317 100755 --- a/app/studentSearchChengji/view/index/index.html +++ b/app/studentSearchChengji/view/index/index.html @@ -2,7 +2,7 @@ - {$list.webtitle} + {$list.sys_title}{$list.version} @@ -44,7 +44,7 @@
  • {$list.banjiTitle}  {$list.xingming} diff --git a/app/teacherSearchChengji/controller/Index.php b/app/teacherSearchChengji/controller/Index.php index 3f08006a..83a1e4f5 100755 --- a/app/teacherSearchChengji/controller/Index.php +++ b/app/teacherSearchChengji/controller/Index.php @@ -22,7 +22,6 @@ class Index extends TeacherSearchBase // 获取信息 $sysbasemod = new sysbasemod(); # 关键字 $list = $sysbasemod::sysInfo(); # 描述 - $list['webtitle'] = config('shangma.webtitle'); # 系统名称 $list['version'] = config('shangma.version'); # 版本号 $tch = new TCH; # 获取用户姓名 @@ -110,17 +109,11 @@ class Index extends TeacherSearchBase //实例化数据模型 $sysbasemod = new sysbasemod(); - // 查询系统设置 - $list = $sysbasemod - ->order(['id'=>'desc']) - ->field('thinks, danwei') - ->find(); + $list = $sysbasemod::sysInfo(); # 描述 + $list['version'] = config('shangma.version'); # 版本号 // 查询用户登信息 $list['username'] = session('username'); - $list['webtitle'] = config('shangma.webtitle'); - - $list['xingming'] = TCH::where('phone', $list['username'])->value('xingming'); $list['version'] = config('shangma.version'); @@ -133,7 +126,6 @@ class Index extends TeacherSearchBase $list['kaoshi'] = 1; $list['teacher'] = 1; $list['student'] = 1; - // 模版赋值 $this->view->assign('list',$list); // 渲染输出 diff --git a/app/teacherSearchChengji/view/index/index.html b/app/teacherSearchChengji/view/index/index.html index afe5b0de..ede6ecdb 100755 --- a/app/teacherSearchChengji/view/index/index.html +++ b/app/teacherSearchChengji/view/index/index.html @@ -2,7 +2,7 @@ - {$list['webtitle']} {$list['version']} + {$list['sys_title']} {$list['version']} @@ -39,7 +39,7 @@
    diff --git a/app/teacherSearchChengji/view/index/welcome.html b/app/teacherSearchChengji/view/index/welcome.html index 7f89f8fd..a00be2b4 100755 --- a/app/teacherSearchChengji/view/index/welcome.html +++ b/app/teacherSearchChengji/view/index/welcome.html @@ -33,7 +33,7 @@
    欢迎  - {$list['xingming']} 老师,您正在使用的是『{$list.webtitle}{$list.version}』    当前时间: + {$list['xingming']} 老师,您正在使用的是『{$list['sys_title']}{$list.version}』    当前时间:
    diff --git a/database/migrations/20190430034853_chengji.php b/database/migrations/20190430034853_chengji.php index 7c5814a2..368ed004 100755 --- a/database/migrations/20190430034853_chengji.php +++ b/database/migrations/20190430034853_chengji.php @@ -35,19 +35,11 @@ class Chengji extends Migrator $table ->addColumn('kaohao_id','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'考试']) ->addColumn('subject_id','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'学科']) - ->addColumn('user_group','string',['limit'=>11, 'null'=>true,'comment'=>'用户组']) ->addColumn('user_id','integer',['limit'=>11,'default'=>0,'null'=>false,'comment'=>'用户']) ->addColumn('defen','decimal',['precision'=>5,'scale'=>1,'default'=>Null,'null'=>false,'comment'=>'得分']) ->addColumn('defenlv','decimal',['precision'=>6,'scale'=>2,'default'=>Null,'null'=>false,'comment'=>'得分率']) - ->addColumn('bpaixu','integer',['limit'=>4,'null'=>true,'comment'=>'班级排序']) - ->addColumn('bweizhi','decimal',['precision'=>6,'scale'=>2,'null'=>true,'comment'=>'班级位置']) - ->addColumn('xpaixu','integer',['limit'=>4,'null'=>true,'comment'=>'学校排序']) - ->addColumn('xweizhi','decimal',['precision'=>6,'scale'=>2,'null'=>true,'comment'=>'学校位置']) - // 区排序和位置 - ->addColumn('qpaixu','integer',['limit'=>4,'null'=>true,'comment'=>'区排序']) - ->addColumn('qweizhi','decimal',['precision'=>6,'scale'=>2,'null'=>true,'comment'=>'区位置']) - + ->addColumn('njpaixu','integer',['limit'=>4,'null'=>true,'comment'=>'年级排序']) ->addColumn('create_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'创建时间']) ->addColumn('update_time','integer',['limit'=>11,'default'=>'1539158918','null'=>false,'comment'=>'更新时间']) ->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])