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
b912d679
Commit
b912d679
authored
May 08, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效使用模板增加判断条件医生组、护理组
parent
cef7e40f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
performance/Performance.Api/Controllers/SecondAllotController.cs
+2
-1
performance/Performance.Services/SecondAllotService.cs
+10
-2
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
b912d679
...
...
@@ -138,7 +138,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
[
Route
(
"api/temp/list"
)]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
{
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
);
var
userId
=
claimService
.
GetUserId
();
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
,
userId
);
return
new
ApiResponse
<
List
<
SecondTempResponse
>>(
ResponseType
.
OK
,
result
);
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
b912d679
...
...
@@ -515,12 +515,20 @@ public bool SaveCompute(List<ag_compute> request)
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
,
string
department
)
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
,
string
department
,
int
userId
)
{
var
temps
=
perforAgtempRepository
.
GetEntities
();
if
(
temps
!=
null
&&
temps
.
Any
())
{
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalid
&&
t
.
Department
==
department
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
Expression
<
Func
<
ag_usetemp
,
bool
>>
exp
=
t
=>
t
.
HospitalId
==
hospitalid
&&
t
.
Department
==
department
;
if
(
role
.
Type
==
application
.
DirectorRole
)
exp
=
exp
.
And
(
t
=>
new
List
<
string
>
{
UnitType
.
医生组
.
ToString
(),
UnitType
.
医技组
.
ToString
()
}.
Contains
(
t
.
UnitType
));
else
if
(
role
.
Type
==
application
.
NurseRole
)
exp
=
exp
.
And
(
t
=>
t
.
UnitType
==
UnitType
.
护理组
.
ToString
());
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
exp
);
var
secondTemps
=
Mapper
.
Map
<
List
<
SecondTempResponse
>>(
temps
);
if
(
useTemp
!=
null
)
secondTemps
.
ForEach
(
t
=>
t
.
IsSelected
=
t
.
Id
==
useTemp
.
UseTempId
);
...
...
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