Files
kunshan-bzfm-mes-backend/DOAN.Model/MES/Material/Dto/MmRecordOutboundDto.cs
git_rabbit b018ebc687 feat(物料管理): 新增物料库存相关功能及接口
- 在MmMaterial类中添加ParentMaterialCode字段支持物料层级关系
- 扩展MmRecordOutbound类增加供应商信息字段
- 重构FeedProcessReportwork方法支持原材料工单领料和库存ID指定
- 新增物料库存查询、领料、成品入库、出货等接口
- 完善库存操作逻辑,支持根据库存ID直接操作
- 添加相关DTO类支持新功能的数据传输
2026-01-31 22:50:21 +08:00

217 lines
6.2 KiB
C#

namespace DOAN.Model.BZFM.Dto
{
/// <summary>
/// 出库记录表查询对象
/// </summary>
public class MmRecordOutboundQueryDto : PagerInfo
{
public string MaterialCode { get; set; }
public string OutboundNo { get; set; }
public DateTime[] CreatedTime { get; set; } = new DateTime[2];
public string TransactionType { get; set; }
/// <summary>
/// 工单号
/// </summary>
public string Workorder { get; set; }
/// <summary>
/// 原材料工单号
/// </summary>
public string WorkorderRaw { get; set; }
public string Operator { get; set; }
}
/// <summary>
/// 出库记录表输入输出对象
/// </summary>
public class MmRecordOutboundDto
{
public int Id { get; set; }
public string OutboundNo { get; set; }
[Required(ErrorMessage = "物料编码不能为空")]
public string MaterialCode { get; set; }
public string MaterialName { get; set; }
[Required(ErrorMessage = "仓库编码不能为空")]
public string WarehouseCode { get; set; }
public string WarehouseName { get; set; }
public string LocationCode { get; set; }
public string LocationName { get; set; }
[Required(ErrorMessage = "出库数量不能为空")]
public decimal Quantity { get; set; }
public string Unit { get; set; }
[Required(ErrorMessage = "出库类型不能为空")]
public string TransactionType { get; set; }
public string BatchNo { get; set; }
public string OrderNo { get; set; }
public string Operator { get; set; }
public string Remarks { get; set; }
public DateTime? CreatedTime { get; set; }
/// <summary>
/// 工单号
/// </summary>
public string Workorder { get; set; }
/// <summary>
/// 原材料工单号
/// </summary>
public string WorkorderRaw { get; set; }
[ExcelColumn(Name = "出库类型")]
public string TransactionTypeLabel { get; set; }
}
/// <summary>
/// 出库单
/// </summary>
public class OutboundReceiptDto
{
public string OutboundNo { get; set; }
[Required(ErrorMessage = "物料编码不能为空")]
// 库存Id
public int InventoryId { get; set; } = -1;
public string MaterialCode { get; set; }
public string MaterialName { get; set; }
public string SupplierName { get; set; }
public string SupplierCode { get; set; }
[Required(ErrorMessage = "仓库编码不能为空")]
public string WarehouseCode { get; set; }
public string WarehouseName { get; set; }
public string LocationCode { get; set; }
public string LocationName { get; set; }
[Required(ErrorMessage = "出库数量不能为空")]
public decimal Quantity { get; set; }
public string Unit { get; set; }
[Required(ErrorMessage = "出库类型不能为空")]
public string TransactionType { get; set; }
public string BatchNo { get; set; }
public string OrderNo { get; set; }
public string Operator { get; set; }
public string Remarks { get; set; }
public DateTime? CreatedTime { get; set; }
[ExcelColumn(Name = "出库类型")]
public string TransactionTypeLabel { get; set; }
/// <summary>
/// 工单号(一旦确定,不可更改)
/// </summary>
public string Workorder { get; set; }
/// <summary>
/// 原始工单号
/// </summary>
public string WorkorderRaw { get; set; }
/// <summary>
/// 1-蓝单正向 2-红单逆向
/// </summary>
public int ReceiptType { get; set; } = 1;
}
// <summary>
/// 出库记录导入导出
/// </summary>
[SugarTable("mm_recordoutbound", "出库记录")]
public class MmRecordOutboundExcelDto
{
[ExcelColumn(Name = "id")]
[SugarColumn(IsIdentity = true, IsPrimaryKey = true)]
public int Id { get; set; }
[ExcelColumn(Name = "出库单号")]
[SugarColumn(ColumnName = "outbound_no")]
public string OutboundNo { get; set; }
[ExcelColumn(Name = "物料编码")]
[SugarColumn(ColumnName = "material_code")]
public string MaterialCode { get; set; }
[ExcelColumn(Name = "物料名称")]
[SugarColumn(ColumnName = "material_name")]
public string MaterialName { get; set; }
[ExcelColumn(Name = "批次号")]
[SugarColumn(ColumnName = "batch_no")]
public string BatchNo { get; set; }
[ExcelColumn(Name = "出库数量")]
[SugarColumn(ColumnName = "quantity")]
public decimal Quantity { get; set; }
[ExcelColumn(Name = "出库类型")]
[SugarColumn(ColumnName = "transaction_Type")]
public string TransactionType { get; set; }
[ExcelColumn(Name = "操作员")]
[SugarColumn(ColumnName = "operator")]
public string Operator { get; set; }
[ExcelColumn(Name = "仓库编码")]
[SugarColumn(ColumnName = "warehouse_code")]
public string WarehouseCode { get; set; }
[ExcelColumn(Name = "仓库名称")]
[SugarColumn(ColumnName = "warehouse_name")]
public string WarehouseName { get; set; }
[ExcelColumn(Name = "库位编码")]
[SugarColumn(ColumnName = "location_code")]
public string LocationCode { get; set; }
[ExcelColumn(Name = "库位名称")]
[SugarColumn(ColumnName = "location_name")]
public string LocationName { get; set; }
[ExcelColumn(Name = "关联订单号")]
[SugarColumn(ColumnName = "order_no")]
public string OrderNo { get; set; }
public string SupplierName { get; set; }
[ExcelColumn(Name = "创建时间")]
[SugarColumn(ColumnName = "created_time")]
public DateTime? CreatedTime { get; set; }
[ExcelColumn(Name = "原材料工单号")]
[SugarColumn(ColumnName = "workorder_raw")]
public string WorkorderRaw { get; set; }
}
}