Procházet zdrojové kódy

Merge branch 'dev' of http://code.pacsonline.cn/zskk_bg/yuanchengpasc into pro

lgy před 6 roky
rodič
revize
df2088f995

+ 46 - 152
.idea/workspace.xml

@@ -22,99 +22,19 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="Doctors.php" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/manage/controller/Doctors.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-6.387097">
-              <caret line="88" column="9" selection-start-line="88" selection-start-column="9" selection-end-line="88" selection-end-column="9" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Writereport.php" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/inter/controller/Writereport.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-7.193548">
-              <caret line="773" column="14" selection-start-line="773" selection-start-column="14" selection-end-line="773" selection-end-column="14" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Dcquery.php" pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/application/inter/controller/Dcquery.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="0.56173915">
-              <caret line="161" column="63" selection-start-line="161" selection-start-column="63" selection-end-line="161" selection-end-column="63" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Report.php" pinned="false" current-in-tab="false">
+      <file leaf-file-name="Report.php" pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/application/inter/controller/Report.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-7.806452">
-              <caret line="157" column="0" selection-start-line="157" selection-start-column="0" selection-end-line="157" selection-end-column="0" />
+            <state vertical-scroll-proportion="0.34434783">
+              <caret line="53" column="65" selection-start-line="53" selection-start-column="65" selection-end-line="53" selection-end-column="65" />
               <folding>
-                <marker date="1544511955350" expanded="true" signature="8590:8889" placeholder="SELECT a.id,... exams" />
-                <marker date="1544511955350" expanded="true" signature="8973:9101" placeholder="SELECT count... exams" />
+                <marker date="1544599982346" expanded="true" signature="8595:8894" placeholder="SELECT a.id,... exams" />
+                <marker date="1544599982346" expanded="true" signature="8978:9106" placeholder="SELECT count... exams" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-2.935484">
-              <caret line="29" column="29" selection-start-line="29" selection-start-column="29" selection-end-line="29" selection-end-column="29" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="Insdoctors.php" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/manage/controller/Insdoctors.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-3.5245903">
-              <caret line="101" column="2" selection-start-line="101" selection-start-column="2" selection-end-line="103" selection-end-column="44" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="database.php" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/database.php">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-6.677419">
-              <caret line="21" column="10" selection-start-line="21" selection-start-column="10" selection-end-line="21" selection-end-column="10" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="edit.html" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/manage/view/doctors/edit.html">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-13.4838705">
-              <caret line="136" column="17" selection-start-line="136" selection-start-column="17" selection-end-line="136" selection-end-column="17" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="edit.html" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/application/manage/view/insdoctors/edit.html">
-          <provider selected="true" editor-type-id="text-editor">
-            <state vertical-scroll-proportion="-8.935484">
-              <caret line="140" column="17" selection-start-line="140" selection-start-column="17" selection-end-line="148" selection-end-column="17" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="IdeDocumentHistory">
@@ -167,10 +87,10 @@
         <option value="$PROJECT_DIR$/application/manage/controller/Insdoctors.php" />
         <option value="$PROJECT_DIR$/application/manage/view/doctors/edit.html" />
         <option value="$PROJECT_DIR$/application/manage/controller/Doctors.php" />
-        <option value="$PROJECT_DIR$/application/inter/controller/Report.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Index.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Writereport.php" />
         <option value="$PROJECT_DIR$/application/inter/controller/Dcquery.php" />
+        <option value="$PROJECT_DIR$/application/inter/controller/Report.php" />
       </list>
     </option>
   </component>
@@ -279,33 +199,7 @@
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
             <PATH_ELEMENT>
-              <option name="myItemId" value="inter" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-          </PATH>
-          <PATH>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="yczd" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="yczd" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="yczd" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="application" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="inter" />
-              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-            </PATH_ELEMENT>
-            <PATH_ELEMENT>
-              <option name="myItemId" value="controller" />
+              <option name="myItemId" value="common" />
               <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
             </PATH_ELEMENT>
           </PATH>
@@ -694,14 +588,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/common/versionsql/Version3">
-      <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.0">
-          <caret line="0" column="53" selection-start-line="0" selection-start-column="53" selection-end-line="1" selection-end-column="66" />
-          <folding />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/application/manage/view/insdoctors/stats.html">
       <provider selected="true" editor-type-id="text-editor">
         <state vertical-scroll-proportion="-1.1478261">
@@ -726,81 +612,89 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/database.php">
+    <entry file="file://$PROJECT_DIR$/application/manage/view/insdoctors/edit.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-6.677419">
-          <caret line="21" column="10" selection-start-line="21" selection-start-column="10" selection-end-line="21" selection-end-column="10" />
+        <state vertical-scroll-proportion="-8.935484">
+          <caret line="140" column="17" selection-start-line="140" selection-start-column="17" selection-end-line="148" selection-end-column="17" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/manage/view/insdoctors/edit.html">
+    <entry file="file://$PROJECT_DIR$/application/manage/controller/Doctors.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-8.935484">
-          <caret line="140" column="17" selection-start-line="140" selection-start-column="17" selection-end-line="148" selection-end-column="17" />
+        <state vertical-scroll-proportion="-6.387097">
+          <caret line="88" column="9" selection-start-line="88" selection-start-column="9" selection-end-line="88" selection-end-column="9" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/manage/view/doctors/edit.html">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Dcquery.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-13.4838705">
-          <caret line="136" column="17" selection-start-line="136" selection-start-column="17" selection-end-line="136" selection-end-column="17" />
+        <state vertical-scroll-proportion="-5.451613">
+          <caret line="121" column="9" selection-start-line="121" selection-start-column="9" selection-end-line="121" selection-end-column="9" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/manage/controller/Insdoctors.php">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Writereport.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-3.5245903">
-          <caret line="101" column="2" selection-start-line="101" selection-start-column="2" selection-end-line="103" selection-end-column="44" />
+        <state vertical-scroll-proportion="-71.064514">
+          <caret line="773" column="14" selection-start-line="773" selection-start-column="14" selection-end-line="773" selection-end-column="14" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/manage/controller/Doctors.php">
+    <entry file="file://$PROJECT_DIR$/application/database.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-6.387097">
-          <caret line="88" column="9" selection-start-line="88" selection-start-column="9" selection-end-line="88" selection-end-column="9" />
+        <state vertical-scroll-proportion="0.36">
+          <caret line="21" column="10" selection-start-line="21" selection-start-column="10" selection-end-line="21" selection-end-column="10" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
+    <entry file="file://$PROJECT_DIR$/application/manage/view/doctors/edit.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-2.935484">
-          <caret line="29" column="29" selection-start-line="29" selection-start-column="29" selection-end-line="29" selection-end-column="29" />
+        <state vertical-scroll-proportion="-13.4838705">
+          <caret line="136" column="17" selection-start-line="136" selection-start-column="17" selection-end-line="136" selection-end-column="17" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Report.php">
+    <entry file="file://$PROJECT_DIR$/application/manage/controller/Insdoctors.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-7.806452">
-          <caret line="157" column="0" selection-start-line="157" selection-start-column="0" selection-end-line="157" selection-end-column="0" />
-          <folding>
-            <marker date="1544511955350" expanded="true" signature="8590:8889" placeholder="SELECT a.id,... exams" />
-            <marker date="1544511955350" expanded="true" signature="8973:9101" placeholder="SELECT count... exams" />
-          </folding>
+        <state vertical-scroll-proportion="0.39449543">
+          <caret line="101" column="2" selection-start-line="101" selection-start-column="2" selection-end-line="103" selection-end-column="44" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Writereport.php">
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Index.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="-7.193548">
-          <caret line="773" column="14" selection-start-line="773" selection-start-column="14" selection-end-line="773" selection-end-column="14" />
+        <state vertical-scroll-proportion="0.15826087">
+          <caret line="29" column="29" selection-start-line="29" selection-start-column="29" selection-end-line="29" selection-end-column="29" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/application/inter/controller/Dcquery.php">
+    <entry file="file://$PROJECT_DIR$/application/common/versionsql/Version3">
       <provider selected="true" editor-type-id="text-editor">
-        <state vertical-scroll-proportion="0.56173915">
-          <caret line="161" column="63" selection-start-line="161" selection-start-column="63" selection-end-line="161" selection-end-column="63" />
+        <state vertical-scroll-proportion="0.036303632">
+          <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="66" />
           <folding />
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/application/inter/controller/Report.php">
+      <provider selected="true" editor-type-id="text-editor">
+        <state vertical-scroll-proportion="0.34434783">
+          <caret line="53" column="65" selection-start-line="53" selection-start-column="65" selection-end-line="53" selection-end-column="65" />
+          <folding>
+            <marker date="1544599982346" expanded="true" signature="8595:8894" placeholder="SELECT a.id,... exams" />
+            <marker date="1544599982346" expanded="true" signature="8978:9106" placeholder="SELECT count... exams" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
   </component>
   <component name="masterDetails">
     <states>

+ 8 - 2
application/inter/controller/Report.php

@@ -56,9 +56,15 @@ class Report extends Base
             if(!$doctor){
                 return ResultTools::faile('1008', '您还未登录',$sessionid);
             }
-            $dclass = DB::table('doctor_class')->where('doctor_id',$doctor['id'])->cache(300)->field('doctor_class')->find();
+            $eclass = DB::table('doctors')->where('id',$doctor['id'])->field('exam_class')->find();
+            if($eclass['exam_class'] != '*'){
+                $class = explode(',',$eclass['exam_class']);
+                $e_class = implode('\',\'',$class);
+                $where = ' and  a.exam_class in (\''.$e_class.'\') ';
+            }else{
+                $where = '';
+            }
 //            $is_urgent = $_REQUEST['is_remote'];
-            $where = '';
 //            $table = '';
             $order = ' order by a.urgent desc,a.createdAt desc';
             /*if($is_urgent == 1){

+ 6 - 0
application/manage/controller/Doctors.php

@@ -73,6 +73,8 @@ class Doctors extends Base {
                         $doctors['doctor_role'] = explode(',', $doctors['doctor_role']);
                     }
                     $this->assign("doctors", $doctors);
+                    $exam_class = explode(',',$doctors['exam_class']);
+                    $this->assign('examcla',$exam_class);
                     // 查询医生的分类
                     $doctorsCla = Db::table("doctor_class")->where("doctor_id", $id)->find();
                     if (!empty($doctorsCla)) {
@@ -87,6 +89,8 @@ class Doctors extends Base {
         }
         $doctorClas = Db::table("constant")->where("parent_id", "doctor_class")->order("ordernum", "1")->select();
         $this->assign('doctorclas', $doctorClas);
+        $examCla = DB::table('constant')->where('parent_id','exam_class')->select();
+        $this->assign('examclass',$examCla);
         $institution = DB::table('institution')->select();
         $this->assign('institution', $institution);
 
@@ -110,6 +114,8 @@ class Doctors extends Base {
         unset($params["doctorcla"]);
         $params['doctor_role'] = implode(',', $params['doctor_role']);
         $password = $params['password'];
+        $params['exam_class'] = implode(',',$params['examcla']);
+        unset($params['examcla']);
         if (!empty($password) && strlen($password) < 30) {
             $params['password'] = md5($password);
         } else {

+ 7 - 0
application/manage/controller/Insdoctors.php

@@ -84,6 +84,8 @@ class Insdoctors extends Base {
                         $doctors['doctor_role'] = explode(',', $doctors['doctor_role']);
                     }
                     $this->assign("doctors", $doctors);
+                    $exam_class = explode(',',$doctors['exam_class']);
+                    $this->assign('examcla',$exam_class);
                     // 查询医生的分类
                     $doctorsCla = Db::table("doctor_class")->where("doctor_id", $id)->find();
                     if (!empty($doctorsCla)) {
@@ -93,10 +95,13 @@ class Insdoctors extends Base {
                             $this->assign("doctorcla", $dc_arr);
                         }
                     }
+                    // 医生的exam报告类权限
                 }
             }
         }
 //
+        $examCla = DB::table('constant')->where('parent_id','exam_class')->select();
+        $this->assign('examclass',$examCla);
         $doctorClas = Db::table("constant")->where("parent_id", "doctor_class")->order("ordernum", "1")->select();
         $this->assign('doctorclas', $doctorClas);
         $institution = DB::table('institution')->where("parent_institution", $insId)->whereOr("id", $insId)->select();
@@ -122,6 +127,8 @@ class Insdoctors extends Base {
         $info['doctor_role'] = implode(',', $_GET['doctor_role']);
         $info['password'] = md5($_GET['password']);
         $info["institution_id"] = $insId;
+        $info['exam_class'] = implode(',',$info['examcla']);
+        unset($info['examcla']);
         if (empty($_GET['id'])) {
             unset($_GET['id']);
             $id = UUIDs::uuid16();

+ 8 - 0
application/manage/view/doctors/edit.html

@@ -127,6 +127,14 @@
                     {/foreach}
                 </td>
             </tr>
+            <tr>
+                <th height="32" align="right">检查类权限:</th>
+                <td colspan="3" >
+                    {foreach $examclass as $key => $val}
+                    <input name="examcla[]" id="" type="checkbox" size="55" value="{$val.constant_key}" {if isset($examcla) && in_array($val.constant_key,$examcla) }checked{/if}  /><label for="sorts_{$val.constant_key}" >{$val.constant_value}</label>
+                    {/foreach}
+                </td>
+            </tr>
             <tr>
                 <th height="32">&nbsp;</th>
                 <td colspan="3" height="50" >

+ 8 - 0
application/manage/view/insdoctors/edit.html

@@ -139,6 +139,14 @@
                     {/foreach}
                 </td>
             </tr>
+            <tr>
+                <th height="32" align="right">检查类权限:</th>
+                <td colspan="3" >
+                    {foreach $examclass as $key => $val}
+                    <input name="examcla[]" id="" type="checkbox" size="55" value="{$val.constant_key}" {if isset($examcla) && in_array($val.constant_key,$examcla) }checked{/if}  /><label for="sorts_{$val.constant_key}" >{$val.constant_value}</label>
+                    {/foreach}
+                </td>
+            </tr>
             <tr>
                 <th height="32">&nbsp;</th>
                 <td>