| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- namespace Admin.NET.Plugin.AiDOP.Manufacturing.Dto;
- /// <summary>
- /// S6 模工具台账管理 列表查询入参(只读)。
- ///
- /// 数据源:aidopdev.MoldToolList(模工具台账,证据 sql.txt: select * from MoldToolList)。
- /// 类型(lx) 含 模具 / 工装 / 检具,同表同页同源;类型下拉可筛选。
- /// 租户作用域只取当前登录上下文,不接受客户端传入租户覆盖。
- /// </summary>
- public class ToolingLedgerListInput
- {
- /// <summary>页码(从 1 开始)</summary>
- public int Page { get; set; } = 1;
- /// <summary>每页条数</summary>
- public int PageSize { get; set; } = 10;
- /// <summary>名称(MoldToolList.MoldName,模糊匹配)</summary>
- public string? Name { get; set; }
- /// <summary>工作组(MoldToolList.gnyymc,模糊匹配)</summary>
- public string? WorkGroup { get; set; }
- /// <summary>使用部门(MoldToolList.MoldUsingDepartment,模糊匹配)</summary>
- public string? UsageDept { get; set; }
- /// <summary>类型(MoldToolList.lx:模具 / 工装 / 检具,精确匹配,下拉选择)</summary>
- public string? Type { get; set; }
- /// <summary>模具类型编码(MoldToolList.MoldTypeCode,模糊匹配)</summary>
- public string? MoldTypeCode { get; set; }
- }
- /// <summary>
- /// S6 模工具台账管理 列表行(只读)。字段对齐前端列 prop(camelCase),源列见注释(MoldToolList / 字段配置图)。
- /// </summary>
- public class ToolingLedgerListRow
- {
- /// <summary>主键 id(MoldToolList.id,子表 id)</summary>
- public int Id { get; set; }
- /// <summary>类型(MoldToolList.lx:模具 / 工装 / 检具)</summary>
- public string? Type { get; set; }
- /// <summary>名称(MoldToolList.MoldName)</summary>
- public string? Name { get; set; }
- /// <summary>供应商名(MoldToolList.gysmc)</summary>
- public string? SupplierName { get; set; }
- /// <summary>数量(MoldToolList.MoldCount)</summary>
- public int? Qty { get; set; }
- /// <summary>功能应用名称(MoldToolList.gnyymc)</summary>
- public string? FunctionAppName { get; set; }
- /// <summary>模具类型编码(MoldToolList.MoldTypeCode)</summary>
- public string? MoldTypeCode { get; set; }
- /// <summary>对应产品物料编码(MoldToolList.product_material_code)</summary>
- public string? ProductMaterialCode { get; set; }
- /// <summary>对应产品图纸号(MoldToolList.product_drawing_number)</summary>
- public string? ProductDrawingNo { get; set; }
- /// <summary>对应产品名称(MoldToolList.product_name)</summary>
- public string? ProductName { get; set; }
- /// <summary>对应工序(MoldToolList.process)</summary>
- public string? Process { get; set; }
- }
- /// <summary>
- /// S6 模工具台账 CRUD V1 常量(FUNC-S6-004)。
- /// </summary>
- public static class ToolingLedgerConst
- {
- /// <summary>
- /// 类型(lx)固定业务枚举。
- /// 依据:MoldToolList 全表 290 行 lx 仅 模具 / 工装 / 检具 三值(HEX 逐值核对无异体、无 NULL、无空串),
- /// 且系统内无对应字典。改为固定枚举是为了让**空租户也能创建首条数据**——
- /// 原 type-options 走 SELECT DISTINCT lx,空租户返回 [] 会使新增无选项可选。
- /// type-options 端点保持不变,仅供既有查询区继续使用。
- /// </summary>
- public static readonly string[] Types = ["模具", "工装", "检具"];
- }
- /// <summary>
- /// S6 模工具台账 详情(只含 CRUD V1 白名单字段 + 主键)。
- /// 不含 tenant_id,也不含任何本批 DEFERRED 字段。
- /// </summary>
- public class ToolingLedgerDetailDto
- {
- /// <summary>主键(MoldToolList.id)</summary>
- public int Id { get; set; }
- /// <summary>类型(lx)</summary>
- public string? Type { get; set; }
- /// <summary>名称(MoldName)</summary>
- public string? Name { get; set; }
- /// <summary>数量(MoldCount)</summary>
- public int Qty { get; set; }
- /// <summary>模具类型编码(MoldTypeCode,创建后不可修改)</summary>
- public string? MoldTypeCode { get; set; }
- /// <summary>工作组 / 功能应用名称(gnyymc)</summary>
- public string? WorkGroup { get; set; }
- /// <summary>对应产品物料编码(product_material_code)</summary>
- public string? ProductMaterialCode { get; set; }
- /// <summary>对应产品图纸号(product_drawing_number)</summary>
- public string? ProductDrawingNo { get; set; }
- /// <summary>对应产品名称(product_name)</summary>
- public string? ProductName { get; set; }
- /// <summary>对应工序(process)</summary>
- public string? Process { get; set; }
- }
- /// <summary>
- /// S6 模工具台账 新增入参。
- /// 白名单 9 字段;**禁止**出现 TenantId / Id / 任何 DEFERRED 字段
- /// (gys / gysmc / MoldUsingDepartment / zrr / zt / sm / bypl / fj /
- /// xh / bh / gnyyid / MoldMaintenanceReleaseTime / ActiveMaintenanceMoldCount)。
- /// MaxLength 一律对齐 DB 实际列长(全部 varchar(255)),不额外发明长度上限。
- /// </summary>
- public class ToolingLedgerCreateInput
- {
- /// <summary>类型(lx,必填,限 模具 / 工装 / 检具)</summary>
- [Required(ErrorMessage = "类型不能为空")]
- [MaxLength(255)]
- public string Type { get; set; } = string.Empty;
- /// <summary>名称(MoldName,必填,DB NOT NULL)</summary>
- [Required(ErrorMessage = "名称不能为空")]
- [MaxLength(255)]
- public string Name { get; set; } = string.Empty;
- /// <summary>数量(MoldCount,必填,DB NOT NULL,不允许负数)</summary>
- [Required(ErrorMessage = "数量不能为空")]
- [Range(0, int.MaxValue, ErrorMessage = "数量不能为负数")]
- public int? Qty { get; set; }
- /// <summary>模具类型编码(MoldTypeCode,必填,DB NOT NULL,租户内唯一)</summary>
- [Required(ErrorMessage = "模具类型编码不能为空")]
- [MaxLength(255)]
- public string MoldTypeCode { get; set; } = string.Empty;
- /// <summary>工作组 / 功能应用名称(gnyymc,可选,自由文本)</summary>
- [MaxLength(255)]
- public string? WorkGroup { get; set; }
- /// <summary>对应产品物料编码(product_material_code,可选)</summary>
- [MaxLength(255)]
- public string? ProductMaterialCode { get; set; }
- /// <summary>对应产品图纸号(product_drawing_number,可选)</summary>
- [MaxLength(255)]
- public string? ProductDrawingNo { get; set; }
- /// <summary>对应产品名称(product_name,可选)</summary>
- [MaxLength(255)]
- public string? ProductName { get; set; }
- /// <summary>对应工序(process,可选)</summary>
- [MaxLength(255)]
- public string? Process { get; set; }
- }
- /// <summary>
- /// S6 模工具台账 编辑入参。
- /// **刻意不含 MoldTypeCode** —— 从类型层面消除「编辑期改业务编码」的路径,
- /// 而不是只靠前端 disabled。理由:ProdLineDetail 已有 896 条按编码引用且系统无级联更新,
- /// 改编码等于静默断链。
- /// 同样禁止出现 TenantId / Id / 任何 DEFERRED 字段。
- /// </summary>
- public class ToolingLedgerUpdateInput
- {
- /// <summary>类型(lx,必填,限 模具 / 工装 / 检具)</summary>
- [Required(ErrorMessage = "类型不能为空")]
- [MaxLength(255)]
- public string Type { get; set; } = string.Empty;
- /// <summary>名称(MoldName,必填)</summary>
- [Required(ErrorMessage = "名称不能为空")]
- [MaxLength(255)]
- public string Name { get; set; } = string.Empty;
- /// <summary>数量(MoldCount,必填,不允许负数)</summary>
- [Required(ErrorMessage = "数量不能为空")]
- [Range(0, int.MaxValue, ErrorMessage = "数量不能为负数")]
- public int? Qty { get; set; }
- /// <summary>工作组 / 功能应用名称(gnyymc,可选)</summary>
- [MaxLength(255)]
- public string? WorkGroup { get; set; }
- /// <summary>对应产品物料编码(product_material_code,可选)</summary>
- [MaxLength(255)]
- public string? ProductMaterialCode { get; set; }
- /// <summary>对应产品图纸号(product_drawing_number,可选)</summary>
- [MaxLength(255)]
- public string? ProductDrawingNo { get; set; }
- /// <summary>对应产品名称(product_name,可选)</summary>
- [MaxLength(255)]
- public string? ProductName { get; set; }
- /// <summary>对应工序(process,可选)</summary>
- [MaxLength(255)]
- public string? Process { get; set; }
- }
- /// <summary>类型下拉选项(MoldToolList.lx distinct:模具 / 工装 / 检具)。</summary>
- public class ToolingLedgerTypeOption
- {
- /// <summary>类型值(MoldToolList.lx)</summary>
- public string? Val { get; set; }
- }
|