diff --git a/app/chengji/model/TongjiBj.php b/app/chengji/model/TongjiBj.php index 7145a860..c0407ba9 100755 --- a/app/chengji/model/TongjiBj.php +++ b/app/chengji/model/TongjiBj.php @@ -649,7 +649,7 @@ class TongjiBj extends BaseModel // 教师关联 public function bjTeacher() { - return $this->belongsTo('\app\teacher\model\Teacher', 'teacher_id', 'id'); + return $this->belongsTo('\app\admin\model\Admin', 'teacher_id', 'id'); } diff --git a/app/student/model/Student.php b/app/student/model/Student.php index a94782ab..4d9daa09 100755 --- a/app/student/model/Student.php +++ b/app/student/model/Student.php @@ -23,7 +23,6 @@ class Student extends BaseModel if(strlen($shengri) == 0 ){ return ''; }; - $tearch = new \app\teacher\model\Teacher; $age = \app\facade\Tools::fBirth($shengri, 1); return $age; } diff --git a/app/system/controller/School.php b/app/system/controller/School.php index f0ac8253..4475301e 100755 --- a/app/system/controller/School.php +++ b/app/system/controller/School.php @@ -55,7 +55,7 @@ class School extends AdminBase ,'paixu' ,'status' ,'kaoshi' - ,'dw_teacher_count' + ,'dw_admin_count' ,'dwXingzhi'=>['title'] ,'dwXueduan'=>['title'] ,'dwJibie'=>['title'] diff --git a/app/system/model/School.php b/app/system/model/School.php index 036c92d2..66448e21 100755 --- a/app/system/model/School.php +++ b/app/system/model/School.php @@ -8,9 +8,9 @@ class School extends BaseModel { // 教师数据模型关联 - public function dwTeacher() + public function dwAdmin() { - return $this->hasMany('\app\teacher\model\Teacher', 'danwei_id', 'id'); + return $this->hasMany('\app\admin\model\Admin', 'school_id', 'id'); } // 单位性质数据模型关联 @@ -86,7 +86,7 @@ class School extends BaseModel ) ->withCount( [ - 'dwTeacher' => function($query){ + 'dwAdmin' => function($query){ $query->where('status', 1); } ] diff --git a/app/system/view/school/index.html b/app/system/view/school/index.html index 55452834..aca9a2c4 100755 --- a/app/system/view/school/index.html +++ b/app/system/view/school/index.html @@ -103,7 +103,7 @@ return str; }}, {field: 'paixu', title: '排序', sort: true}, - {field: 'dw_teacher_count', minWidth:100, title: '教师数', sort: true}, + {field: 'dw_admin_count', minWidth:100, title: '教师数', sort: true}, {field: 'kaoshi', title: '组织考试',templet:'#kaoshi', sort: true, minWidth:100}, {field: 'status', title: '状态',templet:'#status', sort: true, minWidth:100}, {field: 'id', title: '操作',toolbar: '#barDemo',minWidth:140} diff --git a/app/teacher/controller/Index.php b/app/teacher1/controller/Index.php old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/controller/Index.php rename to app/teacher1/controller/Index.php diff --git a/app/teacher/model/Teacher.php b/app/teacher1/model/Teacher.php old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/model/Teacher.php rename to app/teacher1/model/Teacher.php diff --git a/app/teacher/route/teacher.php b/app/teacher1/route/teacher.php old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/route/teacher.php rename to app/teacher1/route/teacher.php diff --git a/app/teacher/validate/Teacher.php b/app/teacher1/validate/Teacher.php old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/validate/Teacher.php rename to app/teacher1/validate/Teacher.php diff --git a/app/teacher/view/index/create.html b/app/teacher1/view/index/create.html old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/view/index/create.html rename to app/teacher1/view/index/create.html diff --git a/app/teacher/view/index/create_all.html b/app/teacher1/view/index/create_all.html old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/view/index/create_all.html rename to app/teacher1/view/index/create_all.html diff --git a/app/teacher/view/index/del_list.html b/app/teacher1/view/index/del_list.html old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/view/index/del_list.html rename to app/teacher1/view/index/del_list.html diff --git a/app/teacher/view/index/index.html b/app/teacher1/view/index/index.html old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/view/index/index.html rename to app/teacher1/view/index/index.html diff --git a/app/teacher/view/index/read.html b/app/teacher1/view/index/read.html old mode 100755 new mode 100644 similarity index 100% rename from app/teacher/view/index/read.html rename to app/teacher1/view/index/read.html