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
60f511c4
Commit
60f511c4
authored
Dec 22, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效人员字典使用personnelnumber替换jobnumber(东方存在两种工号,在二次绩效工作量中联合字典表显示人事工号,其余医院personnelnumber、jobnumber一致)
parent
3667cd9c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
115 additions
and
96 deletions
+115
-96
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+6
-6
performance/Performance.EntityModels/Entity/per_employee.cs
+26
-26
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
+36
-22
performance/Performance.Services/SecondAllotService.cs
+19
-20
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
60f511c4
...
...
@@ -3637,9 +3637,9 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.Id"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.HospitalId"
>
<summary>
...
...
@@ -3742,14 +3742,14 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.CreateTime"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_employee.CreateUser"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.per_first"
>
<summary>
...
...
performance/Performance.EntityModels/Entity/per_employee.cs
View file @
60f511c4
//-----------------------------------------------------------------------
// <copyright file=" per_employee.cs">
// * FileName: 绩效人员表.cs
// * FileName: 绩效人员表.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
/// 绩效人员表
/// </summary>
[
Table
(
"per_employee"
)]
public
class
per_employee
public
class
per_employee
{
/// <summary>
///
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 医院Id
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
/// 绩效Id
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 姓名
/// </summary>
...
...
@@ -60,74 +60,74 @@ public class per_employee
/// 正式/临聘
/// </summary>
public
string
JobCategory
{
get
;
set
;
}
/// <summary>
/// 职务
/// </summary>
public
string
Duty
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 人员类别
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 出勤率
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 出勤天数
/// </summary>
public
Nullable
<
int
>
AttendanceDay
{
get
;
set
;
}
/// <summary>
/// 核算人数
/// </summary>
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
/// <summary>
/// 效率人数
/// </summary>
public
Nullable
<
decimal
>
EfficiencyNumber
{
get
;
set
;
}
/// <summary>
/// 参加工作时间
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
/// <summary>
/// 出生年月
/// </summary>
public
Nullable
<
DateTime
>
BirthDate
{
get
;
set
;
}
/// <summary>
/// 年龄
/// </summary>
public
Nullable
<
int
>
Age
{
get
;
set
;
}
/// <summary>
/// 预留比例
/// </summary>
public
Nullable
<
decimal
>
ReservedRatio
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
Nullable
<
DateTime
>
CreateTime
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
}
...
...
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
60f511c4
...
...
@@ -76,6 +76,7 @@ public int DeleteAllotData(int allotId)
"res_compute"
,
"res_specialunit"
,
"log_check"
,
"per_employee"
,
};
string
sql
=
""
;
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where allotid=@allotId;"
);
...
...
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
60f511c4
...
...
@@ -191,7 +191,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
switch
(
employeeSource
)
{
case
(
int
)
EmployeeSource
.
Initial
:
return
GetEmployeeFromSavedData
(
secondAllot
,
savedDataList
,
otherShowColumns
);
return
GetEmployeeFromSavedData
(
userId
,
secondAllot
,
savedDataList
,
otherShowColumns
);
case
(
int
)
EmployeeSource
.
EmployeeDict
:
return
GetEmployeeFromEmployeeDict
(
userId
,
secondAllot
,
otherShowColumns
);
...
...
@@ -210,7 +210,7 @@ public List<BodyItem> GetBodyItems(int userId, int employeeSource, ag_secondallo
/// <param name="savedDataList"></param>
/// <param name="otherShowColumns"></param>
/// <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
>();
...
...
@@ -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
();
if
(
rowNumberList
!=
null
&&
rowNumberList
.
Any
())
{
var
employeeList
=
personService
.
GetPersons
(
secondAllot
.
AllotId
.
Value
,
userId
);
foreach
(
var
rowNumber
in
rowNumberList
)
{
foreach
(
var
column
in
otherShowColumns
)
...
...
@@ -234,7 +235,7 @@ public List<BodyItem> GetEmployeeFromSavedData(ag_secondallot secondAllot, List<
tableFixedDataList
.
Add
(
tableFixedData
);
}
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
}
return
tableFixedDataList
;
}
...
...
@@ -262,7 +263,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
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
>>(
"岗位"
,
"Post"
,
...
...
@@ -291,7 +292,7 @@ public List<BodyItem> GetEmployeeFromEmployeeDict(int userId, ag_secondallot sec
}
rowNumber
++;
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
return
tableFixedDataList
;
}
...
...
@@ -348,9 +349,9 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
if
(
attenItem
==
null
)
continue
;
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
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
.
RowNumber
=
rowNumber
;
...
...
@@ -359,7 +360,7 @@ public List<BodyItem> GetEmployeeFromPrevData(int userId, ag_secondallot secondA
#
endregion
获取人员字典中录入的出勤
}
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
);
SupplementOtherPerfor
(
secondAllot
,
tableFixedDataList
,
employeeList
);
}
return
tableFixedDataList
;
}
...
...
@@ -407,7 +408,7 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
/// 补充 医院其他绩效
/// </summary>
/// <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
;
...
...
@@ -420,9 +421,13 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
var
personnelNumber
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"PersonnelNumber"
)?.
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
())
?.
Sum
(
w
=>
w
.
Amount
);
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
if
(
otherPerfor
!=
null
)
otherPerfor
.
Value
=
amount
?.
ToString
();
...
...
@@ -551,7 +556,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
result
=
employees
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
t
.
JobNumber
/*?? t.PersonnelNumber*/
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
...
...
@@ -597,16 +602,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
return
;
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
;
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
getDistPerformance
=
(
t
)
=>
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
);
getDistPerformance
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
distPerformance
?.
Where
(
w
=>
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
)
:
0
;
foreach
(
var
item
in
result
)
{
...
...
performance/Performance.Services/EmployeeService.cs
View file @
60f511c4
...
...
@@ -581,20 +581,20 @@ public void ImpoerAprEmployees(int allotid, string path, int userid)
/// <param name="allotId"></param>
/// <param name="jobNumber"></param>
/// <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
);
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
();
return
new
per_apr_amount
{
AllotId
=
allotId
,
PersonnelNumber
=
employee
.
Job
Number
,
PersonnelNumber
=
employee
.
Personnel
Number
,
DoctorName
=
employee
.
DoctorName
,
TypeInDepartment
=
user
.
Department
,
AccountingUnit
=
employee
.
AccountingUnit
...
...
performance/Performance.Services/PersonService.cs
View file @
60f511c4
...
...
@@ -88,29 +88,42 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
data
=
persons
.
Select
(
t
=>
new
per_employee
var
data
=
persons
.
Select
(
t
=>
{
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
JobNumber
=
t
.
JobNumber
,
JobCategory
=
t
.
JobCategory
,
Duty
=
t
.
Duty
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
UnitType
,
AttendanceDay
=
day
,
Attendance
=
1
,
PermanentStaff
=
t
.
PermanentStaff
,
EfficiencyNumber
=
t
.
EfficiencyNumber
,
WorkTime
=
t
.
WorkTime
,
BirthDate
=
t
.
BirthDate
,
Age
=
t
.
Age
,
Remark
=
t
.
Remark
,
HospitalId
=
t
.
HospitalId
,
AllotId
=
allotId
,
ReservedRatio
=
t
.
ReservedRatio
,
CreateTime
=
DateTime
.
Now
,
var
entity
=
new
per_employee
{
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
DoctorName
=
t
.
DoctorName
,
JobCategory
=
t
.
JobCategory
,
Duty
=
t
.
Duty
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
UnitType
,
AttendanceDay
=
day
,
Attendance
=
1
,
PermanentStaff
=
t
.
PermanentStaff
,
EfficiencyNumber
=
t
.
EfficiencyNumber
,
WorkTime
=
t
.
WorkTime
,
BirthDate
=
t
.
BirthDate
,
Age
=
t
.
Age
,
Remark
=
t
.
Remark
,
HospitalId
=
t
.
HospitalId
,
AllotId
=
allotId
,
ReservedRatio
=
t
.
ReservedRatio
,
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
();
SaveAllotPersons
(
data
);
}
...
...
@@ -223,6 +236,7 @@ public bool UpdatePerson(PerEmployeeResponse request)
employee
.
Department
=
request
.
Department
;
employee
.
DoctorName
=
request
.
DoctorName
;
employee
.
PersonnelNumber
=
request
.
PersonnelNumber
;
//employee.JobNumber = request.JobNumber; // his
employee
.
JobCategory
=
request
.
JobCategory
;
employee
.
Duty
=
request
.
Duty
;
employee
.
JobTitle
=
request
.
JobTitle
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
60f511c4
...
...
@@ -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
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
;
}
...
...
@@ -333,7 +333,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int 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
...
...
@@ -341,7 +341,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
//result.BodyItems = GetBringItems(request, headItems);
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
));
if
(
bodys
!=
null
&&
bodys
.
Any
())
...
...
@@ -380,7 +380,7 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
var
fullName
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"FullName"
)?.
Value
;
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
);
var
otherPerfor
=
rowData
.
FirstOrDefault
(
w
=>
w
.
FiledId
==
"OtherPerformance"
);
if
(
otherPerfor
!=
null
)
...
...
@@ -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
>();
...
...
@@ -405,17 +405,16 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, int allotId, i
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?.
Trim
()).
ToList
();
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
==
allotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
JobNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
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
},
{
(
"岗位"
,
"Post"
),
(
t
)
=>
!
string
.
IsNullOrEmpty
(
t
.
Duty
)
&&
(
t
.
Duty
.
IndexOf
(
"主任"
)
>
-
1
||
t
.
Duty
.
IndexOf
(
"护士长"
)
>
-
1
)
?
"主任"
:
"其他"
},
{
(
"出勤"
,
"ActualAttendance"
),
(
t
)
=>
t
.
AttendanceDay
},
...
...
@@ -1542,7 +1541,7 @@ public List<ag_othersource> OtherList(int secondId, int userId)
result
=
employees
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
t
.
JobNumber
??
t
.
PersonnelNumber
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
...
...
@@ -1585,7 +1584,7 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
if
(!
string
.
IsNullOrEmpty
(
request
.
EmployeeName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
.
EmployeeName
?.
Trim
()).
ToList
();
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
.
Select
(
t
=>
new
ag_othersource
...
...
@@ -1615,16 +1614,16 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
return
;
// 补充医院其他绩效 及 预留比例
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
Amount
)
:
0
;
var
distPerformance
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
DoctorName
).
Contains
(
t
.
EmployeeName
));
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
t
)
=>
0
;
if
(
second
.
UnitType
==
UnitType
.
行政后勤
.
ToString
())
getDistPerformance
=
(
t
)
=>
distPerformance
?.
Where
(
w
=>
w
.
AccountingUnit
?.
Trim
()
==
second
.
Department
?.
Trim
()
&&
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
);
getDistPerformance
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
?
distPerformance
?.
Where
(
w
=>
w
.
EmployeeName
?.
Trim
()
==
t
.
DoctorName
?.
Trim
()
&&
w
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
())
?.
Sum
(
w
=>
w
.
GiveFee
)
:
0
;
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