forked from FarmMaps/FarmMapsApiClient
start & end date & geometry added to operations item and to cropfield characteristics item
This commit is contained in:
@@ -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)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[
|
||||
{
|
||||
"UseCreatedCropfield": true,
|
||||
"UseCreatedCropfield": false,
|
||||
"CropfieldItemCode": "",
|
||||
"dataCropfield": {
|
||||
//"area": 4.22,
|
||||
@@ -14,10 +14,10 @@
|
||||
"productionPurposeCode": "003"
|
||||
//"productionPurposeName": "consumption"
|
||||
},
|
||||
"UseCreatedCropRecording": true,
|
||||
"UseCreatedCropRecording": false,
|
||||
"CropRecordingItemCode": "",
|
||||
"dataCropRecording": {}, //not yet used
|
||||
"UseCreatedOperation": true,
|
||||
"UseCreatedOperation": false,
|
||||
"OperationItemCode": "",
|
||||
"dataOperation": {
|
||||
"n": "92",
|
||||
|
Reference in New Issue
Block a user