新增质量模块(工艺执行书 / 样茧试缫)与报表中心
质量模块: - 11 张工艺执行书表:封面、试产、选剥茧(含混茧明细)、试缫与大样、煮茧(含分车间配温、副煮车间)、自动缫(含大样)、后缫 - 10 张样茧试缫表:原料小样/综合样主表 + 选茧、解舒、茧幅、切剖、清洁洁净、茧丝百回纤度 - 服务与接口、主控指针回写(列表 √ 标记)、封面编号自增、报表数据包 - 前端 8 张报表打印版式、7 类工艺单据与 6 类调查录入弹窗、字段驱动表单/表格组件 - 菜单种子新增「质量」目录,样茧子表增加 YjssType 判别列,避免原料小样与综合样自增 Id 重号串数据 报表中心: - 报表模板管理、锐浪 grhtml5 加载与预览、全屏设计面板、数据源 Provider(落丝记录、职工花名册) 其他:同步工作进度 1-11 文档、开发数据库快照、.gitignore 忽略运行日志目录
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
namespace F9WebAiTest.Application.Dtos.SYS.Reports;
|
||||
|
||||
/// <summary>
|
||||
/// 报表数据集(对应 F9 的 ReportDataDto_Data):
|
||||
/// Field_Data 为记录集(每行一个匿名对象,属性名须与 .grf 模板 DetailGrid.Recordset.Field 一致);
|
||||
/// Parameter_Data 为报表参数(账期 / 车间 / 查询时间等,供模板以 Parameter 方式引用)。
|
||||
/// </summary>
|
||||
public class ReportDataDto_Data
|
||||
{
|
||||
public List<object> Field_Data { get; set; } = new();
|
||||
public object? Parameter_Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报表数据源(对应 F9 的 ReportDto_DataSource):
|
||||
/// Report_Data 为「数据集名 → 数据集」的字典,如 "main" / "detail"。
|
||||
/// </summary>
|
||||
public class ReportDto_DataSource
|
||||
{
|
||||
public Dictionary<string, ReportDataDto_Data> Report_Data { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
namespace F9WebAiTest.Application.Dtos.SYS.Reports;
|
||||
|
||||
public record ReportListDto(
|
||||
long Id,
|
||||
string Code,
|
||||
string Name,
|
||||
string Category,
|
||||
string Description,
|
||||
int SortOrder,
|
||||
bool IsActive,
|
||||
long ReportFileId,
|
||||
bool HasTemplate,
|
||||
DateTime CreatedAt,
|
||||
DateTime? UpdatedAt);
|
||||
|
||||
public record ReportDetailDto(
|
||||
long Id,
|
||||
string Code,
|
||||
string Name,
|
||||
string Category,
|
||||
string Description,
|
||||
string DataSql,
|
||||
string DataParams,
|
||||
string Config,
|
||||
int SortOrder,
|
||||
bool IsActive,
|
||||
long ReportFileId,
|
||||
bool HasTemplate,
|
||||
DateTime CreatedAt,
|
||||
DateTime? UpdatedAt);
|
||||
|
||||
public record ReportViewDto(
|
||||
long Id,
|
||||
string Code,
|
||||
string Name,
|
||||
string Category,
|
||||
string Description,
|
||||
int SortOrder,
|
||||
bool HasTemplate);
|
||||
|
||||
public class ReportCreateDto
|
||||
{
|
||||
public string Code { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string? Category { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? DataSql { get; set; }
|
||||
public string? DataParams { get; set; }
|
||||
public string? Config { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报表模板(.grf 的 JSON 文本)。与报表配置一起保存,无需再单独上传模板文件。
|
||||
/// 为空表示本次不改动模板。
|
||||
/// </summary>
|
||||
public string? TemplateJson { get; set; }
|
||||
}
|
||||
|
||||
public class ReportUpdateDto
|
||||
{
|
||||
public string Code { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string? Category { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? DataSql { get; set; }
|
||||
public string? DataParams { get; set; }
|
||||
public string? Config { get; set; }
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报表模板(.grf 的 JSON 文本)。与报表配置一起保存,无需再单独上传模板文件。
|
||||
/// 为空表示本次不改动模板(保留原模板)。
|
||||
/// </summary>
|
||||
public string? TemplateJson { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>在线编辑模板源码后直接保存的内容(免下载 / 上传 .grf)</summary>
|
||||
public class ReportTemplateContentDto
|
||||
{
|
||||
/// <summary>模板全文:GR6 时代的 UTF-8 JSON 文本,或 GR7 设计器的 "_WR" 压缩文本</summary>
|
||||
public string? Content { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
namespace F9WebAiTest.Application.Dtos.SYS.Reports;
|
||||
|
||||
/// <summary>已注册的报表数据源(IReportDataProvider.ReportName)</summary>
|
||||
public class ReportDataSourceInfoDto
|
||||
{
|
||||
public string DsName { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>明细字段(.grf 模板 DetailGrid.Recordset.Field 的映射来源),全部由查询结果推断</summary>
|
||||
public class ReportFieldDefDto
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Label { get; set; } = "";
|
||||
public string DataType { get; set; } = "String";
|
||||
}
|
||||
|
||||
/// <summary>探测请求:按 DsName(或 DataSql)执行一次查询,识别返回的列</summary>
|
||||
public class ReportProbeRequestDto
|
||||
{
|
||||
/// <summary>数据源名称(IReportDataProvider.ReportName),优先于 DataSql</summary>
|
||||
public string? DsName { get; set; }
|
||||
|
||||
/// <summary>数据 SQL(无 DsName 时用于探测列)</summary>
|
||||
public string? DataSql { get; set; }
|
||||
|
||||
/// <summary>执行探测时传入的参数值(键 = 参数名;报表上已配置的参数由前端带入)</summary>
|
||||
public Dictionary<string, object?> Params { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报表参数(后端 DataSource.Parameter_Data 的键值)。
|
||||
/// 注意:这是「报表参数」——由查询执行后返回、供模板头展示的统计口径;
|
||||
/// 与 Config.Parms 里的「查询条件」(q_*,用于查询面板传参)不是一回事。
|
||||
/// </summary>
|
||||
public class ReportParamValueDto
|
||||
{
|
||||
public string Name { get; set; } = "";
|
||||
public string Value { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>探测结果:查询返回的明细字段 + 报表参数 + 少量样本行</summary>
|
||||
public class ReportProbeResultDto
|
||||
{
|
||||
public string DsName { get; set; } = "";
|
||||
public List<ReportFieldDefDto> Fields { get; set; } = new();
|
||||
|
||||
/// <summary>报表参数(Parameter_Data 的键值),模板头/合计区直接引用</summary>
|
||||
public List<ReportParamValueDto> Parameters { get; set; } = new();
|
||||
|
||||
public List<Dictionary<string, object?>> Rows { get; set; } = new();
|
||||
public int Total { get; set; }
|
||||
|
||||
/// <summary>探测失败原因</summary>
|
||||
public string? Error { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user