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
05853650
Commit
05853650
authored
Jan 10, 2020
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效接口调整:1.获取使用模板根据医院和科室 2. 获取二次绩效考核根据allotid和年月 3. 获取科室
parent
25ffb9af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
24 deletions
+64
-24
performance/Performance.Api/Controllers/SecondAllotController.cs
+7
-6
performance/Performance.Api/wwwroot/Performance.Api.xml
+7
-1
performance/Performance.DtoModels/Request/AllotDeptRequest.cs
+15
-0
performance/Performance.Services/SecondAllotService.cs
+17
-11
performance/Performance.Services/UserService.cs
+18
-6
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
05853650
...
@@ -122,10 +122,11 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
...
@@ -122,10 +122,11 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
/// 选择二次绩效模板
/// 选择二次绩效模板
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpGet
(
"api/temp/list/{hospitalid}"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
(
int
hospitalid
)
[
Route
(
"api/temp/list"
)]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
{
{
var
result
=
secondAllotService
.
GetTemp
(
hospitalid
);
var
result
=
secondAllotService
.
GetTemp
(
request
.
HospitalId
,
request
.
Department
);
return
new
ApiResponse
<
List
<
SecondTempResponse
>>(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
<
List
<
SecondTempResponse
>>(
ResponseType
.
OK
,
result
);
}
}
...
@@ -229,12 +230,12 @@ public ApiResponse SubmitAudit(int secondid)
...
@@ -229,12 +230,12 @@ public ApiResponse SubmitAudit(int secondid)
/// 二次绩效审核列表
/// 二次绩效审核列表
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
Http
Ge
t
]
[
Http
Pos
t
]
[
Route
(
"/api/second/audit/list"
)]
[
Route
(
"/api/second/audit/list"
)]
public
ApiResponse
<
List
<
ag_secondallot
>>
AuditList
()
public
ApiResponse
<
List
<
ag_secondallot
>>
AuditList
(
[
FromBody
]
AllotDeptRequest
request
)
{
{
var
userid
=
claimService
.
GetUserId
();
var
userid
=
claimService
.
GetUserId
();
var
list
=
secondAllotService
.
AuditList
(
userid
);
var
list
=
secondAllotService
.
AuditList
(
userid
,
request
.
AllotId
);
return
new
ApiResponse
<
List
<
ag_secondallot
>>(
ResponseType
.
OK
,
"审核列表"
,
list
);
return
new
ApiResponse
<
List
<
ag_secondallot
>>(
ResponseType
.
OK
,
"审核列表"
,
list
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
05853650
...
@@ -739,7 +739,13 @@
...
@@ -739,7 +739,13 @@
二次绩效
二次绩效
</summary>
</summary>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.List"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.List(Performance.DtoModels.SetDepartmentRequest)"
>
<summary>
二次绩效列表(没有需要初始化)
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.AuditList(Performance.DtoModels.AllotRequest)"
>
<summary>
<summary>
二次绩效列表(没有需要初始化)
二次绩效列表(没有需要初始化)
</summary>
</summary>
...
...
performance/Performance.DtoModels/Request/AllotDeptRequest.cs
0 → 100644
View file @
05853650
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
AllotDeptRequest
{
public
int
AllotId
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
05853650
...
@@ -311,12 +311,12 @@ public bool SaveCompute(List<ag_compute> request)
...
@@ -311,12 +311,12 @@ public bool SaveCompute(List<ag_compute> request)
/// </summary>
/// </summary>
/// <param name="userId"></param>
/// <param name="userId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
)
public
List
<
SecondTempResponse
>
GetTemp
(
int
hospitalid
,
string
department
)
{
{
var
temps
=
perforAgtempRepository
.
GetEntities
();
var
temps
=
perforAgtempRepository
.
GetEntities
();
if
(
temps
!=
null
&&
temps
.
Any
())
if
(
temps
!=
null
&&
temps
.
Any
())
{
{
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalid
);
var
useTemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalid
&&
t
.
Department
==
department
);
var
secondTemps
=
Mapper
.
Map
<
List
<
SecondTempResponse
>>(
temps
);
var
secondTemps
=
Mapper
.
Map
<
List
<
SecondTempResponse
>>(
temps
);
if
(
useTemp
!=
null
)
if
(
useTemp
!=
null
)
secondTemps
.
ForEach
(
t
=>
t
.
IsSelected
=
t
.
Id
==
useTemp
.
UseTempId
);
secondTemps
.
ForEach
(
t
=>
t
.
IsSelected
=
t
.
Id
==
useTemp
.
UseTempId
);
...
@@ -544,16 +544,22 @@ public bool WorkloadDelete(int id)
...
@@ -544,16 +544,22 @@ public bool WorkloadDelete(int id)
/// </summary>
/// </summary>
/// <param name="userId">用户ID</param>
/// <param name="userId">用户ID</param>
/// <returns></returns>
/// <returns></returns>
public
List
<
ag_secondallot
>
AuditList
(
int
userId
)
public
List
<
ag_secondallot
>
AuditList
(
int
userId
,
int
allotId
)
{
{
var
hospital
=
perforUserhospitalRepository
.
GetEntities
(
t
=>
t
.
UserID
==
userId
);
//var hospital = perforUserhospitalRepository.GetEntities(t => t.UserID == userId);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
hospital
.
Select
(
h
=>
h
.
HospitalID
).
Contains
(
t
.
HospitalId
));
//var allotList = perforPerallotRepository.GetEntities(t => hospital.Select(h => h.HospitalID).Contains(t.HospitalId));
if
(
allotList
!=
null
&&
allotList
.
Count
>
0
)
//if (allotList != null && allotList.Count > 0)
{
//{
var
allotIds
=
allotList
.
Select
(
t
=>
t
.
ID
);
// var allotIds = allotList.Select(t => t.ID);
return
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotIds
.
Contains
(
t
.
AllotId
.
Value
)
&&
t
.
Status
==
2
);
// return perforAgsecondallotRepository.GetEntities(t => allotIds.Contains(t.AllotId.Value) && t.Status == 2);
}
//}
return
null
;
//return null;
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"所选绩效不存在!"
);
var
secondList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
&&
t
.
Status
==
2
);
return
secondList
;
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/UserService.cs
View file @
05853650
...
@@ -25,6 +25,7 @@ public class UserService : IAutoInjection
...
@@ -25,6 +25,7 @@ public class UserService : IAutoInjection
private
PerforUserroleRepository
_userroleRepository
;
private
PerforUserroleRepository
_userroleRepository
;
private
PerforImemployeeRepository
_employeeRepository
;
private
PerforImemployeeRepository
_employeeRepository
;
private
PerforPerallotRepository
_perforPerallotRepository
;
private
PerforPerallotRepository
_perforPerallotRepository
;
private
PerforImaccountbasicRepository
_perforImaccountbasicRepository
;
public
UserService
(
IOptions
<
Application
>
application
,
public
UserService
(
IOptions
<
Application
>
application
,
PerforSmsRepository
smsRepository
,
PerforSmsRepository
smsRepository
,
PerforUserRepository
userRepository
,
PerforUserRepository
userRepository
,
...
@@ -33,7 +34,8 @@ public class UserService : IAutoInjection
...
@@ -33,7 +34,8 @@ public class UserService : IAutoInjection
PerforRoleRepository
roleRepository
,
PerforRoleRepository
roleRepository
,
PerforUserroleRepository
userroleRepository
,
PerforUserroleRepository
userroleRepository
,
PerforImemployeeRepository
employeeRepository
,
PerforImemployeeRepository
employeeRepository
,
PerforPerallotRepository
perforPerallotRepository
)
PerforPerallotRepository
perforPerallotRepository
,
PerforImaccountbasicRepository
perforImaccountbasicRepository
)
{
{
this
.
application
=
application
.
Value
;
this
.
application
=
application
.
Value
;
this
.
_userRepository
=
userRepository
;
this
.
_userRepository
=
userRepository
;
...
@@ -44,6 +46,7 @@ public class UserService : IAutoInjection
...
@@ -44,6 +46,7 @@ public class UserService : IAutoInjection
this
.
_userroleRepository
=
userroleRepository
;
this
.
_userroleRepository
=
userroleRepository
;
this
.
_employeeRepository
=
employeeRepository
;
this
.
_employeeRepository
=
employeeRepository
;
this
.
_perforPerallotRepository
=
perforPerallotRepository
;
this
.
_perforPerallotRepository
=
perforPerallotRepository
;
this
.
_perforImaccountbasicRepository
=
perforImaccountbasicRepository
;
}
}
/// <summary>
/// <summary>
...
@@ -317,7 +320,7 @@ public List<sys_role> RoleList(int userId)
...
@@ -317,7 +320,7 @@ public List<sys_role> RoleList(int userId)
List
<
sys_role
>
result
=
new
List
<
sys_role
>()
{
role
};
List
<
sys_role
>
result
=
new
List
<
sys_role
>()
{
role
};
GetChildrenRole
(
roles
,
role
.
ID
,
result
);
GetChildrenRole
(
roles
,
role
.
ID
,
result
);
return
result
;
return
result
?.
Distinct
().
ToList
()
;
}
}
/// <summary>
/// <summary>
...
@@ -327,14 +330,23 @@ public List<sys_role> RoleList(int userId)
...
@@ -327,14 +330,23 @@ public List<sys_role> RoleList(int userId)
public
List
<
TitleValue
>
Department
(
int
hospitalID
)
public
List
<
TitleValue
>
Department
(
int
hospitalID
)
{
{
var
allotList
=
_perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalID
);
var
allotList
=
_perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalID
);
var
result
=
new
List
<
string
>();
if
(
allotList
!=
null
)
if
(
allotList
!=
null
)
{
{
var
idList
=
allotList
.
Select
(
s
=>
s
.
ID
).
ToList
();
var
idList
=
allotList
.
Select
(
s
=>
s
.
ID
).
ToList
();
var
department
=
_employeeRepository
.
GetEntities
(
t
=>
t
.
Department
!=
""
&&
idList
.
Contains
(
t
.
AllotID
.
Value
));
//var department = _employeeRepository.GetEntities(t => t.Department != "" && idList.Contains(t.AllotID.Value)).Select(t => t.Department);
if
(
department
!=
null
&&
department
.
Count
>
0
)
//if (department != null && department.Count() > 0)
return
department
.
Select
(
t
=>
t
.
Department
).
Distinct
().
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
OrderBy
(
t
=>
t
.
Title
).
ToList
();
// result.AddRange(department);
var
department
=
_perforImaccountbasicRepository
.
GetEntities
(
t
=>
t
.
Department
!=
""
&&
idList
.
Contains
(
t
.
AllotID
.
Value
)).
Select
(
t
=>
t
.
Department
);
if
(
department
!=
null
&&
department
.
Count
()
>
0
)
result
.
AddRange
(
department
);
if
(
result
!=
null
&&
result
.
Any
())
{
result
=
result
.
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
}
}
}
return
new
List
<
TitleValue
>
();
return
result
?.
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
ToList
();
}
}
...
...
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