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
65b03bc5
Commit
65b03bc5
authored
Jun 21, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初稿
parent
28e2c18b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
476 additions
and
56 deletions
+476
-56
performance/Performance.Api/Controllers/SecondAllotController.cs
+136
-5
performance/Performance.Api/wwwroot/Performance.Api.xml
+35
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+56
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-15
performance/Performance.DtoModels/Enum.cs
+4
-0
performance/Performance.DtoModels/HandsonTable.cs
+14
-4
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
+0
-8
performance/Performance.DtoModels/ResponseType.cs
+1
-0
performance/Performance.DtoModels/Second/Constant.cs
+45
-0
performance/Performance.DtoModels/Second/SecondColumnDictionary.cs
+22
-0
performance/Performance.DtoModels/Second/SecondComputeCheckResultDto.cs
+18
-0
performance/Performance.DtoModels/Second/SecondComputeDto.cs
+10
-0
performance/Performance.DtoModels/Second/SecondDetailDto.cs
+11
-0
performance/Performance.DtoModels/Second/SecondLoadDto.cs
+15
-0
performance/Performance.DtoModels/Second/SecondWorkLoadDto.cs
+32
-0
performance/Performance.EntityModels/Entity/ag_bodysource.cs
+15
-10
performance/Performance.EntityModels/Entity/ag_headsource.cs
+8
-3
performance/Performance.Infrastructure/Extensions/Extensions.Dictionary.cs
+22
-6
performance/Performance.Infrastructure/Extensions/Extensions.String.cs
+22
-0
performance/Performance.Repository/PerforPerapramounthideRepository.cs
+1
-1
performance/Performance.Services/PersonService.cs
+1
-1
performance/Performance.Services/RedistributionService.cs
+0
-0
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+1
-1
performance/Performance.Services/SecondAllotService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
65b03bc5
...
@@ -10,6 +10,8 @@
...
@@ -10,6 +10,8 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
Performance.Infrastructure
;
using
Performance.DtoModels.Second
;
namespace
Performance.Api.Controllers
namespace
Performance.Api.Controllers
{
{
...
@@ -20,6 +22,7 @@ namespace Performance.Api.Controllers
...
@@ -20,6 +22,7 @@ namespace Performance.Api.Controllers
public
class
SecondAllotController
:
ControllerBase
public
class
SecondAllotController
:
ControllerBase
{
{
private
readonly
ClaimService
claimService
;
private
readonly
ClaimService
claimService
;
private
readonly
AllotService
_allotService
;
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
SecondAllotService
secondAllotService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
ResultComputeService
resultComputeService
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
private
readonly
SecondAllotDetails
secondAllotDetails
;
...
@@ -27,6 +30,7 @@ public class SecondAllotController : ControllerBase
...
@@ -27,6 +30,7 @@ public class SecondAllotController : ControllerBase
public
SecondAllotController
(
public
SecondAllotController
(
ClaimService
claimService
,
ClaimService
claimService
,
AllotService
allotService
,
SecondAllotService
secondAllotService
,
SecondAllotService
secondAllotService
,
ResultComputeService
resultComputeService
,
ResultComputeService
resultComputeService
,
SecondAllotDetails
secondAllotDetails
,
SecondAllotDetails
secondAllotDetails
,
...
@@ -34,6 +38,7 @@ RedistributionService redistributionService
...
@@ -34,6 +38,7 @@ RedistributionService redistributionService
)
)
{
{
this
.
claimService
=
claimService
;
this
.
claimService
=
claimService
;
_allotService
=
allotService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
secondAllotService
=
secondAllotService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
resultComputeService
=
resultComputeService
;
this
.
secondAllotDetails
=
secondAllotDetails
;
this
.
secondAllotDetails
=
secondAllotDetails
;
...
@@ -330,7 +335,7 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod
...
@@ -330,7 +335,7 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod
[
Route
(
"/api/second/audit/submit"
)]
[
Route
(
"/api/second/audit/submit"
)]
public
ApiResponse
SubmitAudit
(
SubmitAuditRequest
request
)
public
ApiResponse
SubmitAudit
(
SubmitAuditRequest
request
)
{
{
var
second
=
secondAllotService
.
GetSecond
a
llot
(
request
.
SecondId
);
var
second
=
secondAllotService
.
GetSecond
A
llot
(
request
.
SecondId
);
if
(
second
==
null
)
if
(
second
==
null
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"二次绩效Id无效"
);
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"二次绩效Id无效"
);
if
(
second
.
Status
==
3
)
if
(
second
.
Status
==
3
)
...
@@ -534,18 +539,144 @@ public ApiResponse AutoCompleteBodyData([FromRoute] int secondId, SecondEmployee
...
@@ -534,18 +539,144 @@ public ApiResponse AutoCompleteBodyData([FromRoute] int secondId, SecondEmployee
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
#
region
二次分配后台计算
/// <summary>
/// <summary>
/// 二次绩效录入页面
/// 二次绩效录入页面
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
Route
(
"api/second/redistribution"
)]
[
Route
(
"api/second/redistribution
/load
"
)]
[
Http
Ge
t
]
[
Http
Pos
t
]
public
ApiResponse
Redistribution
([
FromRoute
]
SecondLoadRequest
request
)
public
ApiResponse
Redistribution
Load
([
FromBody
]
SecondLoadDto
request
)
{
{
var
result
=
_redistributionService
.
Load
(
request
.
SecondId
,
request
.
ComputeMode
);
if
(!
Enum
.
IsDefined
(
typeof
(
ComputeMode
),
request
.
ComputeMode
))
throw
new
PerformanceException
(
"暂不支持当前计算方式!"
);
var
overrideMode
=
OverrideMode
.
Initial
;
if
(
Enum
.
IsDefined
(
typeof
(
OverrideMode
),
request
.
OverrideMode
))
overrideMode
=
(
OverrideMode
)
request
.
OverrideMode
;
var
result
=
_redistributionService
.
Load
(
request
.
SecondId
,
(
ComputeMode
)
request
.
ComputeMode
,
overrideMode
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
/// <summary>
/// 提交数据正确性检验
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution/check"
)]
[
HttpPost
]
public
ApiResponse
RedistributionCheck
([
FromBody
]
SecondComputeDto
request
)
{
if
(
request
?.
Body
==
null
)
throw
new
PerformanceException
(
"提交空参数,无法查看计算结果!"
);
var
second
=
secondAllotService
.
GetSecondAllot
(
request
.
SecondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数SecondId无效!"
);
var
allot
=
_allotService
.
GetAllot
(
second
.
AllotId
.
Value
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效记录不存在!"
);
// 年资职称绩效占比与工作量绩效占比 校验
var
loads
=
_redistributionService
.
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
var
seniorityTitlesAccountedPerformance
=
request
.
Head
.
GetValue
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
0
m
);
var
workloadRatio
=
workloadGroups
.
Sum
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
>
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,超过100%!"
);
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
<
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,不足100%!"
);
// 二次分配人员信息 校验
var
result
=
_redistributionService
.
CheckData
(
second
,
request
.
Body
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 二次绩效录入页面
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution/compute"
)]
[
HttpPost
]
public
ApiResponse
RedistributionCompute
([
FromBody
]
SecondComputeDto
request
)
{
if
(!
Enum
.
IsDefined
(
typeof
(
ComputeMode
),
request
.
ComputeMode
))
throw
new
PerformanceException
(
"暂不支持当前计算方式!"
);
if
(
request
?.
Body
==
null
)
throw
new
PerformanceException
(
"提交空参数,无法查看计算结果!"
);
var
second
=
secondAllotService
.
GetSecondAllot
(
request
.
SecondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数SecondId无效!"
);
var
allot
=
_allotService
.
GetAllot
(
second
.
AllotId
.
Value
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效记录不存在!"
);
// 年资职称绩效占比与工作量绩效占比 校验
var
loads
=
_redistributionService
.
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
var
workloadGroups
=
_redistributionService
.
GetTopWorkloadBodyGroups
(
loads
);
var
seniorityTitlesAccountedPerformance
=
request
.
Head
.
GetValue
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
0
m
);
var
workloadRatio
=
workloadGroups
.
Sum
(
w
=>
request
.
Head
.
GetValue
(
$"Workload_Ratio_
{
w
.
Name
}
"
,
0
m
));
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
>
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,超过100%!"
);
else
if
(
seniorityTitlesAccountedPerformance
+
workloadRatio
<
1
)
throw
new
PerformanceException
(
"年资职称绩效占比与工作量绩效占比总和,不足100%!"
);
// 二次分配人员信息 校验
var
checkDatas
=
_redistributionService
.
CheckData
(
second
,
request
.
Body
);
if
(
checkDatas
!=
null
&&
checkDatas
.
Any
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()))
return
new
ApiResponse
(
ResponseType
.
Fail
,
"数据验证未通过,请修复后查看计算结果!"
,
checkDatas
.
Where
(
w
=>
w
.
Level
==
ResponseType
.
Error
.
ToString
()));
// 清理无效数据 没有Tab标签的数据才是要计算的数据
var
cleanDatas
=
request
.
Body
.
Where
(
w
=>
w
.
Count
>
0
&&
w
.
GetValue
(
nameof
(
ResponseType
),
""
)
==
ResponseType
.
OK
.
ToString
()).
ToList
();
if
(
cleanDatas
==
null
||
cleanDatas
.
Count
==
0
)
throw
new
PerformanceException
(
"提交参数都是无效数据,请重新填写数据后查看计算结果!"
);
// 计算提交数据结果
_redistributionService
.
ResultCompute
((
ComputeMode
)
request
.
ComputeMode
,
request
.
Head
,
cleanDatas
,
loads
,
workloadGroups
);
// 补充医院其他绩效
_redistributionService
.
SupplementOtherPerfor
(
second
,
cleanDatas
);
// 重算顶部医院其他绩效
_redistributionService
.
OverviewCalculate_OtherPerformance
(
request
.
Head
,
cleanDatas
);
var
dic
=
_redistributionService
.
GetTableHeaderDictionary
(
loads
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
Head
=
request
.
Head
,
Body
=
cleanDatas
,
Dic
=
dic
});
}
/// <summary>
/// 二次绩效保存
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution/save"
)]
[
HttpPost
]
public
ApiResponse
RedistributionSave
([
FromBody
]
SecondComputeDto
request
)
{
secondAllotService
.
SaveSecondAllotData
(
request
.
SecondId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 二次绩效提交
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"api/second/redistribution/submit"
)]
[
HttpPost
]
public
ApiResponse
RedistributionSubmit
([
FromBody
]
SecondComputeDto
request
)
{
var
second
=
secondAllotService
.
GetSecondAllot
(
request
.
SecondId
);
if
(
second
==
null
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"二次绩效Id无效"
);
if
(
second
.
Status
==
3
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"该绩效已\"审核通过\",无需再次提交"
);
var
userid
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
AuditSubmit
(
second
,
userid
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
#
endregion
}
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
65b03bc5
...
@@ -1612,6 +1612,41 @@
...
@@ -1612,6 +1612,41 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionLoad(Performance.DtoModels.SecondLoadDto)"
>
<summary>
二次绩效录入页面
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionCheck(Performance.DtoModels.SecondComputeDto)"
>
<summary>
提交数据正确性检验
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionCompute(Performance.DtoModels.SecondComputeDto)"
>
<summary>
二次绩效录入页面
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionSave(Performance.DtoModels.SecondComputeDto)"
>
<summary>
二次绩效保存
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionSubmit(Performance.DtoModels.SecondComputeDto)"
>
<summary>
二次绩效提交
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SheetController.SheetList(Performance.DtoModels.SheetRequest)"
>
<member
name=
"M:Performance.Api.Controllers.SheetController.SheetList(Performance.DtoModels.SheetRequest)"
>
<summary>
<summary>
sheet 列表
sheet 列表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
65b03bc5
...
@@ -179,6 +179,12 @@
...
@@ -179,6 +179,12 @@
<member
name=
"F:Performance.DtoModels.DataFormat.小数"
>
<member
name=
"F:Performance.DtoModels.DataFormat.小数"
>
<summary>
小数
</summary>
<summary>
小数
</summary>
</member>
</member>
<member
name=
"F:Performance.DtoModels.DataFormat.小数1"
>
<summary>
小数
</summary>
</member>
<member
name=
"F:Performance.DtoModels.DataFormat.整数"
>
<summary>
整数
</summary>
</member>
<member
name=
"F:Performance.DtoModels.DataFormat.货币"
>
<member
name=
"F:Performance.DtoModels.DataFormat.货币"
>
<summary>
货币
</summary>
<summary>
货币
</summary>
</member>
</member>
...
@@ -3755,6 +3761,56 @@
...
@@ -3755,6 +3761,56 @@
绩效系数
绩效系数
</summary>
</summary>
</member>
</member>
<member
name=
"T:Performance.DtoModels.Second.ComputeMode"
>
<summary>
二次分配计算方式
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.ComputeMode.NotCalculate"
>
<summary>
不计算
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.ComputeMode.Horizontal"
>
<summary>
横向计算
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.ComputeMode.Vertical"
>
<summary>
纵向计算
</summary>
</member>
<member
name=
"T:Performance.DtoModels.Second.OverrideMode"
>
<summary>
人员带出方式 已保存,上次,字典,测算表
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.OverrideMode.Initial"
>
<summary>
初始化(用户保存后的数据)
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.OverrideMode.PrevSecondAllot"
>
<summary>
上一个二次绩效记录
</summary>
</member>
<member
name=
"F:Performance.DtoModels.Second.OverrideMode.EmployeeDict"
>
<summary>
人员字典
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondLoadDto.ComputeMode"
>
<summary>
计算方式:1 不计算 2 横向计算 3 纵向计算
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondLoadDto.OverrideMode"
>
<summary>
数据加载方式:0 保存,1 上次,2 字典,3 测算表
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SelectionOptions.SelectionID"
>
<member
name=
"P:Performance.DtoModels.SelectionOptions.SelectionID"
>
<summary>
<summary>
ID
ID
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
65b03bc5
...
@@ -474,19 +474,9 @@
...
@@ -474,19 +474,9 @@
职称绩效
职称绩效
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.
ManagementAllow
ance"
>
<member
name=
"P:Performance.EntityModels.ag_bodysource.
WorkPerform
ance"
>
<summary>
<summary>
管理津贴
工作量绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.IndividualReward"
>
<summary>
单项奖励
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.AllocationOfKeySpecialty"
>
<summary>
重点专科分配
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_bodysource.DeptReward"
>
<member
name=
"P:Performance.EntityModels.ag_bodysource.DeptReward"
>
...
@@ -936,12 +926,12 @@
...
@@ -936,12 +926,12 @@
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_headsource.TheTotalAllocationOfPerformanceResults"
>
<member
name=
"P:Performance.EntityModels.ag_headsource.TheTotalAllocationOfPerformanceResults"
>
<summary>
<summary>
科室单项奖励
业绩分配绩效总额
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_headsource.
BasisPerformance
"
>
<member
name=
"P:Performance.EntityModels.ag_headsource.
TotalDeptReward
"
>
<summary>
<summary>
业绩分配绩效总额
科室单项奖励
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance"
>
<member
name=
"P:Performance.EntityModels.ag_headsource.SeniorityTitlesAccountedPerformance"
>
...
...
performance/Performance.DtoModels/Enum.cs
View file @
65b03bc5
...
@@ -99,6 +99,10 @@ public enum DataFormat
...
@@ -99,6 +99,10 @@ public enum DataFormat
普通格式
,
普通格式
,
/// <summary> 小数 </summary>
/// <summary> 小数 </summary>
小数
,
小数
,
/// <summary> 小数 </summary>
小数
1
,
/// <summary> 整数 </summary>
整数
,
/// <summary> 货币 </summary>
/// <summary> 货币 </summary>
货币
,
货币
,
/// <summary> 百分比 </summary>
/// <summary> 百分比 </summary>
...
...
performance/Performance.DtoModels/HandsonTable.cs
View file @
65b03bc5
...
@@ -12,12 +12,12 @@ public HandsonTableBase()
...
@@ -12,12 +12,12 @@ public HandsonTableBase()
{
{
ColHeaders
=
new
List
<
string
>();
ColHeaders
=
new
List
<
string
>();
Columns
=
new
List
<
HandsonColumn
>();
Columns
=
new
List
<
HandsonColumn
>();
Data
=
new
List
<
Dictionary
<
string
,
string
>>();
Data
=
new
List
<
Dictionary
<
string
,
object
>>();
NestedHeadersArray
=
new
List
<
List
<
string
>>();
NestedHeadersArray
=
new
List
<
List
<
string
>>();
}
}
public
List
<
string
>
ColHeaders
{
get
;
set
;
}
public
List
<
string
>
ColHeaders
{
get
;
set
;
}
public
List
<
Dictionary
<
string
,
string
>>
Data
{
get
;
set
;
}
public
List
<
Dictionary
<
string
,
object
>>
Data
{
get
;
set
;
}
public
List
<
HandsonColumn
>
Columns
{
get
;
set
;
}
public
List
<
HandsonColumn
>
Columns
{
get
;
set
;
}
public
List
<
List
<
string
>>
NestedHeadersArray
{
get
;
set
;
}
public
List
<
List
<
string
>>
NestedHeadersArray
{
get
;
set
;
}
}
}
...
@@ -95,9 +95,9 @@ private void InitColumns(List<collect_permission> permissions)
...
@@ -95,9 +95,9 @@ private void InitColumns(List<collect_permission> permissions)
Columns
=
columns
;
Columns
=
columns
;
}
}
private
Dictionary
<
string
,
string
>
CreateDataRow
(
string
key
,
string
value
)
private
Dictionary
<
string
,
object
>
CreateDataRow
(
string
key
,
string
value
)
{
{
var
temp
=
new
Dictionary
<
string
,
string
>()
{
{
key
,
value
}
};
var
temp
=
new
Dictionary
<
string
,
object
>()
{
{
key
,
value
}
};
foreach
(
var
item
in
ColHeaders
)
foreach
(
var
item
in
ColHeaders
)
{
{
if
(!
temp
.
ContainsKey
(
item
))
if
(!
temp
.
ContainsKey
(
item
))
...
@@ -125,6 +125,16 @@ public HandsonColumn(string data, bool readOnly = false, DataFormat format = Dat
...
@@ -125,6 +125,16 @@ public HandsonColumn(string data, bool readOnly = false, DataFormat format = Dat
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00.00"
};
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00.00"
};
break
;
break
;
case
DataFormat
.
小数
1
:
Type
=
"numeric"
;
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00.0"
};
break
;
case
DataFormat
.
整数
:
Type
=
"numeric"
;
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00"
};
break
;
case
DataFormat
.
百分比
:
case
DataFormat
.
百分比
:
Type
=
"numeric"
;
Type
=
"numeric"
;
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00.00%"
};
NumericFormat
=
new
NumericFormat
{
Pattern
=
"0,00.00%"
};
...
...
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
View file @
65b03bc5
...
@@ -5,14 +5,6 @@
...
@@ -5,14 +5,6 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
SecondLoadRequest
{
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 计算方式:1 不计算 2 横向计算 3 纵向计算
/// </summary>
public
int
ComputeMode
{
get
;
set
;
}
}
public
class
SecondEmployeeRequest
public
class
SecondEmployeeRequest
{
{
public
string
EmployeeName
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/ResponseType.cs
View file @
65b03bc5
...
@@ -14,5 +14,6 @@ public enum ResponseType
...
@@ -14,5 +14,6 @@ public enum ResponseType
ParameterError
=
6
,
ParameterError
=
6
,
Disable
=
7
,
Disable
=
7
,
TooManyRequests
=
8
,
TooManyRequests
=
8
,
Warning
=
9
,
}
}
}
}
performance/Performance.DtoModels/Second/Constant.cs
0 → 100644
View file @
65b03bc5
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels.Second
{
/// <summary>
/// 二次分配计算方式
/// </summary>
public
enum
ComputeMode
{
/// <summary>
/// 不计算
/// </summary>
NotCalculate
=
1
,
/// <summary>
/// 横向计算
/// </summary>
Horizontal
=
2
,
/// <summary>
/// 纵向计算
/// </summary>
Vertical
=
3
,
}
/// <summary>
/// 人员带出方式 已保存,上次,字典,测算表
/// </summary>
public
enum
OverrideMode
{
/// <summary>
/// 初始化(用户保存后的数据)
/// </summary>
Initial
=
0
,
/// <summary>
/// 上一个二次绩效记录
/// </summary>
PrevSecondAllot
=
1
,
/// <summary>
/// 人员字典
/// </summary>
EmployeeDict
=
2
,
}
}
performance/Performance.DtoModels/Second/SecondColumnDictionary.cs
0 → 100644
View file @
65b03bc5
namespace
Performance.DtoModels
{
public
class
SecondColumnDictionary
{
public
string
Label
{
get
;
set
;
}
public
string
Key
{
get
;
set
;
}
public
bool
IsTrue
{
get
;
set
;
}
public
int
Sort
{
get
;
set
;
}
public
SecondColumnDictionary
()
{
}
public
SecondColumnDictionary
(
string
label
,
string
key
,
bool
isTrue
,
int
sort
)
{
Label
=
label
;
Key
=
key
;
IsTrue
=
isTrue
;
Sort
=
sort
;
}
}
}
performance/Performance.DtoModels/Second/SecondComputeCheckResultDto.cs
0 → 100644
View file @
65b03bc5
namespace
Performance.DtoModels
{
public
class
SecondComputeCheckResultDto
{
public
SecondComputeCheckResultDto
(
string
level
,
string
personnelNumber
,
string
personnelName
,
string
message
)
{
Level
=
level
;
PersonnelNumber
=
personnelNumber
;
PersonnelName
=
personnelName
;
Message
=
message
;
}
public
string
Level
{
get
;
set
;
}
public
string
PersonnelNumber
{
get
;
set
;
}
public
string
PersonnelName
{
get
;
set
;
}
public
string
Message
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Second/SecondComputeDto.cs
0 → 100644
View file @
65b03bc5
using
System.Collections.Generic
;
namespace
Performance.DtoModels
{
public
class
SecondComputeDto
:
SecondLoadDto
{
public
Dictionary
<
string
,
object
>
Head
{
get
;
set
;
}
public
List
<
Dictionary
<
string
,
object
>>
Body
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Second/SecondDetailDto.cs
0 → 100644
View file @
65b03bc5
using
System.Collections.Generic
;
namespace
Performance.DtoModels
{
public
class
SecondDetailDto
{
public
object
Head
{
get
;
set
;
}
public
HandsonTableBase
Body
{
get
;
set
;
}
public
List
<
SecondColumnDictionary
>
Dic
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Second/SecondLoadDto.cs
0 → 100644
View file @
65b03bc5
namespace
Performance.DtoModels
{
public
class
SecondLoadDto
{
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 计算方式:1 不计算 2 横向计算 3 纵向计算
/// </summary>
public
int
ComputeMode
{
get
;
set
;
}
/// <summary>
/// 数据加载方式:0 保存,1 上次,2 字典,3 测算表
/// </summary>
public
int
OverrideMode
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Second/SecondWorkLoadDto.cs
0 → 100644
View file @
65b03bc5
using
System
;
using
System.Collections.Generic
;
namespace
Performance.DtoModels
{
public
class
SecondWorkLoadDto
{
public
SecondWorkLoadDto
(
string
name
)
{
Name
=
name
;
Unit_Price
=
0
m
;
Items
=
new
List
<
string
>();
AssessmentScore
=
$"AssessmentScore_
{
Name
}
"
;
WorkPerformance
=
$"WorkPerformance_
{
Name
}
"
;
WorkloadScore
=
$"WorkloadScore_
{
Name
}
"
;
}
public
string
AssessmentScore
{
get
;
set
;
}
public
string
WorkPerformance
{
get
;
set
;
}
public
string
WorkloadScore
{
get
;
set
;
}
public
decimal
Unit_Price
{
get
;
set
;
}
public
List
<
string
>
Items
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
void
AddItem
(
string
name
)
{
if
(!
Items
.
Contains
(
name
))
Items
.
Add
(
name
);
}
}
}
performance/Performance.EntityModels/Entity/ag_bodysource.cs
View file @
65b03bc5
...
@@ -77,19 +77,24 @@ public class ag_bodysource
...
@@ -77,19 +77,24 @@ public class ag_bodysource
public
Nullable
<
decimal
>
TitlePerformance
{
get
;
set
;
}
public
Nullable
<
decimal
>
TitlePerformance
{
get
;
set
;
}
/// <summary>
/// <summary>
///
管理津贴
///
工作量绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
ManagementAllow
ance
{
get
;
set
;
}
public
Nullable
<
decimal
>
WorkPerform
ance
{
get
;
set
;
}
/// <summary>
///
//
<summary>
///
单项奖励
///
// 管理津贴
/// </summary>
///
//
</summary>
public
Nullable
<
decimal
>
IndividualReward
{
get
;
set
;
}
//public Nullable<decimal> ManagementAllowance
{ get; set; }
/// <summary>
///// <summary>
/// 重点专科分配
///// 单项奖励
/// </summary>
///// </summary>
public
Nullable
<
decimal
>
AllocationOfKeySpecialty
{
get
;
set
;
}
//public Nullable<decimal> IndividualReward { get; set; }
///// <summary>
///// 重点专科分配
///// </summary>
//public Nullable<decimal> AllocationOfKeySpecialty { get; set; }
/// <summary>
/// <summary>
/// 科室单项奖励
/// 科室单项奖励
...
...
performance/Performance.EntityModels/Entity/ag_headsource.cs
View file @
65b03bc5
...
@@ -52,14 +52,19 @@ public class ag_headsource
...
@@ -52,14 +52,19 @@ public class ag_headsource
public
Nullable
<
decimal
>
DirectorBasisPerformance
{
get
;
set
;
}
public
Nullable
<
decimal
>
DirectorBasisPerformance
{
get
;
set
;
}
/// <summary>
/// <summary>
///
科室单项奖励
///
业绩分配绩效总额
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
TheTotalAllocationOfPerformanceResults
{
get
;
set
;
}
public
Nullable
<
decimal
>
TheTotalAllocationOfPerformanceResults
{
get
;
set
;
}
/// <summary>
/// <summary>
///
业绩分配绩效总额
///
科室单项奖励
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
BasisPerformance
{
get
;
set
;
}
public
Nullable
<
decimal
>
TotalDeptReward
{
get
;
set
;
}
///// <summary>
///// 业绩分配绩效总额
///// </summary>
//public Nullable<decimal> BasisPerformance { get; set; }
/// <summary>
/// <summary>
/// 年资职称绩效占比
/// 年资职称绩效占比
...
...
performance/Performance.Infrastructure/Extensions/Extensions.Dictionary.cs
View file @
65b03bc5
...
@@ -18,9 +18,9 @@ public static partial class UtilExtensions
...
@@ -18,9 +18,9 @@ public static partial class UtilExtensions
/// <returns></returns>
/// <returns></returns>
public
static
T
GetValue
<
T
>(
this
Dictionary
<
string
,
object
>
keyValues
,
string
key
,
T
defaultValue
=
default
(
T
))
public
static
T
GetValue
<
T
>(
this
Dictionary
<
string
,
object
>
keyValues
,
string
key
,
T
defaultValue
=
default
(
T
))
{
{
object
value
;
var
pair
=
keyValues
.
FirstOrDefault
(
w
=>
w
.
Key
.
Equals
(
key
,
StringComparison
.
OrdinalIgnoreCase
))
;
if
(
keyValues
.
TryGetValue
(
key
,
out
value
))
if
(
!
default
(
KeyValuePair
<
string
,
object
>).
Equals
(
pair
))
return
ConvertHelper
.
To
<
T
>(
v
alue
,
defaultValue
);
return
ConvertHelper
.
To
<
T
>(
pair
.
V
alue
,
defaultValue
);
return
defaultValue
;
return
defaultValue
;
}
}
...
@@ -33,13 +33,29 @@ public static T GetValue<T>(this Dictionary<string, object> keyValues, string ke
...
@@ -33,13 +33,29 @@ public static T GetValue<T>(this Dictionary<string, object> keyValues, string ke
/// <returns></returns>
/// <returns></returns>
public
static
T
GetValue
<
T
>(
this
SortedDictionary
<
string
,
object
>
keyValues
,
string
key
,
T
defaultValue
=
default
(
T
))
public
static
T
GetValue
<
T
>(
this
SortedDictionary
<
string
,
object
>
keyValues
,
string
key
,
T
defaultValue
=
default
(
T
))
{
{
object
value
;
var
pair
=
keyValues
.
FirstOrDefault
(
w
=>
w
.
Key
.
Equals
(
key
,
StringComparison
.
OrdinalIgnoreCase
))
;
if
(
keyValues
.
TryGetValue
(
key
,
out
value
))
if
(
!
default
(
KeyValuePair
<
string
,
object
>).
Equals
(
pair
))
return
ConvertHelper
.
To
<
T
>(
v
alue
,
defaultValue
);
return
ConvertHelper
.
To
<
T
>(
pair
.
V
alue
,
defaultValue
);
return
defaultValue
;
return
defaultValue
;
}
}
/// <summary>
/// <summary>
/// 添加或修改
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="keyValues"></param>
/// <param name="key"></param>
/// <returns></returns>
public
static
void
AddOrUpdate
(
this
Dictionary
<
string
,
object
>
keyValues
,
string
key
,
object
value
)
{
var
pair
=
keyValues
.
FirstOrDefault
(
w
=>
w
.
Key
.
Equals
(
key
,
StringComparison
.
OrdinalIgnoreCase
));
if
(
default
(
KeyValuePair
<
string
,
object
>).
Equals
(
pair
))
keyValues
.
Add
(
key
,
value
);
else
keyValues
[
key
]
=
value
;
}
/// <summary>
/// form 转换 键值对
/// form 转换 键值对
/// </summary>
/// </summary>
/// <param name="pairs"></param>
/// <param name="pairs"></param>
...
...
performance/Performance.Infrastructure/Extensions/Extensions.String.cs
View file @
65b03bc5
...
@@ -26,5 +26,27 @@ public static string[] SplitRemoveEmpty(this string text, params string[] separa
...
@@ -26,5 +26,27 @@ public static string[] SplitRemoveEmpty(this string text, params string[] separa
{
{
return
text
.
Split
(
separator
,
StringSplitOptions
.
RemoveEmptyEntries
);
return
text
.
Split
(
separator
,
StringSplitOptions
.
RemoveEmptyEntries
);
}
}
/// <summary>
/// 确定此字符串实例的开头是否与指定的匹配 忽略字母的大小写
/// </summary>
/// <param name="text"></param>
/// <param name="value"></param>
/// <returns></returns>
public
static
bool
StartsWithIgnoreCase
(
this
string
text
,
string
value
)
{
return
text
.
StartsWith
(
value
,
StringComparison
.
OrdinalIgnoreCase
);
}
/// <summary>
/// 确定此字符串是否与指定的字符串对象具有相同的值 忽略字母的大小写
/// </summary>
/// <param name="text"></param>
/// <param name="value"></param>
/// <returns></returns>
public
static
bool
EqualsIgnoreCase
(
this
string
text
,
string
value
)
{
return
text
.
Equals
(
value
,
StringComparison
.
OrdinalIgnoreCase
);
}
}
}
}
}
performance/Performance.Repository/PerforPerapramounthideRepository.cs
View file @
65b03bc5
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
namespace
Performance.Repository
namespace
Performance.Repository
{
{
/// <summary>
/// <summary>
/// per_apr_amount Repository
/// per_apr_amount
_hide
Repository
/// </summary>
/// </summary>
public
partial
class
PerforPerapramounthideRepository
:
PerforRepository
<
per_apr_amount_hide
>
public
partial
class
PerforPerapramounthideRepository
:
PerforRepository
<
per_apr_amount_hide
>
{
{
...
...
performance/Performance.Services/PersonService.cs
View file @
65b03bc5
...
@@ -208,7 +208,7 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
...
@@ -208,7 +208,7 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
{
{
exp
=
exp
.
And
(
t
=>
true
&&
(
t
.
AccountingUnit
.
Contains
(
request
.
SearchQuery
)
||
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
Department
.
Contains
(
request
.
SearchQuery
)));
exp
=
exp
.
And
(
t
=>
true
&&
(
t
.
AccountingUnit
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
)
||
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
Department
.
Contains
(
request
.
SearchQuery
)));
}
}
var
result
=
new
List
<
per_employee
>();
var
result
=
new
List
<
per_employee
>();
...
...
performance/Performance.Services/RedistributionService.cs
View file @
65b03bc5
This diff is collapsed.
Click to expand it.
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
65b03bc5
...
@@ -923,7 +923,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
...
@@ -923,7 +923,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
/// <param name="hospitalId"></param>
/// <param name="hospitalId"></param>
/// <param name="secondAllot"></param>
/// <param name="secondAllot"></param>
/// <returns></returns>
/// <returns></returns>
p
rivate
ag_secondallot
GetPreviousSecondAllot
(
int
hospitalId
,
ag_secondallot
secondAllot
)
p
ublic
ag_secondallot
GetPreviousSecondAllot
(
int
hospitalId
,
ag_secondallot
secondAllot
)
{
{
// 历史删除绩效时,未删除对应的二次绩效记录
// 历史删除绩效时,未删除对应的二次绩效记录
var
allotList
=
perallotRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)?.
OrderBy
(
s
=>
s
.
Year
).
ThenBy
(
s
=>
s
.
Month
).
ToList
();
var
allotList
=
perallotRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)?.
OrderBy
(
s
=>
s
.
Year
).
ThenBy
(
s
=>
s
.
Month
).
ToList
();
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
65b03bc5
...
@@ -1605,7 +1605,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
...
@@ -1605,7 +1605,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
}
else
if
(
new
int
[]
{
9
,
10
}.
Contains
(
temp
.
UseTempId
.
Value
))
else
/*if (new int[] { 9, 10 }.Contains(temp.UseTempId.Value))*/
{
{
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
...
@@ -1803,7 +1803,7 @@ public bool NursingDeptAudit(int userId, SecondAuditRequest request)
...
@@ -1803,7 +1803,7 @@ public bool NursingDeptAudit(int userId, SecondAuditRequest request)
/// </summary>
/// </summary>
/// <param name="secondId">二次绩效Id</param>
/// <param name="secondId">二次绩效Id</param>
/// <returns></returns>
/// <returns></returns>
public
ag_secondallot
GetSecond
a
llot
(
int
secondId
)
public
ag_secondallot
GetSecond
A
llot
(
int
secondId
)
{
{
return
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
return
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
}
}
...
...
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