韩盟盟 1 ヶ月 前
コミット
1199994f80

+ 44 - 0
neo4jApi/app/controller/Cdss.php

@@ -245,6 +245,50 @@ class Cdss extends CommonTwoController
                 }
                 $aboutDiseases = $query->limit(200)->select()->toArray();
 
+                if(empty($aboutDiseases)){
+                    $query = zySickNess::where('1=1');
+                        $symptoms = explode(',', $values);
+
+                        // 使用AND连接多个症状条件
+                        foreach ($symptoms as $key => $symptom) {
+                            if($key == 0){
+                                $query->where('symptom', 'like', '%' . $symptom . '%');
+                            }else {
+                                $query = $query->whereOr('symptom', 'like', '%' . $symptom . '%');
+                            }
+                        }
+                    //添加舌象和脉象的匹配
+                    if (!empty($sx)) {
+                        $sx = explode(',', $sx);
+                        foreach ($sx as $ks => $s) {
+                            if(!empty($values)){
+                                $query = $query->whereOr('tongueCondition', 'like', '%' . $s . '%');
+                            }else {
+                                if($ks == 0){
+                                    $query = $query->where('tongueCondition', 'like', '%' . $s . '%');
+                                }else{
+                                    $query = $query->whereOr('tongueCondition', 'like', '%' . $s . '%');
+                                }
+                            }
+                        }
+                    }
+                    if (!empty($mx)) {
+                        $mx = explode(',', $mx);
+                        foreach ($mx as $km => $m) {
+                            if(!empty($values) || !empty($sx)){
+                                $query = $query->whereOr('pulseCondition', 'like', '%' . $m . '%');
+                            }else{
+                                if($km == 0){
+                                    $query = $query->where('pulseCondition', 'like', '%' . $m . '%');
+                                }else{
+                                    $query = $query->whereOr('pulseCondition', 'like', '%' . $m . '%');
+                                }
+                            }
+                        }
+                    }
+                    $aboutDiseases = $query->limit(200)->select()->toArray();
+                }
+
         }
 
 

+ 1 - 2
neo4jApi/app/controller/PatientAuxiliary.php

@@ -286,12 +286,11 @@ class PatientAuxiliary extends CommonTwoController
                             $data = array_merge($baseData, [
                                 'content' => json_encode($auxiliaryResult, JSON_UNESCAPED_UNICODE)
                             ]);
-                            $res = PatientAuxiliaryDiagnosis::updateOrInsert(
+                            PatientAuxiliaryDiagnosis::updateOrInsert(
                                 (string)$params['ZYH'],
                                 PatientAuxiliaryDiagnosis::TAG_AUXILIARY,
                                 $data
                             );
-                            var_dump($res);die;
                         }
                     }
                 } catch (\Exception $e) {