报表结构

parent b3fc5681
using System;
using Performance.EntityModels;
using System;
using System.Collections.Generic;
using System.Text;
......@@ -6,6 +7,26 @@ namespace Performance.DtoModels
{
public class ReportData
{
public ReportData(rep_report report)
{
ReportID = report.ID;
ChartType = report.ChartType;
Sort = report.Sort;
Title = report.Title;
XTitle = report.XTitle;
XUnit = report.XUnit;
YTitle = report.YTitle;
YUnit = report.YUnit;
VTitle = report.VTitle;
VUnit = report.VUnit;
NTitle = report.NTitle;
NUnit = report.NUnit;
Formula = report.Formula;
DataType = report.DataType;
FilterValue = report.FilterValue;
ChartData = new List<ChartData>();
}
public int ReportID { get; set; }
/// <summary>
......
......@@ -9,20 +9,21 @@ public class SelectionOptions
{
public SelectionOptions(rep_selection item)
{
ID = item.ID;
SelectionID = item.ID;
Title = item.Title;
InputType = item.InputType;
InputName = item.InputName;
Required = item.Required ?? 0;
Sort = item.Sort ?? 0m;
LoadType = item.LoadType;
DefaultValue = item.DefaultValue;
Options = new List<TitleValue>();
ParentItems = new List<TitleValue>();
}
/// <summary>
/// ID
/// </summary>
public int ID { get; }
public int SelectionID { get; }
/// <summary>
/// 排序
/// </summary>
......
......@@ -130,7 +130,7 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, List<Selectio
var chartData = reportRepository.DapperQuery<ChartData>(sql, null);
ReportData reportData = new ReportData();
ReportData reportData = new ReportData(report);
reportData.Title = AddSelectionToReportTitle(selections, values, report.Title);
reportData.ChartData = chartData != null && chartData.Any() ? chartData.ToList() : new List<ChartData>();
result.Add(reportData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment