fix mapping
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good
This commit is contained in:
@@ -154,6 +154,7 @@ namespace FarmMapsAPI.Carbon
|
||||
Crops = new List<OrgManureApplied> {
|
||||
new OrgManureApplied {
|
||||
Crop = cropYear.MiterraCropName,
|
||||
CropRes = cropYear.CropRes,
|
||||
OrganicManures =
|
||||
cropYear.OrganicManures.Select(x => new OrganicManureType { Type = x.Type, Quantity = x.Quantity }).ToList(),
|
||||
CropYield = cropYear.CropYield } }
|
||||
@@ -175,7 +176,7 @@ namespace FarmMapsAPI.Carbon
|
||||
var crop = mappedCropData.SingleOrDefault(x => x.Year == crops.Year);
|
||||
if (crop == null)
|
||||
{
|
||||
mappedCropData.Add(new HistoricalCropData { Year = crops.Year, Crops = new List<OrgManureApplied> { new OrgManureApplied { Crop = cropMapping.MiterraRothCCrop, OrganicManures = orgManure, CropYield = cropYear.CropYield } } });
|
||||
mappedCropData.Add(new HistoricalCropData { Year = crops.Year, Crops = new List<OrgManureApplied> { new OrgManureApplied { Crop = cropMapping.MiterraRothCCrop, OrganicManures = orgManure, CropYield = cropYear.CropYield, CropRes = cropYear.CropRes } } });
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -184,7 +185,7 @@ namespace FarmMapsAPI.Carbon
|
||||
}
|
||||
else
|
||||
{
|
||||
mappedCropData.Add(new HistoricalCropData { Year = crops.Year, Crops = new List<OrgManureApplied> { new OrgManureApplied { Crop = cropYear.CropCode, OrganicManures = null, CropYield = cropYear.CropYield } } });
|
||||
mappedCropData.Add(new HistoricalCropData { Year = crops.Year, Crops = new List<OrgManureApplied> { new OrgManureApplied { Crop = cropYear.CropCode, OrganicManures = null, CropYield = cropYear.CropYield, CropRes = cropYear.CropRes } } });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,10 +85,10 @@ namespace FarmMapsAPI.Carbon.Models
|
||||
public enum QualityFarmMaps
|
||||
{
|
||||
[EnumMember(Value = "Goed")]
|
||||
Good,
|
||||
Good = 1,
|
||||
[EnumMember(Value = "Matig")]
|
||||
Average,
|
||||
Average = 2,
|
||||
[EnumMember(Value = "Slecht")]
|
||||
Bad
|
||||
Bad = 3
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user