use miterra greenmanure
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good

This commit is contained in:
2021-07-16 11:05:51 +02:00
parent 4cdfb52b33
commit cb981ef805

View File

@@ -195,11 +195,11 @@ namespace FarmMapsAPI.Carbon
{
continue;
}
var greenManure = mappingGreenManureFarmmapsMiterraRothC.FirstOrDefault(x => x.CropCode == cropYear.CropCode && x.PurposeCode == "118");
var greenManure = cropYear.CropCode;// mappingGreenManureFarmmapsMiterraRothC.FirstOrDefault(x => x.CropCode == cropYear.CropCode && x.PurposeCode == "118");
var manureYear = greenManures.SingleOrDefault(x => x.Year == crops.Year);
if (manureYear == null)
{
greenManures.Add(new GreenManure { Year = crops.Year, GreenManureTypes = new List<GreenManureType> { new GreenManureType { Type = greenManure.MiterraRothCCrop, Quality = cropYear.Quality == QualityFarmMaps.Good ? Quality.Good : cropYear.Quality == QualityFarmMaps.Bad ? Quality.Bad : Quality.Average } } });
greenManures.Add(new GreenManure { Year = crops.Year, GreenManureTypes = new List<GreenManureType> { new GreenManureType { Type = greenManure, Quality = cropYear.Quality == QualityFarmMaps.Good ? Quality.Good : cropYear.Quality == QualityFarmMaps.Bad ? Quality.Bad : Quality.Average } } });
}
}
}