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
02316f54
Commit
02316f54
authored
Dec 22, 2020
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge' into v2020morge-graphql
parents
006e5edd
60f511c4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
45 deletions
+64
-45
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+0
-0
performance/Performance.EntityModels/Entity/per_employee.cs
+0
-0
performance/Performance.Repository/PerforCofdirectorRepository.cs
+1
-0
performance/Performance.Services/Details/SecondAllotDetails.cs
+23
-18
performance/Performance.Services/EmployeeService.cs
+4
-4
performance/Performance.Services/PersonService.cs
+17
-3
performance/Performance.Services/SecondAllotService.cs
+19
-20
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
02316f54
performance/Performance.EntityModels/Entity/per_employee.cs
View file @
02316f54
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
02316f54
...
@@ -76,6 +76,7 @@ public int DeleteAllotData(int allotId)
...
@@ -76,6 +76,7 @@ public int DeleteAllotData(int allotId)
"res_compute"
,
"res_compute"
,
"res_specialunit"
,
"res_specialunit"
,
"log_check"
,
"log_check"
,
"per_employee"
,
};
};
string
sql
=
""
;
string
sql
=
""
;
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where allotid=@allotId;"
);
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where allotid=@allotId;"
);
...
...
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
02316f54
...
@@ -191,7 +191,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
...
@@ -191,7 +191,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
switch
(
employeeSource
)
switch
(
employeeSource
)
{
{
case
(
int
)
EmployeeSource
.
Initial
:
case
(
int
)
EmployeeSource
.
Initial
:
return
GetEmployeeFromSavedData
(
secondAllot
,
savedDataList
,
otherShowColumns
);
return
GetEmployeeFromSavedData
(
userId
,
secondAllot
,
savedDataList
,
otherShowColumns
);
case
(
int
)
EmployeeSource
.
EmployeeDict
:
case
(
int
)
EmployeeSource
.
EmployeeDict
:
return
GetEmployeeFromEmployeeDict
(
userId
,
secondAllot
,
otherShowColumns
);
return
GetEmployeeFromEmployeeDict
(
userId
,
secondAllot
,
otherShowColumns
);
...
@@ -210,7 +210,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
...
@@ -210,7 +210,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
/// <param name="savedDataList"></param>
/// <param name="savedDataList"></param>
/// <param name="otherShowColumns"></param>
/// <param name="otherShowColumns"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
BodyItem
>
GetEmployeeFromSavedData
(
ag_secondallot
secondAllot
,
List
<
ag_fixatitem
>
savedDataList
,
List
<
HeadItem
>
otherShowColumns
)
public
List
<
BodyItem
>
GetEmployeeFromSavedData
(
int
userId
,
ag_secondallot
secondAllot
,
List
<
ag_fixatitem
>
savedDataList
,
List
<
HeadItem
>
otherShowColumns
)
{
{
var
tableFixedDataList
=
new
List
<
BodyItem
>();
var
tableFixedDataList
=
new
List
<
BodyItem
>();
...
@@ -220,6 +220,7 @@ public List<BodyItem> GetEmployeeFromSavedData(ag_secondallot secondAllot, List<
...
@@ -220,6 +220,7 @@ public List<BodyItem> GetEmployeeFromSavedData(ag_secondallot secondAllot, List<
var
rowNumberList
=
savedDataList
.
Where
(
w
=>
w
.
RowNumber
.
HasValue
&&
w
.
RowNumber
>
-
1
)?.
Select
(
w
=>
w
.
RowNumber
.
Value
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
var
rowNumberList
=
savedDataList
.
Where
(
w
=>
w
.
RowNumber
.
HasValue
&&
w
.
RowNumber
>
-
1
)?.
Select
(
w
=>
w
.
RowNumber
.
Value
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
if
(
rowNumberList
!=
null
&&
rowNumberList
.
Any
())
if
(
rowNumberList
!=
null
&&
rowNumberList
.
Any
())
{
{
var
employeeList
=
personService
.
GetPersons
(
secondAllot
.
AllotId
.
Value
,
userId
);
foreach
(
var
rowNumber
in
rowNumberList
)
foreach
(
var
rowNumber
in
rowNumberList
)
{
{
foreach
(
var
column
in
otherShowColumns
)
foreach
(
var
column
in
otherShowColumns
)
...
@@ -234,7 +235,7 @@ public List<BodyItem> GetEmployeeFromSavedData(ag_secondallot secondAllot, List<
...
@@ -234,7 +235,7 @@ public List<BodyItem> GetEmployeeFromSavedData(ag_secondallot secondAllot, List<
tableFixedDataList
.
Add
(
tableFixedData
);
tableFixedDataList
.
Add
(
tableFixedData
);
}
}
}
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
}
}
return
tableFixedDataList
;
return
tableFixedDataList
;
}
}
...
@@ -262,7 +263,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
...
@@ -262,7 +263,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
var
employeeColumns
=
new
List
<
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>>
var
employeeColumns
=
new
List
<
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>>
{
{
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"人员工号"
,
"PersonnelNumber"
,
(
t
)
=>
t
.
Job
Number
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"人员工号"
,
"PersonnelNumber"
,
(
t
)
=>
t
.
Personnel
Number
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"姓名"
,
"FullName"
,
(
t
)
=>
t
.
DoctorName
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"姓名"
,
"FullName"
,
(
t
)
=>
t
.
DoctorName
),
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
new
Tuple
<
string
,
string
,
Func
<
per_employee
,
object
>>(
"岗位"
,
"Post"
,
"岗位"
,
"Post"
,
...
@@ -291,7 +292,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
...
@@ -291,7 +292,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
}
}
rowNumber
++;
rowNumber
++;
}
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
return
tableFixedDataList
;
return
tableFixedDataList
;
}
}
...
@@ -348,9 +349,9 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
...
@@ -348,9 +349,9 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
if
(
attenItem
==
null
)
continue
;
if
(
attenItem
==
null
)
continue
;
var
attendance
=
new
BodyItem
(
attenItem
);
var
attendance
=
new
BodyItem
(
attenItem
);
var
job
Number
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
ItemName
==
"人员工号"
)?.
ItemValue
;
var
personnel
Number
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
ItemName
==
"人员工号"
)?.
ItemValue
;
var
personName
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
ItemName
==
"姓名"
)?.
ItemValue
;
var
personName
=
savedDataList
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
rowNumber
&&
w
.
ItemName
==
"姓名"
)?.
ItemValue
;
var
employeeAttendance
=
employeeList
.
FirstOrDefault
(
w
=>
w
.
JobNumber
==
job
Number
&&
w
.
DoctorName
==
personName
)?.
AttendanceDay
.
ToString
();
var
employeeAttendance
=
employeeList
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
personnel
Number
&&
w
.
DoctorName
==
personName
)?.
AttendanceDay
.
ToString
();
attendance
.
Value
=
employeeAttendance
;
attendance
.
Value
=
employeeAttendance
;
attendance
.
RowNumber
=
rowNumber
;
attendance
.
RowNumber
=
rowNumber
;
...
@@ -359,7 +360,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
...
@@ -359,7 +360,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
#
endregion
获取人员字典中录入的出勤
#
endregion
获取人员字典中录入的出勤
}
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
}
}
return
tableFixedDataList
;
return
tableFixedDataList
;
}
}
...
@@ -407,7 +408,7 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
...
@@ -407,7 +408,7 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
/// 补充 医院其他绩效
/// 补充 医院其他绩效
/// </summary>
/// </summary>
/// <param name="result"></param>
/// <param name="result"></param>
private
void
SupplementOtherPerfor
(
ag_secondallot
secondAllot
,
List
<
BodyItem
>
bodyItems
)
private
void
SupplementOtherPerfor
(
ag_secondallot
secondAllot
,
List
<
BodyItem
>
bodyItems
,
List
<
per_employee
>
employeeList
)
{
{
if
(
bodyItems
==
null
||
!
bodyItems
.
Any
(
w
=>
w
.
RowNumber
>
-
1
))
return
;
if
(
bodyItems
==
null
||
!
bodyItems
.
Any
(
w
=>
w
.
RowNumber
>
-
1
))
return
;
...
@@ -420,9 +421,13 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
...
@@ -420,9 +421,13 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
var
personnelNumber
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"PersonnelNumber"
)?.
Value
;
var
personnelNumber
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"PersonnelNumber"
)?.
Value
;
var
fullName
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"FullName"
)?.
Value
;
var
fullName
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"FullName"
)?.
Value
;
var
amount
=
perapramounts
var
employee
=
employeeList
.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
personnelNumber
);
if
(
employee
==
null
)
continue
;
var
amount
=
secondAllot
.
Department
==
employee
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
secondAllot
.
Department
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
secondAllot
.
Department
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
if
(
otherPerfor
!=
null
)
if
(
otherPerfor
!=
null
)
otherPerfor
.
Value
=
amount
?.
ToString
();
otherPerfor
.
Value
=
amount
?.
ToString
();
...
@@ -551,7 +556,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
...
@@ -551,7 +556,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
result
=
employees
.
Select
(
t
=>
new
ag_othersource
result
=
employees
.
Select
(
t
=>
new
ag_othersource
{
{
SecondId
=
secondId
,
SecondId
=
secondId
,
WorkNumber
=
t
.
JobNumber
/*?? t.PersonnelNumber*/
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
WorkPost
=
t
.
JobTitle
,
...
@@ -597,16 +602,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
...
@@ -597,16 +602,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
return
;
return
;
// 补充医院其他绩效 及 预留比例
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
;
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
getDistPerformance
=
(
t
)
=>
distPerformance
getDistPerformance
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
);
?.
Sum
(
w
=>
w
.
GiveFee
)
:
0
;
foreach
(
var
item
in
result
)
foreach
(
var
item
in
result
)
{
{
...
...
performance/Performance.Services/EmployeeService.cs
View file @
02316f54
...
@@ -581,20 +581,20 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
...
@@ -581,20 +581,20 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="jobNumber"></param>
/// <param name="jobNumber"></param>
/// <returns></returns>
/// <returns></returns>
public
per_apr_amount
GetEmployeeMessage
(
int
allotId
,
string
job
Number
,
int
userId
)
public
per_apr_amount
GetEmployeeMessage
(
int
allotId
,
string
personnel
Number
,
int
userId
)
{
{
if
(
string
.
IsNullOrEmpty
(
job
Number
))
return
new
per_apr_amount
();
if
(
string
.
IsNullOrEmpty
(
personnel
Number
))
return
new
per_apr_amount
();
var
user
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
&&
w
.
IsDelete
==
1
);
var
user
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
&&
w
.
IsDelete
==
1
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"操作用户不存在或用户信息错误!"
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"操作用户不存在或用户信息错误!"
);
var
employee
=
peremployeeRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
JobNumber
.
Trim
()
==
job
Number
.
Trim
());
var
employee
=
peremployeeRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
PersonnelNumber
.
Trim
()
==
personnel
Number
.
Trim
());
if
(
employee
==
null
)
return
new
per_apr_amount
();
if
(
employee
==
null
)
return
new
per_apr_amount
();
return
new
per_apr_amount
return
new
per_apr_amount
{
{
AllotId
=
allotId
,
AllotId
=
allotId
,
PersonnelNumber
=
employee
.
Job
Number
,
PersonnelNumber
=
employee
.
Personnel
Number
,
DoctorName
=
employee
.
DoctorName
,
DoctorName
=
employee
.
DoctorName
,
TypeInDepartment
=
user
.
Department
,
TypeInDepartment
=
user
.
Department
,
AccountingUnit
=
employee
.
AccountingUnit
AccountingUnit
=
employee
.
AccountingUnit
...
...
performance/Performance.Services/PersonService.cs
View file @
02316f54
...
@@ -88,13 +88,13 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
...
@@ -88,13 +88,13 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
data
=
persons
.
Select
(
t
=>
new
per_employee
var
data
=
persons
.
Select
(
t
=>
{
var
entity
=
new
per_employee
{
{
AccountingUnit
=
t
.
AccountingUnit
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
Department
=
t
.
Department
,
DoctorName
=
t
.
DoctorName
,
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
JobNumber
=
t
.
JobNumber
,
JobCategory
=
t
.
JobCategory
,
JobCategory
=
t
.
JobCategory
,
Duty
=
t
.
Duty
,
Duty
=
t
.
Duty
,
JobTitle
=
t
.
JobTitle
,
JobTitle
=
t
.
JobTitle
,
...
@@ -111,6 +111,19 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
...
@@ -111,6 +111,19 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
AllotId
=
allotId
,
AllotId
=
allotId
,
ReservedRatio
=
t
.
ReservedRatio
,
ReservedRatio
=
t
.
ReservedRatio
,
CreateTime
=
DateTime
.
Now
,
CreateTime
=
DateTime
.
Now
,
};
if
(!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
!
string
.
IsNullOrEmpty
(
t
.
JobNumber
))
{
entity
.
PersonnelNumber
=
t
.
PersonnelNumber
;
entity
.
JobNumber
=
t
.
JobNumber
;
}
else
{
string
number
=
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
?
t
.
PersonnelNumber
:
t
.
JobNumber
;
entity
.
PersonnelNumber
=
number
;
entity
.
JobNumber
=
number
;
}
return
entity
;
}).
ToList
();
}).
ToList
();
SaveAllotPersons
(
data
);
SaveAllotPersons
(
data
);
}
}
...
@@ -223,6 +236,7 @@ public bool UpdatePerson(PerEmployeeResponse request)
...
@@ -223,6 +236,7 @@ public bool UpdatePerson(PerEmployeeResponse request)
employee
.
Department
=
request
.
Department
;
employee
.
Department
=
request
.
Department
;
employee
.
DoctorName
=
request
.
DoctorName
;
employee
.
DoctorName
=
request
.
DoctorName
;
employee
.
PersonnelNumber
=
request
.
PersonnelNumber
;
employee
.
PersonnelNumber
=
request
.
PersonnelNumber
;
//employee.JobNumber = request.JobNumber; // his
employee
.
JobCategory
=
request
.
JobCategory
;
employee
.
JobCategory
=
request
.
JobCategory
;
employee
.
Duty
=
request
.
Duty
;
employee
.
Duty
=
request
.
Duty
;
employee
.
JobTitle
=
request
.
JobTitle
;
employee
.
JobTitle
=
request
.
JobTitle
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
02316f54
...
@@ -279,7 +279,7 @@ public List<BodyItem> AutoComplete(SecondEmpRequest request, int userId)
...
@@ -279,7 +279,7 @@ public List<BodyItem> AutoComplete(SecondEmpRequest request, int userId)
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
var
bodyItems
=
GetEmployees
(
employees
,
second
.
AllotId
.
Value
,
userId
,
headItems
,
second
.
UnitType
,
request
.
EmployeeName
,
request
.
JobNumber
);
var
bodyItems
=
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
,
request
.
EmployeeName
,
request
.
JobNumber
);
return
bodyItems
;
return
bodyItems
;
}
}
...
@@ -333,7 +333,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
...
@@ -333,7 +333,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
{
{
//更换模板时,会自动保存顶部数据
//更换模板时,会自动保存顶部数据
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
result
.
BodyItems
.
AddRange
(
GetEmployees
(
employees
,
second
.
AllotId
.
Value
,
userId
,
headItems
,
second
.
UnitType
));
result
.
BodyItems
.
AddRange
(
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
));
}
}
}
}
else
else
...
@@ -341,7 +341,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
...
@@ -341,7 +341,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
//result.BodyItems = GetBringItems(request, headItems);
//result.BodyItems = GetBringItems(request, headItems);
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
result
.
BodyItems
=
GetEmployees
(
employees
,
second
.
AllotId
.
Value
,
userId
,
headItems
,
second
.
UnitType
);
result
.
BodyItems
=
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
);
var
bodys
=
Mapper
.
Map
<
List
<
BodyItem
>>(
headItems
.
Where
(
t
=>
t
.
Type
==
1
));
var
bodys
=
Mapper
.
Map
<
List
<
BodyItem
>>(
headItems
.
Where
(
t
=>
t
.
Type
==
1
));
if
(
bodys
!=
null
&&
bodys
.
Any
())
if
(
bodys
!=
null
&&
bodys
.
Any
())
...
@@ -380,7 +380,7 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
...
@@ -380,7 +380,7 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
var
fullName
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"FullName"
)?.
Value
;
var
fullName
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"FullName"
)?.
Value
;
var
amount
=
perapramounts
var
amount
=
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
fullName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
fullName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
?.
Sum
(
w
=>
w
.
Amount
);
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
if
(
otherPerfor
!=
null
)
if
(
otherPerfor
!=
null
)
...
@@ -389,7 +389,7 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
...
@@ -389,7 +389,7 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
}
}
}
}
private
List
<
BodyItem
>
GetEmployees
(
List
<
per_employee
>
employees
,
int
allotI
d
,
int
userId
,
List
<
HeadItem
>
heads
,
string
unittype
,
string
empName
=
""
,
string
jobNumber
=
""
)
private
List
<
BodyItem
>
GetEmployees
(
List
<
per_employee
>
employees
,
ag_secondallot
secon
d
,
int
userId
,
List
<
HeadItem
>
heads
,
string
unittype
,
string
empName
=
""
,
string
jobNumber
=
""
)
{
{
var
list
=
new
List
<
BodyItem
>();
var
list
=
new
List
<
BodyItem
>();
...
@@ -405,17 +405,16 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i
...
@@ -405,17 +405,16 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i
if
(!
string
.
IsNullOrEmpty
(
empName
))
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)
&&
w
.
Job
Number
.
Trim
()
==
jobNumber
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
Personnel
Number
.
Trim
()
==
jobNumber
.
Trim
()).
ToList
();
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
AllotId
==
allotId
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
JobNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
?.
Sum
(
w
=>
w
.
Amount
);
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
{
{
{
(
"人员工号"
,
"PersonnelNumber"
),
(
t
)
=>
t
.
Job
Number
},
{
(
"人员工号"
,
"PersonnelNumber"
),
(
t
)
=>
t
.
Personnel
Number
},
{
(
"姓名"
,
"FullName"
),
(
t
)
=>
t
.
DoctorName
},
{
(
"姓名"
,
"FullName"
),
(
t
)
=>
t
.
DoctorName
},
{
(
"岗位"
,
"Post"
),
(
t
)
=>
!
string
.
IsNullOrEmpty
(
t
.
Duty
)
&&
(
t
.
Duty
.
IndexOf
(
"主任"
)
>
-
1
||
t
.
Duty
.
IndexOf
(
"护士长"
)
>
-
1
)
?
"主任"
:
"其他"
},
{
(
"岗位"
,
"Post"
),
(
t
)
=>
!
string
.
IsNullOrEmpty
(
t
.
Duty
)
&&
(
t
.
Duty
.
IndexOf
(
"主任"
)
>
-
1
||
t
.
Duty
.
IndexOf
(
"护士长"
)
>
-
1
)
?
"主任"
:
"其他"
},
{
(
"出勤"
,
"ActualAttendance"
),
(
t
)
=>
t
.
AttendanceDay
},
{
(
"出勤"
,
"ActualAttendance"
),
(
t
)
=>
t
.
AttendanceDay
},
...
@@ -1542,7 +1541,7 @@ public List<ag_othersource> OtherList(int secondId, int userId)
...
@@ -1542,7 +1541,7 @@ public List<ag_othersource> OtherList(int secondId, int userId)
result
=
employees
.
Select
(
t
=>
new
ag_othersource
result
=
employees
.
Select
(
t
=>
new
ag_othersource
{
{
SecondId
=
secondId
,
SecondId
=
secondId
,
WorkNumber
=
t
.
JobNumber
??
t
.
PersonnelNumber
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
WorkPost
=
t
.
JobTitle
,
...
@@ -1585,7 +1584,7 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
...
@@ -1585,7 +1584,7 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
if
(!
string
.
IsNullOrEmpty
(
request
.
EmployeeName
))
if
(!
string
.
IsNullOrEmpty
(
request
.
EmployeeName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
.
EmployeeName
?.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
.
EmployeeName
?.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
request
.
JobNumber
))
if
(!
string
.
IsNullOrEmpty
(
request
.
JobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)
&&
w
.
Job
Number
.
Trim
()
==
request
.
JobNumber
.
Trim
()).
ToList
();
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
Personnel
Number
.
Trim
()
==
request
.
JobNumber
.
Trim
()).
ToList
();
List
<
ag_othersource
>
result
=
employees
List
<
ag_othersource
>
result
=
employees
.
Select
(
t
=>
new
ag_othersource
.
Select
(
t
=>
new
ag_othersource
...
@@ -1615,16 +1614,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
...
@@ -1615,16 +1614,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
return
;
return
;
// 补充医院其他绩效 及 预留比例
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
getDistPerformance
=
(
t
)
=>
distPerformance
getDistPerformance
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Where
(
w
=>
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
);
?.
Sum
(
w
=>
w
.
GiveFee
)
:
0
;
foreach
(
var
item
in
result
)
foreach
(
var
item
in
result
)
{
{
...
...
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