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> {
|
Crops = new List<OrgManureApplied> {
|
||||||
new OrgManureApplied {
|
new OrgManureApplied {
|
||||||
Crop = cropYear.MiterraCropName,
|
Crop = cropYear.MiterraCropName,
|
||||||
|
CropRes = cropYear.CropRes,
|
||||||
OrganicManures =
|
OrganicManures =
|
||||||
cropYear.OrganicManures.Select(x => new OrganicManureType { Type = x.Type, Quantity = x.Quantity }).ToList(),
|
cropYear.OrganicManures.Select(x => new OrganicManureType { Type = x.Type, Quantity = x.Quantity }).ToList(),
|
||||||
CropYield = cropYear.CropYield } }
|
CropYield = cropYear.CropYield } }
|
||||||
@@ -175,7 +176,7 @@ namespace FarmMapsAPI.Carbon
|
|||||||
var crop = mappedCropData.SingleOrDefault(x => x.Year == crops.Year);
|
var crop = mappedCropData.SingleOrDefault(x => x.Year == crops.Year);
|
||||||
if (crop == null)
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -184,7 +185,7 @@ namespace FarmMapsAPI.Carbon
|
|||||||
}
|
}
|
||||||
else
|
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
|
public enum QualityFarmMaps
|
||||||
{
|
{
|
||||||
[EnumMember(Value = "Goed")]
|
[EnumMember(Value = "Goed")]
|
||||||
Good,
|
Good = 1,
|
||||||
[EnumMember(Value = "Matig")]
|
[EnumMember(Value = "Matig")]
|
||||||
Average,
|
Average = 2,
|
||||||
[EnumMember(Value = "Slecht")]
|
[EnumMember(Value = "Slecht")]
|
||||||
Bad
|
Bad = 3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user