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
2fae4424
Commit
2fae4424
authored
May 27, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全院核算绩效发放列表、管理绩效、二次绩效分配结果接口
parent
418ad81a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
276 additions
and
2 deletions
+276
-2
performance/Performance.Api/Controllers/ComputeController.cs
+32
-0
performance/Performance.Api/Controllers/SecondAllotController.cs
+13
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+20
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+35
-0
performance/Performance.DtoModels/Response/DeptResponse.cs
+5
-0
performance/Performance.DtoModels/Response/SecPrintResponse.cs
+36
-0
performance/Performance.Services/ComputeService.cs
+101
-1
performance/Performance.Services/SecondAllotService.cs
+34
-1
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
2fae4424
...
@@ -111,6 +111,22 @@ public ApiResponse<List<DeptResponse>> GetOther([FromBody]ComputerRequest reques
...
@@ -111,6 +111,22 @@ public ApiResponse<List<DeptResponse>> GetOther([FromBody]ComputerRequest reques
}
}
/// <summary>
/// <summary>
/// 返回院领导、中层、工勤组绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"gethosdata"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
DeptResponse
>>
GetAdminPerformance
([
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
GetAdminPerformance
(
request
.
AllotId
);
return
new
ApiResponse
<
List
<
DeptResponse
>>(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 科室绩效详情
/// 科室绩效详情
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
...
@@ -153,6 +169,22 @@ public ApiResponse AllCompute([FromBody]ComputerRequest request)
...
@@ -153,6 +169,22 @@ public ApiResponse AllCompute([FromBody]ComputerRequest request)
}
}
/// <summary>
/// <summary>
/// 获取全院管理绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allcompute/management"
)]
[
HttpPost
]
public
ApiResponse
AllManageCompute
([
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
AllManageCompute
(
request
.
AllotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 修改实发绩效
/// 修改实发绩效
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
...
...
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
2fae4424
...
@@ -291,5 +291,17 @@ public ApiResponse OtherSave([FromBody]AgOtherRequest request)
...
@@ -291,5 +291,17 @@ public ApiResponse OtherSave([FromBody]AgOtherRequest request)
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
#
endregion
#
endregion
/// <summary>
/// 二次绩效结果打印
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/print/{secondid}"
)]
[
HttpPost
]
public
ApiResponse
SecondPrint
(
int
secondid
)
{
var
result
=
secondAllotService
.
Print
(
secondid
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
}
}
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
2fae4424
...
@@ -292,6 +292,13 @@
...
@@ -292,6 +292,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetAdminPerformance(Performance.DtoModels.ComputerRequest)"
>
<summary>
返回院领导、中层、工勤组绩效
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.DeptDetail(Performance.DtoModels.DeptDetailRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.DeptDetail(Performance.DtoModels.DeptDetailRequest)"
>
<summary>
<summary>
科室绩效详情
科室绩效详情
...
@@ -306,6 +313,13 @@
...
@@ -306,6 +313,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.AllManageCompute(Performance.DtoModels.ComputerRequest)"
>
<summary>
获取全院管理绩效列表
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.UpdateRealfee(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.UpdateRealfee(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
修改实发绩效
修改实发绩效
...
@@ -857,6 +871,12 @@
...
@@ -857,6 +871,12 @@
</summary>
</summary>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.SecondPrint(System.Int32)"
>
<summary>
二次绩效结果打印
</summary>
<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 @
2fae4424
...
@@ -2401,6 +2401,11 @@
...
@@ -2401,6 +2401,11 @@
考核对分率
考核对分率
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.ScoringPerfor"
>
<summary>
考核后绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AdjustFactor"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.AdjustFactor"
>
<summary>
<summary>
调节系数
调节系数
...
@@ -2737,6 +2742,36 @@
...
@@ -2737,6 +2742,36 @@
类型
类型
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.JobNumber"
>
<summary>
工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.PersonName"
>
<summary>
姓名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.TitlePerfor"
>
<summary>
职称绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.WorkPerfor"
>
<summary>
工作量绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.RealGiveFee"
>
<summary>
实发工资
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.Sign"
>
<summary>
签字
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SheetExportResponse.SheetID"
>
<member
name=
"P:Performance.DtoModels.SheetExportResponse.SheetID"
>
<summary>
<summary>
sheetID
sheetID
...
...
performance/Performance.DtoModels/Response/DeptResponse.cs
View file @
2fae4424
...
@@ -94,6 +94,11 @@ public class DeptResponse
...
@@ -94,6 +94,11 @@ public class DeptResponse
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 考核后绩效
/// </summary>
public
Nullable
<
decimal
>
ScoringPerfor
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// 调节系数
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AdjustFactor
{
get
;
set
;
}
public
Nullable
<
decimal
>
AdjustFactor
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/Response/SecPrintResponse.cs
0 → 100644
View file @
2fae4424
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SecPrintResponse
{
/// <summary>
/// 工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 姓名
/// </summary>
public
string
PersonName
{
get
;
set
;
}
/// <summary>
/// 职称绩效
/// </summary>
public
decimal
?
TitlePerfor
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
decimal
?
WorkPerfor
{
get
;
set
;
}
/// <summary>
/// 实发工资
/// </summary>
public
decimal
?
RealGiveFee
{
get
;
set
;
}
/// <summary>
/// 签字
/// </summary>
public
string
Sign
{
get
;
set
;
}
public
int
RowNumber
{
get
;
set
;
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
2fae4424
...
@@ -29,6 +29,7 @@ public class ComputeService : IAutoInjection
...
@@ -29,6 +29,7 @@ public class ComputeService : IAutoInjection
private
readonly
PerforAgsecondallotRepository
_perforAgsecondallotRepository
;
private
readonly
PerforAgsecondallotRepository
_perforAgsecondallotRepository
;
private
readonly
PerforAgcomputeRepository
_perforAgcomputeRepository
;
private
readonly
PerforAgcomputeRepository
_perforAgcomputeRepository
;
private
readonly
PerforImemployeeclinicRepository
_perforImemployeeclinicRepository
;
private
readonly
PerforImemployeeclinicRepository
_perforImemployeeclinicRepository
;
private
readonly
PerforImemployeeRepository
_perforImemployeeRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
...
@@ -44,7 +45,8 @@ public class ComputeService : IAutoInjection
...
@@ -44,7 +45,8 @@ public class ComputeService : IAutoInjection
PerforCofincomeRepository
perforCofincomeRepository
,
PerforCofincomeRepository
perforCofincomeRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
)
PerforImemployeeclinicRepository
perforImemployeeclinicRepository
,
PerforImemployeeRepository
perforImemployeeRepository
)
{
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
this
.
perforResaccountRepository
=
perforResaccountRepository
;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
...
@@ -61,6 +63,7 @@ public class ComputeService : IAutoInjection
...
@@ -61,6 +63,7 @@ public class ComputeService : IAutoInjection
this
.
_perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
this
.
_perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
this
.
_perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
_perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
_perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
_perforImemployeeclinicRepository
=
perforImemployeeclinicRepository
;
this
.
_perforImemployeeRepository
=
perforImemployeeRepository
;
}
}
/// <summary>
/// <summary>
...
@@ -207,6 +210,55 @@ public List<DeptResponse> GetOtherPerformance(int allotId)
...
@@ -207,6 +210,55 @@ public List<DeptResponse> GetOtherPerformance(int allotId)
}
}
/// <summary>
/// <summary>
/// 返回院领导、中层、工勤组绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
{
var
result
=
new
List
<
DeptResponse
>();
var
resData
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
resData
!=
null
&&
resData
.
Any
())
{
result
.
AddRange
(
Mapper
.
Map
<
List
<
DeptResponse
>>(
resData
));
result
.
ForEach
(
t
=>
{
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
();
t
.
ScoringPerfor
=
t
.
PerforFee
*
(
t
.
ScoringAverage
??
0
);
});
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
var
accountType
=
new
List
<
AccountUnitType
>
{
AccountUnitType
.
行政高层
,
AccountUnitType
.
行政中层
,
AccountUnitType
.
行政工勤
};
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
accountType
.
Select
(
a
=>
a
.
ToString
()).
Contains
(
t
.
AccountType
));
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
List
<
DeptResponse
>
adminPerfor
=
list
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
})
.
Select
(
t
=>
new
DeptResponse
{
UnitName
=
t
.
Key
.
AccountType
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
Number
=
t
.
Count
(),
//Extra = t.FirstOrDefault(group => group.Punishment > 0)?.Punishment, // 医院奖罚
//ScoringAverage = t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate, //考核得分率
//AdjustFactor = t.FirstOrDefault(group => group.Adjust > 0)?.Adjust, //调节系数
//WorkloadFee = t.Sum(group => group.Workload), //工作量绩效
//PerforTotal = t.Sum(group => group.RealGiveFee), //绩效合计
//ScoringPerfor = t.Sum(group => group.RealGiveFee) * (t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate ?? 0),
Avg
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
/
t
.
Count
(),
//人均绩效
OtherPerfor1
=
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
//实发绩效
}).
ToList
();
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
adminPerfor
=
adminPerfor
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
).
Value
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
result
.
AddRange
(
adminPerfor
);
return
result
;
}
/// <summary>
/// 查看科室绩效
/// 查看科室绩效
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
...
@@ -333,6 +385,54 @@ public List<ComputeResponse> AllCompute(int allotId)
...
@@ -333,6 +385,54 @@ public List<ComputeResponse> AllCompute(int allotId)
return
list
;
return
list
;
}
}
/// <summary>
/// 返回绩效发放列表
/// 科主任护士长返回管理绩效
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public
List
<
ComputeResponse
>
AllManageCompute
(
int
allotId
)
{
var
list
=
new
List
<
ComputeResponse
>();
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
);
if
(
allot
!=
null
&&
allot
.
Any
(
t
=>
t
.
AllotID
==
allotId
))
{
var
types
=
new
List
<
string
>
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
()
};
list
=
allot
.
Select
(
t
=>
new
ComputeResponse
{
Source
=
"一次绩效"
,
AccountingUnit
=
t
.
AccountingUnit
,
EmployeeName
=
t
.
EmployeeName
,
JobNumber
=
t
.
JobNumber
,
JobTitle
=
t
.
JobTitle
,
RealGiveFee
=
types
.
Contains
(
t
.
AccountType
)
?
t
.
ShouldGiveFee
:
t
.
RealGiveFee
}).
ToList
();
}
var
again
=
_perforAgcomputeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
if
(
again
!=
null
&&
again
.
Any
())
{
var
group
=
again
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
WorkPost
,
t
.
JobNumber
,
t
.
PersonName
})
.
Select
(
t
=>
new
{
department
=
t
.
Key
.
Department
,
jobtitle
=
t
.
Key
.
WorkPost
,
jobnumber
=
t
.
Key
.
JobNumber
,
name
=
t
.
Key
.
PersonName
,
fee
=
t
.
Sum
(
g
=>
g
.
RealGiveFee
)
});
list
.
AddRange
(
group
.
Select
(
t
=>
new
ComputeResponse
{
Source
=
"二次绩效"
,
AccountingUnit
=
t
.
department
,
JobNumber
=
t
.
jobnumber
,
JobTitle
=
t
.
jobtitle
,
EmployeeName
=
t
.
name
,
RealGiveFee
=
t
.
fee
}).
OrderByDescending
(
t
=>
t
.
AccountingUnit
));
}
return
list
;
}
public
res_compute
GetComputeSingle
(
int
computeid
)
public
res_compute
GetComputeSingle
(
int
computeid
)
{
{
return
_perforRescomputeRepository
.
GetEntity
(
t
=>
t
.
ID
==
computeid
);
return
_perforRescomputeRepository
.
GetEntity
(
t
=>
t
.
ID
==
computeid
);
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
2fae4424
...
@@ -294,7 +294,10 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -294,7 +294,10 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
{
{
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
result
.
BodyItems
=
GetBringItems
(
request
,
headItems
);
result
.
BodyItems
=
GetBringItems
(
request
,
headItems
);
result
.
BodyItems
.
AddRange
(
Mapper
.
Map
<
List
<
BodyItem
>>(
headItems
.
Where
(
t
=>
t
.
Type
==
1
)));
var
bodys
=
Mapper
.
Map
<
List
<
BodyItem
>>(
headItems
.
Where
(
t
=>
t
.
Type
==
1
));
if
(
bodys
!=
null
&&
bodys
.
Any
())
bodys
.
ForEach
(
t
=>
t
.
RowNumber
=
-
1
);
result
.
BodyItems
.
AddRange
(
bodys
);
}
}
}
}
...
@@ -1023,5 +1026,35 @@ public List<ag_othersource> OtherSave(int secondId, List<ag_othersource> request
...
@@ -1023,5 +1026,35 @@ public List<ag_othersource> OtherSave(int secondId, List<ag_othersource> request
return
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
return
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
}
}
#
endregion
#
endregion
public
List
<
SecPrintResponse
>
Print
(
int
secondId
)
{
var
computes
=
perforAgcomputeRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
SecPrintResponse
>();
var
itemname
=
new
List
<
string
>
{
"职称绩效"
,
"工作量绩效工资"
,
"人员工号"
};
var
fixaitems
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
&&
itemname
.
Contains
(
t
.
ItemName
));
var
result
=
new
List
<
SecPrintResponse
>();
foreach
(
var
item
in
computes
)
{
var
sec
=
new
SecPrintResponse
{
JobNumber
=
item
.
JobNumber
,
PersonName
=
item
.
PersonName
,
RealGiveFee
=
item
.
RealGiveFee
,
};
if
(
fixaitems
!=
null
&&
fixaitems
.
Any
())
{
var
rownumber
=
fixaitems
.
FirstOrDefault
(
t
=>
t
.
ItemValue
==
item
.
JobNumber
).
RowNumber
;
sec
.
RowNumber
=
rownumber
??
0
;
sec
.
TitlePerfor
=
ConvertHelper
.
To
<
decimal
>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"职称绩效"
).
ItemValue
);
sec
.
WorkPerfor
=
ConvertHelper
.
To
<
decimal
>(
fixaitems
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
rownumber
&&
t
.
ItemName
==
"工作量绩效工资"
).
ItemValue
);
}
result
.
Add
(
sec
);
}
return
result
.
OrderBy
(
t
=>
t
.
RowNumber
).
ToList
();
}
}
}
}
}
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