新增质量模块(工艺执行书 / 样茧试缫)与报表中心
质量模块: - 11 张工艺执行书表:封面、试产、选剥茧(含混茧明细)、试缫与大样、煮茧(含分车间配温、副煮车间)、自动缫(含大样)、后缫 - 10 张样茧试缫表:原料小样/综合样主表 + 选茧、解舒、茧幅、切剖、清洁洁净、茧丝百回纤度 - 服务与接口、主控指针回写(列表 √ 标记)、封面编号自增、报表数据包 - 前端 8 张报表打印版式、7 类工艺单据与 6 类调查录入弹窗、字段驱动表单/表格组件 - 菜单种子新增「质量」目录,样茧子表增加 YjssType 判别列,避免原料小样与综合样自增 Id 重号串数据 报表中心: - 报表模板管理、锐浪 grhtml5 加载与预览、全屏设计面板、数据源 Provider(落丝记录、职工花名册) 其他:同步工作进度 1-11 文档、开发数据库快照、.gitignore 忽略运行日志目录
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using F9WebAiTest.Application.CQRS.SYS.Reports.Queries;
|
||||
using F9WebAiTest.Application.Dtos.SYS.Reports;
|
||||
using F9WebAiTest.Application.Interfaces.Reports;
|
||||
using MediatR;
|
||||
|
||||
namespace F9WebAiTest.Application.Services.Reports.Providers;
|
||||
|
||||
/// <summary>
|
||||
/// 落丝记录报表数据提供者(生产-前缫)。
|
||||
/// DsName = "RepDt_Prod_Lsjl"
|
||||
/// 参数:q_date_start / q_date_end(日期范围)、q_dep(车间,含子车间)、q_jizu(机组)、
|
||||
/// q_zk(庄口 Id,选择页取值)、q_like(关键字:庄口 / 规格 / 颜色)。
|
||||
/// 参数与列完全由查询结果/报表配置决定,Provider 只负责取数。
|
||||
/// </summary>
|
||||
public class RepDt_Prod_Lsjl : IReportDataProvider
|
||||
{
|
||||
public string ReportName => "RepDt_Prod_Lsjl";
|
||||
|
||||
public async Task<ReportDto_DataSource> GetData(Dictionary<string, object> pairs, IMediator mediator)
|
||||
{
|
||||
DateTime? dateStart = null;
|
||||
if (pairs.TryGetValue("q_date_start", out var ds) && ds != null && ds.ToString() is { Length: > 0 } s1
|
||||
&& DateTime.TryParse(s1, out var d1))
|
||||
dateStart = d1;
|
||||
|
||||
DateTime? dateEnd = null;
|
||||
if (pairs.TryGetValue("q_date_end", out var de) && de != null && de.ToString() is { Length: > 0 } s2
|
||||
&& DateTime.TryParse(s2, out var d2))
|
||||
dateEnd = d2;
|
||||
|
||||
long depId = 0;
|
||||
if (pairs.TryGetValue("q_dep", out var dep) && dep != null && long.TryParse(dep.ToString(), out var d))
|
||||
depId = d;
|
||||
|
||||
int jizu = 0;
|
||||
if (pairs.TryGetValue("q_jizu", out var jz) && jz != null && int.TryParse(jz.ToString(), out var j))
|
||||
jizu = j;
|
||||
|
||||
long gyzkId = 0;
|
||||
if (pairs.TryGetValue("q_zk", out var zk) && zk != null && long.TryParse(zk.ToString(), out var z))
|
||||
gyzkId = z;
|
||||
|
||||
var like = pairs.TryGetValue("q_like", out var lk) && lk != null ? lk.ToString() ?? "" : "";
|
||||
|
||||
return await mediator.Send(new GetLsjlRepQuery(dateStart, dateEnd, depId, jizu, gyzkId, like));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using F9WebAiTest.Application.CQRS.SYS.Reports.Queries;
|
||||
using F9WebAiTest.Application.Dtos.SYS.Reports;
|
||||
using F9WebAiTest.Application.Interfaces.Reports;
|
||||
using MediatR;
|
||||
|
||||
namespace F9WebAiTest.Application.Services.Reports.Providers;
|
||||
|
||||
/// <summary>
|
||||
/// 职工花名册数据提供者(对应 F9 的 IReportService 实现):
|
||||
/// 解析查询参数 → 通过 MediatR 发送 CQRS 查询 → 返回含记录集与报表参数的数据源。
|
||||
/// DsName = "RepDt_Sys_Users"
|
||||
/// </summary>
|
||||
public class RepDt_Sys_Users : IReportDataProvider
|
||||
{
|
||||
public string ReportName => "RepDt_Sys_Users";
|
||||
|
||||
public async Task<ReportDto_DataSource> GetData(Dictionary<string, object> pairs, IMediator mediator)
|
||||
{
|
||||
// 1. 解析输入参数(部门 q_dep、关键字 q_like)
|
||||
long depId = 0;
|
||||
if (pairs.TryGetValue("q_dep", out var depObj) && depObj != null && long.TryParse(depObj.ToString(), out var d))
|
||||
depId = d;
|
||||
|
||||
string like = "";
|
||||
if (pairs.TryGetValue("q_like", out var likeObj) && likeObj != null)
|
||||
like = likeObj.ToString() ?? "";
|
||||
|
||||
// 2. 发送 CQRS 查询获取报表数据
|
||||
return await mediator.Send(new GetEmployeeDirectoryRepQuery(depId, like));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user