Browse Source

20250415大屏数据 优化为选择区队

贾小兵 1 tháng trước cách đây
mục cha
commit
20f33f047f
1 tập tin đã thay đổi với 14 bổ sung8 xóa
  1. 14 8
      application/admin/controller/Screen.php

+ 14 - 8
application/admin/controller/Screen.php

@@ -37,18 +37,24 @@ class Screen extends Backend
         $this->whereExtend['exam_collection_type'] = 3;
         $ids = $this->request->get('ids', '');
         if(!empty($ids)){
-            $this->whereExtend['exam_collection_id'] = ['in', $ids];
+//            $this->whereExtend['exam_collection_id'] = ['in', $ids];
+            $this->whereExtend['user_depart_id'] = ['in', $ids];
         }
 
         $departmentdata = [];
-        $collectionlist = Db::name('real_exam')->where('exam_collection_type',3)
-            ->whereTime('starttime','year')
-            ->group('exam_collection_id')
-            ->field('exam_collection_id,exam_collection_name')
-            ->order('exam_collection_id desc')->select();
-        foreach ($collectionlist as $k => $v) {
-            $departmentdata[$v['exam_collection_id']] = $v['exam_collection_name'];
+//        $collectionlist = Db::name('real_exam')->where('exam_collection_type',3)
+//            ->whereTime('starttime','year')
+//            ->group('exam_collection_id')
+//            ->field('exam_collection_id,exam_collection_name')
+//            ->order('exam_collection_id desc')->select();
+//        foreach ($collectionlist as $k => $v) {
+//            $departmentdata[$v['exam_collection_id']] = $v['exam_collection_name'];
+//        }
+        $departlist =  $this->departmodel->where('level',5)->select();
+        foreach ($departlist as $k => $v) {
+            $departmentdata[$v['id']] = $v['name'];
         }
+        unset($v);
         $this->view->assign('departmentdata', $departmentdata);
         $this->view->assign('ids', $ids);
     }