Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
81a6b18e
Commit
81a6b18e
authored
Jan 04, 2022
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义提取推送日志修改返回内容
parent
41b5c47f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
performance/Performance.Services/EmployeeService.cs
+15
-16
performance/Performance.Services/Queues/IHubNotificationQueue.cs
+6
-6
No files found.
performance/Performance.Services/EmployeeService.cs
View file @
81a6b18e
...
...
@@ -1459,24 +1459,23 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
var
data
=
saveGather
.
Data
;
var
departments
=
perdeptdicRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
allot
.
HospitalId
);
if
(
departments
!=
null
&&
departments
.
Any
())
{
var
notExistsDeptData
=
data
.
Where
(
w
=>
!
departments
.
Select
(
t
=>
t
.
Department
).
Contains
(
w
[
0
]));
if
(
notExistsDeptData
!=
null
&&
notExistsDeptData
.
Any
())
throw
new
PerformanceException
(
$"科室字典中不存在科室[
{
string
.
Join
(
","
,
notExistsDeptData
.
Select
(
t
=>
t
[
0
]).
Distinct
())}
]"
);
}
if
(
departments
==
null
||
!
departments
.
Any
())
throw
new
PerformanceException
(
"未配置科室字典"
);
var
notExistsDeptData
=
data
.
Where
(
w
=>
!
departments
.
Select
(
t
=>
t
.
Department
).
Contains
(
w
[
0
]));
if
(
notExistsDeptData
!=
null
&&
notExistsDeptData
.
Any
())
throw
new
PerformanceException
(
$"科室字典中不存在科室[
{
string
.
Join
(
","
,
notExistsDeptData
.
Select
(
t
=>
t
[
0
]).
Distinct
())}
]"
);
var
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
if
(
employees
!=
null
&&
employees
.
Any
())
{
var
notExistNameData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
DoctorName
).
Contains
(
w
[
1
])
&&
!
string
.
IsNullOrEmpty
(
w
[
1
]));
if
(
notExistNameData
!=
null
&&
notExistNameData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在医生姓名[
{
string
.
Join
(
","
,
notExistNameData
.
Select
(
t
=>
t
[
1
]).
Distinct
())}
]"
);
if
(
employees
==
null
||
!
employees
.
Any
())
throw
new
PerformanceException
(
"未配置人员字典"
);
var
notExistNumberData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
PersonnelNumber
).
Contains
(
w
[
2
])
&&
!
string
.
IsNullOrEmpty
(
w
[
2
]));
if
(
notExistNumberData
!=
null
&&
notExistNumberData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在工号[
{
string
.
Join
(
","
,
notExistNumberData
.
Select
(
t
=>
t
[
2
]).
Distinct
())}
]"
);
}
var
notExistNameData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
DoctorName
).
Contains
(
w
[
1
])
&&
!
string
.
IsNullOrEmpty
(
w
[
1
]));
if
(
notExistNameData
!=
null
&&
notExistNameData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在医生姓名[
{
string
.
Join
(
","
,
notExistNameData
.
Select
(
t
=>
t
[
1
]).
Distinct
())}
]"
);
var
notExistNumberData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
PersonnelNumber
).
Contains
(
w
[
2
])
&&
!
string
.
IsNullOrEmpty
(
w
[
2
]));
if
(
notExistNumberData
!=
null
&&
notExistNumberData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在工号[
{
string
.
Join
(
","
,
notExistNumberData
.
Select
(
t
=>
t
[
2
]).
Distinct
())}
]"
);
var
sheets
=
perforPersheetRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allotId
);
if
(
sheets
!=
null
&&
sheets
.
Any
())
...
...
@@ -1548,7 +1547,7 @@ public void AddCategoryToConfig(int allotId)
var
specials
=
exspecialRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
allot
.
HospitalId
);
if
(
specials
==
null
||
!
specials
.
Any
())
return
;
var
list
=
(
specials
==
null
||
!
specials
.
Any
())
var
list
=
(
specials
==
null
||
!
specials
.
Any
())
?
speacialCategories
:
speacialCategories
.
Where
(
w
=>
!
specials
.
Select
(
t
=>
t
.
Target
+
t
.
Department
).
Contains
(
w
.
Category
+
w
.
Department
));
...
...
performance/Performance.Services/Queues/IHubNotificationQueue.cs
View file @
81a6b18e
...
...
@@ -53,9 +53,9 @@ private void Consumer()
}
public
enum
NotificationLevel
{
[
Description
(
"通知"
)]
INF
,
[
Description
(
"警告"
)]
WAR
,
[
Description
(
"错误"
)]
ERR
,
[
Description
(
"通知"
)]
INF
=
1
,
[
Description
(
"警告"
)]
WAR
=
2
,
[
Description
(
"错误"
)]
ERR
=
3
,
}
public
class
Notification
{
...
...
@@ -75,11 +75,11 @@ public abstract class PushContent
protected
PushContent
(
string
subject
,
NotificationLevel
level
)
{
Subject
=
subject
;
LogLevel
=
level
.
ToString
()
;
LogLevel
=
(
int
)
level
;
}
public
abstract
string
Type
{
get
;
}
public
string
LogLevel
{
get
;
}
public
int
LogLevel
{
get
;
}
public
string
Time
{
get
=>
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
public
string
Subject
{
get
;
set
;
}
}
...
...
@@ -120,7 +120,7 @@ public UrlContent(string subject, string url, NotificationLevel level = Notifica
}
public
class
CustomDownloadContent
:
Notification
.
PushContent
{
public
CustomDownloadContent
(
string
subject
,
object
@object
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
public
CustomDownloadContent
(
string
subject
,
object
@object
,
NotificationLevel
level
=
NotificationLevel
.
INF
)
:
base
(
subject
,
level
)
{
Arguments
=
@object
;
...
...
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