Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16817 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 16817 Rev 16971
Línea 15... Línea 15...
15
use LeadersLinked\Form\DiscoveryContact\ContactDownloadForm;
15
use LeadersLinked\Form\DiscoveryContact\ContactDownloadForm;
16
use LeadersLinked\Mapper\DiscoveryContactMapper;
16
use LeadersLinked\Mapper\DiscoveryContactMapper;
17
use Laminas\Mvc\I18n\Translator;
17
use Laminas\Mvc\I18n\Translator;
18
use LeadersLinked\Library\Functions;
18
use LeadersLinked\Library\Functions;
19
use Laminas\Http\Response;
19
use Laminas\Http\Response;
-
 
20
use LeadersLinked\Mapper\DiscoveryContactBlackListMapper;
Línea 20... Línea 21...
20
 
21
 
21
class DiscoveryContactReportController extends AbstractActionController
22
class DiscoveryContactReportController extends AbstractActionController
22
{
23
{
23
    /**
24
    /**
Línea 98... Línea 99...
98
                }
99
                }
99
            }
100
            }
Línea 100... Línea 101...
100
            
101
            
Línea -... Línea 102...
-
 
102
            if($isJson) {
-
 
103
                
-
 
104
                $discoveryContactBlackListMapper = DiscoveryContactBlackListMapper::getInstance($this->adapter);
-
 
105
                $contact_ids = $discoveryContactBlackListMapper->fetchAllContactIdsByCompanyId($currentCompany->id);
-
 
106
                
101
            if($isJson) {
107
                
102
                
108
                
103
                $first_name      = Functions::sanitizeFilterString($this->params()->fromQuery('first_name', ''));
109
                $first_name      = Functions::sanitizeFilterString($this->params()->fromQuery('first_name', ''));
104
                $last_name	     = Functions::sanitizeFilterString($this->params()->fromQuery('last_name', ''));
110
                $last_name	     = Functions::sanitizeFilterString($this->params()->fromQuery('last_name', ''));
105
                $corporate_email = Functions::sanitizeFilterString($this->params()->fromQuery('corporate_email', ''));
111
                $corporate_email = Functions::sanitizeFilterString($this->params()->fromQuery('corporate_email', ''));
Línea 116... Línea 122...
116
                $linkedin	     = Functions::sanitizeFilterString($this->params()->fromQuery('linkedin', ''));
122
                $linkedin	     = Functions::sanitizeFilterString($this->params()->fromQuery('linkedin', ''));
Línea 117... Línea 123...
117
                
123
                
118
                $queryMapper = QueryMapper::getInstance($this->adapter);
124
                $queryMapper = QueryMapper::getInstance($this->adapter);
Línea -... Línea 125...
-
 
125
                $select = $queryMapper->getSql()->select(DiscoveryContactMapper::_TABLE);
-
 
126
                
-
 
127
                if($contact_ids ) {
-
 
128
                    $select->where->notIn('id', $contact_ids );
119
                $select = $queryMapper->getSql()->select(DiscoveryContactMapper::_TABLE);
129
                }
120
                
130
                
121
                if($first_name) {
131
                if($first_name) {
122
                    $select->where->like('first_name', '%'.$first_name.'%');
132
                    $select->where->like('first_name', '%'.$first_name.'%');
123
                }
133
                }
Línea 214... Línea 224...
214
            $celular	     = Functions::sanitizeFilterString($this->params()->fromQuery('celular', ''));
224
            $celular	     = Functions::sanitizeFilterString($this->params()->fromQuery('celular', ''));
215
            $whatsapp        = Functions::sanitizeFilterString($this->params()->fromQuery('whatsapp', ''));
225
            $whatsapp        = Functions::sanitizeFilterString($this->params()->fromQuery('whatsapp', ''));
216
            $linkedin	     = Functions::sanitizeFilterString($this->params()->fromQuery('linkedin', ''));
226
            $linkedin	     = Functions::sanitizeFilterString($this->params()->fromQuery('linkedin', ''));
217
            $scholarship	 = Functions::sanitizeFilterString($this->params()->fromQuery('scholarship', ''));
227
            $scholarship	 = Functions::sanitizeFilterString($this->params()->fromQuery('scholarship', ''));
Línea -... Línea 228...
-
 
228
                
-
 
229
            $discoveryContactBlackListMapper = DiscoveryContactBlackListMapper::getInstance($this->adapter);
-
 
230
            $contact_ids = $discoveryContactBlackListMapper->fetchAllContactIdsByCompanyId($currentCompany->id);
-
 
231
            
-
 
232
            
218
                
233
            
219
            $queryMapper = QueryMapper::getInstance($this->adapter);
234
            $queryMapper = QueryMapper::getInstance($this->adapter);
220
            $select = $queryMapper->getSql()->select(DiscoveryContactMapper::_TABLE);
235
            $select = $queryMapper->getSql()->select(DiscoveryContactMapper::_TABLE);
221
            $select->columns([
236
            $select->columns([
222
                'first_name',
237
                'first_name',
Línea 235... Línea 250...
235
                'linkedin', 
250
                'linkedin', 
236
                'sector', 
251
                'sector', 
237
                'scholarship',
252
                'scholarship',
238
                'added_on'
253
                'added_on'
239
            ]);
254
            ]);
-
 
255
            
-
 
256
            if($contact_ids ) {
-
 
257
                $select->where->notIn('id', $contact_ids );
-
 
258
            }
Línea 240... Línea 259...
240
                
259
                
241
            if($first_name) {
260
            if($first_name) {
242
                $select->where->like('first_name', '%'.$first_name.'%');
261
                $select->where->like('first_name', '%'.$first_name.'%');
243
            }
262
            }