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
5c4a9e2e
Commit
5c4a9e2e
authored
Aug 17, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人绩效查询
parent
0ac56eb4
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
243 additions
and
0 deletions
+243
-0
performance/Performance.Api/Controllers/AllotController.cs
+13
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+20
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+35
-0
performance/Performance.DtoModels/Enum.cs
+16
-0
performance/Performance.DtoModels/Response/OwnerPerformanceDto.cs
+27
-0
performance/Performance.EntityModels/Other/view_allot_result.cs
+46
-0
performance/Performance.Repository/PerforReportRepository .cs
+7
-0
performance/Performance.Services/AllotService.cs
+65
-0
performance/Performance.Services/UserService.cs
+8
-0
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
5c4a9e2e
...
...
@@ -493,5 +493,18 @@ public IActionResult DownloadCurrentCalculationTable(int allotid)
var
memi
=
provider
.
Mappings
[
".xlsx"
];
return
File
(
memoryStream
,
memi
,
Path
.
GetFileName
(
fileInfo
.
Name
));
}
/// <summary>
/// 查询个人绩效
/// </summary>
/// <returns></returns>
[
Route
(
"owner/query"
)]
[
HttpGet
]
public
ApiResponse
GetOwnerPerformance
()
{
var
userid
=
_claim
.
GetUserId
();
var
res
=
_allotService
.
GetOwnerPerformance
(
userid
);
return
new
ApiResponse
(
ResponseType
.
OK
,
res
);
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
5c4a9e2e
...
...
@@ -308,6 +308,12 @@
<param
name=
"allotid"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.GetOwnerPerformance"
>
<summary>
查询个人绩效
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.BudgetController.Query(Performance.DtoModels.Request.BudgetRequest)"
>
<summary>
预算管理查询(包含金额、占比)
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
5c4a9e2e
...
...
@@ -3474,6 +3474,26 @@
菜单状态 1 启用 2禁用
</summary>
</member>
<member
name=
"P:Performance.DtoModels.OwnerPerformanceDto.ShouldGiveFee"
>
<summary>
应发绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.OwnerPerformanceDto.ReservedRatio"
>
<summary>
预留比例
</summary>
</member>
<member
name=
"P:Performance.DtoModels.OwnerPerformanceDto.ReservedRatioFee"
>
<summary>
预留金额
</summary>
</member>
<member
name=
"P:Performance.DtoModels.OwnerPerformanceDto.RealGiveFee"
>
<summary>
实发绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.PerEmployeeResponse.WorkTime"
>
<summary>
参加工作时间
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
5c4a9e2e
...
...
@@ -7407,5 +7407,40 @@
统计的HIS的原始科室名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.Source"
>
<summary>
来源
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.PerforSumFee"
>
<summary>
业绩绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.PerforManagementFee"
>
<summary>
管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.NightWorkPerfor"
>
<summary>
夜班绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.AdjustLaterOtherFee"
>
<summary>
调节后其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.OtherPerfor"
>
<summary>
医院其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.view_allot_result.HideOtherPerfor"
>
<summary>
不公示其他绩效
</summary>
</member>
</members>
</doc>
performance/Performance.DtoModels/Enum.cs
View file @
5c4a9e2e
...
...
@@ -114,4 +114,20 @@ public enum DataFormat
/// <summary> 日期 </summary>
日期
}
public
enum
Role
{
绩效管理员
=
1
,
医院管理员
=
2
,
护士长
=
3
,
科主任
=
4
,
绩效核算办
=
5
,
院领导
=
6
,
财务科
=
7
,
人事科
=
8
,
特殊科室
=
9
,
行政科室
=
10
,
数据收集
=
11
,
绩效查询
=
12
,
}
}
performance/Performance.DtoModels/Response/OwnerPerformanceDto.cs
0 → 100644
View file @
5c4a9e2e
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
OwnerPerformanceDto
:
view_allot_result
{
public
IEnumerable
<
view_allot_result
>
Detail
{
get
;
set
;
}
/// <summary>
/// 应发绩效
/// </summary>
public
decimal
?
ShouldGiveFee
{
get
;
set
;
}
/// <summary>
/// 预留比例
/// </summary>
public
decimal
?
ReservedRatio
{
get
;
set
;
}
/// <summary>
/// 预留金额
/// </summary>
public
decimal
?
ReservedRatioFee
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
decimal
RealGiveFee
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Other/view_allot_result.cs
0 → 100644
View file @
5c4a9e2e
namespace
Performance.DtoModels
{
public
class
view_allot_result
{
public
int
HospitalID
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
public
int
Month
{
get
;
set
;
}
/// <summary>
/// 来源
/// </summary>
public
string
Source
{
get
;
set
;
}
public
int
AllotId
{
get
;
set
;
}
public
int
?
SecondId
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
string
AccountingUnit
{
get
;
set
;
}
public
int
?
IsShowManage
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
public
string
JobNumber
{
get
;
set
;
}
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 业绩绩效
/// </summary>
public
decimal
?
PerforSumFee
{
get
;
set
;
}
/// <summary>
/// 管理绩效
/// </summary>
public
decimal
?
PerforManagementFee
{
get
;
set
;
}
/// <summary>
/// 夜班绩效
/// </summary>
public
decimal
?
NightWorkPerfor
{
get
;
set
;
}
/// <summary>
/// 调节后其他绩效
/// </summary>
public
decimal
?
AdjustLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
decimal
?
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 不公示其他绩效
/// </summary>
public
decimal
?
HideOtherPerfor
{
get
;
set
;
}
public
decimal
?
RealPerformance
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforReportRepository .cs
View file @
5c4a9e2e
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -382,5 +383,11 @@ public List<EmployeeReservedDto> GetEmployeeReserved(int hospitalId, int year)
string
sql
=
"SELECT * FROM view_allot_result_report WHERE HospitalID=@HospitalID AND Year=@Year"
;
return
DapperQuery
<
EmployeeReservedDto
>(
sql
,
new
{
HospitalID
=
hospitalId
,
Year
=
year
})?.
ToList
();
}
public
List
<
view_allot_result
>
GetOwnerPerformance
(
List
<
int
>
hospitalId
,
string
jobNumber
)
{
string
sql
=
"SELECT * FROM view_allot_result WHERE HospitalID IN @HospitalID AND JobNumber=@JobNumber"
;
return
DapperQuery
<
view_allot_result
>(
sql
,
new
{
HospitalID
=
hospitalId
,
JobNumber
=
jobNumber
})?.
ToList
();
}
}
}
performance/Performance.Services/AllotService.cs
View file @
5c4a9e2e
...
...
@@ -44,6 +44,7 @@ public class AllotService : IAutoInjection
private
readonly
UserService
userService
;
private
PerforCofdirectorRepository
perforCofdirectorRepository
;
private
readonly
PerforReportRepository
_reportRepository
;
private
readonly
PerforPeremployeeRepository
_perforPeremployeeRepository
;
//private readonly IHubContext<AllotLogHub> hubContext;
private
readonly
LogManageService
logManageService
;
...
...
@@ -78,6 +79,7 @@ public class AllotService : IAutoInjection
ReportService
reportService
,
PerforCofdirectorRepository
perforCofdirectorRepository
,
PerforReportRepository
reportRepository
,
PerforPeremployeeRepository
perforPeremployeeRepository
,
QueryDataService
queryDataService
)
{
_allotRepository
=
allotRepository
;
...
...
@@ -107,6 +109,7 @@ public class AllotService : IAutoInjection
this
.
reportService
=
reportService
;
this
.
perforCofdirectorRepository
=
perforCofdirectorRepository
;
_reportRepository
=
reportRepository
;
_perforPeremployeeRepository
=
perforPeremployeeRepository
;
this
.
queryDataService
=
queryDataService
;
}
...
...
@@ -659,5 +662,67 @@ public List<EmployeeReservedDto> GetReserved(int hospitalId, int year, int useri
return
reserveds
;
}
/// <summary>
/// 查询个人绩效
/// </summary>
/// <param name="userid"></param>
/// <returns></returns>
public
List
<
OwnerPerformanceDto
>
GetOwnerPerformance
(
int
userid
)
{
var
user
=
userService
.
GetUser
(
userid
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"用户信息错误"
);
var
roleType
=
roleService
.
GetUserRole
(
userid
)?.
FirstOrDefault
()?.
Type
;
if
(!
roleType
.
HasValue
)
throw
new
PerformanceException
(
"用户信息错误"
);
if
(
roleType
!=
(
int
)
Role
.
绩效查询
)
throw
new
PerformanceException
(
"当前用户暂不支持绩效查询"
);
var
hospitals
=
userService
.
GetUserHospital
(
userid
);
string
jobNumber
=
user
.
Login
;
var
owner
=
_reportRepository
.
GetOwnerPerformance
(
hospitals
,
jobNumber
);
if
(
owner
==
null
||
!
owner
.
Any
())
return
new
List
<
OwnerPerformanceDto
>();
var
res
=
owner
.
GroupBy
(
w
=>
new
{
w
.
AllotId
,
w
.
Year
,
w
.
Month
,
w
.
JobNumber
})
.
Select
(
w
=>
new
OwnerPerformanceDto
{
AllotId
=
w
.
Key
.
AllotId
,
Year
=
w
.
Key
.
Year
,
Month
=
w
.
Key
.
Month
,
JobNumber
=
w
.
Key
.
JobNumber
,
PerforSumFee
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
PerforSumFee
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 业绩绩效
PerforManagementFee
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
PerforManagementFee
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 管理绩效
NightWorkPerfor
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
NightWorkPerfor
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 夜班绩效
AdjustLaterOtherFee
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
AdjustLaterOtherFee
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 调节后其他绩效
OtherPerfor
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
OtherPerfor
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 医院其他绩效
HideOtherPerfor
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
HideOtherPerfor
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 不公示其他绩效
RealPerformance
=
Math
.
Round
(
w
.
Sum
(
p
=>
p
.
RealPerformance
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
),
// 中转使用: 业绩绩效+管理绩效+调节后其他绩效
Detail
=
w
.
Where
(
p
=>
p
.
Year
==
w
.
Key
.
Year
&&
p
.
Month
==
w
.
Key
.
Month
&&
p
.
JobNumber
==
w
.
Key
.
JobNumber
),
})
.
ToList
();
var
employees
=
_perforPeremployeeRepository
.
GetEntities
(
w
=>
w
.
PersonnelNumber
==
jobNumber
);
foreach
(
var
item
in
res
)
{
item
.
UnitType
=
employees
?.
FirstOrDefault
(
w
=>
w
.
AllotId
==
item
.
AllotId
&&
w
.
PersonnelNumber
==
jobNumber
)?.
UnitType
??
""
;
item
.
AccountingUnit
=
employees
?.
FirstOrDefault
(
w
=>
w
.
AllotId
==
item
.
AllotId
&&
w
.
PersonnelNumber
==
jobNumber
)?.
AccountingUnit
??
""
;
item
.
EmployeeName
=
employees
?.
FirstOrDefault
(
w
=>
w
.
AllotId
==
item
.
AllotId
&&
w
.
PersonnelNumber
==
jobNumber
)?.
DoctorName
??
""
;
// 应发绩效
item
.
ShouldGiveFee
=
Math
.
Round
((
item
.
RealPerformance
??
0
)
+
(
item
.
OtherPerfor
??
0
)
+
(
item
.
HideOtherPerfor
??
0
)
+
(
item
.
NightWorkPerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
item
.
ReservedRatio
=
employees
?.
FirstOrDefault
(
w
=>
w
.
AllotId
==
item
.
AllotId
&&
w
.
PersonnelNumber
==
jobNumber
)?.
ReservedRatio
??
0
;
// 预留比例
item
.
ReservedRatioFee
=
Math
.
Round
((
item
.
RealPerformance
??
0
)
*
(
item
.
ReservedRatio
??
0
),
2
,
MidpointRounding
.
AwayFromZero
);
// 预留绩效
item
.
RealGiveFee
=
Math
.
Round
(
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
)
??
0
,
2
,
MidpointRounding
.
AwayFromZero
);
// 实发绩效
}
return
res
;
}
}
}
performance/Performance.Services/UserService.cs
View file @
5c4a9e2e
...
...
@@ -129,6 +129,14 @@ public sys_role GetUserFirstRole(int userId)
return
role
;
}
public
List
<
int
>
GetUserHospital
(
int
userId
)
{
var
userHospital
=
_userhospitalRepository
.
GetEntities
(
t
=>
t
.
UserID
==
userId
);
if
(
userHospital
!=
null
&&
userHospital
.
Any
(
w
=>
w
.
HospitalID
.
HasValue
))
return
userHospital
.
Where
(
w
=>
w
.
HospitalID
.
HasValue
).
Select
(
w
=>
w
.
HospitalID
.
Value
).
ToList
();
return
new
List
<
int
>();
}
/// <summary>
/// 查询用户列表
/// </summary>
...
...
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