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
8d87daf6
Commit
8d87daf6
authored
Apr 28, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perheader过滤、筛选条件过滤
parent
903d85ac
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
143 additions
and
8 deletions
+143
-8
performance/Performance.Api/Controllers/ReportController.cs
+4
-2
performance/Performance.Api/wwwroot/Performance.Api.xml
+7
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
+24
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+24
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+23
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
+17
-0
performance/Performance.Services/ReportDataService.cs
+44
-3
No files found.
performance/Performance.Api/Controllers/ReportController.cs
View file @
8d87daf6
...
@@ -50,7 +50,8 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request)
...
@@ -50,7 +50,8 @@ public ApiResponse Rank([FromBody]HospitalIdRequest request)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Selection
([
FromBody
]
SelectionRequest
report
)
public
ApiResponse
Selection
([
FromBody
]
SelectionRequest
report
)
{
{
var
result
=
reportDataService
.
GetReportSelection
(
report
.
GroupId
);
var
userId
=
claimService
.
GetUserId
();
var
result
=
reportDataService
.
GetReportSelection
(
report
.
GroupId
,
userId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
@@ -66,7 +67,8 @@ public ApiResponse Info([FromBody]SelectionRequest report)
...
@@ -66,7 +67,8 @@ public ApiResponse Info([FromBody]SelectionRequest report)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Search
([
FromBody
]
SearchReportRequest
report
)
public
ApiResponse
Search
([
FromBody
]
SearchReportRequest
report
)
{
{
var
result
=
reportDataService
.
GetReportData
(
report
.
HospitalId
,
report
.
GroupId
,
report
.
ReportId
,
report
.
Values
??
new
List
<
SelectionValues
>());
var
userId
=
claimService
.
GetUserId
();
var
result
=
reportDataService
.
GetReportData
(
report
.
HospitalId
,
report
.
GroupId
,
report
.
ReportId
,
report
.
Values
??
new
List
<
SelectionValues
>(),
userId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
8d87daf6
...
@@ -242,6 +242,13 @@
...
@@ -242,6 +242,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.BudgetController.UseResult(System.Int32)"
>
<summary>
使用预算比例
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<summary>
<summary>
获取绩效发放列表
获取绩效发放列表
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
View file @
8d87daf6
...
@@ -21,7 +21,30 @@ public class PerSheetDataReadClinicEmployee : IPerSheetDataRead
...
@@ -21,7 +21,30 @@ public class PerSheetDataReadClinicEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元分类"
,
"核算单元"
,
"核算单元"
,
"人员工号"
,
"医生姓名"
,
"职务分类"
,
"基础绩效系数"
,
"岗位系数"
,
"效率绩效系数"
,
"规模绩效系数"
,
"管理绩效发放系数"
,
"考核得分率"
,
"出勤率"
,
"其他绩效"
,
"医院奖罚"
,
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"
{
sheet
.
SheetName
}
中
{
item
}
列为空"
);
}
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
8d87daf6
...
@@ -24,7 +24,30 @@ public class PerSheetDataReadDeptAccounting : IPerSheetDataRead
...
@@ -24,7 +24,30 @@ public class PerSheetDataReadDeptAccounting : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元类型"
,
"核算单元"
,
"科室名称"
,
"效率绩效人数"
,
"科主任/护士长人数"
,
"核算单元人员数量"
,
"预算比例"
,
"倾斜系数"
,
"工作量倾斜系数"
,
"保底绩效参考标准"
,
"保底绩效系数"
,
"其他绩效1"
,
"其他绩效2"
,
"医院奖罚"
,
"考核得分率"
,
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"
{
sheet
.
SheetName
}
中
{
item
}
列为空"
);
}
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
8d87daf6
...
@@ -24,7 +24,29 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
...
@@ -24,7 +24,29 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元"
,
"核算单元"
,
"人员工号"
,
"医生姓名"
,
"职务分类"
,
"绩效基数核算参考对象"
,
"绩效基数核算系数"
,
"人员分类"
,
"岗位系数"
,
"参加工作时间"
,
"考核得分率"
,
"出勤率"
,
"其他绩效"
,
"医院奖罚"
,
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"
{
sheet
.
SheetName
}
中
{
item
}
列为空"
);
}
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
View file @
8d87daf6
...
@@ -23,6 +23,23 @@ public class PerSheetDataReadSpecialUnit : IPerSheetDataRead
...
@@ -23,6 +23,23 @@ public class PerSheetDataReadSpecialUnit : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"量化指标"
,
"数量"
,
"量化指标绩效分值"
,
"科室"
,
"人数"
,
"考核得分率"
,
"其他绩效"
,
"医院奖罚"
,
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"
{
sheet
.
SheetName
}
中
{
item
}
列为空"
);
}
// 特殊科室多科室聚合,合并时保留科室名称
// 特殊科室多科室聚合,合并时保留科室名称
string
lastAccount
=
""
;
string
lastAccount
=
""
;
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
...
...
performance/Performance.Services/ReportDataService.cs
View file @
8d87daf6
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
using
Performance.Repository
;
using
Performance.Repository
;
...
@@ -19,19 +21,31 @@ public class ReportDataService : IAutoInjection
...
@@ -19,19 +21,31 @@ public class ReportDataService : IAutoInjection
private
readonly
PerforRepselectionRepository
selectionRepository
;
private
readonly
PerforRepselectionRepository
selectionRepository
;
private
readonly
PerforRepgroupRepository
groupRepository
;
private
readonly
PerforRepgroupRepository
groupRepository
;
private
readonly
PerforRepgroupselectionRepository
groupselectionRepository
;
private
readonly
PerforRepgroupselectionRepository
groupselectionRepository
;
private
readonly
PerforUserroleRepository
userroleRepository
;
private
readonly
PerforRoleRepository
roleRepository
;
private
readonly
PerforUserRepository
userRepository
;
private
readonly
Application
application
;
public
ReportDataService
(
public
ReportDataService
(
ILogger
<
ReportDataService
>
logger
,
ILogger
<
ReportDataService
>
logger
,
PerforRepreportRepository
reportRepository
,
PerforRepreportRepository
reportRepository
,
PerforRepselectionRepository
selectionRepository
,
PerforRepselectionRepository
selectionRepository
,
PerforRepgroupRepository
groupRepository
,
PerforRepgroupRepository
groupRepository
,
PerforRepgroupselectionRepository
groupselectionRepository
)
PerforRepgroupselectionRepository
groupselectionRepository
,
PerforUserroleRepository
userroleRepository
,
PerforRoleRepository
roleRepository
,
PerforUserRepository
userRepository
,
IOptions
<
Application
>
application
)
{
{
this
.
logger
=
logger
;
this
.
logger
=
logger
;
this
.
reportRepository
=
reportRepository
;
this
.
reportRepository
=
reportRepository
;
this
.
selectionRepository
=
selectionRepository
;
this
.
selectionRepository
=
selectionRepository
;
this
.
groupRepository
=
groupRepository
;
this
.
groupRepository
=
groupRepository
;
this
.
groupselectionRepository
=
groupselectionRepository
;
this
.
groupselectionRepository
=
groupselectionRepository
;
this
.
userroleRepository
=
userroleRepository
;
this
.
roleRepository
=
roleRepository
;
this
.
userRepository
=
userRepository
;
this
.
application
=
application
.
Value
;
}
}
/// <summary>
/// <summary>
...
@@ -39,7 +53,7 @@ public class ReportDataService : IAutoInjection
...
@@ -39,7 +53,7 @@ public class ReportDataService : IAutoInjection
/// </summary>
/// </summary>
/// <param name="groupId"></param>
/// <param name="groupId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
SelectionOptions
>
GetReportSelection
(
int
groupId
)
public
List
<
SelectionOptions
>
GetReportSelection
(
int
groupId
,
int
userId
)
{
{
List
<
SelectionOptions
>
options
=
new
List
<
SelectionOptions
>();
List
<
SelectionOptions
>
options
=
new
List
<
SelectionOptions
>();
...
@@ -51,6 +65,8 @@ public List<SelectionOptions> GetReportSelection(int groupId)
...
@@ -51,6 +65,8 @@ public List<SelectionOptions> GetReportSelection(int groupId)
if
(
selections
==
null
)
if
(
selections
==
null
)
return
options
;
return
options
;
var
isMedical
=
IsMedical
(
userId
);
var
dispaly
=
new
int
[]
{
(
int
)
SelectionState
.
UsableAndNotDispaly
,
(
int
)
SelectionState
.
NotUsableAndNotDispaly
};
var
dispaly
=
new
int
[]
{
(
int
)
SelectionState
.
UsableAndNotDispaly
,
(
int
)
SelectionState
.
NotUsableAndNotDispaly
};
foreach
(
var
item
in
selections
.
Where
(
t
=>
t
.
State
.
HasValue
&&
!
dispaly
.
Contains
(
t
.
State
.
Value
)))
foreach
(
var
item
in
selections
.
Where
(
t
=>
t
.
State
.
HasValue
&&
!
dispaly
.
Contains
(
t
.
State
.
Value
)))
{
{
...
@@ -59,6 +75,10 @@ public List<SelectionOptions> GetReportSelection(int groupId)
...
@@ -59,6 +75,10 @@ public List<SelectionOptions> GetReportSelection(int groupId)
// handle = new SelectionOptionDynamic();
// handle = new SelectionOptionDynamic();
SelectionOptions
selection
=
new
SelectionOptions
(
item
);
SelectionOptions
selection
=
new
SelectionOptions
(
item
);
selection
.
Options
=
handle
.
GetOptions
(
item
);
selection
.
Options
=
handle
.
GetOptions
(
item
);
if
(
isMedical
)
{
selection
.
Options
.
RemoveAll
(
t
=>
t
.
Title
==
"全院"
);
}
options
.
Add
(
selection
);
options
.
Add
(
selection
);
}
}
return
options
;
return
options
;
...
@@ -92,7 +112,7 @@ public object GetReportInfo(int groupId)
...
@@ -92,7 +112,7 @@ public object GetReportInfo(int groupId)
/// <param name="groupId"></param>
/// <param name="groupId"></param>
/// <param name="values"></param>
/// <param name="values"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
ReportData
>
GetReportData
(
int
hospitalId
,
int
groupId
,
int
reportId
,
List
<
SelectionValues
>
values
)
public
List
<
ReportData
>
GetReportData
(
int
hospitalId
,
int
groupId
,
int
reportId
,
List
<
SelectionValues
>
values
,
int
userId
)
{
{
var
groups
=
groupRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
groups
=
groupRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
arr1
=
groups
.
Select
(
w
=>
w
.
ReportId
);
var
arr1
=
groups
.
Select
(
w
=>
w
.
ReportId
);
...
@@ -112,6 +132,9 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, int reportId,
...
@@ -112,6 +132,9 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, int reportId,
var
selections
=
selectionRepository
.
GetEntities
(
w
=>
arr2
.
Contains
(
w
.
ID
)
&&
w
.
State
.
HasValue
&&
dispaly
.
Contains
(
w
.
State
.
Value
))
var
selections
=
selectionRepository
.
GetEntities
(
w
=>
arr2
.
Contains
(
w
.
ID
)
&&
w
.
State
.
HasValue
&&
dispaly
.
Contains
(
w
.
State
.
Value
))
??
new
List
<
rep_selection
>();
??
new
List
<
rep_selection
>();
var
isMedical
=
IsMedical
(
userId
);
var
department
=
GetUserDepartment
(
userId
);
List
<
ReportData
>
result
=
new
List
<
ReportData
>();
List
<
ReportData
>
result
=
new
List
<
ReportData
>();
foreach
(
var
report
in
reports
)
foreach
(
var
report
in
reports
)
{
{
...
@@ -125,6 +148,8 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, int reportId,
...
@@ -125,6 +148,8 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, int reportId,
@where
=
GetFilterSelection
(
selections
,
values
);
@where
=
GetFilterSelection
(
selections
,
values
);
}
}
@where
+=
$" and hospitalid=
{
hospitalId
}
"
;
@where
+=
$" and hospitalid=
{
hospitalId
}
"
;
if
(
isMedical
)
@where
+=
$" and department='
{
department
}
'"
;
// 固定占位符
// 固定占位符
var
pairs
=
PredefinePlaceholder
(
values
);
var
pairs
=
PredefinePlaceholder
(
values
);
pairs
.
Add
(
"wh"
,
@where
);
pairs
.
Add
(
"wh"
,
@where
);
...
@@ -328,6 +353,22 @@ private string ReplacePlaceholder(List<rep_selection> selections, List<Selection
...
@@ -328,6 +353,22 @@ private string ReplacePlaceholder(List<rep_selection> selections, List<Selection
}
}
return
content
;
return
content
;
}
}
private
bool
IsMedical
(
int
userId
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
if
(
role
.
Type
==
application
.
DirectorRole
||
role
.
Type
==
application
.
NurseRole
)
return
true
;
else
return
false
;
}
private
string
GetUserDepartment
(
int
userId
)
{
var
user
=
userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
return
user
.
Department
;
}
}
}
...
...
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