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
9340e303
Commit
9340e303
authored
Sep 10, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG空值报错
parent
6061831b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
performance/Performance.Api/Filters/ActionsFilter.cs
+1
-3
performance/Performance.Services/SecondAllotService.cs
+10
-4
No files found.
performance/Performance.Api/Filters/ActionsFilter.cs
View file @
9340e303
...
...
@@ -63,10 +63,8 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
else
{
var
executedContext
=
await
next
();
if
(
executedContext
.
Exception
!=
null
)
throw
executedContext
.
Exception
;
if
(
executedContext
.
Result
is
ObjectResult
)
if
(
executedContext
.
Exception
==
null
&&
executedContext
.
Result
is
ObjectResult
)
{
_logger
.
LogInformation
(
"响应结果"
+
JsonHelper
.
Serialize
(
executedContext
.
Result
));
var
objectResult
=
(
ObjectResult
)
executedContext
.
Result
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
9340e303
...
...
@@ -376,13 +376,13 @@ private List<BodyItem> GetEmployees(int allotId, int userId, List<HeadItem> head
if
(
employees
==
null
||
!
employees
.
Any
())
return
list
;
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
.
Trim
()
==
empName
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?
.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
.
Trim
()
==
jobNumber
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
jobNumber
?
.
Trim
()).
ToList
();
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
.
Trim
()
==
t
.
DoctorName
.
Trim
()
&&
w
.
PersonnelNumber
.
Trim
()
==
t
.
PersonnelNumber
.
Trim
())
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?
.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
...
...
@@ -1360,6 +1360,11 @@ public List<ag_othersource> OtherList(int secondId, int userId)
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ag_othersource
>();
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
return
employees
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
...
...
@@ -1367,7 +1372,8 @@ public List<ag_othersource> OtherList(int secondId, int userId)
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
ReservedRatio
=
t
.
ReservedRatio
ReservedRatio
=
t
.
ReservedRatio
,
OtherPerformance
=
getAprAmount
(
t
)
}).
ToList
();
}
}
...
...
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