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
f16410ad
Commit
f16410ad
authored
May 07, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月群体人均绩效
parent
69cd2acf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
146 additions
and
0 deletions
+146
-0
performance/Performance.Api/Controllers/ReportController.cs
+35
-0
performance/Performance.DtoModels/Request/ReportRequest.cs
+22
-0
performance/Performance.EntityModels/Report/PerReport.cs
+19
-0
performance/Performance.Repository/PerforReportRepository .cs
+44
-0
performance/Performance.Services/ReportService.cs
+26
-0
No files found.
performance/Performance.Api/Controllers/ReportController.cs
0 → 100644
View file @
f16410ad
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
FluentValidation.AspNetCore
;
using
Microsoft.AspNetCore.Mvc
;
using
Performance.DtoModels
;
using
Performance.Services
;
namespace
Performance.Api.Controllers
{
[
Route
(
"api/[controller]"
)]
public
class
ReportController
:
Controller
{
private
ReportService
reportService
;
public
ReportController
(
ReportService
reportService
)
{
this
.
reportService
=
reportService
;
}
/// <summary>
/// 月群体人均绩效
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"getperforavg"
)]
[
HttpPost
]
public
ApiResponse
AvgPerfor
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
{
var
list
=
reportService
.
GetAvgPerfor
(
request
.
HospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
}
}
\ No newline at end of file
performance/Performance.DtoModels/Request/ReportRequest.cs
0 → 100644
View file @
f16410ad
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
ReportRequest
:
ApiRequest
{
public
int
HospitalId
{
get
;
set
;
}
}
public
class
ReportRequestValidator
:
AbstractValidator
<
ReportRequest
>
{
public
ReportRequestValidator
()
{
RuleSet
(
"Query"
,
()
=>
{
RuleFor
(
x
=>
x
.
HospitalId
).
NotNull
().
GreaterThan
(
0
);
});
}
}
}
performance/Performance.EntityModels/Report/PerReport.cs
0 → 100644
View file @
f16410ad
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.EntityModels
{
public
class
PerReport
{
public
string
X
{
get
;
set
;
}
public
string
Y
{
get
;
set
;
}
public
string
Value
{
get
;
set
;
}
public
string
Type
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforReportRepository .cs
0 → 100644
View file @
f16410ad
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
namespace
Performance.Repository
{
public
partial
class
PerforReportRepository
:
PerforRepository
<
PerReport
>
{
public
PerforReportRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
/// <summary>
/// 月群体人均绩效
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
GetAvgPerfor
(
int
hospitalid
)
{
string
sql
=
@"SELECT
t.date x,t.FitPeople y,ROUND(IFNULL(SUM(t.RealGiveFee),0)/count(1) ,2) value
FROM
(
SELECT rc.ID,rc.AllotID,rc.AccountingUnit,
CASE
WHEN rc.FitPeople = '临床科室主任人均绩效' THEN
'院领导绩效'
WHEN rc.FitPeople = '临床科室中层人均绩效' THEN
'行政职能中层绩效'
WHEN rc.FitPeople IN ( '临床科室护士人均绩效的95%', '临床科室护士长人均绩效', '' ) THEN
'行政工勤绩效'
WHEN rc.FitPeople IN ( '科室主任人均绩效', '科室副主任人均绩效' ) THEN
'临床主任绩效'
WHEN rc.FitPeople = '科室护士长人均绩效' THEN
'临床护理绩效'
END FitPeople,
rc.RealGiveFee,date_format( str_to_date( CONCAT( allot.`Month`, '/', allot.`Year` ), '%m/%Y' ), '%Y-%m' ) date
FROM res_compute rc LEFT JOIN per_allot allot ON rc.AllotID = allot.ID
WHERE allot.HospitalId=@hospitalid ) t
GROUP BY t.date,t.FitPeople"
;
return
DapperQuery
(
sql
,
new
{
hospitalid
}).
ToList
();
}
}
}
performance/Performance.Services/ReportService.cs
0 → 100644
View file @
f16410ad
using
Performance.EntityModels
;
using
Performance.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.Services
{
public
class
ReportService
:
IAutoInjection
{
private
PerforReportRepository
perforReportRepository
;
public
ReportService
(
PerforReportRepository
perforReportRepository
)
{
this
.
perforReportRepository
=
perforReportRepository
;
}
/// <summary>
/// 月群体人均绩效
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
GetAvgPerfor
(
int
hospitalid
)
{
return
perforReportRepository
.
GetAvgPerfor
(
hospitalid
);
}
}
}
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