Commit 7a5cbc16 by 李承祥

人均绩效报表分析

parent 16c964c1
......@@ -17,27 +17,29 @@ public PerforReportRepository(PerformanceDbContext context) : base(context)
/// <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";
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 IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政高层' ) THEN
'院领导绩效'
WHEN rc.FitPeople IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政中层' ) THEN
'行政职能中层绩效'
WHEN rc.FitPeople IN ( SELECT DISTINCT FitPeople FROM per_allot WHERE AccountType = '行政工勤' ) THEN
'行政工勤绩效'
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();
}
}
......
......@@ -56,7 +56,7 @@ public List<HospitalResponse> GetUserHopital(int userid)
if (hosId != null && hosId.Contains(t.HosID))
{
if (firstId != null && firstId.Count > 0)
t.HasConfig = 2;
t.HasConfig = firstId.Contains(t.HosID) ? 2 : 1;
else
t.HasConfig = 1;
//绩效列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment