刘桂岩 5 jaren geleden
bovenliggende
commit
a3765eaa4f

+ 10 - 6
application/manage/controller/Counts.php

@@ -22,6 +22,7 @@ class Counts extends Base {
     public function datas(){
         $admin = Session::get('session_manager');
         $institution_id = $admin['institution_id'];
+        $institution = explode(',',$institution_id);
         $request = Request::instance();
         $params = $request->param();
         $where = [];
@@ -77,25 +78,28 @@ class Counts extends Base {
         if (empty($pagesize) || $pagesize < 1) {
             $pagesize = 30;
         }
+        $institution_where['s.institution_id'] = ['in',$institution];
         $count = DB::table('studies')
             ->alias('s')
             ->distinct(true)
             ->join(['patient_infos'=>'p'],'p.id=s.patient_id')
-            ->join(['exams'=>'e'],'e.patient_id=p.id')
+            ->join(['exams'=>'e'],'e.study_id=s.id')
             ->join(['user_bind'=>'u'],'u.patient_id=s.patient_id','left')
-            ->where('s.institution_id='.$institution_id)
+            ->join(['institution'=>'ins'],'ins.id=e.institution_id','left')
+            ->where($institution_where)
             ->where($search)
             ->count();
         $list = DB::table('studies')
             ->alias('s')
             ->distinct(true)
             ->join(['patient_infos'=>'p'],'p.id=s.patient_id')
-            ->join(['exams'=>'e'],'e.patient_id=p.id')
+            ->join(['exams'=>'e'],'e.study_id=s.id')
             ->join(['user_bind'=>'u'],'u.patient_id=s.patient_id','left')
-            ->where('s.institution_id='.$institution_id)
+            ->join(['institution'=>'ins'],'ins.id=e.institution_id','left')
+            ->where($institution_where)
             ->where($search)
             ->page($page, $pagesize)
-            ->field('p.name,p.age,p.sex,s.studydate,s.createdAt,s.modality,u.exam_id')
+            ->field('p.name,p.age,p.sex,s.studydate,s.createdAt,s.modality,u.exam_id,ins.name as institution_name')
             ->order('s.createdAt desc')
             ->select();
         $data["total"] = $count;
@@ -112,7 +116,7 @@ class Counts extends Base {
         $where[] = ' e.film_type=2';
         foreach ($params as $k=>$v) {
             if(empty($v)){
-                continue ;
+                continue;
             }
             switch($k){
                 case 'upload_datetime1':

+ 1 - 0
application/manage/view/counts/index.html

@@ -105,6 +105,7 @@
                 toolbar: '#tb',pageList: [dgRowSize,dgRowSize*2,50,100],pagination:true,pageSize:dgRowSize,
                 columns:[[
                     {field:'name',title:'患者姓名',width:"120",align:'left'},
+                    {field:'institution_name',title:'医院名称',width:"120",align:'left'},
                     {field:'sex',title:'患者性别',width:100 , formatter:sfromFormatter  },
                     {field:'age',title:'患者年龄', hidden:true,width:115  },
                     {field:'modality',title:'检查类型',width:135  },

+ 2 - 1
composer.json

@@ -19,7 +19,8 @@
         "php": ">=5.4.0",
         "topthink/framework": "5.0.*",
         "topthink/think-captcha": "1.0.7",
-        "phpoffice/phpexcel": "^1.8"
+        "phpoffice/phpexcel": "^1.8",
+        "opqnext/reflection-api-doc": "v1.0"
     },
     "autoload": {
         "psr-4": {

+ 1 - 1
composer.lock

@@ -1,7 +1,7 @@
 {
     "_readme": [
         "This file locks the dependencies of your project to a known state",
-        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
     "content-hash": "423b1945150535b893066045c34cb122",

+ 1 - 1
vendor/composer/ClassLoader.php

@@ -279,7 +279,7 @@ class ClassLoader
      */
     public function setApcuPrefix($apcuPrefix)
     {
-        $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
     }
 
     /**

+ 1 - 1
vendor/composer/autoload_files.php

@@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
 $baseDir = dirname($vendorDir);
 
 return array(
-    '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
     'b5566c8ba03c4747a7633895924ebb6d' => $vendorDir . '/opqnext/reflection-api-doc/src/route.php',
+    '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
 );

+ 1 - 1
vendor/composer/autoload_static.php

@@ -7,8 +7,8 @@ namespace Composer\Autoload;
 class ComposerStaticInit62fe21db61292705f1120c7736cd42d8
 {
     public static $files = array (
-        '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
         'b5566c8ba03c4747a7633895924ebb6d' => __DIR__ . '/..' . '/opqnext/reflection-api-doc/src/route.php',
+        '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
     );
 
     public static $prefixLengthsPsr4 = array (