updated names of output KPI B1 and B2 + added yieldStraw to output (non functional)

This commit is contained in:
2024-03-07 10:37:27 +01:00
parent 84f27db16e
commit 67014e20f5
4 changed files with 79 additions and 30 deletions

View File

@@ -401,8 +401,51 @@ namespace FarmmapsKPI
if (kpio.id != null)
{
if (kpio.id != kpioPrevious.id)
{
{
KPIelementsOfBalance kPIelementsOfBalance = kpio.data.values;
//if (kpio.id == "A1") //TtD not functional
//{
// //Make a new dataList = new line to be written
// //Fill the datalist with this kpi
// dataList = new List<string>
// {
// kpio.parentName,
// cropfieldItem.Code,
// kpio.data.area,
// kpio.data.cropTypeCode,
// kpio.data.cropTypeName,
// kpio.id,
// kpio.quantity, // in KPI output quantity is what we call KPIvariable in headerlist of csv file
// kpio.value,
// kpio.unit,
// kpio.targetValue,
// kpio.thresholdValue
// };
// //Write the datalist to a line to the streamwrieter sw for the output csv file
// sw.WriteLine(string.Join(",", dataList));
// foreach (string elementName in kpio.A1elements)
// {
// // get A1element from the element called values
// string elementValue = (string)kPIelementsOfBalance.GetType().GetProperty(elementName).GetValue(kPIelementsOfBalance, null);
// dataList = new List<string>
// {
// kpio.parentName,
// cropfieldItem.Code,
// kpio.data.area,
// kpio.data.cropTypeCode,
// kpio.data.cropTypeName,
// kpio.id,
// elementName, // specific output variable name for A1 element
// elementValue, // specific output value name for A1 element
// kpio.unit,
// "",
// ""
// };
// //Write the datalist to a line to the streamwrieter sw for the output csv file
// sw.WriteLine(string.Join(",", dataList));
// }
//}
//else if (kpio.id == "B1")
if (kpio.id == "B1")
{
//Make a new dataList = new line to be written