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
6bca28e0
Commit
6bca28e0
authored
Jun 17, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更多按钮新增医院其他绩效
parent
ceb0691e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
+23
-4
performance/Performance.Api/Controllers/EmployeeController.cs
+20
-3
performance/Performance.Services/EmployeeService.cs
+3
-1
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
6bca28e0
...
...
@@ -22,14 +22,19 @@ public class EmployeeController : Controller
private
AllotService
allotService
;
private
ClaimService
claim
;
private
IHostingEnvironment
evn
;
private
readonly
RoleService
roleService
;
private
readonly
UserService
userService
;
public
EmployeeController
(
EmployeeService
employeeService
,
AllotService
allotService
,
ClaimService
claim
,
IHostingEnvironment
evn
)
ClaimService
claim
,
IHostingEnvironment
evn
,
RoleService
roleService
,
UserService
userService
)
{
this
.
employeeService
=
employeeService
;
this
.
allotService
=
allotService
;
this
.
claim
=
claim
;
this
.
evn
=
evn
;
this
.
roleService
=
roleService
;
this
.
userService
=
userService
;
}
/// <summary>
...
...
@@ -456,8 +461,20 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
[
HttpPost
]
public
ApiResponse
AprOverview
(
int
allotId
)
{
var
relust
=
employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
var
roleType
=
new
[]
{
3
,
4
,
9
,
10
};
var
userid
=
claim
.
GetUserId
();
var
user
=
userService
.
GetUser
(
userid
);
var
role
=
roleService
.
GetUserRole
(
user
.
UserID
);
var
result
=
new
List
<
Dictionary
<
string
,
string
>>();
if
(
role
.
Any
(
t
=>
roleType
.
Contains
(
t
.
Type
.
Value
)))
result
=
employeeService
.
GetOtherPerStats
(
allotId
,
user
.
Department
??
""
);
else
result
=
employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
#
endregion
...
...
performance/Performance.Services/EmployeeService.cs
View file @
6bca28e0
...
...
@@ -665,10 +665,12 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
int
allotId
)
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
int
allotId
,
string
department
=
null
)
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
var
aprAmountList
=
perapramountRepository
.
GetFullAmount
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
Status
==
3
);
if
(
department
!=
null
)
aprAmountList
=
aprAmountList
.
Where
(
t
=>
t
.
AccountingUnit
==
department
).
ToList
();
var
perForType
=
aprAmountList
.
Select
(
t
=>
t
.
PerforType
).
Distinct
();
foreach
(
var
num
in
aprAmountList
.
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
())
...
...
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