Commit 7c42fee2 by lcx

修改名称、注释部分接口

parent f6061aaf
......@@ -142,29 +142,29 @@ public ApiResponse InpatFeeAvg([CustomizeValidator(RuleSet = "Query"), FromBody]
return new ApiResponse(ResponseType.OK, "", list);
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
[Route("medicine")]
[HttpPost]
public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
var list = reportService.Medicine(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list);
}
///// <summary>
///// 科室药占比
///// </summary>
///// <returns></returns>
//[Route("medicine")]
//[HttpPost]
//public ApiResponse Medicine([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
//{
// var list = reportService.Medicine(request.HospitalId, request.IsIndex);
// return new ApiResponse(ResponseType.OK, "", list);
//}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
[Route("income")]
[HttpPost]
public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
{
var list = reportService.Income(request.HospitalId, request.IsIndex);
return new ApiResponse(ResponseType.OK, "", list);
}
///// <summary>
///// 科室有效收入占比
///// </summary>
///// <returns></returns>
//[Route("income")]
//[HttpPost]
//public ApiResponse Income([CustomizeValidator(RuleSet = "Query"), FromBody] ReportRequest request)
//{
// var list = reportService.Income(request.HospitalId, request.IsIndex);
// return new ApiResponse(ResponseType.OK, "", list);
//}
/// <summary>
/// 月群体人均绩效
......
......@@ -1142,18 +1142,6 @@
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ReportController.Medicine(Performance.DtoModels.ReportRequest)">
<summary>
科室药占比
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ReportController.Income(Performance.DtoModels.ReportRequest)">
<summary>
科室有效收入占比
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ReportController.AvgPerfor(Performance.DtoModels.ReportRequest)">
<summary>
月群体人均绩效
......
......@@ -213,7 +213,7 @@ public IEnumerable<ex_result> QueryIncomeData(int allotid, string source, string
WHERE t1.allotid = @allotid
AND t3.unittype = @unittype
AND t3.accountingunit = @accountingunit
AND t1.Source like '%{source}开单%'
AND (t1.Source like '%{source}开单%' OR t1.Source like '%{source}就诊%')
AND T1.IsDelete = 0
ORDER BY t1.doctorname,t1.Category;";
return connection.Query<ex_result>(clear, new { allotid, accountingunit, unittype, hospitalid }, commandTimeout: 60 * 60);
......
......@@ -59,33 +59,33 @@ public List<PerReport> InpatFeeAvg(int hospitalId, List<string> date)
return DapperQuery(sql, new { date, hospitalId }).ToList();
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
public List<PerReport> Medicine(int hospitalId, List<string> date)
{
string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费') where unittype=1 and sheettype=3
and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
return DapperQuery(sql, new { hospitalId, date }).ToList();
}
// /// <summary>
// /// 科室药占比
// /// </summary>
// /// <returns></returns>
// public List<PerReport> Medicine(int hospitalId, List<string> date)
// {
// string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,0,cellvalue)) / sum(cellvalue))*100,2) value
// from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费') where unittype=1 and sheettype=3
// and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
// in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
// return DapperQuery(sql, new { hospitalId, date }).ToList();
// }
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
public List<PerReport> Income(int hospitalId, List<string> date)
{
string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费','材料费')
where unittype=1 and sheettype=3 and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
return DapperQuery(sql, new { hospitalId, date }).ToList();
}
// /// <summary>
// /// 科室有效收入占比
// /// </summary>
// /// <returns></returns>
// public List<PerReport> Income(int hospitalId, List<string> date)
// {
// string sql = @"select accountingunit x,concat(year,'-',lpad(month,2,'0')) y,round((sum(if(cd.id is null,cellvalue,0)) / sum(cellvalue))*100,2) value
// from per_allot aot join per_sheet sht on aot.id=sht.allotid join im_data dt on dt.sheetid=sht.id
//left join cof_drugtype cd on cd.allotid=dt.allotid and cd.charge=dt.TypeName and cd.chargetype in ('药费','材料费')
//where unittype=1 and sheettype=3 and sheetname like '%开单收入' and ifnull(accountingunit,'') not in ('') and concat(year,'-',lpad(month,2,'0'))
// in @date and hospitalid = @hospitalId group by year,month,accountingunit order by y asc,value desc;";
// return DapperQuery(sql, new { hospitalId, date }).ToList();
// }
#region 首页报表
/// <summary>
......
......@@ -182,53 +182,53 @@ public List<PerReport> InpatFeeAvg(int hospitalId)
return perforReportRepository.InpatFeeAvg(hospitalId, date);
}
/// <summary>
/// 科室药占比
/// </summary>
/// <returns></returns>
public List<PerReport> Medicine(int hospitalId, int isIndex)
{
var states = new List<int>() { 6, 8 };
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if (allotList == null || !allotList.Any())
throw new PerformanceException("用户未创建绩效!");
var date = new List<string>();
if (isIndex == 1)
{
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
else
{
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
}
return perforReportRepository.Medicine(hospitalId, date);
}
/// <summary>
/// 科室有效收入占比
/// </summary>
/// <returns></returns>
public List<PerReport> Income(int hospitalId, int isIndex)
{
var states = new List<int>() { 6, 8 };
var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
if (allotList == null || !allotList.Any())
throw new PerformanceException("用户未创建绩效!");
var date = new List<string>();
if (isIndex == 1)
{
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
}
else
{
date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
}
return perforReportRepository.Income(hospitalId, date);
}
///// <summary>
///// 科室药占比
///// </summary>
///// <returns></returns>
//public List<PerReport> Medicine(int hospitalId, int isIndex)
//{
// var states = new List<int>() { 6, 8 };
// var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
// if (allotList == null || !allotList.Any())
// throw new PerformanceException("用户未创建绩效!");
// var date = new List<string>();
// if (isIndex == 1)
// {
// var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
// date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
// }
// else
// {
// date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
// }
// return perforReportRepository.Medicine(hospitalId, date);
//}
///// <summary>
///// 科室有效收入占比
///// </summary>
///// <returns></returns>
//public List<PerReport> Income(int hospitalId, int isIndex)
//{
// var states = new List<int>() { 6, 8 };
// var allotList = perforPerallotRepository.GetEntities(t => t.HospitalId == hospitalId && states.Contains(t.States));
// if (allotList == null || !allotList.Any())
// throw new PerformanceException("用户未创建绩效!");
// var date = new List<string>();
// if (isIndex == 1)
// {
// var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
// date.Add(allot.Year + "-" + allot.Month.ToString().PadLeft(2, '0'));
// }
// else
// {
// date = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).Take(6).Select(t => t.Year + "-" + t.Month.ToString().PadLeft(2, '0')).ToList();
// }
// return perforReportRepository.Income(hospitalId, date);
//}
/// <summary>
/// 只支持EXCEL抽取报表数据
......
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