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
06b5675c
Commit
06b5675c
authored
Mar 12, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge' into v2020morge-graphql
parents
2922823f
dc1b6188
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
485 additions
and
11 deletions
+485
-11
performance/Performance.Api/Controllers/AllotController.cs
+11
-1
performance/Performance.Api/Controllers/ComputeController.cs
+46
-1
performance/Performance.Api/Controllers/ConfigController.cs
+40
-0
performance/Performance.Api/Controllers/EmployeeController.cs
+15
-0
performance/Performance.Api/Controllers/SecondAllotController.cs
+3
-3
performance/Performance.Api/wwwroot/Performance.Api.xml
+20
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+25
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
+5
-0
performance/Performance.DtoModels/Request/ComputerAvgRequest.cs
+42
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-1
performance/Performance.EntityModels/Entity/ag_secondallot.cs
+4
-0
performance/Performance.EntityModels/Entity/res_account.cs
+4
-0
performance/Performance.EntityModels/Entity/res_specialunit.cs
+4
-0
performance/Performance.Repository/Repository/PerforCofHrpDeptRepository.cs
+15
-0
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+5
-0
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+12
-2
performance/Performance.Services/ComputeService.cs
+74
-0
performance/Performance.Services/ConfigService.cs
+93
-0
performance/Performance.Services/Details/SecondAllotDetails.cs
+2
-3
performance/Performance.Services/EmployeeService.cs
+53
-0
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
06b5675c
...
@@ -274,7 +274,17 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
...
@@ -274,7 +274,17 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody] A
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
////BackgroundJob.Enqueue(() => _allotService.Generate(allot, email));
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
/*
[Route("recalculation")]
[HttpPost]
public ApiResponse Recalculation([FromBody] RecalculationRequest request)
{
if (request.Money.HasValue && request.Money.Value > 0)
_allotService.Recalculation(request.AllotId, request.Money.Value);
return new ApiResponse(ResponseType.OK);
}
*/
/// <summary>
/// <summary>
/// 重新计算院领导绩效
/// 重新计算院领导绩效
/// </summary>
/// </summary>
...
...
performance/Performance.Api/Controllers/ComputeController.cs
View file @
06b5675c
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
using
System.Linq
;
using
System.Linq
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Performance.DtoModels.Request
;
namespace
Performance.Api.Controllers
namespace
Performance.Api.Controllers
{
{
...
@@ -22,12 +23,15 @@ public class ComputeController : Controller
...
@@ -22,12 +23,15 @@ public class ComputeController : Controller
private
ComputeService
_computeService
;
private
ComputeService
_computeService
;
private
AllotService
_allotService
;
private
AllotService
_allotService
;
private
ClaimService
_claim
;
private
ClaimService
_claim
;
private
EmployeeService
_employeeService
;
public
ComputeController
(
AllotService
allotService
,
public
ComputeController
(
AllotService
allotService
,
ComputeService
computeService
,
ComputeService
computeService
,
EmployeeService
employeeService
,
ClaimService
claim
)
ClaimService
claim
)
{
{
_allotService
=
allotService
;
_allotService
=
allotService
;
_computeService
=
computeService
;
_computeService
=
computeService
;
_employeeService
=
employeeService
;
_claim
=
claim
;
_claim
=
claim
;
}
}
...
@@ -253,7 +257,7 @@ public ApiResponse AllComputeAvg([FromBody] ComputerRequest request)
...
@@ -253,7 +257,7 @@ public ApiResponse AllComputeAvg([FromBody] ComputerRequest request)
// ? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0)
// ? 0 : Math.Round(gc.Sum(s => s.RealGiveFee) / gc.Select(p => new { p.JobNumber, p.EmployeeName }).Distinct().Count() ?? 0)
// }));
// }));
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
avgs
.
Select
(
w
=>
new
{
w
.
PositionName
,
w
.
TotelNumber
,
w
.
TotelValue
,
w
.
AvgValue
}));
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
avgs
.
Select
(
w
=>
new
{
w
.
ID
,
w
.
PositionName
,
w
.
TotelNumber
,
w
.
TotelValue
,
w
.
AvgValue
}));
}
}
/// <summary>
/// <summary>
...
@@ -366,5 +370,45 @@ public ApiResponse DoctorDetail(int computeId)
...
@@ -366,5 +370,45 @@ public ApiResponse DoctorDetail(int computeId)
var
result
=
_computeService
.
GetDoctorDetail
(
computeId
);
var
result
=
_computeService
.
GetDoctorDetail
(
computeId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
#
region
人均绩效修改
/// <summary>
/// 编辑全院绩效平均
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"EditHospitalAvg"
)]
[
HttpPost
]
public
ApiResponse
<
res_baiscnorm
>
EditHospitalAvg
([
FromBody
]
ComputerAvgRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
result
=
_computeService
.
EditHospitalAvg
(
request
);
return
new
ApiResponse
<
res_baiscnorm
>(
ResponseType
.
OK
,
result
);
}
#
endregion
#
region
其他绩效统计
/// <summary>
/// 其他医院绩效统计
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"OtherPerStats/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
OtherPerStats
(
int
allotId
)
{
var
employee
=
_employeeService
.
GetAprList
(
allotId
,
_claim
.
GetUserId
());
var
relust
=
_computeService
.
GetOtherPerStats
(
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
#
endregion
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/ConfigController.cs
View file @
06b5675c
...
@@ -535,5 +535,44 @@ public ApiResponse WorkHeader([CustomizeValidator(RuleSet = "Select"), FromBody]
...
@@ -535,5 +535,44 @@ public ApiResponse WorkHeader([CustomizeValidator(RuleSet = "Select"), FromBody]
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
}
#
region
HRP
人员科室
/// <summary>
/// 获取HRP人员科室
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"hrpdepthands/{hospitalId}/allot/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
GetHrpDeptHands
([
FromRoute
]
int
hospitalId
,
int
allotId
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"HospitalId无效"
);
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
relust
=
_configService
.
GetHrpDeptHands
(
hospitalId
,
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
/// <summary>
/// 保存HRP人员科室
/// </summary>
/// <param name=""></param>
/// <returns></returns>
[
Route
(
"savehrpdept/{hospitalId}/allot/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveHrpDept
(
int
hospitalId
,
int
allotId
,
[
FromBody
]
SaveCollectData
request
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"HospitalId无效"
);
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
_configService
.
SaveDepttypeHands
(
hospitalId
,
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
06b5675c
...
@@ -466,5 +466,20 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
...
@@ -466,5 +466,20 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
var
result
=
employeeService
.
GetPerforTypeDict
(
allotId
);
var
result
=
employeeService
.
GetPerforTypeDict
(
allotId
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"绩效类型字典"
,
result
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"绩效类型字典"
,
result
);
}
}
/// <summary>
/// 材料科室考核
/// </summary>
/// <returns></returns>
[
Route
(
"deptAssessment/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
GetDeptAssessment
(
int
allotId
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
GetDeptAssessment
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
}
}
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
06b5675c
...
@@ -401,11 +401,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
...
@@ -401,11 +401,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
{
{
//var result = secondAllotService.OtherList(request.SecondId, claimService.GetUserId()
);
var
result
=
secondAllotDetails
.
GetOtherTempDetails
(
claimService
.
GetUserId
(),
request
.
SecondId
,
request
.
IsArchive
,
request
.
EmployeeSource
);
var
result
=
secondAllotDetails
.
GetOtherTempData
(
claimService
.
GetUserId
(),
request
.
SecondId
,
request
.
IsArchive
,
request
.
EmployeeSource
,
out
decimal
?
realAmount
);
//
var result = secondAllotDetails.GetOtherTempData(claimService.GetUserId(), request.SecondId, request.IsArchive, request.EmployeeSource, out decimal? realAmount);
var
obj
=
new
var
obj
=
new
{
{
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
re
alAmount
),
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
re
sult
?.
Sum
(
t
=>
t
.
RealAmount
)
),
body
=
result
,
body
=
result
,
};
};
return
new
ApiResponse
(
ResponseType
.
OK
,
obj
);
return
new
ApiResponse
(
ResponseType
.
OK
,
obj
);
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
06b5675c
...
@@ -467,6 +467,20 @@
...
@@ -467,6 +467,20 @@
<param
name=
"computeId"
></param>
<param
name=
"computeId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.EditHospitalAvg(Performance.DtoModels.Request.ComputerAvgRequest)"
>
<summary>
编辑全院绩效平均
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.OtherPerStats(System.Int32)"
>
<summary>
其他医院绩效统计
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ConfigController.GetDrugtypeList(Performance.DtoModels.DrugpropRequest)"
>
<summary>
<summary>
获取 药占比类型信息列表
获取 药占比类型信息列表
...
@@ -756,6 +770,12 @@
...
@@ -756,6 +770,12 @@
<param
name=
"allotId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.GetDeptAssessment(System.Int32)"
>
<summary>
材料科室考核
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ExConfigController.Extract(Performance.DtoModels.ModModuleRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ExConfigController.Extract(Performance.DtoModels.ModModuleRequest)"
>
<summary>
<summary>
绩效数据抽取模板
绩效数据抽取模板
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
06b5675c
...
@@ -1104,6 +1104,11 @@
...
@@ -1104,6 +1104,11 @@
是否需要二次分配
是否需要二次分配
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.PerDataAccountBaisc.NightShiftWorkPerforFee"
>
<summary>
夜班绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.UnitType"
>
<member
name=
"P:Performance.DtoModels.PerDataClinicEmployee.UnitType"
>
<summary>
<summary>
核算单元分类
核算单元分类
...
@@ -1818,6 +1823,26 @@
...
@@ -1818,6 +1823,26 @@
<member
name=
"P:Performance.DtoModels.AprAmountAuditRequest.Remark"
>
<member
name=
"P:Performance.DtoModels.AprAmountAuditRequest.Remark"
>
<summary>
备注
</summary>
<summary>
备注
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.Request.ComputerAvgRequest.PositionName"
>
<summary>
绩效核算人群
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Request.ComputerAvgRequest.TotelValue"
>
<summary>
绩效总额
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Request.ComputerAvgRequest.AvgValue"
>
<summary>
人均绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Request.ComputerAvgRequest.TotelNumber"
>
<summary>
总人数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Request.SmsCodeRequest.Type"
>
<member
name=
"P:Performance.DtoModels.Request.SmsCodeRequest.Type"
>
<summary>
<summary>
短信验证类型 1 手机号登录 2 其他
短信验证类型 1 手机号登录 2 其他
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
06b5675c
...
@@ -5598,6 +5598,11 @@
...
@@ -5598,6 +5598,11 @@
是否需要二次分配
是否需要二次分配
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.res_account.NightShiftWorkPerforFee"
>
<summary>
夜班绩效
</summary>
</member>
<member
name=
"T:Performance.EntityModels.res_accountdoctor"
>
<member
name=
"T:Performance.EntityModels.res_accountdoctor"
>
<summary>
<summary>
医生科室核算结果
医生科室核算结果
...
@@ -6378,6 +6383,11 @@
...
@@ -6378,6 +6383,11 @@
调节后其他绩效
调节后其他绩效
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.res_specialunit.NightShiftWorkPerforFee"
>
<summary>
夜班绩效
</summary>
</member>
<member
name=
"T:Performance.EntityModels.sys_extract"
>
<member
name=
"T:Performance.EntityModels.sys_extract"
>
<summary>
<summary>
医院数据提取脚本
医院数据提取脚本
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccountBaisc.cs
View file @
06b5675c
...
@@ -237,6 +237,11 @@ public class PerDataAccountBaisc : IPerData
...
@@ -237,6 +237,11 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
/// </summary>
public
string
NeedSecondAllot
{
get
;
set
;
}
public
string
NeedSecondAllot
{
get
;
set
;
}
/// <summary>
/// 夜班绩效
/// </summary>
public
Nullable
<
decimal
>
NightShiftWorkPerforFee
{
get
;
set
;
}
#
endregion
由计算得出
#
endregion
由计算得出
}
}
}
}
performance/Performance.DtoModels/Request/ComputerAvgRequest.cs
0 → 100644
View file @
06b5675c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
FluentValidation
;
namespace
Performance.DtoModels.Request
{
public
class
ComputerAvgRequest
{
public
int
Id
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
public
int
SheetId
{
get
;
set
;
}
/// <summary>
/// 绩效核算人群
/// </summary>
public
string
PositionName
{
get
;
set
;
}
/// <summary>
/// 绩效总额
/// </summary>
public
decimal
TotelValue
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
decimal
AvgValue
{
get
;
set
;
}
/// <summary>
/// 总人数
/// </summary>
public
decimal
TotelNumber
{
get
;
set
;
}
}
public
class
ComputerRequestValidator
:
AbstractValidator
<
ComputerAvgRequest
>
{
public
ComputerRequestValidator
()
{
RuleFor
(
x
=>
x
.
Id
).
NotNull
();
RuleFor
(
x
=>
x
.
AllotId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
PositionName
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
TotelNumber
).
NotNull
();
RuleFor
(
x
=>
x
.
TotelValue
).
NotNull
();
RuleFor
(
x
=>
x
.
AvgValue
).
NotNull
();
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
06b5675c
...
@@ -78,7 +78,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -78,7 +78,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
cof_workloadtype
>
cof_workloadtype
{
get
;
set
;
}
public
virtual
DbSet
<
cof_workloadtype
>
cof_workloadtype
{
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
<
collect_data
>
collect_data
{
get
;
set
;
}
public
virtual
DbSet
<
collect_data
>
collect_data
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
collect_permission
>
collect_permission
{
get
;
set
;
}
public
virtual
DbSet
<
collect_permission
>
collect_permission
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/ag_secondallot.cs
View file @
06b5675c
...
@@ -125,5 +125,9 @@ public class ag_secondallot
...
@@ -125,5 +125,9 @@ public class ag_secondallot
/// 护理部审核状态 2 等待审核 3 审核通过 4 驳回
/// 护理部审核状态 2 等待审核 3 审核通过 4 驳回
/// </summary>
/// </summary>
public
Nullable
<
int
>
NursingDeptStatus
{
get
;
set
;
}
public
Nullable
<
int
>
NursingDeptStatus
{
get
;
set
;
}
/// <summary>
/// 夜班绩效
/// </summary>
public
decimal
?
NightShiftWorkPerforFee
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Entity/res_account.cs
View file @
06b5675c
...
@@ -195,5 +195,9 @@ public class res_account
...
@@ -195,5 +195,9 @@ public class res_account
/// 是否需要二次分配
/// 是否需要二次分配
/// </summary>
/// </summary>
public
string
NeedSecondAllot
{
get
;
set
;
}
public
string
NeedSecondAllot
{
get
;
set
;
}
/// <summary>
/// 夜班绩效
/// </summary>
public
Nullable
<
decimal
>
NightShiftWorkPerforFee
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Entity/res_specialunit.cs
View file @
06b5675c
...
@@ -135,5 +135,9 @@ public class res_specialunit
...
@@ -135,5 +135,9 @@ public class res_specialunit
/// 调节后其他绩效
/// 调节后其他绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AdjustLaterOtherFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
AdjustLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// 夜班绩效
/// </summary>
public
Nullable
<
decimal
>
NightShiftWorkPerforFee
{
get
;
set
;
}
}
}
}
}
performance/Performance.Repository/Repository/PerforCofHrpDeptRepository.cs
0 → 100644
View file @
06b5675c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Performance.EntityModels
;
namespace
Performance.Repository.Repository
{
public
partial
class
PerforCofHrpDeptRepository
:
PerforRepository
<
cof_hrp_department
>
{
public
PerforCofHrpDeptRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
06b5675c
...
@@ -268,6 +268,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
...
@@ -268,6 +268,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
economicData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeEconomic
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
doctorWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
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
nurseWorkloadData
=
perSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseWorkload
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
accountExtraData
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
var
pairs
=
new
[]
var
pairs
=
new
[]
{
{
...
@@ -301,7 +302,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
...
@@ -301,7 +302,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
}
}
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
if
(
UnitType
.
医技组
==
unitType
&&
workDoctor
==
null
)
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
workDoctor
=
info
.
Data
.
FirstOrDefault
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()
&&
t
.
AccountingUnit
==
dept
.
AccountingUnit
);
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
accountExtraData
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
dept
.
NightShiftWorkPerforFee
=
nightShift
;
//dept.MedicineFactor = workDoctor?.MedicineFactor;
//dept.MedicineFactor = workDoctor?.MedicineFactor;
//dept.ScoringAverage = scoreAverage.HasValue ? scoreAverage ?? 0 : dept.ScoringAverage;
//dept.ScoringAverage = scoreAverage.HasValue ? scoreAverage ?? 0 : dept.ScoringAverage;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
;
dept
.
ScoringAverage
=
dept
.
ScoringAverage
;
...
@@ -325,6 +329,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
...
@@ -325,6 +329,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
}
}
sheet
.
PerData
.
AddRange
(
atDataList
);
sheet
.
PerData
.
AddRange
(
atDataList
);
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
06b5675c
...
@@ -136,6 +136,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -136,6 +136,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//取出科室
//取出科室
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
accountList
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountBasic
)?.
PerData
?.
Select
(
t
=>
(
PerDataAccountBaisc
)
t
);
var
accountExtraData
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
AccountExtra
)?.
PerData
?.
Select
(
t
=>
(
PerData
)
t
);
List
<
res_specialunit
>
resDataList
=
new
List
<
res_specialunit
>();
List
<
res_specialunit
>
resDataList
=
new
List
<
res_specialunit
>();
...
@@ -173,6 +174,9 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -173,6 +174,9 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//var materialsExtra = materialsExtras?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
//var materialsExtra = materialsExtras?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
//var scoreAverage = accountScoreAverages?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
//var scoreAverage = accountScoreAverages?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
accountExtraData
.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
decimal
?
headcount
=
null
;
decimal
?
headcount
=
null
;
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
headcount
=
group
.
Number
;
headcount
=
group
.
Number
;
...
@@ -207,6 +211,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -207,6 +211,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
AssessBeforeOtherFee
=
dept
?.
AssessBeforeOtherFee
??
0
,
AssessBeforeOtherFee
=
dept
?.
AssessBeforeOtherFee
??
0
,
AssessLaterOtherFee
=
dept
?.
AssessLaterOtherFee
??
0
,
AssessLaterOtherFee
=
dept
?.
AssessLaterOtherFee
??
0
,
AdjustLaterOtherFee
=
dept
?.
AdjustLaterOtherFee
??
0
,
AdjustLaterOtherFee
=
dept
?.
AdjustLaterOtherFee
??
0
,
NightShiftWorkPerforFee
=
nightShift
,
};
};
res
.
PerforTotal
=
(
sumValue
??
0
)
+
res
.
AssessBeforeOtherFee
;
res
.
PerforTotal
=
(
sumValue
??
0
)
+
res
.
AssessBeforeOtherFee
;
res
.
GiveFee
=
Math
.
Round
(
res
.
PerforTotal
+
res
.
AssessLaterOtherFee
??
0
);
res
.
GiveFee
=
Math
.
Round
(
res
.
PerforTotal
+
res
.
AssessLaterOtherFee
??
0
);
...
@@ -541,6 +546,7 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -541,6 +546,7 @@ public void GenerateSecondAllot(per_allot allot)
Month
=
allot
.
Month
,
Month
=
allot
.
Month
,
UnitType
=
((
UnitType
)
item
.
UnitType
).
ToString
(),
UnitType
=
((
UnitType
)
item
.
UnitType
).
ToString
(),
Department
=
item
.
AccountingUnit
,
Department
=
item
.
AccountingUnit
,
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
,
RealGiveFee
=
item
.
RealGiveFee
,
RealGiveFee
=
item
.
RealGiveFee
,
});
});
}
}
...
@@ -548,7 +554,7 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -548,7 +554,7 @@ public void GenerateSecondAllot(per_allot allot)
}
}
if
(
specialList
!=
null
)
if
(
specialList
!=
null
)
{
{
foreach
(
var
item
in
specialList
.
Select
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
RealGiveFee
}).
Distinct
())
foreach
(
var
item
in
specialList
.
Select
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
NightShiftWorkPerforFee
,
w
.
RealGiveFee
}).
Distinct
())
{
{
if
(!
tempSecond
.
Any
(
f
=>
f
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
f
.
Department
==
item
.
AccountingUnit
))
if
(!
tempSecond
.
Any
(
f
=>
f
.
UnitType
==
UnitType
.
特殊核算组
.
ToString
()
&&
f
.
Department
==
item
.
AccountingUnit
))
{
{
...
@@ -559,6 +565,7 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -559,6 +565,7 @@ public void GenerateSecondAllot(per_allot allot)
Month
=
allot
.
Month
,
Month
=
allot
.
Month
,
UnitType
=
UnitType
.
特殊核算组
.
ToString
(),
UnitType
=
UnitType
.
特殊核算组
.
ToString
(),
Department
=
item
.
AccountingUnit
,
Department
=
item
.
AccountingUnit
,
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
,
RealGiveFee
=
item
.
RealGiveFee
,
RealGiveFee
=
item
.
RealGiveFee
,
});
});
}
}
...
@@ -580,13 +587,16 @@ public void GenerateSecondAllot(per_allot allot)
...
@@ -580,13 +587,16 @@ public void GenerateSecondAllot(per_allot allot)
UnitType
=
item
.
UnitType
,
UnitType
=
item
.
UnitType
,
Department
=
item
.
Department
,
Department
=
item
.
Department
,
RealGiveFee
=
item
.
RealGiveFee
,
RealGiveFee
=
item
.
RealGiveFee
,
NightShiftWorkPerforFee
=
item
.
NightShiftWorkPerforFee
,
Status
=
1
,
Status
=
1
,
NursingDeptStatus
=
1
,
NursingDeptStatus
=
1
,
});
});
}
}
else
else
{
{
if
(
Math
.
Abs
((
second
.
RealGiveFee
??
0
)
-
(
item
.
RealGiveFee
??
0
))
>=
0.5
m
&&
second
.
Status
>
1
)
var
backResult
=
Math
.
Abs
((
second
.
RealGiveFee
??
0
)
-
(
item
.
RealGiveFee
??
0
))
>=
0.5
m
||
Math
.
Abs
((
second
.
NightShiftWorkPerforFee
??
0
)
-
(
item
.
NightShiftWorkPerforFee
??
0
))
>=
0.5
m
;
if
(
backResult
&&
second
.
Status
>
1
)
{
{
second
.
Status
=
4
;
second
.
Status
=
4
;
second
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
second
.
Remark
=
"科室绩效结果发生变更,需要重新提交"
;
...
...
performance/Performance.Services/ComputeService.cs
View file @
06b5675c
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
using
System.Linq.Expressions
;
using
System.Linq.Expressions
;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
Performance.DtoModels.Request
;
using
Performance.DtoModels.Response
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -210,8 +212,15 @@ public List<res_baiscnorm> AllComputeAvg(int allotId, List<ComputeResponse> list
...
@@ -210,8 +212,15 @@ public List<res_baiscnorm> AllComputeAvg(int allotId, List<ComputeResponse> list
List
<
res_baiscnorm
>
avgs
=
new
List
<
res_baiscnorm
>();
List
<
res_baiscnorm
>
avgs
=
new
List
<
res_baiscnorm
>();
var
emps
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
var
emps
=
perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
var
jobCategory
=
emps
?.
Select
(
w
=>
string
.
IsNullOrEmpty
(
w
.
JobCategory
)
?
"未知"
:
w
.
JobCategory
).
Distinct
()
??
new
List
<
string
>();
var
jobCategory
=
emps
?.
Select
(
w
=>
string
.
IsNullOrEmpty
(
w
.
JobCategory
)
?
"未知"
:
w
.
JobCategory
).
Distinct
()
??
new
List
<
string
>();
var
basicnorm
=
perforResbaiscnormRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
position
=
basicnorm
?.
Select
(
t
=>
string
.
IsNullOrEmpty
(
t
.
PositionName
)
?
""
:
t
.
PositionName
).
Distinct
()
??
new
List
<
string
>();
foreach
(
var
item
in
jobCategory
)
foreach
(
var
item
in
jobCategory
)
{
{
if
(
position
.
Contains
(
item
))
{
avgs
.
Add
(
basicnorm
.
First
(
t
=>
t
.
PositionName
==
item
));
continue
;
}
var
sumfee
=
(
from
com
in
list
var
sumfee
=
(
from
com
in
list
join
emp
in
emps
?.
Where
(
w
=>
w
.
JobCategory
==
item
)
join
emp
in
emps
?.
Where
(
w
=>
w
.
JobCategory
==
item
)
on
com
.
JobNumber
equals
emp
.
PersonnelNumber
on
com
.
JobNumber
equals
emp
.
PersonnelNumber
...
@@ -1416,5 +1425,70 @@ public DeptDataDetails GetDoctorDetail(int computeId)
...
@@ -1416,5 +1425,70 @@ public DeptDataDetails GetDoctorDetail(int computeId)
}
}
return
doctorDetails
;
return
doctorDetails
;
}
}
public
res_baiscnorm
EditHospitalAvg
(
ComputerAvgRequest
request
)
{
if
(
request
.
Id
==
0
)
{
var
baiscnorm
=
Mapper
.
Map
<
res_baiscnorm
>(
request
);
if
(!
perforResbaiscnormRepository
.
Add
(
baiscnorm
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
res_baiscnorm
>(
baiscnorm
);
}
else
{
var
baiscnorm
=
perforResbaiscnormRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
Id
);
if
(
baiscnorm
==
null
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
Id
}
"
);
baiscnorm
.
TotelNumber
=
request
.
TotelNumber
;
baiscnorm
.
TotelValue
=
request
.
TotelValue
;
baiscnorm
.
AvgValue
=
request
.
AvgValue
;
//var baiscnorm = Mapper.Map<res_baiscnorm>(request);
if
(!
perforResbaiscnormRepository
.
Update
(
baiscnorm
))
throw
new
PerformanceException
(
"保存失败"
);
return
Mapper
.
Map
<
res_baiscnorm
>(
baiscnorm
);
}
}
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
List
<
per_apr_amount
>
employees
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
if
(
employees
==
null
)
return
others
;
var
perForType
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PerforType
).
Distinct
();
var
doctorNum
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
().
ToList
();
if
(!
doctorNum
.
Any
())
return
others
;
foreach
(
var
num
in
doctorNum
)
{
var
dicData
=
new
Dictionary
<
string
,
string
>();
var
amount
=
employees
.
Find
(
t
=>
t
.
PersonnelNumber
==
num
);
if
(
amount
==
null
)
continue
;
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
foreach
(
var
type
in
perForType
)
{
var
emp
=
employees
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
)?.
ToList
();
if
(!
emp
.
Any
())
dicData
.
Add
(
type
,
"0"
);
else
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
First
()?.
Amount
),
0
).
ToString
());
}
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
dicData
.
Add
(
"合计"
,
Math
.
Round
(
Convert
.
ToDecimal
(
sum
),
0
).
ToString
());
others
.
Add
(
dicData
);
}
return
others
;
}
}
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
06b5675c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
Performance.Repository.Repository
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -27,6 +28,7 @@ public class ConfigService : IAutoInjection
...
@@ -27,6 +28,7 @@ public class ConfigService : IAutoInjection
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
//private PerforCofcmiRepository perforCofcmiRepository;
//private PerforCofcmiRepository perforCofcmiRepository;
private
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
;
private
PersonService
personService
;
private
PersonService
personService
;
private
LogManageService
logManageService
;
private
LogManageService
logManageService
;
private
ILogger
<
ConfigService
>
logger
;
private
ILogger
<
ConfigService
>
logger
;
...
@@ -43,6 +45,7 @@ public class ConfigService : IAutoInjection
...
@@ -43,6 +45,7 @@ public class ConfigService : IAutoInjection
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforPerapramountRepository
perapramountRepository
,
//PerforCofcmiRepository perforCofcmiRepository,
//PerforCofcmiRepository perforCofcmiRepository,
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
,
PersonService
personService
,
PersonService
personService
,
LogManageService
logManageService
,
LogManageService
logManageService
,
ILogger
<
ConfigService
>
logger
)
ILogger
<
ConfigService
>
logger
)
...
@@ -59,6 +62,7 @@ public class ConfigService : IAutoInjection
...
@@ -59,6 +62,7 @@ public class ConfigService : IAutoInjection
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
//this.perforCofcmiRepository = perforCofcmiRepository;
//this.perforCofcmiRepository = perforCofcmiRepository;
this
.
perforCofHrpDeptRepository
=
perforCofHrpDeptRepository
;
this
.
personService
=
personService
;
this
.
personService
=
personService
;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
this
.
logger
=
logger
;
this
.
logger
=
logger
;
...
@@ -834,6 +838,95 @@ private void CopyAprData(int prevAllotId, int allotId)
...
@@ -834,6 +838,95 @@ private void CopyAprData(int prevAllotId, int allotId)
}
}
}
}
public
HandsonTable
GetHrpDeptHands
(
int
HospitalId
,
int
AllotId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
HrpDept
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
HrpDept
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
var
data
=
perforCofHrpDeptRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
1
;
foreach
(
var
item
in
data
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
cells
=
(
from
conf
in
HrpDept
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
}
public
void
SaveDepttypeHands
(
int
hospitalId
,
int
allotId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
hospitalId
,
allotId
,
request
,
HrpDept
);
List
<
cof_hrp_department
>
depts
=
new
List
<
cof_hrp_department
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_hrp_department
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
data
.
HRPDepartment
)
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
))
{
data
.
HospitalId
=
hospitalId
;
data
.
AllotId
=
allotId
;
depts
.
Add
(
data
);
}
}
perforCofHrpDeptRepository
.
Execute
(
"delete from cof_hrp_department where HospitalId=@hospitalId and allotid = @allotid"
,
new
{
hospitalId
,
allotId
});
perforCofHrpDeptRepository
.
AddRange
(
depts
.
ToArray
());
}
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
int
hospitalId
,
int
allotId
,
SaveCollectData
request
,
Dictionary
<
string
,
string
>
config
)
{
List
<
Dictionary
<
string
,
string
>>
allData
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
r
=
0
;
r
<
request
.
Data
.
Length
;
r
++)
{
// 创建固定数据列
Dictionary
<
string
,
string
>
baseData
=
CreateBaseData
(
request
,
config
,
r
);
baseData
.
Add
(
nameof
(
cof_hrp_department
.
AllotId
),
allotId
.
ToString
());
baseData
.
Add
(
nameof
(
cof_hrp_department
.
HospitalId
),
hospitalId
.
ToString
());
allData
.
Add
(
baseData
);
}
return
allData
;
}
private
Dictionary
<
string
,
string
>
CreateBaseData
(
SaveCollectData
request
,
Dictionary
<
string
,
string
>
config
,
int
rownumber
)
{
Dictionary
<
string
,
string
>
result
=
new
Dictionary
<
string
,
string
>();
for
(
int
c
=
0
;
c
<
request
.
ColHeaders
.
Length
;
c
++)
{
var
header
=
request
.
ColHeaders
[
c
];
var
first
=
config
.
FirstOrDefault
(
w
=>
w
.
Value
==
header
);
if
(!
default
(
KeyValuePair
<
string
,
string
>).
Equals
(
first
)
&&
!
result
.
ContainsKey
(
header
)
&&
request
.
Data
[
rownumber
].
Length
>
c
)
{
result
.
Add
(
first
.
Key
,
request
.
Data
[
rownumber
][
c
]);
}
}
return
result
;
}
public
static
Dictionary
<
string
,
string
>
HrpDept
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_hrp_department
.
HRPDepartment
),
"hrp人员科室"
},
{
nameof
(
cof_hrp_department
.
AccountingUnit
),
"核算单元"
},
};
///// <summary>
///// <summary>
///// CMI值
///// CMI值
///// </summary>
///// </summary>
...
...
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
06b5675c
...
@@ -635,7 +635,7 @@ private void SupplyHeaderByWorkItem(int hospitalId, SecondResponse result, ag_se
...
@@ -635,7 +635,7 @@ private void SupplyHeaderByWorkItem(int hospitalId, SecondResponse result, ag_se
public
HandsonTable
GetOtherTempData
(
int
userId
,
int
secondId
,
int
isArchive
,
int
employeeSource
,
out
decimal
?
realAmount
)
public
HandsonTable
GetOtherTempData
(
int
userId
,
int
secondId
,
int
isArchive
,
int
employeeSource
,
out
decimal
?
realAmount
)
{
{
string
[]
workNumbers
=
new
string
[]
{
};
string
[]
workNumbers
=
new
string
[]
{
};
var
details
=
GetOtherTempDetails
(
userId
,
secondId
,
isArchive
,
employeeSource
,
ref
workNumbers
);
var
details
=
GetOtherTempDetails
(
userId
,
secondId
,
isArchive
,
employeeSource
);
var
secondAllot
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
var
secondAllot
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
...
@@ -689,7 +689,7 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
...
@@ -689,7 +689,7 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
return
result
;
return
result
;
}
}
public
List
<
ag_othersource
>
GetOtherTempDetails
(
int
userId
,
int
secondId
,
int
isArchive
,
int
employeeSource
,
ref
string
[]
workNumbers
)
public
List
<
ag_othersource
>
GetOtherTempDetails
(
int
userId
,
int
secondId
,
int
isArchive
,
int
employeeSource
)
{
{
var
secondAllot
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
var
secondAllot
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
secondAllot
==
null
)
throw
new
PerformanceException
(
"二次绩效信息无效!"
);
if
(
secondAllot
==
null
)
throw
new
PerformanceException
(
"二次绩效信息无效!"
);
...
@@ -780,7 +780,6 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
...
@@ -780,7 +780,6 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
}
}
}
}
var
originalEmployees
=
personService
.
GetPerEmployee
(
secondAllot
.
AllotId
.
Value
);
var
originalEmployees
=
personService
.
GetPerEmployee
(
secondAllot
.
AllotId
.
Value
);
workNumbers
=
originalEmployees
?.
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
().
ToArray
();
SupplementSecondDetail
(
secondAllot
,
originalEmployees
,
result
,
isSupplementTitlePerformance
);
SupplementSecondDetail
(
secondAllot
,
originalEmployees
,
result
,
isSupplementTitlePerformance
);
return
result
;
return
result
;
...
...
performance/Performance.Services/EmployeeService.cs
View file @
06b5675c
...
@@ -21,6 +21,7 @@ public class EmployeeService : IAutoInjection
...
@@ -21,6 +21,7 @@ public class EmployeeService : IAutoInjection
{
{
private
PerforImemployeeRepository
perforImemployeeRepository
;
private
PerforImemployeeRepository
perforImemployeeRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforImdataRepository
perforImdataRepository
;
private
PerforPerallotRepository
perforPerallotRepository
;
private
PerforPerallotRepository
perforPerallotRepository
;
private
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
;
private
PerforUserhospitalRepository
perforUserhospitalRepository
;
private
PerforUserhospitalRepository
perforUserhospitalRepository
;
...
@@ -34,6 +35,7 @@ public class EmployeeService : IAutoInjection
...
@@ -34,6 +35,7 @@ public class EmployeeService : IAutoInjection
public
EmployeeService
(
PerforImemployeeRepository
perforImemployeeRepository
,
public
EmployeeService
(
PerforImemployeeRepository
perforImemployeeRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforImdataRepository
perforImdataRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforPerallotRepository
perforPerallotRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
PerforUserhospitalRepository
perforUserhospitalRepository
,
...
@@ -47,6 +49,7 @@ public class EmployeeService : IAutoInjection
...
@@ -47,6 +49,7 @@ public class EmployeeService : IAutoInjection
{
{
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
this
.
perforImemployeeRepository
=
perforImemployeeRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforImdataRepository
=
perforImdataRepository
;
this
.
perforPerallotRepository
=
perforPerallotRepository
;
this
.
perforPerallotRepository
=
perforPerallotRepository
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
this
.
perforUserhospitalRepository
=
perforUserhospitalRepository
;
...
@@ -637,5 +640,55 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
...
@@ -637,5 +640,55 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
Value
=
t
Value
=
t
}).
ToList
();
}).
ToList
();
}
}
#
region
科室考核
public
List
<
Dictionary
<
string
,
string
>>
GetDeptAssessment
(
int
allotId
)
{
var
sheet
=
perforPersheetRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
SheetName
==
"5.4 科室材料考核2"
);
if
(
sheet
==
null
)
return
new
List
<
Dictionary
<
string
,
string
>>();
var
imData
=
perforImdataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
SheetID
==
sheet
.
ID
);
var
headers
=
imData
.
OrderByDescending
(
c
=>
c
.
IsTotal
).
Select
(
t
=>
t
.
TypeName
).
Distinct
();
var
dataNum
=
imData
.
Select
(
t
=>
t
.
RowNumber
)?.
OrderBy
(
c
=>
c
.
Value
).
Distinct
().
ToList
();
if
(!
dataNum
.
Any
())
return
new
List
<
Dictionary
<
string
,
string
>>();
var
rowData
=
new
List
<
Dictionary
<
string
,
string
>>();
foreach
(
var
num
in
dataNum
)
{
var
dicData
=
new
Dictionary
<
string
,
string
>();
var
fisHeader
=
false
;
foreach
(
var
header
in
headers
)
{
var
headData
=
imData
.
Find
(
t
=>
t
.
RowNumber
==
num
&&
t
.
TypeName
==
header
)?.
CellValue
;
dicData
.
Add
(
header
,
Math
.
Round
((
decimal
)
headData
*
100
)
+
"%"
);
if
(!
fisHeader
)
{
var
data
=
imData
?.
First
(
t
=>
t
.
RowNumber
==
num
);
switch
(
data
.
UnitType
)
{
case
(
int
)
UnitType
.
医技组
:
dicData
.
Add
(
"核算单元类型"
,
"医技组"
);
break
;
case
(
int
)
UnitType
.
医生组
:
dicData
.
Add
(
"核算单元类型"
,
"医生组"
);
break
;
case
(
int
)
UnitType
.
护理组
:
dicData
.
Add
(
"核算单元类型"
,
"护理组"
);
break
;
}
dicData
.
Add
(
"核算单元"
,
data
.
AccountingUnit
);
fisHeader
=
true
;
}
}
rowData
.
Add
(
dicData
);
}
return
rowData
;
}
#
endregion
}
}
}
}
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