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
3cff38c8
Commit
3cff38c8
authored
Mar 02, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊科室忽略重复值
parent
4ecb8474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
performance/Performance.Services/ComputeService.cs
+30
-26
No files found.
performance/Performance.Services/ComputeService.cs
View file @
3cff38c8
...
...
@@ -323,32 +323,6 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
var
specialData
=
_perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
specialData
!=
null
&&
specialData
.
Any
())
{
result
.
AddRange
(
specialData
.
Select
(
t
=>
new
DeptResponse
{
UnitName
=
"特殊核算组"
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
PerforFee
=
t
.
GiveFee
,
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
AssessBeforeOtherFee
,
PerforTotal
=
t
.
PerforTotal
,
ScoringAverage
=
t
.
ScoringAverage
,
MedicineExtra
=
t
.
MedicineExtra
,
MaterialsExtra
=
t
.
MaterialsExtra
,
Extra
=
0
,
AssessLaterOtherFee
=
t
.
AssessLaterOtherFee
,
AssessLaterPerforTotal
=
Math
.
Round
(((
t
.
PerforTotal
*
t
.
ScoringAverage
)
??
0
)
+
(
t
.
MedicineExtra
??
0
)
+
(
t
.
MaterialsExtra
??
0
)
+
(
t
.
AssessLaterOtherFee
??
0
)),
AdjustFactor
=
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
,
AssessLaterManagementFee
=
0
,
AprPerforAmount
=
0
,
RealGiveFee
=
t
.
RealGiveFee
,
}));
}
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
...
...
@@ -426,6 +400,36 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
+
(
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
),
}).
ToList
();
var
specialData
=
_perforResspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
specialData
!=
null
&&
specialData
.
Any
())
{
result
.
AddRange
(
specialData
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
Department
}).
Select
(
t
=>
{
var
data
=
new
DeptResponse
{
UnitName
=
"特殊核算组"
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
Department
,
PerforFee
=
t
.
Max
(
max
=>
max
.
GiveFee
),
WorkloadFee
=
0
,
AssessBeforeOtherFee
=
t
.
Max
(
max
=>
max
.
AssessBeforeOtherFee
),
PerforTotal
=
t
.
Max
(
max
=>
max
.
PerforTotal
),
ScoringAverage
=
t
.
Max
(
max
=>
max
.
ScoringAverage
),
MedicineExtra
=
t
.
Max
(
max
=>
max
.
MedicineExtra
),
MaterialsExtra
=
t
.
Max
(
max
=>
max
.
MaterialsExtra
),
Extra
=
0
,
AssessLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AssessLaterOtherFee
),
AdjustFactor
=
t
.
Max
(
max
=>
max
.
Adjust
),
AdjustLaterOtherFee
=
t
.
Max
(
max
=>
max
.
AdjustLaterOtherFee
),
AssessLaterManagementFee
=
0
,
AprPerforAmount
=
0
,
RealGiveFee
=
t
.
Max
(
max
=>
max
.
RealGiveFee
),
};
data
.
AssessLaterPerforTotal
=
Math
.
Round
(((
data
.
PerforTotal
*
data
.
ScoringAverage
)
??
0
)
+
(
data
.
MedicineExtra
??
0
)
+
(
data
.
MaterialsExtra
??
0
)
+
(
data
.
AssessLaterOtherFee
??
0
));
return
data
;
}));
}
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
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