Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Marat Pavlov
/
AlexAdapter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
405898ef
authored
Mar 19, 2022
by
Alex Nasyr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
status "not found" added
parent
982c961b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
SocialMinistryDataExchange/Model/DB/Center/Контингент_center_Context.cs
SocialMinistryDataExchange/Model/SMResponce.cs
SocialMinistryDataExchange/Model/DB/Center/Контингент_center_Context.cs
View file @
405898ef
usin
g
Microsoft.EntityFrameworkCore
;
usin
g
Microsoft.EntityFrameworkCore
;
...
@@ -42,16 +42,15 @@ namespace SocialMinistryDataExchange.Model.DB.Center {
...
@@ -42,16 +42,15 @@ namespace SocialMinistryDataExchange.Model.DB.Center {
}
}
catch
(
Exception
ex
){
catch
(
Exception
ex
){
// TODO log exception
// TODO log exception
return
Task
.
FromResult
(
FormatResponce
(
new
List
<
SMResponceTemp
>()));
return
Task
.
FromResult
(
FormatResponce
(
new
List
<
SMResponceTemp
>()
{
new
SMResponceTemp
()
{
rowguid_eais
=
doc
.
rowguid_eais
,
СерияДокумента
=
doc
.
document_seria
,
НомерДокумента
=
doc
.
document_number
}
}
));
}
}
}
}
private
List
<
SMResponce
>
FormatResponce
(
List
<
SMResponceTemp
>
records
)
{
private
List
<
SMResponce
>
FormatResponce
(
List
<
SMResponceTemp
>
records
)
{
List
<
SMResponce
>
responce
=
new
();
List
<
SMResponce
>
responce
=
new
();
if
(
records
.
Count
>
0
)
{
foreach
(
SMResponceTemp
record
in
records
)
{
// записи найдены
var
SMRecord
=
new
SMResponce
();
foreach
(
SMResponceTemp
record
in
records
)
{
if
(
record
.
Личность
!=
Guid
.
Empty
)
{
// записи найдены ??? null ???
var
SMRecord
=
new
SMResponce
();
SMRecord
.
rowguid_eais
=
record
.
rowguid_eais
;
SMRecord
.
rowguid_eais
=
record
.
rowguid_eais
;
SMRecord
.
TerritoryName
=
record
.
Территория
Shortname
;
SMRecord
.
TerritoryName
=
record
.
Территория
Shortname
;
SMRecord
.
PersonFamilyName
=
record
.
Фамилия
;
SMRecord
.
PersonFamilyName
=
record
.
Фамилия
;
...
@@ -69,14 +68,23 @@ namespace SocialMinistryDataExchange.Model.DB.Center {
...
@@ -69,14 +68,23 @@ namespace SocialMinistryDataExchange.Model.DB.Center {
SMRecord
.
PersonSnils
=
record
.
Снилс
;
SMRecord
.
PersonSnils
=
record
.
Снилс
;
SMRecord
.
rowguid_contingent
=
record
.
Личность
.
ToString
();
SMRecord
.
rowguid_contingent
=
record
.
Личность
.
ToString
();
SMRecord
.
Status
=
record
.
ПриказОтчисления
==
null
?
record
.
ПриказЗачисления
==
null
?
"3"
:
"1"
:
"2"
;
SMRecord
.
StatusDate
=
SMRecord
.
Status
switch
{
responce
.
Add
(
SMRecord
);
"1"
=>
record
.
НачальнаяДата
,
"2"
=>
record
.
КонечнаяДата
,
_
=>
DateTime
.
Now
,
};
}
}
else
{
// записи не найдены
SMRecord
.
rowguid_eais
=
record
.
rowguid_eais
;
SMRecord
.
PersonDocumentSeria
=
record
.
СерияДокумента
;
SMRecord
.
PersonDocumentNumber
=
record
.
НомерДокумента
;
SMRecord
.
Status
=
"3"
;
}
responce
.
Add
(
SMRecord
);
}
}
else
{
// записи не найдены
}
return
responce
;
return
responce
;
}
}
...
...
SocialMinistryDataExchange/Model/SMResponce.cs
View file @
405898ef
...
@@ -17,7 +17,7 @@ namespace SocialMinistryDataExchange.Model {
...
@@ -17,7 +17,7 @@ namespace SocialMinistryDataExchange.Model {
public
string
PersonSnils
{
get
;
set
;
}
public
string
PersonSnils
{
get
;
set
;
}
public
string
rowguid_contingent
{
get
;
set
;
}
public
string
rowguid_contingent
{
get
;
set
;
}
public
string
Status
{
get
;
set
;
}
public
string
Status
{
get
;
set
;
}
public
DateTime
StatusDate
{
get
;
set
;
}
public
DateTime
?
StatusDate
{
get
;
set
;
}
public
string
FounderType
{
get
;
set
;
}
public
string
FounderType
{
get
;
set
;
}
public
string
OrganizationType
{
get
;
set
;
}
public
string
OrganizationType
{
get
;
set
;
}
public
string
EducationProgram
{
get
;
set
;
}
public
string
EducationProgram
{
get
;
set
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment