Commit 0a9aedaa by lcx

获取数据添加条件 - 医院

parent 3deb2184
......@@ -54,21 +54,17 @@ public class ComputerAliasRequest
public string[] Heads { get; set; }
}
public abstract class BeginEndTimeDown
public class BeginEndTime
{
public string BeginTime { get; set; } // 2021-01
public string EndTime { get; set; } // 2021-08
public int HospitalId { get; set; }
public List<TitleValue> Search { get; set; }
public string SortBy { get; set; }
}
public class BeginEndTime : BeginEndTimeDown
{
public int CurrentPage { get; set; } = 0;
public int PageSize { get; set; } = 0;
}
public class HospitalGrantSummary : BeginEndTime
{
public List<string> GroupBy { get; set; }
......@@ -84,7 +80,7 @@ public class QueryComputeByDateGetPage : GetPage
{
public List<dynamic> Data { get; set; }
public Dictionary<string, decimal> TotalData { get; set; }
}
public class GetPage
......
......@@ -407,7 +407,7 @@ public List<dynamic> QueryComputeByDate(string viewName, BeginEndTime request)
{
var sql = $@"SELECT * FROM {viewName}
where STR_TO_DATE(concat(Year,'-',Month,'-01'),'%Y-%m-%d') >= @beginTime
and STR_TO_DATE(concat(Year,'-',Month,'-01'),'%Y-%m-%d') < @endTime";
and STR_TO_DATE(concat(Year,'-',Month,'-01'),'%Y-%m-%d') < @endTime and hospitalid = {request.HospitalId}";
if (request.Search != null && request.Search.Any(w => !string.IsNullOrEmpty(w.Title) && !string.IsNullOrEmpty(w.Value)))
{
......
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