start & end date & geometry added to operations item and to cropfield characteristics item

This commit is contained in:
2023-10-11 17:00:25 +02:00
parent fedd363075
commit 1cc36422a4
3 changed files with 20 additions and 9 deletions

View File

@@ -155,7 +155,7 @@ namespace FarmmapsKPI
if (useCreatedOperations == false || string.IsNullOrEmpty(_settings.OperationItemCode))
{
_logger.LogInformation("CreateOperationItemAsync ...");
crpOperationItem = await _generalService.CreateOperationItemAsync(crprecItem.Code,input.DataOperation.ToString(Formatting.None));
crpOperationItem = await _generalService.CreateOperationItemAsync(crprecItem.Code, cropYear, input.GeometryJson.ToString(Formatting.None), input.DataOperation.ToString(Formatting.None));
_settings.OperationItemCode = crpOperationItem.Code;
SaveSettings(settingsfile);
}
@@ -181,7 +181,7 @@ namespace FarmmapsKPI
if (useCreatedCropfieldCharacteristic == false)
{
_logger.LogInformation("CreateCropfieldCharacteristicItemAsync ...");
cropfieldCharacteristicItem = await _generalService.CreateCropfieldCharacteristicItemAsync(cropfieldItem.Code, input.DataCropfieldCharacteristic.ToString(Formatting.None));
cropfieldCharacteristicItem = await _generalService.CreateCropfieldCharacteristicItemAsync(cropfieldItem.Code, cropYear, input.GeometryJson.ToString(Formatting.None), input.DataCropfieldCharacteristic.ToString(Formatting.None));
_settings.CropfieldCharacteristicItemCode = cropfieldCharacteristicItem.Code;
SaveSettings(settingsfile);
}
@@ -210,7 +210,7 @@ namespace FarmmapsKPI
//Now get the KPIs for this cropfield, mounted with operations & cropyield
// Get KPI data for saving it in a file, here the generalsedrvice is called to get the KPI data
_logger.LogInformation($"GetKpiItemsForCropField({cropfieldItem.Code})");
_logger.LogInformation($"GetKpiItemsForCropField('{cropfieldItem.Code}')");
var KPIItem = await _generalService.GetKpiItemsForCropField(cropfieldItem);
//Download KPI's into a json output file for this specific cropfield (with unique cropfieldItem.Code)