Toggle navigation
Toggle navigation
This project
Loading...
Sign in
UT
/
ut-tex
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
xaionaro
2017-12-27 15:47:59 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
55573a1cfa56a1c8c610501a38bb7b9acb4a5bb4
55573a1c
1 parent
0618c84a
Generated a report for NNR
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
genpdf/genpdf2.php
genpdf/genpdf2.php
View file @
55573a1
...
...
@@ -228,12 +228,13 @@ switch ($file) {
$employeePrefix
=
''
;
if
(
$a
[
'Cod_Tip_formular'
]
==
3
||
$a
[
'Cod_Tip_formular'
]
==
5
)
{
// Совместитель
$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
);
$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
);
//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']));
$employeePrefix
=
'________________________________'
;
foreach
(
$as
as
$_a
)
{
if
(
$_a
[
'Cod_Tip_formular'
]
==
2
)
{
$words0
=
split
(
' '
,
chop
(
$a
[
'Name'
]));
$words1
=
split
(
' '
,
$inflect
->
getInflectN
ame
(
$a
[
'Name_podr'
],
0
));
$words1
=
split
(
' '
,
$inflect
->
getInflectN
oun
(
$a
[
'Name_podr'
],
0
));
if
(
$words0
[
count
(
$words0
)
-
1
]
==
$words1
[
0
])
{
unset
(
$words0
[
count
(
$words0
)
-
1
]);
}
...
...
@@ -342,6 +343,8 @@ switch ($file) {
'unit-head'
=>
$unitHead
,
'employee'
=>
$a
[
'SurName'
]
.
' '
.
mb_substr
(
$a
[
'FirstName'
],
0
,
1
)
.
'.'
.
mb_substr
(
$a
[
'MiddleName'
],
0
,
1
)
.
'.'
,
'employee-full'
=>
$employeePrefix
.
$a
[
'SurName'
]
.
' '
.
$a
[
'FirstName'
]
.
' '
.
$a
[
'MiddleName'
],
//'employee-full' => /*$employeePrefix.' '.*/$a['SurName'].' '.$a['FirstName'].' '.$a['MiddleName'],
//'appointment-full' => $employeePrefix,
'employment-contract-date'
=>
formatDate
(
$a
[
'ContDate'
]),
'employment-contract-code'
=>
$a
[
'ContNo'
],
'ProfKvalGroup'
=>
@
$a
[
'ProfKvalGroup'
],
...
...
@@ -432,6 +435,11 @@ switch ($file) {
//print_r($_GET); print_r($user); print_r($datas);die();
/*foreach ($datas as $data) {
print $data['appointment-full']."\t".$data['employee-full']."\n";
}
die();*/
if
(
empty
(
$datas
))
{
die
(
"Нет данных для обработки"
);
}
...
...
Please
register
or
login
to post a comment