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
c1a948f2
Commit
c1a948f2
authored
Jun 11, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院人员分配额外金额,注释部分配置
parent
b412f956
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
723 additions
and
393 deletions
+723
-393
performance/Performance.Api/Controllers/EmployeeController.cs
+75
-8
performance/Performance.Api/wwwroot/Performance.Api.xml
+28
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+49
-1
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+75
-73
performance/Performance.EntityModels/Entity/ag_workload_type.cs
+3
-3
performance/Performance.EntityModels/Entity/per_allot.cs
+1
-1
performance/Performance.EntityModels/Entity/per_apr_amount.cs
+59
-0
performance/Performance.Repository/PerforCofdirectorRepository.cs
+50
-5
performance/Performance.Repository/Repository/PerforPerapramountRepository.cs
+20
-0
performance/Performance.Services/ComputeService.cs
+0
-15
performance/Performance.Services/ConfigService.cs
+308
-283
performance/Performance.Services/EmployeeService.cs
+55
-1
performance/Performance.Services/PerExcelService/PerSheetService.cs
+0
-3
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
c1a948f2
...
@@ -29,7 +29,7 @@ public EmployeeController(EmployeeService employeeService, ClaimService claim)
...
@@ -29,7 +29,7 @@ public EmployeeController(EmployeeService employeeService, ClaimService claim)
/// <returns></returns>
/// <returns></returns>
[
Route
(
"getlist"
)]
[
Route
(
"getlist"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetEmployeeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
EmployeeRequest
request
)
public
ApiResponse
GetEmployeeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
EmployeeRequest
request
)
{
{
var
employee
=
employeeService
.
GetEmployeeList
(
request
.
AllotID
,
claim
.
GetUserId
());
var
employee
=
employeeService
.
GetEmployeeList
(
request
.
AllotID
,
claim
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
...
@@ -42,7 +42,7 @@ public ApiResponse GetEmployeeList([CustomizeValidator(RuleSet = "Select"), From
...
@@ -42,7 +42,7 @@ public ApiResponse GetEmployeeList([CustomizeValidator(RuleSet = "Select"), From
/// <returns></returns>
/// <returns></returns>
[
Route
(
"insert"
)]
[
Route
(
"insert"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
EmployeeRequest
request
)
public
ApiResponse
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
EmployeeRequest
request
)
{
{
var
employee
=
employeeService
.
Insert
(
request
);
var
employee
=
employeeService
.
Insert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
...
@@ -55,7 +55,7 @@ public ApiResponse Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]Empl
...
@@ -55,7 +55,7 @@ public ApiResponse Insert([CustomizeValidator(RuleSet = "Insert"), FromBody]Empl
/// <returns></returns>
/// <returns></returns>
[
Route
(
"update"
)]
[
Route
(
"update"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
EmployeeRequest
request
)
public
ApiResponse
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
EmployeeRequest
request
)
{
{
var
employee
=
employeeService
.
Update
(
request
);
var
employee
=
employeeService
.
Update
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
...
@@ -68,7 +68,7 @@ public ApiResponse Update([CustomizeValidator(RuleSet = "Update"), FromBody]Empl
...
@@ -68,7 +68,7 @@ public ApiResponse Update([CustomizeValidator(RuleSet = "Update"), FromBody]Empl
/// <returns></returns>
/// <returns></returns>
[
Route
(
"delete"
)]
[
Route
(
"delete"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
EmployeeRequest
request
)
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
EmployeeRequest
request
)
{
{
if
(!
employeeService
.
Delete
(
request
))
if
(!
employeeService
.
Delete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
Fail
);
...
@@ -82,7 +82,7 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Empl
...
@@ -82,7 +82,7 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]Empl
/// <returns></returns>
/// <returns></returns>
[
Route
(
"clinic/getlist"
)]
[
Route
(
"clinic/getlist"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetEmployeeClinicList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
im_employee_clinic
request
)
public
ApiResponse
GetEmployeeClinicList
([
FromBody
]
im_employee_clinic
request
)
{
{
//if ((request.AllotID ?? 0) == 0)
//if ((request.AllotID ?? 0) == 0)
// return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
// return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
...
@@ -98,7 +98,7 @@ public ApiResponse GetEmployeeClinicList([CustomizeValidator(RuleSet = "Select")
...
@@ -98,7 +98,7 @@ public ApiResponse GetEmployeeClinicList([CustomizeValidator(RuleSet = "Select")
/// <returns></returns>
/// <returns></returns>
[
Route
(
"clinic/insert"
)]
[
Route
(
"clinic/insert"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
InsertClinic
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
im_employee_clinic
request
)
public
ApiResponse
InsertClinic
([
FromBody
]
im_employee_clinic
request
)
{
{
if
((
request
.
AllotID
??
0
)
==
0
)
if
((
request
.
AllotID
??
0
)
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
...
@@ -120,7 +120,7 @@ public ApiResponse InsertClinic([CustomizeValidator(RuleSet = "Insert"), FromBod
...
@@ -120,7 +120,7 @@ public ApiResponse InsertClinic([CustomizeValidator(RuleSet = "Insert"), FromBod
/// <returns></returns>
/// <returns></returns>
[
Route
(
"clinic/update"
)]
[
Route
(
"clinic/update"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
UpdateClinic
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
im_employee_clinic
request
)
public
ApiResponse
UpdateClinic
([
FromBody
]
im_employee_clinic
request
)
{
{
if
((
request
.
AllotID
??
0
)
==
0
)
if
((
request
.
AllotID
??
0
)
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
...
@@ -141,7 +141,7 @@ public ApiResponse UpdateClinic([CustomizeValidator(RuleSet = "Update"), FromBod
...
@@ -141,7 +141,7 @@ public ApiResponse UpdateClinic([CustomizeValidator(RuleSet = "Update"), FromBod
/// <returns></returns>
/// <returns></returns>
[
Route
(
"clinic/delete"
)]
[
Route
(
"clinic/delete"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
DeleteClinic
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
im_employee_clinic
request
)
public
ApiResponse
DeleteClinic
([
FromBody
]
im_employee_clinic
request
)
{
{
if
(
request
.
ID
==
0
)
if
(
request
.
ID
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数ID无效!"
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数ID无效!"
);
...
@@ -163,5 +163,71 @@ public ApiResponse Audit(int allotid)
...
@@ -163,5 +163,71 @@ public ApiResponse Audit(int allotid)
var
result
=
employeeService
.
Audit
(
allotid
);
var
result
=
employeeService
.
Audit
(
allotid
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
}
/// <summary>
/// 获取人员补充绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/getlist"
)]
[
HttpPost
]
public
ApiResponse
GetAprList
([
FromBody
]
per_apr_amount
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
GetAprList
(
request
.
AllotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 新增人员补充绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/insert"
)]
[
HttpPost
]
public
ApiResponse
InsertApr
([
FromBody
]
per_apr_amount
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
InsertApr
(
request
,
claim
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 修改人员补充绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/update"
)]
[
HttpPost
]
public
ApiResponse
UpdateApr
([
FromBody
]
per_apr_amount
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
UpdateApr
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
}
/// <summary>
/// 删除人员补充绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"apr/delete"
)]
[
HttpPost
]
public
ApiResponse
DeleteApr
([
FromBody
]
per_apr_amount
request
)
{
if
(
request
.
Id
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效!"
);
if
(!
employeeService
.
DeleteApr
(
request
.
Id
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
}
}
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
c1a948f2
...
@@ -551,6 +551,34 @@
...
@@ -551,6 +551,34 @@
<param
name=
"allotid"
></param>
<param
name=
"allotid"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetAprList(Performance.EntityModels.per_apr_amount)"
>
<summary>
获取人员补充绩效列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.InsertApr(Performance.EntityModels.per_apr_amount)"
>
<summary>
新增人员补充绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.UpdateApr(Performance.EntityModels.per_apr_amount)"
>
<summary>
修改人员补充绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.DeleteApr(Performance.EntityModels.per_apr_amount)"
>
<summary>
删除人员补充绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.GuaranteeController.Guarantee(Performance.DtoModels.GuaranteeRequest)"
>
<member
name=
"M:Performance.Api.Controllers.GuaranteeController.Guarantee(Performance.DtoModels.GuaranteeRequest)"
>
<summary>
<summary>
保底绩效配置列表
保底绩效配置列表
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
c1a948f2
...
@@ -142,6 +142,9 @@
...
@@ -142,6 +142,9 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_allot"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_allot"
>
<summary>
医院绩效分配
</summary>
<summary>
医院绩效分配
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_apr_amount"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_budget_amount"
>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.per_budget_amount"
>
<summary>
预算管理金额
</summary>
<summary>
预算管理金额
</summary>
</member>
</member>
...
@@ -2595,7 +2598,7 @@
...
@@ -2595,7 +2598,7 @@
</member>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.Generate"
>
<member
name=
"P:Performance.EntityModels.per_allot.Generate"
>
<summary>
<summary>
1、人事科提交重新生成
1、人事科提交重新生成
2、生成成功 3、原始数据修改
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.ShowFormula"
>
<member
name=
"P:Performance.EntityModels.per_allot.ShowFormula"
>
...
@@ -2603,6 +2606,51 @@
...
@@ -2603,6 +2606,51 @@
0 不显示 1 显示
0 不显示 1 显示
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.EntityModels.per_apr_amount"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.Id"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.AllotId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.PersonnelNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.DoctorName"
>
<summary>
医生姓名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.PerforType"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.Amount"
>
<summary>
金额
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.CreateDate"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_apr_amount.CreateUser"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.per_budget_amount"
>
<member
name=
"T:Performance.EntityModels.per_budget_amount"
>
<summary>
<summary>
预算管理金额
预算管理金额
...
...
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
c1a948f2
...
@@ -12,151 +12,153 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -12,151 +12,153 @@ 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_compute
>
ag_compute
{
get
;
set
;
}
public
virtual
DbSet
<
ag_compute
>
ag_compute
{
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_fixatitem
>
ag_fixatitem
{
get
;
set
;
}
public
virtual
DbSet
<
ag_fixatitem
>
ag_fixatitem
{
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
<
ag_itemvalue
>
ag_itemvalue
{
get
;
set
;
}
public
virtual
DbSet
<
ag_itemvalue
>
ag_itemvalue
{
get
;
set
;
}
/// <summary> 二次绩效其他绩效来源 </summary>
/// <summary> 二次绩效其他绩效来源 </summary>
public
virtual
DbSet
<
ag_othersource
>
ag_othersource
{
get
;
set
;
}
public
virtual
DbSet
<
ag_othersource
>
ag_othersource
{
get
;
set
;
}
/// <summary> 二次绩效列表 </summary>
/// <summary> 二次绩效列表 </summary>
public
virtual
DbSet
<
ag_secondallot
>
ag_secondallot
{
get
;
set
;
}
public
virtual
DbSet
<
ag_secondallot
>
ag_secondallot
{
get
;
set
;
}
/// <summary> 二次绩效模板 </summary>
/// <summary> 二次绩效模板 </summary>
public
virtual
DbSet
<
ag_temp
>
ag_temp
{
get
;
set
;
}
public
virtual
DbSet
<
ag_temp
>
ag_temp
{
get
;
set
;
}
/// <summary> 二次绩效模板项 </summary>
/// <summary> 二次绩效模板项 </summary>
public
virtual
DbSet
<
ag_tempitem
>
ag_tempitem
{
get
;
set
;
}
public
virtual
DbSet
<
ag_tempitem
>
ag_tempitem
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_usetemp
>
ag_usetemp
{
get
;
set
;
}
public
virtual
DbSet
<
ag_usetemp
>
ag_usetemp
{
get
;
set
;
}
/// <summary> 二次绩效工作量绩效 </summary>
/// <summary> 二次绩效工作量绩效 </summary>
public
virtual
DbSet
<
ag_workload
>
ag_workload
{
get
;
set
;
}
public
virtual
DbSet
<
ag_workload
>
ag_workload
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
ag_workload_type
>
ag_workload_type
{
get
;
set
;
}
public
virtual
DbSet
<
ag_workload_type
>
ag_workload_type
{
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_depttype
>
cof_depttype
{
get
;
set
;
}
public
virtual
DbSet
<
cof_depttype
>
cof_depttype
{
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> 保底科室配置 </summary>
/// <summary> 保底科室配置 </summary>
public
virtual
DbSet
<
cof_guarantee
>
cof_guarantee
{
get
;
set
;
}
public
virtual
DbSet
<
cof_guarantee
>
cof_guarantee
{
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
;
}
public
virtual
DbSet
<
cof_workitem
>
cof_workitem
{
get
;
set
;
}
/// <summary> 工龄对应绩效系数配置 </summary>
/// <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_employee_clinic
>
im_employee_clinic
{
get
;
set
;
}
public
virtual
DbSet
<
im_employee_clinic
>
im_employee_clinic
{
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> 部分公共数据抽取SQL </summary>
/// <summary> 部分公共数据抽取SQL </summary>
public
virtual
DbSet
<
mod_dic
>
mod_dic
{
get
;
set
;
}
public
virtual
DbSet
<
mod_dic
>
mod_dic
{
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> 预算管理金额 </summary>
/// <summary> </summary>
public
virtual
DbSet
<
per_apr_amount
>
per_apr_amount
{
get
;
set
;
}
/// <summary> 预算管理金额 </summary>
public
virtual
DbSet
<
per_budget_amount
>
per_budget_amount
{
get
;
set
;
}
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
;
}
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
;
}
public
virtual
DbSet
<
per_budget_result
>
per_budget_result
{
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
<
rep_group
>
rep_group
{
get
;
set
;
}
public
virtual
DbSet
<
rep_group
>
rep_group
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
rep_group_selection
>
rep_group_selection
{
get
;
set
;
}
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
;
}
public
virtual
DbSet
<
rep_importconfig
>
rep_importconfig
{
get
;
set
;
}
/// <summary> 报表配置表 </summary>
/// <summary> 报表配置表 </summary>
public
virtual
DbSet
<
rep_report
>
rep_report
{
get
;
set
;
}
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
<
rep_selection
>
rep_selection
{
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/ag_workload_type.cs
View file @
c1a948f2
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file=" ag_workload_type.cs">
// <copyright file=" ag_workload_type.cs">
// * FileName: .cs
// * FileName: .cs
// </copyright>
// </copyright>
...
@@ -30,12 +30,12 @@ public class ag_workload_type
...
@@ -30,12 +30,12 @@ public class ag_workload_type
///
///
/// </summary>
/// </summary>
public
string
TypeName
{
get
;
set
;
}
public
string
TypeName
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 科室
/// 科室
/// </summary>
/// </summary>
public
string
Department
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 科室类型
/// 科室类型
/// </summary>
/// </summary>
...
...
performance/Performance.EntityModels/Entity/per_allot.cs
View file @
c1a948f2
...
@@ -82,7 +82,7 @@ public class per_allot
...
@@ -82,7 +82,7 @@ public class per_allot
public
Nullable
<
int
>
IsExtracting
{
get
;
set
;
}
public
Nullable
<
int
>
IsExtracting
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 1、人事科提交重新生成
/// 1、人事科提交重新生成
2、生成成功 3、原始数据修改
/// </summary>
/// </summary>
public
int
Generate
{
get
;
set
;
}
public
int
Generate
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/per_apr_amount.cs
0 → 100644
View file @
c1a948f2
//-----------------------------------------------------------------------
// <copyright file=" per_apr_amount.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"per_apr_amount"
)]
public
class
per_apr_amount
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
PerforType
{
get
;
set
;
}
/// <summary>
/// 金额
/// </summary>
public
Nullable
<
decimal
>
Amount
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
DateTime
>
CreateDate
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
CreateUser
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforCofdirectorRepository.cs
View file @
c1a948f2
...
@@ -86,25 +86,70 @@ public int SupplementaryData(int allotid)
...
@@ -86,25 +86,70 @@ public int SupplementaryData(int allotid)
{
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
{
var
sql
=
@"insert into cof_drugtype(allotid,charge) select
#
region
MyRegion
// 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
// and im.typename != dtype.charge
//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
//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
// and im.department != dtype.charge
//where sheet.allotid = @allotid and sheet.sheettype = 9 and im.department not in
// (select charge from cof_depttype where allotid = @allotid);";
#
endregion
List
<
string
>
sqls
=
new
List
<
string
>
{
@"insert into cof_drugtype(allotid,charge) select
distinct @allotid allotid,typename charge
distinct @allotid allotid,typename charge
from per_sheet sheet
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
inner join im_data im on sheet.id = im.sheetid
left join cof_drugtype dtype on sheet.allotid = dtype.allotid
left join cof_drugtype dtype on sheet.allotid = dtype.allotid
and im.typename != dtype.charge
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);
(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
distinct @allotid allotid,department charge
from per_sheet sheet
from per_sheet sheet
inner join im_data im on sheet.id = im.sheetid
inner join im_data im on sheet.id = im.sheetid
left join cof_depttype dtype on sheet.allotid = dtype.allotid
left join cof_depttype dtype on sheet.allotid = dtype.allotid
and im.department != dtype.charge
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);"
;
(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 AllotId,PeopleNumber PersonnelNumber,DoctorName from im_employee where allotid = @allotid
union all
select AllotId,PersonnelNumber,DoctorName from im_employee_clinic where allotid = @allotid
) t where DoctorName not in (select DoctorName from per_apr_amount where allotid = @allotid);"
};
int
flag
=
0
;
foreach
(
var
sql
in
sqls
)
{
try
{
flag
=
connection
.
Execute
(
sql
,
new
{
allotid
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
{
return
connection
.
Execute
(
sql
,
new
{
allotid
},
commandTimeout
:
60
*
60
);
}
}
return
flag
;
}
}
}
}
}
}
...
...
performance/Performance.Repository/Repository/PerforPerapramountRepository.cs
0 → 100644
View file @
c1a948f2
//-----------------------------------------------------------------------
// <copyright file=" per_apr_amount.cs">
// * FileName: per_apr_amount.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// per_apr_amount Repository
/// </summary>
public
partial
class
PerforPerapramountRepository
:
PerforRepository
<
per_apr_amount
>
{
public
PerforPerapramountRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
c1a948f2
...
@@ -15,17 +15,12 @@ namespace Performance.Services
...
@@ -15,17 +15,12 @@ namespace Performance.Services
public
class
ComputeService
:
IAutoInjection
public
class
ComputeService
:
IAutoInjection
{
{
private
readonly
PerforResaccountRepository
perforResaccountRepository
;
private
readonly
PerforResaccountRepository
perforResaccountRepository
;
//private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
private
readonly
PerforPersheetRepository
_perforPerSheetRepository
;
private
readonly
PerforPersheetRepository
_perforPerSheetRepository
;
private
readonly
PerforImdataRepository
_perforImDataRepository
;
private
readonly
PerforImdataRepository
_perforImDataRepository
;
private
readonly
PerforImheaderRepository
_perforImheaderRepository
;
private
readonly
PerforImheaderRepository
_perforImheaderRepository
;
private
readonly
PerforRescomputeRepository
_perforRescomputeRepository
;
private
readonly
PerforRescomputeRepository
_perforRescomputeRepository
;
private
readonly
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
readonly
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
readonly
PerforPeragainallotRepository
_perforPeragainallotRepository
;
private
readonly
PerforUserRepository
_perforUserRepository
;
private
readonly
PerforAgemployeeRepository
_perforAgemployeeRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
readonly
PerforCofincomeRepository
_perforCofincomeRepository
;
private
readonly
PerforAgsecondallotRepository
_perforAgsecondallotRepository
;
private
readonly
PerforAgsecondallotRepository
_perforAgsecondallotRepository
;
private
readonly
PerforAgcomputeRepository
_perforAgcomputeRepository
;
private
readonly
PerforAgcomputeRepository
_perforAgcomputeRepository
;
private
readonly
PerforImemployeeclinicRepository
_perforImemployeeclinicRepository
;
private
readonly
PerforImemployeeclinicRepository
_perforImemployeeclinicRepository
;
...
@@ -34,17 +29,12 @@ public class ComputeService : IAutoInjection
...
@@ -34,17 +29,12 @@ public class ComputeService : IAutoInjection
private
readonly
PerforHospitalRepository
hospitalRepository
;
private
readonly
PerforHospitalRepository
hospitalRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
PerforPersheetRepository
perforPerSheetRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforUserRepository
perforUserRepository
,
PerforAgemployeeRepository
perforAgemployeeRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforCofincomeRepository
perforCofincomeRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
...
@@ -53,17 +43,12 @@ public class ComputeService : IAutoInjection
...
@@ -53,17 +43,12 @@ public class ComputeService : IAutoInjection
PerforHospitalRepository
hospitalRepository
)
PerforHospitalRepository
hospitalRepository
)
{
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
this
.
perforResaccountRepository
=
perforResaccountRepository
;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
this
.
_perforPerSheetRepository
=
perforPerSheetRepository
;
this
.
_perforPerSheetRepository
=
perforPerSheetRepository
;
this
.
_perforImDataRepository
=
perforImDataRepository
;
this
.
_perforImDataRepository
=
perforImDataRepository
;
this
.
_perforImheaderRepository
=
perforImheaderRepository
;
this
.
_perforImheaderRepository
=
perforImheaderRepository
;
this
.
_perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
_perforRescomputeRepository
=
perforRescomputeRepository
;
this
.
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
this
.
_perforPeragainallotRepository
=
perforPeragainallotRepository
;
this
.
_perforUserRepository
=
perforUserRepository
;
this
.
_perforAgemployeeRepository
=
perforAgemployeeRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
_perforCofincomeRepository
=
perforCofincomeRepository
;
this
.
_perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
this
.
_perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
this
.
_perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
_perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
_perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
_perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
...
...
performance/Performance.Services/ConfigService.cs
View file @
c1a948f2
...
@@ -16,110 +16,224 @@ public class ConfigService : IAutoInjection
...
@@ -16,110 +16,224 @@ public class ConfigService : IAutoInjection
#
region
#
region
private
PerforCofdirectorRepository
_directorRepository
;
private
PerforCofdirectorRepository
_directorRepository
;
private
PerforCofdrugpropRepository
_drugpropRepository
;
private
PerforCofdrugpropRepository
_drugpropRepository
;
private
PerforCofincomeRepository
_incomeRepository
;
private
PerforCofworkyearRepository
_workyearRepository
;
private
PerforCofworkitemRepository
_workitemRepository
;
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
PerforHospitalRepository
perforHospitalRepository
;
private
PerforHospitalRepository
perforHospitalRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforImheaderRepository
perforImheaderRepository
;
private
PerforImheaderRepository
perforImheaderRepository
;
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
//private PerforLogdbugRepository logdbug
;
private
PerforPerapramountRepository
perapramountRepository
;
private
readonly
LogManageService
logManageService
;
private
readonly
LogManageService
logManageService
;
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
PerforCofdrugpropRepository
cofdrugpropRepository
,
PerforCofdrugpropRepository
cofdrugpropRepository
,
PerforCofincomeRepository
cofincomeRepository
,
PerforCofworkyearRepository
cofworkyearRepository
,
PerforCofagainRepository
againRepository
,
PerforCofagainRepository
againRepository
,
PerforCofdrugtypeRepository
drugtypeRepository
,
PerforCofdrugtypeRepository
drugtypeRepository
,
PerforPerallotRepository
perforPerAllotRepository
,
PerforPerallotRepository
perforPerAllotRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforHospitalRepository
perforHospitalRepository
,
PerforCofworkitemRepository
workitemRepository
,
PerforCofworkitemRepository
workitemRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
//PerforLogdbugRepository logdbug
PerforPerapramountRepository
perapramountRepository
,
LogManageService
logManageService
)
LogManageService
logManageService
)
{
{
this
.
_directorRepository
=
cofdirectorRepository
;
this
.
_directorRepository
=
cofdirectorRepository
;
this
.
_drugpropRepository
=
cofdrugpropRepository
;
this
.
_drugpropRepository
=
cofdrugpropRepository
;
this
.
_incomeRepository
=
cofincomeRepository
;
this
.
_workyearRepository
=
cofworkyearRepository
;
this
.
_workitemRepository
=
workitemRepository
;
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
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforImheaderRepository
=
perforImheaderRepository
;
this
.
perforImheaderRepository
=
perforImheaderRepository
;
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
//this.logdbug = logdbug
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
}
}
#
endregion
#
endregion
#
region
cof_director
规模
/
效率绩效配置
#
region
弃用
/// <summary>
/// 获取cof_director列表
//#region cof_director 规模/效率绩效配置
/// </summary>
///// <summary>
/// <returns></returns>
///// 获取cof_director列表
public
List
<
DirectorResponse
>
GetDireList
(
int
allotId
)
///// </summary>
{
///// <returns></returns>
var
list
=
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
//public List<DirectorResponse> GetDireList(int allotId)
return
Mapper
.
Map
<
List
<
DirectorResponse
>>(
list
);
//{
}
// var list = _directorRepository.GetEntities(t => t.AllotID == allotId);
// return Mapper.Map<List<DirectorResponse>>(list);
/// <summary>
//}
/// 添加数据
/// </summary>
///// <summary>
/// <param name="request"></param>
///// 添加数据
/// <returns></returns>
///// </summary>
public
DirectorResponse
DireInsert
(
DirectorRequest
request
)
///// <param name="request"></param>
{
///// <returns></returns>
var
director
=
Mapper
.
Map
<
cof_director
>(
request
);
//public DirectorResponse DireInsert(DirectorRequest request)
if
(!
_directorRepository
.
Add
(
director
))
//{
throw
new
PerformanceException
(
"保存失败"
);
// var director = Mapper.Map<cof_director>(request);
return
Mapper
.
Map
<
DirectorResponse
>(
director
);
// if (!_directorRepository.Add(director))
}
// throw new PerformanceException("保存失败");
// return Mapper.Map<DirectorResponse>(director);
/// <summary>
//}
/// 更新数据
/// </summary>
///// <summary>
/// <param name="request"></param>
///// 更新数据
/// <returns></returns>
///// </summary>
public
DirectorResponse
DireUpdate
(
DirectorRequest
request
)
///// <param name="request"></param>
{
///// <returns></returns>
var
director
=
_directorRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
//public DirectorResponse DireUpdate(DirectorRequest request)
if
(
null
==
director
)
//{
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
// var director = _directorRepository.GetEntity(t => t.ID == request.ID);
// if (null == director)
director
.
TypeName
=
request
.
TypeName
;
// throw new PerformanceException($"ID不存在 :{request.ID}");
director
.
JobTitle
=
request
.
JobTitle
;
director
.
Value
=
request
.
Value
;
// director.TypeName = request.TypeName;
// director.JobTitle = request.JobTitle;
if
(!
_directorRepository
.
Update
(
director
))
// director.Value = request.Value;
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
DirectorResponse
>(
director
);
// if (!_directorRepository.Update(director))
}
// throw new PerformanceException("保存失败");
// return Mapper.Map<DirectorResponse>(director);
/// <summary>
//}
/// 删除数据
/// </summary>
///// <summary>
/// <param name="request"></param>
///// 删除数据
/// <returns></returns>
///// </summary>
public
bool
DireDelete
(
DirectorRequest
request
)
///// <param name="request"></param>
{
///// <returns></returns>
var
director
=
_directorRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
//public bool DireDelete(DirectorRequest request)
if
(
null
==
director
)
//{
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
// var director = _directorRepository.GetEntity(t => t.ID == request.ID);
// if (null == director)
// throw new PerformanceException($"ID不存在 :{request.ID}");
// return _directorRepository.Remove(director);
//}
//#endregion
//#region cof_income ICU有效收入配置
///// <summary>
///// 获取cof_income列表
///// </summary>
///// <returns></returns>
//public List<IncomeResponse> GetIncomeList(int allotId)
//{
// var list = _incomeRepository.GetEntities(T => T.AllotID == allotId);
// return Mapper.Map<List<IncomeResponse>>(list);
//}
///// <summary>
///// 添加数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public IncomeResponse IncomeInsert(IncomeRequest request)
//{
// var income = Mapper.Map<cof_income>(request);
// if (!_incomeRepository.Add(income))
// throw new PerformanceException("保存失败");
// return Mapper.Map<IncomeResponse>(income);
//}
///// <summary>
///// 更新数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public IncomeResponse IncomeUpdate(IncomeRequest request)
//{
// var income = _incomeRepository.GetEntity(t => t.ID == request.ID);
// if (null == income)
// throw new PerformanceException($"ID不存在 :{request.ID}");
// income.SheetNameKeyword = request.SheetNameKeyword;
// income.UnitName = request.UnitName;
// income.Value = request.Value;
// if (!_incomeRepository.Update(income))
// throw new PerformanceException("保存失败");
// return Mapper.Map<IncomeResponse>(income);
//}
///// <summary>
///// 删除数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public bool IncomeDelete(IncomeRequest request)
//{
// var income = _incomeRepository.GetEntity(t => t.ID == request.ID);
// if (null == income)
// throw new PerformanceException($"ID不存在 :{request.ID}");
// return _incomeRepository.Remove(income);
//}
//#endregion
//#region cof_workyear 年资系数配置
///// <summary>
///// 获取cof_drugprop列表
///// </summary>
///// <returns></returns>
//public List<WorkyearResponse> GetWorkList(int allotId)
//{
// var list = _workyearRepository.GetEntities(t => t.AllotID == allotId);
// return Mapper.Map<List<WorkyearResponse>>(list);
//}
///// <summary>
///// 添加数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public WorkyearResponse WorkInsert(WorkyearRequest request)
//{
// var workyear = Mapper.Map<cof_workyear>(request);
// if (!_workyearRepository.Add(workyear))
// throw new PerformanceException("保存失败");
// return Mapper.Map<WorkyearResponse>(workyear);
//}
///// <summary>
///// 更新数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public WorkyearResponse WorkUpdate(WorkyearRequest request)
//{
// var workyear = _workyearRepository.GetEntity(t => t.ID == request.ID);
// if (null == workyear)
// throw new PerformanceException($"ID不存在 :{request.ID}");
// workyear.MaxRange = request.MaxRange;
// workyear.MinRange = request.MinRange;
// workyear.Value = request.Value;
// if (!_workyearRepository.Update(workyear))
// throw new PerformanceException("保存失败");
// return Mapper.Map<WorkyearResponse>(workyear);
//}
///// <summary>
///// 删除数据
///// </summary>
///// <param name="request"></param>
///// <returns></returns>
//public bool WorkDelete(WorkyearRequest request)
//{
// var workyear = _workyearRepository.GetEntity(t => t.ID == request.ID);
// if (null == workyear)
// throw new PerformanceException($"ID不存在 :{request.ID}");
// return _workyearRepository.Remove(workyear);
//}
//#endregion
return
_directorRepository
.
Remove
(
director
);
}
#
endregion
#
endregion
#
region
cof_drugprop
药占比系数配置
#
region
cof_drugprop
药占比系数配置
...
@@ -244,124 +358,6 @@ public bool DrugtypeDelete(DrugpropRequest request)
...
@@ -244,124 +358,6 @@ public bool DrugtypeDelete(DrugpropRequest request)
}
}
#
endregion
#
endregion
#
region
cof_income
ICU
有效收入配置
/// <summary>
/// 获取cof_income列表
/// </summary>
/// <returns></returns>
public
List
<
IncomeResponse
>
GetIncomeList
(
int
allotId
)
{
var
list
=
_incomeRepository
.
GetEntities
(
T
=>
T
.
AllotID
==
allotId
);
return
Mapper
.
Map
<
List
<
IncomeResponse
>>(
list
);
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
IncomeResponse
IncomeInsert
(
IncomeRequest
request
)
{
var
income
=
Mapper
.
Map
<
cof_income
>(
request
);
if
(!
_incomeRepository
.
Add
(
income
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
IncomeResponse
>(
income
);
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
IncomeResponse
IncomeUpdate
(
IncomeRequest
request
)
{
var
income
=
_incomeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
income
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
income
.
SheetNameKeyword
=
request
.
SheetNameKeyword
;
income
.
UnitName
=
request
.
UnitName
;
income
.
Value
=
request
.
Value
;
if
(!
_incomeRepository
.
Update
(
income
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
IncomeResponse
>(
income
);
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
IncomeDelete
(
IncomeRequest
request
)
{
var
income
=
_incomeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
income
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
return
_incomeRepository
.
Remove
(
income
);
}
#
endregion
#
region
cof_workyear
年资系数配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
/// <returns></returns>
public
List
<
WorkyearResponse
>
GetWorkList
(
int
allotId
)
{
var
list
=
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
Mapper
.
Map
<
List
<
WorkyearResponse
>>(
list
);
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
WorkyearResponse
WorkInsert
(
WorkyearRequest
request
)
{
var
workyear
=
Mapper
.
Map
<
cof_workyear
>(
request
);
if
(!
_workyearRepository
.
Add
(
workyear
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
WorkyearResponse
>(
workyear
);
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
WorkyearResponse
WorkUpdate
(
WorkyearRequest
request
)
{
var
workyear
=
_workyearRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
workyear
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
workyear
.
MaxRange
=
request
.
MaxRange
;
workyear
.
MinRange
=
request
.
MinRange
;
workyear
.
Value
=
request
.
Value
;
if
(!
_workyearRepository
.
Update
(
workyear
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
WorkyearResponse
>(
workyear
);
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
WorkDelete
(
WorkyearRequest
request
)
{
var
workyear
=
_workyearRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
workyear
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
return
_workyearRepository
.
Remove
(
workyear
);
}
#
endregion
#
region
cof_workitem
工作量绩效
#
region
cof_workitem
工作量绩效
/// <summary>
/// <summary>
/// 获取cof_workitem列表
/// 获取cof_workitem列表
...
@@ -482,103 +478,6 @@ public bool DepttypeDelete(DrugpropRequest request)
...
@@ -482,103 +478,6 @@ public bool DepttypeDelete(DrugpropRequest request)
}
}
#
endregion
#
endregion
#
region
Copy
/// <summary>
/// 复制报表基础配置
/// </summary>
/// <param name="iD"></param>
public
void
Copy
(
per_allot
allot
)
{
var
list
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
.
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
ToList
();
int
allotId
=
0
;
for
(
int
i
=
0
;
i
<
list
.
Count
;
i
++)
{
if
(
list
[
i
].
ID
==
allot
.
ID
&&
(
i
-
1
)
>=
0
)
allotId
=
list
[
i
-
1
].
ID
;
}
var
hospital
=
perforHospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
allot
.
HospitalId
);
var
orgDirector
=
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgDirector
==
null
||
orgDirector
.
Count
==
0
)
{
var
director
=
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_directorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newDirectors
=
director
.
Select
(
t
=>
new
cof_director
{
AllotID
=
allot
.
ID
,
JobTitle
=
t
.
JobTitle
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDirector
==
2
)
newDirectors
=
director
.
Select
(
t
=>
new
cof_director
{
AllotID
=
allot
.
ID
,
JobTitle
=
t
.
JobTitle
,
TypeName
=
t
.
TypeName
,
Value
=
1
});
_directorRepository
.
AddRange
(
newDirectors
.
ToArray
());
}
var
orgDurgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgDurgprop
==
null
||
orgDurgprop
.
Count
==
0
)
{
var
durgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newDurgprops
=
durgprop
.
Select
(
t
=>
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
2
)
newDurgprops
=
new
List
<
cof_drugprop
>
{
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
1000
,
MinRange
=
0
,
Value
=
1
}
};
_drugpropRepository
.
AddRange
(
newDurgprops
.
ToArray
());
}
var
orgIncome
=
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgIncome
==
null
||
orgIncome
.
Count
==
0
)
{
var
income
=
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_incomeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newIncomes
=
income
.
Select
(
t
=>
new
cof_income
{
AllotID
=
allot
.
ID
,
SheetNameKeyword
=
t
.
SheetNameKeyword
,
UnitName
=
t
.
UnitName
,
Value
=
t
.
Value
});
if
(
hospital
!=
null
&&
hospital
?.
IsOpenIncome
==
2
)
newIncomes
=
income
.
Select
(
t
=>
new
cof_income
{
AllotID
=
allot
.
ID
,
SheetNameKeyword
=
t
.
SheetNameKeyword
,
UnitName
=
t
.
UnitName
,
Value
=
1
});
_incomeRepository
.
AddRange
(
newIncomes
.
ToArray
());
}
var
orgWorkyear
=
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgWorkyear
==
null
||
orgWorkyear
.
Count
==
0
)
{
var
workyear
=
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_workyearRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newWorkyears
=
workyear
.
Select
(
t
=>
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
if
(
hospital
!=
null
&&
hospital
?.
IsOpenWorkYear
==
2
)
newWorkyears
=
new
List
<
cof_workyear
>
{
new
cof_workyear
{
AllotID
=
allot
.
ID
,
MaxRange
=
1000
,
MinRange
=
0
,
Value
=
1
}
};
_workyearRepository
.
AddRange
(
newWorkyears
.
ToArray
());
}
var
cofDrugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
{
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
var
cofDepttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDepttype
==
null
||
cofDepttype
.
Count
==
0
)
{
var
depttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
depttype
?.
Select
(
t
=>
new
cof_depttype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
if
(
newAgains
!=
null
&&
newAgains
.
Any
())
perforCofdepttypeRepository
.
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
);
if
(
data
==
null
||
data
.
Count
==
0
)
{
var
again
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
days
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Department
=
t
.
Department
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
TypeName
==
"满勤天数"
?
days
:
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
#
endregion
#
region
cof_again
#
region
cof_again
/// <summary>
/// <summary>
/// 获取cof_drugprop列表
/// 获取cof_drugprop列表
...
@@ -639,6 +538,110 @@ public bool AgainDelete(CofAgainRequest request)
...
@@ -639,6 +538,110 @@ public bool AgainDelete(CofAgainRequest request)
}
}
#
endregion
#
endregion
#
region
Copy
/// <summary>
/// 复制报表基础配置
/// </summary>
/// <param name="iD"></param>
public
void
Copy
(
per_allot
allot
)
{
var
list
=
perforPerAllotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
)
.
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
ToList
();
int
allotId
=
0
;
for
(
int
i
=
0
;
i
<
list
.
Count
;
i
++)
{
if
(
list
[
i
].
ID
==
allot
.
ID
&&
(
i
-
1
)
>=
0
)
allotId
=
list
[
i
-
1
].
ID
;
}
var
hospital
=
perforHospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
allot
.
HospitalId
);
CopyAprData
(
allotId
,
allot
.
ID
);
#
region
弃用
//var orgDirector = _directorRepository.GetEntities(t => t.AllotID == allot.ID);
//if (orgDirector == null || orgDirector.Count == 0)
//{
// var director = _directorRepository.GetEntities(t => t.AllotID == allotId) ?? _directorRepository.GetEntities(t => t.AllotID == -1);
// var newDirectors = director.Select(t => new cof_director { AllotID = allot.ID, JobTitle = t.JobTitle, TypeName = t.TypeName, Value = t.Value });
// if (hospital != null && hospital?.IsOpenDirector == 2)
// newDirectors = director.Select(t => new cof_director { AllotID = allot.ID, JobTitle = t.JobTitle, TypeName = t.TypeName, Value = 1 });
// _directorRepository.AddRange(newDirectors.ToArray());
//}
//var orgIncome = _incomeRepository.GetEntities(t => t.AllotID == allot.ID);
//if (orgIncome == null || orgIncome.Count == 0)
//{
// var income = _incomeRepository.GetEntities(t => t.AllotID == allotId) ?? _incomeRepository.GetEntities(t => t.AllotID == -1);
// var newIncomes = income.Select(t => new cof_income { AllotID = allot.ID, SheetNameKeyword = t.SheetNameKeyword, UnitName = t.UnitName, Value = t.Value });
// if (hospital != null && hospital?.IsOpenIncome == 2)
// newIncomes = income.Select(t => new cof_income { AllotID = allot.ID, SheetNameKeyword = t.SheetNameKeyword, UnitName = t.UnitName, Value = 1 });
// _incomeRepository.AddRange(newIncomes.ToArray());
//}
//var orgWorkyear = _workyearRepository.GetEntities(t => t.AllotID == allot.ID);
//if (orgWorkyear == null || orgWorkyear.Count == 0)
//{
// var workyear = _workyearRepository.GetEntities(t => t.AllotID == allotId) ?? _workyearRepository.GetEntities(t => t.AllotID == -1);
// var newWorkyears = workyear.Select(t => new cof_workyear { AllotID = allot.ID, MaxRange = t.MaxRange, MinRange = t.MinRange, Value = t.Value });
// if (hospital != null && hospital?.IsOpenWorkYear == 2)
// newWorkyears = new List<cof_workyear> { new cof_workyear { AllotID = allot.ID, MaxRange = 1000, MinRange = 0, Value = 1 } };
// _workyearRepository.AddRange(newWorkyears.ToArray());
//}
#
endregion
var
orgDurgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
orgDurgprop
==
null
||
orgDurgprop
.
Count
==
0
)
{
var
durgprop
=
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugpropRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newDurgprops
=
durgprop
.
Select
(
t
=>
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
t
.
MaxRange
,
MinRange
=
t
.
MinRange
,
Value
=
t
.
Value
});
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
2
)
newDurgprops
=
new
List
<
cof_drugprop
>
{
new
cof_drugprop
{
AllotID
=
allot
.
ID
,
MaxRange
=
1000
,
MinRange
=
0
,
Value
=
1
}
};
_drugpropRepository
.
AddRange
(
newDurgprops
.
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
cofDrugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
{
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
var
cofDepttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDepttype
==
null
||
cofDepttype
.
Count
==
0
)
{
var
depttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
depttype
?.
Select
(
t
=>
new
cof_depttype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
if
(
newAgains
!=
null
&&
newAgains
.
Any
())
perforCofdepttypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
var
data
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
data
==
null
||
data
.
Count
==
0
)
{
var
again
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
days
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Department
=
t
.
Department
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
TypeName
==
"满勤天数"
?
days
:
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
#
endregion
#
region
清楚无效数据
Clear
#
region
清楚无效数据
Clear
/// <summary>
/// <summary>
/// 清楚无效数据
/// 清楚无效数据
...
@@ -688,5 +691,27 @@ public List<TitleValue> WorkHeader(int allotId)
...
@@ -688,5 +691,27 @@ public List<TitleValue> WorkHeader(int allotId)
}
}
return
null
;
return
null
;
}
}
/// <summary>
/// 人员绩效额外金额
/// </summary>
private
void
CopyAprData
(
int
prevAllotId
,
int
allotId
)
{
if
(
prevAllotId
==
0
)
return
;
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
new
List
<
int
>
{
prevAllotId
,
allotId
}.
Contains
(
t
.
AllotId
));
if
(
list
==
null
||
!
list
.
Any
(
t
=>
t
.
AllotId
==
prevAllotId
))
return
;
if
(
list
.
Any
(
t
=>
t
.
AllotId
==
allotId
))
{
var
prevData
=
list
.
Where
(
t
=>
t
.
AllotId
==
prevAllotId
);
var
existData
=
list
.
Where
(
t
=>
t
.
AllotId
==
allotId
);
list
=
prevData
.
Where
(
t
=>
!
existData
.
Select
(
w
=>
w
.
PersonnelNumber
).
Contains
(
t
.
PersonnelNumber
)).
ToList
();
}
if
(
list
.
Any
())
{
list
.
ForEach
(
t
=>
t
.
AllotId
=
allotId
);
perapramountRepository
.
AddRange
(
list
.
ToArray
());
}
}
}
}
}
}
performance/Performance.Services/EmployeeService.cs
View file @
c1a948f2
using
AutoMapper
;
using
AutoMapper
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
NPOI.SS.Util
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
...
@@ -21,12 +22,15 @@ public class EmployeeService : IAutoInjection
...
@@ -21,12 +22,15 @@ public class EmployeeService : IAutoInjection
private
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
PerforUserhospitalRepository
perforUserhospitalRepository
;
private
PerforUserhospitalRepository
perforUserhospitalRepository
;
private
PerforPerallotRepository
perallotRepository
;
private
PerforPerallotRepository
perallotRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
public
EmployeeService
(
PerforImemployeeRepository
perforImemployeeRepository
,
public
EmployeeService
(
PerforImemployeeRepository
perforImemployeeRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
PerforPerallotRepository
perallotRepository
)
PerforPerallotRepository
perallotRepository
,
PerforPerapramountRepository
perapramountRepository
)
{
{
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
...
@@ -34,6 +38,7 @@ public class EmployeeService : IAutoInjection
...
@@ -34,6 +38,7 @@ public class EmployeeService : IAutoInjection
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
this
.
perallotRepository
=
perallotRepository
;
this
.
perallotRepository
=
perallotRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
}
}
#
region
行政人员
#
region
行政人员
...
@@ -262,5 +267,54 @@ public bool Audit(int allotId)
...
@@ -262,5 +267,54 @@ public bool Audit(int allotId)
allot
.
Generate
=
(
int
)
AllotGenerate
.
PersonnelOffice
;
allot
.
Generate
=
(
int
)
AllotGenerate
.
PersonnelOffice
;
return
perforPerallotRepository
.
Update
(
allot
);
return
perforPerallotRepository
.
Update
(
allot
);
}
}
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
)
{
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
return
list
;
}
public
bool
InsertApr
(
per_apr_amount
request
,
int
userId
)
{
if
(
request
==
null
)
return
false
;
var
data
=
perapramountRepository
.
GetEntity
(
t
=>
t
.
PersonnelNumber
==
request
.
PersonnelNumber
&&
t
.
AllotId
==
request
.
AllotId
);
if
(
data
!=
null
)
throw
new
PerformanceException
(
"人员工号已存在"
);
request
.
CreateDate
=
DateTime
.
Now
;
request
.
CreateUser
=
userId
;
return
perapramountRepository
.
Add
(
request
);
}
public
bool
UpdateApr
(
per_apr_amount
request
)
{
if
(
request
==
null
)
return
false
;
var
data
=
perapramountRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
Id
);
if
(
data
==
null
)
throw
new
PerformanceException
(
"修改数据无效"
);
data
.
PersonnelNumber
=
request
.
PersonnelNumber
;
data
.
DoctorName
=
request
.
DoctorName
;
data
.
PerforType
=
request
.
PerforType
;
data
.
Amount
=
request
.
Amount
;
return
perapramountRepository
.
Add
(
request
);
}
public
bool
DeleteApr
(
int
id
)
{
var
data
=
perapramountRepository
.
GetEntity
(
t
=>
t
.
Id
==
id
);
if
(
data
!=
null
)
return
perapramountRepository
.
Remove
(
data
);
return
true
;
}
}
}
}
}
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
c1a948f2
...
@@ -14,16 +14,13 @@ namespace Performance.Services
...
@@ -14,16 +14,13 @@ namespace Performance.Services
public
class
PerSheetService
:
IAutoInjection
public
class
PerSheetService
:
IAutoInjection
{
{
private
PerHeaderService
_perHeader
;
private
PerHeaderService
_perHeader
;
private
PerforCofincomeRepository
_perforCofincomeRepository
;
private
PerforCofdrugpropRepository
_perforCofdrugpropRepository
;
private
PerforCofdrugpropRepository
_perforCofdrugpropRepository
;
private
PerforCofdrugtypeRepository
_perforCofdrugtypeRepository
;
private
PerforCofdrugtypeRepository
_perforCofdrugtypeRepository
;
public
PerSheetService
(
PerHeaderService
perHeader
,
public
PerSheetService
(
PerHeaderService
perHeader
,
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforCofdrugpropRepository
perforCofdrugpropRepository
,
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
)
PerforCofdrugtypeRepository
perforCofdrugtypeRepository
)
{
{
_perHeader
=
perHeader
;
_perHeader
=
perHeader
;
_perforCofincomeRepository
=
perforCofincomeRepository
;
_perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
_perforCofdrugpropRepository
=
perforCofdrugpropRepository
;
_perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
_perforCofdrugtypeRepository
=
perforCofdrugtypeRepository
;
}
}
...
...
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