Commit 18c87015 by 纪旭 韦

no message

parent c20a181b
...@@ -99,7 +99,6 @@ public class ColumnHeadsConfig ...@@ -99,7 +99,6 @@ public class ColumnHeadsConfig
new Heads{Column="人员工号",Name=nameof(ex_result_gather.PersonnelNumber)}, new Heads{Column="人员工号",Name=nameof(ex_result_gather.PersonnelNumber)},
new Heads{Column="费用类型",Name=nameof(ex_result_gather.Category)}, new Heads{Column="费用类型",Name=nameof(ex_result_gather.Category)},
new Heads{Column="费用",Name=nameof(ex_result_gather.Fee)}, new Heads{Column="费用",Name=nameof(ex_result_gather.Fee)},
new Heads{Column="来源",Name=nameof(ex_result_gather.Source)}
}; };
public static List<Heads> GatherTotal { get; } = new List<Heads> public static List<Heads> GatherTotal { get; } = new List<Heads>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.Request
{
public class GatherTotalRequest
{
public int ID { get; set; }
public string Department { get; set; }
public string Source { get; set; }
public decimal Fee { get; set; }
}
}
...@@ -17,8 +17,7 @@ public class GatherResponse ...@@ -17,8 +17,7 @@ public class GatherResponse
public class GatherInfo public class GatherInfo
{ {
public List<Heads> Heads { get; set; } public List<Heads> Heads { get; set; }
public List<ex_result_gather> Datas { get; set; } public List<GatherInfoRequest> Datas { get; set; }
public List<GatherRequest> Children { get; set; }
public int CurrentPage { get; set; } public int CurrentPage { get; set; }
public int TotalPages { get; set; } public int TotalPages { get; set; }
public int PageSize { get; set; } public int PageSize { get; set; }
...@@ -39,4 +38,21 @@ public class GatherRequest ...@@ -39,4 +38,21 @@ public class GatherRequest
public string Source { get; set; } public string Source { get; set; }
public string Category { get; set; } public string Category { get; set; }
} }
public class GatherTotalRequest
{
public int ID { get; set; }
public string Department { get; set; }
public string Source { get; set; }
public decimal Fee { get; set; }
}
public class GatherInfoRequest
{
public int ID { get; set; }
public string Department { get; set; }
public string DoctorName { get; set; }
public string PersonnelNumber { get; set; }
public string Category { get; set; }
public decimal Fee { get; set; }
}
} }
...@@ -1246,14 +1246,14 @@ public GatherInfo GetGather(int allotId, PersonParamsRequest request) ...@@ -1246,14 +1246,14 @@ public GatherInfo GetGather(int allotId, PersonParamsRequest request)
t.Name = t.Name.ToLower(); t.Name = t.Name.ToLower();
}); });
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId; Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && t.DoctorName != "" || t.PersonnelNumber != "";
if (request != null && !string.IsNullOrEmpty(request.SearchQuery)) if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery)); exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
var data = exresultgatherRepository.GetGatherForPaging(request.PageNumber, request.PageSize, exp); var data = exresultgatherRepository.GetGatherForPaging(request.PageNumber, request.PageSize, exp);
List<ex_result_gather> Info = Mapper.Map<List<ex_result_gather>>(data); List<GatherInfoRequest> Info = Mapper.Map<List<GatherInfoRequest>>(data);
GatherInfo gatherInfo = new GatherInfo() GatherInfo gatherInfo = new GatherInfo()
{ {
...@@ -1265,17 +1265,6 @@ public GatherInfo GetGather(int allotId, PersonParamsRequest request) ...@@ -1265,17 +1265,6 @@ public GatherInfo GetGather(int allotId, PersonParamsRequest request)
TotalPages = data.TotalPages TotalPages = data.TotalPages
}; };
List<GatherRequest> gatherRequest = new List<GatherRequest>();
foreach (var item in exresultgatherRepository.GetEntities(a => a.AllotId == allotId))
{
GatherRequest gatherRequest1 = new GatherRequest()
{
Source = "",
Category = item.Category
};
gatherRequest.Add(gatherRequest1);
}
gatherInfo.Children = gatherRequest;
return gatherInfo; return gatherInfo;
} }
...@@ -1288,7 +1277,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request) ...@@ -1288,7 +1277,7 @@ public GatherResponse GetGatherTotal(int allotId, PersonParamsRequest request)
t.Name = t.Name.ToLower(); t.Name = t.Name.ToLower();
}); });
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId; Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId && t.DoctorName != "" || t.PersonnelNumber != "";
if (request != null && !string.IsNullOrEmpty(request.SearchQuery)) if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery)); exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
......
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