|  | @@ -180,12 +180,25 @@ class EnterpriseApi {
 | 
	
		
			
				|  |  |                  $whr[] = ["companyId", "=", $companyId];
 | 
	
		
			
				|  |  |                  $whr[] = ["delete", "=", 0];
 | 
	
		
			
				|  |  |                  $list = \app\common\model\EnterpriseVerifyMgr::where($whr)->select()->toArray();
 | 
	
		
			
				|  |  | -                $talentType = [];
 | 
	
		
			
				|  |  | +                $talentType = []; //查找单位对应标签
 | 
	
		
			
				|  |  | +                $org = [];
 | 
	
		
			
				|  |  | +                $ins = [];
 | 
	
		
			
				|  |  |                  $uniCodes = [];
 | 
	
		
			
				|  |  |                  foreach ($list as $k => $v) {
 | 
	
		
			
				|  |  | -                    array_push($talentType, $v['enterpriseTag']);
 | 
	
		
			
				|  |  | -                    $codes = explode(",", $v["uniCode"]);
 | 
	
		
			
				|  |  | -                    $uniCodes = array_merge($uniCodes, (array) $codes);
 | 
	
		
			
				|  |  | +                    if(!empty($v['enterpriseTag'])){
 | 
	
		
			
				|  |  | +                        array_push($talentType, $v['enterpriseTag']);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    if(!empty($v['organizationTag'])){
 | 
	
		
			
				|  |  | +                        array_push($org, $v['organizationTag']);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    if(!empty($v['institutionTag'])){
 | 
	
		
			
				|  |  | +                        array_push($ins, $v['institutionTag']);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    if(!empty($v["uniCode"])){
 | 
	
		
			
				|  |  | +                        $codes = explode(",", $v["uniCode"]);
 | 
	
		
			
				|  |  | +                        $uniCodes = array_merge($uniCodes, (array) $codes);
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  $_whr[] = ["uniCode", "<>", ""];
 | 
	
	
		
			
				|  | @@ -197,22 +210,27 @@ class EnterpriseApi {
 | 
	
		
			
				|  |  |                      $codes = explode(",", $_v["uniCode"]);
 | 
	
		
			
				|  |  |                      $expUniCodes = array_merge($expUniCodes, (array) $codes);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if ($talentType && $uniCodes) {
 | 
	
		
			
				|  |  | +                if (($talentType || $org || $ins) && $uniCodes) {
 | 
	
		
			
				|  |  |                      if ($expUniCodes) {
 | 
	
		
			
				|  |  | -                        $whereRaw = sprintf('(newEnterpriseTag in ("%s") and newIdCard not in ("%s")) or newIdCard in ("%s")', implode('","', $talentType), implode('","', $expUniCodes), implode('","', $uniCodes));
 | 
	
		
			
				|  |  | +                        $whereRaw = sprintf('(newEnterpriseTag in ("%s") and newOrganizationTag in ("%s") and newInstitutionTag in ("%s") and newIdCard not in ("%s")) or newIdCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $expUniCodes), implode('","', $uniCodes));
 | 
	
		
			
				|  |  |                      } else {
 | 
	
		
			
				|  |  | -                        $whereRaw = sprintf('newEnterpriseTag in ("%s") or newIdCard in ("%s")', implode('","', $talentType), implode('","', $uniCodes));
 | 
	
		
			
				|  |  | +                        $whereRaw = sprintf('newEnterpriseTag in ("%s") and newOrganizationTag in ("%s") and newInstitutionTag in ("%s") or newIdCard in ("%s")', implode('","', $talentType), implode('","', $org), implode('","', $ins), implode('","', $uniCodes));
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if ($talentType && !$uniCodes) {
 | 
	
		
			
				|  |  | -                    $where[] = ["newEnterpriseTag", "in", $talentType];
 | 
	
		
			
				|  |  | +                if (($talentType || $org || $ins) && !$uniCodes) {
 | 
	
		
			
				|  |  | +                    if($talentType){
 | 
	
		
			
				|  |  | +                        $where[] = ["newEnterpriseTag", "in", $talentType];
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    if($org){
 | 
	
		
			
				|  |  | +                        $where[] = ["newOrganizationTag", "in", $org];
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  | +                    if($ins){
 | 
	
		
			
				|  |  | +                        $where[] = ["newInstitutionTag", "in", $ins];
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                      if ($expUniCodes) {
 | 
	
		
			
				|  |  |                          $where[] = ["newIdCard", "not in", $expUniCodes];
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | -                if (!$talentType && $uniCodes) {
 | 
	
		
			
				|  |  | -                    $where[] = ["newIdCard", "in", $uniCodes];
 | 
	
		
			
				|  |  | -                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 |