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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
performance/Performance.Services/EmployeeService.cs
+5
-6
performance/Performance.Services/Queues/IHubNotificationQueue.cs
+6
-6
No files found.
performance/Performance.Services/EmployeeService.cs
View file @
81a6b18e
...
@@ -1459,16 +1459,16 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
...
@@ -1459,16 +1459,16 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
var
data
=
saveGather
.
Data
;
var
data
=
saveGather
.
Data
;
var
departments
=
perdeptdicRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
allot
.
HospitalId
);
var
departments
=
perdeptdicRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
allot
.
HospitalId
);
if
(
departments
!=
null
&&
departments
.
Any
())
if
(
departments
==
null
||
!
departments
.
Any
())
throw
new
PerformanceException
(
"未配置科室字典"
);
{
var
notExistsDeptData
=
data
.
Where
(
w
=>
!
departments
.
Select
(
t
=>
t
.
Department
).
Contains
(
w
[
0
]));
var
notExistsDeptData
=
data
.
Where
(
w
=>
!
departments
.
Select
(
t
=>
t
.
Department
).
Contains
(
w
[
0
]));
if
(
notExistsDeptData
!=
null
&&
notExistsDeptData
.
Any
())
if
(
notExistsDeptData
!=
null
&&
notExistsDeptData
.
Any
())
throw
new
PerformanceException
(
$"科室字典中不存在科室[
{
string
.
Join
(
","
,
notExistsDeptData
.
Select
(
t
=>
t
[
0
]).
Distinct
())}
]"
);
throw
new
PerformanceException
(
$"科室字典中不存在科室[
{
string
.
Join
(
","
,
notExistsDeptData
.
Select
(
t
=>
t
[
0
]).
Distinct
())}
]"
);
}
var
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
var
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
if
(
employees
!=
null
&&
employees
.
Any
())
if
(
employees
==
null
||
!
employees
.
Any
())
throw
new
PerformanceException
(
"未配置人员字典"
);
{
var
notExistNameData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
DoctorName
).
Contains
(
w
[
1
])
&&
!
string
.
IsNullOrEmpty
(
w
[
1
]));
var
notExistNameData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
DoctorName
).
Contains
(
w
[
1
])
&&
!
string
.
IsNullOrEmpty
(
w
[
1
]));
if
(
notExistNameData
!=
null
&&
notExistNameData
.
Any
())
if
(
notExistNameData
!=
null
&&
notExistNameData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在医生姓名[
{
string
.
Join
(
","
,
notExistNameData
.
Select
(
t
=>
t
[
1
]).
Distinct
())}
]"
);
throw
new
PerformanceException
(
$"人员字典中不存在医生姓名[
{
string
.
Join
(
","
,
notExistNameData
.
Select
(
t
=>
t
[
1
]).
Distinct
())}
]"
);
...
@@ -1476,7 +1476,6 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
...
@@ -1476,7 +1476,6 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
var
notExistNumberData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
PersonnelNumber
).
Contains
(
w
[
2
])
&&
!
string
.
IsNullOrEmpty
(
w
[
2
]));
var
notExistNumberData
=
data
.
Where
(
w
=>
!
employees
.
Select
(
t
=>
t
.
PersonnelNumber
).
Contains
(
w
[
2
])
&&
!
string
.
IsNullOrEmpty
(
w
[
2
]));
if
(
notExistNumberData
!=
null
&&
notExistNumberData
.
Any
())
if
(
notExistNumberData
!=
null
&&
notExistNumberData
.
Any
())
throw
new
PerformanceException
(
$"人员字典中不存在工号[
{
string
.
Join
(
","
,
notExistNumberData
.
Select
(
t
=>
t
[
2
]).
Distinct
())}
]"
);
throw
new
PerformanceException
(
$"人员字典中不存在工号[
{
string
.
Join
(
","
,
notExistNumberData
.
Select
(
t
=>
t
[
2
]).
Distinct
())}
]"
);
}
var
sheets
=
perforPersheetRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allotId
);
var
sheets
=
perforPersheetRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allotId
);
if
(
sheets
!=
null
&&
sheets
.
Any
())
if
(
sheets
!=
null
&&
sheets
.
Any
())
...
...
performance/Performance.Services/Queues/IHubNotificationQueue.cs
View file @
81a6b18e
...
@@ -53,9 +53,9 @@ private void Consumer()
...
@@ -53,9 +53,9 @@ private void Consumer()
}
}
public
enum
NotificationLevel
public
enum
NotificationLevel
{
{
[
Description
(
"通知"
)]
INF
,
[
Description
(
"通知"
)]
INF
=
1
,
[
Description
(
"警告"
)]
WAR
,
[
Description
(
"警告"
)]
WAR
=
2
,
[
Description
(
"错误"
)]
ERR
,
[
Description
(
"错误"
)]
ERR
=
3
,
}
}
public
class
Notification
public
class
Notification
{
{
...
@@ -75,11 +75,11 @@ public abstract class PushContent
...
@@ -75,11 +75,11 @@ public abstract class PushContent
protected
PushContent
(
string
subject
,
NotificationLevel
level
)
protected
PushContent
(
string
subject
,
NotificationLevel
level
)
{
{
Subject
=
subject
;
Subject
=
subject
;
LogLevel
=
level
.
ToString
()
;
LogLevel
=
(
int
)
level
;
}
}
public
abstract
string
Type
{
get
;
}
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
Time
{
get
=>
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
}
public
string
Subject
{
get
;
set
;
}
public
string
Subject
{
get
;
set
;
}
}
}
...
@@ -120,7 +120,7 @@ public UrlContent(string subject, string url, NotificationLevel level = Notifica
...
@@ -120,7 +120,7 @@ public UrlContent(string subject, string url, NotificationLevel level = Notifica
}
}
public
class
CustomDownloadContent
:
Notification
.
PushContent
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
)
:
base
(
subject
,
level
)
{
{
Arguments
=
@object
;
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