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
f94808f2
Commit
f94808f2
authored
Jun 04, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发放表其他绩效合并
parent
50c9fd62
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
18 deletions
+32
-18
performance/Performance.Services/ComputeService.cs
+32
-18
No files found.
performance/Performance.Services/ComputeService.cs
View file @
f94808f2
...
...
@@ -32,9 +32,11 @@ public class ComputeService : IAutoInjection
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforPerapramountRepository
perapramountRepository
;
private
readonly
PerforPeremployeeRepository
perforPeremployeeRepository
;
private
readonly
PerforPerapramounthideRepository
_hideRepository
;
private
readonly
PerforCofworkitemRepository
cofworkitemRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImheaderRepository
perforImheaderRepository
,
...
...
@@ -49,6 +51,7 @@ public class ComputeService : IAutoInjection
PerforHospitalRepository
hospitalRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforPeremployeeRepository
perforPeremployeeRepository
,
PerforPerapramounthideRepository
hideRepository
,
PerforCofworkitemRepository
cofworkitemRepository
)
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
...
...
@@ -66,6 +69,7 @@ public class ComputeService : IAutoInjection
this
.
hospitalRepository
=
hospitalRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perforPeremployeeRepository
=
perforPeremployeeRepository
;
_hideRepository
=
hideRepository
;
this
.
cofworkitemRepository
=
cofworkitemRepository
;
}
...
...
@@ -589,8 +593,8 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result
.
AddRange
(
officeResult
);
// 获取各科室 医院其他绩效
var
amounts
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
;
var
otherPerformances
=
a
mounts
var
fullAmounts
=
GetTotalAmount
(
allotId
);
;
var
otherPerformances
=
fullA
mounts
?.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
})
.
Select
(
t
=>
new
view_per_total_amount
{
...
...
@@ -748,7 +752,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
// 人员字典
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
// 获取医院其他绩效汇总结果
var
tota
lAmounts
=
GetTotalAmount
(
allotId
);
var
ful
lAmounts
=
GetTotalAmount
(
allotId
);
// 获取一次绩效结果
var
one
=
GetAllotPerformance
(
allotId
,
hospitalId
,
isShowManage
);
// 获取二次绩效结果
...
...
@@ -760,6 +764,18 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
if
(
two
!=
null
)
response
.
AddRange
(
two
);
// 其他绩效汇总
var
totalAmounts
=
fullAmounts
?.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
PersonnelNumber
})
.
Select
(
w
=>
new
view_per_total_amount
{
AccountingUnit
=
w
.
Key
.
AccountingUnit
,
UnitType
=
w
.
Key
.
UnitType
,
PersonnelNumber
=
w
.
Key
.
PersonnelNumber
,
Amount
=
w
.
Sum
(
t
=>
t
.
Amount
)
??
0
,
Use
=
false
,
})?.
ToList
();
// 补充医院其他绩效
AddAprAmount
(
response
,
totalAmounts
);
...
...
@@ -824,26 +840,24 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
}
/// <summary>
///
获取医院其他绩效汇总结果
///
合并医院其他绩效、不公示其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private
List
<
view_per_
total
_amount
>
GetTotalAmount
(
int
allotId
)
private
List
<
view_per_
apr
_amount
>
GetTotalAmount
(
int
allotId
)
{
var
fullAmounts
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
var
fullAmounts
1
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
view_per_apr_amount
>(
);
var
totalAmounts
=
fullAmounts
?.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
UnitType
,
w
.
PersonnelNumber
})
.
Select
(
w
=>
new
view_per_total_amount
{
AccountingUnit
=
w
.
Key
.
AccountingUnit
,
UnitType
=
w
.
Key
.
UnitType
,
PersonnelNumber
=
w
.
Key
.
PersonnelNumber
,
Amount
=
w
.
Sum
(
t
=>
t
.
Amount
)
??
0
,
Use
=
false
,
});
var
fullAmounts2
=
_hideRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
view_per_apr_amount
>();
var
fullAmounts
=
new
List
<
view_per_apr_amount
>();
if
(
fullAmounts1
!=
null
&&
fullAmounts1
.
Any
())
fullAmounts
.
AddRange
(
fullAmounts1
);
if
(
fullAmounts2
!=
null
&&
fullAmounts2
.
Any
())
fullAmounts
.
AddRange
(
fullAmounts2
);
return
totalAmounts
?.
ToList
()
??
new
List
<
view_per_total_amount
>()
;
return
fullAmounts
;
}
/// <summary>
...
...
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