Showing
1 changed file
with
10 additions
and
2 deletions
@@ -228,12 +228,13 @@ switch ($file) { | @@ -228,12 +228,13 @@ switch ($file) { | ||
228 | 228 | ||
229 | $employeePrefix = ''; | 229 | $employeePrefix = ''; |
230 | if ($a['Cod_Tip_formular']==3 || $a['Cod_Tip_formular']==5) { // Совместитель | 230 | if ($a['Cod_Tip_formular']==3 || $a['Cod_Tip_formular']==5) { // Совместитель |
231 | - $as = json_decode(file_get_contents('https://sd.mephi.ru/api/1/formulars.json?from_local_db=true&active_only=true&api_key='.SDAPI_KEY.'&filter_EmpGUID'.preg_replace('/[^0-9]+/', '', $a['EmpGUID'])), 1); | 231 | + $as = json_decode(file_get_contents('https://sd.mephi.ru/api/1/formulars.json?from_local_db=true&active_only=true&api_key='.SDAPI_KEY.'&filter_EmpGUID='.preg_replace('/[^0-9]+/', '', $a['EmpGUID'])), 1); |
232 | + //die('https://sd.mephi.ru/api/1/formulars.json?from_local_db=true&active_only=true&api_key='.SDAPI_KEY.'&filter_EmpGUID'.preg_replace('/[^0-9]+/', '', $a['EmpGUID'])); | ||
232 | $employeePrefix = '________________________________'; | 233 | $employeePrefix = '________________________________'; |
233 | foreach ($as as $_a) { | 234 | foreach ($as as $_a) { |
234 | if ($_a['Cod_Tip_formular'] == 2) { | 235 | if ($_a['Cod_Tip_formular'] == 2) { |
235 | $words0 = split(' ', chop($a['Name'])); | 236 | $words0 = split(' ', chop($a['Name'])); |
236 | - $words1 = split(' ', $inflect->getInflectName($a['Name_podr'], 0)); | 237 | + $words1 = split(' ', $inflect->getInflectNoun($a['Name_podr'], 0)); |
237 | if ($words0[count($words0)-1] == $words1[0]) { | 238 | if ($words0[count($words0)-1] == $words1[0]) { |
238 | unset($words0[count($words0)-1]); | 239 | unset($words0[count($words0)-1]); |
239 | } | 240 | } |
@@ -342,6 +343,8 @@ switch ($file) { | @@ -342,6 +343,8 @@ switch ($file) { | ||
342 | 'unit-head' => $unitHead, | 343 | 'unit-head' => $unitHead, |
343 | 'employee' => $a['SurName'].' '.mb_substr($a['FirstName'], 0, 1).'.'.mb_substr($a['MiddleName'], 0, 1).'.', | 344 | 'employee' => $a['SurName'].' '.mb_substr($a['FirstName'], 0, 1).'.'.mb_substr($a['MiddleName'], 0, 1).'.', |
344 | 'employee-full' => $employeePrefix.$a['SurName'].' '.$a['FirstName'].' '.$a['MiddleName'], | 345 | 'employee-full' => $employeePrefix.$a['SurName'].' '.$a['FirstName'].' '.$a['MiddleName'], |
346 | + //'employee-full' => /*$employeePrefix.' '.*/$a['SurName'].' '.$a['FirstName'].' '.$a['MiddleName'], | ||
347 | + //'appointment-full' => $employeePrefix, | ||
345 | 'employment-contract-date' => formatDate($a['ContDate']), | 348 | 'employment-contract-date' => formatDate($a['ContDate']), |
346 | 'employment-contract-code' => $a['ContNo'], | 349 | 'employment-contract-code' => $a['ContNo'], |
347 | 'ProfKvalGroup' => @$a['ProfKvalGroup'], | 350 | 'ProfKvalGroup' => @$a['ProfKvalGroup'], |
@@ -432,6 +435,11 @@ switch ($file) { | @@ -432,6 +435,11 @@ switch ($file) { | ||
432 | 435 | ||
433 | //print_r($_GET); print_r($user); print_r($datas);die(); | 436 | //print_r($_GET); print_r($user); print_r($datas);die(); |
434 | 437 | ||
438 | +/*foreach ($datas as $data) { | ||
439 | + print $data['appointment-full']."\t".$data['employee-full']."\n"; | ||
440 | +} | ||
441 | +die();*/ | ||
442 | + | ||
435 | if (empty($datas)) { | 443 | if (empty($datas)) { |
436 | die("Нет данных для обработки"); | 444 | die("Нет данных для обработки"); |
437 | } | 445 | } |
-
Please register or login to post a comment