新增库存出入库单据及下拉选项相关接口

本次提交为物料库存管理模块增加了出入库单据的创建接口(入库单、出库单),并补充了物料及出入库类型下拉选项接口。新增了相关DTO数据结构,服务接口与实现,完善了库存变更的业务流程,所有操作均支持事务控制,提升了数据一致性和系统健壮性。
This commit is contained in:
2025-12-29 11:43:25 +08:00
parent 7d69dbc43f
commit 8b13457ff6
7 changed files with 464 additions and 3 deletions

View File

@@ -60,4 +60,15 @@ namespace DOAN.Model.BZFM.Dto
[ExcelColumn(Name = "物料类型(原材料/半成品/产成品/打包材料/辅料)")]
public string TypeLabel { get; set; }
}
/// <summary>
/// 物料清单下拉内容
/// </summary>
public class MmMaterialOption
{
public string MaterialCode { get; set; }
public string MaterialName { get; set; }
public string Specification { get; set; }
public string CategoryCode { get; set; }
}
}

View File

@@ -62,4 +62,38 @@ namespace DOAN.Model.BZFM.Dto
[ExcelColumn(Name = "入库类型")]
public string TransactionTypeLabel { get; set; }
}
/// <summary>
/// 入库单
/// </summary>
public class InboundReceiptDto
{
public string Unit { get; set; }
public DateTime? CreatedTime { get; set; }
public string Remarks { get; set; }
public string Operator { get; set; }
public string SupplierName { get; set; }
public string SupplierCode { get; set; }
public DateTime? ExpiryDate { get; set; }
public DateTime? ProductionDate { get; set; }
public string BatchNo { get; set; }
[Required(ErrorMessage = "入库类型不能为空")]
public string TransactionType { get; set; }
[Required(ErrorMessage = "入库数量不能为空")]
public decimal Quantity { get; set; }
public string LocationName { get; set; }
public string LocationCode { get; set; }
public string WarehouseName { get; set; }
[Required(ErrorMessage = "仓库编码不能为空")]
public string WarehouseCode { get; set; }
public string MaterialName { get; set; }
[Required(ErrorMessage = "物料编码不能为空")]
public string MaterialCode { get; set; }
[Required(ErrorMessage = "入库单号不能为空")]
public string InboundNo { get; set; }
[ExcelColumn(Name = "入库类型")]
public string TransactionTypeLabel { get; set; }
// 1-蓝单正向 2-红单逆向
public int ReceiptType { get; set; } = 1;
}
}

View File

@@ -56,4 +56,50 @@ namespace DOAN.Model.BZFM.Dto
[ExcelColumn(Name = "出库类型")]
public string TransactionTypeLabel { get; set; }
}
/// <summary>
/// 出库单
/// </summary>
public class OutboundReceiptDto
{
[Required(ErrorMessage = "出库单号不能为空")]
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; }
[ExcelColumn(Name = "出库类型")]
public string TransactionTypeLabel { get; set; }
// 1-蓝单正向 2-红单逆向
public int ReceiptType { get; set; } = 1;
}
}

View File

@@ -38,4 +38,13 @@ namespace DOAN.Model.BZFM.Dto
[ExcelColumn(Name = "状态(停用/启用)")]
public string StatusLabel { get; set; }
}
/// <summary>
/// 出入库类别对照表下拉内容
/// </summary>
public class MmTransactionOption
{
public string Label { get; set; }
public string Value { get; set; }
}
}