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
b32a9070
Commit
b32a9070
authored
Jul 18, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://192.168.18.110:8880/zry/performance
into develop
parents
f4499c43
9fc2d5d3
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
175 additions
and
128 deletions
+175
-128
performance/Performance.DtoModels/PerExcel/ComputeEmployee.cs
+12
-12
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
+4
-4
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+10
-0
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
+8
-13
performance/Performance.EntityModels/Entity/im_accountbasic.cs
+11
-1
performance/Performance.Extract.Api/Properties/PublishProfiles/FolderProfile.pubxml
+20
-0
performance/Performance.Services/AllotCompute/BaiscNormService.cs
+21
-15
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+16
-11
performance/Performance.Services/ExtractService.cs
+3
-3
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+14
-8
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingt.cs
+5
-3
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+3
-3
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
+44
-51
No files found.
performance/Performance.DtoModels/PerExcel/ComputeEmployee.cs
View file @
b32a9070
...
...
@@ -66,15 +66,15 @@ public class ComputeEmployee
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数
/// </summary>
public
Nullable
<
int
>
PeopleNumber
{
get
;
set
;
}
///
//
<summary>
///
//
核算单元医生数
///
//
</summary>
//
public Nullable<int> PeopleNumber { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
Workload
{
get
;
set
;
}
///
//
<summary>
///
//
工作量绩效
///
//
</summary>
//
public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
...
...
@@ -91,9 +91,9 @@ public class ComputeEmployee
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 发放系数
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
///
//
<summary>
///
//
发放系数
///
//
</summary>
//
public Nullable<decimal> Grant { get; set; }
}
}
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
View file @
b32a9070
...
...
@@ -55,10 +55,10 @@ public class ComputeResult
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 发放系数(来自人员名单)
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
///
//
<summary>
///
//
发放系数(来自人员名单)
///
//
</summary>
//
public Nullable<decimal> Grant { get; set; }
/// <summary>
/// 应发管理绩效(需计算)
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
b32a9070
...
...
@@ -22,6 +22,11 @@ public class PerDataAccountBaisc : IPerData
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 科主任数量
/// </summary>
public
decimal
DirectorNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数量
/// </summary>
public
decimal
DoctorNumber
{
get
;
set
;
}
...
...
@@ -61,6 +66,11 @@ public class PerDataAccountBaisc : IPerData
public
decimal
DoctorAdjustFactor
{
get
;
set
;
}
/// <summary>
/// 护士长人数
/// </summary>
public
decimal
NurseHeadNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元护士数量
/// </summary>
public
decimal
NurseNumber
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
View file @
b32a9070
...
...
@@ -61,15 +61,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数
/// </summary>
public
Nullable
<
int
>
PeopleNumber
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
Workload
{
get
;
set
;
}
///// <summary>
///// 工作量绩效
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
...
...
@@ -86,10 +81,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 发放系数
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
///
//
<summary>
///
//
发放系数
///
//
</summary>
//
public Nullable<decimal> Grant { get; set; }
/// <summary>
/// 行号
...
...
performance/Performance.EntityModels/Entity/im_accountbasic.cs
View file @
b32a9070
...
...
@@ -47,6 +47,11 @@ public class im_accountbasic
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 科主任数量
/// </summary>
public
Nullable
<
decimal
>
DirectorNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数量
/// </summary>
public
Nullable
<
decimal
>
DoctorNumber
{
get
;
set
;
}
...
...
@@ -87,9 +92,14 @@ public class im_accountbasic
public
Nullable
<
decimal
>
DoctorAdjustFactor
{
get
;
set
;
}
/// <summary>
/// 护士长人数
/// </summary>
public
Nullable
<
decimal
>
NurseHeadNumber
{
get
;
set
;
}
/// <summary>
/// 护士人数
/// </summary>
public
Nullable
<
int
>
NurseNumber
{
get
;
set
;
}
public
Nullable
<
decimal
>
NurseNumber
{
get
;
set
;
}
/// <summary>
/// 护理基础系数
...
...
performance/Performance.Extract.Api/Properties/PublishProfiles/FolderProfile.pubxml
0 → 100644
View file @
b32a9070
<?xml version="1.0" encoding="utf-8"?>
<!--
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。
-->
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<WebPublishMethod>
FileSystem
</WebPublishMethod>
<PublishProvider>
FileSystem
</PublishProvider>
<LastUsedBuildConfiguration>
Release
</LastUsedBuildConfiguration>
<LastUsedPlatform>
Any CPU
</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish
/>
<LaunchSiteAfterPublish>
True
</LaunchSiteAfterPublish>
<ExcludeApp_Data>
False
</ExcludeApp_Data>
<ProjectGuid>
a7ae6d0f-7b11-4eef-9fea-a279001ea54d
</ProjectGuid>
<publishUrl>
bin\Release\netcoreapp2.2\publish\
</publishUrl>
<DeleteExistingFiles>
False
</DeleteExistingFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
performance/Performance.Services/AllotCompute/BaiscNormService.cs
View file @
b32a9070
...
...
@@ -19,22 +19,27 @@ public class BaiscNormService : IAutoInjection
/// </summary>
/// <param name="computes"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
ComputeAvg
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
ComputeResult
>
computes
,
List
<
im_employee
>
empolyeeList
)
public
List
<
res_baiscnorm
>
ComputeAvg
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
ComputeResult
>
computes
,
List
<
im_employee
>
empolyeeList
)
{
var
keyList
=
new
[]
{
//绩效基数平均值项目
new
{
type
=
AccountUnitType
.
临床科室
,
reference
=
PerforType
.
临床主任
},
new
{
type
=
AccountUnitType
.
临床科室
,
reference
=
PerforType
.
临床副主任
},
new
{
type
=
AccountUnitType
.
临床科室
,
reference
=
PerforType
.
护士长
},
new
{
type
=
AccountUnitType
.
医技科室
,
reference
=
PerforType
.
医技主任
},
new
{
type
=
AccountUnitType
.
医技科室
,
reference
=
PerforType
.
医技副主任
},
//new { type = AccountUnitType.临床科室, reference = PerforType.临床副主任 },
//new { type = AccountUnitType.医技科室, reference = PerforType.医技副主任 },
};
foreach
(
var
item
in
keyList
)
{
var
count
=
empolyeeList
.
Count
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
()
&&
t
.
FitPeople
==
EnumHelper
.
GetDescription
(
item
.
reference
)
);
if
(
count
>
0
)
var
accountingUnitList
=
empolyeeList
.
Where
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
()).
Select
(
t
=>
t
.
AccountingUnit
).
ToList
(
);
if
(
accountingUnitList
.
Any
()
)
{
var
count
=
(
item
.
reference
==
PerforType
.
护士长
)
?
accountbasicList
.
Where
(
t
=>
accountingUnitList
.
Contains
(
t
.
NurseAccountingUnit
)).
Sum
(
t
=>
t
.
NurseHeadNumber
)
:
accountbasicList
.
Where
(
t
=>
accountingUnitList
.
Contains
(
t
.
DoctorAccountingUnit
)).
Sum
(
t
=>
t
.
DirectorNumber
);
var
dataList
=
computes
.
Where
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
()
&&
t
.
FitPeople
==
EnumHelper
.
GetDescription
(
item
.
reference
));
var
baiscnorm
=
new
res_baiscnorm
{
...
...
@@ -113,7 +118,8 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
DocterNurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
PerSheet
>
list
)
public
List
<
res_baiscnorm
>
DocterNurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
list
,
List
<
im_employee
>
empolyeeList
)
{
// 护士
var
sheetNurse
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseAccount
);
...
...
@@ -135,21 +141,21 @@ public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormLis
baiscnormList
.
Add
(
baiscnormNurse
);
// 医生
var
accountingUnitList
=
empolyeeList
.
Where
(
t
=>
t
.
AccountType
==
AccountUnitType
.
临床科室
.
ToString
()).
Select
(
t
=>
t
.
AccountingUnit
).
ToList
();
var
count
=
accountbasicList
.
Where
(
t
=>
accountingUnitList
.
Contains
(
t
.
DoctorAccountingUnit
)).
Sum
(
t
=>
t
.
DoctorNumber
+
t
.
DirectorNumber
);
var
sheetDocter
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorAccount
);
var
perdataDocter
=
sheetDocter
.
PerData
.
Select
(
t
=>
(
PerDataAccountDoctor
)
t
);
perdataDocter
=
perdataDocter
.
GroupBy
(
t
=>
t
.
AccountingUnit
)
.
Select
(
t
=>
new
PerDataAccountDoctor
{
AccountingUnit
=
t
.
Key
,
Number
=
t
.
Sum
(
p
=>
p
.
Number
),
PerforTotal
=
t
.
Max
(
p
=>
p
.
PerforTotal
)
});
//剔除不同科室相同核算单元
perdataDocter
=
perdataDocter
.
Where
(
t
=>
accountingUnitList
.
Contains
(
t
.
AccountingUnit
)).
GroupBy
(
t
=>
t
.
AccountingUnit
)
.
Select
(
t
=>
new
PerDataAccountDoctor
{
AccountingUnit
=
t
.
Key
,
PerforTotal
=
t
.
Max
(
p
=>
p
.
PerforTotal
)
});
var
baiscnormDocter
=
new
res_baiscnorm
{
PositionName
=
EnumHelper
.
GetDescription
(
PerforType
.
临床医生
),
TotelNumber
=
perdataDocter
.
Sum
(
t
=>
t
.
Number
)
,
TotelNumber
=
count
,
TotelValue
=
perdataDocter
.
Sum
(
t
=>
t
.
PerforTotal
),
AvgValue
=
perdataDocter
.
Sum
(
t
=>
t
.
PerforTotal
)
/
perdataDocter
.
Sum
(
t
=>
t
.
Number
)
AvgValue
=
perdataDocter
.
Sum
(
t
=>
t
.
PerforTotal
)
/
count
};
baiscnormList
.
Add
(
baiscnormDocter
);
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
b32a9070
...
...
@@ -253,7 +253,7 @@ private PerSheet ComputeDoctor(IEnumerable<PerDataAccountBaisc> dataList, List<P
{
AccountingUnit
=
dept
.
DoctorAccountingUnit
,
Department
=
dept
.
Department
,
Number
=
dept
.
DoctorNumber
,
Number
=
dept
.
DoctorNumber
+
dept
.
DirectorNumber
,
BasicFactor
=
dept
.
DoctorBasicFactor
,
SlopeFactor
=
dept
.
DoctorSlopeFactor
,
OtherPerfor1
=
dept
.
DoctorOtherPerfor1
,
...
...
@@ -264,7 +264,7 @@ private PerSheet ComputeDoctor(IEnumerable<PerDataAccountBaisc> dataList, List<P
Income
=
econDoctor
?.
CellValue
??
0
,
WorkloadFee
=
workDoctor
?.
CellValue
??
0
,
};
doctor
.
PerforFee
=
doctor
.
Income
*
(
doctor
.
BasicFactor
+
(
doctor
.
BasicFactor
*
doctor
.
SlopeFactor
)
);
doctor
.
PerforFee
=
doctor
.
Income
*
(
doctor
.
BasicFactor
+
doctor
.
SlopeFactor
);
doctor
.
PerforTotal
=
doctor
.
PerforFee
+
doctor
.
WorkloadFee
+
doctor
.
OtherPerfor1
;
doctor
.
RealGiveFee
=
(
doctor
.
PerforTotal
*
doctor
.
ScoringAverage
+
doctor
.
Extra
+
doctor
.
OtherPerfor2
)
*
doctor
.
AdjustFactor
;
doctor
.
Avg
=
doctor
.
Number
==
0
?
0
:
doctor
.
PerforTotal
/
doctor
.
Number
;
...
...
@@ -321,7 +321,7 @@ private PerSheet ComputeNurse(IEnumerable<PerDataAccountBaisc> dataList, List<Pe
{
AccountingUnit
=
dept
.
NurseAccountingUnit
,
Department
=
dept
.
Department
,
Number
=
dept
.
NurseNumber
,
Number
=
dept
.
NurseNumber
+
dept
.
NurseHeadNumber
,
BasicFactor
=
dept
.
NurseBasicFactor
,
SlopeFactor
=
dept
.
NurseSlopeFactor
,
OtherPerfor1
=
dept
.
NurseOtherPerfor1
,
...
...
@@ -332,7 +332,7 @@ private PerSheet ComputeNurse(IEnumerable<PerDataAccountBaisc> dataList, List<Pe
Income
=
econNurse
?.
CellValue
??
0
,
WorkloadFee
=
workNurse
?.
CellValue
??
0
,
};
nurse
.
PerforFee
=
nurse
.
Income
*
(
nurse
.
BasicFactor
+
(
nurse
.
BasicFactor
*
nurse
.
SlopeFactor
)
);
nurse
.
PerforFee
=
nurse
.
Income
*
(
nurse
.
BasicFactor
+
nurse
.
SlopeFactor
);
nurse
.
PerforTotal
=
nurse
.
PerforFee
+
nurse
.
WorkloadFee
+
nurse
.
OtherPerfor1
;
nurse
.
RealGiveFee
=
(
nurse
.
PerforTotal
*
nurse
.
ScoringAverage
+
nurse
.
Extra
+
nurse
.
OtherPerfor2
)
*
nurse
.
AdjustFactor
;
nurse
.
Avg
=
nurse
.
Number
==
0
?
0
:
nurse
.
PerforTotal
/
nurse
.
Number
;
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
b32a9070
...
...
@@ -15,17 +15,20 @@ namespace Performance.Services.AllotCompute
/// </summary>
public
class
ResultComputeService
:
IAutoInjection
{
private
BaiscNormService
baiscNormService
;
private
ComputeDirector
computeDirector
;
private
PerforImemployeeRepository
perforImEmployeeRepository
;
private
PerforRescomputeRepository
perforRescomputeRepository
;
private
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
PerforResspecialunitRepository
perforResspecialunitRepository
;
private
readonly
BaiscNormService
baiscNormService
;
private
readonly
ComputeDirector
computeDirector
;
private
readonly
PerforImemployeeRepository
perforImEmployeeRepository
;
private
readonly
PerforRescomputeRepository
perforRescomputeRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
readonly
PerforResspecialunitRepository
perforResspecialunitRepository
;
private
readonly
PerforImaccountbasicRepository
perforImaccountbasicRepository
;
public
ResultComputeService
(
PerforImemployeeRepository
perforImEmployeeRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforImaccountbasicRepository
perforImaccountbasicRepository
,
BaiscNormService
baiscNormService
,
ComputeDirector
computeDirector
)
{
this
.
baiscNormService
=
baiscNormService
;
...
...
@@ -34,6 +37,7 @@ public class ResultComputeService : IAutoInjection
this
.
perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
}
/// <summary>
...
...
@@ -44,14 +48,15 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
{
//取出人员信息
var
empolyeeList
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
accountbasicList
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
allot
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
a
ccountbasicList
,
a
llot
);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
baiscNormService
.
ComputeAvg
(
baiscnormList
,
computResult
,
empolyeeList
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
perSheets
);
baiscNormService
.
ComputeAvg
(
baiscnormList
,
accountbasicList
,
computResult
,
empolyeeList
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
accountbasicList
,
perSheets
,
empolyeeList
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
//计算 行政人员 平均值
...
...
@@ -148,8 +153,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
Punishment
=
group
.
Punishment
,
Adjust
=
group
.
Adjust
==
0
?
1
:
group
.
Adjust
,
};
res
.
GiveFee
=
(
sumValue
+
(
group
.
OtherPerfor
??
0
)
+
(
group
.
Punishment
??
0
))
*
(
group
.
Adjust
==
0
?
1
:
group
.
Adjust
)
;
res
.
RealGiveFee
=
res
.
GiveFee
;
res
.
GiveFee
=
(
sumValue
+
(
group
.
OtherPerfor
??
0
)
+
(
group
.
Punishment
??
0
));
res
.
RealGiveFee
=
res
.
GiveFee
*
(
group
.
Adjust
==
0
?
1
:
group
.
Adjust
)
;
res
.
Avg
=
group
.
Number
!=
0
?
res
.
GiveFee
/
group
.
Number
:
null
;
resDataList
.
Add
(
res
);
}
...
...
performance/Performance.Services/ExtractService.cs
View file @
b32a9070
...
...
@@ -300,12 +300,12 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee
{
"参加工作时间"
,
(
t
)
=>
t
.
WorkTime
},
{
"考核得分率"
,
(
t
)
=>
t
.
ScoreAverageRate
},
{
"出勤率"
,
(
t
)
=>
t
.
Attendance
},
{
"核算单元医生数"
,
(
t
)
=>
t
.
PeopleNumber
},
{
"工作量绩效"
,
(
t
)
=>
t
.
Workload
},
//
{ "核算单元医生数", (t) => t.PeopleNumber },
//
{ "工作量绩效", (t) => t.Workload },
{
"其他绩效"
,
(
t
)
=>
t
.
OthePerfor
},
{
"医院奖罚"
,
(
t
)
=>
t
.
Punishment
},
{
"调节系数"
,
(
t
)
=>
t
.
Adjust
},
{
"发放系数"
,
(
t
)
=>
t
.
Grant
},
//
{ "发放系数", (t) => t.Grant },
};
foreach
(
var
item
in
keyValues
.
Keys
)
{
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
b32a9070
...
...
@@ -41,7 +41,7 @@ public class ComputeDirector : IAutoInjection
/// <param name="nurseList"></param>
/// <param name="directorList"></param>
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
per_allot
allot
)
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
im_accountbasic
>
accountbasicList
,
per_allot
allot
)
{
//规模绩效和效率绩效配置表
var
directorList
=
perforCofdirectorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
...
...
@@ -68,10 +68,14 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
var
needCompute
=
empolyeeList
.
Where
(
t
=>
t
.
AccountType
==
basicRule
.
AccountUnitType
.
ToString
()
&&
t
.
FitPeople
.
Trim
()
==
EnumHelper
.
GetDescription
(
basicRule
.
PerforType
));
foreach
(
var
item
in
needCompute
)
{
//分别取出对应的 计算 人员 平均值等信息
decimal
?
number
,
perforTotal
,
avg
;
if
(
basicRule
.
PerforType
==
PerforType
.
护士长
)
{
var
nurseHeadNumber
=
accountbasicList
.
FirstOrDefault
(
t
=>
t
.
Department
==
item
.
Department
)?.
NurseHeadNumber
;
if
(!
nurseHeadNumber
.
HasValue
||
nurseHeadNumber
.
Value
==
0
)
continue
;
var
resAccount
=
nurseList
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
);
number
=
resAccount
?.
Number
;
perforTotal
=
resAccount
?.
PerforTotal
;
...
...
@@ -79,6 +83,9 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
}
else
{
var
directorNumber
=
accountbasicList
.
FirstOrDefault
(
t
=>
t
.
Department
==
item
.
Department
)?.
DirectorNumber
;
if
(!
directorNumber
.
HasValue
||
directorNumber
.
Value
==
0
)
continue
;
var
resAccount
=
doctorList
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
);
number
=
resAccount
?.
Number
;
perforTotal
=
resAccount
?.
PerforTotal
;
...
...
@@ -125,7 +132,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
compute
.
GiveFee
=
compute
.
Avg
*
(
item
.
Grant
??
1
)
+
(
compute
.
Efficiency
+
compute
.
Scale
)
*
(
item
.
Grant
??
1
)
*
compute
.
ScoreAverageRate
+
(
item
.
Punishment
??
0
)
+
(
item
.
OtherPerfor
??
0
);
//实发绩效
//compute.RealGiveFee = compute.GiveFee * (item.Adjust ?? 1m) - compute.ShouldGiveFee * item.ScoreAverageRate * (item.Grant ?? 1) * 0.1m;
compute
.
RealGiveFee
=
compute
.
GiveFee
;
compute
.
RealGiveFee
=
compute
.
GiveFee
*
(
item
.
Adjust
??
1
m
)
;
computeList
.
Add
(
compute
);
}
...
...
@@ -160,7 +167,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
AccountingUnit
=
item
.
AccountingUnit
,
EmployeeName
=
item
.
DoctorName
,
FitPeople
=
item
.
FitPeople
,
Grant
=
item
.
Grant
??
1
,
//
Grant = item.Grant ?? 1,
WorkTime
=
item
.
WorkTime
,
PostCoefficient
=
item
.
PostCoefficient
,
Attendance
=
item
.
Attendance
,
...
...
@@ -169,7 +176,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
OtherPerfor
=
item
.
OtherPerfor
,
JobTitle
=
item
.
JobTitle
,
Adjust
=
item
.
Adjust
,
Workload
=
item
.
Workload
//
Workload = item.Workload
};
decimal
?
baiscnorm
=
1
;
...
...
@@ -190,11 +197,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
1
);
//应发绩效
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
(
compute
.
PostCoefficient
+
(
item
.
Adjust
??
0
))
*
(
item
.
Grant
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
*
(
compute
.
WorkYear
??
1
)
+
(
compute
.
OtherPerfor
??
0
)
+
(
item
.
Workload
??
0
)
+
(
compute
.
Punishment
??
0
);
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
);
//实发绩效
compute
.
RealGiveFee
=
compute
.
GiveFee
;
compute
.
RealGiveFee
=
compute
.
GiveFee
*
(
item
.
Adjust
??
1
)
;
computeList
.
Add
(
compute
);
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccountingt.cs
View file @
b32a9070
...
...
@@ -29,14 +29,15 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
PerDataAccountBaisc
unifyUnit
=
new
PerDataAccountBaisc
();
unifyUnit
.
RowNumber
=
r
;
unifyUnit
.
DoctorAccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元(医生组)"
).
PointCell
)?.
ToString
();
unifyUnit
.
NurseAccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元(护理组)"
).
PointCell
)?.
ToString
();
unifyUnit
.
Department
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室名称"
).
PointCell
)?.
ToString
();
unifyUnit
.
DirectorNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元科主任数量"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元医生数量"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorBasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"
基础系数
"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorBasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"
预算比例
"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorSlopeFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"倾斜系数"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorOtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorOtherPerfor2
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效2"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
...
...
@@ -44,8 +45,9 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit
.
DoctorScoringAverage
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
DoctorAdjustFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
&&
p
.
Parent
.
CellValue
==
"医生组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseHeadNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元护士长数量"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元护士数量"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseBasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"
基础系数
"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseBasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"
预算比例
"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseSlopeFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"倾斜系数"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseOtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
unifyUnit
.
NurseOtherPerfor2
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效2"
&&
p
.
Parent
.
CellValue
==
"护理组"
).
PointCell
)?.
ToString
());
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
b32a9070
...
...
@@ -44,12 +44,12 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
WorkTime
=
NopiSevice
.
GetCellDatetimeValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"参加工作时间"
).
PointCell
)),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
ToString
()),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤率"
).
PointCell
)?.
ToString
()),
PeopleNumber
=
ConvertHelper
.
To
<
int
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元医生数"
).
PointCell
)?.
ToString
()),
Workload
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"工作量绩效"
).
PointCell
)?.
ToString
()),
//
PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell)?.ToString()),
//
Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell)?.ToString()),
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效"
).
PointCell
)?.
ToString
()),
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
ToString
()),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
ToString
()),
Grant
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"发放系数"
).
PointCell
)?.
ToString
()),
//
Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
};
dataList
.
Add
(
employee
);
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
View file @
b32a9070
...
...
@@ -13,19 +13,28 @@ namespace Performance.Services
/// </summary>
public
class
PerSheetDataReadOtherIncome
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
2
,
HeaderLastRowNum
=
2
,
HeaderFirstRowNum
=
3
,
HeaderLastRowNum
=
3
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
3
,
DataFirstRowNum
=
4
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
//核算单元(医生组)
new
AccountingUnit
{
AccountingUnitCellNum
=
0
,
DeptCellNum
=
1
,
UnitType
=
"医生组"
,
DeptCellNum
=
2
,
FactorRow
=
2
,
},
//核算单元(护理组)
new
AccountingUnit
{
AccountingUnitCellNum
=
1
,
UnitType
=
"护理组"
,
DeptCellNum
=
2
,
FactorRow
=
1
,
}
}
...
...
@@ -35,58 +44,42 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
var
unit
=
Point
.
AccountingUnit
.
First
();
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
//循环 当前有几个核算单元
foreach
(
var
unit
in
Point
.
AccountingUnit
)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
(),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
GetUnitType
(
sheet
.
SheetName
,
perHeader
),
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
dataList
.
Add
(
data
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
(),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
}
}
}
return
dataList
;
}
/// <summary>
/// 获取核算单元类型
/// </summary>
/// <param name="sheet"></param>
/// <param name="perHeader"></param>
private
string
GetUnitType
(
string
sheetName
,
List
<
PerHeader
>
perHeader
)
{
if
(
sheetName
.
Contains
(
"医生组"
))
return
"医生组"
;
else
if
(
sheetName
.
Contains
(
"护理组"
))
return
"护理组"
;
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellValue
.
Contains
(
"核算单元"
)
&&
t
.
CellValue
.
Contains
(
"医生组"
)))
return
"医生组"
;
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellValue
.
Contains
(
"核算单元"
)
&&
t
.
CellValue
.
Contains
(
"护理组"
)))
return
"护理组"
;
return
""
;
}
}
}
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