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
f76984c7
Commit
f76984c7
authored
Aug 15, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新计算绩效
parent
716adc59
Hide whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1780 additions
and
896 deletions
+1780
-896
performance/Performance.Api/Controllers/EmployeeController.cs
+80
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+29
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+90
-108
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+108
-20
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+29
-23
performance/Performance.DtoModels/PerExcel/ComputeEmployee.cs
+11
-6
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
+9
-9
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+23
-7
performance/Performance.DtoModels/PerExcel/PerData.cs
+8
-0
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+32
-32
performance/Performance.DtoModels/PerExcel/PerDataClinicEmployee.cs
+22
-12
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
+12
-12
performance/Performance.DtoModels/PerExcel/PerDataLogisticsEmployee.cs
+70
-0
performance/Performance.DtoModels/PerExcel/PerDataSpecialUnit.cs
+17
-16
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
+39
-15
performance/Performance.DtoModels/PerExcel/TotalSumResult.cs
+18
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/im_accountbasic.cs
+12
-12
performance/Performance.EntityModels/Entity/im_employee_clinic.cs
+32
-27
performance/Performance.EntityModels/Entity/im_employee_logistics.cs
+144
-0
performance/Performance.EntityModels/Entity/res_account.cs
+4
-4
performance/Performance.Repository/PerforCofdirectorRepository.cs
+1
-0
performance/Performance.Repository/Repository/PerforImemployeelogisticsRepository.cs
+20
-0
performance/Performance.Services/AllotCompute/BaiscNormService.cs
+93
-62
performance/Performance.Services/AllotCompute/ImportDataService.cs
+48
-2
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+198
-231
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+99
-86
performance/Performance.Services/AllotService.cs
+51
-33
performance/Performance.Services/AssessService.cs
+4
-2
performance/Performance.Services/ComputeService.cs
+4
-4
performance/Performance.Services/EmployeeService.cs
+100
-0
performance/Performance.Services/OriginalService.cs
+3
-4
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+71
-55
performance/Performance.Services/PerExcelService/NopiSevice.cs
+40
-1
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+18
-2
performance/Performance.Services/PerExcelService/PerSheetService.cs
+10
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccountExtra.cs
+4
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
+14
-10
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+22
-22
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+7
-7
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
+79
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
+8
-8
performance/Performance.Services/SheetSevice.cs
+95
-60
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
f76984c7
...
...
@@ -158,6 +158,86 @@ public ApiResponse DeleteClinic([FromBody] im_employee_clinic request)
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
region
行政后勤
/// <summary>
/// 获取临床人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"logistics/getlist"
)]
[
HttpPost
]
public
ApiResponse
GetEmployeeLogisticsList
([
FromBody
]
im_employee_clinic
request
)
{
//if ((request.AllotID ?? 0) == 0)
// return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var
employee
=
employeeService
.
GetEmployeeLogisticsList
(
request
.
AllotID
,
claim
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 新增临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"logistics/insert"
)]
[
HttpPost
]
public
ApiResponse
InsertLogistics
([
FromBody
]
im_employee_logistics
request
)
{
if
((
request
.
AllotID
??
0
)
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
if
(
string
.
IsNullOrEmpty
(
request
.
AccountingUnit
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AccountingUnit无效!"
);
if
(
string
.
IsNullOrEmpty
(
request
.
DoctorName
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数DoctorName无效!"
);
var
employee
=
employeeService
.
InsertLogistics
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 修改临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"logistics/update"
)]
[
HttpPost
]
public
ApiResponse
UpdateLogistics
([
FromBody
]
im_employee_logistics
request
)
{
if
((
request
.
AllotID
??
0
)
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
if
(
string
.
IsNullOrEmpty
(
request
.
AccountingUnit
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AccountingUnit无效!"
);
if
(
string
.
IsNullOrEmpty
(
request
.
DoctorName
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数DoctorName无效!"
);
var
employee
=
employeeService
.
UpdateLogistics
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 删除临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"logistics/delete"
)]
[
HttpPost
]
public
ApiResponse
DeleteLogistics
([
FromBody
]
im_employee_clinic
request
)
{
if
(
request
.
ID
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数ID无效!"
);
if
(!
employeeService
.
DeleteLogistics
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
/// <summary>
/// 人事科修改参数后提交
/// </summary>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
f76984c7
...
...
@@ -592,6 +592,34 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetEmployeeLogisticsList(Performance.EntityModels.im_employee_clinic)"
>
<summary>
获取临床人员列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.InsertLogistics(Performance.EntityModels.im_employee_logistics)"
>
<summary>
新增临床人员
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UpdateLogistics(Performance.EntityModels.im_employee_logistics)"
>
<summary>
修改临床人员
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.DeleteLogistics(Performance.EntityModels.im_employee_clinic)"
>
<summary>
删除临床人员
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.Audit(System.Int32)"
>
<summary>
人事科修改参数后提交
...
...
@@ -1190,7 +1218,7 @@
<param
name=
"hospitalId"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.TemplateController.ReturnLog(System.Int32,System.String,System.String,System.Int32,System.
Boolean,System.
String)"
>
<member
name=
"M:Performance.Api.Controllers.TemplateController.ReturnLog(System.Int32,System.String,System.String,System.Int32,System.String)"
>
<summary>
返回日志
</summary>
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
f76984c7
...
...
@@ -393,9 +393,9 @@
岗位系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeEmployee.
WorkTime
"
>
<member
name=
"P:Performance.DtoModels.ComputeEmployee.
PermanentStaff
"
>
<summary>
参加工作时间
效率绩效人数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeEmployee.ScoreAverageRate"
>
...
...
@@ -413,11 +413,6 @@
其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeEmployee.Punishment"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeEmployee.Adjust"
>
<summary>
调节系数
...
...
@@ -520,7 +515,7 @@
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.Punishment"
>
<summary>
医院奖罚
(来自人员名单)
医院奖罚
来自5.2
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.OtherPerfor"
>
...
...
@@ -538,21 +533,11 @@
参考基数专用绩效合计
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.WorkTime"
>
<summary>
参加工作时间(来自人员名单)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.BaiscNormValue"
>
<summary>
绩效基础金额(计算)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.WorkYear"
>
<summary>
年资系数(来自人员名单)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResult.RealGiveFee"
>
<summary>
实发绩效
...
...
@@ -595,7 +580,7 @@
<summary>
无法识别
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.Employee"
>
<summary>
医院人员名单
</summary>
<summary>
行政中高层
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.Income"
>
<summary>
收入
</summary>
...
...
@@ -634,13 +619,25 @@
<summary>
临床科室护士绩效测算表
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.ClinicEmployee"
>
<summary>
临床人员名单
</summary>
<summary>
业务中层
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountBasicSpecial"
>
<summary>
特殊临床科室医护绩效测算基础
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountAssess"
>
<summary>
临床科室医护绩效考核表
</summary>
<member
name=
"F:Performance.DtoModels.SheetType.AccountExtra"
>
<summary>
科室绩效医院奖罚
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.PersonExtra"
>
<summary>
业务中层行政中高层医院奖罚
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountDrugAssess"
>
<summary>
科室药占比考核
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.AccountMaterialsAssess"
>
<summary>
科室材料考核
</summary>
</member>
<member
name=
"F:Performance.DtoModels.SheetType.LogisticsEmployee"
>
<summary>
行政后勤
</summary>
</member>
<member
name=
"T:Performance.DtoModels.AccountUnitType"
>
<summary>
...
...
@@ -690,6 +687,16 @@
列头类型名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData.EmployeeName"
>
<summary>
人员姓名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData.JobNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData.Annotation"
>
<summary>
单元格注释
...
...
@@ -760,16 +767,6 @@
核算单元
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Department"
>
<summary>
科室名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.PermanentStaff"
>
<summary>
定科人数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.ManagerNumber"
>
<summary>
科主任/护士长数量
...
...
@@ -785,11 +782,6 @@
医生基础系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.SlopeFactor"
>
<summary>
倾斜系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.OtherPerfor1"
>
<summary>
其他绩效1
...
...
@@ -810,11 +802,6 @@
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Extra"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.ScoringAverage"
>
<summary>
考核对分率
...
...
@@ -840,31 +827,11 @@
发放系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MinimumReference"
>
<summary>
保底绩效参考标准
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MinimumFactor"
>
<summary>
保底绩效系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.WorkSlopeFactor"
>
<summary>
工作量倾斜系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MedicineFactor"
>
<summary>
药占比系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.MinimumFee"
>
<summary>
保底绩效金额
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.Income"
>
<summary>
科室业绩
...
...
@@ -930,9 +897,9 @@
基础绩效系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.P
ostCoefficient
"
>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.P
ermanentStaff
"
>
<summary>
岗位系
数
效率绩效人
数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.Efficiency"
>
...
...
@@ -950,11 +917,6 @@
管理绩效发放系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.WorkTime"
>
<summary>
参加工作时间
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.ScoreAverageRate"
>
<summary>
考核得分率
...
...
@@ -965,14 +927,9 @@
出勤率
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.OthePerfor"
>
<summary>
其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.Punishment"
>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.OtheManagementPerfor"
>
<summary>
医院奖罚
其他管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.Adjust"
>
...
...
@@ -1035,11 +992,6 @@
岗位系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.WorkTime"
>
<summary>
参加工作时间
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.ScoreAverageRate"
>
<summary>
考核得分率
...
...
@@ -1050,74 +1002,104 @@
出勤率
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.
OthePerfor
"
>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.
Adjust
"
>
<summary>
其他绩效
调节系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.
Punishment
"
>
<member
name=
"P:Performance.DtoModels.PerDataEmployee.
RowNumber
"
>
<summary>
医院奖罚
行号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
Employee.Adjus
t"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.AccountingUni
t"
>
<summary>
调节系数
核算单元
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
Employee.RowNumber
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.FitPeople
"
>
<summary>
行号
绩效基数核算参考对象
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.AccountingUnit
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.FitPeopleValue
"
>
<summary>
核算单元
绩效基础核算参考值
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.Department
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.FitPeopleRatio
"
>
<summary>
科室名称
绩效基数核算参考对象取值比例(如临床科室护士*95%)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.Number
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.AccountType
"
>
<summary>
人数
科室类别(例如 医技科室 临床科室 其他科室)
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.QuantitativeIndicators
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.JobNumber
"
>
<summary>
量化指标
人员工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.Quantity
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.DoctorName
"
>
<summary>
数量
姓名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.QuantitativeIndicatorsValu
e"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.JobTitl
e"
>
<summary>
量化指标绩效分值
职务分类
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.ScoringAverage
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.PostCoefficient
"
>
<summary>
考核得分率
岗位系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.OtherPerfor"
>
<member
name=
"P:Performance.DtoModels.PerDataLogisticsEmployee.Attendance"
>
<summary>
出勤率
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataLogisticsEmployee.OthePerfor"
>
<summary>
其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerData
SpecialUnit.Punishment
"
>
<member
name=
"P:Performance.DtoModels.PerData
LogisticsEmployee.RowNumber
"
>
<summary>
医院奖罚
行号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.A
djus
t"
>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.A
ccountingUni
t"
>
<summary>
调节系数
核算单元
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.Department"
>
<summary>
科室名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.Number"
>
<summary>
人数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicators"
>
<summary>
量化指标
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.Quantity"
>
<summary>
数量
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.QuantitativeIndicatorsValue"
>
<summary>
量化指标绩效分值
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataSpecialUnit.Efficiency"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
f76984c7
...
...
@@ -130,6 +130,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.im_employee_clinic"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.im_employee_logistics"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.im_header"
>
<summary>
</summary>
</member>
...
...
@@ -1846,11 +1849,6 @@
核算单元(护理组)
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
...
...
@@ -1876,11 +1874,6 @@
医生基础系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorSlopeFactor"
>
<summary>
倾斜系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorScale"
>
<summary>
规模绩效系数
...
...
@@ -1916,11 +1909,6 @@
材料占比奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorExtra"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.DoctorScoringAverage"
>
<summary>
考核对分率
...
...
@@ -2306,6 +2294,11 @@
岗位系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_clinic.PermanentStaff"
>
<summary>
效率绩效人数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_clinic.Efficiency"
>
<summary>
效率绩效系数
...
...
@@ -2371,6 +2364,106 @@
</summary>
</member>
<member
name=
"T:Performance.EntityModels.im_employee_logistics"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.AllotID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.SheetID"
>
<summary>
sheet页id
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.RowNumber"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.AccountType"
>
<summary>
科室类别(例如 医技科室 临床科室 其他科室)
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.Department"
>
<summary>
科室名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.FitPeople"
>
<summary>
绩效基数核算参考对象
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.FitPeopleValue"
>
<summary>
绩效基础核算参考值
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.FitPeopleRatio"
>
<summary>
绩效基数核算参考对象取值比例(如临床科室护士*95%)
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.PersonnelNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.DoctorName"
>
<summary>
医生姓名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.JobTitle"
>
<summary>
职称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.PostCoefficient"
>
<summary>
岗位系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.ScoreAverageRate"
>
<summary>
考核得分率
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.Attendance"
>
<summary>
出勤率
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.OtherPerfor"
>
<summary>
其他绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.UpdateDate"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_employee_logistics.UpdateUser"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.im_header"
>
<summary>
...
...
@@ -3816,11 +3909,6 @@
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.PermanentStaff"
>
<summary>
定科人数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.ManagerNumber"
>
<summary>
科主任/护士长数量
...
...
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
f76984c7
...
...
@@ -110,37 +110,38 @@ public AutoMapperConfigs()
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>()
.
ForMember
(
dest
=>
dest
.
UnitType
,
opt
=>
opt
.
MapFrom
(
src
=>
EnumHelper
.
GetItems
<
UnitType
>().
First
(
t
=>
t
.
Name
==
src
.
UnitType
).
Value
))
.
ForMember
(
dest
=>
dest
.
DoctorAccountingUnit
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
AccountingUnit
))
.
ForMember
(
dest
=>
dest
.
Department
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Department
))
//
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.
ForMember
(
dest
=>
dest
.
DoctorDirectorNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
ManagerNumber
))
.
ForMember
(
dest
=>
dest
.
DoctorNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Number
))
.
ForMember
(
dest
=>
dest
.
DoctorBasicFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
BasicFactor
))
.
ForMember
(
dest
=>
dest
.
DoctorSlopeFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
SlopeFactor
))
//
.ForMember(dest => dest.DoctorSlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
.
ForMember
(
dest
=>
dest
.
DoctorOtherPerfor1
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
OtherPerfor1
))
.
ForMember
(
dest
=>
dest
.
DoctorOtherPerfor2
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
OtherPerfor2
))
.
ForMember
(
dest
=>
dest
.
DoctorExtra
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Extra
))
//
.ForMember(dest => dest.DoctorExtra, opt => opt.MapFrom(src => src.Extra))
.
ForMember
(
dest
=>
dest
.
DoctorScoringAverage
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
ScoringAverage
))
.
ForMember
(
dest
=>
dest
.
DoctorAdjustFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
AdjustFactor
))
.
ForMember
(
dest
=>
dest
.
DoctorScale
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Scale
))
.
ForMember
(
dest
=>
dest
.
DoctorEffic
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Effic
))
.
ForMember
(
dest
=>
dest
.
DoctorGrant
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Grant
));
CreateMap
<
im_accountbasic
,
PerDataAccountBaisc
>()
.
ForMember
(
dest
=>
dest
.
UnitType
,
opt
=>
opt
.
MapFrom
(
src
=>
((
UnitType
)
src
.
UnitType
).
ToString
()))
.
ForMember
(
dest
=>
dest
.
AccountingUnit
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorAccountingUnit
))
.
ForMember
(
dest
=>
dest
.
Department
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Department
))
.
ForMember
(
dest
=>
dest
.
ManagerNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorDirectorNumber
))
.
ForMember
(
dest
=>
dest
.
Number
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorNumber
))
.
ForMember
(
dest
=>
dest
.
BasicFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorBasicFactor
))
.
ForMember
(
dest
=>
dest
.
SlopeFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorSlopeFactor
))
.
ForMember
(
dest
=>
dest
.
OtherPerfor1
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorOtherPerfor1
))
.
ForMember
(
dest
=>
dest
.
OtherPerfor2
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorOtherPerfor2
))
.
ForMember
(
dest
=>
dest
.
Extra
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorExtra
))
.
ForMember
(
dest
=>
dest
.
ScoringAverage
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorScoringAverage
))
.
ForMember
(
dest
=>
dest
.
AdjustFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorAdjustFactor
))
.
ForMember
(
dest
=>
dest
.
Scale
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorScale
))
.
ForMember
(
dest
=>
dest
.
Effic
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorEffic
))
.
ForMember
(
dest
=>
dest
.
Grant
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
DoctorGrant
));
.
ForMember
(
dest
=>
dest
.
DoctorGrant
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Grant
))
.
ReverseMap
();
//CreateMap<im_accountbasic, PerDataAccountBaisc>()
// .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => ((UnitType)src.UnitType).ToString()))
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.DoctorAccountingUnit))
// .ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
// .ForMember(dest => dest.ManagerNumber, opt => opt.MapFrom(src => src.DoctorDirectorNumber))
// .ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.DoctorNumber))
// .ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.DoctorBasicFactor))
// .ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.DoctorSlopeFactor))
// .ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.DoctorOtherPerfor1))
// .ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.DoctorOtherPerfor2))
// .ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.DoctorExtra))
// .ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.DoctorScoringAverage))
// .ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.DoctorAdjustFactor))
// .ForMember(dest => dest.Scale, opt => opt.MapFrom(src => src.DoctorScale))
// .ForMember(dest => dest.Effic, opt => opt.MapFrom(src => src.DoctorEffic))
// .ForMember(dest => dest.Grant, opt => opt.MapFrom(src => src.DoctorGrant));
CreateMap
<
PerDataSpecialUnit
,
im_specialunit
>().
ReverseMap
();
//CreateMap<PerDataAccountDoctor, res_accountdoctor>();
...
...
@@ -196,12 +197,17 @@ public AutoMapperConfigs()
CreateMap
<
ag_temp
,
SecondTempResponse
>();
CreateMap
<
ag_secondallot
,
SecondListResponse
>().
ReverseMap
();
CreateMap
<
im_employee_clinic
,
PerDataClinicEmployee
>().
ReverseMap
();
CreateMap
<
im_employee_clinic
,
PerDataClinicEmployee
>().
ReverseMap
();
CreateMap
<
im_employee_clinic
,
ComputeEmployee
>()
.
ForMember
(
dest
=>
dest
.
JobNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
PersonnelNumber
))
.
ReverseMap
();
CreateMap
<
im_employee_logistics
,
PerDataLogisticsEmployee
>().
ReverseMap
();
CreateMap
<
im_employee_logistics
,
ComputeEmployee
>()
.
ForMember
(
dest
=>
dest
.
JobNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
PersonnelNumber
))
.
ReverseMap
();
CreateMap
<
per_budget_amount
,
BudgetResponse
>()
.
ForMember
(
dest
=>
dest
.
Type
,
opt
=>
opt
.
MapFrom
(
src
=>
1
));
CreateMap
<
BudgetResponse
,
per_budget_amount
>();
...
...
performance/Performance.DtoModels/PerExcel/ComputeEmployee.cs
View file @
f76984c7
...
...
@@ -67,9 +67,14 @@ public class ComputeEmployee
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
///
参加工作时间
///
效率绩效人数
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
...
...
@@ -96,10 +101,10 @@ public class ComputeEmployee
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
///
//
<summary>
///
//
医院奖罚
///
//
</summary>
//
public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
...
...
performance/Performance.DtoModels/PerExcel/ComputeResult.cs
View file @
f76984c7
...
...
@@ -81,7 +81,7 @@ public class ComputeResult
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
(来自人员名单)
/// 医院奖罚
来自5.2
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
...
...
@@ -100,20 +100,20 @@ public class ComputeResult
/// </summary>
public
Nullable
<
decimal
>
BaiscNormPerforTotal
{
get
;
set
;
}
/// <summary>
/// 参加工作时间(来自人员名单)
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
///
//
<summary>
///
//
参加工作时间(来自人员名单)
///
//
</summary>
//
public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 绩效基础金额(计算)
/// </summary>
public
Nullable
<
decimal
>
BaiscNormValue
{
get
;
set
;
}
/// <summary>
/// 年资系数(来自人员名单)
/// </summary>
public
Nullable
<
decimal
>
WorkYear
{
get
;
set
;
}
///
//
<summary>
///
//
年资系数(来自人员名单)
///
//
</summary>
//
public Nullable<decimal> WorkYear { get; set; }
/// <summary>
/// 实发绩效
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
f76984c7
...
...
@@ -40,8 +40,8 @@ public enum SheetType
/// <summary> 无法识别 </summary>
[
Description
(
"无法识别"
)]
Unidentifiable
=
1
,
/// <summary>
医院人员名单
</summary>
[
Description
(
"
医院人员名单
"
)]
/// <summary>
行政中高层
</summary>
[
Description
(
"
行政中高层
"
)]
Employee
=
2
,
/// <summary> 收入 </summary>
[
Description
(
"收入"
)]
...
...
@@ -81,17 +81,33 @@ public enum SheetType
[
Description
(
"临床科室护士绩效测算表"
)]
ComputeNurseAccount
=
14
,
/// <summary>
临床人员名单
</summary>
[
Description
(
"
临床人员名单
"
)]
/// <summary>
业务中层
</summary>
[
Description
(
"
业务中层
"
)]
ClinicEmployee
=
15
,
/// <summary> 特殊临床科室医护绩效测算基础 </summary>
[
Description
(
"特殊临床科室医护绩效测算基础"
)]
AccountBasicSpecial
=
16
,
/// <summary> 科室绩效医院奖罚 </summary>
[
Description
(
"科室绩效医院奖罚"
)]
AccountExtra
=
17
,
/// <summary> 临床科室医护绩效考核表 </summary>
[
Description
(
"临床科室医护绩效考核表"
)]
AccountAssess
=
17
,
/// <summary> 业务中层行政中高层医院奖罚 </summary>
[
Description
(
"业务中层行政中高层医院奖罚"
)]
PersonExtra
=
18
,
/// <summary> 科室药占比考核 </summary>
[
Description
(
"科室药占比考核"
)]
AccountDrugAssess
=
19
,
/// <summary> 科室材料考核 </summary>
[
Description
(
"科室材料考核"
)]
AccountMaterialsAssess
=
20
,
/// <summary> 行政后勤 </summary>
[
Description
(
"行政后勤"
)]
LogisticsEmployee
=
21
,
}
/// <summary>
...
...
performance/Performance.DtoModels/PerExcel/PerData.cs
View file @
f76984c7
...
...
@@ -23,6 +23,14 @@ public class PerData : IPerData
/// </summary>
public
string
TypeName
{
get
;
set
;
}
/// <summary>
/// 人员姓名
/// </summary>
public
string
EmployeeName
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 单元格注释
/// </summary>
public
string
Annotation
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
f76984c7
...
...
@@ -28,15 +28,15 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
///
//
<summary>
///
//
科室名称
///
//
</summary>
//
public string Department { get; set; }
/// <summary>
///
定科
人数
/// </summary>
public
decimal
PermanentStaff
{
get
;
set
;
}
///
//
<summary>
///
// 效率绩效
人数
///
//
</summary>
//
public decimal PermanentStaff { get; set; }
/// <summary>
/// 科主任/护士长数量
...
...
@@ -53,10 +53,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
decimal
BasicFactor
{
get
;
set
;
}
/// <summary>
/// 倾斜系数
/// </summary>
public
decimal
SlopeFactor
{
get
;
set
;
}
///
//
<summary>
///
//
倾斜系数
///
//
</summary>
//
public decimal SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
...
...
@@ -78,10 +78,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
decimal
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
decimal
Extra
{
get
;
set
;
}
///
//
<summary>
///
//
医院奖罚
///
//
</summary>
//
public decimal Extra { get; set; }
/// <summary>
/// 考核对分率
...
...
@@ -108,20 +108,20 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
decimal
Grant
{
get
;
set
;
}
/// <summary>
/// 保底绩效参考标准
/// </summary>
public
string
MinimumReference
{
get
;
set
;
}
///
//
<summary>
///
//
保底绩效参考标准
///
//
</summary>
//
public string MinimumReference { get; set; }
/// <summary>
/// 保底绩效系数
/// </summary>
public
Nullable
<
decimal
>
MinimumFactor
{
get
;
set
;
}
///
//
<summary>
///
//
保底绩效系数
///
//
</summary>
//
public Nullable<decimal> MinimumFactor { get; set; }
/// <summary>
/// 工作量倾斜系数
/// </summary>
public
Nullable
<
decimal
>
WorkSlopeFactor
{
get
;
set
;
}
///
//
<summary>
///
//
工作量倾斜系数
///
//
</summary>
//
public Nullable<decimal> WorkSlopeFactor { get; set; }
#
endregion
...
...
@@ -132,10 +132,10 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public
Nullable
<
decimal
>
MedicineFactor
{
get
;
set
;
}
/// <summary>
/// 保底绩效金额
/// </summary>
public
Nullable
<
decimal
>
MinimumFee
{
get
;
set
;
}
///
//
<summary>
///
//
保底绩效金额
///
//
</summary>
//
public Nullable<decimal> MinimumFee { get; set; }
/// <summary>
/// 科室业绩
...
...
performance/Performance.DtoModels/PerExcel/PerDataClinicEmployee.cs
View file @
f76984c7
...
...
@@ -42,9 +42,14 @@ public class PerDataClinicEmployee : IPerData
public
Nullable
<
decimal
>
Basics
{
get
;
set
;
}
/// <summary>
///
岗位系
数
///
效率绩效人
数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
public
decimal
PermanentStaff
{
get
;
set
;
}
///// <summary>
///// 岗位系数
///// </summary>
//public Nullable<decimal> PostCoefficient { get; set; }
/// <summary>
/// 效率绩效系数
...
...
@@ -61,10 +66,10 @@ public class PerDataClinicEmployee : IPerData
/// </summary>
public
Nullable
<
decimal
>
Management
{
get
;
set
;
}
/// <summary>
/// 参加工作时间
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
///
//
<summary>
///
//
参加工作时间
///
//
</summary>
//
public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
...
...
@@ -77,14 +82,19 @@ public class PerDataClinicEmployee : IPerData
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// 其他
管理
绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
public
Nullable
<
decimal
>
Othe
Management
Perfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
///// <summary>
///// 其他绩效
///// </summary>
//public Nullable<decimal> OthePerfor { get; set; }
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
...
...
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
View file @
f76984c7
...
...
@@ -56,10 +56,10 @@ public class PerDataEmployee : IPerData
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 参加工作时间
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
///
//
<summary>
///
//
参加工作时间
///
//
</summary>
//
public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
...
...
@@ -76,15 +76,15 @@ public class PerDataEmployee : IPerData
///// </summary>
//public Nullable<decimal> Workload { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
///
//
<summary>
///
//
其他绩效
///
//
</summary>
//
public Nullable<decimal> OthePerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
///
//
<summary>
///
//
医院奖罚
///
//
</summary>
//
public Nullable<decimal> Punishment { get; set; }
/// <summary>
/// 调节系数
...
...
performance/Performance.DtoModels/PerExcel/PerDataLogisticsEmployee.cs
0 → 100644
View file @
f76984c7
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerDataLogisticsEmployee
:
IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public
string
FitPeople
{
get
;
set
;
}
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public
Nullable
<
decimal
>
FitPeopleValue
{
get
;
set
;
}
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public
Nullable
<
decimal
>
FitPeopleRatio
{
get
;
set
;
}
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public
string
AccountType
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 职务分类
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 岗位系数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 出勤率
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
/// <summary>
/// 行号
/// </summary>
public
int
RowNumber
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataSpecialUnit.cs
View file @
f76984c7
...
...
@@ -36,25 +36,26 @@ public class PerDataSpecialUnit : IPerData
/// </summary>
public
Nullable
<
decimal
>
QuantitativeIndicatorsValue
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
///
//
<summary>
///
//
考核得分率
///
//
</summary>
//
public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
///
//
<summary>
///
//
其他绩效
///
//
</summary>
//
public Nullable<decimal> OtherPerfor { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 调节系数
///// </summary>
//public Nullable<decimal> Adjust { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
public
int
RowNumber
{
get
;
set
;
}
/// <summary>
...
...
performance/Performance.DtoModels/PerExcel/PerSheetHeader.cs
View file @
f76984c7
...
...
@@ -11,22 +11,22 @@ public class PerSheetHeader
public
static
List
<(
string
,
Func
<
im_employee
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
employeeHeaders
=
new
List
<(
string
,
Func
<
im_employee
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
{
(
"
核算单元类型
"
,
(
t
)
=>
t
.
AccountType
,
1
,
1
,
false
,
false
,
false
,
"AccountType"
),
(
"
人员分类
"
,
(
t
)
=>
t
.
AccountType
,
1
,
1
,
false
,
false
,
false
,
"AccountType"
),
(
"核算单元"
,
(
t
)
=>
t
.
AccountingUnit
,
1
,
1
,
false
,
false
,
false
,
"AccountingUnit"
),
(
"人员工号"
,
(
t
)
=>
t
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
false
,
"PersonnelNumber"
),
(
"医生姓名"
,
(
t
)
=>
t
.
DoctorName
,
1
,
1
,
false
,
false
,
false
,
"DoctorName"
),
(
"职
称
"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
(
"职
务分类
"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
(
"绩效基数核算参考对象"
,
(
t
)
=>
t
.
FitPeople
,
1
,
1
,
false
,
false
,
false
,
"FitPeople"
),
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
,
"PostCoefficient"
),
(
"参加工作时间"
,
(
t
)
=>
t
.
WorkTime
,
1
,
1
,
false
,
false
,
false
,
"WorkTime"
),
//
("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoreAverageRate
.
Value
*
100
,
2
)
,
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"核算单元医生数"
,
(
t
)
=>
t
.
PeopleNumber
,
1
,
1
,
false
,
true
,
false
,
"PeopleNumber"
),
(
"工作量绩效"
,
(
t
)
=>
t
.
Workload
,
1
,
1
,
false
,
true
,
false
,
"Workload"
),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
(
"医院奖罚"
,
(
t
)
=>
t
.
Punishment
,
1
,
1
,
false
,
true
,
false
,
"Punishment"
),
//
("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//
("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
//
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
//
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
(
"发放系数"
,
(
t
)
=>
t
.
Grant
,
1
,
1
,
false
,
true
,
false
,
"Grant"
),
//
("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
...
...
@@ -38,18 +38,42 @@ public class PerSheetHeader
(
"核算单元"
,
(
t
)
=>
t
.
AccountingUnit
,
1
,
1
,
false
,
false
,
false
,
"AccountingUnit"
),
(
"人员工号"
,
(
t
)
=>
t
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
false
,
"PersonnelNumber"
),
(
"医生姓名"
,
(
t
)
=>
t
.
DoctorName
,
1
,
1
,
false
,
false
,
false
,
"DoctorName"
),
(
"职称"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
,
"PostCoefficient"
),
(
"职务分类"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
//("岗位系数", (t) => t.PostCoefficient, 1, 1, false, true, false, "PostCoefficient"),
(
"基础绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Basics
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
false
,
"Basics"
),
(
"效率绩效人数"
,
(
t
)
=>
Math
.
Round
(
t
.
PermanentStaff
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"PermanentStaff"
),
(
"效率绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Efficiency
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Efficiency"
),
(
"规模绩效系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Scale
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Scale"
),
(
"管理绩效发放系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Management
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Management"
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoreAverageRate
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"ScoreAverageRate"
),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
(
"医院奖罚"
,
(
t
)
=>
t
.
Punishment
,
1
,
1
,
false
,
true
,
false
,
"Punishment"
),
//
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public
static
List
<(
string
,
Func
<
im_employee_logistics
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
employeeLogisticsHeaders
=
new
List
<(
string
,
Func
<
im_employee_logistics
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
{
(
"人员分类"
,
(
t
)
=>
t
.
AccountType
,
1
,
1
,
false
,
false
,
false
,
"AccountType"
),
(
"核算单元"
,
(
t
)
=>
t
.
AccountingUnit
,
1
,
1
,
false
,
false
,
false
,
"AccountingUnit"
),
(
"人员工号"
,
(
t
)
=>
t
.
PersonnelNumber
,
1
,
1
,
false
,
false
,
false
,
"PersonnelNumber"
),
(
"人员姓名"
,
(
t
)
=>
t
.
DoctorName
,
1
,
1
,
false
,
false
,
false
,
"DoctorName"
),
(
"职务分类"
,
(
t
)
=>
t
.
JobTitle
,
1
,
1
,
false
,
true
,
false
,
"JobTitle"
),
(
"绩效基数核算参考对象"
,
(
t
)
=>
t
.
FitPeople
,
1
,
1
,
false
,
false
,
false
,
"FitPeople"
),
(
"岗位系数"
,
(
t
)
=>
t
.
PostCoefficient
,
1
,
1
,
false
,
true
,
false
,
"PostCoefficient"
),
//("参加工作时间", (t) => t.WorkTime, 1, 1, false, false, false, "WorkTime"),
//("考核得分率", (t) => Math.Round(t.ScoreAverageRate.Value * 100, 2) , 1, 1, false, true, true, "ScoreAverageRate"),
(
"出勤率"
,
(
t
)
=>
Math
.
Round
(
t
.
Attendance
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Attendance"
),
//("核算单元医生数", (t) => t.PeopleNumber, 1, 1, false, true, false, "PeopleNumber"),
//("工作量绩效", (t) =>t.Workload, 1, 1, false, true, false, "Workload"),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
//("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
//("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
//("发放系数", (t) => t.Grant, 1, 1, false, true, false, "Grant"),
};
// Tuple Items: 列明, 字段名, mergeRow, mergeCell, isTotal, isNumValue, 是否含有%
public
static
List
<(
string
,
Func
<
im_specialunit
,
object
>,
int
,
int
,
bool
,
bool
,
bool
,
string
)>
specialUnitHeaders
=
...
...
@@ -61,10 +85,10 @@ public class PerSheetHeader
(
"量化指标"
,
(
t
)
=>
t
.
QuantitativeIndicators
,
1
,
1
,
false
,
true
,
false
,
"QuantitativeIndicators"
),
(
"数量"
,
(
t
)
=>
t
.
Quantity
,
1
,
1
,
false
,
true
,
false
,
"Quantity"
),
(
"量化指标绩效分值"
,
(
t
)
=>
t
.
QuantitativeIndicatorsValue
,
1
,
1
,
false
,
true
,
false
,
"QuantitativeIndicatorsValue"
),
(
"考核得分率"
,
(
t
)
=>
Math
.
Round
(
t
.
ScoringAverage
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"ScoringAverage"
),
(
"其他绩效"
,
(
t
)
=>
t
.
OtherPerfor
,
1
,
1
,
false
,
true
,
false
,
"OtherPerfor"
),
(
"医院奖罚"
,
(
t
)
=>
t
.
Punishment
,
1
,
1
,
false
,
true
,
false
,
"Punishment"
),
(
"调节系数"
,
(
t
)
=>
Math
.
Round
(
t
.
Adjust
.
Value
*
100
,
2
),
1
,
1
,
false
,
true
,
true
,
"Adjust"
),
//
("考核得分率", (t) => Math.Round(t.ScoringAverage.Value * 100, 2), 1, 1, false, true, true, "ScoringAverage"),
//
("其他绩效", (t) => t.OtherPerfor, 1, 1, false, true, false, "OtherPerfor"),
//
("医院奖罚", (t) => t.Punishment, 1, 1, false, true, false, "Punishment"),
//
("调节系数", (t) => Math.Round(t.Adjust.Value * 100, 2), 1, 1, false, true, true, "Adjust"),
};
}
}
performance/Performance.DtoModels/PerExcel/TotalSumResult.cs
0 → 100644
View file @
f76984c7
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
AccountUnitTotal
{
public
string
UnitType
{
get
;
set
;
}
public
string
AccountingUnit
{
get
;
set
;
}
public
decimal
?
TotelValue
{
get
;
set
;
}
}
public
class
EmpolyeeTotal
:
AccountUnitTotal
{
public
string
JobNumber
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
f76984c7
...
...
@@ -97,6 +97,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> </summary>
public
virtual
DbSet
<
im_employee_clinic
>
im_employee_clinic
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
im_employee_logistics
>
im_employee_logistics
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
im_header
>
im_header
{
get
;
set
;
}
/// <summary> 特殊科室核算 </summary>
public
virtual
DbSet
<
im_specialunit
>
im_specialunit
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/im_accountbasic.cs
View file @
f76984c7
...
...
@@ -46,10 +46,10 @@ public class im_accountbasic
/// </summary>
public
string
NurseAccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
///
//
<summary>
///
//
科室
///
//
</summary>
//
public string Department { get; set; }
/// <summary>
/// 是否带入平均计算 是 否
...
...
@@ -76,10 +76,10 @@ public class im_accountbasic
/// </summary>
public
Nullable
<
decimal
>
DoctorBasicFactor
{
get
;
set
;
}
/// <summary>
/// 倾斜系数
/// </summary>
public
Nullable
<
decimal
>
DoctorSlopeFactor
{
get
;
set
;
}
///
//
<summary>
///
//
倾斜系数
///
//
</summary>
//
public Nullable<decimal> DoctorSlopeFactor { get; set; }
/// <summary>
/// 规模绩效系数
...
...
@@ -116,10 +116,10 @@ public class im_accountbasic
/// </summary>
public
Nullable
<
decimal
>
MaterialsExtra
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
DoctorExtra
{
get
;
set
;
}
///
//
<summary>
///
//
医院奖罚
///
//
</summary>
//
public Nullable<decimal> DoctorExtra { get; set; }
/// <summary>
/// 考核对分率
...
...
performance/Performance.EntityModels/Entity/im_employee_clinic.cs
View file @
f76984c7
...
...
@@ -7,135 +7,140 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"im_employee_clinic"
)]
public
class
im_employee_clinic
public
class
im_employee_clinic
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// sheet页id
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元分类
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 基础绩效系数
/// </summary>
public
Nullable
<
decimal
>
Basics
{
get
;
set
;
}
/// <summary>
/// 岗位系数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 效率绩效人数
/// </summary>
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
/// <summary>
/// 效率绩效系数
/// </summary>
public
Nullable
<
decimal
>
Efficiency
{
get
;
set
;
}
/// <summary>
/// 规模绩效系数
/// </summary>
public
Nullable
<
decimal
>
Scale
{
get
;
set
;
}
/// <summary>
/// 管理绩效发放系数
/// </summary>
public
Nullable
<
decimal
>
Management
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoreAverageRate
{
get
;
set
;
}
/// <summary>
/// 出勤率
/// </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
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 发放系数
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
UpdateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
...
...
performance/Performance.EntityModels/Entity/im_employee_logistics.cs
0 → 100644
View file @
f76984c7
//-----------------------------------------------------------------------
// <copyright file=" im_employee_clinic.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"im_employee_logistics"
)]
public
class
im_employee_logistics
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// sheet页id
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary>
public
string
AccountType
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public
string
FitPeople
{
get
;
set
;
}
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public
Nullable
<
decimal
>
FitPeopleValue
{
get
;
set
;
}
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary>
public
Nullable
<
decimal
>
FitPeopleRatio
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 岗位系数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
///// <summary>
///// 参加工作时间
///// </summary>
//public Nullable<DateTime> WorkTime { get; set; }
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoreAverageRate
{
get
;
set
;
}
/// <summary>
/// 出勤率
/// </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
>
OtherPerfor
{
get
;
set
;
}
///// <summary>
///// 医院奖罚
///// </summary>
//public Nullable<decimal> Punishment { get; set; }
///// <summary>
///// 调节系数
///// </summary>
//public Nullable<decimal> Adjust { get; set; }
///// <summary>
///// 发放系数
///// </summary>
//public Nullable<decimal> Grant { get; set; }
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
UpdateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
UpdateUser
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/res_account.cs
View file @
f76984c7
...
...
@@ -51,10 +51,10 @@ public class res_account
/// </summary>
public
string
IncludeAvgCalculate
{
get
;
set
;
}
/// <summary>
/// 定科人数
/// </summary>
public
Nullable
<
decimal
>
PermanentStaff
{
get
;
set
;
}
///
//
<summary>
///
//
定科人数
///
//
</summary>
//
public Nullable<decimal> PermanentStaff { get; set; }
/// <summary>
/// 科主任/护士长数量
...
...
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
f76984c7
...
...
@@ -25,6 +25,7 @@ public int DeleteData(int allotId)
"im_data"
,
"im_employee"
,
"im_employee_clinic"
,
"im_employee_logistics"
,
"im_header"
,
"im_specialunit"
,
"per_sheet"
,
...
...
performance/Performance.Repository/Repository/PerforImemployeelogisticsRepository.cs
0 → 100644
View file @
f76984c7
//-----------------------------------------------------------------------
// <copyright file=" im_employee_clinic.cs">
// * FileName: im_employee_clinic.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// im_employee_clinic Repository
/// </summary>
public
partial
class
PerforImemployeelogisticsRepository
:
PerforRepository
<
im_employee_logistics
>
{
public
PerforImemployeelogisticsRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/BaiscNormService.cs
View file @
f76984c7
...
...
@@ -45,18 +45,16 @@ public List<res_baiscnorm> ComputeAvg(List<res_baiscnorm> baiscnormList, List<im
}
/// <summary>
///
院领导、行政中层、
行政工勤 平均值
/// 行政工勤 平均值
/// </summary>
/// <param name="computes"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
ComputeOtherAvg
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
ComputeResult
>
computes
,
List
<
im_employee
>
empolyeeList
)
public
List
<
res_baiscnorm
>
ComputeOtherAvg
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
ComputeResult
>
computes
,
List
<
im_employee
_logistics
>
empolyeeList
)
{
var
keyList
=
new
[]
{
//行政绩效平均值项目
new
{
type
=
AccountUnitType
.
行政中层
,
reference
=
PerforType
.
行政中层
},
new
{
type
=
AccountUnitType
.
行政工勤
,
reference
=
PerforType
.
行政工勤
},
new
{
type
=
AccountUnitType
.
行政高层
,
reference
=
PerforType
.
行政高层
},
};
foreach
(
var
item
in
keyList
)
...
...
@@ -70,80 +68,113 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
PositionName
=
EnumHelper
.
GetDescription
(
item
.
reference
),
TotelNumber
=
count
,
TotelValue
=
dataList
.
Sum
(
t
=>
t
.
GiveFee
),
AvgValue
=
dataList
.
Sum
(
t
=>
t
.
GiveFee
)
/
count
};
baiscnormList
.
Add
(
baiscnorm
);
}
AvgValue
=
Math
.
Round
((
dataList
.
Sum
(
t
=>
t
.
GiveFee
)
/
count
)
??
0
)
};
baiscnormList
.
Add
(
baiscnorm
);
}
}
return
baiscnormList
;
}
/// <summary>
/// 获取绩效标准基础值
/// </summary>
/// <param name="baiscnorms"></param>
/// <param name="type"></param>
/// <returns></returns>
public
decimal
?
GetBaiscNorm
(
List
<
res_baiscnorm
>
baiscnorms
,
PerforType
type
)
/// <summary>
/// 院领导、行政中层 平均值
/// </summary>
/// <param name="computes"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
ComputeOtherAvg
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
ComputeResult
>
computes
,
List
<
im_employee
>
empolyeeList
)
{
var
keyList
=
new
[]
{
decimal
?
result
=
null
;
if
(
type
==
PerforType
.
临床主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
if
(
type
==
PerforType
.
临床主任医技主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
yjzrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
医技主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
yjzrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
yjzrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
//行政绩效平均值项目
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
());
if
(
count
>
0
)
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
type
))?.
AvgValue
;
var
dataList
=
computes
.
Where
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
());
var
baiscnorm
=
new
res_baiscnorm
{
PositionName
=
EnumHelper
.
GetDescription
(
item
.
reference
),
TotelNumber
=
count
,
TotelValue
=
dataList
.
Sum
(
t
=>
t
.
GiveFee
),
AvgValue
=
Math
.
Round
((
dataList
.
Sum
(
t
=>
t
.
GiveFee
)
/
count
)
??
0
)
};
baiscnormList
.
Add
(
baiscnorm
);
}
}
return
baiscnormList
;
}
if
(
result
.
HasValue
)
result
=
Math
.
Round
(
result
.
Value
,
4
);
return
result
;
/// <summary>
/// 获取绩效标准基础值
/// </summary>
/// <param name="baiscnorms"></param>
/// <param name="type"></param>
/// <returns></returns>
public
decimal
?
GetBaiscNorm
(
List
<
res_baiscnorm
>
baiscnorms
,
PerforType
type
)
{
decimal
?
result
=
null
;
if
(
type
==
PerforType
.
临床主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
if
(
type
==
PerforType
.
临床主任医技主任护士长平均
)
{
var
lczrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
临床主任
));
var
yjzrValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
医技主任
));
var
hszValue
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
护士长
));
var
total
=
((
lczrValue
?.
TotelNumber
??
0
)
+
(
yjzrValue
?.
TotelNumber
??
0
)
+
(
hszValue
?.
TotelNumber
??
0
));
result
=
total
==
0
?
0
:
((
lczrValue
?.
TotelValue
??
0
)
+
(
yjzrValue
?.
TotelValue
??
0
)
+
(
hszValue
?.
TotelValue
??
0
))
/
total
;
}
else
{
result
=
baiscnorms
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
type
))?.
AvgValue
;
}
/// <summary>
/// 获取临床医生护士平均绩效
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
DocterNurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
list
)
if
(
result
.
HasValue
)
result
=
Math
.
Round
(
result
.
Value
,
4
);
return
result
;
}
/// <summary>
/// 获取临床医生护士平均绩效
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
List
<
res_baiscnorm
>
DocterNurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
list
)
{
var
pairs
=
new
[]
{
var
pairs
=
new
[]
{
new
{
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitType
=
UnitType
.
医生组
,
PerforType
=
PerforType
.
临床医生
},
new
{
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitType
=
UnitType
.
医技组
,
PerforType
=
PerforType
.
医技医生
},
new
{
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitType
=
UnitType
.
护理组
,
PerforType
=
PerforType
.
护士
},
};
foreach
(
var
info
in
pairs
)
{
var
sheet
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
info
.
SheetType
);
var
perData
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
//剔除不同科室相同核算单元
var
groupData
=
perData
.
Where
(
t
=>
t
.
UnitType
==
info
.
UnitType
.
ToString
())
.
GroupBy
(
t
=>
t
.
AccountingUnit
)
.
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
Number
=
t
.
Sum
(
p
=>
p
.
ManagerNumber
+
p
.
Number
),
PerforTotal
=
t
.
Sum
(
p
=>
p
.
PerforTotal
)
});
foreach
(
var
info
in
pairs
)
{
var
sheet
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
info
.
SheetType
);
var
perData
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
//剔除不同科室相同核算单元
var
groupData
=
perData
.
Where
(
t
=>
t
.
UnitType
==
info
.
UnitType
.
ToString
())
.
GroupBy
(
t
=>
t
.
AccountingUnit
)
.
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
Number
=
t
.
Sum
(
p
=>
p
.
ManagerNumber
+
p
.
Number
),
PerforTotal
=
t
.
Sum
(
p
=>
p
.
PerforTotal
)
});
var
baiscnorm
=
new
res_baiscnorm
{
PositionName
=
EnumHelper
.
GetDescription
(
info
.
PerforType
),
TotelNumber
=
groupData
.
Sum
(
t
=>
t
.
Number
),
TotelValue
=
groupData
.
Sum
(
t
=>
t
.
PerforTotal
),
AvgValue
=
Math
.
Round
(
groupData
.
Sum
(
t
=>
t
.
PerforTotal
)
/
groupData
.
Sum
(
t
=>
t
.
Number
)
??
0
)
};
baiscnormList
.
Add
(
baiscnorm
);
}
return
baiscnormList
;
var
baiscnorm
=
new
res_baiscnorm
{
PositionName
=
EnumHelper
.
GetDescription
(
info
.
PerforType
),
TotelNumber
=
groupData
.
Sum
(
t
=>
t
.
Number
),
TotelValue
=
groupData
.
Sum
(
t
=>
t
.
PerforTotal
),
AvgValue
=
Math
.
Round
(
groupData
.
Sum
(
t
=>
t
.
PerforTotal
)
/
groupData
.
Sum
(
t
=>
t
.
Number
)
??
0
)
};
baiscnormList
.
Add
(
baiscnorm
);
}
return
baiscnormList
;
}
}
}
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
f76984c7
...
...
@@ -29,6 +29,7 @@ public class ImportDataService : IAutoInjection
private
PerforImaccountbasicRepository
perforImaccountbasicRepository
;
private
PerforImspecialunitRepository
perforImspecialunitRepository
;
private
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
;
//private PerforLogdbugRepository logdbug;
private
readonly
LogManageService
logManageService
;
private
ILogger
<
ImportDataService
>
logger
;
...
...
@@ -42,6 +43,7 @@ public class ImportDataService : IAutoInjection
PerforImaccountbasicRepository
perforImaccountbasicRepository
,
PerforImspecialunitRepository
perforImspecialunitRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
,
//PerforLogdbugRepository logdbug
LogManageService
logManageService
,
ILogger
<
ImportDataService
>
logger
)
...
...
@@ -55,6 +57,7 @@ public class ImportDataService : IAutoInjection
this
.
perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
this
.
perforImspecialunitRepository
=
perforImspecialunitRepository
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforImemployeelogisticsRepository
=
perforImemployeelogisticsRepository
;
//this.logdbug = logdbug;
this
.
logManageService
=
logManageService
;
this
.
logger
=
logger
;
...
...
@@ -164,7 +167,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
var
imdata
=
Mapper
.
Map
<
im_employee
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
imdata
.
OtherPerfor
=
data
.
OthePerfor
;
//
imdata.OtherPerfor = data.OthePerfor;
addList
.
Add
(
imdata
);
}
perforImEmployeeRepository
.
AddRange
(
addList
.
ToArray
());
...
...
@@ -203,13 +206,52 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
var
imdata
=
Mapper
.
Map
<
im_employee_clinic
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
imdata
.
OtherPerfor
=
data
.
OthePerfor
;
//
imdata.OtherPerfor = data.OthePerfor;
addList
.
Add
(
imdata
);
}
perforImemployeeclinicRepository
.
AddRange
(
addList
.
ToArray
());
}
/// <summary>
/// 保存临床人员
/// </summary>
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveLogisticsEmployee
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataLogisticsEmployee
)
t
);
//新上传名单中无人员名单,取到最后日期的数据
if
(
dataList
==
null
||
dataList
.
Count
()
<=
0
)
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
);
foreach
(
var
item
in
allotList
)
{
var
employeeList
=
perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
item
.
ID
);
if
(
employeeList
!=
null
&&
employeeList
.
Count
>
0
)
{
dataList
=
Mapper
.
Map
<
List
<
PerDataLogisticsEmployee
>>(
employeeList
);
break
;
}
}
}
List
<
im_employee_logistics
>
addList
=
new
List
<
im_employee_logistics
>();
foreach
(
var
data
in
dataList
)
{
var
imdata
=
Mapper
.
Map
<
im_employee_logistics
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
//imdata.OtherPerfor = data.OthePerfor;
addList
.
Add
(
imdata
);
}
perforImemployeelogisticsRepository
.
AddRange
(
addList
.
ToArray
());
}
/// <summary>
/// 保存科室绩效基础表
/// </summary>
/// <param name="sheet"></param>
...
...
@@ -345,6 +387,10 @@ private bool Save(PerExcel excel, int allotId)
{
SaveEmployee
(
sheet
,
allotId
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
LogisticsEmployee
)
{
SaveLogisticsEmployee
(
sheet
,
allotId
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
ClinicEmployee
)
{
SaveClinicEmployee
(
sheet
,
allotId
);
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
f76984c7
...
...
@@ -238,43 +238,26 @@ public void Save(List<PerSheet> perSheets, int allotId)
return
(
perSheet
,
mergeSheets
);
}
/// <summary>
/// 计算科室绩效
/// </summary>
/// <param name="dataList"></param>
/// <param name="economicData"></param>
/// <param name="workloadData"></param>
/// <param name="excel"></param>
/// <param name="perSheet"></param>
/// <returns></returns>
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
List
<
res_baiscnorm
>
baiscnormList
,
bool
isFirst
=
false
)
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
IEnumerable
<
AccountUnitTotal
>
extras
)
{
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
var
accountList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
deptExtra
=
new
List
<
PerData
>();
var
deptAccountAssess
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountAssess
);
if
(
deptAccountAssess
!=
null
&&
deptAccountAssess
.
PerData
!=
null
)
{
var
assessList
=
deptAccountAssess
.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
if
(
isFirst
&&
assessList
!=
null
&&
assessList
.
Any
())
{
deptExtra
=
assessList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
,
t
.
Department
}).
Select
(
t
=>
new
PerData
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
Department
,
CellValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
}).
ToList
();
}
}
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
pairs
=
new
[]
{
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他医技组
,
UnitType
.
其他医生组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
,
UnitType
.
其他护理组
}
},
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他医技组
,
UnitType
.
其他医生组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
,
UnitType
.
其他护理组
}
},
};
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
foreach
(
var
info
in
pairs
)
...
...
@@ -282,94 +265,33 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
PerSheet
sheet
=
new
PerSheet
(
info
.
Name
,
info
.
Name
,
info
.
SheetType
,
new
List
<
PerHeader
>(),
new
List
<
IPerData
>());
foreach
(
var
unitType
in
info
.
UnitTypes
)
{
var
atDataList
=
accountList
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
());
if
(
atDataList
==
null
||
!
atDataList
.
Any
())
continue
;
foreach
(
var
dept
in
accountList
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()))
var
atDataList
=
accountList
?.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
!
string
.
IsNullOrEmpty
(
t
.
AccountingUnit
));
foreach
(
var
dept
in
atDataList
)
{
if
(
string
.
IsNullOrEmpty
(
dept
.
AccountingUnit
))
continue
;
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
//科室奖罚汇总结果
var
extra
=
extras
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
unitType
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
var
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
if
(
UnitType
.
专家组
==
unitType
||
UnitType
.
其他医技组
==
unitType
||
UnitType
.
其他医生组
==
unitType
||
UnitType
.
其他护理组
==
unitType
)
{
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
);
}
else
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
{
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
Department
&&
t
.
UnitType
==
UnitType
.
医生组
.
ToString
());
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
}
//保底绩效
if
(!
string
.
IsNullOrEmpty
(
dept
.
MinimumReference
))
{
string
minimumReference
=
dept
.
MinimumReference
;
if
(
dept
.
MinimumReference
==
EnumHelper
.
GetDescription
(
MinimumType
.
自定义保底
))
minimumReference
=
GetCustomMinimumName
(
dept
.
Department
,
unitType
.
ToString
());
var
minimum
=
baiscnormList
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
minimumReference
);
if
(
minimum
!=
null
)
dept
.
MinimumFee
=
minimum
.
AvgValue
*
(
dept
.
MinimumFactor
??
0
)
*
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
var
extra
=
deptExtra
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
dept
.
AccountingUnit
&&
t
.
UnitType
==
dept
.
UnitType
&&
t
.
Department
==
dept
.
Department
);
if
(
isFirst
&&
extra
!=
null
)
dept
.
Extra
+=
extra
.
CellValue
??
0
;
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
());
dept
.
MedicineFactor
=
workDoctor
?.
MedicineFactor
;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
==
0
m
?
1
:
dept
.
ScoringAverage
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
WorkSlopeFactor
=
dept
.
WorkSlopeFactor
==
0
m
?
1
:
dept
.
WorkSlopeFactor
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
dept
.
WorkSlopeFactor
*
(
workDoctor
?.
CellValue
??
0
)
;
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
)
;
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
)
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
)
??
0
);
dept
.
WorkloadFee
=
workDoctor
?.
CellValue
??
0
;
dept
.
PerforFee
=
dept
.
Income
*
dept
.
BasicFactor
;
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
OtherPerfor2
+
(
extra
??
0
)
)
*
dept
.
AdjustFactor
)
??
0
);
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
#
region
共用核算单元算法调整
20190920
新都调整
var
multi
=
atDataList
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
})
.
Select
(
t
=>
new
{
t
.
Key
.
UnitType
,
t
.
Key
.
AccountingUnit
,
Count
=
t
.
Count
(),
})
.
Where
(
t
=>
t
.
Count
>
1
);
if
(
multi
!=
null
&&
multi
.
Any
())
{
foreach
(
var
item
in
atDataList
)
{
if
(
multi
.
Any
(
group
=>
group
.
UnitType
==
item
.
UnitType
&&
group
.
AccountingUnit
==
item
.
AccountingUnit
))
item
.
Remark
=
"特殊科室,共用核算单元"
;
}
}
//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 = "特殊科室,共用核算单元";
// }
// }
//}
#
endregion
sheet
.
PerData
.
AddRange
(
atDataList
);
}
result
.
Add
(
sheet
);
...
...
@@ -377,145 +299,190 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
return
result
;
}
/// <summary>
///
计算保底绩效参考标准
///
获取科室奖罚汇总结果
/// </summary>
/// <param name="baiscnormList"></param>
/// <param name="allotId"></param>
public
List
<
res_baiscnorm
>
ComputeMinimum
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
int
allotId
)
/// <param name="excel"></param>
public
IEnumerable
<
AccountUnitTotal
>
GetAccountExtra
(
PerExcel
excel
)
{
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
var
accountList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
basicRuleList
=
new
[]
{
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底临床医生
,
UnitType
=
UnitType
.
医生组
},
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底医技医生
,
UnitType
=
UnitType
.
医技组
},
new
{
Data
=
nurseWorkloadData
,
MinimumType
=
MinimumType
.
保底护士
,
UnitType
=
UnitType
.
护理组
},
};
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
foreach
(
var
rule
in
basicRuleList
)
{
var
dataList
=
accountList
.
Where
(
t
=>
t
.
UnitType
==
rule
.
UnitType
.
ToString
());
var
count
=
dataList
.
Sum
(
t
=>
t
.
ManagerNumber
+
t
.
Number
);
decimal
totalValue
=
0
m
;
foreach
(
var
dept
in
dataList
)
{
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
rule
.
UnitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workDoctor
=
rule
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
rule
.
UnitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
income
=
econDoctor
?.
CellValue
??
0
;
var
workloadFee
=
workDoctor
?.
CellValue
??
0
;
var
perforFee
=
income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
var
perforTotal
=
perforFee
+
workloadFee
;
totalValue
+=
perforTotal
;
}
var
baiscnorm
=
new
res_baiscnorm
{
AllotID
=
allotId
,
PositionName
=
EnumHelper
.
GetDescription
(
rule
.
MinimumType
),
TotelNumber
=
count
,
TotelValue
=
totalValue
,
AvgValue
=
count
==
0
?
0
:
totalValue
/
count
};
baiscnormList
.
Add
(
baiscnorm
);
}
return
baiscnormList
;
var
assessList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)
?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
return
assessList
?.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
})
?.
Select
(
t
=>
new
AccountUnitTotal
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
TotelValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
});
}
/// <summary>
///
计算科室自定义保底绩效范围(根据配置的科室范围计算人均绩效)
///
业务中层行政中高层医院奖罚
/// </summary>
/// <param name="excel"></param>
/// <param name="perSheet"></param>
/// <param name="baiscnormList"></param>
/// <param name="allotId"></param>
public
void
ComputeCustomMinimum
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
List
<
res_baiscnorm
>
baiscnormList
,
int
allotId
)
public
IEnumerable
<
EmpolyeeTotal
>
GetEmployeeExtra
(
PerExcel
excel
)
{
var
guaranteeList
=
guaranteeService
.
Guarantee
(
allotId
);
if
(
guaranteeList
==
null
||
!
guaranteeList
.
Any
())
return
;
var
guaranteeGroupList
=
guaranteeList
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
Target
)
&&
!
string
.
IsNullOrEmpty
(
t
.
Source
))
.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
Target
})
.
Select
(
t
=>
new
{
t
.
Key
.
UnitType
,
t
.
Key
.
Target
,
Priority
=
t
.
Min
(
m
=>
m
.
Priority
),
Items
=
t
.
Select
(
m
=>
m
.
Source
)
});
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
var
accountList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
assessList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
PersonExtra
)
?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
return
assessList
?.
GroupBy
(
t
=>
new
{
t
.
UnitType
,
t
.
AccountingUnit
,
t
.
JobNumber
,
t
.
EmployeeName
,
})
?.
Select
(
t
=>
new
EmpolyeeTotal
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
JobNumber
=
t
.
Key
.
JobNumber
,
EmployeeName
=
t
.
Key
.
EmployeeName
,
TotelValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
});
}
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
var
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
///// <summary>
///// 计算保底绩效参考标准
///// </summary>
///// <param name="baiscnormList"></param>
///// <param name="allotId"></param>
//public List<res_baiscnorm> ComputeMinimum(PerExcel excel, List<PerSheet> perSheet, int allotId)
//{
// var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic);
// var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t);
// var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t);
// var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
// var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
// var basicRuleList = new[]
// {
// new { Data = doctorWorkloadData, MinimumType = MinimumType.保底临床医生, UnitType = UnitType.医生组 },
// new { Data = doctorWorkloadData, MinimumType = MinimumType.保底医技医生, UnitType = UnitType.医技组 },
// new { Data = nurseWorkloadData, MinimumType = MinimumType.保底护士, UnitType = UnitType.护理组 },
// };
// List<res_baiscnorm> baiscnormList = new List<res_baiscnorm>();
// foreach (var rule in basicRuleList)
// {
// var dataList = accountList.Where(t => t.UnitType == rule.UnitType.ToString());
// var count = dataList.Sum(t => t.ManagerNumber + t.Number);
// decimal totalValue = 0m;
// foreach (var dept in dataList)
// {
// var econDoctor = economicData.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
// var workDoctor = rule.Data.FirstOrDefault(t => t.UnitType == rule.UnitType.ToString() && t.AccountingUnit == dept.Department);
// var income = econDoctor?.CellValue ?? 0;
// var workloadFee = workDoctor?.CellValue ?? 0;
// var perforFee = income * (dept.BasicFactor + dept.SlopeFactor);
// var perforTotal = perforFee + workloadFee;
// totalValue += perforTotal;
// }
// var baiscnorm = new res_baiscnorm
// {
// AllotID = allotId,
// PositionName = EnumHelper.GetDescription(rule.MinimumType),
// TotelNumber = count,
// TotelValue = totalValue,
// AvgValue = count == 0 ? 0 : totalValue / count
// };
// baiscnormList.Add(baiscnorm);
// }
// return baiscnormList;
//}
var
basicRuleList
=
new
[]
{
new
{
Data
=
doctorWorkloadData
,
UnitType
=
UnitType
.
医生组
},
new
{
Data
=
doctorWorkloadData
,
UnitType
=
UnitType
.
医技组
},
new
{
Data
=
nurseWorkloadData
,
UnitType
=
UnitType
.
护理组
},
};
List
<
res_baiscnorm
>
newBaiscnormList
=
new
List
<
res_baiscnorm
>();
foreach
(
var
guaranteeGroup
in
guaranteeGroupList
)
{
var
unitType
=
(
UnitType
)
guaranteeGroup
.
UnitType
;
var
dataList
=
accountList
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
guaranteeGroup
.
Items
.
Contains
(
t
.
Department
));
var
count
=
dataList
.
Sum
(
t
=>
t
.
ManagerNumber
+
t
.
Number
);
decimal
totalValue
=
0
m
;
foreach
(
var
dept
in
dataList
)
{
var
econDoctor
=
economicData
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
var
workdata
=
basicRuleList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
)?.
Data
;
var
workload
=
workdata
==
null
?
null
:
workdata
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
Department
);
//保底绩效
var
minimumReference
=
dept
.
MinimumReference
;
if
(
dept
.
MinimumReference
==
EnumHelper
.
GetDescription
(
MinimumType
.
自定义保底
))
minimumReference
=
GetCustomMinimumName
(
dept
.
Department
,
unitType
.
ToString
());
var
minimum
=
baiscnormList
.
FirstOrDefault
(
t
=>
t
.
PositionName
==
minimumReference
);
if
(!
string
.
IsNullOrEmpty
(
dept
.
MinimumReference
)
&&
minimum
!=
null
)
dept
.
MinimumFee
=
minimum
.
AvgValue
*
(
dept
.
MinimumFactor
??
0
)
*
(
dept
.
ManagerNumber
+
dept
.
Number
);
dept
.
ScoringAverage
=
dept
.
ScoringAverage
==
0
m
?
1
:
dept
.
ScoringAverage
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
1
:
dept
.
AdjustFactor
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workload
?.
CellValue
??
0
;
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
totalValue
+=
(
dept
.
PerforTotal
??
0
);
}
var
baiscnorm
=
new
res_baiscnorm
{
AllotID
=
allotId
,
PositionName
=
GetCustomMinimumName
(
guaranteeGroup
.
Target
,
unitType
.
ToString
()),
TotelNumber
=
count
,
TotelValue
=
totalValue
,
AvgValue
=
count
==
0
?
0
:
totalValue
/
count
};
baiscnormList
.
Add
(
baiscnorm
);
}
}
///// <summary>
///// 计算科室自定义保底绩效范围(根据配置的科室范围计算人均绩效)
///// </summary>
///// <param name="excel"></param>
///// <param name="perSheet"></param>
///// <param name="baiscnormList"></param>
///// <param name="allotId"></param>
//public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<res_baiscnorm> baiscnormList, int allotId)
//{
// var guaranteeList = guaranteeService.Guarantee(allotId);
// if (guaranteeList == null || !guaranteeList.Any())
// return;
// var guaranteeGroupList = guaranteeList
// .Where(t => !string.IsNullOrEmpty(t.Target) && !string.IsNullOrEmpty(t.Source))
// .GroupBy(t => new { t.UnitType, t.Target })
// .Select(t => new { t.Key.UnitType, t.Key.Target, Priority = t.Min(m => m.Priority), Items = t.Select(m => m.Source) });
// var deptAccounting = excel.PerSheet.FirstOrDefault(t => t.SheetType == SheetType.AccountBasic);
// var accountList = deptAccounting.PerData.Select(t => (PerDataAccountBaisc)t);
// var economicData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeEconomic)?.PerData.Select(t => (PerData)t);
// var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
// var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
// var basicRuleList = new[]
// {
// new { Data = doctorWorkloadData, UnitType = UnitType.医生组 },
// new { Data = doctorWorkloadData, UnitType = UnitType.医技组 },
// new { Data = nurseWorkloadData, UnitType = UnitType.护理组 },
// };
// List<res_baiscnorm> newBaiscnormList = new List<res_baiscnorm>();
// foreach (var guaranteeGroup in guaranteeGroupList)
// {
// var unitType = (UnitType)guaranteeGroup.UnitType;
// var dataList = accountList.Where(t => t.UnitType == unitType.ToString() && guaranteeGroup.Items.Contains(t.Department));
// var count = dataList.Sum(t => t.ManagerNumber + t.Number);
// decimal totalValue = 0m;
// foreach (var dept in dataList)
// {
// var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
// var workdata = basicRuleList.FirstOrDefault(t => t.UnitType == unitType)?.Data;
// var workload = workdata == null ? null : workdata.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
// //保底绩效
// var minimumReference = dept.MinimumReference;
// if (dept.MinimumReference == EnumHelper.GetDescription(MinimumType.自定义保底))
// minimumReference = GetCustomMinimumName(dept.Department, unitType.ToString());
// var minimum = baiscnormList.FirstOrDefault(t => t.PositionName == minimumReference);
// if (!string.IsNullOrEmpty(dept.MinimumReference) && minimum != null)
// dept.MinimumFee = minimum.AvgValue * (dept.MinimumFactor ?? 0) * (dept.ManagerNumber + dept.Number);
// dept.ScoringAverage = dept.ScoringAverage == 0m ? 1 : dept.ScoringAverage;
// dept.AdjustFactor = dept.AdjustFactor == 0m ? 1 : dept.AdjustFactor;
// dept.Income = econDoctor?.CellValue ?? 0;
// dept.WorkloadFee = workload?.CellValue ?? 0;
// dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
// dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
// dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
// dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
// totalValue += (dept.PerforTotal ?? 0);
// }
// var baiscnorm = new res_baiscnorm
// {
// AllotID = allotId,
// PositionName = GetCustomMinimumName(guaranteeGroup.Target, unitType.ToString()),
// TotelNumber = count,
// TotelValue = totalValue,
// AvgValue = count == 0 ? 0 : totalValue / count
// };
// baiscnormList.Add(baiscnorm);
// }
//}
/// <summary>
/// 生成自定义保底名称
/// </summary>
/// <param name="department"></param>
/// <returns></returns>
private
string
GetCustomMinimumName
(
string
department
,
string
unitType
)
{
return
$"
{
EnumHelper
.
GetDescription
(
MinimumType
.
自定义保底
)}
(
{
unitType
}
-
{
department
}
)"
;
}
///
//
<summary>
///
//
生成自定义保底名称
///
//
</summary>
///
//
<param name="department"></param>
///
//
<returns></returns>
//
private string GetCustomMinimumName(string department, string unitType)
//
{
//
return $"{EnumHelper.GetDescription(MinimumType.自定义保底)}({unitType}-{department})";
//
}
/// <summary>
/// 获取药占比分割比例
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
f76984c7
...
...
@@ -25,6 +25,7 @@ public class ResultComputeService : IAutoInjection
private
readonly
PerforImaccountbasicRepository
perforImaccountbasicRepository
;
private
readonly
LogManageService
logManageService
;
private
readonly
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
readonly
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
;
public
ResultComputeService
(
PerforImemployeeRepository
perforImEmployeeRepository
,
...
...
@@ -34,7 +35,8 @@ public class ResultComputeService : IAutoInjection
PerforImaccountbasicRepository
perforImaccountbasicRepository
,
BaiscNormService
baiscNormService
,
ComputeDirector
computeDirector
,
LogManageService
logManageService
,
BudgetService
budgetService
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
)
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
)
{
this
.
baiscNormService
=
baiscNormService
;
this
.
computeDirector
=
computeDirector
;
...
...
@@ -46,13 +48,15 @@ public class ResultComputeService : IAutoInjection
this
.
logManageService
=
logManageService
;
this
.
budgetService
=
budgetService
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforImemployeelogisticsRepository
=
perforImemployeelogisticsRepository
;
}
/// <summary>
/// 计算最终数据
/// </summary>
/// <param name="excel"></param>
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
PerExcel
excel
,
List
<
PerSheet
>
accountSheet
,
bool
isMinimum
=
false
)
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
PerExcel
excel
,
List
<
PerSheet
>
accountSheet
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
{
//取出人员信息
var
empolyeeList
=
perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
...
...
@@ -60,27 +64,33 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"
临床科室主任、临床科室副主任、临床科室
护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
account
basicList
,
accountSheet
,
allot
,
isMinimum
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"
科室主任、
护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
account
Sheet
,
allot
,
employeeExtra
);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
baiscNormService
.
ComputeAvg
(
baiscnormList
,
accountbasicList
,
computResult
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
accountbasicList
,
accountSheet
);
var
empolyeeList1
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList1
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"院领导、业务中层、工勤人员 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
var
empolyeeList2
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees2
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList2
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政中高层 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees2
,
allot
,
baiscnormList
,
employeeExtra
);
var
empolyeeList3
=
perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees3
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList3
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政后勤 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult3
=
computeDirector
.
Compute
(
computeEmployees3
,
allot
,
baiscnormList
,
employeeExtra
);
//计算 行政中高层 平均值
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult2
,
empolyeeList2
);
//计算 行政人员 平均值
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult
2
,
empolyeeList1
);
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult
3
,
empolyeeList3
);
if
(!
isMinimum
)
{
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computResult
);
computes
.
AddRange
(
Mapper
.
Map
<
List
<
res_compute
>>(
computResult2
));
computes
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
}
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computResult
);
computes
.
AddRange
(
Mapper
.
Map
<
List
<
res_compute
>>(
computResult2
));
computes
.
AddRange
(
Mapper
.
Map
<
List
<
res_compute
>>(
computResult3
));
computes
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
...
...
@@ -94,58 +104,24 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
/// </summary>
/// <param name="excel"></param>
/// <param name="allot"></param>
public
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
)
public
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
,
List
<
PerSheet
>
sheetLast
,
List
<
res_baiscnorm
>
baiscnormList
,
IEnumerable
<
AccountUnitTotal
>
accountExtras
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
{
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
typeList
=
EnumHelper
.
GetItems
<
PerforType
>();
var
specialUnit
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
SpecialUnit
);
if
(
specialUnit
==
null
||
specialUnit
.
PerData
.
Count
==
0
)
return
;
var
typeList
=
EnumHelper
.
GetItems
<
PerforType
>();
var
dataList
=
specialUnit
.
PerData
.
Select
(
t
=>
(
PerDataSpecialUnit
)
t
);
var
specialEmployee
=
perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
gran
t
);
var
dataList
=
xxx
(
specialUnit
,
allot
,
baiscnormList
,
typeLis
t
);
//替换考核基数
foreach
(
var
item
in
dataList
)
{
if
(
specialEmployee
!=
null
&&
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
)
!=
null
)
{
item
.
Efficiency
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Efficiency
??
1
;
item
.
Scale
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Scale
??
1
;
item
.
Management
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Management
??
1
;
}
var
type
=
typeList
.
FirstOrDefault
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
);
if
(
type
!=
null
)
{
if
(
type
.
Value
==
(
int
)
PerforType
.
医生护士平均
)
{
var
doctor
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
PerforType
.
临床医生
)
??
0
;
var
nurse
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
PerforType
.
护士
)
??
0
;
// 添加参数计算
item
.
Quantity
=
item
.
Quantity
??
(
doctor
+
nurse
)
/
2
;
}
else
{
//var radio = perforImEmployeeRepository.GetEntities(p => p.FitPeople == EnumHelper.GetDescription((PerforType)type.Value) && p.AllotID == allot.ID)
// ?.FirstOrDefault().FitPeopleRatio ?? 1;
var
basic
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
(
PerforType
)
type
.
Value
);
// 添加参数计算
item
.
Quantity
=
item
.
Quantity
??
(
basic
??
0
);
}
}
}
//取出科室
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
List
<
res_specialunit
>
resDataList
=
new
List
<
res_specialunit
>();
var
groupSpeList
=
dataList
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
Number
=
t
.
Max
(
p
=>
p
.
Number
),
ScoringAverage
=
t
.
Max
(
p
=>
p
.
ScoringAverage
),
OtherPerfor
=
t
.
Max
(
p
=>
p
.
OtherPerfor
),
Punishment
=
t
.
Max
(
p
=>
p
.
Punishment
),
Adjust
=
t
.
Max
(
p
=>
p
.
Adjust
),
});
var
groupSpeList
=
dataList
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
Number
=
t
.
Max
(
p
=>
p
.
Number
),
});
var
empolyeeList
=
perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
());
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
...
...
@@ -153,6 +129,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
foreach
(
var
group
in
groupSpeList
)
{
// 获取科室测算信息
var
dept
=
accountList
?.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
!
string
.
IsNullOrEmpty
(
t
.
AccountingUnit
));
//获取需要聚合的科室
var
accountDataList
=
dataList
.
Where
(
t
=>
t
.
AccountingUnit
==
group
.
AccountingUnit
);
//计算量化指标子项合计
...
...
@@ -167,7 +145,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
return
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
*
headcount
;
});
var
groupAdjust
=
isBudget
?
adjust
:
group
.
Adjust
;
var
groupAdjust
=
isBudget
?
adjust
:
(
dept
?.
AdjustFactor
??
0
);
foreach
(
var
item
in
accountDataList
)
{
var
res
=
new
res_specialunit
...
...
@@ -179,15 +158,19 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
QuantitativeIndicators
=
item
.
QuantitativeIndicators
,
Quantity
=
item
.
Quantity
,
QuantitativeIndicatorsValue
=
item
.
QuantitativeIndicatorsValue
,
ScoringAverage
=
group
.
ScoringAverage
,
OtherPerfor
=
group
.
OtherPerfor
,
Punishment
=
group
.
Punishment
,
ScoringAverage
=
dept
?
.
ScoringAverage
,
//OtherPerfor = dept?
.OtherPerfor,
//
Punishment = group.Punishment,
Adjust
=
(
groupAdjust
==
0
)
?
1
:
groupAdjust
,
};
res
.
GiveFee
=
(
sumValue
+
(
group
.
OtherPerfor
??
0
)
+
(
group
.
Punishment
??
0
));
res
.
RealGiveFee
=
res
.
GiveFee
*
(
groupAdjust
==
0
?
1
:
groupAdjust
);
res
.
Avg
=
group
.
Number
!=
0
?
res
.
GiveFee
/
group
.
Number
:
null
;
res
.
ResultsTotalFee
=
sumValue
;
//科室奖罚汇总结果
var
extra
=
accountExtras
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
)?.
TotelValue
;
res
.
GiveFee
=
Math
.
Round
((
sumValue
+
(
extra
??
0
))
??
0
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
(
res
.
ScoringAverage
??
0
)
*
(
groupAdjust
==
0
?
1
:
groupAdjust
)
??
0
);
res
.
Avg
=
Math
.
Round
((
group
.
Number
!=
0
?
res
.
GiveFee
/
group
.
Number
:
null
)
??
0
);
res
.
ResultsTotalFee
=
Math
.
Round
(
sumValue
??
0
);
resDataList
.
Add
(
res
);
}
...
...
@@ -198,19 +181,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
foreach
(
var
empolyee
in
empolyees
)
{
//if (empolyee == null)
//{
// empolyee = new ComputeEmployee
// {
// AccountType = AccountUnitType.科主任.ToString(),
// DoctorName = "人员信息缺失",
// FitPeople = "",
// ScoreAverageRate = 1,
// Punishment = 0,
// OtherPerfor = 0,
// Adjust = 1,
// };
//}
var
extra
=
employeeExtra
.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
w
.
UnitType
)
&&
(!
string
.
IsNullOrEmpty
(
w
.
EmployeeName
)
||
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)))
.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
empolyee
.
AccountingUnit
&&
w
.
UnitType
==
empolyee
.
UnitType
&&
w
.
JobNumber
==
empolyee
.
JobNumber
&&
w
.
EmployeeName
==
empolyee
.
DoctorName
)?.
TotelValue
;
var
empolyeeAdjust
=
isBudget
?
adjust
:
empolyee
.
Adjust
;
var
compute
=
new
ComputeResult
...
...
@@ -224,8 +198,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
JobTitle
=
empolyee
.
JobTitle
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
//
Punishment = empolyee.Punishment,
//
OtherPerfor = empolyee.OtherPerfor,
Number
=
group
.
Number
,
PerforTotal
=
sumValue
,
...
...
@@ -237,13 +211,15 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
compute
.
Efficiency
=
compute
.
Avg
*
(
empolyee
.
Efficiency
??
1
);
compute
.
Scale
=
compute
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
;
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
??
0
)
;
//绩效合计
compute
.
PerforSumFee
=
compute
.
Avg
+
compute
.
ShouldGiveFee
;
compute
.
PerforSumFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
ShouldGiveFee
??
0
)
;
//应发绩效
compute
.
GiveFee
=
compute
.
PerforSumFee
;
//compute.GiveFee = compute.PerforSumFee;
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforSumFee
*
compute
.
ScoreAverageRate
*
(
compute
.
Attendance
??
0
)
+
(
extra
??
0
)
??
0
);
//实发绩效
compute
.
RealGiveFee
=
(
compute
.
GiveFee
*
compute
.
ScoreAverageRate
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
))
*
(
compute
.
Adjust
??
1
m
);
//compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
(
compute
.
Adjust
??
1
m
)
??
0
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
...
...
@@ -255,5 +231,42 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
perforResspecialunitRepository
.
AddRange
(
resDataList
.
ToArray
());
}
private
IEnumerable
<
PerDataSpecialUnit
>
xxx
(
PerSheet
specialUnit
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
,
List
<
EnumItem
>
typeList
)
{
var
dataList
=
specialUnit
.
PerData
.
Select
(
t
=>
(
PerDataSpecialUnit
)
t
);
var
specialEmployee
=
perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
//替换考核基数
foreach
(
var
item
in
dataList
)
{
if
(
specialEmployee
!=
null
&&
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
)
!=
null
)
{
item
.
Efficiency
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Efficiency
??
1
;
item
.
Scale
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Scale
??
1
;
item
.
Management
=
specialEmployee
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
item
.
AccountingUnit
).
Management
??
1
;
}
var
type
=
typeList
.
FirstOrDefault
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
);
if
(
type
!=
null
)
{
if
(
type
.
Value
==
(
int
)
PerforType
.
医生护士平均
)
{
var
doctor
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
PerforType
.
临床医生
)
??
0
;
var
nurse
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
PerforType
.
护士
)
??
0
;
// 添加参数计算
item
.
Quantity
=
item
.
Quantity
??
(
doctor
+
nurse
)
/
2
;
}
else
{
//var radio = perforImEmployeeRepository.GetEntities(p => p.FitPeople == EnumHelper.GetDescription((PerforType)type.Value) && p.AllotID == allot.ID)
// ?.FirstOrDefault().FitPeopleRatio ?? 1;
var
basic
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
(
PerforType
)
type
.
Value
);
// 添加参数计算
item
.
Quantity
=
item
.
Quantity
??
(
basic
??
0
);
}
}
}
return
dataList
;
}
}
}
performance/Performance.Services/AllotService.cs
View file @
f76984c7
...
...
@@ -292,13 +292,13 @@ public void Generate(per_allot allot, string mail)
excel
=
importDataService
.
ReadDataAndSave
(
allot
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
InCheckData
,
EnumHelper
.
GetDescription
(
AllotStates
.
InCheckData
));
if
(!
checkDataService
.
Check
(
excel
,
allot
))
{
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
CheckFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
CheckFail
));
//SendEmail(allot, mail, 3, time);
logManageService
.
WriteMsg
(
"绩效数据校验失败"
,
"详情可至“更多 -- 查看日志”查看"
,
3
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
return
;
}
//
if (!checkDataService.Check(excel, allot))
//
{
//
UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail));
//
//SendEmail(allot, mail, 3, time);
//
logManageService.WriteMsg("绩效数据校验失败", "详情可至“更多 -- 查看日志”查看", 3, allot.ID, "ReceiveMessage", true);
//
return;
//
}
}
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
InGenerate
,
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
));
...
...
@@ -315,45 +315,63 @@ public void Generate(per_allot allot, string mail)
var
(
list
,
mergeSheets
)
=
processComputService
.
MergeCompute
(
excel
,
allot
.
ID
);
processComputService
.
Save
(
list
,
allot
.
ID
);
//计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
minimumBaiscnorm
=
processComputService
.
ComputeMinimum
(
excel
,
mergeSheets
,
allot
.
ID
);
//
//
计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
//
logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true);
//
var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID);
//计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"计算科室业绩"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheet
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
,
true
);
//
//
计算科室业绩(含保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)保底绩效
//
logManageService.WriteMsg("计算保底绩效参考标准值", "计算科室业绩", 1, allot.ID, "ReceiveMessage", true);
//
var sheet = processComputService.Compute(excel, mergeSheets, minimumBaiscnorm, true);
//计算科室自定义保底绩效范围
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"正在计算科室自定义保底绩效范围"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
processComputService
.
ComputeCustomMinimum
(
excel
,
mergeSheets
,
minimumBaiscnorm
,
allot
.
ID
);
//
//
计算科室自定义保底绩效范围
//
logManageService.WriteMsg("计算保底绩效参考标准值", "正在计算科室自定义保底绩效范围", 1, allot.ID, "ReceiveMessage", true);
//
processComputService.ComputeCustomMinimum(excel, mergeSheets, minimumBaiscnorm, allot.ID);
//计算各人群人均保底绩效
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"正在生成保底绩效行政工勤人均绩效"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
minimumBaiscnorm2
=
resultComputeService
.
Compute
(
allot
,
excel
,
sheet
,
true
);
if
(
minimumBaiscnorm2
!=
null
&&
minimumBaiscnorm2
.
Any
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
行政工勤
)))
{
var
minimum
=
minimumBaiscnorm2
.
First
(
t
=>
t
.
PositionName
==
EnumHelper
.
GetDescription
(
PerforType
.
行政工勤
));
minimum
.
PositionName
=
EnumHelper
.
GetDescription
(
MinimumType
.
保底工勤
);
minimumBaiscnorm
.
Add
(
minimum
);
}
////计算各人群人均保底绩效
//logManageService.WriteMsg("计算保底绩效参考标准值", "正在生成保底绩效行政工勤人均绩效", 1, allot.ID, "ReceiveMessage", true);
//var minimumBaiscnorm2 = resultComputeService.Compute(allot, excel, sheet, true);
//if (minimumBaiscnorm2 != null && minimumBaiscnorm2.Any(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤)))
//{
// var minimum = minimumBaiscnorm2.First(t => t.PositionName == EnumHelper.GetDescription(PerforType.行政工勤));
// minimum.PositionName = EnumHelper.GetDescription(MinimumType.保底工勤);
// minimumBaiscnorm.Add(minimum);
//}
////保存 保底绩效参考标准
//logManageService.WriteMsg("计算保底绩效参考标准值", "保存保底绩效参考标准", 1, allot.ID, "ReceiveMessage", true);
//perforResbaiscnormRepository.AddRange(minimumBaiscnorm.ToArray());
//保存 保底绩效参考标准
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"保存保底绩效参考标准"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
perforResbaiscnormRepository
.
AddRange
(
minimumBaiscnorm
.
ToArray
());
//科室奖罚汇总
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"科室奖罚汇总"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
accountExtras
=
processComputService
.
GetAccountExtra
(
excel
);
////科室药占比考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
//var accountExtras = processComputService.GetAccountExtra(excel);
////科室材料考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
//var accountExtras = processComputService.GetAccountExtra(excel);
//重新计算科室业绩(含所有提供保底金额)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"
重新计算科室业绩,包含所有保底金额计算科室业绩
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"
计算科室业绩分
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
accountExtras
);
//保存计算过程数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存科室业绩结果及计算过程中产生的数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
processComputService
.
Save
(
sheetLast
,
allot
.
ID
);
//业务中层行政中高层医院奖罚
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"业务中层行政中高层医院奖罚"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
employeeExtra
=
processComputService
.
GetEmployeeExtra
(
excel
);
// 计算最总数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
baiscnormList
=
resultComputeService
.
Compute
(
allot
,
excel
,
sheetLast
);
var
baiscnormList
=
resultComputeService
.
Compute
(
allot
,
excel
,
sheetLast
,
employeeExtra
);
// 计算特殊科室
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
sheetLast
,
baiscnormList
,
accountExtras
,
employeeExtra
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
//保存 绩效人均参考标准
...
...
@@ -376,7 +394,7 @@ public void Generate(per_allot allot, string mail)
}
catch
(
Exception
ex
)
{
logManageService
.
WriteMsg
(
"绩效生成失败"
,
"程序异常,请重新尝试。"
,
4
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"绩效生成失败"
,
ex
.
Message
,
4
,
allot
.
ID
,
"ReceiveMessage"
);
logdbug
.
Add
(
allot
.
ID
,
"绩效生成失败"
,
ex
.
ToString
(),
4
,
1
);
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateFail
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateFail
));
//SendEmail(allot, mail, 2, time);
...
...
performance/Performance.Services/AssessService.cs
View file @
f76984c7
...
...
@@ -347,10 +347,12 @@ public List<TitleValue> Department(AssessRequest request)
var
result
=
new
List
<
TitleValue
>();
//取到该家医院下所有科室
var
idList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
).
Select
(
s
=>
s
.
ID
).
ToList
();
var
department
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
Department
!=
""
&&
idList
.
Contains
(
t
.
AllotID
.
Value
))?.
Select
(
t
=>
t
.
Department
).
Distinct
().
ToList
();
//var department = perforImaccountbasicRepository.GetEntities(t => t.Department != "" && idList.Contains(t.AllotID.Value))?.Select(t => t.Department).Distinct().ToList();
//if (department != null && department.Count > 0)
//{
var
department
=
perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
DoctorAccountingUnit
!=
""
&&
idList
.
Contains
(
t
.
AllotID
.
Value
))?.
Select
(
t
=>
t
.
DoctorAccountingUnit
).
Distinct
().
ToList
();
if
(
department
!=
null
&&
department
.
Count
>
0
)
{
//自己选的
var
_checked
=
perforAsdataRepository
.
GetEntities
(
t
=>
t
.
AssessID
==
request
.
AssessID
)?.
Select
(
t
=>
t
.
Department
).
ToList
();
if
(
_checked
!=
null
&&
_checked
.
Count
>
0
)
...
...
performance/Performance.Services/ComputeService.cs
View file @
f76984c7
...
...
@@ -569,7 +569,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
int
groupbasis
=
1
;
string
single
=
""
;
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
,
(
int
)
SheetType
.
Account
Assess
};
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
,
(
int
)
SheetType
.
Account
Extra
};
foreach
(
var
stype
in
sheetType
)
{
if
(
type
==
3
&&
stype
==
(
int
)
SheetType
.
Workload
)
type
=
1
;
...
...
@@ -597,7 +597,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
sheettype
=
3
;
amount
=
doctor
.
WorkloadFee
??
0
m
;
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Account
Assess
)
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Account
Extra
)
{
sheettype
=
5
;
amount
=
sheetData
.
Sum
(
t
=>
t
.
CellValue
??
0
m
);
...
...
@@ -762,7 +762,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
{
UnitType
=
second
.
UnitType
,
AccountingUnit
=
second
.
Department
,
Department
=
second
.
Department
,
//
Department = second.Department,
ScoringAverage
=
special
.
First
().
ScoringAverage
.
Value
,
OtherPerfor1
=
special
.
First
().
OtherPerfor
.
Value
,
AdjustFactor
=
special
.
First
().
Adjust
.
Value
,
...
...
@@ -772,7 +772,7 @@ public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
PerforFee
=
special
.
First
().
GiveFee
,
PerforTotal
=
special
.
First
().
ResultsTotalFee
,
Income
=
special
.
First
().
ResultsTotalFee
,
Extra
=
special
.
First
().
Punishment
.
Value
,
//
Extra = special.First().Punishment.Value,
},
Detail
=
new
List
<
DetailDtos
>(),
};
...
...
performance/Performance.Services/EmployeeService.cs
View file @
f76984c7
...
...
@@ -26,6 +26,7 @@ public class EmployeeService : IAutoInjection
private
PerforUserhospitalRepository
perforUserhospitalRepository
;
private
PerforPerallotRepository
perallotRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
private
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
;
private
ILogger
<
EmployeeService
>
logger
;
public
EmployeeService
(
PerforImemployeeRepository
perforImemployeeRepository
,
...
...
@@ -35,6 +36,7 @@ public class EmployeeService : IAutoInjection
PerforUserhospitalRepository
perforUserhospitalRepository
,
PerforPerallotRepository
perallotRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
,
ILogger
<
EmployeeService
>
logger
)
{
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
...
...
@@ -44,6 +46,7 @@ public class EmployeeService : IAutoInjection
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
this
.
perallotRepository
=
perallotRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perforImemployeelogisticsRepository
=
perforImemployeelogisticsRepository
;
this
.
logger
=
logger
;
}
...
...
@@ -257,6 +260,103 @@ public bool DeleteClinic(im_employee_clinic request)
#
endregion
#
region
行政后勤
/// <summary>
///获取临床人员列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
List
<
im_employee_logistics
>
GetEmployeeLogisticsList
(
int
?
allotId
,
int
userId
)
{
if
(
allotId
==
null
||
allotId
==
0
)
{
var
userHospital
=
perforUserhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userHospital
==
null
)
throw
new
PerformanceException
(
"用户未绑定医院!"
);
var
allotList
=
perallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
userHospital
.
HospitalID
&&
new
List
<
int
>
{
(
int
)
AllotStates
.
Archive
,
(
int
)
AllotStates
.
GenerateSucceed
}.
Contains
(
t
.
States
));
if
(
allotList
!=
null
&&
allotList
.
Any
())
{
allotId
=
allotList
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
First
().
ID
;
}
}
var
employee
=
perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
employee
?.
OrderBy
(
t
=>
t
.
RowNumber
).
ToList
();
}
/// <summary>
/// 新增临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
im_employee_logistics
InsertLogistics
(
im_employee_logistics
request
)
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotID
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效方案不存在"
);
var
sheet
=
perforPersheetRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
request
.
AllotID
&&
t
.
SheetType
==
(
int
)
SheetType
.
LogisticsEmployee
);
if
(
sheet
==
null
)
{
sheet
=
new
per_sheet
{
AllotID
=
allot
.
ID
,
SheetName
=
"临床人员名单"
,
SheetType
=
(
int
)
SheetType
.
Employee
,
Source
=
1
};
perforPersheetRepository
.
Add
(
sheet
);
}
request
.
SheetID
=
sheet
.
ID
;
perforImemployeelogisticsRepository
.
Add
(
request
);
return
request
;
}
/// <summary>
/// 修改临床人员信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
im_employee_logistics
UpdateLogistics
(
im_employee_logistics
request
)
{
var
employee
=
perforImemployeelogisticsRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
employee
==
null
)
throw
new
PerformanceException
(
"该人员不存在"
);
employee
.
AccountingUnit
=
request
.
AccountingUnit
;
employee
.
DoctorName
=
request
.
DoctorName
;
employee
.
AccountType
=
request
.
AccountType
;
employee
.
Department
=
request
.
Department
;
employee
.
FitPeople
=
request
.
FitPeople
;
employee
.
JobTitle
=
request
.
JobTitle
;
employee
.
PostCoefficient
=
request
.
PostCoefficient
;
//employee.WorkTime = ConvertHelper.To<DateTime?>(request.WorkTime);
employee
.
ScoreAverageRate
=
request
.
ScoreAverageRate
;
employee
.
Attendance
=
request
.
Attendance
;
//employee.PeopleNumber = request.PeopleNumber;
//employee.Workload = request.Workload;
employee
.
OtherPerfor
=
request
.
OtherPerfor
;
//employee.Punishment = request.Punishment;
//employee.Adjust = request.Adjust;
//employee.Grant = request.Grant;
//修改人员信息
perforImemployeelogisticsRepository
.
Update
(
employee
);
return
employee
;
}
/// <summary>
/// 删除临床人员
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
DeleteLogistics
(
im_employee_clinic
request
)
{
var
employee
=
perforImemployeelogisticsRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
employee
)
throw
new
PerformanceException
(
"该人员不存在"
);
return
perforImemployeelogisticsRepository
.
Remove
(
employee
);
}
#
endregion
/// <summary>
/// 人事科修改后提交状态
/// </summary>
...
...
performance/Performance.Services/OriginalService.cs
View file @
f76984c7
...
...
@@ -177,12 +177,12 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
{
{
"核算单元类型"
,
nameof
(
im_accountbasic
.
UnitType
)
},
{
"核算单元"
,
nameof
(
im_accountbasic
.
DoctorAccountingUnit
)
},
{
"科室名称"
,
nameof
(
im_accountbasic
.
Department
)
},
//
{ "科室名称", nameof(im_accountbasic.Department) },
{
"效率绩效人数"
,
nameof
(
im_accountbasic
.
PermanentStaff
)
},
{
"科主任/护士长人数"
,
nameof
(
im_accountbasic
.
DoctorDirectorNumber
)
},
{
"核算单元人员数量"
,
nameof
(
im_accountbasic
.
DoctorNumber
)
},
{
"预算比例"
,
nameof
(
im_accountbasic
.
DoctorBasicFactor
)
},
{
"倾斜系数"
,
nameof
(
im_accountbasic
.
DoctorSlopeFactor
)
},
//
{ "倾斜系数", nameof(im_accountbasic.DoctorSlopeFactor) },
{
"工作量倾斜系数"
,
nameof
(
im_accountbasic
.
WorkSlopeFactor
)
},
{
"保底绩效参考标准"
,
nameof
(
im_accountbasic
.
MinimumReference
)
},
{
"保底绩效系数"
,
nameof
(
im_accountbasic
.
MinimumFactor
)
},
...
...
@@ -198,8 +198,7 @@ private bool EditAccountBasic(int userId, OriginalRequest request)
if
(
imdata
==
null
||
request
.
Cell
==
null
||
!
accdict
.
ContainsKey
(
request
.
Cell
.
FieldName
))
return
false
;
var
basic
=
imaccountbasicRepository
.
GetEntity
(
t
=>
t
.
SheetID
==
request
.
SheetId
&&
t
.
Department
==
imdata
.
Department
&&
t
.
DoctorAccountingUnit
==
imdata
.
AccountingUnit
&&
t
.
UnitType
==
imdata
.
UnitType
);
var
basic
=
imaccountbasicRepository
.
GetEntity
(
t
=>
t
.
SheetID
==
request
.
SheetId
&&
t
.
DoctorAccountingUnit
==
imdata
.
AccountingUnit
&&
t
.
UnitType
==
imdata
.
UnitType
);
if
(
basic
==
null
)
return
false
;
if
(
request
.
Cell
.
FieldName
==
"核算单元类型"
)
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
f76984c7
...
...
@@ -279,7 +279,7 @@ public class ComputeDirector : IAutoInjection
/// <param name="nurseList"></param>
/// <param name="directorList"></param>
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
accountSheet
,
per_allot
allot
,
bool
isMinimum
)
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
PerSheet
>
accountSheet
,
per_allot
allot
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
{
var
basicRuleList
=
new
[]
{
...
...
@@ -355,7 +355,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
if
(
basicRule
==
null
)
continue
;
var
avg
=
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
)
==
0
?
0
:
resAccount
.
PerforTotal
/
(
resAccount
.
ManagerNumber
+
resAccount
.
Number
);
var
effAvg
=
resAccount
.
PermanentStaff
==
0
?
0
:
resAccount
.
PerforTotal
/
resAccount
.
PermanentStaff
;
var
effAvg
=
empolyee
.
PermanentStaff
==
0
?
0
:
resAccount
.
PerforTotal
/
empolyee
.
PermanentStaff
;
//var efficiency = avg * (empolyee.Efficiency ?? 1);
var
scale
=
resAccount
.
PerforTotal
*
(
empolyee
.
Scale
??
1
);
...
...
@@ -371,8 +371,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
JobNumber
=
empolyee
.
JobNumber
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
empolyee
.
Punishment
,
OtherPerfor
=
empolyee
.
OtherPerfor
,
//
Punishment = empolyee.Punishment,
//
OtherPerfor = empolyee.OtherPerfor,
Number
=
resAccount
.
ManagerNumber
+
resAccount
.
Number
,
PerforTotal
=
resAccount
.
PerforTotal
,
...
...
@@ -384,16 +384,21 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Grant
=
isBudget
?
grant
:
empolyee
.
Management
,
ManagerNumber
=
resAccount
.
ManagerNumber
,
MedicalNumber
=
resAccount
.
Number
,
PermanentStaff
=
resAccount
.
PermanentStaff
,
PermanentStaff
=
empolyee
.
PermanentStaff
,
Attendance
=
empolyee
.
Attendance
};
var
extra
=
employeeExtra
.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
w
.
UnitType
)
&&
(!
string
.
IsNullOrEmpty
(
w
.
EmployeeName
)
||
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)))
.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
empolyee
.
AccountingUnit
&&
w
.
UnitType
==
empolyee
.
UnitType
&&
w
.
JobNumber
==
empolyee
.
JobNumber
&&
w
.
EmployeeName
==
empolyee
.
DoctorName
)?.
TotelValue
;
//应发管理绩效
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
(
compute
.
Grant
??
0
)
??
0
);
//绩效合计
compute
.
PerforSumFee
=
Math
.
Round
((
compute
.
Avg
*
(
empolyee
.
Basics
??
0
))
+
compute
.
ShouldGiveFee
??
0
);
//应发绩效
//compute.GiveFee = compute.PerforSumFee;
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforSumFee
*
compute
.
ScoreAverageRate
*
(
compute
.
Attendance
??
0
)
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
)
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforSumFee
*
compute
.
ScoreAverageRate
*
(
compute
.
Attendance
??
0
)
+
(
extra
??
0
)
??
0
);
//实发绩效
//compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
(
compute
.
Adjust
??
1
m
)
??
0
);
...
...
@@ -407,71 +412,82 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
}
/// <summary>
///
院领导、业务中层、工勤人员 计算
///
行政中高层 行政后勤
/// </summary>
/// <param name="empolyeeList"></param>
/// <param name="baiscnormList"></param>
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
)
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
,
IEnumerable
<
EmpolyeeTotal
>
employeeExtra
)
{
//年资系数
var
workyearList
=
perforCofworkyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
//
//
年资系数
//
var workyearList = perforCofworkyearRepository.GetEntities(t => t.AllotID == allot.ID);
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
List
<
string
>
involve
=
new
List
<
string
>
{
AccountUnitType
.
行政高层
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
()
};
var
needCompute
=
empolyeeList
.
Where
(
t
=>
involve
.
Contains
(
t
.
AccountType
));
List
<
string
>
involves
=
new
List
<
string
>
{
AccountUnitType
.
行政高层
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
()
};
if
(!
needCompute
.
Any
())
return
computeList
;
foreach
(
var
involve
in
involves
)
{
var
needCompute
=
empolyeeList
.
Where
(
t
=>
involve
==
t
.
AccountType
);
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
)
;
if
(!
needCompute
.
Any
())
continue
;
var
perforTypeArray
=
EnumHelper
.
GetItems
<
PerforType
>();
foreach
(
var
item
in
needCompute
)
{
var
itemAdjust
=
isBudget
?
adjust
:
item
.
Adjust
;
var
compute
=
new
ComputeResult
{
AccountType
=
item
.
AccountType
,
AccountingUnit
=
item
.
AccountingUnit
,
EmployeeName
=
item
.
DoctorName
,
FitPeople
=
item
.
FitPeople
,
Grant
=
isBudget
?
grant
:
(
item
.
Management
??
1
),
WorkTime
=
item
.
WorkTime
,
PostCoefficient
=
item
.
PostCoefficient
,
Attendance
=
item
.
Attendance
,
ScoreAverageRate
=
item
.
ScoreAverageRate
,
Punishment
=
item
.
Punishment
,
OtherPerfor
=
item
.
OtherPerfor
,
JobTitle
=
item
.
JobTitle
,
JobNumber
=
item
.
JobNumber
,
Adjust
=
itemAdjust
,
//Workload = item.Workload
};
decimal
?
baiscnorm
=
1
;
var
perforTypeItem
=
perforTypeArray
.
FirstOrDefault
(
t
=>
t
.
Description
==
item
.
FitPeople
);
if
(
perforTypeItem
!=
null
)
var
isBudget
=
budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
var
perforTypeArray
=
EnumHelper
.
GetItems
<
PerforType
>();
foreach
(
var
item
in
needCompute
)
{
var
perforType
=
(
PerforType
)
perforTypeItem
.
Value
;
baiscnorm
=
item
.
FitPeopleValue
??
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
perforType
);
// 奖罚汇总
var
extra
=
employeeExtra
.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
w
.
UnitType
)
&&
(!
string
.
IsNullOrEmpty
(
w
.
EmployeeName
)
||
!
string
.
IsNullOrEmpty
(
w
.
JobNumber
)))
.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
item
.
AccountingUnit
&&
w
.
UnitType
==
item
.
UnitType
&&
w
.
JobNumber
==
item
.
JobNumber
&&
w
.
EmployeeName
==
item
.
DoctorName
)
?.
TotelValue
;
var
itemAdjust
=
isBudget
?
adjust
:
item
.
Adjust
;
var
compute
=
new
ComputeResult
{
AccountType
=
item
.
AccountType
,
AccountingUnit
=
item
.
AccountingUnit
,
EmployeeName
=
item
.
DoctorName
,
FitPeople
=
item
.
FitPeople
,
Grant
=
isBudget
?
grant
:
(
item
.
Management
??
1
),
//WorkTime = item.WorkTime,
PostCoefficient
=
item
.
PostCoefficient
,
Attendance
=
item
.
Attendance
,
ScoreAverageRate
=
item
.
ScoreAverageRate
,
Punishment
=
extra
??
0
,
OtherPerfor
=
item
.
OtherPerfor
,
JobTitle
=
item
.
JobTitle
,
JobNumber
=
item
.
JobNumber
,
Adjust
=
itemAdjust
,
//Workload = item.Workload
//年资系数
if
(
item
.
FitPeople
==
AccountUnitType
.
行政工勤
.
ToString
()
&&
item
.
WorkTime
.
HasValue
&&
item
.
WorkTime
.
Value
>
new
DateTime
(
1970
,
1
,
1
))
};
decimal
?
baiscnorm
=
1
;
var
perforTypeItem
=
perforTypeArray
.
FirstOrDefault
(
t
=>
t
.
Description
==
item
.
FitPeople
);
if
(
perforTypeItem
!=
null
)
{
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
;
var
perforType
=
(
PerforType
)
perforTypeItem
.
Value
;
baiscnorm
=
item
.
FitPeopleValue
??
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
perforType
);
}
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
0
);
//应发绩效
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
Punishment
;
// 行政中高层 不需要其他绩效 行政工勤 不需要考核得分率 区分开计算
if
(
AccountUnitType
.
行政工勤
.
ToString
()
==
involve
)
compute
.
GiveFee
=
Math
.
Round
(
compute
.
GiveFee
+
(
compute
.
OtherPerfor
??
0
)
??
0
);
else
compute
.
GiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
compute
.
ScoreAverageRate
)
??
0
);
//实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
(
itemAdjust
??
1
))
??
0
);
computeList
.
Add
(
compute
);
}
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
0
);
//应发绩效
compute
.
GiveFee
=
Math
.
Round
((
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
))
??
0
);
//实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
(
itemAdjust
??
1
))
??
0
);
computeList
.
Add
(
compute
);
}
return
computeList
;
...
...
performance/Performance.Services/PerExcelService/NopiSevice.cs
View file @
f76984c7
using
NPOI.HSSF.UserModel
;
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text.RegularExpressions
;
namespace
Performance.Services
{
public
class
NopiSevice
public
static
class
NopiSevice
{
public
static
string
GetCellStringValue
(
ICell
cell
)
{
...
...
@@ -57,6 +59,43 @@ public static string GetCellStringValue(ICell cell)
return
null
;
}
public
static
string
GetValue
(
this
ICell
cell
)
{
if
(
cell
!=
null
)
{
try
{
switch
(
cell
.
CellType
)
{
case
CellType
.
Numeric
:
return
cell
?.
NumericCellValue
.
ToString
();
case
CellType
.
String
:
return
cell
?.
StringCellValue
.
ToString
();
case
CellType
.
Formula
:
return
cell
?.
NumericCellValue
.
ToString
();
case
CellType
.
Boolean
:
return
cell
?.
BooleanCellValue
.
ToString
();
case
CellType
.
Unknown
:
case
CellType
.
Blank
:
case
CellType
.
Error
:
return
string
.
Empty
;
}
}
catch
(
Exception
ex
)
{
//throw ex;
}
}
return
null
;
}
public
static
bool
TryGetPoint
(
List
<
PerHeader
>
headers
,
string
title
,
out
int
point
)
{
var
x
=
headers
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
title
)?.
PointCell
;
point
=
x
.
HasValue
?
x
.
Value
:
0
;
return
x
.
HasValue
;
}
public
static
DateTime
?
GetCellDatetimeValue
(
ICell
cell
)
{
if
(
cell
!=
null
)
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
f76984c7
...
...
@@ -53,8 +53,24 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType, bool isnew = fa
case
SheetType
.
AccountBasicSpecial
:
dataread
=
new
PerSheetDataReadDeptAccountingSpecial
();
break
;
case
SheetType
.
AccountAssess
:
dataread
=
new
PerSheetDataReadAccountAssess
();
case
SheetType
.
AccountExtra
:
dataread
=
new
PerSheetDataReadAccountExtra
();
break
;
case
SheetType
.
LogisticsEmployee
:
dataread
=
new
PerSheetDataReadLogisticsEmployee
();
// 行政后勤
break
;
case
SheetType
.
PersonExtra
:
//dataread = new PerSheetDataReadPersonExtra(); // 业务中层行政中高层医院奖罚
dataread
=
new
PerSheetDataReadAccountExtra
();
break
;
case
SheetType
.
AccountDrugAssess
:
dataread
=
new
PerSheetDataReadAccountExtra
();
//dataread = new PerSheetDataReadAccountDrugAssess(); // 科室药占比考核
break
;
case
SheetType
.
AccountMaterialsAssess
:
dataread
=
new
PerSheetDataReadAccountExtra
();
//dataread = new PerSheetDataReadAccountMaterialsAssess(); // 科室材料考核
break
;
}
return
dataread
;
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
f76984c7
...
...
@@ -78,10 +78,12 @@ public PerSheet Sheet(ISheet sheet, bool isnew)
/// <returns></returns>
public
SheetType
GetSheetType
(
string
sheetName
)
{
if
(
sheetName
.
StartsWith
(
"行政
人员名单
"
))
if
(
sheetName
.
StartsWith
(
"行政
中高层
"
))
return
SheetType
.
Employee
;
else
if
(
sheetName
.
StartsWith
(
"业务中层"
))
return
SheetType
.
ClinicEmployee
;
else
if
(
sheetName
.
StartsWith
(
"行政后勤"
))
return
SheetType
.
LogisticsEmployee
;
else
if
(
sheetName
.
StartsWith
(
"1.0"
))
return
SheetType
.
OtherIncome
;
else
if
(
sheetName
.
StartsWith
(
"1."
))
...
...
@@ -95,7 +97,13 @@ public SheetType GetSheetType(string sheetName)
else
if
(
sheetName
.
StartsWith
(
"4.2"
))
return
SheetType
.
SpecialUnit
;
else
if
(
sheetName
.
StartsWith
(
"5.1"
))
return
SheetType
.
AccountAssess
;
return
SheetType
.
AccountExtra
;
else
if
(
sheetName
.
StartsWith
(
"5.2"
))
return
SheetType
.
PersonExtra
;
else
if
(
sheetName
.
StartsWith
(
"5.3"
))
return
SheetType
.
AccountDrugAssess
;
else
if
(
sheetName
.
StartsWith
(
"5.4"
))
return
SheetType
.
AccountMaterialsAssess
;
return
SheetType
.
Unidentifiable
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccount
Assess
.cs
→
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadAccount
Extra
.cs
View file @
f76984c7
...
...
@@ -8,7 +8,10 @@
namespace
Performance.Services
{
public
class
PerSheetDataReadAccountAssess
:
IPerSheetDataRead
/// <summary>
/// 科室奖罚
/// </summary>
public
class
PerSheetDataReadAccountExtra
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
View file @
f76984c7
...
...
@@ -30,14 +30,16 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"医生姓名"
,
"职务分类"
,
"基础绩效系数"
,
"岗位系数"
,
//"岗位系数",
"效率绩效人数"
,
"效率绩效系数"
,
"规模绩效系数"
,
"管理绩效发放系数"
,
"考核得分率"
,
"出勤率"
,
"其他绩效"
,
"医院奖罚"
,
"其他管理绩效"
,
//"其他绩效",
//"医院奖罚",
"调节系数"
,
};
foreach
(
var
item
in
headers
)
...
...
@@ -60,21 +62,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
DoctorName
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医生姓名"
).
PointCell
)?.
StringCellValue
,
JobTitle
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"职务分类"
).
PointCell
)?.
StringCellValue
,
Basics
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"基础绩效系数"
).
PointCell
)?.
NumericCellValue
),
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"岗位系数"
).
PointCell
)?.
NumericCellValue
),
//PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue),
PermanentStaff
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效人数"
).
PointCell
)?.
NumericCellValue
),
Efficiency
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效系数"
).
PointCell
)?.
NumericCellValue
),
Scale
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"规模绩效系数"
).
PointCell
)?.
NumericCellValue
),
Management
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"管理绩效发放系数"
).
PointCell
)?.
NumericCellValue
),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤率"
).
PointCell
)?.
NumericCellValue
),
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效"
).
PointCell
)?.
NumericCellValue
),
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
),
//OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
//Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
OtheManagementPerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他管理绩效"
).
PointCell
)?.
NumericCellValue
),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
),
};
if
(!
string
.
IsNullOrEmpty
(
clinicEmployee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
clinicEmployee
.
DoctorName
))
dataList
.
Add
(
clinicEmployee
);
}
if
(!
string
.
IsNullOrEmpty
(
clinicEmployee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
clinicEmployee
.
DoctorName
))
dataList
.
Add
(
clinicEmployee
);
}
return
dataList
;
}
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
f76984c7
...
...
@@ -28,20 +28,20 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
"核算单元类型"
,
"核算单元"
,
"科室名称"
,
"效率绩效人数"
,
//
"科室名称",
//
"效率绩效人数",
"科主任/护士长人数"
,
"核算单元人员数量"
,
"预算比例"
,
"倾斜系数"
,
"工作量倾斜系数"
,
"保底绩效参考标准"
,
"保底绩效系数"
,
"其他绩效1"
,
"其他绩效2"
,
"药占比奖罚"
,
"材料占比奖罚"
,
"医院奖罚"
,
//
"倾斜系数",
//
"工作量倾斜系数",
//
"保底绩效参考标准",
//
"保底绩效系数",
//
"其他绩效1",
//
"其他绩效2",
//
"药占比奖罚",
//
"材料占比奖罚",
//
"医院奖罚",
"考核得分率"
,
"调节系数"
,
};
...
...
@@ -59,23 +59,23 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit
.
RowNumber
=
r
;
unifyUnit
.
UnitType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元类型"
).
PointCell
)?.
StringCellValue
;
unifyUnit
.
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
));
unifyUnit
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室名称"
).
PointCell
));
unifyUnit
.
PermanentStaff
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效人数"
).
PointCell
)?.
NumericCellValue
);
//
unifyUnit.Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell));
//
unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue);
unifyUnit
.
ManagerNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科主任/护士长人数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Number
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元人员数量"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
BasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"预算比例"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
SlopeFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"倾斜系数"
).
PointCell
)?.
NumericCellValue
);
//
unifyUnit.SlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数").PointCell)?.NumericCellValue);
//unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue);工作量倾斜系数
unifyUnit
.
WorkSlopeFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"工作量倾斜系数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MinimumReference
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"保底绩效参考标准"
).
PointCell
)?.
StringCellValue
;
unifyUnit
.
MinimumFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"保底绩效系数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
OtherPerfor2
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效2"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MedicineExtra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"药占比奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
MaterialsExtra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"材料占比奖罚"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Extra
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
);
//
unifyUnit.WorkSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量倾斜系数").PointCell)?.NumericCellValue);
//
unifyUnit.MinimumReference = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效参考标准").PointCell)?.StringCellValue;
//
unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.NumericCellValue);
//
unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.NumericCellValue);
//
unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.NumericCellValue);
//
unifyUnit.MedicineExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "药占比奖罚").PointCell)?.NumericCellValue);
//
unifyUnit.MaterialsExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "材料占比奖罚").PointCell)?.NumericCellValue);
//
unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
unifyUnit
.
ScoringAverage
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
AdjustFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
f76984c7
...
...
@@ -9,7 +9,7 @@
namespace
Performance.Services
{
/// <summary>
///
人员读取
///
行政中高层
/// </summary>
public
class
PerSheetDataReadEmployee
:
IPerSheetDataRead
{
...
...
@@ -35,11 +35,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"绩效基数核算系数"
,
"人员分类"
,
"岗位系数"
,
"参加工作时间"
,
//
"参加工作时间",
"考核得分率"
,
"出勤率"
,
"其他绩效"
,
"医院奖罚"
,
//
"其他绩效",
//
"医院奖罚",
"调节系数"
,
};
foreach
(
var
item
in
headers
)
...
...
@@ -65,13 +65,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
FitPeopleRatio
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"绩效基数核算系数"
).
PointCell
)?.
NumericCellValue
),
AccountType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人员分类"
).
PointCell
)?.
StringCellValue
,
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"岗位系数"
).
PointCell
)?.
NumericCellValue
),
WorkTime
=
NopiSevice
.
GetCellDatetimeValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"参加工作时间"
).
PointCell
)),
//
WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤率"
).
PointCell
)?.
NumericCellValue
),
//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
)?.
NumericCellValue
),
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
),
//
OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
//
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
),
//Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
};
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
0 → 100644
View file @
f76984c7
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
/// <summary>
/// 行政后勤
/// </summary>
public
class
PerSheetDataReadLogisticsEmployee
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
1
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
PerDataLogisticsEmployee
employee
=
new
PerDataLogisticsEmployee
()
{
RowNumber
=
r
,
};
int
point
=
0
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员分类"
,
out
point
))
employee
.
AccountType
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"核算单元"
,
out
point
))
employee
.
AccountingUnit
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基数核算参考对象"
,
out
point
))
employee
.
FitPeople
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基础核算参考值"
,
out
point
))
employee
.
FitPeopleValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基数核算系数"
,
out
point
))
employee
.
FitPeopleRatio
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员工号"
,
out
point
))
employee
.
JobNumber
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员姓名"
,
out
point
))
employee
.
DoctorName
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"职务分类"
,
out
point
))
employee
.
JobTitle
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"岗位系数"
,
out
point
))
employee
.
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"出勤率"
,
out
point
))
employee
.
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"其他绩效"
,
out
point
))
employee
.
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
dataList
.
Add
(
employee
);
}
return
dataList
;
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
View file @
f76984c7
...
...
@@ -30,10 +30,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"量化指标绩效分值"
,
"科室"
,
"人数"
,
"考核得分率"
,
"其他绩效"
,
"医院奖罚"
,
"调节系数"
,
//
"考核得分率",
//
"其他绩效",
//
"医院奖罚",
//
"调节系数",
};
foreach
(
var
item
in
headers
)
{
...
...
@@ -73,10 +73,10 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit
.
AccountingUnit
=
accountingUnit
;
specialUnit
.
Department
=
accountingUnit
;
specialUnit
.
Number
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人数"
).
PointCell
)?.
NumericCellValue
);
specialUnit
.
ScoringAverage
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
specialUnit
.
OtherPerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效"
).
PointCell
)?.
NumericCellValue
);
specialUnit
.
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
)?.
NumericCellValue
);
specialUnit
.
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
//
specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
//
specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
//
specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
//
specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue);
//}
if
(!
string
.
IsNullOrEmpty
(
specialUnit
.
QuantitativeIndicators
)
&&
specialUnit
.
QuantitativeIndicatorsValue
!=
null
)
dataList
.
Add
(
specialUnit
);
...
...
performance/Performance.Services/SheetSevice.cs
View file @
f76984c7
...
...
@@ -25,6 +25,7 @@ public class SheetSevice : IAutoInjection
//private PerforResaccountnurseRepository _perforImaccountnurseRepository;
private
PerforImspecialunitRepository
_perforImspecialunitRepository
;
private
PerforImemployeeclinicRepository
_perforImemployeeclinicRepository
;
private
readonly
PerforImemployeelogisticsRepository
_perforImemployeelogisticsRepository
;
private
readonly
string
[]
percentparam
=
new
string
[]
{
"预算比例"
,
"考核得分率"
,
"调节系数"
};
public
SheetSevice
(
PerforPerallotRepository
perforAllotRepository
,
...
...
@@ -36,7 +37,8 @@ public class SheetSevice : IAutoInjection
PerforResaccountRepository
perforResaccountRepository
,
//PerforResaccountnurseRepository perforImaccountnurseRepository,
PerforImspecialunitRepository
perforImspecialunitRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
)
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeelogisticsRepository
perforImemployeelogisticsRepository
)
{
_perforAllotRepository
=
perforAllotRepository
;
_perforImSheetRepository
=
perforImSheetRepository
;
...
...
@@ -48,6 +50,7 @@ public class SheetSevice : IAutoInjection
_perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
_perforImspecialunitRepository
=
perforImspecialunitRepository
;
_perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
_perforImemployeelogisticsRepository
=
perforImemployeelogisticsRepository
;
}
/// <summary>
...
...
@@ -88,6 +91,10 @@ public SheetExportResponse SheetExport(int sheetID)
{
ClinicEmployeeExport
(
sheetID
,
response
);
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
LogisticsEmployee
)
{
LogisticsEmployeeExport
(
sheetID
,
response
);
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
SpecialUnit
)
{
SpecialUnitExport
(
sheetID
,
response
);
...
...
@@ -390,57 +397,57 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
}
}
private
void
AccountBaiscExport
(
int
sheetID
,
SheetExportResponse
response
)
{
var
list
=
_perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderBy
(
t
=>
t
.
UnitType
).
ThenByDescending
(
t
=>
t
.
DoctorAccountingUnit
);
if
(
list
!=
null
&&
list
.
Count
()
>
0
)
{
var
row
=
new
Row
(
0
);
row
.
Data
.
Add
(
new
Cell
(
1
,
"核算单元类型"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
2
,
"核算单元"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
3
,
"科室名称"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
4
,
"科主任/护士长人数"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
5
,
"核算单元人员数量"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
6
,
"预算比例"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
7
,
"倾斜系数"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
8
,
"规模绩效系数"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
9
,
"效率绩效系数"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
10
,
"管理绩效发放系数"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
11
,
"其他绩效1"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
12
,
"考核得分率"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
13
,
"药占比奖罚"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
14
,
"材料占比奖罚"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
15
,
"医院奖罚"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
16
,
"其他绩效2"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
17
,
"调节系数"
,
1
,
1
,
false
,
false
));
response
.
Header
.
Add
(
row
);
for
(
int
i
=
0
;
i
<
list
.
Count
();
i
++)
{
var
item
=
list
.
ElementAt
(
i
);
var
rowbody
=
new
Row
(
i
);
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
((
UnitType
)
item
.
UnitType
).
ToString
(),
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
DoctorAccountingUnit
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
Department
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorDirectorNumber
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
DoctorNumber
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
DoctorBasicFactor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
item
.
DoctorSlopeFactor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
item
.
DoctorScale
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
item
.
DoctorEffic
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
item
.
DoctorGrant
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
item
.
DoctorOtherPerfor1
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
DoctorScoringAverage
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
MedicineExtra
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
item
.
MaterialsExtra
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
15
,
item
.
DoctorExtra
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
16
,
item
.
DoctorOtherPerfor2
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
17
,
item
.
DoctorAdjustFactor
,
1
,
1
,
false
,
true
));
response
.
Row
.
Add
(
rowbody
);
}
}
}
//
private void AccountBaiscExport(int sheetID, SheetExportResponse response)
//
{
//
var list = _perforImaccountbasicRepository.GetEntities(t => t.SheetID == sheetID)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.DoctorAccountingUnit);
//
if (list != null && list.Count() > 0)
//
{
//
var row = new Row(0);
//
row.Data.Add(new Cell(1, "核算单元类型", 1, 1, false, false));
//
row.Data.Add(new Cell(2, "核算单元", 1, 1, false, false));
//
row.Data.Add(new Cell(3, "科室名称", 1, 1, false, false));
//
row.Data.Add(new Cell(4, "科主任/护士长人数", 1, 1, false, false));
//
row.Data.Add(new Cell(5, "核算单元人员数量", 1, 1, false, false));
//
row.Data.Add(new Cell(6, "预算比例", 1, 1, false, false));
//
row.Data.Add(new Cell(7, "倾斜系数", 1, 1, false, false));
//
row.Data.Add(new Cell(8, "规模绩效系数", 1, 1, false, false));
//
row.Data.Add(new Cell(9, "效率绩效系数", 1, 1, false, false));
//
row.Data.Add(new Cell(10, "管理绩效发放系数", 1, 1, false, false));
//
row.Data.Add(new Cell(11, "其他绩效1", 1, 1, false, false));
//
row.Data.Add(new Cell(12, "考核得分率", 1, 1, false, false));
//
row.Data.Add(new Cell(13, "药占比奖罚", 1, 1, false, false));
//
row.Data.Add(new Cell(14, "材料占比奖罚", 1, 1, false, false));
//
row.Data.Add(new Cell(15, "医院奖罚", 1, 1, false, false));
//
row.Data.Add(new Cell(16, "其他绩效2", 1, 1, false, false));
//
row.Data.Add(new Cell(17, "调节系数", 1, 1, false, false));
//
response.Header.Add(row);
//
for (int i = 0; i < list.Count(); i++)
//
{
//
var item = list.ElementAt(i);
//
var rowbody = new Row(i);
//
rowbody.Data.Add(new Cell(1, ((UnitType)item.UnitType).ToString(), 1, 1, false, false));
//
rowbody.Data.Add(new Cell(2, item.DoctorAccountingUnit, 1, 1, false, false));
//
rowbody.Data.Add(new Cell(3, item.Department, 1, 1, false, false));
//
rowbody.Data.Add(new Cell(4, item.DoctorDirectorNumber, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(5, item.DoctorNumber, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(6, item.DoctorBasicFactor, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(7, item.DoctorSlopeFactor, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(8, item.DoctorScale, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(9, item.DoctorEffic, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(10, item.DoctorGrant, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(11, item.DoctorOtherPerfor1, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(12, item.DoctorScoringAverage, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(13, item.MedicineExtra, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(14, item.MaterialsExtra, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(15, item.DoctorExtra, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(16, item.DoctorOtherPerfor2, 1, 1, false, true));
//
rowbody.Data.Add(new Cell(17, item.DoctorAdjustFactor, 1, 1, false, true));
//
response.Row.Add(rowbody);
//
}
//
}
//
}
private
void
EmployeeExport
(
int
sheetID
,
SheetExportResponse
response
)
{
...
...
@@ -475,14 +482,6 @@ private void EmployeeExport(int sheetID, SheetExportResponse response)
}
response
.
Row
.
Add
(
rowbody
);
}
var
workDateIndex
=
pairs
.
IndexOf
((
"参加工作时间"
,
(
t
)
=>
t
.
WorkTime
,
1
,
1
,
false
,
false
,
false
,
"WorkTime"
));
response
.
Row
.
ForEach
(
t
=>
{
var
workDate
=
t
.
Data
.
FirstOrDefault
(
f
=>
f
.
PointCell
==
workDateIndex
)?.
CellValue
;
if
(
workDate
!=
null
&&
workDate
.
ToString
()
!=
""
)
t
.
Data
.
FirstOrDefault
(
f
=>
f
.
PointCell
==
workDateIndex
).
CellValue
=
((
DateTime
)
workDate
).
ToString
(
"yyyy-MM-dd"
);
});
}
}
...
...
@@ -522,6 +521,42 @@ private void ClinicEmployeeExport(int sheetID, SheetExportResponse response)
}
}
private
void
LogisticsEmployeeExport
(
int
sheetID
,
SheetExportResponse
response
)
{
var
employeeList
=
_perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?
.
OrderByDescending
(
t
=>
t
.
AccountType
)
.
ThenBy
(
t
=>
t
.
AccountingUnit
);
if
(
employeeList
!=
null
&&
employeeList
.
Count
()
>
0
)
{
var
pairs
=
PerSheetHeader
.
employeeLogisticsHeaders
;
var
row
=
new
Row
(
0
);
int
index
=
1
;
foreach
(
var
item
in
pairs
)
{
row
.
Data
.
Add
(
new
Cell
(
index
,
item
.
Item1
,
item
.
Item3
,
item
.
Item4
,
item
.
Item5
,
item
.
Item6
,
fieldName
:
item
.
Item8
,
cellType
:
"header"
));
index
+=
1
;
}
response
.
Header
.
Add
(
row
);
for
(
int
i
=
0
;
i
<
employeeList
.
Count
();
i
++)
{
var
employee
=
employeeList
.
ElementAt
(
i
);
var
rowbody
=
new
Row
(
i
);
index
=
1
;
foreach
(
var
item
in
pairs
)
{
if
(
item
.
Item7
)
rowbody
.
Data
.
Add
(
new
Cell
(
index
,
$"
{
item
.
Item2
.
Invoke
(
employee
)}
%"
,
item
.
Item3
,
item
.
Item4
,
item
.
Item5
,
item
.
Item6
,
id
:
employee
.
ID
,
fieldName
:
item
.
Item8
));
else
rowbody
.
Data
.
Add
(
new
Cell
(
index
,
item
.
Item2
.
Invoke
(
employee
),
item
.
Item3
,
item
.
Item4
,
item
.
Item5
,
item
.
Item6
,
id
:
employee
.
ID
,
fieldName
:
item
.
Item8
));
index
+=
1
;
}
response
.
Row
.
Add
(
rowbody
);
}
}
}
private
void
SpecialUnitExport
(
int
sheetID
,
SheetExportResponse
response
)
{
var
list
=
_perforImspecialunitRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
...
...
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