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
f864d218
Commit
f864d218
authored
Apr 04, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配科室详情
parent
ae1699bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
9 deletions
+62
-9
performance/Performance.Api/Controllers/AgainAllotController.cs
+34
-1
performance/Performance.Api/Controllers/ComputeController.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+27
-7
No files found.
performance/Performance.Api/Controllers/AgainAllotController.cs
View file @
f864d218
...
...
@@ -5,7 +5,9 @@
using
Microsoft.AspNetCore.Http.Internal
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Services
;
...
...
@@ -27,21 +29,27 @@ namespace Performance.Api.Controllers
public
class
AgainAllotController
:
Controller
{
private
AgainAllotService
againAllotService
;
private
ComputeService
computeService
;
private
ClaimService
claimService
;
private
AllotService
allotService
;
private
IHostingEnvironment
evn
;
private
ConfigService
configService
;
private
Application
application
;
public
AgainAllotController
(
AgainAllotService
againAllotService
,
ClaimService
claimService
,
AllotService
allotService
,
IHostingEnvironment
evn
,
ConfigService
configService
)
ConfigService
configService
,
ComputeService
computeService
,
IOptions
<
Application
>
options
)
{
this
.
againAllotService
=
againAllotService
;
this
.
claimService
=
claimService
;
this
.
allotService
=
allotService
;
this
.
evn
=
evn
;
this
.
configService
=
configService
;
this
.
computeService
=
computeService
;
this
.
application
=
options
.
Value
;
}
/// <summary>
...
...
@@ -105,6 +113,31 @@ public ApiResponse Import([FromForm] IFormCollection form)
}
/// <summary>
/// 查看科室绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"departmentdetail"
)]
[
HttpPost
]
public
ApiResponse
DepartmentDetail
([
CustomizeValidator
(
RuleSet
=
"Generate"
),
FromBody
]
AgainAllotRequest
request
)
{
var
user
=
claimService
.
At
(
request
);
var
again
=
againAllotService
.
GetAgainallot
(
request
.
AgainAllotID
);
if
(
user
.
Role
.
First
().
RoleID
==
application
.
DirectorRole
)
{
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
user
.
Department
,
1
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
else
if
(
user
.
Role
.
First
().
RoleID
==
application
.
NurseRole
)
{
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
user
.
Department
,
2
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
return
new
ApiResponse
(
ResponseType
.
Fail
,
"当前用户角色无法识别"
);
}
/// <summary>
/// 生成绩效
/// </summary>
/// <param name="request"></param>
...
...
performance/Performance.Api/Controllers/ComputeController.cs
View file @
f864d218
...
...
@@ -104,7 +104,7 @@ public ApiResponse<DeptDetailResponse> DeptDetail([FromBody]DeptDetailRequest re
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
DeptDetailResponse
response
=
_computeService
.
GetDepartmentDetail
(
request
);
DeptDetailResponse
response
=
_computeService
.
GetDepartmentDetail
(
request
.
AllotId
,
request
.
AccountID
,
request
.
Type
);
return
new
ApiResponse
<
DeptDetailResponse
>(
ResponseType
.
OK
,
response
);
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
f864d218
...
...
@@ -110,17 +110,37 @@ public List<NurseResponse> GetNursePerformance(int allotId)
return
nurse
;
}
public
DeptDetailResponse
GetDepartmentDetail
(
int
allotId
,
string
department
,
int
type
)
{
if
(
type
==
1
)
{
var
accountList
=
_perforResAccountdoctorRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
AccountingUnit
==
department
);
if
(
accountList
!=
null
)
return
GetDepartmentDetail
(
allotId
,
accountList
.
First
().
ID
,
type
);
}
else
if
(
type
==
2
)
{
var
accountList
=
_perforResAccountnurseRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
AccountingUnit
==
department
);
if
(
accountList
!=
null
)
return
GetDepartmentDetail
(
allotId
,
accountList
.
First
().
ID
,
type
);
}
return
null
;
}
/// <summary>
/// 返回科室详情
/// </summary>
/// <param name="request"></param>
/// <param name="allotId"></param>
/// <param name="accountId"></param>
/// <param name="type"> 1 医生组 2 护理组</param>
/// <returns></returns>
public
DeptDetailResponse
GetDepartmentDetail
(
DeptDetailRequest
request
)
public
DeptDetailResponse
GetDepartmentDetail
(
int
allotId
,
int
accountId
,
int
type
)
{
var
sheetList
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
request
.
A
llotId
);
if
(
request
.
T
ype
==
1
)
var
sheetList
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
a
llotId
);
if
(
t
ype
==
1
)
{
var
doctor
=
_perforResAccountdoctorRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
request
.
AllotId
&&
t
.
ID
==
request
.
AccountID
);
var
doctor
=
_perforResAccountdoctorRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
DeptDetailResponse
response
=
new
DeptDetailResponse
()
{
...
...
@@ -145,9 +165,9 @@ public DeptDetailResponse GetDepartmentDetail(DeptDetailRequest request)
return
response
;
}
else
if
(
request
.
T
ype
==
2
)
else
if
(
t
ype
==
2
)
{
var
nurse
=
_perforResAccountnurseRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
request
.
AllotId
&&
t
.
ID
==
request
.
AccountID
);
var
nurse
=
_perforResAccountnurseRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
DeptDetailResponse
response
=
new
DeptDetailResponse
()
{
Pandect
=
Mapper
.
Map
<
PerDataAccount
>(
nurse
),
...
...
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