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
a4f2caa5
Commit
a4f2caa5
authored
Jun 11, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
历史
parent
87fe4451
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
63 deletions
+111
-63
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+48
-12
performance/Performance.EntityModels/Entity/res_compute.cs
+5
-0
performance/Performance.Services/AllotCompute/BaiscNormService.cs
+18
-6
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+1
-1
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+39
-44
No files found.
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
a4f2caa5
...
...
@@ -66,24 +66,12 @@ public enum PerformanceType
/// <summary> </summary>
[
Description
(
""
)]
Null
=
0
,
/// <summary> 绩效基数临床科室主任(专门用来计算科主任绩效,由此产生=>>临床科室主任人均绩效)</summary>
[
Description
(
"绩效基数临床科室主任"
)]
StandardDirector
=
1
,
/// <summary> 绩效基数临床科室副主任(专门用来计算科主任绩效,由此产生=>>临床科室副主任人均绩效) </summary>
[
Description
(
"绩效基数临床科室副主任"
)]
StandardDeputyDirector
=
2
,
/// <summary> 绩效基数临床科室护士长(专门用来计算科主任绩效,由此产生=>>临床科室护士长人均绩效) </summary>
[
Description
(
"绩效基数临床科室护士长"
)]
StandardNurse
=
3
,
/// <summary> 临床科室主任人均绩效 (绩效标准取 科室主任人均绩效) </summary>
[
Description
(
"临床科室主任人均绩效"
)]
ReferenceDirector
=
4
,
/// <summary> 临床科室中层人均绩效 (绩效标准取 科室主任/护士长/科室副主任/医技主任 平均值) </summary>
[
Description
(
"临床科室中层人均绩效"
)]
ReferenceDirectorAvg
=
5
,
/// <summary> 临床科室护士长人均绩效 (绩效标准取 护士长 平均值)</summary>
[
Description
(
"临床科室护士长人均绩效"
)]
ReferenceHeadNurse
=
7
,
...
...
@@ -99,5 +87,53 @@ public enum PerformanceType
/// <summary> 行政工勤人均绩效 </summary>
[
Description
(
"行政工勤人均绩效"
)]
LogisticsWorker
=
11
,
/// <summary> 行政中层人均绩效 </summary>
[
Description
(
"行政中层人均绩效"
)]
MiddleManager
=
12
,
/// <summary> 行政高层人均绩效 </summary>
[
Description
(
"行政高层人均绩效"
)]
TopManager
=
13
,
/// <summary> 绩效基数临床科室主任(专门用来计算科主任绩效,由此产生=>>临床科室主任人均绩效)</summary>
[
Description
(
"绩效基数临床科室主任"
)]
临床科主任
=
14
,
/// <summary> 绩效基数临床科室副主任(专门用来计算科主任绩效,由此产生=>>临床科室副主任人均绩效) </summary>
[
Description
(
"绩效基数临床科室副主任"
)]
临床科副主任
=
15
,
/// <summary> 绩效基数临床科室护士长(专门用来计算科主任绩效,由此产生=>>临床科室护士长人均绩效) </summary>
[
Description
(
"绩效基数临床科室护士长"
)]
临床护士长
=
16
,
/// <summary> 绩效基数医技科室主任(专门用来计算科主任绩效,由此产生=>>临床科室副主任人均绩效) </summary>
[
Description
(
"绩效基数医技科室主任"
)]
医技主任
=
17
,
/// <summary> 绩效基数医技科室副主任(专门用来计算科主任绩效,由此产生=>>临床科室副主任人均绩效) </summary>
[
Description
(
"绩效基数医技科室副主任"
)]
医技副主任
=
18
,
}
/// <summary>
/// 核算单元类型
/// </summary>
public
enum
AccountUnitType
{
/// <summary> </summary>
[
Description
(
""
)]
Null
=
1
,
/// <summary> 临床科室 </summary>
[
Description
(
"临床科室"
)]
临床科室
=
2
,
/// <summary> 临床科室 </summary>
[
Description
(
"医技科室"
)]
医技科室
=
3
,
/// <summary> 行政高层 </summary>
[
Description
(
"行政高层"
)]
行政高层
=
4
,
/// <summary> 临床科室 </summary>
[
Description
(
"行政中层"
)]
行政中层
=
5
,
/// <summary> 临床科室 </summary>
[
Description
(
"行政工勤"
)]
行政工勤
=
6
,
}
}
performance/Performance.EntityModels/Entity/res_compute.cs
View file @
a4f2caa5
...
...
@@ -32,6 +32,11 @@ public class res_compute
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元类型(医技科室、临床科室等)
/// </summary>
public
string
AccountType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
...
...
performance/Performance.Services/AllotCompute/BaiscNormService.cs
View file @
a4f2caa5
...
...
@@ -21,10 +21,18 @@ public class BaiscNormService : IAutoInjection
public
decimal
?
GetBaiscNorm
(
List
<
res_baiscnorm
>
baiscnorms
,
PerformanceType
type
)
{
decimal
?
result
=
null
;
if
(
type
==
PerformanceType
.
ReferenceDirector
||
type
==
PerformanceType
.
Null
)
if
(
type
==
PerformanceType
.
ReferenceDirector
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床科主任"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
ReferenceDeputyDirector
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床科副主任"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
ReferenceHeadNurse
||
type
==
PerformanceType
.
StandardNurse
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床科护长"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
ReferenceDirectorAvg
)
{
List
<
string
>
avgObjectList
=
new
List
<
string
>
{
"临床科主任"
,
"临床科副主任"
,
"医技科主任"
,
"临床科护长"
};
...
...
@@ -32,10 +40,6 @@ public class BaiscNormService : IAutoInjection
result
=
baisc
.
Sum
(
s
=>
s
.
TotelValue
)
/
baisc
.
Sum
(
s
=>
s
.
TotelNumber
);
}
else
if
(
type
==
PerformanceType
.
ReferenceHeadNurse
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床科护长"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
ReferenceNurse
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床护士"
)?.
AvgValue
;
...
...
@@ -44,9 +48,17 @@ public class BaiscNormService : IAutoInjection
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"临床医生"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
TopManager
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"行政高层人均绩效"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
MiddleManager
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"行政中层人均绩效"
)?.
AvgValue
;
}
else
if
(
type
==
PerformanceType
.
LogisticsWorker
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"行政工勤"
)?.
AvgValue
;
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
"行政工勤
人均绩效
"
)?.
AvgValue
;
}
if
(
result
.
HasValue
)
result
=
Math
.
Round
(
result
.
Value
,
4
);
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
a4f2caa5
...
...
@@ -76,7 +76,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, res_baiscnor
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
baiscnormList
,
workyearList
);
//计算 行政人员 平均值
var
baiscnormList2
=
computeDirector
.
Compute
Other
Avg
(
computResult2
);
var
baiscnormList2
=
computeDirector
.
ComputeAvg
(
computResult2
);
baiscnormList
.
AddRange
(
baiscnormList2
);
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computResult
);
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
a4f2caa5
...
...
@@ -29,22 +29,25 @@ public ComputeDirector(BaiscNormService baiscNormService)
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
ComputeSource
>
nurseList
,
List
<
cof_director
>
directorList
)
{
Dictionary
<
PerformanceType
,
string
>
keyValues
=
new
Dictionary
<
PerformanceType
,
string
>
{
{
PerformanceType
.
StandardDirector
,
"临床科室主任"
},
{
PerformanceType
.
StandardDeputyDirector
,
"临床科室副主任"
},
{
PerformanceType
.
StandardNurse
,
"临床科室护士长"
},
var
typeArray
=
new
[]
{
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
临床科主任
),
key
=
"临床科室主任"
,
deptment
=
AccountUnitType
.
临床科室
.
ToString
()},
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
临床科副主任
),
key
=
"临床科室副主任"
,
deptment
=
AccountUnitType
.
临床科室
.
ToString
()},
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
医技主任
),
key
=
"医技主任"
,
deptment
=
AccountUnitType
.
医技科室
.
ToString
()},
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
医技副主任
),
key
=
"医技副主任"
,
deptment
=
AccountUnitType
.
医技科室
.
ToString
()},
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
临床护士长
),
key
=
"临床科室护士长"
,
deptment
=
AccountUnitType
.
临床科室
.
ToString
()},
new
{
basic
=
EnumHelper
.
GetDescription
(
PerformanceType
.
临床护士长
),
key
=
"临床科室护士长"
,
deptment
=
AccountUnitType
.
医技科室
.
ToString
()},
};
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
foreach
(
var
key
in
keyValues
.
Keys
)
foreach
(
var
type
in
typeArray
)
{
var
needCompute
=
empolyeeList
.
Where
(
t
=>
t
.
FitPeople
==
EnumHelper
.
GetDescription
(
key
)
);
var
needCompute
=
empolyeeList
.
Where
(
t
=>
t
.
FitPeople
==
type
.
basic
&&
t
.
AccountType
==
type
.
deptment
);
foreach
(
var
item
in
needCompute
)
{
var
resAccount
=
nurseList
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
);
var
efficiency
=
directorList
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"效率绩效"
&&
t
.
JobTitle
==
keyValues
[
key
]
);
var
scale
=
directorList
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"规模绩效"
&&
t
.
JobTitle
==
keyValues
[
key
]
);
var
efficiency
=
directorList
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"效率绩效"
&&
t
.
JobTitle
==
type
.
key
);
var
scale
=
directorList
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"规模绩效"
&&
t
.
JobTitle
==
type
.
key
);
var
compute
=
new
ComputeResult
{
AccountType
=
item
.
AccountType
,
...
...
@@ -94,18 +97,19 @@ public List<res_baiscnorm> ComputeAvg(List<ComputeResult> computes)
var
keyList
=
new
[]
{
//绩效基数平均值项目
new
{
type
=
"临床科室"
,
reference
=
EnumHelper
.
GetDescription
(
PerformanceType
.
StandardDirector
),
groupname
=
"临床科主任"
},
new
{
type
=
"临床科室"
,
reference
=
EnumHelper
.
GetDescription
(
PerformanceType
.
StandardDeputyDirector
),
groupname
=
"临床科副主任"
},
new
{
type
=
"医技科室"
,
reference
=
EnumHelper
.
GetDescription
(
PerformanceType
.
StandardDirector
),
groupname
=
"医技科主任"
},
new
{
type
=
"医技科室"
,
reference
=
EnumHelper
.
GetDescription
(
PerformanceType
.
StandardDeputyDirector
),
groupname
=
"医技科副主任"
},
new
{
type
=
"临床科室"
,
reference
=
EnumHelper
.
GetDescription
(
PerformanceType
.
StandardNurse
),
groupname
=
"临床科护长"
},
new
{
type
=
"临床科室"
,
reference
=
PerformanceType
.
临床科主任
},
new
{
type
=
"临床科室"
,
reference
=
PerformanceType
.
临床科副主任
},
new
{
type
=
"医技科室"
,
reference
=
PerformanceType
.
医技主任
},
new
{
type
=
"医技科室"
,
reference
=
PerformanceType
.
医技副主任
},
new
{
type
=
"临床科室"
,
reference
=
PerformanceType
.
临床护士长
},
};
var
groupList
=
from
cp
in
computes
join
gp
in
keyList
on
new
{
type
=
cp
.
AccountType
,
reference
=
cp
.
FitPeople
}
equals
new
{
gp
.
type
,
gp
.
reference
}
select
new
{
gp
.
groupname
,
cp
};
join
gp
in
keyList
on
new
{
type
=
cp
.
AccountType
,
reference
=
cp
.
FitPeople
}
equals
new
{
gp
.
type
,
reference
=
EnumHelper
.
GetDescription
(
gp
.
reference
)
}
select
new
{
reference
=
gp
.
reference
.
ToString
(),
cp
};
var
result
=
groupList
.
GroupBy
(
t
=>
t
.
groupnam
e
)
var
result
=
groupList
.
GroupBy
(
t
=>
t
.
referenc
e
)
.
Select
(
s
=>
new
res_baiscnorm
{
PositionName
=
s
.
Key
,
...
...
@@ -117,7 +121,7 @@ public List<res_baiscnorm> ComputeAvg(List<ComputeResult> computes)
}
/// <summary>
///
绩效标准计算
///
院领导、行政中层、行政工勤 平均值
/// </summary>
/// <param name="computes"></param>
/// <returns></returns>
...
...
@@ -126,10 +130,9 @@ public List<res_baiscnorm> ComputeOtherAvg(List<ComputeResult> computes)
var
keyList
=
new
[]
{
//行政绩效平均值项目
new
{
type
=
"行政中高层"
,
groupname
=
"行政中高层"
},
new
{
type
=
"行政高层"
,
groupname
=
"行政高层"
},
new
{
type
=
"行政中层"
,
groupname
=
"行政中层"
},
new
{
type
=
"行政工勤"
,
groupname
=
"行政工勤"
},
new
{
type
=
"行政高层"
,
groupname
=
EnumHelper
.
GetDescription
(
PerformanceType
.
TopManager
)
},
new
{
type
=
"行政中层"
,
groupname
=
EnumHelper
.
GetDescription
(
PerformanceType
.
MiddleManager
)
},
new
{
type
=
"行政工勤"
,
groupname
=
EnumHelper
.
GetDescription
(
PerformanceType
.
LogisticsWorker
)
},
};
var
groupList
=
from
cp
in
computes
...
...
@@ -155,28 +158,12 @@ public List<res_baiscnorm> ComputeOtherAvg(List<ComputeResult> computes)
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
res_baiscnorm
>
baiscnormList
,
List
<
cof_workyear
>
workyearList
)
{
PerformanceType
[]
types
=
new
PerformanceType
[]
{
PerformanceType
.
ReferenceDirector
,
PerformanceType
.
ReferenceDirectorAvg
,
PerformanceType
.
ReferenceNurse
,
PerformanceType
.
ReferenceHeadNurse
,
PerformanceType
.
Null
,
};
PerformanceType
[]
yearTypes
=
new
PerformanceType
[]
{
PerformanceType
.
ReferenceNurse
,
PerformanceType
.
ReferenceHeadNurse
,
PerformanceType
.
Null
,
};
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
foreach
(
var
type
in
types
)
var
perforTypeArray
=
EnumHelper
.
GetItems
<
PerformanceType
>();
foreach
(
var
type
in
EnumHelper
.
GetItems
<
AccountUnitType
>()
)
{
var
needCompute
=
empolyeeList
.
Where
(
t
=>
t
.
FitPeople
==
EnumHelper
.
GetDescription
(
type
));
if
(!
needCompute
.
Any
())
continue
;
var
baiscnorm
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
type
);
var
needCompute
=
empolyeeList
.
Where
(
t
=>
t
.
AccountType
==
type
.
Description
);
if
(!
needCompute
.
Any
())
continue
;
foreach
(
var
item
in
needCompute
)
{
...
...
@@ -188,7 +175,6 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
FitPeople
=
item
.
FitPeople
,
Grant
=
item
.
Grant
??
1
,
WorkTime
=
item
.
WorkTime
,
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
1
),
//添加参数计算
PostCoefficient
=
item
.
PostCoefficient
,
Attendance
=
item
.
Attendance
,
ScoreAverageRate
=
item
.
ScoreAverageRate
,
...
...
@@ -199,13 +185,22 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<res_
Workload
=
item
.
Workload
};
decimal
?
baiscnorm
=
1
;
var
perforTypeItem
=
perforTypeArray
.
FirstOrDefault
(
t
=>
t
.
Description
==
item
.
FitPeople
);
if
(
perforTypeItem
!=
null
)
{
var
perforType
=
(
PerformanceType
)
perforTypeItem
.
Value
;
baiscnorm
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
perforType
);
}
//年资系数
if
(
yearTypes
.
Contains
(
type
)
&&
item
.
WorkTime
.
HasValue
&&
item
.
WorkTime
.
Value
>
new
DateTime
(
1970
,
1
,
1
))
if
(
type
.
Value
==
(
int
)
AccountUnitType
.
行政工勤
&&
item
.
WorkTime
.
HasValue
&&
item
.
WorkTime
.
Value
>
new
DateTime
(
1970
,
1
,
1
))
{
var
years
=
((
DateTime
.
Now
.
Year
-
item
.
WorkTime
.
Value
.
Year
)
*
12
+
(
DateTime
.
Now
.
Month
-
item
.
WorkTime
.
Value
.
Month
))
/
12.0
m
;
var
value
=
workyearList
.
FirstOrDefault
(
t
=>
t
.
MinRange
<
years
&&
years
<=
t
.
MaxRange
)?.
Value
;
compute
.
WorkYear
=
value
;
}
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
1
);
//应发绩效
compute
.
GiveFee
=
baiscnorm
*
compute
.
PostCoefficient
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
*
(
compute
.
WorkYear
??
1
)
+
(
compute
.
OtherPerfor
??
0
)
+
(
item
.
Workload
??
0
)
+
(
compute
.
Punishment
??
0
);
//实发绩效
...
...
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