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
b0d88cc9
Commit
b0d88cc9
authored
Mar 26, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室绩效详情
parent
3cec2fbd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
276 additions
and
0 deletions
+276
-0
performance/Performance.Api/Controllers/ComputeController.cs
+42
-0
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+2
-0
performance/Performance.DtoModels/PerExcel/PerDataAccount.cs
+89
-0
performance/Performance.DtoModels/Request/DeptDetailRequest.cs
+37
-0
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
+19
-0
performance/Performance.Services/ComputeService.cs
+87
-0
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
0 → 100644
View file @
b0d88cc9
using
FluentValidation.AspNetCore
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Caching.Memory
;
using
Microsoft.Extensions.Options
;
using
Newtonsoft.Json.Linq
;
using
Performance.DtoModels
;
using
Performance.DtoModels.AppSettings
;
using
Performance.Infrastructure
;
using
Performance.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
[
Route
(
"api/[controller]"
)]
public
class
ComputeController
:
Controller
{
private
ComputeService
_computeService
;
private
AllotService
_allotService
;
public
ComputeController
(
AllotService
allotService
,
ComputeService
computeService
)
{
_allotService
=
allotService
;
_computeService
=
computeService
;
}
[
Route
(
"deptdetail"
)]
[
HttpPost
]
public
ApiResponse
<
DeptDetailResponse
>
DeptDetail
([
FromBody
]
DeptDetailRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
DeptDetailResponse
response
=
_computeService
.
GetDepartmentDetail
(
request
);
return
new
ApiResponse
<
DeptDetailResponse
>(
ResponseType
.
OK
,
response
);
}
}
}
\ No newline at end of file
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
b0d88cc9
...
...
@@ -98,7 +98,9 @@ public AutoMapperConfigs()
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>();
CreateMap
<
PerDataSpecialUnit
,
im_specialunit
>();
CreateMap
<
PerDataAccountDoctor
,
res_accountdoctor
>();
CreateMap
<
res_accountdoctor
,
PerDataAccount
>();
CreateMap
<
PerDataAccountNurse
,
res_accountnurse
>();
CreateMap
<
res_accountnurse
,
PerDataAccount
>();
CreateMap
<
res_accountdoctor
,
ComputeSource
>();
CreateMap
<
res_accountnurse
,
ComputeSource
>();
...
...
performance/Performance.DtoModels/PerExcel/PerDataAccount.cs
0 → 100644
View file @
b0d88cc9
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerDataAccount
:
IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数量
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 医生基础系数
/// </summary>
public
Nullable
<
decimal
>
BasicFactor
{
get
;
set
;
}
/// <summary>
/// 倾斜系数
/// </summary>
public
Nullable
<
decimal
>
SlopeFactor
{
get
;
set
;
}
/// <summary>
/// 其他绩效1
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor1
{
get
;
set
;
}
/// <summary>
/// 其他绩效2
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor2
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Extra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
AdjustFactor
{
get
;
set
;
}
/// <summary>
/// 科室业绩
/// </summary>
public
Nullable
<
decimal
>
Income
{
get
;
set
;
}
/// <summary>
/// 业绩绩效
/// </summary>
public
Nullable
<
decimal
>
PerforFee
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
WorkloadFee
{
get
;
set
;
}
/// <summary>
/// 绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforTotal
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
Nullable
<
decimal
>
Avg
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
GiveFee
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Request/DeptDetailRequest.cs
0 → 100644
View file @
b0d88cc9
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
/// <summary>
/// 查看科室绩效详情
/// </summary>
public
class
DeptDetailRequest
:
ApiRequest
{
/// <summary>
/// 绩效id
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 绩效类型(1 医生组、 2 护理组)
/// </summary>
public
int
Type
{
get
;
set
;
}
/// <summary>
/// 汇总ID
/// </summary>
public
int
AccountID
{
get
;
set
;
}
}
public
class
DetailRequestValidator
:
AbstractValidator
<
DeptDetailRequest
>
{
public
DetailRequestValidator
()
{
RuleFor
(
x
=>
x
.
AllotId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
Type
).
NotNull
().
InclusiveBetween
(
1
,
2
);
RuleFor
(
x
=>
x
.
AccountID
).
NotNull
().
GreaterThan
(
0
);
}
}
}
performance/Performance.DtoModels/Response/DeptDetailResponse.cs
0 → 100644
View file @
b0d88cc9
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
DeptDetailResponse
{
public
PerDataAccount
Pandect
{
get
;
set
;
}
public
List
<
DeptDetail
>
Economic
{
get
;
set
;
}
public
List
<
DeptDetail
>
Workload
{
get
;
set
;
}
}
public
class
DeptDetail
{
public
string
ItemName
{
get
;
set
;
}
public
decimal
ItemValue
{
get
;
set
;
}
}
}
performance/Performance.Services/ComputeService.cs
0 → 100644
View file @
b0d88cc9
using
AutoMapper
;
using
Performance.DtoModels
;
using
Performance.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
class
ComputeService
:
IAutoInjection
{
private
PerforResAccountdoctorRepository
_perforResAccountdoctorRepository
;
private
PerforResAccountnurseRepository
_perforResAccountnurseRepository
;
private
PerforPerSheetRepository
_perforPerSheetRepository
;
private
PerforImDataRepository
_perforImDataRepository
;
public
ComputeService
(
PerforResAccountdoctorRepository
perforResAccountdoctorRepository
,
PerforResAccountnurseRepository
perforResAccountnurseRepository
,
PerforPerSheetRepository
perforPerSheetRepository
,
PerforImDataRepository
perforImDataRepository
)
{
_perforResAccountdoctorRepository
=
perforResAccountdoctorRepository
;
_perforResAccountnurseRepository
=
perforResAccountnurseRepository
;
_perforPerSheetRepository
=
perforPerSheetRepository
;
_perforImDataRepository
=
perforImDataRepository
;
}
/// <summary>
/// 返回科室详情
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
DeptDetailResponse
GetDepartmentDetail
(
DeptDetailRequest
request
)
{
var
sheetList
=
_perforPerSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
request
.
AllotId
);
if
(
request
.
Type
==
1
)
{
var
doctor
=
_perforResAccountdoctorRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
request
.
AllotId
&&
t
.
ID
==
request
.
AccountID
);
DeptDetailResponse
response
=
new
DeptDetailResponse
()
{
Pandect
=
Mapper
.
Map
<
PerDataAccount
>(
doctor
),
Economic
=
new
List
<
DeptDetail
>(),
Workload
=
new
List
<
DeptDetail
>()
};
var
sheetWorkload
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeDoctorWorkload
);
if
(
sheetWorkload
==
null
)
return
null
;
var
dataWorkloadList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetWorkload
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
dataWorkloadList
.
ForEach
(
t
=>
response
.
Workload
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
var
sheetEconomic
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
if
(
sheetEconomic
==
null
)
return
null
;
var
dataEconomicList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetEconomic
.
ID
&&
t
.
UnitType
==
1
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
doctor
.
AccountingUnit
);
dataEconomicList
.
ForEach
(
t
=>
response
.
Economic
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
return
response
;
}
else
if
(
request
.
Type
==
2
)
{
var
nurse
=
_perforResAccountnurseRepository
.
GetEntity
(
t
=>
t
.
AllotID
==
request
.
AllotId
&&
t
.
ID
==
request
.
AccountID
);
DeptDetailResponse
response
=
new
DeptDetailResponse
()
{
Pandect
=
Mapper
.
Map
<
PerDataAccount
>(
nurse
),
Economic
=
new
List
<
DeptDetail
>(),
Workload
=
new
List
<
DeptDetail
>()
};
var
sheetWorkload
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeNurseWorkload
);
if
(
sheetWorkload
==
null
)
return
null
;
var
dataWorkloadList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetWorkload
.
ID
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
nurse
.
AccountingUnit
);
dataWorkloadList
.
ForEach
(
t
=>
response
.
Workload
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
var
sheetEconomic
=
sheetList
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
(
int
)
SheetType
.
ComputeEconomic
);
if
(
sheetEconomic
==
null
)
return
null
;
var
dataEconomicList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetEconomic
.
ID
&&
t
.
UnitType
==
2
&&
t
.
IsTotal
!=
1
&&
t
.
AccountingUnit
==
nurse
.
AccountingUnit
);
dataEconomicList
.
ForEach
(
t
=>
response
.
Economic
.
Add
(
new
DeptDetail
{
ItemName
=
t
.
TypeName
,
ItemValue
=
t
.
CellValue
??
0
}));
}
return
null
;
}
}
}
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