Exemple #1
0
        public async Task <IActionResult> SaveCalculateTree([FromBody] Dictionary <string, object> data)
        {
            CalculateTreeData calculate_tree = data["Tree"] as CalculateTreeData;

            bool result = await _reportService.SaveCalculateScores(calculate_tree.report_guid, calculate_tree);

            return(await _reportService.OkResult(result));
        }
Exemple #2
0
        public async Task <IActionResult> UpdateCalculateTree([FromBody] Dictionary <string, object> data)
        {
            CalculateTreeData tree      = data["Tree"] as CalculateTreeData;
            CalculateData     calc_data = data["Data"] as CalculateData;

            bool hasReference = tree.children.Exists(x => x.data.model_data.is_reference);

            CalculateTreeData result = (await _reportService.UpdateCalculateTree(calc_data.report_guid, calc_data.report_type, new List <CalculateTreeData>()
            {
                tree
            }, calc_data.calculate_date, calc_data.org_obj, calc_data.comment_list, calc_data.focus_list, true, hasReference))[0];

            return(Ok(result));
        }