焊接拍片数、合格数汇总
This commit is contained in:
@@ -844,8 +844,8 @@ namespace FineUIPro.Web.common
|
||||
|
||||
if (ndtLists.Count > 0)
|
||||
{
|
||||
//取每个单位、专业最新的一条数据
|
||||
var datalist = ndtLists.GroupBy(r => new { r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
|
||||
//取每个项目、单位、专业最新的一条数据
|
||||
var datalist = ndtLists.GroupBy(r => new { r.ProjectId, r.UnitId, r.ProfessionalName }).Select(g => g.OrderByDescending(r => r.CreateDate).First()).ToList();
|
||||
foreach (var item in datalist)
|
||||
{
|
||||
if (item.TotalQuantity.HasValue)
|
||||
@@ -854,7 +854,8 @@ namespace FineUIPro.Web.common
|
||||
b += item.TotalQuantity.Value;
|
||||
}
|
||||
}
|
||||
result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a);
|
||||
//result = Convert.ToDouble(Convert.ToDecimal(100.0) * b / a);
|
||||
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
|
||||
}
|
||||
//else
|
||||
//{
|
||||
|
||||
Reference in New Issue
Block a user