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
71cb321f
Commit
71cb321f
authored
Feb 25, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效其他模板补充预留比例
parent
f9392e64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
25 deletions
+52
-25
performance/Performance.Services/Details/SecondAllotDetails.cs
+52
-25
No files found.
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
71cb321f
...
...
@@ -500,28 +500,47 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
});
var
lastNumber
=
rowNumberList
.
Max
()
+
1
;
var
employeeColumns
=
new
List
<
Tuple
<
string
,
string
>>
var
employeeColumns
=
new
List
<
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>>
{
new
Tuple
<
string
,
string
>(
"人员工号"
,
"PersonnelNumber"
),
new
Tuple
<
string
,
string
>(
"姓名"
,
"FullName"
),
new
Tuple
<
string
,
string
>(
"医院其他绩效"
,
"OtherPerformance"
)
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"人员工号"
,
"PersonnelNumber"
,
(
t
)
=>
t
.
PersonnelNumber
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"姓名"
,
"FullName"
,
(
t
)
=>
t
.
DoctorName
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"岗位"
,
"Post"
,
(
t
)
=>
(
t
.
Duty
?.
IndexOf
(
"主任"
)
>
-
1
||
t
.
Duty
?.
IndexOf
(
"护士长"
)
>
-
1
)
?
"科主任/护士长"
:
"其他"
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"出勤"
,
"ActualAttendance"
,
(
t
)
=>
t
.
AttendanceDay
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"人员系数"
,
"StaffCoefficient"
,
(
t
)
=>
1
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"职称"
,
"JobTitle"
,
(
t
)
=>
t
.
JobTitle
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"预留年度考核比例"
,
"ReservedRatio"
,
(
t
)
=>
t
.
ReservedRatio
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"医院其他绩效"
,
"OtherPerformance"
,
(
t
)
=>
0
)
};
var
specialColumns
=
new
string
[]
{
"FullName"
,
"OtherPerformance"
};
foreach
(
var
item
in
groupData
)
{
foreach
(
var
column
in
employeeColumns
)
{
var
headItem
=
otherShowColumns
.
FirstOrDefault
(
w
=>
w
.
FiledName
==
column
.
Item1
&&
w
.
FiledId
==
column
.
Item2
&&
w
.
Type
==
(
int
)
TempColumnType
.
TableFixedColumns
);
if
(
headItem
==
null
)
continue
;
var
data
=
new
BodyItem
(
headItem
);
data
.
RowNumber
=
lastNumber
;
data
.
Value
=
column
.
Item2
==
"OtherPerformance"
?
item
.
Amount
:
column
.
Item2
==
"PersonnelNumber"
?
item
.
PersonnelNumber
:
item
.
DoctorName
;
bodyItems
.
Add
(
data
);
if
(
employeeList
.
Any
(
t
=>
t
.
PersonnelNumber
==
item
.
PersonnelNumber
)
&&
employeeList
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
PersonnelNumber
)
is
per_employee
employee
&&
employee
.
UnitType
==
secondAllot
.
UnitType
)
{
var
headItem
=
otherShowColumns
.
FirstOrDefault
(
w
=>
w
.
FiledName
==
column
.
Item1
&&
w
.
FiledId
==
column
.
Item2
&&
w
.
Type
==
(
int
)
TempColumnType
.
TableFixedColumns
);
if
(
headItem
==
null
)
continue
;
var
data
=
new
BodyItem
(
headItem
);
data
.
RowNumber
=
lastNumber
;
if
(
specialColumns
.
Contains
(
column
.
Item2
))
{
data
.
Value
=
column
.
Item2
==
"OtherPerformance"
?
item
.
Amount
:
item
.
DoctorName
;
}
else
{
var
value
=
column
.
Item3
.
Invoke
(
employee
);
data
.
Value
=
value
?.
ToString
();
}
bodyItems
.
Add
(
data
);
}
}
lastNumber
++;
}
...
...
@@ -774,19 +793,27 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
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
.
Select
(
t
=>
new
ag_othersource
{
PersonnelNumber
=
t
.
Key
,
DoctorName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
Amount
=
t
.
Sum
(
w
=>
w
.
Amount
)
SecondId
=
second
.
Id
,
WorkNumber
=
t
.
Key
,
Name
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
OtherPerformance
=
t
.
Sum
(
w
=>
w
.
Amount
)
});
result
.
AddRange
(
groupData
.
Select
(
t
=>
new
ag_othersource
foreach
(
var
item
in
groupData
)
{
SecondId
=
second
.
Id
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
OtherPerformance
=
t
.
Amount
}));
if
(
employees
.
Any
(
t
=>
t
.
PersonnelNumber
==
item
.
WorkNumber
)
&&
employees
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
WorkNumber
)
is
per_employee
employee
&&
employee
.
UnitType
==
second
.
UnitType
)
{
item
.
ReservedRatio
=
employee
.
ReservedRatio
;
item
.
Department
=
employee
.
AccountingUnit
;
item
.
WorkPost
=
employee
.
JobTitle
;
result
.
Add
(
item
);
}
}
}
}
...
...
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