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
d03d91b8
Commit
d03d91b8
authored
Nov 30, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge' into custom_script
parents
3bd71cea
1afb895e
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
595 additions
and
201 deletions
+595
-201
performance/Performance.Api/Controllers/SecondAllotController.cs
+1
-1
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+94
-6
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+174
-89
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
+28
-18
performance/Performance.EntityModels/Entity/ag_fixatitem_log.cs
+89
-0
performance/Performance.Repository/PerforCofdirectorRepository.cs
+63
-25
performance/Performance.Repository/Repository/PerforAgfixatitemlogRepository.cs
+20
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+21
-14
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+2
-2
performance/Performance.Services/AllotService.cs
+12
-6
performance/Performance.Services/ComputeService.cs
+10
-7
performance/Performance.Services/ConfigService.cs
+27
-1
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+2
-2
performance/Performance.Services/SecondAllotService.cs
+52
-30
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
d03d91b8
...
...
@@ -80,7 +80,7 @@ public ApiResponse SaveValue(int secondid, [FromBody] List<ag_fixatitem> request
if
(
repetition
.
Any
())
throw
new
PerformanceException
(
string
.
Join
(
";"
,
repetition
.
Select
(
t
=>
$"行
{
t
.
Key
.
RowNumber
}
项‘
{
t
.
Key
.
ItemName
}
’重复录入"
)));
var
result
=
secondAllotService
.
SaveValue
(
request
);
var
result
=
secondAllotService
.
SaveValue
(
request
,
secondid
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
d03d91b8
...
...
@@ -19,6 +19,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.ag_fixatitem"
>
<summary>
二次绩效固定项
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.ag_fixatitem_log"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.ag_header"
>
<summary>
二次分配不固定列头数据
</summary>
</member>
...
...
@@ -557,14 +560,14 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.ID"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.AllotId"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.SecondId"
>
<summary>
...
...
@@ -572,9 +575,9 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.UnitType"
>
<summary>
<summary>
</summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.RowNumber"
>
<summary>
...
...
@@ -616,6 +619,91 @@
1 value相加值为1
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.CreateDate"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.UpdateDate"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_fixatitem_log"
>
<summary>
二次绩效固定项
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.AllotId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.SecondId"
>
<summary>
二次绩效ID
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.UnitType"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.RowNumber"
>
<summary>
行号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.ItemName"
>
<summary>
项目名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.ItemValue"
>
<summary>
值
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.FactorValue"
>
<summary>
系数
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.Sort"
>
<summary>
排序
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.Type"
>
<summary>
字段类型 1 顶部概况 2 表格固定 3 工作量
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.SourceType"
>
<summary>
1 自动带出 2 计算得出
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.SpecialAttr"
>
<summary>
1 value相加值为1
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.DeleteDate"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem_log.DeleteUser"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_header"
>
<summary>
二次分配不固定列头数据
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
d03d91b8
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
System
;
...
...
@@ -12,184 +11,270 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
{
}
/// <summary> 二次分配概览 </summary>
/// <summary> 二次分配概览 </summary>
public
virtual
DbSet
<
ag_againsituation
>
ag_againsituation
{
get
;
set
;
}
/// <summary> 二次绩效结果表 </summary>
/// <summary> 二次绩效结果表 </summary>
public
virtual
DbSet
<
ag_compute
>
ag_compute
{
get
;
set
;
}
/// <summary> 二次分配不固定数据 </summary>
/// <summary> 二次分配不固定数据 </summary>
public
virtual
DbSet
<
ag_data
>
ag_data
{
get
;
set
;
}
/// <summary> 二次分配人员名单 </summary>
/// <summary> 二次分配人员名单 </summary>
public
virtual
DbSet
<
ag_employee
>
ag_employee
{
get
;
set
;
}
/// <summary> 二次绩效固定项 </summary>
/// <summary> 二次绩效固定项 </summary>
public
virtual
DbSet
<
ag_fixatitem
>
ag_fixatitem
{
get
;
set
;
}
/// <summary> 二次分配不固定列头数据 </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_fixatitem_log
>
ag_fixatitem_log
{
get
;
set
;
}
/// <summary> 二次分配不固定列头数据 </summary>
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
/// <summary> 科室二次绩效录入内容 </summary>
/// <summary> 科室二次绩效录入内容 </summary>
public
virtual
DbSet
<
ag_itemvalue
>
ag_itemvalue
{
get
;
set
;
}
/// <summary> 二次绩效其他绩效来源 </summary>
/// <summary> 二次绩效其他绩效来源 </summary>
public
virtual
DbSet
<
ag_othersource
>
ag_othersource
{
get
;
set
;
}
/// <summary> 二次绩效列表 </summary>
/// <summary> 二次绩效列表 </summary>
public
virtual
DbSet
<
ag_secondallot
>
ag_secondallot
{
get
;
set
;
}
/// <summary> 二次绩效模板 </summary>
/// <summary> 二次绩效模板 </summary>
public
virtual
DbSet
<
ag_temp
>
ag_temp
{
get
;
set
;
}
/// <summary> 二次绩效模板项 </summary>
/// <summary> 二次绩效模板项 </summary>
public
virtual
DbSet
<
ag_tempitem
>
ag_tempitem
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_usetemp
>
ag_usetemp
{
get
;
set
;
}
/// <summary> 二次绩效工作量绩效 </summary>
/// <summary> 二次绩效工作量绩效 </summary>
public
virtual
DbSet
<
ag_workload
>
ag_workload
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_workload_type
>
ag_workload_type
{
get
;
set
;
}
/// <summary> 考核类别 </summary>
/// <summary> 考核类别 </summary>
public
virtual
DbSet
<
as_assess
>
as_assess
{
get
;
set
;
}
/// <summary> 考核列头 </summary>
/// <summary> 考核列头 </summary>
public
virtual
DbSet
<
as_columns
>
as_columns
{
get
;
set
;
}
/// <summary> 考核数据 </summary>
/// <summary> 考核数据 </summary>
public
virtual
DbSet
<
as_data
>
as_data
{
get
;
set
;
}
/// <summary> 考核类别 </summary>
/// <summary> 考核类别 </summary>
public
virtual
DbSet
<
as_tempassess
>
as_tempassess
{
get
;
set
;
}
/// <summary> 考核列头 </summary>
/// <summary> 考核列头 </summary>
public
virtual
DbSet
<
as_tempcolumns
>
as_tempcolumns
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
/// <summary> 上传excel文件校验配置 </summary>
/// <summary> 上传excel文件校验配置 </summary>
public
virtual
DbSet
<
cof_check
>
cof_check
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_cmi
>
cof_cmi
{
get
;
set
;
}
/// <summary> 科室类型 </summary>
/// <summary> 科室类型 </summary>
public
virtual
DbSet
<
cof_depttype
>
cof_depttype
{
get
;
set
;
}
/// <summary> 规模绩效、效率绩效计算系数配置 </summary>
/// <summary> 规模绩效、效率绩效计算系数配置 </summary>
public
virtual
DbSet
<
cof_director
>
cof_director
{
get
;
set
;
}
/// <summary> 工作量门诊药占比系数 </summary>
/// <summary> 工作量门诊药占比系数 </summary>
public
virtual
DbSet
<
cof_drugprop
>
cof_drugprop
{
get
;
set
;
}
/// <summary> 药占比费用列头名称 </summary>
/// <summary> 药占比费用列头名称 </summary>
public
virtual
DbSet
<
cof_drugtype
>
cof_drugtype
{
get
;
set
;
}
/// <summary> 保底科室配置 </summary>
/// <summary> 保底科室配置 </summary>
public
virtual
DbSet
<
cof_guarantee
>
cof_guarantee
{
get
;
set
;
}
/// <summary> ICU医生护士有效收入汇总计算系数 </summary>
/// <summary> ICU医生护士有效收入汇总计算系数 </summary>
public
virtual
DbSet
<
cof_income
>
cof_income
{
get
;
set
;
}
/// <summary> 特殊绩效项指标 </summary>
/// <summary> 特殊绩效项指标 </summary>
public
virtual
DbSet
<
cof_singlefactor
>
cof_singlefactor
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_workitem
>
cof_workitem
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 </summary>
/// <summary> 工龄对应绩效系数配置 </summary>
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
collect_data
>
collect_data
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
collect_permission
>
collect_permission
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
cust_script
>
cust_script
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
ex_item
>
ex_item
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ex_module
>
ex_module
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ex_result
>
ex_result
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ex_script
>
ex_script
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ex_special
>
ex_special
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ex_type
>
ex_type
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
hos_personfee
>
hos_personfee
{
get
;
set
;
}
/// <summary> 科室核算导入信息 </summary>
/// <summary> 科室核算导入信息 </summary>
public
virtual
DbSet
<
im_accountbasic
>
im_accountbasic
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_data
>
im_data
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_employee
>
im_employee
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_employee_clinic
>
im_employee_clinic
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_employee_logistics
>
im_employee_logistics
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
im_header
>
im_header
{
get
;
set
;
}
/// <summary> 特殊科室核算 </summary>
/// <summary> 特殊科室核算 </summary>
public
virtual
DbSet
<
im_specialunit
>
im_specialunit
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
log_check
>
log_check
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
log_dbug
>
log_dbug
{
get
;
set
;
}
/// <summary> 部分公共数据抽取SQL </summary>
/// <summary> 部分公共数据抽取SQL </summary>
public
virtual
DbSet
<
mod_dic
>
mod_dic
{
get
;
set
;
}
///// <summary> 医院数据提取脚本 </summary>
// public virtual DbSet<mod_extract> mod_extract { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_item> mod_item { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_module> mod_module { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_special> mod_special { get; set; }
/// <summary> </summary>
///// <summary> 医院数据提取脚本 </summary>
// public virtual DbSet<mod_extract> mod_extract { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_item> mod_item { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_module> mod_module { get; set; }
///// <summary> </summary>
// public virtual DbSet<mod_special> mod_special { get; set; }
/// <summary> </summary>
public
virtual
DbSet
<
per_againallot
>
per_againallot
{
get
;
set
;
}
/// <summary> 医院绩效分配 </summary>
/// <summary> 医院绩效分配 </summary>
public
virtual
DbSet
<
per_allot
>
per_allot
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
per_apr_amount
>
per_apr_amount
{
get
;
set
;
}
/// <summary> 预算管理金额 </summary>
/// <summary> 预算管理金额 </summary>
public
virtual
DbSet
<
per_budget_amount
>
per_budget_amount
{
get
;
set
;
}
/// <summary> 预算管理占比 </summary>
/// <summary> 预算管理占比 </summary>
public
virtual
DbSet
<
per_budget_ratio
>
per_budget_ratio
{
get
;
set
;
}
/// <summary> 预算控制年度合计 </summary>
/// <summary> 预算控制年度合计 </summary>
public
virtual
DbSet
<
per_budget_result
>
per_budget_result
{
get
;
set
;
}
/// <summary> 科室字典表 </summary>
/// <summary> 科室字典表 </summary>
public
virtual
DbSet
<
per_dept_dic
>
per_dept_dic
{
get
;
set
;
}
/// <summary> 绩效人员表 </summary>
/// <summary> 绩效人员表 </summary>
public
virtual
DbSet
<
per_employee
>
per_employee
{
get
;
set
;
}
/// <summary> 首次上传文件地址(当医院存在标准库时,首次上传用户提交固定格式的excel,开发人员配置SQL脚本) </summary>
/// <summary> 首次上传文件地址(当医院存在标准库时,首次上传用户提交固定格式的excel,开发人员配置SQL脚本) </summary>
public
virtual
DbSet
<
per_first
>
per_first
{
get
;
set
;
}
/// <summary> 上传数据解析 </summary>
/// <summary> 上传数据解析 </summary>
public
virtual
DbSet
<
per_sheet
>
per_sheet
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
rep_group
>
rep_group
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
rep_group_selection
>
rep_group_selection
{
get
;
set
;
}
/// <summary> 导入报表SQL配置 </summary>
/// <summary> 导入报表SQL配置 </summary>
public
virtual
DbSet
<
rep_importconfig
>
rep_importconfig
{
get
;
set
;
}
/// <summary> 报表配置表 </summary>
/// <summary> 报表配置表 </summary>
public
virtual
DbSet
<
rep_report
>
rep_report
{
get
;
set
;
}
/// <summary> 条件表 </summary>
/// <summary> 条件表 </summary>
public
virtual
DbSet
<
rep_selection
>
rep_selection
{
get
;
set
;
}
public
virtual
DbSet
<
report_original_surgery
>
report_original_surgery
{
get
;
set
;
}
public
virtual
DbSet
<
report_original_stays
>
report_original_stays
{
get
;
set
;
}
public
virtual
DbSet
<
report_original_persontime
>
report_original_persontime
{
get
;
set
;
}
/// <summary> 科室核算结果 </summary>
public
virtual
DbSet
<
res_account
>
res_account
{
get
;
set
;
}
/// <summary> 医生科室核算结果 </summary>
/// <summary> 医生科室核算结果 </summary>
public
virtual
DbSet
<
res_accountdoctor
>
res_accountdoctor
{
get
;
set
;
}
/// <summary> 护理科室核算结果 </summary>
/// <summary> 护理科室核算结果 </summary>
public
virtual
DbSet
<
res_accountnurse
>
res_accountnurse
{
get
;
set
;
}
/// <summary> 核算基础标准 </summary>
/// <summary> 核算基础标准 </summary>
public
virtual
DbSet
<
res_baiscnorm
>
res_baiscnorm
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
res_compute
>
res_compute
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
res_reserved
>
res_reserved
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
res_specialunit
>
res_specialunit
{
get
;
set
;
}
/// <summary> 医院数据提取脚本 </summary>
/// <summary> 医院数据提取脚本 </summary>
public
virtual
DbSet
<
sys_extract
>
sys_extract
{
get
;
set
;
}
/// <summary> 医院信息 </summary>
/// <summary> 医院信息 </summary>
public
virtual
DbSet
<
sys_hospital
>
sys_hospital
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_hospitalconfig
>
sys_hospitalconfig
{
get
;
set
;
}
/// <summary> 菜单表 </summary>
/// <summary> 菜单表 </summary>
public
virtual
DbSet
<
sys_menu
>
sys_menu
{
get
;
set
;
}
/// <summary> 角色表 </summary>
/// <summary> 角色表 </summary>
public
virtual
DbSet
<
sys_role
>
sys_role
{
get
;
set
;
}
/// <summary> 角色菜单关联表 </summary>
/// <summary> 角色菜单关联表 </summary>
public
virtual
DbSet
<
sys_role_menu
>
sys_role_menu
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_sms
>
sys_sms
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_task
>
sys_task
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
sys_user
>
sys_user
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
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
;
}
}
}
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
View file @
d03d91b8
//-----------------------------------------------------------------------
// <copyright file=" ag_fixatitem.cs">
// * FileName: 二次绩效固定项.cs
// * FileName: 二次绩效固定项.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效固定项
/// </summary>
[
Table
(
"ag_fixatitem"
)]
public
class
ag_fixatitem
public
class
ag_fixatitem
{
/// <summary>
///
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
/// <summary>
/// 二次绩效ID
/// </summary>
public
Nullable
<
int
>
SecondId
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 行号
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 项目名
/// </summary>
public
string
ItemName
{
get
;
set
;
}
/// <summary>
/// 值
/// </summary>
public
string
ItemValue
{
get
;
set
;
}
/// <summary>
/// 系数
/// </summary>
public
Nullable
<
decimal
>
FactorValue
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
Nullable
<
decimal
>
Sort
{
get
;
set
;
}
/// <summary>
/// 字段类型 1 顶部概况 2 表格固定 3 工作量
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 1 自动带出 2 计算得出
/// </summary>
public
Nullable
<
int
>
SourceType
{
get
;
set
;
}
/// <summary>
/// 1 value相加值为1
/// </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
UpdateDate
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_fixatitem_log.cs
0 → 100644
View file @
d03d91b8
//-----------------------------------------------------------------------
// <copyright file=" ag_fixatitem_log.cs">
// * FileName:
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效固定项
/// </summary>
[
Table
(
"ag_fixatitem_log"
)]
public
class
ag_fixatitem_log
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
/// <summary>
/// 二次绩效ID
/// </summary>
public
Nullable
<
int
>
SecondId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 行号
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 项目名
/// </summary>
public
string
ItemName
{
get
;
set
;
}
/// <summary>
/// 值
/// </summary>
public
string
ItemValue
{
get
;
set
;
}
/// <summary>
/// 系数
/// </summary>
public
Nullable
<
decimal
>
FactorValue
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
Nullable
<
decimal
>
Sort
{
get
;
set
;
}
/// <summary>
/// 字段类型 1 顶部概况 2 表格固定 3 工作量
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 1 自动带出 2 计算得出
/// </summary>
public
Nullable
<
int
>
SourceType
{
get
;
set
;
}
/// <summary>
/// 1 value相加值为1
/// </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
DeleteDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
DeleteUser
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
d03d91b8
//-----------------------------------------------------------------------
// <copyright file=" cof_director.cs">
// * FileName: cof_director.cs
// * history : Created by T4 2019-03-22 15:48:55
// * history : Created by T4 2019-03-22 15:48:55
// </copyright>
//-----------------------------------------------------------------------
using
Dapper
;
...
...
@@ -44,6 +44,45 @@ public int DeleteData(int allotId)
return
Execute
(
sql
,
new
{
allotId
});
}
public
int
DeleteAllotData
(
int
allotId
)
{
List
<
string
>
tableArray
=
new
List
<
string
>
{
"cof_again"
,
"cof_check"
,
"cof_cmi"
,
"cof_depttype"
,
"cof_director"
,
"cof_drugprop"
,
"cof_drugtype"
,
"cof_guarantee"
,
"cof_income"
,
"cof_singlefactor"
,
"cof_workitem"
,
"cof_workyear"
,
"im_accountbasic"
,
"im_data"
,
"im_employee"
,
"im_employee_clinic"
,
"im_employee_logistics"
,
"im_header"
,
"im_specialunit"
,
"per_sheet"
,
"res_account"
,
"res_accountdoctor"
,
"res_accountnurse"
,
"res_baiscnorm"
,
"res_compute"
,
"res_specialunit"
,
"log_check"
,
};
string
sql
=
""
;
tableArray
.
ForEach
(
t
=>
sql
+=
$"delete from
{
t
}
where allotid=@allotId;"
);
sql
+=
"delete from log_dbug where allotid=@allotId and type=1;"
;
return
Execute
(
sql
,
new
{
allotId
});
}
public
int
DeleteResData
(
int
allotId
)
{
List
<
string
>
tableArray
=
new
List
<
string
>
...
...
@@ -89,48 +128,48 @@ public int SupplementaryData(int allotid)
{
#
region
MyRegion
// var sql = @"insert into cof_drugtype(allotid,charge) select
// var sql = @"insert into cof_drugtype(allotid,charge) select
//distinct @allotid allotid,typename charge
//from per_sheet sheet
// inner join im_data im on sheet.id = im.sheetid
// left join cof_drugtype dtype on sheet.allotid = dtype.allotid
//from per_sheet sheet
// inner join im_data im on sheet.id = im.sheetid
// left join cof_drugtype dtype on sheet.allotid = dtype.allotid
// and im.typename != dtype.charge
//where sheet.allotid = @allotid and sheet.sheettype = 3 and im.typename not in
//where sheet.allotid = @allotid and sheet.sheettype = 3 and im.typename not in
// (select charge from cof_drugtype where allotid = @allotid);
//insert into cof_depttype(allotid,charge) select
//insert into cof_depttype(allotid,charge) select
//distinct @allotid allotid,department charge
//from per_sheet sheet
// inner join im_data im on sheet.id = im.sheetid
// left join cof_depttype dtype on sheet.allotid = dtype.allotid
//from per_sheet sheet
// inner join im_data im on sheet.id = im.sheetid
// left join cof_depttype dtype on sheet.allotid = dtype.allotid
// and im.department != dtype.charge
//where sheet.allotid = @allotid and sheet.sheettype = 9 and im.department not in
//where sheet.allotid = @allotid and sheet.sheettype = 9 and im.department not in
// (select charge from cof_depttype where allotid = @allotid);";
#
endregion
#
endregion
MyRegion
List
<
string
>
sqls
=
new
List
<
string
>
{
@"insert into cof_drugtype(allotid,charge) select
@"insert into cof_drugtype(allotid,charge) select
distinct @allotid allotid,typename charge
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
left join cof_drugtype dtype on sheet.allotid = dtype.allotid
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
left join cof_drugtype dtype on sheet.allotid = dtype.allotid
and im.typename != dtype.charge
where sheet.allotid = @allotid and sheet.sheettype = 3 and im.typename not in
where sheet.allotid = @allotid and sheet.sheettype = 3 and im.typename not in
(select charge from cof_drugtype where allotid = @allotid);"
,
@"insert into cof_depttype(allotid,charge) select
@"insert into cof_depttype(allotid,charge) select
distinct @allotid allotid,department charge
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
left join cof_depttype dtype on sheet.allotid = dtype.allotid
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
left join cof_depttype dtype on sheet.allotid = dtype.allotid
and im.department != dtype.charge
where sheet.allotid = @allotid and sheet.sheettype = 9 and im.department not in
where sheet.allotid = @allotid and sheet.sheettype = 9 and im.department not in
(select charge from cof_depttype where allotid = @allotid);"
,
/* @"insert into per_apr_amount(AllotId, PersonnelNumber, DoctorName)
select distinct @allotid AllotId, t.PersonnelNumber, t.DoctorName from
select distinct @allotid AllotId, t.PersonnelNumber, t.DoctorName from
(
select AllotId,PeopleNumber PersonnelNumber,DoctorName from im_employee where allotid = @allotid
union all
...
...
@@ -138,7 +177,7 @@ union all
) t where DoctorName not in (select DoctorName from per_apr_amount where allotid = @allotid);",*/
@"insert into cof_cmi(AllotId, UnitType, AccountingUnit)
select AllotId,UnitType,DoctorAccountingUnit from im_accountbasic where allotid = @allotid
select AllotId,UnitType,DoctorAccountingUnit from im_accountbasic where allotid = @allotid
and concat(UnitType,DoctorAccountingUnit) not in (select concat(UnitType,AccountingUnit) from cof_cmi where allotid = @allotid)"
};
...
...
@@ -151,7 +190,6 @@ union all
}
catch
(
Exception
)
{
}
}
return
flag
;
...
...
performance/Performance.Repository/Repository/PerforAgfixatitemlogRepository.cs
0 → 100644
View file @
d03d91b8
//-----------------------------------------------------------------------
// <copyright file=" ag_fixatitem_log.cs">
// * FileName: ag_fixatitem_log.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// ag_fixatitem_log Repository
/// </summary>
public
partial
class
PerforAgfixatitemlogRepository
:
PerforRepository
<
ag_fixatitem_log
>
{
public
PerforAgfixatitemlogRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
d03d91b8
...
...
@@ -16,6 +16,7 @@ namespace Performance.Services.AllotCompute
/// </summary>
public
class
ProcessComputService
:
IAutoInjection
{
private
readonly
BudgetService
_budgetService
;
private
PerforCofincomeRepository
perforCofincomeRepository
;
private
PerforCofdrugpropRepository
perforCofdrugpropRepository
;
private
PerforPersheetRepository
perforPerSheetRepository
;
...
...
@@ -33,7 +34,9 @@ public class ProcessComputService : IAutoInjection
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforPerallotRepository
perallotRepository
;
public
ProcessComputService
(
PerforCofincomeRepository
perforCofincomeRepository
,
public
ProcessComputService
(
BudgetService
budgetService
,
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
...
...
@@ -50,6 +53,7 @@ public class ProcessComputService : IAutoInjection
PerforHospitalRepository
hospitalRepository
,
PerforPerallotRepository
perallotRepository
)
{
_budgetService
=
budgetService
;
this
.
perforCofincomeRepository
=
perforCofincomeRepository
;
this
.
perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
this
.
perforPerSheetRepository
=
perforPerSheetRepository
;
...
...
@@ -87,6 +91,7 @@ public class ProcessComputService : IAutoInjection
//}
#
region
save
/// <summary>
/// 保存计算后的绩效
/// </summary>
...
...
@@ -110,7 +115,6 @@ private void SaveComputeAccount(PerSheet sheet, int allotId)
perforResaccountRepository
.
AddRange
(
addList
.
ToArray
());
}
/// <summary>
/// 保存通用格式
/// </summary>
...
...
@@ -175,9 +179,11 @@ public void Save(List<PerSheet> perSheets, int allotId)
}
}
}
#
endregion
#
endregion
save
#
region
compute
/// <summary>
/// 合并计算
/// </summary>
...
...
@@ -199,7 +205,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第一次计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
onceEconomic
=
economicCompute
.
OnceCompute
(
mergeResult
);
//二次计算
//二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室经济核算汇总表 -- 第二次计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceEconomicResult
=
economicCompute
.
TwiceCompute
(
onceEconomic
);
...
...
@@ -218,7 +224,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
var
conitem
=
perforCofworkitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotid
);
//医生组 一次计算
//var onceWorkload1 = workloadCompute.OnceCompute(workload1, confs);
//医生组 二次计算
//医生组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"医生组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult1
=
workloadCompute
.
TwiceCompute
(
workload1
,
hospital
,
confs
,
cmis
,
conitem
,
true
);
...
...
@@ -229,7 +235,7 @@ public void Save(List<PerSheet> perSheets, int allotId)
workload2
.
SheetName
=
"护理组工作量绩效测算表"
;
//护理组 一次计算
//var onceWorkload2 = workloadCompute.OnceCompute(workload2);
//护理组 二次计算
//护理组 二次计算
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"护理组工作量计算"
,
1
,
allotid
,
"ReceiveMessage"
);
var
twiceWorkloadResult2
=
workloadCompute
.
TwiceCompute
(
workload2
,
hospital
,
confs
,
cmis
,
conitem
);
...
...
@@ -252,14 +258,14 @@ public void Save(List<PerSheet> perSheets, int allotId)
return
(
perSheet
,
mergeSheets
);
}
/// <summary>
/// 计算科室绩效
/// </summary>
/// <param name="excel"></param>
/// <param name="perSheet"></param>
/// <returns></returns>
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
)
///
public
List
<
PerSheet
>
Compute
(
PerExcel
excel
,
List
<
PerSheet
>
perSheet
,
per_allot
allot
)
{
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
...
...
@@ -273,6 +279,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet)
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
,
UnitType
.
其他护理组
}
},
};
var
isBudget
=
_budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
foreach
(
var
info
in
pairs
)
{
...
...
@@ -301,7 +308,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet)
dept
.
MedicineFactor
=
workDoctor
?.
MedicineFactor
;
//dept.ScoringAverage = scoreAverage.HasValue ? scoreAverage ?? 0 : dept.ScoringAverage;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
;
dept
.
AdjustFactor
=
dept
.
AdjustFactor
==
0
m
?
0
:
dept
.
AdjustFactor
;
dept
.
AdjustFactor
=
(
isBudget
?
adjust
:
dept
?.
AdjustFactor
)
??
1
;
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
workDoctor
?.
CellValue
??
0
;
dept
.
AssessBeforeOtherFee
=
dept
?.
AssessBeforeOtherFee
??
0
;
...
...
@@ -338,7 +345,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet)
/// <param name="extras"></param>
public
void
ComputeOffice
(
per_allot
allot
,
PerExcel
excel
)
{
//取出科室
//取出科室
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
List
<
string
>
involves
=
new
List
<
string
>
...
...
@@ -351,6 +358,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
List
<
PerDataAccountBaisc
>
perDatas
=
new
List
<
PerDataAccountBaisc
>();
// 取出科室
var
dataList
=
empolyeeList
.
Select
(
w
=>
new
{
w
.
AccountType
,
w
.
AccountingUnit
}).
Distinct
();
var
isBudget
=
_budgetService
.
GetAdjustAndGrant
(
allot
,
out
decimal
adjust
,
out
decimal
grant
);
foreach
(
var
account
in
dataList
)
{
...
...
@@ -370,7 +378,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept
.
AccountingUnit
=
account
.
AccountingUnit
;
dept
.
UnitType
=
account
.
AccountType
;
dept
.
ScoringAverage
=
resAccount
?.
ScoringAverage
==
null
?
0
:
resAccount
.
ScoringAverage
;
dept
.
AdjustFactor
=
resAccount
?.
AdjustFactor
==
null
?
0
:
resAccount
.
AdjustFactor
;
dept
.
AdjustFactor
=
(
isBudget
?
adjust
:
resAccount
?.
AdjustFactor
)
??
1
;
dept
.
Income
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
//dept.Extra = (extra ?? 0);
//dept.MedicineExtra = 0;// (drugExtra ?? 0);
...
...
@@ -468,7 +476,6 @@ public IEnumerable<AccountUnitTotal> GetAccountScoreAverage(PerExcel excel, Shee
?.
Select
(
t
=>
new
AccountUnitTotal
{
UnitType
=
t
.
Key
.
UnitType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
TotelValue
=
t
.
Sum
(
g
=>
g
.
CellValue
)
});
}
///// <summary>
///// 计算保底绩效参考标准
///// </summary>
...
...
@@ -547,7 +554,6 @@ public IEnumerable<AccountUnitTotal> GetAccountScoreAverage(PerExcel excel, Shee
// var doctorWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorWorkload)?.PerData.Select(t => (PerData)t);
// var nurseWorkloadData = perSheet.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseWorkload)?.PerData.Select(t => (PerData)t);
// var basicRuleList = new[]
// {
// new { Data = doctorWorkloadData, UnitType = UnitType.医生组 },
...
...
@@ -647,6 +653,7 @@ private List<CofDrugProp> GetDrugConfig(PerExcel excel, int allotid)
}
return
cofs
;
}
#
endregion
#
endregion
compute
}
}
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
d03d91b8
...
...
@@ -204,7 +204,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
MedicineExtra
=
dept
?.
MedicineExtra
??
0
,
MaterialsExtra
=
dept
?.
MaterialsExtra
??
0
,
Adjust
=
isBudget
?
adjust
:
(
dept
?.
AdjustFactor
??
1
)
,
Adjust
=
(
isBudget
?
adjust
:
dept
?.
AdjustFactor
)
??
1
,
AssessBeforeOtherFee
=
dept
?.
AssessBeforeOtherFee
??
0
,
AssessLaterOtherFee
=
dept
?.
AssessLaterOtherFee
??
0
,
...
...
@@ -245,7 +245,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
0
,
//OtherPerfor = empolyee.OtherPerfor,
OtherManagePerfor
=
empolyee
.
OtherManagePerfor
,
OtherManagePerfor
=
empolyee
?.
OtherManagePerfor
??
0
,
Number
=
group
.
Number
,
PerforTotal
=
sumValue
,
//Avg = group.Number == 0 ? 0 : (sumValue / group.Number),
...
...
performance/Performance.Services/AllotService.cs
View file @
d03d91b8
...
...
@@ -43,6 +43,7 @@ public class AllotService : IAutoInjection
//private readonly IHubContext<AllotLogHub> hubContext;
private
readonly
LogManageService
logManageService
;
private
readonly
ReportService
reportService
;
private
readonly
QueryDataService
queryDataService
;
...
...
@@ -99,6 +100,7 @@ public class AllotService : IAutoInjection
}
#
region
基础功能
/// <summary>
/// 绩效记录
/// </summary>
...
...
@@ -222,6 +224,8 @@ public bool DeleteAllot(int iD)
FileHelper
.
Move
(
allot
.
Path
,
path
);
allot
.
Path
=
path
;
_allotRepository
.
Remove
(
allot
);
configService
.
ClearAllotData
(
allot
.
ID
);
}
catch
(
Exception
ex
)
{
...
...
@@ -254,7 +258,8 @@ public bool Update(per_allot allot)
{
return
_allotRepository
.
Update
(
allot
);
}
#
endregion
#
endregion
基础功能
/// <summary>
/// 修改自定义提取结果地址
...
...
@@ -330,14 +335,14 @@ public void Generate(per_allot allot, string mail)
//第二次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效、保底工勤人均绩效)得出科室业绩绩效;
//根据当前业绩绩效核算出最终绩效结果
//科室经济核算汇总、工作量汇总
logManageService
.
WriteMsg
(
"科室业绩汇总"
,
"正在生成科室收入支出汇总、工作量汇总"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
(
list
,
mergeSheets
)
=
processComputService
.
MergeCompute
(
excel
,
allot
.
ID
);
processComputService
.
Save
(
list
,
allot
.
ID
);
#
region
注释
////计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
////计算保底绩效参考标准(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)
//logManageService.WriteMsg("计算保底绩效参考标准值", "正在保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效", 1, allot.ID, "ReceiveMessage", true);
//var minimumBaiscnorm = processComputService.ComputeMinimum(excel, mergeSheets, allot.ID);
...
...
@@ -382,12 +387,13 @@ public void Generate(per_allot allot, string mail)
////科室材料考核
//logManageService.WriteMsg("正在生成绩效", "科室奖罚汇总", 1, allot.ID, "ReceiveMessage", true);
//var accountExtras = processComputService.GetAccountExtra(excel);
#
endregion
//var accountExtras = processComputService.GetAccountExtra(excel);
#
endregion
注释
//重新计算科室业绩(含所有提供保底金额)
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"计算科室业绩分"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
);
var
sheetLast
=
processComputService
.
Compute
(
excel
,
mergeSheets
,
allot
);
//保存计算过程数据
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"保存科室业绩结果及计算过程中产生的数据"
,
1
,
allot
.
ID
,
"ReceiveMessage"
,
true
);
...
...
performance/Performance.Services/ComputeService.cs
View file @
d03d91b8
...
...
@@ -174,13 +174,13 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
//t.WorkTime = string.IsNullOrEmpty(t.WorkTime) ? null : Convert.ToDateTime(t.WorkTime).ToString("yyyy-MM-dd");
if
(
isShowManage
==
2
)
{
t
.
PerforSumFee
=
t
.
ShouldGiveFee
+
t
.
AssessBeforeOtherFee
;
t
.
PerforSumFee
=
(
t
.
ShouldGiveFee
??
0
)
+
(
t
.
AssessBeforeOtherFee
??
0
)
;
var
employee
=
employees
.
FirstOrDefault
(
e
=>
e
.
DoctorName
==
t
.
EmployeeName
&&
e
.
AccountingUnit
==
t
.
AccountingUnit
&&
pairs
[
type
].
Contains
(
e
.
UnitType
));
var
scoreAverageRate
=
t
.
ScoreAverageRate
??
employee
.
ScoreAverageRate
??
1
;
var
attendance
=
t
.
Attendance
??
employee
.
Attendance
??
0
;
t
.
GiveFee
=
t
.
ShouldGiveFee
*
scoreAverageRate
*
attendance
+
(
t
.
OtherPerfor
??
0
)
+
t
.
Punishment
+
t
.
OtherPerfor
+
t
.
AssessLaterOtherFee
;
t
.
RealGiveFee
=
t
.
GiveFee
*
(
t
.
Adjust
??
1
m
)
+
t
.
AdjustLaterOtherFee
;
t
.
BaiscNormValue
=
t
.
RealGiveFee
;
t
.
GiveFee
=
(
t
.
ShouldGiveFee
??
0
)
*
scoreAverageRate
*
attendance
+
(
t
.
OtherPerfor
??
0
)
+
(
t
.
Punishment
??
0
)
+
(
t
.
AssessLaterOtherFee
??
0
)
;
t
.
RealGiveFee
=
t
.
GiveFee
*
(
t
.
Adjust
??
1
m
)
+
(
t
.
AdjustLaterOtherFee
??
0
)
;
t
.
BaiscNormValue
=
(
t
.
RealGiveFee
??
0
)
;
}
var
aprAmount
=
apramounts
?.
Where
(
w
=>
!(
string
.
IsNullOrEmpty
(
w
.
DoctorName
)
&&
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
))
&&
w
.
DoctorName
?.
Trim
()
==
t
.
EmployeeName
?.
Trim
()
&&
w
.
PersonnelNumber
?.
Trim
()
==
t
.
JobNumber
?.
Trim
());
...
...
@@ -471,10 +471,13 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
{
item
.
PerforSumFee
=
Math
.
Round
(
item
.
PerforSumFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
PerforManagementFee
=
Math
.
Round
(
item
.
PerforManagementFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
var
real
=
Math
.
Round
((
item
.
PerforSumFee
??
0
)
+
(
item
.
PerforManagementFee
??
0
),
0
)
*
item
.
Adjust
+
item
.
AdjustLaterOtherFee
;
item
.
OthePerfor
=
Math
.
Round
(
item
.
OthePerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
NightWorkPerfor
=
Math
.
Round
(
item
.
NightWorkPerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
//二次分配默认 调节系数100%
item
.
Adjust
=
item
.
Source
==
"二次绩效"
?
1
:
item
.
Adjust
;
var
real
=
Math
.
Round
((
item
.
PerforSumFee
??
0
)
+
(
item
.
PerforManagementFee
??
0
),
0
)
*
item
.
Adjust
+
(
item
.
AdjustLaterOtherFee
??
0
);
item
.
OthePerfor
=
Math
.
Round
((
item
.
OthePerfor
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
NightWorkPerfor
=
Math
.
Round
((
item
.
NightWorkPerfor
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
real
??
0
)
+
(
item
.
OthePerfor
??
0
)
+
(
item
.
NightWorkPerfor
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
Math
.
Round
((
real
??
0
)
*
(
item
.
ReservedRatio
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
...
...
performance/Performance.Services/ConfigService.cs
View file @
d03d91b8
...
...
@@ -63,6 +63,7 @@ public class ConfigService : IAutoInjection
this
.
logManageService
=
logManageService
;
this
.
logger
=
logger
;
}
#
endregion
#
region
弃用
...
...
@@ -247,6 +248,7 @@ public class ConfigService : IAutoInjection
#
endregion
#
region
cof_drugprop
药占比系数配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
...
...
@@ -303,9 +305,11 @@ public bool DrugDelete(DrugpropRequest request)
return
_drugpropRepository
.
Remove
(
drugprop
);
}
#
endregion
#
region
cof_drugtype
药占比类别配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
...
...
@@ -366,9 +370,11 @@ public bool DrugtypeDelete(DrugpropRequest request)
return
_drugtypeRepository
.
Remove
(
entity
);
}
#
endregion
#
region
cof_workitem
工作量绩效
/// <summary>
/// 获取cof_workitem列表
/// </summary>
...
...
@@ -423,9 +429,11 @@ public bool WorkItemkDelete(WorkItemRequest request)
return
_workitemRepository
.
Remove
(
workyear
);
}
#
endregion
#
region
cof_depttype
科室别配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
...
...
@@ -486,9 +494,11 @@ public bool DepttypeDelete(DrugpropRequest request)
return
perforCofdepttypeRepository
.
Remove
(
entity
);
}
#
endregion
#
region
cof_cmi
cmi
/// <summary>
/// 获取 CMI配置
/// </summary>
...
...
@@ -544,9 +554,11 @@ public bool HosCMIDelete(cof_cmi request)
return
perforCofcmiRepository
.
Remove
(
entity
);
}
#
endregion
#
region
cof_again
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
...
...
@@ -604,9 +616,11 @@ public bool AgainDelete(CofAgainRequest request)
return
_againRepository
.
Remove
(
again
);
}
#
endregion
#
region
Copy
/// <summary>
/// 复制报表基础配置
/// </summary>
...
...
@@ -664,7 +678,6 @@ public void Copy(per_allot allot)
#
endregion
logger
.
LogInformation
(
$"orgDurgprop"
);
var
orgDurgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgDurgprop
==
null
||
orgDurgprop
.
Count
==
0
)
...
...
@@ -720,9 +733,11 @@ public void Copy(per_allot allot)
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
#
endregion
#
region
清楚无效数据
Clear
/// <summary>
/// 清楚无效数据
/// </summary>
...
...
@@ -734,6 +749,16 @@ public void Clear(int allotId)
}
/// <summary>
/// 删除绩效相关数据
/// </summary>
/// <param name="allotId"></param>
public
void
ClearAllotData
(
int
allotId
)
{
var
count
=
_directorRepository
.
DeleteAllotData
(
allotId
);
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清理无效数据,受影响行数:
{
count
}
"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
}
/// <summary>
/// 清除核算数据
/// </summary>
/// <param name="allotId"></param>
...
...
@@ -752,6 +777,7 @@ public void ClearAgain(int againId)
var
count
=
_directorRepository
.
DelAgain
(
againId
);
logManageService
.
WriteMsg
(
"清理无效数据"
,
$"清除二次绩效中无效数据,受影响行数:
{
count
}
"
,
1
,
againId
,
"ReceiveMessage"
,
true
);
}
#
endregion
/// <summary>
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
d03d91b8
...
...
@@ -413,11 +413,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
// 考核前绩效
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
);
// 考核后绩效
compute
.
GiveFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
AssessLaterManagementFee
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
(
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
)
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
// 实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
Avg
+
compute
.
AssessLaterManagementFee
)
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
((
(
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
))
*
compute
.
Adjust
+
(
compute
.
AdjustLaterOtherFee
??
0
)
??
0
);
////绩效合计
//compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee + compute.AssessBeforeOtherFee ?? 0);
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
d03d91b8
using
AutoMapper
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
...
...
@@ -17,6 +18,7 @@ namespace Performance.Services
public
class
SecondAllotService
:
IAutoInjection
{
private
readonly
Application
application
;
private
readonly
ILogger
<
SecondAllotService
>
_logger
;
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforUserRepository
perforUserRepository
;
private
readonly
PerforUserhospitalRepository
perforUserhospitalRepository
;
...
...
@@ -44,6 +46,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
public
SecondAllotService
(
IOptions
<
Application
>
application
,
ILogger
<
SecondAllotService
>
logger
,
PerforHospitalRepository
hospitalRepository
,
PerforUserRepository
perforUserRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
...
...
@@ -70,6 +73,7 @@ public class SecondAllotService : IAutoInjection
PerforImemployeeclinicRepository
imemployeeclinicRepository
)
{
this
.
application
=
application
.
Value
;
_logger
=
logger
;
this
.
hospitalRepository
=
hospitalRepository
;
this
.
perforUserRepository
=
perforUserRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
...
...
@@ -541,6 +545,15 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems)
{
"可分配绩效"
,
second
.
RealGiveFee
.
ToString
()},
//{"主任基础绩效", account?.Avg?.ToString()}
};
//二次绩效配置 列头数据始终用最新分配结果
foreach
(
var
item
in
keyValue
)
{
var
kfp
=
bodyItems
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
-
1
&&
w
.
FiledName
==
item
.
Key
);
if
(
kfp
!=
null
)
kfp
.
Value
=
item
.
Value
;
}
var
pairs
=
new
Dictionary
<
string
,
string
>
{
{
"职称绩效"
,
"年资职称绩效占比"
},
...
...
@@ -548,12 +561,14 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems)
};
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
);
if
(
config
!=
null
&&
config
.
Any
())
config
.
ForEach
(
t
=>
{
foreach
(
var
item
in
config
)
{
var
key
=
pairs
.
ContainsKey
(
t
.
TypeName
)
?
pairs
[
t
.
TypeName
]
:
t
.
TypeName
;
var
key
=
pairs
.
ContainsKey
(
item
.
TypeName
)
?
pairs
[
item
.
TypeName
]
:
item
.
TypeName
;
if
(!
keyValue
.
Keys
.
Contains
(
key
))
keyValue
.
Add
(
key
,
t
.
Value
.
ToString
());
});
keyValue
.
Add
(
key
,
item
.
Value
.
ToString
());
}
}
foreach
(
var
item
in
keyValue
)
{
...
...
@@ -667,15 +682,14 @@ private void SupplyHeaderByWorkItem(UseTempRequest request, SecondResponse resul
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
SaveValue
(
List
<
ag_fixatitem
>
request
)
public
bool
SaveValue
(
List
<
ag_fixatitem
>
request
,
int
secondId
)
{
var
secondId
=
request
.
First
().
SecondId
;
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"二次绩效ID不存在"
);
var
fixatitems
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
var
result
=
DelValue
(
fixatitems
,
request
);
var
result
=
DelValue
(
secondId
,
fixatitems
,
request
);
List
<
ag_fixatitem
>
update
=
new
List
<
ag_fixatitem
>(),
insert
=
new
List
<
ag_fixatitem
>();
if
(
fixatitems
!=
null
&&
fixatitems
.
Any
())
{
...
...
@@ -708,23 +722,27 @@ public bool SaveValue(List<ag_fixatitem> request)
/// <summary>
/// 删除未保存的历史数据
/// </summary>
/// <param name="
fixatlist
">数据库中查询到的值</param>
/// <param name="
fixati
tems">需要保存的数据</param>
/// <param name="
oldFixatItems
">数据库中查询到的值</param>
/// <param name="
newFixatI
tems">需要保存的数据</param>
/// <returns></returns>
public
bool
DelValue
(
List
<
ag_fixatitem
>
fixatlist
,
List
<
ag_fixatitem
>
fixati
tems
)
public
bool
DelValue
(
int
secondId
,
List
<
ag_fixatitem
>
oldFixatItems
,
List
<
ag_fixatitem
>
newFixatI
tems
)
{
var
result
=
true
;
// 提交数据为空时,删除所有数据
if
(
fixatitems
==
null
||
fixati
tems
.
Count
==
0
)
if
(
newFixatItems
==
null
||
newFixatI
tems
.
Count
==
0
)
{
if
(
fixatlist
!=
null
&&
fixatlist
.
Any
())
result
=
perforAgfixatitemRepository
.
RemoveRange
(
fixatlist
.
ToArray
());
if
(
oldFixatItems
!=
null
&&
oldFixatItems
.
Any
())
{
result
=
perforAgfixatitemRepository
.
RemoveRange
(
oldFixatItems
.
ToArray
());
_logger
.
LogError
(
$"删除二次分配录入数据:
{
oldFixatItems
.
Count
()}
"
);
_logger
.
LogError
(
$"删除二次分配录入数据:
{
JsonHelper
.
Serialize
(
oldFixatItems
.
Select
(
w
=>
w
.
ID
))}
"
);
}
return
result
;
}
if
(
fixatlist
!=
null
&&
fixatlist
.
Any
())
if
(
oldFixatItems
!=
null
&&
oldFixatItems
.
Any
())
{
var
groupData
=
fixatlist
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
}).
Select
(
t
=>
new
var
groupData
=
oldFixatItems
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
}).
Select
(
t
=>
new
{
t
.
Key
.
RowNumber
,
t
.
Key
.
ItemName
,
...
...
@@ -734,16 +752,20 @@ public bool DelValue(List<ag_fixatitem> fixatlist, List<ag_fixatitem> fixatitems
// 删除重复数据
if
(
groupData
.
Any
(
t
=>
t
.
Count
>
1
))
{
var
delData
=
fixatlist
.
Where
(
t
=>
!
groupData
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
ID
));
int
flag
=
fixatlist
.
RemoveAll
(
t
=>
!
groupData
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
ID
));
var
delData
=
oldFixatItems
.
Where
(
t
=>
t
.
SecondId
==
secondId
&&
!
groupData
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
ID
));
int
flag
=
oldFixatItems
.
RemoveAll
(
t
=>
t
.
SecondId
==
secondId
&&
!
groupData
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
ID
));
_logger
.
LogError
(
$"删除二次分配录入数据:
{
delData
.
Count
()}
"
);
result
=
perforAgfixatitemRepository
.
RemoveRange
(
delData
.
ToArray
());
}
// 删除行号不存在的数据
var
saveRows
=
fixatitems
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
();
var
delRows
=
fixatlist
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
().
Except
(
saveRows
);
var
saveRows
=
newFixatItems
.
Where
(
t
=>
t
.
SecondId
==
secondId
)
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
();
var
delRows
=
oldFixatItems
.
Where
(
t
=>
t
.
SecondId
==
secondId
)
.
Select
(
t
=>
t
.
RowNumber
).
Distinct
().
Except
(
saveRows
);
if
(
delRows
!=
null
&&
delRows
.
Count
()
>
0
)
result
=
perforAgfixatitemRepository
.
RemoveRange
(
fixatlist
.
Where
(
t
=>
delRows
.
Contains
(
t
.
RowNumber
)).
ToArray
());
{
result
=
perforAgfixatitemRepository
.
RemoveRange
(
oldFixatItems
.
Where
(
t
=>
delRows
.
Contains
(
t
.
RowNumber
)).
ToArray
());
_logger
.
LogError
(
$"删除二次分配录入数据 删除行号不存在的数据:
{
oldFixatItems
.
Count
()}
"
);
}
}
return
result
;
...
...
@@ -898,15 +920,15 @@ public bool UseTemp(UseTempRequest request)
#
endregion
获取需要添加的数据
和
无需操作的数据
//perforAgsecondallotRepository.UpdateRange(update_second_usetemps.ToArray());
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
var
delList
=
fixatList
.
Except
(
list
);
perforAgfixatitemRepository
.
RemoveRange
(
delList
.
ToArray
());
//
//
perforAgsecondallotRepository.UpdateRange(update_second_usetemps.ToArray());
//
if (list != null && list.Count > 0)
//
{
//
var delList = fixatList.Except(list);
// perforAgfixatitemRepository.RemoveRange(delList.Where(w => w.SecondId == request.SecondId)
.ToArray());
if
(
addList
!=
null
&&
addList
.
Count
>
0
)
perforAgfixatitemRepository
.
AddRange
(
addList
.
ToArray
());
}
//
if (addList != null && addList.Count > 0)
//
perforAgfixatitemRepository.AddRange(addList.ToArray());
//
}
}
}
return
result
;
...
...
@@ -1519,7 +1541,7 @@ public List<ag_othersource> OtherList(int secondId, int userId)
result
=
employees
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
t
.
PersonnelNumber
,
WorkNumber
=
t
.
JobNumber
??
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
,
...
...
@@ -1707,7 +1729,7 @@ public List<SecPrintResponse> Print(int secondId)
JobNumber
=
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"人员工号"
)?.
ItemValue
,
PersonName
=
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
Department
=
second
.
Department
,
RealAmount
=
distperfor
+
nightworkperfor
,
RealAmount
=
(
distperfor
??
0
)
+
(
nightworkperfor
??
0
)
,
};
sec
.
WorkPost
=
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"职称"
)?.
ItemValue
;
sec
.
TitlePerfor
=
ConvertHelper
.
To
<
decimal
?>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"职称绩效"
)?.
ItemValue
);
...
...
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