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
7838c234
Commit
7838c234
authored
Sep 20, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
共用核算单元调整
parent
0abed487
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
17 deletions
+54
-17
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
+1
-0
performance/Performance.EntityModels/Entity/res_compute.cs
+5
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+30
-15
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+13
-2
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
7838c234
...
@@ -2367,6 +2367,11 @@
...
@@ -2367,6 +2367,11 @@
变更日志
变更日志
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.res_compute.Remark"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_specialunit"
>
<member
name=
"T:Performance.EntityModels.res_specialunit"
>
<summary>
<summary>
...
...
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
View file @
7838c234
...
@@ -126,6 +126,7 @@ public class ComputeResult
...
@@ -126,6 +126,7 @@ public class ComputeResult
public
decimal
?
Adjust
{
get
;
set
;
}
public
decimal
?
Adjust
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
///// <summary>
///// <summary>
///// 工作量绩效
///// 工作量绩效
...
...
performance/Performance.EntityModels/Entity/res_compute.cs
View file @
7838c234
...
@@ -160,5 +160,10 @@ public class res_compute
...
@@ -160,5 +160,10 @@ public class res_compute
/// 变更日志
/// 变更日志
/// </summary>
/// </summary>
public
string
ChangeLog
{
get
;
set
;
}
public
string
ChangeLog
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
7838c234
...
@@ -293,30 +293,45 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
...
@@ -293,30 +293,45 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
}
var
multi
=
atDataList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
})
var
multi
=
atDataList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
})
.
Select
(
t
=>
new
.
Select
(
t
=>
new
{
t
.
Key
.
UnitType
,
t
.
Key
.
AccountingUnit
,
Count
=
t
.
Count
(),
})
{
.
Where
(
t
=>
t
.
Count
>
1
);
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Count
=
t
.
Count
(),
RealGiveFee
=
t
.
Sum
(
p
=>
p
.
RealGiveFee
),
PerforTotal
=
t
.
Sum
(
p
=>
p
.
PerforTotal
),
Avg
=
t
.
Sum
(
p
=>
p
.
ManagerNumber
+
p
.
Number
)
==
0
?
0
:
t
.
Sum
(
p
=>
p
.
RealGiveFee
)
/
t
.
Sum
(
p
=>
p
.
ManagerNumber
+
p
.
Number
)
})
.
Where
(
t
=>
t
.
Count
>
1
).
ToArray
();
if
(
multi
!=
null
&&
multi
.
Any
())
if
(
multi
!=
null
&&
multi
.
Any
())
{
{
foreach
(
var
item
in
atDataList
)
foreach
(
var
item
in
atDataList
)
{
{
if
(
multi
.
Any
(
group
=>
group
.
UnitType
==
item
.
UnitType
&&
group
.
AccountingUnit
==
item
.
AccountingUnit
))
if
(
multi
.
Any
(
group
=>
group
.
UnitType
==
item
.
UnitType
&&
group
.
AccountingUnit
==
item
.
AccountingUnit
))
{
item
.
Avg
=
multi
.
FirstOrDefault
(
group
=>
group
.
AccountingUnit
==
item
.
AccountingUnit
).
Avg
;
item
.
RealGiveFee
=
multi
.
FirstOrDefault
(
group
=>
group
.
AccountingUnit
==
item
.
AccountingUnit
).
RealGiveFee
;
item
.
PerforTotal
=
multi
.
FirstOrDefault
(
group
=>
group
.
AccountingUnit
==
item
.
AccountingUnit
).
PerforTotal
;
item
.
Remark
=
"特殊科室,共用核算单元"
;
item
.
Remark
=
"特殊科室,共用核算单元"
;
}
}
}
}
}
//共用核算单元算法调整20190920新都调整
//var multi = atDataList.GroupBy(t => new { t.UnitType, t.AccountingUnit })
// .Select(t => new
// {
// UnitType = t.Key.UnitType,
// AccountingUnit = t.Key.AccountingUnit,
// Count = t.Count(),
// RealGiveFee = t.Sum(p => p.RealGiveFee),
// PerforTotal = t.Sum(p => p.PerforTotal),
// Avg = t.Sum(p => p.ManagerNumber + p.Number) == 0 ? 0 : t.Sum(p => p.RealGiveFee) / t.Sum(p => p.ManagerNumber + p.Number)
// })
// .Where(t => t.Count > 1).ToArray();
//if (multi != null && multi.Any())
//{
// foreach (var item in atDataList)
// {
// if (multi.Any(group => group.UnitType == item.UnitType && group.AccountingUnit == item.AccountingUnit))
// {
// item.Avg = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).Avg;
// item.RealGiveFee = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).RealGiveFee;
// item.PerforTotal = multi.FirstOrDefault(group => group.AccountingUnit == item.AccountingUnit).PerforTotal;
// item.Remark = "特殊科室,共用核算单元";
// }
// }
//}
sheet
.
PerData
.
AddRange
(
atDataList
);
sheet
.
PerData
.
AddRange
(
atDataList
);
}
}
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
7838c234
...
@@ -151,6 +151,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -151,6 +151,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
{
{
dataList
.
AddRange
(
AutoMapper
.
Mapper
.
Map
<
List
<
res_account
>>(
account
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
)));
dataList
.
AddRange
(
AutoMapper
.
Mapper
.
Map
<
List
<
res_account
>>(
account
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
)));
}
}
var
multi
=
accountbasicList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
DoctorAccountingUnit
})
.
Select
(
t
=>
new
{
t
.
Key
.
UnitType
,
t
.
Key
.
DoctorAccountingUnit
,
Count
=
t
.
Count
(),
})
.
Where
(
t
=>
t
.
Count
>
1
);
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
foreach
(
var
accountbasic
in
accountbasicList
)
foreach
(
var
accountbasic
in
accountbasicList
)
{
{
...
@@ -158,11 +161,18 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -158,11 +161,18 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
// continue;
// continue;
if
(!
accountbasic
.
DoctorDirectorNumber
.
HasValue
||
accountbasic
.
DoctorDirectorNumber
.
Value
==
0
)
if
(!
accountbasic
.
DoctorDirectorNumber
.
HasValue
||
accountbasic
.
DoctorDirectorNumber
.
Value
==
0
)
continue
;
continue
;
//原不存在科主任则跳过科主任绩效计算20190920新都
//是否共用核算单元
var
isShare
=
multi
.
Any
(
group
=>
group
.
UnitType
==
accountbasic
.
UnitType
&&
group
.
DoctorAccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
if
(
isShare
&&
accountbasic
.
DoctorDirectorNumber
.
HasValue
&&
accountbasic
.
DoctorDirectorNumber
.
Value
<
1
&&
accountbasic
.
Department
!=
accountbasic
.
DoctorAccountingUnit
)
continue
;
//分别取出对应的 计算 人员 平均值等信息
//分别取出对应的 计算 人员 平均值等信息
var
resAccount
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
accountbasic
.
UnitType
&&
t
.
AccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
var
resAccount
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
accountbasic
.
UnitType
&&
t
.
AccountingUnit
==
accountbasic
.
DoctorAccountingUnit
);
var
number
=
resAccount
.
OrderByDescending
(
t
=>
t
.
ManagerNumber
).
Sum
(
t
=>
t
.
ManagerNumber
+
t
.
Number
);
var
number
=
resAccount
.
OrderByDescending
(
t
=>
t
.
ManagerNumber
).
Sum
(
t
=>
t
.
ManagerNumber
+
t
.
Number
);
var
perforTotal
=
resAccount
.
Max
(
t
=>
t
.
PerforTotal
);
var
perforTotal
=
resAccount
.
Sum
(
t
=>
t
.
PerforTotal
);
var
avg
=
resAccount
.
Max
(
t
=>
t
.
Avg
);
var
avg
=
resAccount
.
Average
(
t
=>
t
.
Avg
);
var
basicRule
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
(
UnitType
)
accountbasic
.
UnitType
);
var
basicRule
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
(
UnitType
)
accountbasic
.
UnitType
);
if
(
basicRule
==
null
)
continue
;
if
(
basicRule
==
null
)
continue
;
...
@@ -201,6 +211,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -201,6 +211,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Efficiency
=
avg
*
(
accountbasic
.
DoctorEffic
??
1
),
Efficiency
=
avg
*
(
accountbasic
.
DoctorEffic
??
1
),
Scale
=
perforTotal
*
(
accountbasic
.
DoctorScale
??
1
),
Scale
=
perforTotal
*
(
accountbasic
.
DoctorScale
??
1
),
Adjust
=
empolyee
.
Adjust
,
Adjust
=
empolyee
.
Adjust
,
Remark
=
isShare
?
"特殊科室主任,共用核算单元"
:
""
};
};
//应发管理绩效
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
accountbasic
.
DoctorGrant
;
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
accountbasic
.
DoctorGrant
;
...
...
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