Browse Source

Merge branch 'master' of http://59.57.98.130:3000/jjhc/report

sugangqiang 2 years ago
parent
commit
75314e80d8
1 changed files with 7 additions and 12 deletions
  1. 7 12
      app/common/api/EnterpriseApi.php

+ 7 - 12
app/common/api/EnterpriseApi.php

@@ -63,25 +63,20 @@ class EnterpriseApi {
 
 
                 if (($talentType || $org || $ins) && $uniCodes) {
                 if (($talentType || $org || $ins) && $uniCodes) {
                     if ($expUniCodes) {
                     if ($expUniCodes) {
-                        $whereRaw = sprintf('(enterpriseTag in ("%s") and organizationTag in ("%s") and institutionTag in ("%s") and idCard not in ("%s")) or idCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $expUniCodes), implode('","', $uniCodes));
+                        $whereRaw = sprintf('(enterpriseTag in ("%s") or organizationTag in ("%s") or institutionTag in ("%s") and idCard not in ("%s")) or idCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $expUniCodes), implode('","', $uniCodes));
                     } else {
                     } else {
-                        $whereRaw = sprintf('enterpriseTag in ("%s") and organizationTag in ("%s") and institutionTag in ("%s") or idCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $uniCodes));
+                        $whereRaw = sprintf('enterpriseTag in ("%s") or organizationTag in ("%s") or institutionTag in ("%s") or idCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $uniCodes));
                     }
                     }
                 }
                 }
+
                 if (($talentType || $org || $ins) && !$uniCodes) {
                 if (($talentType || $org || $ins) && !$uniCodes) {
-                    if($talentType){
-                        $where[] = ["enterpriseTag", "in", $talentType];
-                    }
-                    if($org){
-                        $where[] = ["organizationTag", "in", $org];
-                    }
-                    if($ins){
-                        $where[] = ["institutionTag", "in", $ins];
-                    }
                     if ($expUniCodes) {
                     if ($expUniCodes) {
-                        $where[] = ["idCard", "not in", $expUniCodes];
+                        $whereRaw = sprintf('enterpriseTag in ("%s") or organizationTag in ("%s") or institutionTag in ("%s") and idCard not in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $expUniCodes));
+                    } else {
+                        $whereRaw = sprintf('enterpriseTag in ("%s") or organizationTag in ("%s") or institutionTag in ("%s") ', implode('","', $talentType), implode('","', $org), implode('","', $ins));
                     }
                     }
                 }
                 }
+
                 if (!$talentType && !$org && !$ins && $uniCodes) {
                 if (!$talentType && !$org && !$ins && $uniCodes) {
                     $where[] = ["idCard", "in", $uniCodes];
                     $where[] = ["idCard", "in", $uniCodes];
                 }
                 }