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
d05ae030
Commit
d05ae030
authored
Aug 30, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'extend' into develop
parents
f3e391c2
7a0906ab
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
1032 additions
and
233 deletions
+1032
-233
performance/Performance.Api/Controllers/ConfigController.cs
+70
-1
performance/Performance.Api/Controllers/TemplateController.cs
+15
-5
performance/Performance.Api/Performance.Api.csproj
+7
-0
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
+0
-0
performance/Performance.Api/Template/医院绩效模板.xlsx
+0
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+36
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+250
-1
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+2
-1
performance/Performance.DtoModels/Request/WorkItemRequest.cs
+46
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+54
-52
performance/Performance.EntityModels/Entity/cof_workitem.cs
+34
-0
performance/Performance.EntityModels/Entity/log_dbug.cs
+1
-1
performance/Performance.Repository/Repository/PerforCofworkitemRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforResaccountdoctorRepository.cs
+19
-19
performance/Performance.Repository/Repository/PerforResaccountnurseRepository.cs
+19
-19
performance/Performance.Services/AllotCompute/CheckDataService.cs
+3
-2
performance/Performance.Services/AllotCompute/ImportDataService.cs
+7
-1
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+61
-66
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+10
-8
performance/Performance.Services/AllotService.cs
+52
-5
performance/Performance.Services/ConfigService.cs
+90
-0
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+7
-4
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+5
-2
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeEconomic.cs
+3
-3
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeWorkload.cs
+21
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
+124
-0
performance/Performance.Services/SheetSevice.cs
+69
-38
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
d05ae030
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
using
Performance.Services
;
using
Performance.Services
;
using
System
;
using
System
;
...
@@ -135,7 +136,6 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Drug
...
@@ -135,7 +136,6 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Drug
}
}
#
endregion
#
endregion
#
region
drugprop
#
region
drugprop
/// <summary>
/// <summary>
/// 获取 药占比类型信息列表
/// 获取 药占比类型信息列表
...
@@ -355,5 +355,73 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody
...
@@ -355,5 +355,73 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
#
endregion
#
endregion
#
region
workitem
/// <summary>
/// 获取工作量绩效配置列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"workitemlist"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
cof_workitem
>>
GetWorkItems
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
{
var
list
=
_configService
.
GetWorkItems
(
request
.
AllotID
);
return
new
ApiResponse
<
List
<
cof_workitem
>>(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增工作量绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"workiteminsert"
)]
[
HttpPost
]
public
ApiResponse
<
cof_workitem
>
WorkItemInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
WorkItemRequest
request
)
{
var
workyear
=
_configService
.
WorkItemInsert
(
request
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
}
/// <summary>
/// 修改工作量绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"workitemupdate"
)]
[
HttpPost
]
public
ApiResponse
<
cof_workitem
>
WorkItemUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
WorkItemRequest
request
)
{
var
workyear
=
_configService
.
WorkItemUpdate
(
request
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
}
/// <summary>
/// 删除工作量绩效配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"workitemdelete"
)]
[
HttpPost
]
public
ApiResponse
WorkItemDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkItemRequest
request
)
{
if
(!
_configService
.
WorkItemkDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
/// <summary>
/// 获取工作量绩效列头
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"workheader"
)]
[
HttpPost
]
public
ApiResponse
WorkHeader
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
{
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/TemplateController.cs
View file @
d05ae030
...
@@ -58,7 +58,7 @@ public class TemplateController : Controller
...
@@ -58,7 +58,7 @@ public class TemplateController : Controller
}
}
/// <summary>
/// <summary>
/// 从WebAPI下载模板
/// 从WebAPI下载模板
1、医院绩效模板 2、医院二次分配绩效模板 3、医院绩效模板(无执行科室)
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"downtemplate"
)]
[
Route
(
"downtemplate"
)]
...
@@ -66,9 +66,19 @@ public class TemplateController : Controller
...
@@ -66,9 +66,19 @@ public class TemplateController : Controller
[
AllowAnonymous
]
[
AllowAnonymous
]
public
IActionResult
DownFile
(
int
type
=
1
)
public
IActionResult
DownFile
(
int
type
=
1
)
{
{
string
path
=
(
type
==
1
)
string
path
=
""
;
?
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院绩效模板.xlsx"
)
switch
(
type
)
:
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院二次分配绩效模板.xlsx"
);
{
case
1
:
path
=
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院绩效模板.xlsx"
);
break
;
case
2
:
path
=
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院二次分配绩效模板.xlsx"
);
break
;
case
3
:
path
=
Path
.
Combine
(
env
.
ContentRootPath
,
"Template"
,
"医院绩效模板(无执行科室).xlsx"
);
break
;
}
var
memoryStream
=
new
MemoryStream
();
var
memoryStream
=
new
MemoryStream
();
using
(
var
stream
=
new
FileStream
(
path
,
FileMode
.
Open
))
using
(
var
stream
=
new
FileStream
(
path
,
FileMode
.
Open
))
...
@@ -343,7 +353,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
...
@@ -343,7 +353,7 @@ public ApiResponse SaveFile([FromForm] IFormCollection form, int allotId, int ho
{
{
logger
.
LogInformation
(
$"保存提取文件异常
{
ex
.
ToString
()}
"
);
logger
.
LogInformation
(
$"保存提取文件异常
{
ex
.
ToString
()}
"
);
LogHelper
.
Error
(
$"保存失败:"
+
ex
.
ToString
(),
"保存提取文件"
);
LogHelper
.
Error
(
$"保存失败:"
+
ex
.
ToString
(),
"保存提取文件"
);
return
new
ApiResponse
(
ResponseType
.
Error
,
ex
.
Message
);
return
new
ApiResponse
(
ResponseType
.
Error
,
ex
.
Message
);
}
}
}
}
}
}
...
...
performance/Performance.Api/Performance.Api.csproj
View file @
d05ae030
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None Remove="Template\~%24医院绩效模板.xlsx" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper" Version="8.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="6.0.0" />
<PackageReference Include="CSRedisCore" Version="3.0.45" />
<PackageReference Include="CSRedisCore" Version="3.0.45" />
...
@@ -72,6 +76,9 @@
...
@@ -72,6 +76,9 @@
<None Update="Template\医院二次分配绩效模板.xlsx">
<None Update="Template\医院二次分配绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</None>
<None Update="Template\医院绩效模板%28无执行科室%29.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\医院绩效模板.xlsx">
<None Update="Template\医院绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</None>
...
...
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
0 → 100644
View file @
d05ae030
File added
performance/Performance.Api/Template/医院绩效模板.xlsx
View file @
d05ae030
No preview for this file type
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
d05ae030
...
@@ -179,6 +179,13 @@
...
@@ -179,6 +179,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.AllotLog(Performance.DtoModels.AllotRequest)"
>
<summary>
绩效历史日志
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
获取绩效发放列表
获取绩效发放列表
...
@@ -403,6 +410,34 @@
...
@@ -403,6 +410,34 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.GetWorkItems(Performance.DtoModels.WorkItemRequest)"
>
<summary>
获取工作量绩效配置列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.WorkItemInsert(Performance.DtoModels.WorkItemRequest)"
>
<summary>
新增工作量绩效配置
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.WorkItemUpdate(Performance.DtoModels.WorkItemRequest)"
>
<summary>
修改工作量绩效配置
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.WorkItemDelete(Performance.DtoModels.WorkItemRequest)"
>
<summary>
删除工作量绩效配置
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetEmployeeList(Performance.DtoModels.EmployeeRequest)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetEmployeeList(Performance.DtoModels.EmployeeRequest)"
>
<summary>
<summary>
获取人员列表
获取人员列表
...
@@ -655,7 +690,7 @@
...
@@ -655,7 +690,7 @@
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.TemplateController.DownFile(System.Int32)"
>
<member
name=
"M:Performance.Api.Controllers.TemplateController.DownFile(System.Int32)"
>
<summary>
<summary>
从WebAPI下载模板
从WebAPI下载模板
1、医院绩效模板 2、医院二次分配绩效模板 3、医院绩效模板(无执行科室)
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
d05ae030
...
@@ -1476,6 +1476,11 @@
...
@@ -1476,6 +1476,11 @@
用户科室
用户科室
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.WorkItemRequest.Item"
>
<summary>
工作量绩效项
</summary>
</member>
<member
name=
"P:Performance.DtoModels.WorkyearRequest.MaxRange"
>
<member
name=
"P:Performance.DtoModels.WorkyearRequest.MaxRange"
>
<summary>
<summary>
最大工龄范围(小于)
最大工龄范围(小于)
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
d05ae030
...
@@ -52,6 +52,9 @@
...
@@ -52,6 +52,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_singlefactor"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_singlefactor"
>
<summary>
特殊绩效项指标
</summary>
<summary>
特殊绩效项指标
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_workitem"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_workyear"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_workyear"
>
<summary>
工龄对应绩效系数配置
</summary>
<summary>
工龄对应绩效系数配置
</summary>
</member>
</member>
...
@@ -106,6 +109,12 @@
...
@@ -106,6 +109,12 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_account"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_account"
>
<summary>
科室核算结果
</summary>
<summary>
科室核算结果
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_accountdoctor"
>
<summary>
医生科室核算结果
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_accountnurse"
>
<summary>
护理科室核算结果
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_baiscnorm"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.res_baiscnorm"
>
<summary>
核算基础标准
</summary>
<summary>
核算基础标准
</summary>
</member>
</member>
...
@@ -778,6 +787,26 @@
...
@@ -778,6 +787,26 @@
系数值
系数值
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.EntityModels.cof_workitem"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_workitem.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_workitem.AllotID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_workitem.Item"
>
<summary>
工作量中需做运算的项
</summary>
</member>
<member
name=
"T:Performance.EntityModels.cof_workyear"
>
<member
name=
"T:Performance.EntityModels.cof_workyear"
>
<summary>
<summary>
工龄对应绩效系数配置
工龄对应绩效系数配置
...
@@ -1418,7 +1447,7 @@
...
@@ -1418,7 +1447,7 @@
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.log_dbug.Tit
i
le"
>
<member
name=
"P:Performance.EntityModels.log_dbug.Title"
>
<summary>
<summary>
</summary>
</summary>
...
@@ -1428,6 +1457,11 @@
...
@@ -1428,6 +1457,11 @@
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.log_dbug.Level"
>
<summary>
1、信息(info)2、警告(warn)3、错误(error)4、异常(exception)5、成功(success)
</summary>
</member>
<member
name=
"T:Performance.EntityModels.mod_extract"
>
<member
name=
"T:Performance.EntityModels.mod_extract"
>
<summary>
<summary>
医院数据提取脚本
医院数据提取脚本
...
@@ -1928,6 +1962,221 @@
...
@@ -1928,6 +1962,221 @@
变更日志
变更日志
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.EntityModels.res_accountdoctor"
>
<summary>
医生科室核算结果
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.AllotID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.SheetID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.ManagerNumber"
>
<summary>
科主任/护士长数量
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.Number"
>
<summary>
核算单元医生数量
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.BasicFactor"
>
<summary>
医生基础系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.SlopeFactor"
>
<summary>
倾斜系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.OtherPerfor1"
>
<summary>
其他绩效1
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.OtherPerfor2"
>
<summary>
其他绩效2
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.Extra"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.ScoringAverage"
>
<summary>
考核对分率
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.AdjustFactor"
>
<summary>
调节系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.Income"
>
<summary>
科室业绩
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.PerforFee"
>
<summary>
业绩绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.WorkloadFee"
>
<summary>
工作量绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.PerforTotal"
>
<summary>
绩效合计
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.Avg"
>
<summary>
人均绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.RealGiveFee"
>
<summary>
实发绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountdoctor.ChangeLog"
>
<summary>
变更日志
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_accountnurse"
>
<summary>
护理科室核算结果
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.AllotID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.SheetID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.AccountingUnit"
>
<summary>
核算单元
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.ManagerNumber"
>
<summary>
科主任/护士长数量
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.Number"
>
<summary>
护士人数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.BasicFactor"
>
<summary>
护理基础系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.SlopeFactor"
>
<summary>
倾斜系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.OtherPerfor1"
>
<summary>
其他绩效1
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.OtherPerfor2"
>
<summary>
其他绩效2
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.Extra"
>
<summary>
医院奖罚
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.ScoringAverage"
>
<summary>
考核对分率
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.AdjustFactor"
>
<summary>
调节系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.Income"
>
<summary>
科室业绩
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.PerforFee"
>
<summary>
业绩绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.WorkloadFee"
>
<summary>
工作量绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.PerforTotal"
>
<summary>
绩效合计
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.Avg"
>
<summary>
人均绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_accountnurse.RealGiveFee"
>
<summary>
实发绩效
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_baiscnorm"
>
<member
name=
"T:Performance.EntityModels.res_baiscnorm"
>
<summary>
<summary>
核算基础标准
核算基础标准
...
...
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
d05ae030
...
@@ -138,7 +138,8 @@ public enum MinimumType
...
@@ -138,7 +138,8 @@ public enum MinimumType
保底医技医生
=
2
,
保底医技医生
=
2
,
[
Description
(
"保底绩效护士人均绩效"
)]
[
Description
(
"保底绩效护士人均绩效"
)]
保底护士
=
3
,
保底护士
=
3
,
[
Description
(
"保底绩效行政工勤人均绩效"
)]
保底工勤
=
4
,
}
}
///// <summary>
///// <summary>
...
...
performance/Performance.DtoModels/Request/WorkItemRequest.cs
0 → 100644
View file @
d05ae030
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
WorkItemRequest
{
public
int
ID
{
get
;
set
;
}
public
int
AllotID
{
get
;
set
;
}
/// <summary>
/// 工作量绩效项
/// </summary>
public
string
Item
{
get
;
set
;
}
public
class
WorkItemRequestValidator
:
AbstractValidator
<
WorkItemRequest
>
{
public
WorkItemRequestValidator
()
{
RuleSet
(
"Select"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
NotEmpty
().
GreaterThan
(
0
);
});
RuleSet
(
"Insert"
,
()
=>
{
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Delete"
,
()
=>
{
RuleFor
(
x
=>
x
.
ID
).
NotNull
().
GreaterThan
(
0
);
});
}
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
d05ae030
...
@@ -12,105 +12,107 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -12,105 +12,107 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
{
{
}
}
/// <summary> 二次分配概览 </summary>
/// <summary> 二次分配概览 </summary>
public
virtual
DbSet
<
ag_againsituation
>
ag_againsituation
{
get
;
set
;
}
public
virtual
DbSet
<
ag_againsituation
>
ag_againsituation
{
get
;
set
;
}
/// <summary> 二次分配不固定数据 </summary>
/// <summary> 二次分配不固定数据 </summary>
public
virtual
DbSet
<
ag_data
>
ag_data
{
get
;
set
;
}
public
virtual
DbSet
<
ag_data
>
ag_data
{
get
;
set
;
}
/// <summary> 二次分配人员名单 </summary>
/// <summary> 二次分配人员名单 </summary>
public
virtual
DbSet
<
ag_employee
>
ag_employee
{
get
;
set
;
}
public
virtual
DbSet
<
ag_employee
>
ag_employee
{
get
;
set
;
}
/// <summary> 二次分配不固定列头数据 </summary>
/// <summary> 二次分配不固定列头数据 </summary>
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
/// <summary> 考核类别 </summary>
/// <summary> 考核类别 </summary>
public
virtual
DbSet
<
as_assess
>
as_assess
{
get
;
set
;
}
public
virtual
DbSet
<
as_assess
>
as_assess
{
get
;
set
;
}
/// <summary> 考核列头 </summary>
/// <summary> 考核列头 </summary>
public
virtual
DbSet
<
as_columns
>
as_columns
{
get
;
set
;
}
public
virtual
DbSet
<
as_columns
>
as_columns
{
get
;
set
;
}
/// <summary> 考核数据 </summary>
/// <summary> 考核数据 </summary>
public
virtual
DbSet
<
as_data
>
as_data
{
get
;
set
;
}
public
virtual
DbSet
<
as_data
>
as_data
{
get
;
set
;
}
/// <summary> 考核类别 </summary>
/// <summary> 考核类别 </summary>
public
virtual
DbSet
<
as_tempassess
>
as_tempassess
{
get
;
set
;
}
public
virtual
DbSet
<
as_tempassess
>
as_tempassess
{
get
;
set
;
}
/// <summary> 考核列头 </summary>
/// <summary> 考核列头 </summary>
public
virtual
DbSet
<
as_tempcolumns
>
as_tempcolumns
{
get
;
set
;
}
public
virtual
DbSet
<
as_tempcolumns
>
as_tempcolumns
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
/// <summary> 上传excel文件校验配置 </summary>
/// <summary> 上传excel文件校验配置 </summary>
public
virtual
DbSet
<
cof_check
>
cof_check
{
get
;
set
;
}
public
virtual
DbSet
<
cof_check
>
cof_check
{
get
;
set
;
}
/// <summary> 规模绩效、效率绩效计算系数配置 </summary>
/// <summary> 规模绩效、效率绩效计算系数配置 </summary>
public
virtual
DbSet
<
cof_director
>
cof_director
{
get
;
set
;
}
public
virtual
DbSet
<
cof_director
>
cof_director
{
get
;
set
;
}
/// <summary> 工作量门诊药占比系数 </summary>
/// <summary> 工作量门诊药占比系数 </summary>
public
virtual
DbSet
<
cof_drugprop
>
cof_drugprop
{
get
;
set
;
}
public
virtual
DbSet
<
cof_drugprop
>
cof_drugprop
{
get
;
set
;
}
/// <summary> 药占比费用列头名称 </summary>
/// <summary> 药占比费用列头名称 </summary>
public
virtual
DbSet
<
cof_drugtype
>
cof_drugtype
{
get
;
set
;
}
public
virtual
DbSet
<
cof_drugtype
>
cof_drugtype
{
get
;
set
;
}
/// <summary> ICU医生护士有效收入汇总计算系数 </summary>
/// <summary> ICU医生护士有效收入汇总计算系数 </summary>
public
virtual
DbSet
<
cof_income
>
cof_income
{
get
;
set
;
}
public
virtual
DbSet
<
cof_income
>
cof_income
{
get
;
set
;
}
/// <summary> 特殊绩效项指标 </summary>
/// <summary> 特殊绩效项指标 </summary>
public
virtual
DbSet
<
cof_singlefactor
>
cof_singlefactor
{
get
;
set
;
}
public
virtual
DbSet
<
cof_singlefactor
>
cof_singlefactor
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_workitem
>
cof_workitem
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 </summary>
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
hos_personfee
>
hos_personfee
{
get
;
set
;
}
public
virtual
DbSet
<
hos_personfee
>
hos_personfee
{
get
;
set
;
}
/// <summary> 科室核算导入信息 </summary>
/// <summary> 科室核算导入信息 </summary>
public
virtual
DbSet
<
im_accountbasic
>
im_accountbasic
{
get
;
set
;
}
public
virtual
DbSet
<
im_accountbasic
>
im_accountbasic
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_data
>
im_data
{
get
;
set
;
}
public
virtual
DbSet
<
im_data
>
im_data
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_employee
>
im_employee
{
get
;
set
;
}
public
virtual
DbSet
<
im_employee
>
im_employee
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_header
>
im_header
{
get
;
set
;
}
public
virtual
DbSet
<
im_header
>
im_header
{
get
;
set
;
}
/// <summary> 特殊科室核算 </summary>
/// <summary> 特殊科室核算 </summary>
public
virtual
DbSet
<
im_specialunit
>
im_specialunit
{
get
;
set
;
}
public
virtual
DbSet
<
im_specialunit
>
im_specialunit
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
log_check
>
log_check
{
get
;
set
;
}
public
virtual
DbSet
<
log_check
>
log_check
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
log_dbug
>
log_dbug
{
get
;
set
;
}
public
virtual
DbSet
<
log_dbug
>
log_dbug
{
get
;
set
;
}
/// <summary> 医院数据提取脚本 </summary>
/// <summary> 医院数据提取脚本 </summary>
public
virtual
DbSet
<
mod_extract
>
mod_extract
{
get
;
set
;
}
public
virtual
DbSet
<
mod_extract
>
mod_extract
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
mod_item
>
mod_item
{
get
;
set
;
}
public
virtual
DbSet
<
mod_item
>
mod_item
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
mod_module
>
mod_module
{
get
;
set
;
}
public
virtual
DbSet
<
mod_module
>
mod_module
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
mod_special
>
mod_special
{
get
;
set
;
}
public
virtual
DbSet
<
mod_special
>
mod_special
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
per_againallot
>
per_againallot
{
get
;
set
;
}
public
virtual
DbSet
<
per_againallot
>
per_againallot
{
get
;
set
;
}
/// <summary> 医院绩效分配 </summary>
/// <summary> 医院绩效分配 </summary>
public
virtual
DbSet
<
per_allot
>
per_allot
{
get
;
set
;
}
public
virtual
DbSet
<
per_allot
>
per_allot
{
get
;
set
;
}
/// <summary> 首次上传文件地址(当医院存在标准库时,首次上传用户提交固定格式的excel,开发人员配置SQL脚本) </summary>
/// <summary> 首次上传文件地址(当医院存在标准库时,首次上传用户提交固定格式的excel,开发人员配置SQL脚本) </summary>
public
virtual
DbSet
<
per_first
>
per_first
{
get
;
set
;
}
public
virtual
DbSet
<
per_first
>
per_first
{
get
;
set
;
}
/// <summary> 上传数据解析 </summary>
/// <summary> 上传数据解析 </summary>
public
virtual
DbSet
<
per_sheet
>
per_sheet
{
get
;
set
;
}
public
virtual
DbSet
<
per_sheet
>
per_sheet
{
get
;
set
;
}
/// <summary> 科室核算结果 </summary>
/// <summary> 科室核算结果 </summary>
public
virtual
DbSet
<
res_account
>
res_account
{
get
;
set
;
}
public
virtual
DbSet
<
res_account
>
res_account
{
get
;
set
;
}
//
/// <summary> 医生科室核算结果 </summary>
/// <summary> 医生科室核算结果 </summary>
//
public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
public
virtual
DbSet
<
res_accountdoctor
>
res_accountdoctor
{
get
;
set
;
}
//
/// <summary> 护理科室核算结果 </summary>
/// <summary> 护理科室核算结果 </summary>
//
public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
public
virtual
DbSet
<
res_accountnurse
>
res_accountnurse
{
get
;
set
;
}
/// <summary> 核算基础标准 </summary>
/// <summary> 核算基础标准 </summary>
public
virtual
DbSet
<
res_baiscnorm
>
res_baiscnorm
{
get
;
set
;
}
public
virtual
DbSet
<
res_baiscnorm
>
res_baiscnorm
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
res_compute
>
res_compute
{
get
;
set
;
}
public
virtual
DbSet
<
res_compute
>
res_compute
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
res_specialunit
>
res_specialunit
{
get
;
set
;
}
public
virtual
DbSet
<
res_specialunit
>
res_specialunit
{
get
;
set
;
}
/// <summary> 医院数据提取脚本 </summary>
/// <summary> 医院数据提取脚本 </summary>
public
virtual
DbSet
<
sys_extract
>
sys_extract
{
get
;
set
;
}
public
virtual
DbSet
<
sys_extract
>
sys_extract
{
get
;
set
;
}
/// <summary> 医院信息 </summary>
/// <summary> 医院信息 </summary>
public
virtual
DbSet
<
sys_hospital
>
sys_hospital
{
get
;
set
;
}
public
virtual
DbSet
<
sys_hospital
>
sys_hospital
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_hospitalconfig
>
sys_hospitalconfig
{
get
;
set
;
}
public
virtual
DbSet
<
sys_hospitalconfig
>
sys_hospitalconfig
{
get
;
set
;
}
/// <summary> 菜单表 </summary>
/// <summary> 菜单表 </summary>
public
virtual
DbSet
<
sys_menu
>
sys_menu
{
get
;
set
;
}
public
virtual
DbSet
<
sys_menu
>
sys_menu
{
get
;
set
;
}
/// <summary> 角色表 </summary>
/// <summary> 角色表 </summary>
public
virtual
DbSet
<
sys_role
>
sys_role
{
get
;
set
;
}
public
virtual
DbSet
<
sys_role
>
sys_role
{
get
;
set
;
}
/// <summary> 角色菜单关联表 </summary>
/// <summary> 角色菜单关联表 </summary>
public
virtual
DbSet
<
sys_role_menu
>
sys_role_menu
{
get
;
set
;
}
public
virtual
DbSet
<
sys_role_menu
>
sys_role_menu
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_sms
>
sys_sms
{
get
;
set
;
}
public
virtual
DbSet
<
sys_sms
>
sys_sms
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_task
>
sys_task
{
get
;
set
;
}
public
virtual
DbSet
<
sys_task
>
sys_task
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_user
>
sys_user
{
get
;
set
;
}
public
virtual
DbSet
<
sys_user
>
sys_user
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_user_hospital
>
sys_user_hospital
{
get
;
set
;
}
public
virtual
DbSet
<
sys_user_hospital
>
sys_user_hospital
{
get
;
set
;
}
/// <summary> 用户角色关联表 </summary>
/// <summary> 用户角色关联表 </summary>
public
virtual
DbSet
<
sys_user_role
>
sys_user_role
{
get
;
set
;
}
public
virtual
DbSet
<
sys_user_role
>
sys_user_role
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Entity/cof_workitem.cs
0 → 100644
View file @
d05ae030
//-----------------------------------------------------------------------
// <copyright file=" cof_workitem.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"cof_workitem"
)]
public
class
cof_workitem
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// 工作量中需做运算的项
/// </summary>
public
string
Item
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/log_dbug.cs
View file @
d05ae030
...
@@ -42,7 +42,7 @@ public class log_dbug
...
@@ -42,7 +42,7 @@ public class log_dbug
public
string
Message
{
get
;
set
;
}
public
string
Message
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
1、信息(info)2、警告(warn)3、错误(error)4、异常(exception)5、成功(success)
/// </summary>
/// </summary>
public
Nullable
<
int
>
Level
{
get
;
set
;
}
public
Nullable
<
int
>
Level
{
get
;
set
;
}
}
}
...
...
performance/Performance.Repository/Repository/PerforCofworkitemRepository.cs
0 → 100644
View file @
d05ae030
//-----------------------------------------------------------------------
// <copyright file=" cof_workitem.cs">
// * FileName: cof_workitem.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// cof_workitem Repository
/// </summary>
public
partial
class
PerforCofworkitemRepository
:
PerforRepository
<
cof_workitem
>
{
public
PerforCofworkitemRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforResaccountdoctorRepository.cs
View file @
d05ae030
//
//
-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//
//
<copyright file=" res_accountdoctor.cs">
// <copyright file=" res_accountdoctor.cs">
//
//
* FileName: res_accountdoctor.cs
// * FileName: res_accountdoctor.cs
//
//
</copyright>
// </copyright>
//
//
-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//
using System;
using
System
;
//
using Performance.EntityModels;
using
Performance.EntityModels
;
//
namespace Performance.Repository
namespace
Performance.Repository
//
{
{
//
/// <summary>
/// <summary>
//
/// res_accountdoctor Repository
/// res_accountdoctor Repository
//
/// </summary>
/// </summary>
//
public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor>
public
partial
class
PerforResaccountdoctorRepository
:
PerforRepository
<
res_accountdoctor
>
//
{
{
//
public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context)
public
PerforResaccountdoctorRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
//
{
{
//
}
}
//
}
}
//
}
}
performance/Performance.Repository/Repository/PerforResaccountnurseRepository.cs
View file @
d05ae030
//
//
-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//
//
<copyright file=" res_accountnurse.cs">
// <copyright file=" res_accountnurse.cs">
//
//
* FileName: res_accountnurse.cs
// * FileName: res_accountnurse.cs
//
//
</copyright>
// </copyright>
//
//
-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//
using System;
using
System
;
//
using Performance.EntityModels;
using
Performance.EntityModels
;
//
namespace Performance.Repository
namespace
Performance.Repository
//
{
{
//
/// <summary>
/// <summary>
//
/// res_accountnurse Repository
/// res_accountnurse Repository
//
/// </summary>
/// </summary>
//
public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse>
public
partial
class
PerforResaccountnurseRepository
:
PerforRepository
<
res_accountnurse
>
//
{
{
//
public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context)
public
PerforResaccountnurseRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
//
{
{
//
}
}
//
}
}
//
}
}
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
d05ae030
...
@@ -97,7 +97,7 @@ public bool Discern(PerExcel excel, per_allot allot)
...
@@ -97,7 +97,7 @@ public bool Discern(PerExcel excel, per_allot allot)
cellValue
=
cellValue
.
Union
(
item
.
Children
.
Select
(
t
=>
t
.
CellValue
)).
ToList
();
cellValue
=
cellValue
.
Union
(
item
.
Children
.
Select
(
t
=>
t
.
CellValue
)).
ToList
();
}
}
var
headerCheck
=
perforCofcheckRepository
.
GetEntities
(
t
=>
t
.
Type
==
(
int
)
sheet
.
SheetType
)
var
headerCheck
=
perforCofcheckRepository
.
GetEntities
(
t
=>
t
.
Type
==
(
int
)
sheet
.
SheetType
)
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
?
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
if
(
headerCheck
!=
null
)
if
(
headerCheck
!=
null
)
{
{
var
list
=
cellValue
.
Intersect
(
headerCheck
).
ToList
();
//求交集,提交的列头和数据库中保存的列头
var
list
=
cellValue
.
Intersect
(
headerCheck
).
ToList
();
//求交集,提交的列头和数据库中保存的列头
...
@@ -168,7 +168,8 @@ public bool CheckData(PerExcel excel, per_allot allot)
...
@@ -168,7 +168,8 @@ public bool CheckData(PerExcel excel, per_allot allot)
{
{
var
doctor
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医生组"
).
FirstOrDefault
();
var
doctor
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医生组"
).
FirstOrDefault
();
var
nurse
=
item
.
Where
(
t
=>
t
.
UnitType
==
"护理组"
).
FirstOrDefault
();
var
nurse
=
item
.
Where
(
t
=>
t
.
UnitType
==
"护理组"
).
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
doctor
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
nurse
.
AccountingUnit
))
var
technician
=
item
.
Where
(
t
=>
t
.
UnitType
==
"医技组"
).
FirstOrDefault
();
if
(
string
.
IsNullOrEmpty
(
doctor
?.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
nurse
?.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
technician
?.
AccountingUnit
))
{
{
flag
=
false
;
flag
=
false
;
rowNumber
.
Add
(
doctor
.
RowNumber
+
1
);
rowNumber
.
Add
(
doctor
.
RowNumber
+
1
);
...
...
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
d05ae030
...
@@ -84,6 +84,7 @@ private PerExcel Import(per_allot allot)
...
@@ -84,6 +84,7 @@ private PerExcel Import(per_allot allot)
IWorkbook
workbook
=
(
excel
.
Version
==
ExcelVersion
.
xlsx
)
IWorkbook
workbook
=
(
excel
.
Version
==
ExcelVersion
.
xlsx
)
?
(
IWorkbook
)(
new
XSSFWorkbook
(
fs
))
?
(
IWorkbook
)(
new
XSSFWorkbook
(
fs
))
:
(
IWorkbook
)(
new
HSSFWorkbook
(
fs
));
:
(
IWorkbook
)(
new
HSSFWorkbook
(
fs
));
bool
isnew
=
false
;
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
{
{
var
sheet
=
workbook
.
GetSheetAt
(
i
);
var
sheet
=
workbook
.
GetSheetAt
(
i
);
...
@@ -92,9 +93,14 @@ private PerExcel Import(per_allot allot)
...
@@ -92,9 +93,14 @@ private PerExcel Import(per_allot allot)
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
if
(
SheetType
.
Unidentifiable
!=
sheetType
)
{
{
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"开始读取sheet --
{
sheet
.
SheetName
}
"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
st
=
perSheetService
.
Sheet
(
sheet
);
var
st
=
perSheetService
.
Sheet
(
sheet
,
isnew
);
excel
.
PerSheet
.
Add
(
st
);
excel
.
PerSheet
.
Add
(
st
);
}
}
else
{
if
(
sheet
.
SheetName
.
Contains
(
"无执行科室"
))
isnew
=
true
;
}
}
}
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"excel文件基础数据读取完成!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"开始读取excel文件"
,
$"excel文件基础数据读取完成!"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
return
excel
;
return
excel
;
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
d05ae030
...
@@ -25,6 +25,7 @@ public class ProcessComputService : IAutoInjection
...
@@ -25,6 +25,7 @@ public class ProcessComputService : IAutoInjection
private
PerforResaccountRepository
perforResaccountRepository
;
private
PerforResaccountRepository
perforResaccountRepository
;
private
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
;
private
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
;
private
PerforCofworkitemRepository
perforCofworkitemRepository
;
private
readonly
LogManageService
logManageService
;
private
readonly
LogManageService
logManageService
;
public
ProcessComputService
(
PerforCofincomeRepository
perforCofincomeRepository
,
public
ProcessComputService
(
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
...
@@ -35,6 +36,7 @@ public class ProcessComputService : IAutoInjection
...
@@ -35,6 +36,7 @@ public class ProcessComputService : IAutoInjection
PerforResaccountRepository
perforResaccountRepository
,
PerforResaccountRepository
perforResaccountRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
,
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
,
PerforCofworkitemRepository
perforCofworkitemRepository
,
LogManageService
logManageService
)
LogManageService
logManageService
)
{
{
this
.
perforCofincomeRepository
=
perforCofincomeRepository
;
this
.
perforCofincomeRepository
=
perforCofincomeRepository
;
...
@@ -46,53 +48,36 @@ public class ProcessComputService : IAutoInjection
...
@@ -46,53 +48,36 @@ public class ProcessComputService : IAutoInjection
this
.
perforResaccountRepository
=
perforResaccountRepository
;
this
.
perforResaccountRepository
=
perforResaccountRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
this
.
perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
this
.
perforCofworkitemRepository
=
perforCofworkitemRepository
;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
}
}
/// <summary>
///// <summary>
/// 合并计算并保存
///// 合并计算并保存
/// </summary>
///// </summary>
/// <param name="excel"></param>
///// <param name="excel"></param>
/// <param name="allot"></param>
///// <param name="allot"></param>
/// <returns></returns>
///// <returns></returns>
public
List
<
PerSheet
>
MergeAndSave
(
PerExcel
excel
,
per_allot
allot
)
//public List<PerSheet> MergeAndSave(PerExcel excel, List<res_baiscnorm> baiscnormList, per_allot allot)
{
//{
List
<
PerSheet
>
list
=
MergeCompute
(
excel
,
allot
.
ID
);
// List<PerSheet> list = MergeCompute(excel, allot.ID);
Save
(
list
,
allot
.
ID
);
// var baiscnormList1 = ComputeMinimum(excel, list, allot.ID);
return
list
;
}
#
region
save
// var sheet = Compute(excel, list, baiscnormList);
/// <summary>
// list.AddRange(sheet);
/// 保存计算后的医生组绩效
/// </summary>
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveComputeDoctorAccount
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
2
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
// Save(list, allot.ID);
List
<
res_account
>
addList
=
new
List
<
res_account
>();
// return list;
foreach
(
var
data
in
dataList
)
//}
{
var
imdata
=
Mapper
.
Map
<
res_account
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
addList
.
Add
(
imdata
);
}
perforResaccountRepository
.
AddRange
(
addList
.
ToArray
());
}
#
region
save
/// <summary>
/// <summary>
/// 保存计算后的
护理组
绩效
/// 保存计算后的绩效
/// </summary>
/// </summary>
/// <param name="sheet"></param>
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
/// <returns></returns>
private
void
SaveCompute
Nurse
Account
(
PerSheet
sheet
,
int
allotId
)
private
void
SaveComputeAccount
(
PerSheet
sheet
,
int
allotId
)
{
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
2
,
SheetType
=
(
int
)
sheet
.
SheetType
};
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
2
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
perforPerSheetRepository
.
Add
(
imsheet
);
...
@@ -159,18 +144,14 @@ private void SaveCommon(PerSheet sheet, int allotId)
...
@@ -159,18 +144,14 @@ private void SaveCommon(PerSheet sheet, int allotId)
/// </summary>
/// </summary>
/// <param name="perSheets"></param>
/// <param name="perSheets"></param>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
p
rivate
void
Save
(
List
<
PerSheet
>
perSheets
,
int
allotId
)
p
ublic
void
Save
(
List
<
PerSheet
>
perSheets
,
int
allotId
)
{
{
foreach
(
var
sheet
in
perSheets
)
foreach
(
var
sheet
in
perSheets
)
{
{
logManageService
.
WriteMsg
(
"正在生成绩效"
,
$"保存核算数据 -
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
$"保存核算数据 -
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
);
if
(
sheet
.
SheetType
==
SheetType
.
ComputeDoctorAccount
)
if
(
sheet
.
SheetType
==
SheetType
.
ComputeDoctorAccount
||
sheet
.
SheetType
==
SheetType
.
ComputeNurseAccount
)
{
{
SaveComputeDoctorAccount
(
sheet
,
allotId
);
SaveComputeAccount
(
sheet
,
allotId
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
ComputeNurseAccount
)
{
SaveComputeNurseAccount
(
sheet
,
allotId
);
}
}
else
else
{
{
...
@@ -184,7 +165,7 @@ private void Save(List<PerSheet> perSheets, int allotId)
...
@@ -184,7 +165,7 @@ private void Save(List<PerSheet> perSheets, int allotId)
/// <summary>
/// <summary>
/// 合并计算
/// 合并计算
/// </summary>
/// </summary>
p
rivate
List
<
PerSheet
>
MergeCompute
(
PerExcel
excel
,
int
allotid
)
p
ublic
(
List
<
PerSheet
>
Sheets
,
List
<
PerSheet
>
MergeSheets
)
MergeCompute
(
PerExcel
excel
,
int
allotid
)
{
{
List
<
PerSheet
>
perSheet
=
new
List
<
PerSheet
>();
List
<
PerSheet
>
perSheet
=
new
List
<
PerSheet
>();
...
@@ -212,11 +193,12 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -212,11 +193,12 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"获取药品费用分割比例"
,
1
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"获取药品费用分割比例"
,
1
,
allotid
,
"ReceiveMessage"
);
var
confs
=
GetDrugConfig
(
excel
,
allotid
);
var
confs
=
GetDrugConfig
(
excel
,
allotid
);
var
conitem
=
perforCofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
);
//医生组 一次计算
//医生组 一次计算
//var onceWorkload1 = workloadCompute.OnceCompute(workload1, confs);
//var onceWorkload1 = workloadCompute.OnceCompute(workload1, confs);
//医生组 二次计算
//医生组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"医生组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"医生组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult1
=
workloadCompute
.
TwiceCompute
(
workload1
);
var
twiceWorkloadResult1
=
workloadCompute
.
TwiceCompute
(
workload1
,
confs
,
conitem
);
twiceWorkloadResult1
.
Sheet
.
SheetType
=
SheetType
.
ComputeDoctorWorkload
;
twiceWorkloadResult1
.
Sheet
.
SheetType
=
SheetType
.
ComputeDoctorWorkload
;
perSheet
.
Add
(
twiceWorkloadResult1
.
Sheet
);
perSheet
.
Add
(
twiceWorkloadResult1
.
Sheet
);
...
@@ -227,22 +209,25 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -227,22 +209,25 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
//var onceWorkload2 = workloadCompute.OnceCompute(workload2);
//var onceWorkload2 = workloadCompute.OnceCompute(workload2);
//护理组 二次计算
//护理组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"护理组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"护理组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult2
=
workloadCompute
.
TwiceCompute
(
workload2
);
var
twiceWorkloadResult2
=
workloadCompute
.
TwiceCompute
(
workload2
,
confs
,
conitem
);
twiceWorkloadResult2
.
Sheet
.
SheetType
=
SheetType
.
ComputeNurseWorkload
;
twiceWorkloadResult2
.
Sheet
.
SheetType
=
SheetType
.
ComputeNurseWorkload
;
perSheet
.
Add
(
twiceWorkloadResult2
.
Sheet
);
perSheet
.
Add
(
twiceWorkloadResult2
.
Sheet
);
var
deptAccounting
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
);
List
<
PerSheet
>
mergeSheets
=
new
List
<
PerSheet
>();
var
dataList
=
deptAccounting
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算保底绩效参考标准"
,
1
,
allotid
,
"ReceiveMessage"
);
var
economicSheet
=
new
PerSheet
{
SheetType
=
SheetType
.
ComputeEconomic
,
PerData
=
new
List
<
IPerData
>()
};
var
baiscnormList
=
ComputeMinimum
(
dataList
,
twiceEconomicResult
.
PerData
,
twiceWorkloadResult1
.
PerData
,
twiceWorkloadResult2
.
PerData
,
allotid
);
economicSheet
.
PerData
.
AddRange
(
twiceEconomicResult
.
PerData
);
var
doctorSheet
=
new
PerSheet
{
SheetType
=
SheetType
.
ComputeDoctorWorkload
,
PerData
=
new
List
<
IPerData
>()
};
doctorSheet
.
PerData
.
AddRange
(
twiceWorkloadResult1
.
PerData
);
var
nurseSheet
=
new
PerSheet
{
SheetType
=
SheetType
.
ComputeNurseWorkload
,
PerData
=
new
List
<
IPerData
>()
};
nurseSheet
.
PerData
.
AddRange
(
twiceWorkloadResult2
.
PerData
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室绩效"
,
1
,
allotid
,
"ReceiveMessage"
);
mergeSheets
.
Add
(
economicSheet
);
var
sheet
=
Compute
(
dataList
,
twiceEconomicResult
.
PerData
,
twiceWorkloadResult1
.
PerData
,
twiceWorkloadResult2
.
PerData
,
baiscnormLis
t
);
mergeSheets
.
Add
(
doctorShee
t
);
perSheet
.
AddRange
(
s
heet
);
mergeSheets
.
Add
(
nurseS
heet
);
return
perSheet
;
return
(
perSheet
,
mergeSheets
)
;
}
}
/// <summary>
/// <summary>
/// 计算科室绩效
/// 计算科室绩效
...
@@ -251,9 +236,15 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -251,9 +236,15 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
/// <param name="economicData"></param>
/// <param name="economicData"></param>
/// <param name="workloadData"></param>
/// <param name="workloadData"></param>
/// <returns></returns>
/// <returns></returns>
private
List
<
PerSheet
>
Compute
(
IEnumerable
<
PerDataAccountBaisc
>
dataList
,
List
<
PerData
>
economicData
,
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
List
<
res_baiscnorm
>
baiscnormList
)
List
<
PerData
>
doctorWorkloadData
,
List
<
PerData
>
nurseWorkloadData
,
List
<
res_baiscnorm
>
baiscnormList
)
{
{
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
pairs
=
new
[]
var
pairs
=
new
[]
{
{
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
}
},
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
}
},
...
@@ -266,10 +257,10 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -266,10 +257,10 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
PerSheet
sheet
=
new
PerSheet
(
info
.
Name
,
info
.
Name
,
info
.
SheetType
,
new
List
<
PerHeader
>(),
new
List
<
IPerData
>());
PerSheet
sheet
=
new
PerSheet
(
info
.
Name
,
info
.
Name
,
info
.
SheetType
,
new
List
<
PerHeader
>(),
new
List
<
IPerData
>());
foreach
(
var
unitType
in
info
.
UnitTypes
)
foreach
(
var
unitType
in
info
.
UnitTypes
)
{
{
var
atDataList
=
data
List
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
());
var
atDataList
=
account
List
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
());
if
(
atDataList
==
null
||
!
atDataList
.
Any
())
if
(
atDataList
==
null
||
!
atDataList
.
Any
())
continue
;
continue
;
foreach
(
var
dept
in
data
List
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()))
foreach
(
var
dept
in
account
List
.
Where
(
t
=>
t
.
UnitType
==
unitType
.
ToString
()))
{
{
if
(
string
.
IsNullOrEmpty
(
dept
.
AccountingUnit
))
if
(
string
.
IsNullOrEmpty
(
dept
.
AccountingUnit
))
continue
;
continue
;
...
@@ -322,7 +313,7 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -322,7 +313,7 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
sheet
.
PerData
.
AddRange
(
atDataList
);
sheet
.
PerData
.
AddRange
(
atDataList
);
}
}
if
(
"专家核算表"
==
info
.
Name
&&
(
sheet
.
PerData
==
null
||
sheet
.
PerData
.
Any
()))
if
(
"专家核算表"
==
info
.
Name
&&
(
sheet
.
PerData
==
null
||
!
sheet
.
PerData
.
Any
()))
continue
;
continue
;
result
.
Add
(
sheet
);
result
.
Add
(
sheet
);
}
}
...
@@ -335,13 +326,20 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
...
@@ -335,13 +326,20 @@ private List<PerSheet> MergeCompute(PerExcel excel, int allotid)
/// </summary>
/// </summary>
/// <param name="baiscnormList"></param>
/// <param name="baiscnormList"></param>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
public
List
<
res_baiscnorm
>
ComputeMinimum
(
IEnumerable
<
PerDataAccountBaisc
>
accountList
,
List
<
PerData
>
economicData
,
List
<
PerData
>
doctorWorkloadData
,
List
<
PerData
>
nurseWorkloadData
,
int
allotId
)
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
[]
var
basicRuleList
=
new
[]
{
{
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底临床医生
,
UnitType
=
UnitType
.
医生组
},
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底临床医生
,
UnitType
=
UnitType
.
医生组
},
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底医技医生
,
UnitType
=
UnitType
.
医技组
},
new
{
Data
=
doctorWorkloadData
,
MinimumType
=
MinimumType
.
保底医技医生
,
UnitType
=
UnitType
.
医技组
},
new
{
Data
=
nurseWorkloadData
,
MinimumType
=
MinimumType
.
保底护士
,
UnitType
=
UnitType
.
护理组
},
new
{
Data
=
nurseWorkloadData
,
MinimumType
=
MinimumType
.
保底护士
,
UnitType
=
UnitType
.
护理组
},
};
};
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
...
@@ -372,7 +370,6 @@ public List<res_baiscnorm> ComputeMinimum(IEnumerable<PerDataAccountBaisc> accou
...
@@ -372,7 +370,6 @@ public List<res_baiscnorm> ComputeMinimum(IEnumerable<PerDataAccountBaisc> accou
};
};
baiscnormList
.
Add
(
baiscnorm
);
baiscnormList
.
Add
(
baiscnorm
);
}
}
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
return
baiscnormList
;
return
baiscnormList
;
}
}
...
@@ -400,7 +397,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
...
@@ -400,7 +397,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
var
allData
=
datalist
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
var
allData
=
datalist
.
GroupBy
(
t
=>
t
.
AccountingUnit
).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
,
SumValue
=
t
.
Sum
(
s
=>
s
.
CellValue
)
});
var
cofList
=
perforCofdrugpropRepository
.
GetEntities
();
var
cofList
=
perforCofdrugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
);
var
unitList
=
(
drugData
?.
Select
(
t
=>
t
.
AccountingUnit
)
??
new
List
<
string
>()).
Union
(
allData
.
Select
(
t
=>
t
.
AccountingUnit
));
var
unitList
=
(
drugData
?.
Select
(
t
=>
t
.
AccountingUnit
)
??
new
List
<
string
>()).
Union
(
allData
.
Select
(
t
=>
t
.
AccountingUnit
));
...
@@ -410,9 +407,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
...
@@ -410,9 +407,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
var
asv
=
allData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
unit
)?.
SumValue
;
var
asv
=
allData
.
FirstOrDefault
(
t
=>
t
.
AccountingUnit
==
unit
)?.
SumValue
;
var
prop
=
asv
.
HasValue
&&
asv
.
Value
>
0
?
Math
.
Round
((
dsv
??
0
)
/
asv
.
Value
,
2
)
:
0
;
var
prop
=
asv
.
HasValue
&&
asv
.
Value
>
0
?
Math
.
Round
((
dsv
??
0
)
/
asv
.
Value
,
2
)
:
0
;
var
fvalue
=
prop
==
0
var
fvalue
=
cofList
.
FirstOrDefault
(
t
=>
prop
>
t
.
MinRange
&&
prop
<=
t
.
MaxRange
)?.
Value
??
0
;
?
0
:
cofList
.
FirstOrDefault
(
t
=>
prop
>
t
.
MinRange
&&
prop
<=
t
.
MaxRange
)?.
Value
??
0
;
cofs
.
Add
(
new
CofDrugProp
{
AccoutingUnit
=
unit
,
Factor
=
fvalue
,
Prop
=
prop
});
cofs
.
Add
(
new
CofDrugProp
{
AccoutingUnit
=
unit
,
Factor
=
fvalue
,
Prop
=
prop
});
}
}
return
cofs
;
return
cofs
;
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
d05ae030
...
@@ -47,7 +47,7 @@ public class ResultComputeService : IAutoInjection
...
@@ -47,7 +47,7 @@ public class ResultComputeService : IAutoInjection
/// 计算最终数据
/// 计算最终数据
/// </summary>
/// </summary>
/// <param name="excel"></param>
/// <param name="excel"></param>
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
PerExcel
excel
,
List
<
PerSheet
>
perSheets
)
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
PerExcel
excel
,
List
<
PerSheet
>
accountSheet
,
bool
isSave
=
true
)
{
{
//取出人员信息
//取出人员信息
var
empolyeeList
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
empolyeeList
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
...
@@ -56,25 +56,27 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
...
@@ -56,25 +56,27 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
List
<
ComputeEmployee
>
computeEmployees
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"临床科室主任、临床科室副主任、临床科室护士长 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
accountbasicList
,
allot
);
var
computResult
=
computeDirector
.
Compute
(
computeEmployees
,
accountbasicList
,
a
ccountSheet
,
a
llot
);
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
baiscNormService
.
ComputeAvg
(
baiscnormList
,
accountbasicList
,
computResult
);
baiscNormService
.
ComputeAvg
(
baiscnormList
,
accountbasicList
,
computResult
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
accountbasicList
,
perSheets
);
baiscNormService
.
DocterNurseBaiscnorm
(
baiscnormList
,
accountbasicList
,
accountSheet
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"院领导、业务中层、工勤人员 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"院领导、业务中层、工勤人员 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
//计算 行政人员 平均值
//计算 行政人员 平均值
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult2
,
empolyeeList
);
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult2
,
empolyeeList
);
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computResult
);
if
(
isSave
)
computes
.
AddRange
(
Mapper
.
Map
<
List
<
res_compute
>>(
computResult2
));
{
computes
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
var
computes
=
Mapper
.
Map
<
List
<
res_compute
>>(
computResult
);
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
computes
.
AddRange
(
Mapper
.
Map
<
List
<
res_compute
>>(
computResult2
));
computes
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
perforRescomputeRepository
.
AddRange
(
computes
.
ToArray
());
}
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
return
baiscnormList
;
return
baiscnormList
;
}
}
...
...
performance/Performance.Services/AllotService.cs
View file @
d05ae030
...
@@ -34,6 +34,8 @@ public class AllotService : IAutoInjection
...
@@ -34,6 +34,8 @@ public class AllotService : IAutoInjection
private
PerforPeragainallotRepository
_againallotRepository
;
private
PerforPeragainallotRepository
_againallotRepository
;
private
PerforLogcheckRepository
perforLogcheckRepository
;
private
PerforLogcheckRepository
perforLogcheckRepository
;
private
readonly
PerforHospitalRepository
perforHospitalRepository
;
private
readonly
PerforHospitalRepository
perforHospitalRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
//private readonly IHubContext<AllotLogHub> hubContext;
//private readonly IHubContext<AllotLogHub> hubContext;
private
readonly
LogManageService
logManageService
;
private
readonly
LogManageService
logManageService
;
...
@@ -51,6 +53,7 @@ public class AllotService : IAutoInjection
...
@@ -51,6 +53,7 @@ public class AllotService : IAutoInjection
PerforPeragainallotRepository
againallotRepository
,
PerforPeragainallotRepository
againallotRepository
,
PerforLogcheckRepository
perforLogcheckRepository
,
PerforLogcheckRepository
perforLogcheckRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
//IHubContext<AllotLogHub> hubContext
//IHubContext<AllotLogHub> hubContext
LogManageService
logManageService
)
LogManageService
logManageService
)
{
{
...
@@ -69,6 +72,7 @@ public class AllotService : IAutoInjection
...
@@ -69,6 +72,7 @@ public class AllotService : IAutoInjection
this
.
logdbug
=
logdbug
;
this
.
logdbug
=
logdbug
;
this
.
perforLogcheckRepository
=
perforLogcheckRepository
;
this
.
perforLogcheckRepository
=
perforLogcheckRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
//this.hubContext = hubContext;
//this.hubContext = hubContext;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
}
}
...
@@ -230,18 +234,61 @@ public void Generate(per_allot allot, string mail)
...
@@ -230,18 +234,61 @@ public void Generate(per_allot allot, string mail)
}
}
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
InGenerate
,
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
));
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
InGenerate
,
EnumHelper
.
GetDescription
(
AllotStates
.
InGenerate
));
// 计算合并数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算合并数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
List
<
PerSheet
>
list
=
processComputService
.
MergeAndSave
(
excel
,
allot
);
//var baiscnorm = baiscNormService.NurseBaiscnorm(list);
//保底绩效计算需分两次进行;
//第一次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)得出科室业绩绩效;
//根据当前业绩绩效核算各人群人均绩效,取工勤人均作为 保底工勤人均绩效
//第二次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效、保底工勤人均绩效)得出科室业绩绩效;
//根据当前业绩绩效核算出最终绩效结果
//科室经济核算汇总、工作量汇总
logManageService
.
WriteMsg
(
"科室业绩汇总"
,
"正在生成科室收入支出汇总、工作量汇总"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
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
sheet
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
);
//计算各人群人均保底绩效
logManageService
.
WriteMsg
(
"计算保底绩效参考标准值"
,
"正在生成保底绩效行政工勤人均绩效"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
minimumBaiscnorm2
=
resultComputeService
.
Compute
(
allot
,
excel
,
sheet
,
false
);
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
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
minimumBaiscnorm
);
//保存计算过程数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存科室业绩结果及计算过程中产生的数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
processComputService
.
Save
(
sheetLast
,
allot
.
ID
);
// 计算最总数据
// 计算最总数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
baiscnormList
=
resultComputeService
.
Compute
(
allot
,
excel
,
li
st
);
var
baiscnormList
=
resultComputeService
.
Compute
(
allot
,
excel
,
sheetLa
st
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
resultComputeService
.
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存最终特殊科室绩效数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
//保存 绩效人均参考标准
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存绩效人均参考标准"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
UpdateAllotStates
(
allot
.
ID
,
(
int
)
AllotStates
.
GenerateSucceed
,
EnumHelper
.
GetDescription
(
AllotStates
.
GenerateSucceed
));
//发送邮件
//发送邮件
SendEmail
(
allot
,
mail
,
1
,
time
);
SendEmail
(
allot
,
mail
,
1
,
time
);
...
...
performance/Performance.Services/ConfigService.cs
View file @
d05ae030
...
@@ -18,11 +18,14 @@ public class ConfigService : IAutoInjection
...
@@ -18,11 +18,14 @@ public class ConfigService : IAutoInjection
private
PerforCofdrugpropRepository
_drugpropRepository
;
private
PerforCofdrugpropRepository
_drugpropRepository
;
private
PerforCofincomeRepository
_incomeRepository
;
private
PerforCofincomeRepository
_incomeRepository
;
private
PerforCofworkyearRepository
_workyearRepository
;
private
PerforCofworkyearRepository
_workyearRepository
;
private
PerforCofworkitemRepository
_workitemRepository
;
private
PerforCofagainRepository
_againRepository
;
private
PerforCofagainRepository
_againRepository
;
private
PerforCofdrugtypeRepository
_drugtypeRepository
;
private
PerforCofdrugtypeRepository
_drugtypeRepository
;
private
PerforPerallotRepository
perforPerAllotRepository
;
private
PerforPerallotRepository
perforPerAllotRepository
;
private
PerforPeragainallotRepository
perforPeragainallotRepository
;
private
PerforPeragainallotRepository
perforPeragainallotRepository
;
private
PerforHospitalRepository
perforHospitalRepository
;
private
PerforHospitalRepository
perforHospitalRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforImheaderRepository
perforImheaderRepository
;
//private PerforLogdbugRepository logdbug;
//private PerforLogdbugRepository logdbug;
private
readonly
LogManageService
logManageService
;
private
readonly
LogManageService
logManageService
;
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
...
@@ -34,6 +37,9 @@ public class ConfigService : IAutoInjection
...
@@ -34,6 +37,9 @@ public class ConfigService : IAutoInjection
PerforPerallotRepository
perforPerAllotRepository
,
PerforPerallotRepository
perforPerAllotRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforCofworkitemRepository
workitemRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforImheaderRepository
perforImheaderRepository
,
//PerforLogdbugRepository logdbug
//PerforLogdbugRepository logdbug
LogManageService
logManageService
)
LogManageService
logManageService
)
{
{
...
@@ -41,11 +47,14 @@ public class ConfigService : IAutoInjection
...
@@ -41,11 +47,14 @@ public class ConfigService : IAutoInjection
this
.
_drugpropRepository
=
cofdrugpropRepository
;
this
.
_drugpropRepository
=
cofdrugpropRepository
;
this
.
_incomeRepository
=
cofincomeRepository
;
this
.
_incomeRepository
=
cofincomeRepository
;
this
.
_workyearRepository
=
cofworkyearRepository
;
this
.
_workyearRepository
=
cofworkyearRepository
;
this
.
_workitemRepository
=
workitemRepository
;
this
.
_againRepository
=
againRepository
;
this
.
_againRepository
=
againRepository
;
this
.
_drugtypeRepository
=
drugtypeRepository
;
this
.
_drugtypeRepository
=
drugtypeRepository
;
this
.
perforPerAllotRepository
=
perforPerAllotRepository
;
this
.
perforPerAllotRepository
=
perforPerAllotRepository
;
this
.
perforPeragainallotRepository
=
perforPeragainallotRepository
;
this
.
perforPeragainallotRepository
=
perforPeragainallotRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforImheaderRepository
=
perforImheaderRepository
;
//this.logdbug = logdbug;
//this.logdbug = logdbug;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
}
}
...
@@ -348,6 +357,63 @@ public bool WorkDelete(WorkyearRequest request)
...
@@ -348,6 +357,63 @@ public bool WorkDelete(WorkyearRequest request)
}
}
#
endregion
#
endregion
#
region
cof_workitem
工作量绩效
/// <summary>
/// 获取cof_workitem列表
/// </summary>
/// <returns></returns>
public
List
<
cof_workitem
>
GetWorkItems
(
int
allotId
)
{
var
list
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
Mapper
.
Map
<
List
<
cof_workitem
>>(
list
);
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_workitem
WorkItemInsert
(
WorkItemRequest
request
)
{
var
workyear
=
Mapper
.
Map
<
cof_workitem
>(
request
);
if
(!
_workitemRepository
.
Add
(
workyear
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
cof_workitem
>(
workyear
);
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_workitem
WorkItemUpdate
(
WorkItemRequest
request
)
{
var
workyear
=
_workitemRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
workyear
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
workyear
.
Item
=
request
.
Item
;
if
(!
_workitemRepository
.
Update
(
workyear
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
cof_workitem
>(
workyear
);
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
WorkItemkDelete
(
WorkItemRequest
request
)
{
var
workyear
=
_workitemRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
workyear
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
return
_workitemRepository
.
Remove
(
workyear
);
}
#
endregion
#
region
Copy
#
region
Copy
/// <summary>
/// <summary>
/// 复制报表基础配置
/// 复制报表基础配置
...
@@ -412,6 +478,17 @@ public void Copy(per_allot allot)
...
@@ -412,6 +478,17 @@ public void Copy(per_allot allot)
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
var
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
1
&&
(
workItem
==
null
||
workItem
.
Count
==
0
))
{
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
{
var
newWorkItem
=
workItem
.
Select
(
t
=>
new
cof_workitem
{
AllotID
=
allot
.
ID
,
Item
=
t
.
Item
});
_workitemRepository
.
AddRange
(
newWorkItem
.
ToArray
());
}
}
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
data
==
null
||
data
.
Count
==
0
)
if
(
data
==
null
||
data
.
Count
==
0
)
{
{
...
@@ -502,5 +579,18 @@ public void ClearAgain(int againId)
...
@@ -502,5 +579,18 @@ public void ClearAgain(int againId)
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清除二次绩效中无效数据,受影响行数:
{
count
}
"
,
1
,
againId
,
"ReceiveMessage"
,
true
);
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清除二次绩效中无效数据,受影响行数:
{
count
}
"
,
1
,
againId
,
"ReceiveMessage"
,
true
);
}
}
#
endregion
#
endregion
/// <summary>
/// 获取工作量绩效列头
/// </summary>
/// <returns></returns>
public
List
<
TitleValue
>
WorkHeader
(
int
allotId
)
{
var
sheets
=
perforPersheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
SheetName
.
Contains
(
"工作量"
));
if
(
sheets
==
null
)
return
new
List
<
TitleValue
>();
var
header
=
perforImheaderRepository
.
GetEntities
(
t
=>
sheets
.
Select
(
s
=>
s
.
ID
).
Contains
(
t
.
SheetID
.
Value
)
&&
!
t
.
CellValue
.
Contains
(
"核算单元"
)
&&
t
.
CellValue
!=
"科室名称"
)?.
ToList
();
return
header
?.
Select
(
t
=>
new
TitleValue
{
Title
=
t
.
CellValue
,
Value
=
t
.
CellValue
}).
Distinct
().
ToList
();
}
}
}
}
}
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
d05ae030
...
@@ -137,7 +137,7 @@ public class ComputeDirector : IAutoInjection
...
@@ -137,7 +137,7 @@ public class ComputeDirector : IAutoInjection
/// <param name="nurseList"></param>
/// <param name="nurseList"></param>
/// <param name="directorList"></param>
/// <param name="directorList"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
im_accountbasic
>
accountbasicList
,
per_allot
allot
)
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
List
<
im_accountbasic
>
accountbasicList
,
List
<
PerSheet
>
accountSheet
,
per_allot
allot
)
{
{
var
basicRuleList
=
new
[]
var
basicRuleList
=
new
[]
{
{
...
@@ -146,8 +146,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
...
@@ -146,8 +146,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医技组
},
new
{
AccountUnitType
=
AccountUnitType
.
科主任
,
UnitType
=
UnitType
.
医技组
},
};
};
//取出科室
//取出科室
var
dataList
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
List
<
res_account
>
dataList
=
new
List
<
res_account
>();
foreach
(
var
account
in
accountSheet
)
{
dataList
.
AddRange
(
AutoMapper
.
Mapper
.
Map
<
List
<
res_account
>>(
account
.
PerData
.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
)));
}
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
foreach
(
var
accountbasic
in
accountbasicList
)
foreach
(
var
accountbasic
in
accountbasicList
)
{
{
...
@@ -268,7 +271,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
...
@@ -268,7 +271,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
}
}
}
}
//添加参数计算
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
1
);
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
==
null
||
item
.
FitPeopleRatio
==
0
?
1
:
item
.
FitPeopleRatio
);
//应发绩效
//应发绩效
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
);
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
);
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
d05ae030
...
@@ -15,7 +15,7 @@ public class PerSheetDataFactory
...
@@ -15,7 +15,7 @@ public class PerSheetDataFactory
/// </summary>
/// </summary>
/// <param name="sheetType"></param>
/// <param name="sheetType"></param>
/// <returns></returns>
/// <returns></returns>
public
static
IPerSheetDataRead
GetDataRead
(
SheetType
sheetType
)
public
static
IPerSheetDataRead
GetDataRead
(
SheetType
sheetType
,
bool
isnew
=
false
)
{
{
IPerSheetDataRead
dataread
=
null
;
IPerSheetDataRead
dataread
=
null
;
switch
(
sheetType
)
switch
(
sheetType
)
...
@@ -24,7 +24,10 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
...
@@ -24,7 +24,10 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
dataread
=
new
PerSheetDataReadEmployee
();
dataread
=
new
PerSheetDataReadEmployee
();
break
;
break
;
case
SheetType
.
Income
:
case
SheetType
.
Income
:
dataread
=
new
PerSheetDataReadIncome
();
if
(
isnew
)
dataread
=
new
PerSheetDataReadBillIncome
();
else
dataread
=
new
PerSheetDataReadIncome
();
break
;
break
;
case
SheetType
.
OtherIncome
:
case
SheetType
.
OtherIncome
:
dataread
=
new
PerSheetDataReadOtherIncome
();
dataread
=
new
PerSheetDataReadOtherIncome
();
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
d05ae030
...
@@ -33,7 +33,7 @@ public class PerSheetService : IAutoInjection
...
@@ -33,7 +33,7 @@ public class PerSheetService : IAutoInjection
/// </summary>
/// </summary>
/// <param name="sheet"></param>
/// <param name="sheet"></param>
/// <returns></returns>
/// <returns></returns>
public
PerSheet
Sheet
(
ISheet
sheet
)
public
PerSheet
Sheet
(
ISheet
sheet
,
bool
isnew
)
{
{
PerSheet
perSheet
=
new
PerSheet
();
PerSheet
perSheet
=
new
PerSheet
();
perSheet
.
SheetName
=
sheet
.
SheetName
;
perSheet
.
SheetName
=
sheet
.
SheetName
;
...
@@ -43,7 +43,7 @@ public PerSheet Sheet(ISheet sheet)
...
@@ -43,7 +43,7 @@ public PerSheet Sheet(ISheet sheet)
if
(
perSheet
.
SheetType
==
SheetType
.
Unidentifiable
)
if
(
perSheet
.
SheetType
==
SheetType
.
Unidentifiable
)
return
null
;
return
null
;
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
perSheet
.
SheetType
);
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
perSheet
.
SheetType
,
isnew
);
var
perHeader
=
_perHeader
.
GetPerHeader
(
sheet
,
sheetRead
.
Point
);
var
perHeader
=
_perHeader
.
GetPerHeader
(
sheet
,
sheetRead
.
Point
);
var
headerReverse
=
_perHeader
.
GetPerHeaderReverse
(
perHeader
);
var
headerReverse
=
_perHeader
.
GetPerHeaderReverse
(
perHeader
);
...
...
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeEconomic.cs
View file @
d05ae030
...
@@ -52,7 +52,7 @@ public PerSheet MergeCompute(PerExcel excel, List<EntityModels.cof_income> incom
...
@@ -52,7 +52,7 @@ public PerSheet MergeCompute(PerExcel excel, List<EntityModels.cof_income> incom
//判断是否创建头部
//判断是否创建头部
if
(!
isHasData
&&
dataList
!=
null
&&
dataList
.
Count
()
>
0
)
if
(!
isHasData
&&
dataList
!=
null
&&
dataList
.
Count
()
>
0
)
isHasData
=
true
;
isHasData
=
true
;
foreach
(
var
item
in
EnumHelper
.
GetItems
<
UnitType
>())
foreach
(
var
item
in
EnumHelper
.
GetItems
<
UnitType
>()
.
Where
(
t
=>
t
.
Name
!=
"专家组"
)
)
{
{
var
group
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
item
.
Name
);
var
group
=
dataList
.
Where
(
t
=>
t
.
UnitType
==
item
.
Name
);
...
@@ -161,11 +161,11 @@ public PerSheet OnceCompute(PerSheet sheet)
...
@@ -161,11 +161,11 @@ public PerSheet OnceCompute(PerSheet sheet)
var
typeClass
=
dataList
.
Where
(
t
=>
header
.
Children
.
Select
(
s
=>
s
.
CellValue
).
Contains
(
t
.
TypeName
));
var
typeClass
=
dataList
.
Where
(
t
=>
header
.
Children
.
Select
(
s
=>
s
.
CellValue
).
Contains
(
t
.
TypeName
));
int
pointcell
=
0
;
int
pointcell
=
0
;
foreach
(
var
item
in
EnumHelper
.
GetItems
<
UnitType
>())
foreach
(
var
item
in
EnumHelper
.
GetItems
<
UnitType
>()
.
Where
(
t
=>
t
.
Name
!=
"专家组"
)
)
{
{
pointcell
++;
pointcell
++;
var
group
=
typeClass
.
Where
(
t
=>
t
.
UnitType
==
item
.
Name
);
var
group
=
typeClass
.
Where
(
t
=>
t
.
UnitType
==
item
.
Name
);
var
childHead
=
new
PerHeader
(
1
,
maxcell
+
pointcell
,
item
.
Name
,
1
,
1
,
1
,
null
,
1
);
var
childHead
=
new
PerHeader
(
1
,
maxcell
+
pointcell
,
item
.
Name
,
1
,
1
,
1
,
null
,
1
);
parentHead
.
Children
.
Add
(
childHead
);
parentHead
.
Children
.
Add
(
childHead
);
var
ds
=
group
.
Where
(
t
=>
t
.
CellValue
.
HasValue
)
var
ds
=
group
.
Where
(
t
=>
t
.
CellValue
.
HasValue
)
...
...
performance/Performance.Services/PerExcelService/SheetDataCompute/PerSheetDataComputeWorkload.cs
View file @
d05ae030
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -98,7 +99,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
...
@@ -98,7 +99,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
/// </summary>
/// </summary>
/// <param name="sheet"></param>
/// <param name="sheet"></param>
/// <returns></returns>
/// <returns></returns>
public
(
PerSheet
Sheet
,
List
<
PerData
>
PerData
)
TwiceCompute
(
PerSheet
sheet
)
public
(
PerSheet
Sheet
,
List
<
PerData
>
PerData
)
TwiceCompute
(
PerSheet
sheet
,
List
<
CofDrugProp
>
confs
=
null
,
List
<
cof_workitem
>
workitems
=
null
)
{
{
//获取最大列坐标位置
//获取最大列坐标位置
int
thiscell
=
sheet
.
PerHeader
.
OrderByDescending
(
t
=>
t
.
PointCell
).
FirstOrDefault
().
PointCell
+
1
;
int
thiscell
=
sheet
.
PerHeader
.
OrderByDescending
(
t
=>
t
.
PointCell
).
FirstOrDefault
().
PointCell
+
1
;
...
@@ -117,7 +118,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
...
@@ -117,7 +118,7 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
UnitType
=
group
.
Key
.
UnitType
,
UnitType
=
group
.
Key
.
UnitType
,
AccountingUnit
=
group
.
Key
.
AccountingUnit
,
AccountingUnit
=
group
.
Key
.
AccountingUnit
,
//CellValue = group.Sum(s => s.CellValue),
//CellValue = group.Sum(s => s.CellValue),
CellValue
=
group
.
Sum
(
s
=>
s
.
IsFactor
?
s
.
CellValue
*
s
.
FactorValue
:
s
.
CellValue
),
CellValue
=
ComputValue
(
group
,
confs
,
workitems
),
TypeName
=
group
.
Key
.
UnitType
,
TypeName
=
group
.
Key
.
UnitType
,
RowNumber
=
group
.
FirstOrDefault
()?.
RowNumber
??
0
,
RowNumber
=
group
.
FirstOrDefault
()?.
RowNumber
??
0
,
IsTotal
=
1
,
IsTotal
=
1
,
...
@@ -131,6 +132,24 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
...
@@ -131,6 +132,24 @@ public PerSheet OnceCompute(PerSheet sheet, List<CofDrugProp> confs = null)
sheet
.
PerData
.
AddRange
(
perDataList
);
sheet
.
PerData
.
AddRange
(
perDataList
);
return
(
sheet
,
perDataList
);
return
(
sheet
,
perDataList
);
}
}
private
decimal
?
ComputValue
(
IGrouping
<
object
,
PerData
>
group
,
List
<
CofDrugProp
>
confs
=
null
,
List
<
cof_workitem
>
workitems
=
null
)
{
if
(
confs
==
null
||
workitems
==
null
)
return
group
.
Sum
(
s
=>
s
.
IsFactor
?
s
.
CellValue
*
s
.
FactorValue
:
s
.
CellValue
);
else
{
var
factor
=
confs
.
FirstOrDefault
(
t
=>
t
.
AccoutingUnit
==
group
.
First
().
AccountingUnit
)?.
Factor
??
1
;
//需要乘系数的项
var
fgroup
=
group
.
Where
(
t
=>
workitems
.
Select
(
s
=>
s
.
Item
).
Contains
(
t
.
TypeName
));
//需要乘系数的项
var
ngroup
=
group
.
Where
(
t
=>
!
workitems
.
Select
(
s
=>
s
.
Item
).
Contains
(
t
.
TypeName
));
var
value
=
fgroup
.
Sum
(
s
=>
s
.
IsFactor
?
s
.
CellValue
*
s
.
FactorValue
:
s
.
CellValue
)
*
factor
;
value
+=
ngroup
.
Sum
(
s
=>
s
.
IsFactor
?
s
.
CellValue
*
s
.
FactorValue
:
s
.
CellValue
);
return
value
;
}
}
#
endregion
#
endregion
}
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
0 → 100644
View file @
d05ae030
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
PerSheetDataReadBillIncome
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
5
,
HeaderLastRowNum
=
5
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
6
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
//核算单元(医技组)
new
AccountingUnit
{
AccountingUnitCellNum
=
-
1
,
UnitType
=
"医技组"
,
DeptCellNum
=
2
,
FactorRow
=
3
,
},
//核算单元(医生组)
new
AccountingUnit
{
AccountingUnitCellNum
=
0
,
UnitType
=
"医生组"
,
DeptCellNum
=
2
,
FactorRow
=
2
,
},
//核算单元(护理组)
new
AccountingUnit
{
AccountingUnitCellNum
=
1
,
UnitType
=
"护理组"
,
DeptCellNum
=
2
,
FactorRow
=
1
,
}
}
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
//循环 当前有几个核算单元
foreach
(
var
unit
in
Point
.
AccountingUnit
)
{
if
(
unit
.
UnitType
==
"医技组"
)
continue
;
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
r
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
(),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
}
}
}
var
tunit
=
Point
.
AccountingUnit
[
0
];
var
rownum
=
sheet
.
LastRowNum
+
1
;
var
technicianRow
=
sheet
.
GetRow
(
4
);
if
(
technicianRow
!=
null
)
{
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
cellValue
=
technicianRow
.
GetCell
(
athead
.
PointCell
).
StringCellValue
;
if
(
string
.
IsNullOrEmpty
(
cellValue
))
continue
;
PerData
data
=
new
PerData
{
RowNumber
=
rownum
,
SignID
=
athead
.
SignID
,
AccountingUnit
=
cellValue
,
Department
=
cellValue
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
(
dataList
.
Select
(
t
=>
(
PerData
)
t
)?.
Where
(
t
=>
t
.
TypeName
==
athead
.
CellValue
).
Sum
(
t
=>
t
.
CellValue
)
??
0
)
/
2
,
Annotation
=
technicianRow
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
tunit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
tunit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
}
}
return
dataList
;
}
}
}
performance/Performance.Services/SheetSevice.cs
View file @
d05ae030
...
@@ -147,8 +147,14 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -147,8 +147,14 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if
(
headList
==
null
)
return
;
if
(
headList
==
null
)
return
;
var
dataList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
).
ToList
();
var
dataList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
).
ToList
();
//添加系数值
var
sheet
=
_perforImSheetRepository
.
GetEntity
(
t
=>
t
.
ID
==
sheetID
);
var
sheet
=
_perforImSheetRepository
.
GetEntity
(
t
=>
t
.
ID
==
sheetID
);
//添加系数值
#
region
添加系数值
int
merge
=
4
;
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
&&
!
headList
.
Select
(
t
=>
t
.
CellValue
).
Contains
(
"核算单元(医技组)"
))
merge
=
3
;
var
factorhead
=
new
Row
(
0
);
var
factorhead
=
new
Row
(
0
);
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
)
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Workload
)
{
{
...
@@ -157,17 +163,35 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -157,17 +163,35 @@ private void CommonExport(int sheetID, SheetExportResponse response)
}
}
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
OtherIncome
||
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
||
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
)
else
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
OtherIncome
||
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
||
sheet
.
SheetType
==
(
int
)
SheetType
.
Expend
)
{
{
factorhead
.
Data
.
Add
(
new
Cell
(
0
,
"护理组分割比例"
,
1
,
4
,
false
,
false
));
factorhead
.
Data
.
Add
(
new
Cell
(
0
,
"护理组分割比例"
,
1
,
merge
,
false
,
false
));
response
=
AddFactor
(
response
,
factorhead
,
headList
.
ToList
(),
dataList
,
UnitType
.
护理组
);
response
=
AddFactor
(
response
,
factorhead
,
headList
.
ToList
(),
dataList
,
UnitType
.
护理组
);
var
factorhead1
=
new
Row
(
1
);
var
factorhead1
=
new
Row
(
1
);
factorhead1
.
Data
.
Add
(
new
Cell
(
0
,
"医生组分割比例"
,
1
,
4
,
false
,
false
));
factorhead1
.
Data
.
Add
(
new
Cell
(
0
,
"医生组分割比例"
,
1
,
merge
,
false
,
false
));
response
=
AddFactor
(
response
,
factorhead1
,
headList
.
ToList
(),
dataList
,
UnitType
.
医生组
);
response
=
AddFactor
(
response
,
factorhead1
,
headList
.
ToList
(),
dataList
,
UnitType
.
医生组
);
var
factorhead2
=
new
Row
(
2
);
var
factorhead2
=
new
Row
(
2
);
factorhead2
.
Data
.
Add
(
new
Cell
(
0
,
"医技组分割比例"
,
1
,
4
,
false
,
false
));
factorhead2
.
Data
.
Add
(
new
Cell
(
0
,
"医技组分割比例"
,
1
,
merge
,
false
,
false
));
response
=
AddFactor
(
response
,
factorhead2
,
headList
.
ToList
(),
dataList
,
UnitType
.
医技组
);
response
=
AddFactor
(
response
,
factorhead2
,
headList
.
ToList
(),
dataList
,
UnitType
.
医技组
);
}
}
if
(
sheet
.
SheetType
==
(
int
)
SheetType
.
Income
&&
!
headList
.
Select
(
t
=>
t
.
CellValue
).
Contains
(
"核算单元(医技组)"
))
{
//var technicianvalue = new Row(response.Header.Count()); technicianvalue.Data.Add(new Cell(0, "医技组核算收入", 1, 4, false, false));
//response.Header.Add(technicianvalue);
var
technicianhead
=
new
Row
(
response
.
Header
.
Count
());
technicianhead
.
Data
.
Add
(
new
Cell
(
0
,
"医技组核算单元"
,
1
,
merge
,
false
,
false
));
response
.
Header
.
Add
(
technicianhead
);
foreach
(
var
header
in
headList
)
{
if
(
new
List
<
string
>
{
"核算单元(医技组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
,
"科室名称"
}.
Contains
(
header
.
CellValue
))
continue
;
var
technician
=
dataList
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
3
&&
t
.
TypeName
==
header
.
CellValue
);
//technicianvalue.Data.Add(new Cell(header.PointCell.Value, technician.CellValue, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
technicianhead
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
technician
?.
AccountingUnit
??
null
,
1
,
1
,
header
.
IsTotal
==
1
,
false
));
}
}
#
endregion
//创建列头行
//创建列头行
#
region
创建列头行
var
rowhead
=
new
Row
(
response
.
Header
.
Count
());
var
rowhead
=
new
Row
(
response
.
Header
.
Count
());
response
.
Header
.
Add
(
rowhead
);
response
.
Header
.
Add
(
rowhead
);
foreach
(
var
header
in
headList
.
Where
(
t
=>
!
t
.
ParentID
.
HasValue
||
t
.
ParentID
.
Value
==
0
))
foreach
(
var
header
in
headList
.
Where
(
t
=>
!
t
.
ParentID
.
HasValue
||
t
.
ParentID
.
Value
==
0
))
...
@@ -189,8 +213,10 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -189,8 +213,10 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if
(!
headList
.
Any
(
t
=>
t
.
ParentID
==
head
.
ID
))
if
(!
headList
.
Any
(
t
=>
t
.
ParentID
==
head
.
ID
))
headers
.
Add
(
head
);
headers
.
Add
(
head
);
}
}
#
endregion
//创建数据行
//创建数据行
#
region
创建数据行
if
(
dataList
==
null
||
dataList
.
Count
==
0
)
return
;
if
(
dataList
==
null
||
dataList
.
Count
==
0
)
return
;
Row
rowbody
=
null
;
Row
rowbody
=
null
;
foreach
(
var
rowNumber
in
dataList
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
())
//.OrderBy(t => t)
foreach
(
var
rowNumber
in
dataList
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
())
//.OrderBy(t => t)
...
@@ -244,6 +270,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
...
@@ -244,6 +270,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
}
}
}
}
}
}
#
endregion
}
}
private
void
AccountNurseExport
(
int
sheetID
,
SheetExportResponse
response
)
private
void
AccountNurseExport
(
int
sheetID
,
SheetExportResponse
response
)
...
@@ -398,47 +425,51 @@ private void AccountBaiscExport(int sheetID, SheetExportResponse response)
...
@@ -398,47 +425,51 @@ private void AccountBaiscExport(int sheetID, SheetExportResponse response)
private
void
EmployeeExport
(
int
sheetID
,
SheetExportResponse
response
)
private
void
EmployeeExport
(
int
sheetID
,
SheetExportResponse
response
)
{
{
var
employeeList
=
_perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
//.OrderBy(t => t.RowNumber);
var
employeeList
=
_perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?
.
OrderByDescending
(
t
=>
t
.
AccountType
)
.
ThenBy
(
t
=>
t
.
AccountingUnit
);
if
(
employeeList
!=
null
&&
employeeList
.
Count
()
>
0
)
if
(
employeeList
!=
null
&&
employeeList
.
Count
()
>
0
)
{
{
var
row
=
new
Row
(
0
);
var
row
=
new
Row
(
0
);
row
.
Data
.
Add
(
new
Cell
(
1
,
"核算单元"
,
1
,
1
,
false
,
false
));
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
(
2
,
"核算单元"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
3
,
"医生姓名"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
3
,
"科室"
,
1
,
1
,
false
,
false
));
row
.
Data
.
Add
(
new
Cell
(
4
,
"职称"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
4
,
"医生姓名"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
5
,
"绩效基数核算参考对象"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
5
,
"职称"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
6
,
"岗位系数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
6
,
"绩效基数核算参考对象"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
7
,
"参加工作时间"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
7
,
"岗位系数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
8
,
"考核得分率"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
8
,
"参加工作时间"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
9
,
"出勤率"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
9
,
"考核得分率"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
10
,
"核算单元医生数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
10
,
"出勤率"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
11
,
"工作量绩效"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
11
,
"核算单元医生数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
12
,
"其他绩效"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
12
,
"工作量绩效"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
13
,
"医院奖罚"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
13
,
"其他绩效"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
14
,
"调节系数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
14
,
"医院奖罚"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
15
,
"发放系数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
15
,
"调节系数"
,
1
,
1
,
false
,
true
));
row
.
Data
.
Add
(
new
Cell
(
16
,
"发放系数"
,
1
,
1
,
false
,
true
));
response
.
Header
.
Add
(
row
);
response
.
Header
.
Add
(
row
);
for
(
int
i
=
0
;
i
<
employeeList
.
Count
();
i
++)
for
(
int
i
=
0
;
i
<
employeeList
.
Count
();
i
++)
{
{
var
item
=
employeeList
.
ElementAt
(
i
);
var
item
=
employeeList
.
ElementAt
(
i
);
var
workTime
=
item
.
WorkTime
!=
null
?
((
DateTime
)
item
.
WorkTime
).
ToString
(
"yyyy-MM-dd"
)
:
""
;
var
workTime
=
item
.
WorkTime
!=
null
?
((
DateTime
)
item
.
WorkTime
).
ToString
(
"yyyy-MM-dd"
)
:
""
;
var
rowbody
=
new
Row
(
i
);
var
rowbody
=
new
Row
(
i
);
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
1
,
item
.
AccountType
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
Department
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
2
,
item
.
AccountingUnit
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
DoctorName
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
3
,
item
.
Department
,
1
,
1
,
false
,
false
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
JobTitle
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
4
,
item
.
DoctorName
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
FitPeople
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
5
,
item
.
JobTitle
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
6
,
item
.
FitPeople
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
workTime
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
7
,
item
.
PostCoefficient
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
item
.
ScoreAverageRate
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
8
,
workTime
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
item
.
Attendance
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
9
,
item
.
ScoreAverageRate
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
item
.
PeopleNumber
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
10
,
item
.
Attendance
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
item
.
Workload
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
11
,
item
.
PeopleNumber
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
12
,
item
.
Workload
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
Punishment
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
13
,
item
.
OtherPerfor
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
item
.
Adjust
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
14
,
item
.
Punishment
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
15
,
item
.
Grant
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
15
,
item
.
Adjust
,
1
,
1
,
false
,
true
));
rowbody
.
Data
.
Add
(
new
Cell
(
16
,
item
.
Grant
,
1
,
1
,
false
,
true
));
response
.
Row
.
Add
(
rowbody
);
response
.
Row
.
Add
(
rowbody
);
}
}
}
}
...
@@ -466,13 +497,13 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
...
@@ -466,13 +497,13 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
var
factor
=
dataList
.
Where
(
t
=>
t
.
AllotID
==
header
.
AllotID
&&
t
.
SheetID
==
header
.
SheetID
&&
t
.
IsFactor
==
1
var
factor
=
dataList
.
Where
(
t
=>
t
.
AllotID
==
header
.
AllotID
&&
t
.
SheetID
==
header
.
SheetID
&&
t
.
IsFactor
==
1
&&
t
.
TypeName
==
header
.
CellValue
);
&&
t
.
TypeName
==
header
.
CellValue
);
decimal
?
value
=
factor
.
Any
()
?
factor
.
FirstOrDefault
().
FactorValue
:
null
;
decimal
?
value
=
factor
.
Any
()
?
factor
.
FirstOrDefault
().
FactorValue
:
null
;
row
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
value
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
row
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
value
,
1
,
1
,
header
.
IsTotal
==
1
,
false
));
}
}
}
}
}
}
else
else
{
{
string
[]
array
=
new
string
[]
{
"核算单元(医
生
组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
,
"科室名称"
};
string
[]
array
=
new
string
[]
{
"核算单元(医
技
组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
,
"科室名称"
};
foreach
(
var
header
in
headList
.
Where
(
t
=>
!
t
.
ParentID
.
HasValue
||
t
.
ParentID
.
Value
==
0
))
foreach
(
var
header
in
headList
.
Where
(
t
=>
!
t
.
ParentID
.
HasValue
||
t
.
ParentID
.
Value
==
0
))
{
{
if
(!
array
.
Contains
(
header
.
CellValue
))
if
(!
array
.
Contains
(
header
.
CellValue
))
...
@@ -480,7 +511,7 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
...
@@ -480,7 +511,7 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
var
factor
=
dataList
.
Where
(
t
=>
t
.
AllotID
==
header
.
AllotID
&&
t
.
SheetID
==
header
.
SheetID
&&
t
.
IsFactor
==
1
var
factor
=
dataList
.
Where
(
t
=>
t
.
AllotID
==
header
.
AllotID
&&
t
.
SheetID
==
header
.
SheetID
&&
t
.
IsFactor
==
1
&&
t
.
TypeName
==
header
.
CellValue
&&
t
.
UnitType
==
(
int
)
unitType
);
&&
t
.
TypeName
==
header
.
CellValue
&&
t
.
UnitType
==
(
int
)
unitType
);
decimal
?
value
=
factor
.
Any
()
?
factor
.
FirstOrDefault
().
FactorValue
:
null
;
decimal
?
value
=
factor
.
Any
()
?
factor
.
FirstOrDefault
().
FactorValue
:
null
;
row
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
value
,
header
.
MergeRow
.
Value
,
header
.
MergeCell
.
Value
,
header
.
IsTotal
==
1
,
false
));
row
.
Data
.
Add
(
new
Cell
(
header
.
PointCell
.
Value
,
value
,
1
,
1
,
header
.
IsTotal
==
1
,
false
));
}
}
}
}
}
}
...
...
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