新增质量模块(工艺执行书 / 样茧试缫)与报表中心
质量模块: - 11 张工艺执行书表:封面、试产、选剥茧(含混茧明细)、试缫与大样、煮茧(含分车间配温、副煮车间)、自动缫(含大样)、后缫 - 10 张样茧试缫表:原料小样/综合样主表 + 选茧、解舒、茧幅、切剖、清洁洁净、茧丝百回纤度 - 服务与接口、主控指针回写(列表 √ 标记)、封面编号自增、报表数据包 - 前端 8 张报表打印版式、7 类工艺单据与 6 类调查录入弹窗、字段驱动表单/表格组件 - 菜单种子新增「质量」目录,样茧子表增加 YjssType 判别列,避免原料小样与综合样自增 Id 重号串数据 报表中心: - 报表模板管理、锐浪 grhtml5 加载与预览、全屏设计面板、数据源 Provider(落丝记录、职工花名册) 其他:同步工作进度 1-11 文档、开发数据库快照、.gitignore 忽略运行日志目录
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
using F9WebAiTest.Domain.Entities.QC.Gyzxs;
|
||||
|
||||
namespace F9WebAiTest.Application.Dtos.QC;
|
||||
|
||||
/// <summary>工艺执行书主列表行(庄口 + 各子单据完成标记)</summary>
|
||||
public class GyzxsDocVersionDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long GyzkId { get; set; }
|
||||
public string ZhuangKouName { get; set; } = "";
|
||||
public string ZhuangKouCode { get; set; } = "";
|
||||
public int Year { get; set; }
|
||||
public int Sort { get; set; }
|
||||
|
||||
public long ShichanId { get; set; }
|
||||
public long FengMianId { get; set; }
|
||||
public long XbjId { get; set; }
|
||||
public long XbjSsdyId { get; set; }
|
||||
public long ZhuJianId { get; set; }
|
||||
public long ZdsId { get; set; }
|
||||
public long ZdsDyId { get; set; }
|
||||
public long HsId { get; set; }
|
||||
|
||||
/// <summary>该庄口已录入的规格(自动缫 / 后缫 / 试产 / 试缫大样 均按 庄口+规格 唯一)</summary>
|
||||
public List<string> Guiges { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>选剥茧(含混茧比例明细)</summary>
|
||||
public class GyzxsXbjDto
|
||||
{
|
||||
public GyzxsXbj Xbj { get; set; } = new();
|
||||
public List<GyzxsXbjHunJian> HunJian { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>煮茧(含分车间指标、副煮车间结果)</summary>
|
||||
public class GyzxsZhuJianDto
|
||||
{
|
||||
public GyzxsZhuJian ZhuJian { get; set; } = new();
|
||||
public List<GyzxsZhuJianCheJian> CheJian { get; set; } = new();
|
||||
public List<GyzxsZhuJianFuZhu> FuZhu { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>自动缫(含大样资料)</summary>
|
||||
public class GyzxsZdsDto
|
||||
{
|
||||
public GyzxsZds Zds { get; set; } = new();
|
||||
public GyzxsZdsDyzl? Dyzl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报表数据包:Parameters=报表参数区,Main/Sub1/Sub2=结果集。
|
||||
/// 结构与 Grid++Report 的 Report_Data 对齐,便于日后直接对接报表中心。
|
||||
/// </summary>
|
||||
public class GyzxsPrintDto
|
||||
{
|
||||
public string ReportName { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public Dictionary<string, object?> Parameters { get; set; } = new();
|
||||
public List<Dictionary<string, object?>> Main { get; set; } = new();
|
||||
public List<Dictionary<string, object?>> Sub1 { get; set; } = new();
|
||||
public List<Dictionary<string, object?>> Sub2 { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using F9WebAiTest.Domain.Entities.QC.Yjss;
|
||||
|
||||
namespace F9WebAiTest.Application.Dtos.QC;
|
||||
|
||||
/// <summary>样茧试缫主列表行(原料小样 / 综合样共用)</summary>
|
||||
public class YjssListItemDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public int Type { get; set; } // 1=原料小样 2=综合样
|
||||
public long ZhuangKouId { get; set; } // 原料庄口 / 工艺庄口
|
||||
public string ZhuangKouName { get; set; } = "";
|
||||
public DateTime Date { get; set; }
|
||||
public int SampleType { get; set; } // 原料小样抽样类型:1定价 2入库 3鲜茧
|
||||
public string SampleTypeName { get; set; } = "";
|
||||
public decimal ZhongLiang { get; set; }
|
||||
public decimal HuiChaoLv { get; set; }
|
||||
public long XjdcId { get; set; }
|
||||
public int JsdcCt { get; set; }
|
||||
public long JfdcId { get; set; }
|
||||
public long QpdcId { get; set; }
|
||||
public long QjjjId { get; set; }
|
||||
public int JsbhxdCt { get; set; }
|
||||
public string Memo { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>茧幅调查(主表 + 明细)</summary>
|
||||
public class YjssJfdcDto
|
||||
{
|
||||
public YjssDcJfdcMain Main { get; set; } = new();
|
||||
public List<YjssDcJfdcItem> Items { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>茧丝百回纤度(汇总 + 明细)</summary>
|
||||
public class YjssJsbhxdDto
|
||||
{
|
||||
public YjssDcJsbhxdMain Main { get; set; } = new();
|
||||
public List<YjssDcJsbhxd> Items { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>样茧试缫整页数据(用于报表 / 打印)</summary>
|
||||
public class YjssFullDto
|
||||
{
|
||||
public int Type { get; set; }
|
||||
public string ZhuangKouName { get; set; } = "";
|
||||
public DateTime Date { get; set; }
|
||||
public decimal ZhongLiang { get; set; }
|
||||
public decimal HuiChaoLv { get; set; }
|
||||
public string SampleTypeName { get; set; } = "";
|
||||
public string Memo { get; set; } = "";
|
||||
|
||||
public YjssDcXjdc? Xjdc { get; set; }
|
||||
public List<YjssDcJsdc> Jsdc { get; set; } = new();
|
||||
public YjssJfdcDto? Jfdc { get; set; }
|
||||
public YjssDcQpdc? Qpdc { get; set; }
|
||||
public YjssDcQjjj? Qjjj { get; set; }
|
||||
public YjssJsbhxdDto? Jsbhxd { get; set; }
|
||||
|
||||
/// <summary>报表参数区(中文键,与 F9 RepDt_Qc_Yjss_* 对齐)</summary>
|
||||
public Dictionary<string, object?> Parameters { get; set; } = new();
|
||||
}
|
||||
@@ -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