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
485f2a78
Commit
485f2a78
authored
Nov 23, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
5a980785
03106c21
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
105 additions
and
55 deletions
+105
-55
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+6
-1
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+15
-5
performance/Performance.DtoModels/Enum.cs
+4
-0
performance/Performance.DtoModels/Request/WorkloadRequest.cs
+1
-1
performance/Performance.EntityModels/Entity/ag_bodysource.cs
+5
-0
performance/Performance.EntityModels/Entity/ag_headsource.cs
+5
-0
performance/Performance.EntityModels/Entity/ex_result.cs
+5
-0
performance/Performance.EntityModels/Entity/ex_script.cs
+0
-5
performance/Performance.Services/ExtractExcelService/QueryService.cs
+3
-3
performance/Performance.Services/RedistributionService.cs
+45
-10
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+2
-2
performance/Performance.Services/SecondAllotService.cs
+14
-28
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
485f2a78
...
@@ -163,6 +163,11 @@
...
@@ -163,6 +163,11 @@
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateAccomplish"
>
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateAccomplish"
>
<summary>
绩效结果解析成功
</summary>
<summary>
绩效结果解析成功
</summary>
</member>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.PreAccountingReward"
>
<summary>
核算前奖励
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.SingleAwards"
>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.SingleAwards"
>
<summary>
<summary>
单项奖励
单项奖励
...
@@ -2562,7 +2567,7 @@
...
@@ -2562,7 +2567,7 @@
自定义工作量类型Id(不包括默认工作量绩效类型、单项奖励)
自定义工作量类型Id(不包括默认工作量绩效类型、单项奖励)
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.WorkloadRequest.
IsSingleAwards
"
>
<member
name=
"P:Performance.DtoModels.WorkloadRequest.
AgWorkloadType
"
>
<summary>
<summary>
是否是单项奖励
是否是单项奖励
</summary>
</summary>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
485f2a78
...
@@ -497,6 +497,11 @@
...
@@ -497,6 +497,11 @@
科室单项奖励
科室单项奖励
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.PreDeptReward"
>
<summary>
科室考核前奖励
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.BasisPerformance"
>
<member
name=
"P:Performance.EntityModels.ag_bodysource.BasisPerformance"
>
<summary>
<summary>
主任基础绩效
主任基础绩效
...
@@ -887,6 +892,11 @@
...
@@ -887,6 +892,11 @@
科室单项奖励
科室单项奖励
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_headsource.TotalPreAccountingReward"
>
<summary>
科室考核前奖励
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance"
>
<member
name=
"P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance"
>
<summary>
<summary>
年资职称绩效占比
年资职称绩效占比
...
@@ -2587,6 +2597,11 @@
...
@@ -2587,6 +2597,11 @@
来源
来源
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ex_result.TypeId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ex_result.DatabaseType"
>
<member
name=
"P:Performance.EntityModels.ex_result.DatabaseType"
>
<summary>
<summary>
数据库类型1、Sql Server 2、Orcale
数据库类型1、Sql Server 2、Orcale
...
@@ -2622,11 +2637,6 @@
...
@@ -2622,11 +2637,6 @@
执行sql
执行sql
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ex_script.DatabaseType"
>
<summary>
数据库类型1、Sql Server 2、Orcale
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ex_script.TypeId"
>
<member
name=
"P:Performance.EntityModels.ex_script.TypeId"
>
<summary>
<summary>
ExTypeId
ExTypeId
...
...
performance/Performance.DtoModels/Enum.cs
View file @
485f2a78
...
@@ -85,6 +85,10 @@ public enum AllotStates
...
@@ -85,6 +85,10 @@ public enum AllotStates
public
enum
AgWorkloadType
public
enum
AgWorkloadType
{
{
/// <summary>
/// <summary>
/// 核算前奖励
/// </summary>
PreAccountingReward
=
-
2
,
/// <summary>
/// 单项奖励
/// 单项奖励
/// </summary>
/// </summary>
SingleAwards
=
-
1
,
SingleAwards
=
-
1
,
...
...
performance/Performance.DtoModels/Request/WorkloadRequest.cs
View file @
485f2a78
...
@@ -50,7 +50,7 @@ public class WorkloadRequest
...
@@ -50,7 +50,7 @@ public class WorkloadRequest
/// <summary>
/// <summary>
/// 是否是单项奖励
/// 是否是单项奖励
/// </summary>
/// </summary>
public
bool
IsSingleAwards
{
get
;
set
;
}
public
AgWorkloadType
AgWorkloadType
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 工作量带出HIS来源
/// 工作量带出HIS来源
...
...
performance/Performance.EntityModels/Entity/ag_bodysource.cs
View file @
485f2a78
...
@@ -112,6 +112,11 @@ public class ag_bodysource
...
@@ -112,6 +112,11 @@ public class ag_bodysource
public
Nullable
<
decimal
>
DeptReward
{
get
;
set
;
}
public
Nullable
<
decimal
>
DeptReward
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 科室考核前奖励
/// </summary>
public
Nullable
<
decimal
>
PreDeptReward
{
get
;
set
;
}
/// <summary>
/// 主任基础绩效
/// 主任基础绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
BasisPerformance
{
get
;
set
;
}
public
Nullable
<
decimal
>
BasisPerformance
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/ag_headsource.cs
View file @
485f2a78
...
@@ -61,6 +61,11 @@ public class ag_headsource
...
@@ -61,6 +61,11 @@ public class ag_headsource
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
TotalDeptReward
{
get
;
set
;
}
public
Nullable
<
decimal
>
TotalDeptReward
{
get
;
set
;
}
/// <summary>
/// 科室考核前奖励
/// </summary>
public
Nullable
<
decimal
>
TotalPreAccountingReward
{
get
;
set
;
}
///// <summary>
///// <summary>
///// 业绩分配绩效总额
///// 业绩分配绩效总额
///// </summary>
///// </summary>
...
...
performance/Performance.EntityModels/Entity/ex_result.cs
View file @
485f2a78
...
@@ -57,6 +57,11 @@ public class ex_result
...
@@ -57,6 +57,11 @@ public class ex_result
public
string
Source
{
get
;
set
;
}
public
string
Source
{
get
;
set
;
}
/// <summary>
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
TypeId
{
get
;
set
;
}
/// <summary>
/// 数据库类型1、Sql Server 2、Orcale
/// 数据库类型1、Sql Server 2、Orcale
/// </summary>
/// </summary>
public
int
DatabaseType
{
get
;
set
;
}
public
int
DatabaseType
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/ex_script.cs
View file @
485f2a78
...
@@ -26,11 +26,6 @@ public class ex_script
...
@@ -26,11 +26,6 @@ public class ex_script
public
string
ExecScript
{
get
;
set
;
}
public
string
ExecScript
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 数据库类型1、Sql Server 2、Orcale
/// </summary>
public
int
DatabaseType
{
get
;
set
;
}
/// <summary>
/// ExTypeId
/// ExTypeId
/// </summary>
/// </summary>
public
int
TypeId
{
get
;
set
;
}
public
int
TypeId
{
get
;
set
;
}
...
...
performance/Performance.Services/ExtractExcelService/QueryService.cs
View file @
485f2a78
...
@@ -198,13 +198,13 @@ private List<ex_result> ExtractModuleData(per_allot allot, string groupName, boo
...
@@ -198,13 +198,13 @@ private List<ex_result> ExtractModuleData(per_allot allot, string groupName, boo
foreach
(
var
script
in
scripts
.
Where
(
t
=>
t
.
TypeId
==
typeId
))
foreach
(
var
script
in
scripts
.
Where
(
t
=>
t
.
TypeId
==
typeId
))
{
{
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
)
??
configs
.
FirstOrDefault
(
t
=>
t
.
DataBaseType
==
script
.
DatabaseType
)
;
var
config
=
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
script
.
ConfigId
);
if
(
config
==
null
)
continue
;
if
(
config
==
null
)
continue
;
try
try
{
{
if
(!
pools
.
ContainsKey
(
config
.
Id
))
if
(!
pools
.
ContainsKey
(
config
.
Id
))
pools
.
Add
(
config
.
Id
,
ConnectionBuilder
.
Create
((
DatabaseType
)
config
.
DataBaseType
,
config
.
DbSource
,
config
.
DbName
,
config
.
DbUser
,
config
.
DbPassword
));
pools
.
Add
(
config
.
Id
,
ConnectionBuilder
.
Create
((
DatabaseType
)
config
.
DataBaseType
,
config
.
DbSource
,
config
.
DbName
,
config
.
DbUser
,
config
.
DbPassword
));
IDbConnection
connection
=
pools
[
config
.
Id
];
IDbConnection
connection
=
pools
[
config
.
Id
];
...
...
performance/Performance.Services/RedistributionService.cs
View file @
485f2a78
...
@@ -181,11 +181,12 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -181,11 +181,12 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new
SecondColumnDictionary
(
"职称绩效"
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"职称绩效"
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"工作量绩效合计"
,
nameof
(
ag_bodysource
.
WorkPerformance
),
true
,
399
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"工作量绩效合计"
,
nameof
(
ag_bodysource
.
WorkPerformance
),
true
,
399
),
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
new
SecondColumnDictionary
(
"考核前奖励合计"
,
nameof
(
ag_bodysource
.
PreDeptReward
),
true
,
599
),
new
SecondColumnDictionary
(
"可分配绩效"
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
500
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"可分配绩效"
,
nameof
(
ag_bodysource
.
DistPerformance
),
true
,
600
),
new
SecondColumnDictionary
(
"医院发放夜班绩效"
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
502
,
isNumber
:
true
),
new
SecondColumnDictionary
(
"医院发放夜班绩效"
,
nameof
(
ag_bodysource
.
NightWorkPerformance
),
true
,
602
),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
//new SecondColumnDictionary("预留比例",nameof(ag_bodysource.ReservedRatio),false,601 ),
//new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ),
//new SecondColumnDictionary("预留金额",nameof(ag_bodysource.ReservedAmount),false,602 ),
...
@@ -216,7 +217,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -216,7 +217,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
int
workloadSort
=
300
;
int
workloadSort
=
300
;
var
index
=
0
;
var
index
=
0
;
foreach
(
var
item
in
loads
.
Where
(
w
=>
!
w
.
Title
.
StartsWithIgnoreCase
(
"SingleAwards_"
)))
foreach
(
var
item
in
loads
.
Where
(
w
=>
!
w
.
Title
.
StartsWithIgnoreCase
(
"SingleAwards_"
)
&&
!
w
.
Title
.
StartsWithIgnoreCase
(
"PreAccountingReward_"
)
))
{
{
if
(
workloadGroups
.
Any
(
w
=>
w
.
Items
!=
null
&&
w
.
Items
.
Any
(
im
=>
im
.
EqualsIgnoreCase
(
item
.
Title
))))
if
(
workloadGroups
.
Any
(
w
=>
w
.
Items
!=
null
&&
w
.
Items
.
Any
(
im
=>
im
.
EqualsIgnoreCase
(
item
.
Title
))))
index
=
workloadGroups
.
FindIndex
(
w
=>
w
.
Items
!=
null
&&
w
.
Items
.
Any
(
im
=>
im
.
EqualsIgnoreCase
(
item
.
Title
)));
index
=
workloadGroups
.
FindIndex
(
w
=>
w
.
Items
!=
null
&&
w
.
Items
.
Any
(
im
=>
im
.
EqualsIgnoreCase
(
item
.
Title
)));
...
@@ -259,6 +260,12 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
...
@@ -259,6 +260,12 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
{
{
maps
.
Add
(
new
SecondColumnDictionary
(
item
.
Value
,
item
.
Title
,
false
,
++
singleAwardsSort
,
type
:
"SingleAwards"
,
color
:
"singleawards_color"
,
isNumber
:
true
));
maps
.
Add
(
new
SecondColumnDictionary
(
item
.
Value
,
item
.
Title
,
false
,
++
singleAwardsSort
,
type
:
"SingleAwards"
,
color
:
"singleawards_color"
,
isNumber
:
true
));
}
}
// 核算前奖励
int
preAccountingRewardSort
=
500
;
foreach
(
var
item
in
loads
.
Where
(
w
=>
w
.
Title
.
StartsWithIgnoreCase
(
"PreAccountingReward_"
)))
{
maps
.
Add
(
new
SecondColumnDictionary
(
item
.
Value
,
item
.
Title
,
false
,
++
preAccountingRewardSort
,
type
:
"PreAccountingReward"
,
color
:
"preaccountingreward_color"
));
}
return
maps
.
OrderBy
(
w
=>
w
.
Sort
).
ToList
();
return
maps
.
OrderBy
(
w
=>
w
.
Sort
).
ToList
();
}
}
...
@@ -415,7 +422,8 @@ public void ClearInvalidValue(List<Dictionary<string, object>> datas)
...
@@ -415,7 +422,8 @@ public void ClearInvalidValue(List<Dictionary<string, object>> datas)
foreach
(
var
key
in
row
.
Keys
.
ToArray
())
foreach
(
var
key
in
row
.
Keys
.
ToArray
())
{
{
if
(
key
.
StartsWithIgnoreCase
(
"SingleAwards_"
)
if
(
key
.
StartsWithIgnoreCase
(
"SingleAwards_"
)
||
key
.
StartsWithIgnoreCase
(
"Workload_"
))
||
key
.
StartsWithIgnoreCase
(
"Workload_"
)
||
key
.
StartsWithIgnoreCase
(
"PreAccountingReward_"
))
{
{
var
value
=
row
[
key
]?.
ToString
()
??
""
;
var
value
=
row
[
key
]?.
ToString
()
??
""
;
if
(
value
==
"0"
||
Regex
.
IsMatch
(
value
,
"^0.[0]+$"
))
if
(
value
==
"0"
||
Regex
.
IsMatch
(
value
,
"^0.[0]+$"
))
...
@@ -637,6 +645,12 @@ private List<string> LoadEmployees_OfficeExcel(ag_secondallot second)
...
@@ -637,6 +645,12 @@ private List<string> LoadEmployees_OfficeExcel(ag_secondallot second)
colHeaderCustoms
.
Add
(
awards
.
Value
);
colHeaderCustoms
.
Add
(
awards
.
Value
);
columnCustoms
.
Add
(
new
HandsonColumn
(
awards
.
Title
.
ToLower
(),
format
:
DataFormat
.
小数
));
columnCustoms
.
Add
(
new
HandsonColumn
(
awards
.
Title
.
ToLower
(),
format
:
DataFormat
.
小数
));
}
}
// 考核前奖励
foreach
(
var
reward
in
loads
.
Where
(
w
=>
w
.
Title
.
StartsWithIgnoreCase
(
"PreAccountingReward_"
)))
{
colHeaderCustoms
.
Add
(
reward
.
Value
);
columnCustoms
.
Add
(
new
HandsonColumn
(
reward
.
Title
.
ToLower
(),
format
:
DataFormat
.
小数
));
}
return
(
colHeaderCustoms
,
columnCustoms
);
return
(
colHeaderCustoms
,
columnCustoms
);
}
}
...
@@ -836,6 +850,8 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
...
@@ -836,6 +850,8 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
clearPerformanceWorkload
(
rows
,
workloadGroups
);
clearPerformanceWorkload
(
rows
,
workloadGroups
);
// 行内计算单项奖励
// 行内计算单项奖励
deptRewardCalculate
(
rows
);
deptRewardCalculate
(
rows
);
// 行内计算考核前奖励
preDeptRewardCalculate
(
rows
);
// 行内可分配绩效
// 行内可分配绩效
distPerformanceCalculate
(
rows
);
distPerformanceCalculate
(
rows
);
// 行内实发绩效
// 行内实发绩效
...
@@ -845,6 +861,8 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
...
@@ -845,6 +861,8 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
{
{
// 行内计算单项奖励
// 行内计算单项奖励
deptRewardCalculate
(
rows
);
deptRewardCalculate
(
rows
);
// 行内计算考核前奖励
preDeptRewardCalculate
(
rows
);
// 计算顶部相关总和
// 计算顶部相关总和
overviewCalculate
(
head
,
rows
);
overviewCalculate
(
head
,
rows
);
// 行内主任基础绩效
// 行内主任基础绩效
...
@@ -916,6 +934,19 @@ private void deptRewardCalculate(List<Dictionary<string, object>> rows)
...
@@ -916,6 +934,19 @@ private void deptRewardCalculate(List<Dictionary<string, object>> rows)
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
DeptReward
),
GetDecimal2
(
total_deptReward
));
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
DeptReward
),
GetDecimal2
(
total_deptReward
));
}
}
}
}
/// <summary>
/// 行内计算核算前奖励
/// </summary>
/// <param name="rows"></param>
private
void
preDeptRewardCalculate
(
List
<
Dictionary
<
string
,
object
>>
rows
)
{
foreach
(
var
row
in
rows
)
{
decimal
total_deptReward
=
row
.
Where
(
w
=>
w
.
Key
.
StartsWithIgnoreCase
(
"PreAccountingReward_"
)).
Sum
(
r
=>
GetDecimal
(
row
,
r
.
Key
));
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
PreDeptReward
),
GetDecimal2
(
total_deptReward
));
}
}
/// <summary>
/// <summary>
/// 计算顶部工作量
/// 计算顶部工作量
/// </summary>
/// </summary>
...
@@ -949,8 +980,11 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary<
...
@@ -949,8 +980,11 @@ private void overviewCalculate(Dictionary<string, object> head, List<Dictionary<
//// 夜班工作量绩效总和
//// 夜班工作量绩效总和
//var nightShiftWorkPerforTotal = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.NightWorkPerformance)));
//var nightShiftWorkPerforTotal = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.NightWorkPerformance)));
//head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), nightShiftWorkPerforTotal);
//head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), nightShiftWorkPerforTotal);
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏)
// 科室考核前奖励
var
totalPerformance
=
GetDecimal2
(
head
,
nameof
(
ag_headsource
.
TotalDistPerformance
))
-
GetDecimal2
(
head
,
nameof
(
ag_headsource
.
NightShiftWorkPerforTotal
));
var
totalPreAccountingReward
=
rows
.
Sum
(
row
=>
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
PreDeptReward
)));
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalPreAccountingReward
),
totalPreAccountingReward
);
// 可分配绩效(顶栏) = 科室总绩效 - 夜班绩效(顶栏) - 科室考核前奖励
var
totalPerformance
=
GetDecimal2
(
head
,
nameof
(
ag_headsource
.
TotalDistPerformance
))
-
GetDecimal2
(
head
,
nameof
(
ag_headsource
.
NightShiftWorkPerforTotal
))
-
totalPreAccountingReward
;
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalPerformance
),
totalPerformance
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
TotalPerformance
),
totalPerformance
);
//// 医院其他绩效总和
//// 医院其他绩效总和
//var otherPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.OtherPerformance)));
//var otherPerformance = rows.Sum(row => GetDecimal2(row, nameof(ag_bodysource.OtherPerformance)));
...
@@ -1170,9 +1204,10 @@ private void distPerformanceCalculate(List<Dictionary<string, object>> rows)
...
@@ -1170,9 +1204,10 @@ private void distPerformanceCalculate(List<Dictionary<string, object>> rows)
var
workPerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
WorkPerformance
));
var
workPerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
WorkPerformance
));
var
titlePerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
TitlePerformance
));
var
titlePerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
TitlePerformance
));
var
deptReward
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DeptReward
));
var
deptReward
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
DeptReward
));
var
preDeptReward
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
PreDeptReward
));
var
basisPerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
BasisPerformance
));
var
basisPerformance
=
GetDecimal2
(
row
,
nameof
(
ag_bodysource
.
BasisPerformance
));
// 可分配绩效 = 当前行职称绩效 + 工作量绩效工资 + 当前行单项奖励 + 当前行主任基础绩效 (科主任护士长)
// 可分配绩效 = 当前行职称绩效 + 工作量绩效工资 + 当前行单项奖励 + 当前行主任基础绩效 (科主任护士长)
- 考核前奖励
var
distPerformance
=
titlePerformance
+
workPerformance
+
deptReward
+
basisPerformance
;
var
distPerformance
=
titlePerformance
+
workPerformance
+
deptReward
+
basisPerformance
-
preDeptReward
;
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
DistPerformance
),
distPerformance
);
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
DistPerformance
),
distPerformance
);
}
}
}
}
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
485f2a78
...
@@ -584,7 +584,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
...
@@ -584,7 +584,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
var
workloads
=
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
second
.
UnitType
)?.
ToList
();
var
workloads
=
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
second
.
UnitType
)?.
ToList
();
if
(
workloads
==
null
||
!
workloads
.
Any
())
return
;
if
(
workloads
==
null
||
!
workloads
.
Any
())
return
;
string
[]
prefix
=
new
string
[]
{
"WorkloadScore_"
,
"AssessmentScore_"
,
"WorkPerformance_"
,
$"
{
AgWorkloadType
.
SingleAwards
}
_"
,
$"
{
AgWorkloadType
.
Workload
}
_"
};
string
[]
prefix
=
new
string
[]
{
"WorkloadScore_"
,
"AssessmentScore_"
,
"WorkPerformance_"
,
$"
{
AgWorkloadType
.
SingleAwards
}
_"
,
$"
{
AgWorkloadType
.
Workload
}
_"
,
$"
{
AgWorkloadType
.
PreAccountingReward
}
_"
};
List
<
ag_workload_source
>
workloadSources
=
new
List
<
ag_workload_source
>();
List
<
ag_workload_source
>
workloadSources
=
new
List
<
ag_workload_source
>();
foreach
(
var
rowitem
in
body
)
foreach
(
var
rowitem
in
body
)
{
{
...
@@ -595,7 +595,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
...
@@ -595,7 +595,7 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
if
(!
result
)
continue
;
if
(!
result
)
continue
;
Dictionary
<
string
,
object
>
dict
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
object
>>(
JsonHelper
.
Serialize
(
rowitem
));
Dictionary
<
string
,
object
>
dict
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
object
>>(
JsonHelper
.
Serialize
(
rowitem
));
var
keys
=
dict
.
Keys
.
Where
(
t
=>
t
.
StartsWithIgnoreCase
(
prefix
[
0
])
||
t
.
StartsWithIgnoreCase
(
prefix
[
1
])
||
t
.
StartsWithIgnoreCase
(
prefix
[
2
])
||
t
.
StartsWithIgnoreCase
(
prefix
[
3
])
||
t
.
StartsWithIgnoreCase
(
prefix
[
4
]
));
var
keys
=
dict
.
Keys
.
Where
(
t
=>
prefix
.
Any
(
w
=>
t
.
StartsWithIgnoreCase
(
w
)
));
if
(
keys
==
null
||
!
keys
.
Any
())
continue
;
if
(
keys
==
null
||
!
keys
.
Any
())
continue
;
foreach
(
var
key
in
keys
)
foreach
(
var
key
in
keys
)
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
485f2a78
...
@@ -1363,15 +1363,7 @@ public List<ag_workload> GetWorkloadList(WorkloadRequest request)
...
@@ -1363,15 +1363,7 @@ public List<ag_workload> GetWorkloadList(WorkloadRequest request)
/// <returns></returns>
/// <returns></returns>
public
bool
WorkloadAdd
(
WorkloadRequest
request
)
public
bool
WorkloadAdd
(
WorkloadRequest
request
)
{
{
Expression
<
Func
<
ag_workload
,
bool
>>
exp
=
(
t
)
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
;
Expression
<
Func
<
ag_workload
,
bool
>>
exp
=
(
t
)
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
ItemId
.
StartsWith
(
$"
{
request
.
AgWorkloadType
}
_"
);
if
(
request
.
IsSingleAwards
)
{
exp
=
exp
.
And
(
t
=>
t
.
ItemId
.
StartsWith
(
AgWorkloadType
.
SingleAwards
.
ToString
()));
}
else
{
exp
=
exp
.
And
(
t
=>
t
.
ItemId
.
StartsWith
(
$"
{
AgWorkloadType
.
Workload
}
_"
));
}
var
workloadList
=
agworkloadRepository
.
GetEntities
(
exp
);
var
workloadList
=
agworkloadRepository
.
GetEntities
(
exp
);
if
(
workloadList
!=
null
&&
workloadList
.
Any
(
t
=>
t
.
ItemName
==
request
.
ItemName
))
if
(
workloadList
!=
null
&&
workloadList
.
Any
(
t
=>
t
.
ItemName
==
request
.
ItemName
))
throw
new
PerformanceException
(
"项目名称重复"
);
throw
new
PerformanceException
(
"项目名称重复"
);
...
@@ -1384,12 +1376,12 @@ public bool WorkloadAdd(WorkloadRequest request)
...
@@ -1384,12 +1376,12 @@ public bool WorkloadAdd(WorkloadRequest request)
ItemName
=
request
.
ItemName
,
ItemName
=
request
.
ItemName
,
Sort
=
request
.
Sort
??
1
,
Sort
=
request
.
Sort
??
1
,
SourceCategory
=
request
.
SourceCategory
,
SourceCategory
=
request
.
SourceCategory
,
WorkTypeId
=
request
.
IsSingleAwards
?
(
int
)
AgWorkloadType
.
SingleAwards
:
request
.
WorkTypeId
WorkTypeId
=
request
.
AgWorkloadType
==
AgWorkloadType
.
Workload
?
request
.
WorkTypeId
:
(
int
)
request
.
AgWorkloadType
};
};
var
result
=
agworkloadRepository
.
Add
(
workload
);
var
result
=
agworkloadRepository
.
Add
(
workload
);
if
(
result
)
if
(
result
)
{
{
workload
.
ItemId
=
getWorkloadItemId
.
Invoke
(
request
.
IsSingleAwards
,
request
.
WorkTypeId
,
workload
.
Id
);
workload
.
ItemId
=
getWorkloadItemId
.
Invoke
(
request
.
AgWorkloadType
,
request
.
WorkTypeId
,
workload
.
Id
);
agworkloadRepository
.
Update
(
workload
);
agworkloadRepository
.
Update
(
workload
);
}
}
...
@@ -1403,15 +1395,7 @@ public bool WorkloadAdd(WorkloadRequest request)
...
@@ -1403,15 +1395,7 @@ public bool WorkloadAdd(WorkloadRequest request)
/// <returns></returns>
/// <returns></returns>
public
bool
WorkloadUpdate
(
WorkloadRequest
request
)
public
bool
WorkloadUpdate
(
WorkloadRequest
request
)
{
{
Expression
<
Func
<
ag_workload
,
bool
>>
exp
=
(
t
)
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
;
Expression
<
Func
<
ag_workload
,
bool
>>
exp
=
(
t
)
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
ItemId
.
StartsWith
(
$"
{
request
.
AgWorkloadType
}
_"
);
if
(
request
.
IsSingleAwards
)
{
exp
=
exp
.
And
(
t
=>
t
.
ItemId
.
StartsWith
(
AgWorkloadType
.
SingleAwards
.
ToString
()));
}
else
{
exp
=
exp
.
And
(
t
=>
t
.
ItemId
.
StartsWith
(
$"
{
AgWorkloadType
.
Workload
}
_"
));
}
var
workloadList
=
agworkloadRepository
.
GetEntities
(
exp
);
var
workloadList
=
agworkloadRepository
.
GetEntities
(
exp
);
if
(
workloadList
!=
null
&&
workloadList
.
Any
(
t
=>
t
.
Id
!=
request
.
Id
&&
t
.
ItemName
==
request
.
ItemName
))
if
(
workloadList
!=
null
&&
workloadList
.
Any
(
t
=>
t
.
Id
!=
request
.
Id
&&
t
.
ItemName
==
request
.
ItemName
))
throw
new
PerformanceException
(
"项目名称重复"
);
throw
new
PerformanceException
(
"项目名称重复"
);
...
@@ -1424,8 +1408,8 @@ public bool WorkloadUpdate(WorkloadRequest request)
...
@@ -1424,8 +1408,8 @@ public bool WorkloadUpdate(WorkloadRequest request)
workload
.
ItemName
=
request
.
ItemName
;
workload
.
ItemName
=
request
.
ItemName
;
workload
.
SourceCategory
=
request
.
SourceCategory
;
workload
.
SourceCategory
=
request
.
SourceCategory
;
workload
.
Sort
=
request
.
Sort
;
workload
.
Sort
=
request
.
Sort
;
workload
.
ItemId
=
getWorkloadItemId
.
Invoke
(
request
.
IsSingleAwards
,
request
.
WorkTypeId
,
workload
.
Id
);
;
workload
.
ItemId
=
getWorkloadItemId
.
Invoke
(
request
.
AgWorkloadType
,
request
.
WorkTypeId
,
workload
.
Id
)
;
workload
.
WorkTypeId
=
request
.
IsSingleAwards
?
(
int
)
AgWorkloadType
.
SingleAwards
:
request
.
WorkTypeId
;
workload
.
WorkTypeId
=
request
.
AgWorkloadType
==
AgWorkloadType
.
Workload
?
request
.
WorkTypeId
:
(
int
)
request
.
AgWorkloadType
;
return
agworkloadRepository
.
Update
(
workload
);
return
agworkloadRepository
.
Update
(
workload
);
}
}
...
@@ -1433,19 +1417,21 @@ public bool WorkloadUpdate(WorkloadRequest request)
...
@@ -1433,19 +1417,21 @@ public bool WorkloadUpdate(WorkloadRequest request)
/// <summary>
/// <summary>
/// 获取工作量绩效配置的ItemId
/// 获取工作量绩效配置的ItemId
/// </summary>
/// </summary>
readonly
Func
<
bool
,
int
,
int
,
string
>
getWorkloadItemId
=
(
isSingleAwards
,
workTypeId
,
workloadId
)
=>
readonly
Func
<
AgWorkloadType
,
int
,
int
,
string
>
getWorkloadItemId
=
(
agWorkloadType
,
workTypeId
,
workloadId
)
=>
{
{
/**
/**
* 单项奖励 - SingleAwards_WorkloadId
* 单项奖励 - SingleAwards_WorkloadId
* 默认工作量类型WorkTypeId=0 - Workload_Default_WorkloadId
* 默认工作量类型WorkTypeId=0 - Workload_Default_WorkloadId
* 自定义工作量类型WorkTypeId>0 - Workload_WorkTypeId_WorkloadId
* 自定义工作量类型WorkTypeId>0 - Workload_WorkTypeId_WorkloadId
*/
*/
if
(
isSingleAwards
)
if
(
agWorkloadType
==
AgWorkloadType
.
Workload
)
return
$"
{
AgWorkloadType
.
SingleAwards
}
_
{
workloadId
}
"
;
else
{
{
return
workTypeId
==
(
int
)
AgWorkloadType
.
Workload
?
$"
{
AgWorkloadType
.
Workload
}
_Default_
{
workloadId
}
"
return
workTypeId
==
(
int
)
AgWorkloadType
.
Workload
?
$"
{
AgWorkloadType
.
Workload
}
_Default_
{
workloadId
}
"
:
$"
{
AgWorkloadType
.
Workload
}
_
{
workTypeId
}
_
{
workloadId
}
"
;
:
$"
{
AgWorkloadType
.
Workload
}
_
{
workTypeId
}
_
{
workloadId
}
"
;
}
else
{
return
$"
{
agWorkloadType
}
_
{
workloadId
}
"
;
}
}
};
};
...
@@ -1483,7 +1469,7 @@ public bool WorkloadDelete(int id)
...
@@ -1483,7 +1469,7 @@ public bool WorkloadDelete(int id)
public
List
<
ag_workload
>
GetSingleList
(
WorkloadRequest
request
)
public
List
<
ag_workload
>
GetSingleList
(
WorkloadRequest
request
)
{
{
return
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
return
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
ItemId
.
StartsWith
(
AgWorkloadType
.
SingleAwards
.
ToString
()));
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
ItemId
.
StartsWith
(
request
.
AgWorkloadType
.
ToString
()));
}
}
//public (string, string) GetDeptAndUnit(int userId)
//public (string, string) GetDeptAndUnit(int userId)
...
...
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