Тема: Через API отчет с группировкой по сменам
Отчет полностью работает при вызове через интерфейс по идентификатору
И не правильно работает зашитый. Таблица не видит смены и все данные попадают в группировку "Вне смен"
Таблица r4.
Перепробовали все варианты c json_encode
{"reportResourceId":47,"reportTemplateId":0,"reportObjectId":"321","reportObjectSecId":0,"interval":{"from":1612137600,"to":1613433599,"flags":0},"reportTemplate":{"n":"SmartFlowWeightReport","ct":"avl_unit_group","p":"{\"descr\":\"\",\"bind\":{\"avl_unit_group\":[]}}","tbl":[{"n":"unit_group_stats","l":"\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430","f":0,"c":"","cl":"","cp":"","p":"{\"address_format\":\"0_10_5\",\"time_format\":\"%25Y-%25m-%25E_%25H%3A%25M%3A%25S\",\"us_units\":0,\"shifts\":[{\"nm\":\"0\",\"tm\":0,\"dur\":3599},{\"nm\":\"1\",\"tm\":3600,\"dur\":3599},{\"nm\":\"2\",\"tm\":7200,\"dur\":3599},{\"nm\":\"3\",\"tm\":10800,\"dur\":3599},{\"nm\":\"4\",\"tm\":14400,\"dur\":3599},{\"nm\":\"5\",\"tm\":18000,\"dur\":3599},{\"nm\":\"6\",\"tm\":21600,\"dur\":3599},{\"nm\":\"7\",\"tm\":25200,\"dur\":3599},{\"nm\":\"8\",\"tm\":28800,\"dur\":3599},{\"nm\":\"9\",\"tm\":32400,\"dur\":3599},{\"nm\":\"10\",\"tm\":36000,\"dur\":3599},{\"nm\":\"11\",\"tm\":39600,\"dur\":3599},{\"nm\":\"12\",\"tm\":43200,\"dur\":3599},{\"nm\":\"13\",\"tm\":46800,\"dur\":3599},{\"nm\":\"14\",\"tm\":50400,\"dur\":3599},{\"nm\":\"15\",\"tm\":54000,\"dur\":3599},{\"nm\":\"16\",\"tm\":57600,\"dur\":3599},{\"nm\":\"17\",\"tm\":61200,\"dur\":3599},{\"nm\":\"18\",\"tm\":64800,\"dur\":3599},{\"nm\":\"19\",\"tm\":68400,\"dur\":3599},{\"nm\":\"20\",\"tm\":72000,\"dur\":3599},{\"nm\":\"21\",\"tm\":75600,\"dur\":3599},{\"nm\":\"22\",\"tm\":79200,\"dur\":3599},{\"nm\":\"23\",\"tm\":82800,\"dur\":3539}]}","sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"sl":"[\"address_format\",\"time_format\",\"us_units\",\"shifts\"]","s":"[\"Address\",\"Time Format\",\"Measure\",\"s\"]","filter_order":[]},{"n":"unit_group_fillings","l":"r1","c":"[\"user_column\",\"user_column\",\"user_column\"]","cl":"[\"BEGIN\",\"\\u041e\\u0442\\u0433\\u0440\\u0443\\u0437\\u043a\\u0430 \\u0437\\u0430 \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\",\"END\"]","cp":"[{\"p\":\"(fuel_level_begin)\",\"vt\":\"0\"},{\"p\":\"(fuel_level_filled) - (fuel_level_begin)\",\"vt\":\"0\"},{\"p\":\"(fuel_level_filled)\",\"vt\":\"0\"}]","s":"","sl":"","filter_order":"[\"geozones_ex\",\"fillings\",\"driver\",\"trailer\",\"sensor_name\"]","p":"{\"grouping\":\"{\\\"type\\\":\\\"day\\\",\\\"nested\\\":{\\\"type\\\":\\\"unit\\\"}}\",\"sensor_name\":\"sum_w_test\"}","sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"f":1},{"n":"unit_group_fillings","l":"r2","c":"[\"fuel_level_begin\",\"user_column\",\"fuel_level_filled\"]","cl":"[\"\\u0421\\u0443\\u043c\\u043c\\u0430 \\u043d\\u0430 \\u043d\\u0430\\u0447\\u0430\\u043b\\u043e \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\\u0430\",\"\\u041e\\u0442\\u0433\\u0440\\u0443\\u0437\\u043a\\u0430 \\u0437\\u0430 \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\",\"\\u0421\\u0443\\u043c\\u043c\\u0430 \\u043d\\u0430 \\u043a\\u043e\\u043d\\u0435\\u0446 \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\\u0430\"]","cp":"[[],{\"p\":\"(fuel_level_filled) - (fuel_level_begin)\",\"vt\":\"0\"},[]]","s":"","sl":"","filter_order":"[\"geozones_ex\",\"fillings\",\"driver\",\"trailer\",\"sensor_name\"]","p":"{\"grouping\":\"{\\\"type\\\":\\\"shift\\\"}\",\"sensor_name\":\"sum_w_test\"}","sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"f":16384},{"n":"unit_group_fillings","l":"r4","c":"[\"fuel_level_begin\",\"filled\",\"fuel_level_filled\",\"user_column\"]","cl":"[\"\\u0421\\u0443\\u043c\\u043c\\u0430 \\u043d\\u0430 \\u043d\\u0430\\u0447\\u0430\\u043b\\u043e \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\\u0430\",\"\\u0417\\u0430\\u043f\\u0440\\u0430\\u0432\\u043b\\u0435\\u043d\\u043e\",\"\\u0421\\u0443\\u043c\\u043c\\u0430 \\u043d\\u0430 \\u043a\\u043e\\u043d\\u0435\\u0446 \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\\u0430\",\"\\u041e\\u0442\\u0433\\u0440\\u0443\\u0437\\u043a\\u0430 \\u0437\\u0430 \\u043f\\u0435\\u0440\\u0438\\u043e\\u0434\"]","cp":"[[],[],[],{\"p\":\"(fuel_level_filled) - (fuel_level_begin)\"}]","s":"","sl":"","filter_order":"[\"geozones_ex\",\"fillings\",\"driver\",\"trailer\",\"sensor_name\"]","p":"{\"grouping\":\"{\\\"type\\\":\\\"shift\\\"}\",\"sensor_name\":\"sum_w_test\"}","sch":{"f1":0,"f2":0,"t1":0,"t2":0,"m":0,"y":0,"w":0,"fl":0},"f":16384}]}}
Интегратор и разработчик систем GPS/ГЛОНАСС мониторинга - watchit.ru
Interra Team, CEO Кравчик Юрий, тел. +7 863 218-11-74, +7 863 218-11-73, emal wialon@watchit.ru
Принимаем заказы на разработку. Примеры наших коробочных решений и облачных сервисов