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
9a8280a4
Commit
9a8280a4
authored
Jun 26, 2019
by
799284587@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增报表
parent
deb31878
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
33 deletions
+62
-33
performance/Performance.Api/Controllers/ReportController.cs
+15
-0
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+2
-0
performance/Performance.Repository/PerforReportRepository .cs
+11
-23
performance/Performance.Services/AllotCompute/BaiscNormService.cs
+25
-9
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+1
-1
performance/Performance.Services/ReportService.cs
+8
-0
No files found.
performance/Performance.Api/Controllers/ReportController.cs
View file @
9a8280a4
...
@@ -30,5 +30,19 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re
...
@@ -30,5 +30,19 @@ public ApiResponse AvgPerfor([CustomizeValidator(RuleSet = "Query"), FromBody]Re
var
list
=
reportService
.
GetAvgPerfor
(
request
.
HospitalId
);
var
list
=
reportService
.
GetAvgPerfor
(
request
.
HospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
}
/// <summary>
/// 人群绩效比
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"avgratio"
)]
[
HttpPost
]
public
ApiResponse
AvgRatio
([
CustomizeValidator
(
RuleSet
=
"Query"
),
FromBody
]
ReportRequest
request
)
{
var
list
=
reportService
.
AvgRatio
(
request
.
HospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
,
list
);
}
}
}
}
}
\ No newline at end of file
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
9a8280a4
...
@@ -155,6 +155,8 @@ public enum PerforType
...
@@ -155,6 +155,8 @@ public enum PerforType
临床医生
,
临床医生
,
[
Description
(
"医技医生人均绩效"
)]
[
Description
(
"医技医生人均绩效"
)]
医技医生
,
医技医生
,
[
Description
(
"行政高层人均绩效"
)]
行政高层
,
[
Description
(
"行政中层人均绩效"
)]
[
Description
(
"行政中层人均绩效"
)]
行政中层
,
行政中层
,
[
Description
(
"行政工勤人均绩效"
)]
[
Description
(
"行政工勤人均绩效"
)]
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
9a8280a4
...
@@ -17,29 +17,17 @@ public PerforReportRepository(PerformanceDbContext context) : base(context)
...
@@ -17,29 +17,17 @@ public PerforReportRepository(PerformanceDbContext context) : base(context)
/// <returns></returns>
/// <returns></returns>
public
List
<
PerReport
>
GetAvgPerfor
(
int
hospitalid
)
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
string
sql
=
@"select concat(allot.year,'-',lpad(allot.month,2,'0')) x, positionname y,avgvalue value
FROM
from res_baiscnorm bc left join per_allot allot on bc.allotid = allot.id where allot.hospitalid = @hospitalid
(
order by str_to_date(concat(allot.month, '/', allot.year),'%m/%Y')"
;
SELECT rc.ID,rc.AllotID,rc.AccountingUnit,
return
DapperQuery
(
sql
,
new
{
hospitalid
}).
ToList
();
CASE
}
WHEN rc.FitPeople IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政高层' ) THEN
'院领导绩效'
public
List
<
PerReport
>
AvgRatio
(
int
hospitalid
)
WHEN rc.FitPeople IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政中层' ) THEN
{
'行政职能中层绩效'
string
sql
=
@"select concat(allot.year,'-',lpad(allot.month,2,'0')) x, bc.PositionName y,round(bc.AvgValue / rbn.AvgValue,2) value
WHEN rc.FitPeople IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政工勤' ) THEN
from res_baiscnorm bc left join res_baiscnorm rbn on bc.AllotID = rbn.AllotID and rbn.PositionName = '临床科室主任人均绩效'
'行政工勤绩效'
LEFT JOIN per_allot allot ON bc.AllotID = allot.ID where allot.hospitalid = @hospitalid order by value desc;"
;
WHEN rc.FitPeople IN ( '临床科室主任人均绩效', '临床科室副主任人均绩效', '医技科室主任人均绩效', '医技科室副主任人均绩效' ) THEN
'临床主任绩效'
WHEN rc.FitPeople IN ( '护士长人均绩效' ) 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
();
return
DapperQuery
(
sql
,
new
{
hospitalid
}).
ToList
();
}
}
}
}
...
...
performance/Performance.Services/AllotCompute/BaiscNormService.cs
View file @
9a8280a4
...
@@ -61,7 +61,9 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
...
@@ -61,7 +61,9 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
//行政绩效平均值项目
//行政绩效平均值项目
new
{
type
=
AccountUnitType
.
行政中层
,
reference
=
PerforType
.
行政中层
},
new
{
type
=
AccountUnitType
.
行政中层
,
reference
=
PerforType
.
行政中层
},
new
{
type
=
AccountUnitType
.
行政工勤
,
reference
=
PerforType
.
行政工勤
},
new
{
type
=
AccountUnitType
.
行政工勤
,
reference
=
PerforType
.
行政工勤
},
new
{
type
=
AccountUnitType
.
行政高层
,
reference
=
PerforType
.
行政高层
},
};
};
foreach
(
var
item
in
keyList
)
foreach
(
var
item
in
keyList
)
{
{
var
count
=
empolyeeList
.
Count
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
());
var
count
=
empolyeeList
.
Count
(
t
=>
t
.
AccountType
==
item
.
type
.
ToString
());
...
@@ -107,22 +109,36 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
...
@@ -107,22 +109,36 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
}
}
/// <summary>
/// <summary>
/// 获取临床护士平均绩效
/// 获取临床
医生
护士平均绩效
/// </summary>
/// </summary>
/// <param name="list"></param>
/// <param name="list"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
res_baiscnorm
>
NurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
PerSheet
>
list
)
public
List
<
res_baiscnorm
>
Docter
NurseBaiscnorm
(
List
<
res_baiscnorm
>
baiscnormList
,
List
<
PerSheet
>
list
)
{
{
var
sheet
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseAccount
);
// 护士
var
perdata
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountNurse
)
t
);
var
sheetNurse
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseAccount
);
var
baiscnorm
=
new
res_baiscnorm
var
perdataNurse
=
sheetNurse
.
PerData
.
Select
(
t
=>
(
PerDataAccountNurse
)
t
);
var
baiscnormNurse
=
new
res_baiscnorm
{
{
PositionName
=
EnumHelper
.
GetDescription
(
PerforType
.
护士
),
PositionName
=
EnumHelper
.
GetDescription
(
PerforType
.
护士
),
TotelNumber
=
perdata
.
Sum
(
t
=>
t
.
Number
),
TotelNumber
=
perdata
Nurse
.
Sum
(
t
=>
t
.
Number
),
TotelValue
=
perdata
.
Sum
(
t
=>
t
.
PerforTotal
),
TotelValue
=
perdata
Nurse
.
Sum
(
t
=>
t
.
PerforTotal
),
AvgValue
=
perdata
.
Sum
(
t
=>
t
.
PerforTotal
)
/
perdata
.
Sum
(
t
=>
t
.
Number
)
AvgValue
=
perdata
Nurse
.
Sum
(
t
=>
t
.
PerforTotal
)
/
perdataNurse
.
Sum
(
t
=>
t
.
Number
)
};
};
baiscnormList
.
Add
(
baiscnorm
);
baiscnormList
.
Add
(
baiscnormNurse
);
// 医生
var
sheetDocter
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeDoctorAccount
);
var
perdataDocter
=
sheetDocter
.
PerData
.
Select
(
t
=>
(
PerDataAccountDoctor
)
t
);
var
baiscnormDocter
=
new
res_baiscnorm
{
PositionName
=
EnumHelper
.
GetDescription
(
PerforType
.
临床医生
),
TotelNumber
=
perdataDocter
.
Sum
(
t
=>
t
.
Number
),
TotelValue
=
perdataDocter
.
Sum
(
t
=>
t
.
PerforTotal
),
AvgValue
=
perdataDocter
.
Sum
(
t
=>
t
.
PerforTotal
)
/
perdataDocter
.
Sum
(
t
=>
t
.
Number
)
};
baiscnormList
.
Add
(
baiscnormDocter
);
return
baiscnormList
;
return
baiscnormList
;
}
}
}
}
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
9a8280a4
...
@@ -51,7 +51,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
...
@@ -51,7 +51,7 @@ public List<res_baiscnorm> Compute(per_allot allot, PerExcel excel, List<PerShee
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
//计算 绩效标准 基数(科主任、副主任、护士长 =>> 平均值)
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
List
<
res_baiscnorm
>
baiscnormList
=
new
List
<
res_baiscnorm
>();
baiscNormService
.
ComputeAvg
(
baiscnormList
,
computResult
,
empolyeeList
);
baiscNormService
.
ComputeAvg
(
baiscnormList
,
computResult
,
empolyeeList
);
baiscNormService
.
NurseBaiscnorm
(
baiscnormList
,
perSheets
);
baiscNormService
.
Docter
NurseBaiscnorm
(
baiscnormList
,
perSheets
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees
,
allot
,
baiscnormList
);
//计算 行政人员 平均值
//计算 行政人员 平均值
...
...
performance/Performance.Services/ReportService.cs
View file @
9a8280a4
...
@@ -22,5 +22,13 @@ public List<PerReport> GetAvgPerfor(int hospitalid)
...
@@ -22,5 +22,13 @@ public List<PerReport> GetAvgPerfor(int hospitalid)
{
{
return
perforReportRepository
.
GetAvgPerfor
(
hospitalid
);
return
perforReportRepository
.
GetAvgPerfor
(
hospitalid
);
}
}
/// <summary>
/// 人群绩效比
/// </summary>
/// <returns></returns>
public
List
<
PerReport
>
AvgRatio
(
int
hospitalid
)
{
return
perforReportRepository
.
AvgRatio
(
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