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
90b1cef8
Commit
90b1cef8
authored
Jun 02, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效列表返回isshowmanagebutton字段
parent
4b8c9a31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
performance/Performance.DtoModels/Response/SecondListResponse.cs
+6
-0
performance/Performance.Services/SecondAllotService.cs
+7
-5
No files found.
performance/Performance.DtoModels/Response/SecondListResponse.cs
View file @
90b1cef8
...
@@ -21,5 +21,10 @@ public class SecondListResponse : ag_secondallot
...
@@ -21,5 +21,10 @@ public class SecondListResponse : ag_secondallot
/// 0 不显示 1 显示
/// 0 不显示 1 显示
/// </summary>
/// </summary>
public
int
ShowFormula
{
get
;
set
;
}
public
int
ShowFormula
{
get
;
set
;
}
/// <summary>
/// 行政后勤是否显示管理绩效按钮 1 是 2 否
/// </summary>
public
Nullable
<
int
>
IsShowManageButton
{
get
;
set
;
}
}
}
}
}
\ No newline at end of file
performance/Performance.Services/SecondAllotService.cs
View file @
90b1cef8
...
@@ -130,10 +130,10 @@ public List<SecondListResponse> GetSecondList(int userId)
...
@@ -130,10 +130,10 @@ public List<SecondListResponse> GetSecondList(int userId)
throw
new
NotImplementedException
(
"人员ID无效"
);
throw
new
NotImplementedException
(
"人员ID无效"
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
var
hospital
=
userhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
user
hospital
=
userhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
hospital
==
null
)
if
(
user
hospital
==
null
)
throw
new
NotImplementedException
(
"人员未选择医院"
);
throw
new
NotImplementedException
(
"人员未选择医院"
);
var
allotList
=
perallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospital
.
HospitalID
&&
new
List
<
int
>
{
6
,
8
,
10
}.
Contains
(
t
.
States
));
var
allotList
=
perallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
user
hospital
.
HospitalID
&&
new
List
<
int
>
{
6
,
8
,
10
}.
Contains
(
t
.
States
));
if
(
allotList
==
null
||
allotList
.
Count
==
0
)
if
(
allotList
==
null
||
allotList
.
Count
==
0
)
return
new
List
<
SecondListResponse
>();
return
new
List
<
SecondListResponse
>();
...
@@ -150,6 +150,7 @@ public List<SecondListResponse> GetSecondList(int userId)
...
@@ -150,6 +150,7 @@ public List<SecondListResponse> GetSecondList(int userId)
var
secondList
=
agsecondallotRepository
.
GetEntities
(
exp
);
var
secondList
=
agsecondallotRepository
.
GetEntities
(
exp
);
var
list
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
secondList
);
var
list
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
secondList
);
var
hospital
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
userhospital
.
HospitalID
);
list
?.
ForEach
(
t
=>
list
?.
ForEach
(
t
=>
{
{
var
allot
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
);
var
allot
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
);
...
@@ -159,19 +160,20 @@ public List<SecondListResponse> GetSecondList(int userId)
...
@@ -159,19 +160,20 @@ public List<SecondListResponse> GetSecondList(int userId)
t
.
States
=
allot
.
States
;
t
.
States
=
allot
.
States
;
t
.
ShowFormula
=
allot
.
ShowFormula
;
t
.
ShowFormula
=
allot
.
ShowFormula
;
}
}
t
.
IsShowManageButton
=
hospital
?.
IsShowManageButton
??
(
int
)
States
.
Disabled
;
});
});
if
(
secondList
!=
null
&&
secondList
.
Any
())
if
(
secondList
!=
null
&&
secondList
.
Any
())
{
{
// 暂时在加载列表时补充信息
// 暂时在加载列表时补充信息
var
worktypes
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospital
.
HospitalID
&&
t
.
Department
==
secondList
.
First
().
Department
&&
t
.
UnitType
==
secondList
.
First
().
UnitType
);
var
worktypes
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
user
hospital
.
HospitalID
&&
t
.
Department
==
secondList
.
First
().
Department
&&
t
.
UnitType
==
secondList
.
First
().
UnitType
);
if
(
worktypes
!=
null
&&
worktypes
.
Any
())
if
(
worktypes
!=
null
&&
worktypes
.
Any
())
{
{
worktypes
.
ForEach
(
t
=>
AddWorkTypeDefaultValues
(
t
));
worktypes
.
ForEach
(
t
=>
AddWorkTypeDefaultValues
(
t
));
}
}
// 补充默认工作量项
// 补充默认工作量项
CheckDefaultWorkload
(
hospital
.
HospitalID
??
0
,
secondList
.
First
().
Department
,
secondList
.
First
().
UnitType
);
CheckDefaultWorkload
(
user
hospital
.
HospitalID
??
0
,
secondList
.
First
().
Department
,
secondList
.
First
().
UnitType
);
}
}
return
list
;
return
list
;
...
...
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