Commit 0a9aedaa by lcx

获取数据添加条件 - 医院

parent 3deb2184
......@@ -54,17 +54,13 @@ 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;
}
......
......@@ -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