Commit df42baec by 纪旭 韦

类型下拉框补全

parent c614ea10
......@@ -1137,7 +1137,7 @@ public ComparisonResponse GetComparison(ComparisonPagingRequest request)
public List<GatherDropResponse> GetGatherDrop(int allotId)
{
var perSheets = perforPersheetRepository.GetEntities(t => t.AllotID == allotId && new[] { 3, 4, 7 }.Contains(t.SheetType.Value)).ToList();
var perSheets = perforPersheetRepository.GetEntities(t => t.AllotID == allotId && new[] { 3, 4, 7 }.Contains(t.SheetType.Value));
if (perSheets == null || !perSheets.Any())
{
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
......@@ -1160,18 +1160,16 @@ public List<GatherDropResponse> GetGatherDrop(int allotId)
var imHeaders = imheaderRepository.GetEntities(t => t.AllotID == allotId);
foreach (var item in exresultgatherRepository.GetEntities(t => t.AllotId == allotId))
{
perSheets.Add(
new per_sheet
{
SheetName = item.Source
}
);
var exresultgather = exresultgatherRepository.GetEntities(t => t.AllotId == allotId);
foreach (var item in exresultgather.Select(t => new { t.Category,t.Source}).Distinct())
{
int id = perSheets.Where(t => t.SheetName.Contains(item.Source)).Select(t => new { t.ID }).ToList()[0].ID;
imHeaders.Add(
new im_header
{
SheetID = id,
CellValue = item.Category
}
);
......@@ -1182,7 +1180,7 @@ public List<GatherDropResponse> GetGatherDrop(int allotId)
foreach (var sheet in perSheets)
{
var drop = new GatherDropResponse();
var header = imHeaders.Where(t => t.SheetID == sheet.ID && !cellValue.Contains(t.CellValue)).Select(t => t.CellValue).Distinct();
var header = imHeaders.Where(t => t.SheetID == sheet.ID && !cellValue.Contains(t.CellValue)).Select(t => t.CellValue).Distinct();
drop.Label = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/;
drop.Value = Regex.Replace(sheet.SheetName.Replace(" ", "").Replace(".", ""), "[0-9]", "")/*sheet.SheetName.Split(' ')[1]*/;
drop.Children = header.Select(t => new GatherDropResponse() { Label = t, Value = t }).ToList();
......
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