namespace F9WebAiTest.Application.Dtos.SYS.Reports; /// 已注册的报表数据源(IReportDataProvider.ReportName) public class ReportDataSourceInfoDto { public string DsName { get; set; } = ""; } /// 明细字段(.grf 模板 DetailGrid.Recordset.Field 的映射来源),全部由查询结果推断 public class ReportFieldDefDto { public string Name { get; set; } = ""; public string Label { get; set; } = ""; public string DataType { get; set; } = "String"; } /// 探测请求:按 DsName(或 DataSql)执行一次查询,识别返回的列 public class ReportProbeRequestDto { /// 数据源名称(IReportDataProvider.ReportName),优先于 DataSql public string? DsName { get; set; } /// 数据 SQL(无 DsName 时用于探测列) public string? DataSql { get; set; } /// 执行探测时传入的参数值(键 = 参数名;报表上已配置的参数由前端带入) public Dictionary Params { get; set; } = new(); } /// /// 报表参数(后端 DataSource.Parameter_Data 的键值)。 /// 注意:这是「报表参数」——由查询执行后返回、供模板头展示的统计口径; /// 与 Config.Parms 里的「查询条件」(q_*,用于查询面板传参)不是一回事。 /// public class ReportParamValueDto { public string Name { get; set; } = ""; public string Value { get; set; } = ""; } /// 探测结果:查询返回的明细字段 + 报表参数 + 少量样本行 public class ReportProbeResultDto { public string DsName { get; set; } = ""; public List Fields { get; set; } = new(); /// 报表参数(Parameter_Data 的键值),模板头/合计区直接引用 public List Parameters { get; set; } = new(); public List> Rows { get; set; } = new(); public int Total { get; set; } /// 探测失败原因 public string? Error { get; set; } }