[#32] Documents: Add PaymentVariantSummary
This commit is contained in:
@ -19,7 +19,7 @@ namespace Elwig.Models.Dtos {
|
||||
Sections = sections;
|
||||
}
|
||||
|
||||
private static QualitySection[] GetQualitySections(IEnumerable<QualityRow> rows) {
|
||||
private static QualitySection[] GetSections(IEnumerable<QualityRow> rows) {
|
||||
var data = new List<QualitySection>();
|
||||
var currentQual = new Dictionary<double, (double AvgKmw, int Num, int Weight)>();
|
||||
var current = new Dictionary<string, (double, double, int, int)[]>();
|
||||
@ -88,7 +88,7 @@ namespace Elwig.Models.Dtos {
|
||||
.Select(r => new QualityRow(r.Key.Variety, r.Key.Attribute, r.Key.Cultivation, r.Key.Type, r.Key.QualId, r.AvgKmw, r.Key.Grad, r.Num, r.Weight))
|
||||
.ToList();
|
||||
|
||||
var data = GetQualitySections(rows);
|
||||
var data = GetSections(rows);
|
||||
if (data.Length <= 1)
|
||||
return new(data);
|
||||
|
||||
@ -105,7 +105,7 @@ namespace Elwig.Models.Dtos {
|
||||
.ThenBy(g => g.QualId)
|
||||
.ThenBy(g => g.Grad)
|
||||
.ToList();
|
||||
var typeData = GetQualitySections(typeRows);
|
||||
var typeData = GetSections(typeRows);
|
||||
if (typeData.Length <= 1)
|
||||
return new([.. typeData, .. data]);
|
||||
|
||||
@ -121,7 +121,7 @@ namespace Elwig.Models.Dtos {
|
||||
.OrderBy(g => g.QualId)
|
||||
.ThenBy(g => g.Grad)
|
||||
.ToList();
|
||||
var totalData = GetQualitySections(totalRows);
|
||||
var totalData = GetSections(totalRows);
|
||||
return new([.. totalData, .. typeData, .. data]) { UseOe = mode == 0 };
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user