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
3f018f22
authored
Mar 30, 2022
by
AlexNasyr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transit
parent
01d0e57c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
25 deletions
SocialMinistryDataExchange/Controllers/apiController.cs
SocialMinistryDataExchange/Model/Contingent/Center/Contingent_center_Context.cs
SocialMinistryDataExchange/Model/EscpSD/SM_EscpXSD.cs
SocialMinistryDataExchange/Model/IContingentContext.cs
SocialMinistryDataExchange/Model/SMData.cs
SocialMinistryDataExchange/Model/SMRepository.cs
SocialMinistryDataExchange/Startup.cs
SocialMinistryDataExchange/Controllers/apiController.cs
View file @
3f018f22
...
...
@@ -20,7 +20,7 @@ namespace SocialMinistryDataExchange.Controllers {
public
async
Task
<
string
>
PutXMLDefenceStatus
()
{
var
request
=
System
.
IO
.
File
.
ReadAllText
(
"Model/reference/Request.xml"
);
var
responce
=
await
_repository
.
PutDefenceStatus
(
request
);
return
String
.
Empty
;
return
responce
;
}
// тестовый запрос зачисленности личности
...
...
@@ -43,6 +43,8 @@ namespace SocialMinistryDataExchange.Controllers {
PersonName
=
"Василий"
,
PersonSurname
=
"Алибабаевич"
,
PersonBirthday
=
DateTime
.
Parse
(
"2015-01-01"
),
PersonSnils
=
"12345678"
,
Territory
=
"Пермский ГО (г. Пермь)"
,
},
PersonOccupation
=
new
SMPersonOccupationStatus
()
},
...
...
@@ -54,7 +56,7 @@ namespace SocialMinistryDataExchange.Controllers {
PersonDocumentNumber
=
"123456"
,
PersonDocumentDate
=
DateTime
.
Parse
(
"2010-01-01"
),
},
PersonFamilyName
=
"Мкртчя
н
"
,
PersonFamilyName
=
"Мкртчя"
,
PersonName
=
"Василий"
,
PersonSurname
=
"Алибабаевич"
,
PersonBirthday
=
DateTime
.
Parse
(
"2015-01-01"
),
...
...
SocialMinistryDataExchange/Model/Contingent/Center/Contingent_center_Context.cs
View file @
3f018f22
...
...
@@ -5,6 +5,8 @@
namespace
SocialMinistryDataExchange.Model.Contingent.Center
{
public
partial
class
Contingent_center_Context
:
DbContext
,
IContingentContext
{
public
Contingent_center_Context
()
{
}
...
...
SocialMinistryDataExchange/Model/EscpSD/SM_EscpXSD.cs
View file @
3f018f22
...
...
@@ -9,25 +9,77 @@ namespace SocialMinistryDataExchange.Model.EscpSD {
[
XmlType
(
AnonymousType
=
true
,
Namespace
=
"urn://ru.permkrai.ecsp/mv/ecsp-sending-status-maloimushch"
)]
[
XmlRoot
(
Namespace
=
"urn://ru.permkrai.ecsp/mv/ecsp-sending-status-maloimushch"
,
IsNullable
=
false
)]
public
partial
class
EcspSendingStatusMaloimushch
{
public
string
PrimaryKey
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
)]
public
DateTime
DateTime
{
get
;
set
;
}
public
string
OrganSZ
{
get
;
set
;
}
public
byte
ObshKolChlenovSem
{
get
;
set
;
}
public
string
LgotKat
{
get
;
set
;
}
public
decimal
SrednedushevoiDohod
{
get
;
set
;
}
public
decimal
ProzhitMinimum
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
)]
public
DateTime
SrokDeistviiaS
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
)]
public
DateTime
SrokDeistviiaDo
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"PrimaryKey"
)]
public
string
MsgID
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"DateTime"
)]
public
DateTime
MsgDataTime
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"Leechnost"
)]
public
Person
Person
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"Semya"
)]
public
Family
?
Family
{
get
;
set
;
}
public
PersonStatus
PersonSDStatus
{
get
;
set
;
}
=
new
();
[
XmlElement
(
ElementName
=
"OrganSZ"
)]
public
string
SDDepartment
{
get
{
return
PersonSDStatus
.
SDDepartment
;
}
set
{
PersonSDStatus
.
SDDepartment
=
value
;
}
}
[
XmlElement
(
ElementName
=
"ObshKolChlenovSem"
)]
public
byte
FamilyPersonsCount
{
get
{
return
PersonSDStatus
.
FamilyPersonsCount
;
}
set
{
PersonSDStatus
.
FamilyPersonsCount
=
value
;
}
}
[
XmlElement
(
ElementName
=
"LgotKat"
)]
public
string
Status
{
get
{
return
PersonSDStatus
.
Status
;
}
set
{
PersonSDStatus
.
Status
=
value
;
}
}
[
XmlElement
(
ElementName
=
"SrednedushevoiDohod"
)]
public
decimal
AvgIncome
{
get
{
return
PersonSDStatus
.
AvgIncome
;
}
set
{
PersonSDStatus
.
AvgIncome
=
value
;
}
}
[
XmlElement
(
ElementName
=
"ProzhitMinimum"
)]
public
decimal
MinIncome
{
get
{
return
PersonSDStatus
.
MinIncome
;
}
set
{
PersonSDStatus
.
MinIncome
=
value
;
}
}
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"SrokDeistviiaS"
)]
public
DateTime
StartDate
{
get
{
return
PersonSDStatus
.
StartDate
;
}
set
{
PersonSDStatus
.
StartDate
=
value
;
}
}
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"SrokDeistviiaDo"
)]
public
DateTime
EndDate
{
get
{
return
PersonSDStatus
.
EndDate
;
}
set
{
PersonSDStatus
.
EndDate
=
value
;
}
}
}
[
Serializable
()]
[
DesignerCategory
(
"code"
)]
[
XmlType
(
AnonymousType
=
true
,
Namespace
=
"urn://ru.permkrai.ecsp/mv/ecsp-sending-status-maloimushch"
)]
public
class
PersonStatus
{
[
XmlElement
(
ElementName
=
"OrganSZ"
)]
public
string
SDDepartment
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"LgotKat"
)]
public
string
Status
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"SrokDeistviiaS"
)]
public
DateTime
StartDate
{
get
;
set
;
}
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"SrokDeistviiaDo"
)]
public
DateTime
EndDate
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"SrednedushevoiDohod"
)]
public
decimal
AvgIncome
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"ProzhitMinimum"
)]
public
decimal
MinIncome
{
get
;
set
;
}
[
XmlElement
(
ElementName
=
"ObshKolChlenovSem"
)]
public
byte
FamilyPersonsCount
{
get
;
set
;
}
}
[
Serializable
()]
[
DesignerCategory
(
"code"
)]
[
XmlType
(
AnonymousType
=
true
,
Namespace
=
"urn://ru.permkrai.ecsp/mv/ecsp-sending-status-maloimushch"
)]
public
class
Family
{
[
XmlElement
(
ElementName
=
"LeechostvSemya"
)]
public
Person
[]?
Relatives
{
get
;
set
;
}
...
...
@@ -72,6 +124,4 @@ namespace SocialMinistryDataExchange.Model.EscpSD {
[
XmlElement
(
DataType
=
"date"
,
ElementName
=
"DataVydachi"
)]
public
DateTime
DateOfIssue
{
get
;
set
;
}
}
}
SocialMinistryDataExchange/Model/IContingentContext.cs
View file @
3f018f22
...
...
@@ -3,6 +3,7 @@ using SocialMinistryDataExchange.Model.Contingent.Center;
namespace
SocialMinistryDataExchange.Model
{
public
interface
IContingentContext
{
DbSet
<
СтатусыНуждаемости
>
СтатусыНуждаемости
s
{
get
;
set
;
}
DbSet
<
ТипНуждаемости
>
ТипНуждаемости
s
{
get
;
set
;
}
...
...
SocialMinistryDataExchange/Model/SMData.cs
View file @
3f018f22
...
...
@@ -4,12 +4,15 @@ namespace SocialMinistryDataExchange.Model {
[
Flags
]
enum
PersonSearchAttributes
:
byte
{
PersonFamilyName
=
1
,
PersonName
=
2
,
PersonBirthday
=
4
,
}
[
Flags
]
enum
PersonIdentitySearchAttributes
:
byte
{
PersonDocumentSeria
=
1
,
PersonDocumentNumber
=
2
,
PersonDocumentDate
=
4
,
PersonFamilyName
=
8
,
PersonName
=
16
,
PersonBirthday
=
32
,
}
public
class
SMResponceTemp
{
...
...
@@ -28,10 +31,10 @@ namespace SocialMinistryDataExchange.Model {
public
string
?
Фамилия
{
get
;
set
;
}
public
bool
?
БезОтчества
{
get
;
set
;
}
public
DateTime
?
ДатаРождения
{
get
;
set
;
}
public
Guid
?
ТерриторияФактическогоМестаЖительства
New
{
get
;
set
;
}
public
string
?
Снилс
{
get
;
set
;
}
public
Guid
?
ТерриторияРегистрацииПоМестуЖительства
New
{
get
;
set
;
}
public
string
?
Территория
Shortname
{
get
;
set
;
}
public
string
?
Снилс
{
get
;
set
;
}
public
Guid
?
ТипОрганизации
{
get
;
set
;
}
public
int
?
ТипОрганизацииКод
{
get
;
set
;
}
public
string
?
ТипОрганизацииНаименование
{
get
;
set
;
}
...
...
SocialMinistryDataExchange/Model/SMRepository.cs
View file @
3f018f22
This diff is collapsed.
Click to expand it.
SocialMinistryDataExchange/Startup.cs
View file @
3f018f22
...
...
@@ -29,7 +29,7 @@ namespace SocialMinistryDataExchange {
.
MinimumLevel
.
Debug
()
.
MinimumLevel
.
Override
(
"Default"
,
LogEventLevel
.
Information
)
.
Enrich
.
FromLogContext
()
.
WriteTo
.
File
(
$@"
{
Directory
.
GetCurrentDirectory
()}
\Logs\
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
}
.log"
.
WriteTo
.
File
(
$@"
{
Directory
.
GetCurrentDirectory
()}
\Logs\
{
DateTime
.
Now
:
yyyy
-
MM
-
dd
}
.log"
,
outputTemplate
:
"[{Timestamp:HH:mm:ss.fff}] |{Level:u3}| {Message:lj}{NewLine}{Exception}"
)
.
CreateLogger
();
services
.
AddSingleton
(
Log
.
Logger
);
...
...
@@ -45,7 +45,8 @@ namespace SocialMinistryDataExchange {
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
,
ILoggerFactory
loggerFactory
)
{
//public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) {
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
)
{
if
(
env
.
IsDevelopment
())
{
app
.
UseDeveloperExceptionPage
();
app
.
UseSwagger
();
...
...
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