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
7aee75fa
Commit
7aee75fa
authored
May 23, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效单例奖励 列头增加
parent
b76517c4
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
184 additions
and
15 deletions
+184
-15
performance/Performance.Api/Controllers/SecondAllotController.cs
+13
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+23
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+15
-0
performance/Performance.DtoModels/Enum.cs
+16
-0
performance/Performance.DtoModels/Request/WorkloadRequest.cs
+7
-0
performance/Performance.DtoModels/Response/SecondResponse.cs
+2
-0
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
+5
-0
performance/Performance.EntityModels/Entity/ag_tempitem.cs
+15
-10
performance/Performance.EntityModels/Entity/ag_workload.cs
+5
-0
performance/Performance.Services/SecondAllotService.cs
+77
-5
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
7aee75fa
...
...
@@ -216,6 +216,19 @@ public ApiResponse WorkloadDelete([CustomizeValidator(RuleSet = "Delete"), FromB
var
result
=
secondAllotService
.
WorkloadDelete
(
request
.
Id
);
return
new
ApiResponse
(
result
?
ResponseType
.
OK
:
ResponseType
.
Fail
);
}
/// <summary>
/// 二次绩效工作量列表
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/single/list"
)]
[
HttpPost
]
public
ApiResponse
SingleAwards
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
WorkloadRequest
request
)
{
var
result
=
secondAllotService
.
GetSingleList
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
#
endregion
#
region
二次绩效审核
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
7aee75fa
...
...
@@ -826,6 +826,12 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SingleAwards(Performance.DtoModels.WorkloadRequest)"
>
<summary>
二次绩效工作量列表
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SubmitAudit(Performance.DtoModels.SubmitAuditRequest)"
>
<summary>
提交审核
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
7aee75fa
...
...
@@ -143,6 +143,21 @@
<member
name=
"F:Performance.DtoModels.AllotStates.GenerateAccomplish"
>
<summary>
绩效结果解析成功
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.Workload"
>
<summary>
工作量
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.Other"
>
<summary>
其他
</summary>
</member>
<member
name=
"F:Performance.DtoModels.AgWorkloadType.SingleAwards"
>
<summary>
单项奖励
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerAgainData.RowNumber"
>
<summary>
行号
...
...
@@ -1955,6 +1970,11 @@
</summary>
</member>
<member
name=
"P:Performance.DtoModels.WorkloadRequest.Type"
>
<summary>
1、工作量 2、其他
</summary>
</member>
<member
name=
"P:Performance.DtoModels.WorkyearRequest.MaxRange"
>
<summary>
最大工龄范围(小于)
...
...
@@ -2727,6 +2747,9 @@
<member
name=
"P:Performance.DtoModels.HeadItem.IsBring"
>
<summary>
1 带出历史数据 2不带出
</summary>
</member>
<member
name=
"P:Performance.DtoModels.HeadItem.SpecialAttr"
>
<summary>
1 value相加值为1
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondTempResponse.TempName"
>
<summary>
模板名称
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
7aee75fa
...
...
@@ -557,6 +557,11 @@
1 自动带出 2 计算得出
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.SpecialAttr"
>
<summary>
1 value相加值为1
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_header"
>
<summary>
二次分配不固定列头数据
...
...
@@ -832,6 +837,11 @@
1 带出历史数据 2不带出
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_tempitem.SpecialAttr"
>
<summary>
1 value相加值为1
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_usetemp"
>
<summary>
...
...
@@ -907,6 +917,11 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_workload.Type"
>
<summary>
1、工作量 2、其他
</summary>
</member>
<member
name=
"T:Performance.EntityModels.as_assess"
>
<summary>
考核类别
...
...
performance/Performance.DtoModels/Enum.cs
View file @
7aee75fa
...
...
@@ -81,4 +81,20 @@ public enum AllotStates
[
Description
(
"数据验证通过"
)]
GenerateAccomplish
=
10
,
}
public
enum
AgWorkloadType
{
/// <summary>
/// 工作量
/// </summary>
Workload
=
1
,
/// <summary>
/// 其他
/// </summary>
Other
=
2
,
/// <summary>
/// 单项奖励
/// </summary>
SingleAwards
=
3
,
}
}
performance/Performance.DtoModels/Request/WorkloadRequest.cs
View file @
7aee75fa
...
...
@@ -41,6 +41,11 @@ public class WorkloadRequest
///
/// </summary>
public
Nullable
<
decimal
>
Sort
{
get
;
set
;
}
/// <summary>
/// 1、工作量 2、其他
/// </summary>
public
int
Type
{
get
;
set
;
}
}
public
class
WorkloadRequestValidator
:
AbstractValidator
<
WorkloadRequest
>
{
...
...
@@ -52,6 +57,7 @@ public WorkloadRequestValidator()
RuleFor
(
x
=>
x
.
Department
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
UnitType
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
ItemName
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
Type
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Update"
,
()
=>
...
...
@@ -59,6 +65,7 @@ public WorkloadRequestValidator()
RuleFor
(
x
=>
x
.
Id
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
HospitalId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
ItemName
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
Type
).
NotNull
().
GreaterThan
(
0
);
});
RuleSet
(
"Delete"
,
()
=>
...
...
performance/Performance.DtoModels/Response/SecondResponse.cs
View file @
7aee75fa
...
...
@@ -20,6 +20,8 @@ public class HeadItem
public
int
SourceType
{
get
;
set
;
}
/// <summary> 1 带出历史数据 2不带出 </summary>
public
Nullable
<
int
>
IsBring
{
get
;
set
;
}
/// <summary> 1 value相加值为1 </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
}
public
class
BodyItem
:
HeadItem
...
...
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
View file @
7aee75fa
...
...
@@ -70,5 +70,10 @@ public class ag_fixatitem
/// 1 自动带出 2 计算得出
/// </summary>
public
Nullable
<
int
>
SourceType
{
get
;
set
;
}
/// <summary>
/// 1 value相加值为1
/// </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_tempitem.cs
View file @
7aee75fa
...
...
@@ -7,53 +7,58 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效模板项
/// </summary>
[
Table
(
"ag_tempitem"
)]
public
class
ag_tempitem
public
class
ag_tempitem
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 模板ID
/// </summary>
public
Nullable
<
int
>
TempId
{
get
;
set
;
}
/// <summary>
/// 字段ID
/// </summary>
public
string
FiledId
{
get
;
set
;
}
/// <summary>
/// 字段名称
/// </summary>
public
string
FiledName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
decimal
>
Sort
{
get
;
set
;
}
/// <summary>
/// 字段类型 1 顶部概况 2 表格固定
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 1 自动带出 2 计算得出
/// </summary>
public
Nullable
<
int
>
SourceType
{
get
;
set
;
}
/// <summary>
/// 1 带出历史数据 2不带出
/// </summary>
public
Nullable
<
int
>
IsBring
{
get
;
set
;
}
/// <summary>
/// 1 value相加值为1
/// </summary>
public
Nullable
<
int
>
SpecialAttr
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_workload.cs
View file @
7aee75fa
...
...
@@ -55,5 +55,10 @@ public class ag_workload
///
/// </summary>
public
Nullable
<
decimal
>
Sort
{
get
;
set
;
}
/// <summary>
/// 1、工作量 2、其他
/// </summary>
public
int
Type
{
get
;
set
;
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
7aee75fa
...
...
@@ -300,6 +300,9 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
//检验 二次绩效配置 数据是否 有值,无则补充带出
FillData
(
second
,
result
.
BodyItems
);
SupplyHeaderByWorkItem
(
request
,
result
);
return
new
SecondResponse
{
HeadItems
=
result
.
HeadItems
.
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
Sort
).
ThenBy
(
t
=>
t
.
FiledName
).
ToList
(),
...
...
@@ -352,7 +355,8 @@ private List<BodyItem> GetBodyItems(List<ag_fixatitem> fixatitems, List<HeadItem
SourceType
=
t
.
SourceType
??
0
,
Type
=
t
.
Type
??
0
,
Value
=
t
.
ItemValue
,
Sort
=
t
.
Sort
??
0
Sort
=
t
.
Sort
??
0
,
SpecialAttr
=
t
.
SpecialAttr
??
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
ItemName
&&
h
.
Type
==
t
.
Type
)?.
SpecialAttr
,
}).
ToList
();
}
// 删除多余的headvalue
...
...
@@ -360,8 +364,6 @@ private List<BodyItem> GetBodyItems(List<ag_fixatitem> fixatitems, List<HeadItem
return
bodyItems
;
}
/// <summary>
/// 补充须带出的历史数据,如姓名、职称等
/// </summary>
...
...
@@ -418,6 +420,58 @@ private void FillData(ag_secondallot second, List<BodyItem> bodyItems)
bodyItems
.
FirstOrDefault
(
t
=>
t
.
FiledName
==
item
.
Key
).
Value
=
item
.
Value
;
}
}
/// <summary>
/// 根绝添加工作量类型判断是否添加
/// </summary>
/// <param name="request"></param>
/// <param name="result"></param>
private
void
SupplyHeaderByWorkItem
(
UseTempRequest
request
,
SecondResponse
result
)
{
var
workitem
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
Type
!=
1
);
if
(
workitem
==
null
||
!
workitem
.
Any
(
t
=>
t
.
Id
>
0
))
return
;
//不包含工作量绩效
if
(!
result
.
HeadItems
.
Select
(
t
=>
t
.
FiledId
).
Contains
(
"PerformanceShareTheWorkload"
))
return
;
var
maxSortValue
=
result
.
HeadItems
.
Where
(
t
=>
t
.
Type
==
1
).
Max
(
t
=>
t
.
Sort
);
var
headers
=
new
HeadItem
[]
{
new
HeadItem
{
FiledId
=
"PerformanceShareTheDepartment"
,
FiledName
=
"门诊绩效占比"
,
Sort
=
maxSortValue
+
1
,
Type
=
1
,
SourceType
=
1
,
IsBring
=
2
,
SpecialAttr
=
1
,
},
new
HeadItem
{
FiledId
=
"PerformanceDepartmentDistributionAmount"
,
FiledName
=
"门诊绩效金额"
,
Sort
=
maxSortValue
+
2
,
Type
=
1
,
SourceType
=
1
,
IsBring
=
2
}
};
var
rownumber
=
result
.
BodyItems
.
Any
(
t
=>
t
.
RowNumber
==
-
1
)
?
-
1
:
0
;
foreach
(
var
item
in
headers
)
{
if
(!
result
.
HeadItems
.
Select
(
t
=>
t
.
FiledId
).
Contains
(
item
.
FiledId
))
{
result
.
HeadItems
.
Add
(
item
);
var
body
=
Mapper
.
Map
<
BodyItem
>(
item
);
body
.
RowNumber
=
rownumber
;
result
.
BodyItems
.
Add
(
body
);
}
}
}
#
endregion
/// <summary>
...
...
@@ -442,6 +496,7 @@ public bool SaveValue(List<ag_fixatitem> request)
cellItem
.
SourceType
=
item
.
SourceType
;
cellItem
.
Type
=
item
.
Type
;
cellItem
.
UnitType
=
item
.
UnitType
;
cellItem
.
SpecialAttr
=
item
.
SpecialAttr
;
perforAgfixatitemRepository
.
Update
(
cellItem
);
}
else
...
...
@@ -690,7 +745,8 @@ public void RefreshTemp(UseTempRequest request)
/// <returns></returns>
public
List
<
ag_workload
>
GetWorkloadList
(
WorkloadRequest
request
)
{
return
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
return
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
}
/// <summary>
...
...
@@ -711,6 +767,7 @@ public bool WorkloadAdd(WorkloadRequest request)
FactorValue
=
request
.
FactorValue
??
1
,
ItemName
=
request
.
ItemName
,
Sort
=
request
.
Sort
??
1
,
Type
=
request
.
Type
,
};
var
result
=
perforAgworkloadRepository
.
Add
(
workload
);
if
(
result
)
...
...
@@ -741,6 +798,7 @@ public bool WorkloadUpdate(WorkloadRequest request)
workload
.
ItemName
=
request
.
ItemName
;
workload
.
Sort
=
request
.
Sort
;
workload
.
ItemId
=
$"Feild
{
workload
.
Id
}
"
;
workload
.
Type
=
request
.
Type
;
return
perforAgworkloadRepository
.
Update
(
workload
);
}
...
...
@@ -756,6 +814,16 @@ public bool WorkloadDelete(int id)
return
perforAgworkloadRepository
.
Remove
(
workload
);
}
/// <summary>
/// 获取工作量列表
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
List
<
ag_workload
>
GetSingleList
(
WorkloadRequest
request
)
{
return
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
Type
==
(
int
)
AgWorkloadType
.
SingleAwards
);
}
#
endregion
#
region
二次绩效考核
...
...
@@ -948,9 +1016,13 @@ public List<HeadItem> GetHeadItems(int tempId, int hospitalId, string department
var
workItem
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
department
&&
t
.
UnitType
==
unitType
);
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
{
var
workDtos
=
Mapper
.
Map
<
List
<
HeadItem
>>(
workItem
);
var
workDtos
=
Mapper
.
Map
<
List
<
HeadItem
>>(
workItem
.
Where
(
t
=>
t
.
Type
!=
(
int
)
AgWorkloadType
.
SingleAwards
)
);
workDtos
.
ForEach
(
t
=>
{
t
.
Type
=
3
;
});
headItems
.
AddRange
(
workDtos
);
workDtos
=
Mapper
.
Map
<
List
<
HeadItem
>>(
workItem
.
Where
(
t
=>
t
.
Type
==
(
int
)
AgWorkloadType
.
SingleAwards
));
workDtos
.
ForEach
(
t
=>
{
t
.
Type
=
4
;
});
headItems
.
AddRange
(
workDtos
);
}
return
headItems
;
}
...
...
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