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
dbd911ba
Commit
dbd911ba
authored
Feb 24, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效详情人员根据其他绩效进行补充
parent
2657f929
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
11 deletions
+98
-11
performance/Performance.Services/Details/SecondAllotDetails.cs
+98
-11
No files found.
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
dbd911ba
...
...
@@ -255,7 +255,7 @@ public List<BodyItem> GetEmployeeFromSavedData(int userId, ag_secondallot second
tableFixedDataList
.
Add
(
tableFixedData
);
}
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
,
otherShowColumns
);
}
return
tableFixedDataList
;
}
...
...
@@ -312,7 +312,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
}
rowNumber
++;
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
,
otherShowColumns
);
return
tableFixedDataList
;
}
...
...
@@ -380,7 +380,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
#
endregion
获取人员字典中录入的出勤
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
,
otherShowColumns
);
}
return
tableFixedDataList
;
}
...
...
@@ -459,11 +459,12 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
/// 补充 医院其他绩效
/// </summary>
/// <param name="result"></param>
private
void
SupplementOtherPerfor
(
ag_secondallot
secondAllot
,
List
<
BodyItem
>
bodyItems
,
List
<
per_employee
>
employeeList
)
private
void
SupplementOtherPerfor
(
ag_secondallot
secondAllot
,
List
<
BodyItem
>
bodyItems
,
List
<
per_employee
>
employeeList
,
List
<
HeadItem
>
otherShowColumns
)
{
if
(
bodyItems
==
null
||
!
bodyItems
.
Any
(
w
=>
w
.
RowNumber
>
-
1
))
return
;
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
secondAllot
.
AllotId
&&
t
.
Status
==
3
);
if
(
perapramounts
==
null
||
!
perapramounts
.
Any
())
return
;
var
rowNumberList
=
bodyItems
.
Where
(
w
=>
w
.
RowNumber
>
-
1
).
Select
(
w
=>
w
.
RowNumber
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
foreach
(
var
rownum
in
rowNumberList
)
...
...
@@ -475,14 +476,56 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
var
employee
=
employeeList
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
personnelNumber
);
if
(
employee
==
null
)
continue
;
var
amount
=
secondAllot
.
Department
==
employee
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
var
amount
=
secondAllot
.
Department
==
employee
.
AccountingUnit
?
hasAmountData
.
Sum
(
w
=>
w
.
Amount
)
:
0
;
perapramounts
.
RemoveAll
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
if
(
otherPerfor
!=
null
)
otherPerfor
.
Value
=
amount
?.
ToString
();
}
// 补充字典中该科室不存在,但有其它绩效的人员信息
if
(
perapramounts
!=
null
&&
perapramounts
.
Any
(
t
=>
t
.
AccountingUnit
==
secondAllot
.
Department
))
{
var
groupData
=
perapramounts
.
Where
(
t
=>
t
.
AccountingUnit
==
secondAllot
.
Department
).
GroupBy
(
t
=>
t
.
PersonnelNumber
)
.
Select
(
t
=>
new
{
PersonnelNumber
=
t
.
Key
,
DoctorName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
Amount
=
t
.
Sum
(
w
=>
w
.
Amount
)?.
ToString
()
});
var
lastNumber
=
rowNumberList
.
Max
()
+
1
;
var
employeeColumns
=
new
List
<
Tuple
<
string
,
string
>>
{
new
Tuple
<
string
,
string
>(
"人员工号"
,
"PersonnelNumber"
),
new
Tuple
<
string
,
string
>(
"姓名"
,
"FullName"
),
new
Tuple
<
string
,
string
>(
"医院其他绩效"
,
"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
);
}
lastNumber
++;
}
}
}
/// <summary>
...
...
@@ -690,16 +733,60 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
{
item
.
OtherPerformance
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
Amount
);
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
item
.
OtherPerformance
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
())?.
Sum
(
w
=>
w
.
Amount
);
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
}
else
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
item
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
}
else
if
(!
string
.
IsNullOrEmpty
(
empl
?.
AccountingUnit
))
{
item
.
OtherPerformance
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
Amount
);
if
(
string
.
IsNullOrEmpty
(
item
.
WorkNumber
))
item
.
OtherPerformance
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
())?.
Sum
(
w
=>
w
.
Amount
);
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
item
.
Name
?.
Trim
());
}
else
{
var
hasAmountData
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
if
(
hasAmountData
==
null
||
!
hasAmountData
.
Any
())
continue
;
item
.
OtherPerformance
=
hasAmountData
.
Sum
(
w
=>
w
.
Amount
);
perapramounts
.
RemoveAll
(
w
=>
w
.
AccountingUnit
==
empl
?.
AccountingUnit
&&
w
.
PersonnelNumber
?.
Trim
()
==
item
.
WorkNumber
?.
Trim
());
}
}
}
// 补充字典中该科室不存在,但有其它绩效的人员信息
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
{
PersonnelNumber
=
t
.
Key
,
DoctorName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
DoctorName
))?.
DoctorName
,
Amount
=
t
.
Sum
(
w
=>
w
.
Amount
)
});
result
.
AddRange
(
groupData
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
second
.
Id
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
OtherPerformance
=
t
.
Amount
}));
}
}
...
...
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