// 文件: MES.Service.Dto.webApi/ERPZZCX.cs
using System.Collections.Generic;
namespace MES.Service.Dto.webApi
{
///
/// ERP 组装拆卸 整包 DTO(主表 + 子表集合,子表中包含孙表集合)
///
public class ERPZZCXD
{
///
/// ERP 主表(对应 DB 表 ZZCX 的数据:ERPID、BILL_NO)
///
public ERPZZCXMain Main { get; set; } = new ERPZZCXMain();
///
/// 子表集合(每个子表可包含孙表集合)
///
public List Children { get; set; } = new List();
}
///
/// ERP 主表 DTO (ZZCX)
///
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; } // 子件货主
}
///
/// ERP 子表 DTO(ZZCXA) —— 包含之前 ZZCXA 的全部字段,并新增可放置孙表集合
/// NOTE: 这里的 yd_id 应当由主表的 erpid 填充(你要求的需求)
///
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; } // 仓库
///
/// 孙表集合:每条子表记录对应 0..N 条孙表(ZZCXB)
///
public List SubItems { get; set; } = new List();
}
///
/// ERP 孙表 DTO(ZZCXB)
///
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; } // 备注
}
}