Commit 7c42fee2 by lcx

修改名称、注释部分接口

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