no message

parent 45709e57
using Performance.EntityModels;
using System.Collections.Generic;
namespace Performance.DtoModels
{
public class CheckLogResponse
{
/// <summary>
/// 1、信息(info)2、警告(warn)3、错误(error)
/// </summary>
public string Level { get; set; }
/// <summary>
/// log_check集合
/// </summary>
public List<log_check> Row { get; set; }
}
}
......@@ -284,25 +284,12 @@ public List<AgainAllotResponse> GetAgainAllotNotSucceed(per_allot allot)
/// </summary>
/// <param name="allot"></param>
/// <returns></returns>
public List<CheckLogResponse> AllotCheckResult(per_allot allot)
public List<log_check> AllotCheckResult(per_allot allot)
{
List<CheckLogResponse> result = new List<CheckLogResponse>();
var list = perforLogcheckRepository.GetEntities(t => t.AllotID == allot.ID);
if (list != null)
{
//list = list.OrderBy(t => t.Type).ThenBy(t => t.ID).ToList();
Dictionary<int, string> keyValues = new Dictionary<int, string> { { 1, "info" }, { 2, "warn" }, { 3, "error" } };
foreach (var item in keyValues)
{
CheckLogResponse data = new CheckLogResponse
{
Level = item.Value,
Row = list.Where(t => t.Level == item.Key).OrderBy(t => t.Type).ThenBy(t => t.ID).ToList()
};
result.Add(data);
}
}
return result;
list = list.OrderBy(t => t.Titile).ThenBy(t => t.ID).ToList();
return list;
}
}
}
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