// 文件: MES.Service.Dto.webApi/ERPZZCX.cs
|
using System.Collections.Generic;
|
|
namespace MES.Service.Dto.webApi
|
{
|
/// <summary>
|
/// ERP 组装拆卸 整包 DTO(主表 + 子表集合,子表中包含孙表集合)
|
/// </summary>
|
public class ERPZZCXD
|
{
|
/// <summary>
|
/// ERP 主表(对应 DB 表 ZZCX 的数据:ERPID、BILL_NO)
|
/// </summary>
|
public ERPZZCXMain Main { get; set; } = new ERPZZCXMain();
|
|
/// <summary>
|
/// 子表集合(每个子表可包含孙表集合)
|
/// </summary>
|
public List<ERPZZCXA> Children { get; set; } = new List<ERPZZCXA>();
|
}
|
|
/// <summary>
|
/// ERP 主表 DTO (ZZCX)
|
/// </summary>
|
public class ERPZZCXMain
|
{
|
public string? erpid { get; set; } // ERP 主表id(主表的 ERPID)
|
public string bill_no { get; set; } // 单据编码
|
public string? type { get; set; } //
|
public string? dj_lx { get; set; } // 单据类型
|
public string? kc_zz { get; set; } // 库存组织
|
public string? sw_lx { get; set; } // 事务类型
|
public string? time { get; set; } // 日期
|
public string? bm { get; set; } // 部门
|
public string? cgy { get; set; } // 仓管员
|
public string? kcz { get; set; } // 库存组
|
public string? dj_zt { get; set; } // 单据状态
|
public string? memo { get; set; } // 备注
|
public string? cphzlx { get; set; } // 成品货主类型
|
public string? cphz { get; set; } // 成品货主
|
public string? zjhzlx { get; set; } // 子件货主类型
|
public string? zjhz { get; set; } // 子件货主
|
}
|
|
/// <summary>
|
/// ERP 子表 DTO(ZZCXA) —— 包含之前 ZZCXA 的全部字段,并新增可放置孙表集合
|
/// NOTE: 这里的 yd_id 应当由主表的 erpid 填充(你要求的需求)
|
/// </summary>
|
public class ERPZZCXA
|
{
|
// 关联主表
|
public string? yd_id { get; set; } // 对应主表 ERPID(由主表填充)
|
public string? erpid { get; set; } // ERP 子表id(如果 ERP 有行 id)
|
/* public string? bill_no { get; set; } // 单据编码(可重复)
|
public string? dj_lx { get; set; } // 单据类型
|
public string? kc_zz { get; set; } // 库存组织
|
public string? sw_lx { get; set; } // 事务类型
|
public string? time { get; set; } // 日期
|
public string? bm { get; set; } // 部门
|
public string? cgy { get; set; } // 仓管员
|
public string? kcz { get; set; } // 库存组
|
public string? dj_zt { get; set; } // 单据状态
|
public string? memo { get; set; } // 备注
|
public string? cphzlx { get; set; } // 成品货主类型
|
public string? cphz { get; set; } // 成品货主
|
public string? zjhzlx { get; set; } // 子件货主类型
|
public string? zjhz { get; set; } // 子件货主*/
|
|
// 明细相关字段(子表可能也记录某条物料信息)
|
public string? item_id { get; set; } // 物料编码id
|
public string? qty { get; set; } // 数量
|
public string? unit { get; set; } // 单位
|
public string? depot_id { get; set; } // 仓库
|
|
/// <summary>
|
/// 孙表集合:每条子表记录对应 0..N 条孙表(ZZCXB)
|
/// </summary>
|
public List<ERPZZCXB> SubItems { get; set; } = new List<ERPZZCXB>();
|
}
|
|
/// <summary>
|
/// ERP 孙表 DTO(ZZCXB)
|
/// </summary>
|
public class ERPZZCXB
|
{
|
public string? erpid { get; set; } // ERP 主表id(或冗余)
|
public string? eid { get; set; } // ERP 子表id / 行id
|
public string? item_id { get; set; } // 物料编码id
|
public string? qty { get; set; } // 数量
|
public string? unit { get; set; } // 单位
|
public string? depot_id { get; set; } // 仓库
|
public string? lot_no { get; set; } // 批号
|
public string? memo { get; set; } // 备注
|
public string? yd_id { get; set; } // 备注
|
}
|
}
|