list = list.GroupBy(f = f.ShipmentNum).Select(f = { var o = f.FirstOrDefault(); var number = f.Sum(f1 = f1.Number); o.Number = number; var weight = f.Sum(x = x.Weight); o.Weight = weight; var meterweight = f.Sum(x = x.MeterWeight); o.MeterW
list = list.GroupBy(f => f.ShipmentNum).Select(f =>
{
var o = f.FirstOrDefault();
var number = f.Sum(f1 => f1.Number);
o.Number = number;
var weight = f.Sum(x => x.Weight);
o.Weight = weight;
var meterweight = f.Sum(x => x.MeterWeight);
o.MeterWeight = meterweight;
o.DeclareTotalPrice = o.DeclarePrice * number; // 申报总价
return o;
}).ToList();
return list;