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
6947baf8
Commit
6947baf8
authored
May 26, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix/打印少人' into develop
parents
11c4b9c9
7382cf98
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
8 deletions
+36
-8
performance/Performance.Services/SecondAllotService.cs
+36
-8
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
6947baf8
...
...
@@ -2082,14 +2082,13 @@ public List<SecPrintResponse> Print(int secondId)
//var computes = agcomputeRepository.GetEntities(t => t.SecondId == secondId);
//if (computes == null || !computes.Any())
// return new List<SecPrintResponse>();
List
<
SecPrintResponse
>
result
=
new
List
<
SecPrintResponse
>();
if
(
second
.
UseTempId
.
HasValue
&&
second
.
UseTempId
==
6
)
{
var
data
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
var
result
=
Mapper
.
Map
<
List
<
SecPrintResponse
>>(
data
);
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
result
=
Mapper
.
Map
<
List
<
SecPrintResponse
>>(
data
);
}
else
if
(
second
.
UseTempId
.
HasValue
&&
(
new
int
[]
{
9
,
10
}).
Contains
(
second
.
UseTempId
.
Value
))
{
...
...
@@ -2099,7 +2098,7 @@ public List<SecPrintResponse> Print(int secondId)
var
bodyDynamic
=
agworkloadsourceRepository
.
GetEntities
(
t
=>
data
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
BodyId
));
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
var
result
=
data
.
Select
(
w
=>
new
SecPrintResponse
result
=
data
.
Select
(
w
=>
new
SecPrintResponse
{
JobNumber
=
w
.
WorkNumber
,
PersonName
=
w
.
Name
,
...
...
@@ -2113,8 +2112,6 @@ public List<SecPrintResponse> Print(int secondId)
OtherPerformance
=
w
.
OtherPerformance
,
NightWorkPerformance
=
w
.
NightWorkPerformance
,
}).
ToList
();
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
}
else
{
...
...
@@ -2124,7 +2121,7 @@ public List<SecPrintResponse> Print(int secondId)
if
(
fixaitems
==
null
||
!
fixaitems
.
Any
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
))
return
new
List
<
SecPrintResponse
>();
var
rownumbers
=
fixaitems
.
Where
(
t
=>
t
.
RowNumber
.
HasValue
&&
t
.
RowNumber
!=
-
1
).
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
var
result
=
new
List
<
SecPrintResponse
>();
foreach
(
var
rownumber
in
rownumbers
)
{
var
distperfor
=
ConvertHelper
.
To
<
decimal
?>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"可分配绩效"
)?.
ItemValue
);
...
...
@@ -2145,8 +2142,39 @@ public List<SecPrintResponse> Print(int secondId)
sec
.
NightWorkPerformance
=
nightworkperfor
;
result
.
Add
(
sec
);
}
return
result
.
OrderBy
(
t
=>
t
.
RowNumber
).
ToList
();
}
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
// 补充字典中该科室不存在,但有其它绩效的人员信息
if
(
perapramounts
!=
null
&&
perapramounts
.
Any
(
t
=>
t
.
AccountingUnit
==
second
.
Department
))
{
var
groupData
=
perapramounts
.
Where
(
t
=>
t
.
AccountingUnit
==
second
.
Department
).
GroupBy
(
t
=>
t
.
PersonnelNumber
)
.
Select
(
t
=>
new
SecPrintResponse
{
JobNumber
=
t
.
Key
,
PersonName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
OtherPerformance
=
t
.
Sum
(
w
=>
w
.
Amount
),
RealAmount
=
t
.
Sum
(
w
=>
w
.
Amount
),
});
foreach
(
var
item
in
groupData
)
{
if
(!
result
.
Any
(
w
=>
w
.
JobNumber
==
item
.
JobNumber
))
{
per_employee
employee
=
employees
?.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
JobNumber
);
if
(
employee
!=
null
&&
employee
.
UnitType
==
second
.
UnitType
)
{
item
.
Department
=
employee
.
AccountingUnit
;
item
.
WorkPost
=
employee
.
JobTitle
;
result
.
Add
(
item
);
}
}
}
}
return
result
.
OrderBy
(
t
=>
t
.
JobNumber
).
ThenBy
(
t
=>
t
.
PersonName
).
ToList
();
}
#
endregion
打印
...
...
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