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
5231f4b6
Commit
5231f4b6
authored
Oct 14, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取科室详情参数修改
parent
2e388c4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
13 deletions
+43
-13
performance/Performance.Api/Controllers/ComputeController.cs
+12
-4
performance/Performance.DtoModels/Request/DeptDetailRequest.cs
+8
-3
performance/Performance.Services/ComputeService.cs
+23
-6
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
5231f4b6
...
...
@@ -119,12 +119,20 @@ public ApiResponse<List<DeptResponse>> GetOther([FromBody]ComputerRequest reques
[
HttpPost
]
public
ApiResponse
<
DeptDataDetails
>
DeptDetail
([
FromBody
]
DeptDetailRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
//
var allot = _allotService.GetAllot(request.AllotId);
//
if (null == allot)
//
throw new PerformanceException("当前绩效记录不存在");
//DeptDetailResponse response = _computeService.GetDepartmentDetail(request.AllotId, request.AccountID, request.Type);
var
response
=
_computeService
.
DeptDetail
(
request
.
AllotId
,
request
.
AccountID
,
request
.
Type
);
if
(
request
.
AccountID
==
0
)
{
if
(
request
.
SecondId
==
0
)
return
new
ApiResponse
<
DeptDataDetails
>(
ResponseType
.
ParameterError
,
"参数 AccountID或SecondId 无效"
);
else
request
.
AccountID
=
_computeService
.
GetAccountId
(
request
.
SecondId
);
}
var
response
=
_computeService
.
DeptDetail
(
request
.
AccountID
);
return
new
ApiResponse
<
DeptDataDetails
>(
ResponseType
.
OK
,
response
);
}
...
...
performance/Performance.DtoModels/Request/DeptDetailRequest.cs
View file @
5231f4b6
...
...
@@ -16,6 +16,11 @@ public class DeptDetailRequest
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 二次绩效id
/// </summary>
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 绩效类型(1 医生组、 2 护理组)
/// </summary>
public
int
Type
{
get
;
set
;
}
...
...
@@ -29,9 +34,9 @@ public class DetailRequestValidator : AbstractValidator<DeptDetailRequest>
{
public
DetailRequestValidator
()
{
RuleFor
(
x
=>
x
.
AllotId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
Type
).
NotNull
().
InclusiveBetween
(
1
,
5
);
RuleFor
(
x
=>
x
.
AccountID
).
NotNull
().
GreaterThan
(
0
);
//
RuleFor(x => x.AllotId).NotNull().GreaterThan(0);
//
RuleFor(x => x.Type).NotNull().InclusiveBetween(1, 5);
//
RuleFor(x => x.AccountID).NotNull().GreaterThan(0);
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
5231f4b6
...
...
@@ -24,6 +24,7 @@ public class ComputeService : IAutoInjection
private
readonly
PerforAgemployeeRepository
_perforAgemployeeRepository
;
private
readonly
PerforResbaiscnormRepository
perforResbaiscnormRepository
;
private
readonly
PerforCofincomeRepository
_perforCofincomeRepository
;
private
readonly
PerforAgsecondallotRepository
_perforAgsecondallotRepository
;
public
ComputeService
(
PerforResaccountRepository
perforResaccountRepository
,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
...
...
@@ -35,7 +36,8 @@ public class ComputeService : IAutoInjection
PerforUserRepository
perforUserRepository
,
PerforAgemployeeRepository
perforAgemployeeRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforCofincomeRepository
perforCofincomeRepository
)
PerforCofincomeRepository
perforCofincomeRepository
,
PerforAgsecondallotRepository
perforAgsecondallotRepository
)
{
this
.
perforResaccountRepository
=
perforResaccountRepository
;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
...
...
@@ -48,6 +50,7 @@ public class ComputeService : IAutoInjection
this
.
_perforAgemployeeRepository
=
perforAgemployeeRepository
;
this
.
perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
this
.
_perforCofincomeRepository
=
perforCofincomeRepository
;
this
.
_perforAgsecondallotRepository
=
perforAgsecondallotRepository
;
}
/// <summary>
...
...
@@ -306,20 +309,21 @@ public List<res_baiscnorm> GetBaiscnorm(int allotId)
/// <param name="accountId"></param>
/// <param name="type"></param>
/// <returns></returns>
public
DeptDataDetails
DeptDetail
(
int
a
llotId
,
int
accountId
,
int
type
)
public
DeptDataDetails
DeptDetail
(
int
a
ccountId
)
{
var
sheetType
=
new
List
<
int
>
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
};
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
==
type
&&
t
.
AllotID
==
allotId
&&
t
.
ID
==
accountId
);
string
typeValue
=
EnumHelper
.
GetItems
<
UnitType
>().
FirstOrDefault
(
t
=>
t
.
Value
==
t
ype
).
Name
.
ToString
();
var
doctor
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
string
typeValue
=
EnumHelper
.
GetItems
<
UnitType
>().
FirstOrDefault
(
t
=>
t
.
Value
==
doctor
.
UnitT
ype
).
Name
.
ToString
();
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
Pandect
=
Mapper
.
Map
<
PerDataAccountBaisc
>(
doctor
),
Detail
=
new
List
<
DetailDtos
>()
};
int
type
=
doctor
.
UnitType
.
Value
;
if
(
type
==
(
int
)
UnitType
.
专家组
||
type
==
(
int
)
UnitType
.
其他组
)
type
=
1
;
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
UnitType
==
type
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
&&
t
.
UnitType
==
type
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
var
persheet
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
doctor
.
AllotID
);
//科室经济
var
sheetEconomic
=
persheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
...
...
@@ -353,5 +357,18 @@ public DeptDataDetails DeptDetail(int allotId, int accountId, int type)
}
return
deptDetails
;
}
public
int
GetAccountId
(
int
secondId
)
{
var
second
=
_perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
!=
null
)
{
var
unitType
=
EnumHelper
.
GetItems
<
UnitType
>().
FirstOrDefault
(
t
=>
t
.
Name
==
second
.
UnitType
);
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
UnitType
==
unitType
.
Value
&&
t
.
Department
==
second
.
Department
);
return
account
?.
ID
??
0
;
}
return
0
;
}
}
}
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