新增BZFM物料管理相关后端接口与服务实现
本次提交为BZFM模块新增了物料管理相关的核心后端能力,包括库位、物料、物料分类、出入库记录、出入库类别等6张表的Controller、实体、DTO、Service及接口定义,实现了标准的增删改查接口,支持权限校验、AOP日志、分页查询等,完善了物料管理基础后端支撑。
This commit is contained in:
53
DOAN.Model/MES/Material/Dto/MmLocationDto.cs
Normal file
53
DOAN.Model/MES/Material/Dto/MmLocationDto.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 库位表查询对象
|
||||
/// </summary>
|
||||
public class MmLocationQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 库位表输入输出对象
|
||||
/// </summary>
|
||||
public class MmLocationDto
|
||||
{
|
||||
[Required(ErrorMessage = "主键ID不能为空")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "库位编码不能为空")]
|
||||
public string LocationCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "库位名称不能为空")]
|
||||
public string LocationName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "仓库编码不能为空")]
|
||||
public string WarehouseCode { get; set; }
|
||||
|
||||
public string WarehouseName { get; set; }
|
||||
|
||||
public string AreaCode { get; set; }
|
||||
|
||||
public string AreaName { get; set; }
|
||||
|
||||
public decimal Capacity { get; set; }
|
||||
|
||||
public string Unit { get; set; }
|
||||
|
||||
public string LocationType { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "库位类型(半成品/成品/临时/返工/报废)")]
|
||||
public string LocationTypeLabel { get; set; }
|
||||
}
|
||||
}
|
||||
42
DOAN.Model/MES/Material/Dto/MmMaterialCategoryDto.cs
Normal file
42
DOAN.Model/MES/Material/Dto/MmMaterialCategoryDto.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料分类表查询对象
|
||||
/// </summary>
|
||||
public class MmMaterialCategoryQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物料分类表输入输出对象
|
||||
/// </summary>
|
||||
public class MmMaterialCategoryDto
|
||||
{
|
||||
[Required(ErrorMessage = "主键ID不能为空")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "分类编码不能为空")]
|
||||
public string CategoryCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "分类名称不能为空")]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
public int? LevelNo { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "状态(0/1)")]
|
||||
public string StatusLabel { get; set; }
|
||||
}
|
||||
}
|
||||
54
DOAN.Model/MES/Material/Dto/MmMaterialDto.cs
Normal file
54
DOAN.Model/MES/Material/Dto/MmMaterialDto.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料表查询对象
|
||||
/// </summary>
|
||||
public class MmMaterialQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 物料表输入输出对象
|
||||
/// </summary>
|
||||
public class MmMaterialDto
|
||||
{
|
||||
[Required(ErrorMessage = "主键ID不能为空")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "物料编码不能为空")]
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "物料名称不能为空")]
|
||||
public string MaterialName { get; set; }
|
||||
|
||||
public string Specification { get; set; }
|
||||
|
||||
public string CategoryCode { get; set; }
|
||||
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
public string Unit { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public string SupplierCode { get; set; }
|
||||
|
||||
public string SupplierName { get; set; }
|
||||
|
||||
public decimal SafetyStock { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "物料类型(原材料/半成品/产成品/打包材料/辅料)")]
|
||||
public string TypeLabel { get; set; }
|
||||
}
|
||||
}
|
||||
65
DOAN.Model/MES/Material/Dto/MmRecordInboundDto.cs
Normal file
65
DOAN.Model/MES/Material/Dto/MmRecordInboundDto.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 入库记录表查询对象
|
||||
/// </summary>
|
||||
public class MmRecordInboundQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 入库记录表输入输出对象
|
||||
/// </summary>
|
||||
public class MmRecordInboundDto
|
||||
{
|
||||
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 = "主键ID不能为空")]
|
||||
public int Id { 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; }
|
||||
}
|
||||
}
|
||||
59
DOAN.Model/MES/Material/Dto/MmRecordOutboundDto.cs
Normal file
59
DOAN.Model/MES/Material/Dto/MmRecordOutboundDto.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库记录表查询对象
|
||||
/// </summary>
|
||||
public class MmRecordOutboundQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 出库记录表输入输出对象
|
||||
/// </summary>
|
||||
public class MmRecordOutboundDto
|
||||
{
|
||||
[Required(ErrorMessage = "主键ID不能为空")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[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; }
|
||||
}
|
||||
}
|
||||
41
DOAN.Model/MES/Material/Dto/MmTransactionTypeDto.cs
Normal file
41
DOAN.Model/MES/Material/Dto/MmTransactionTypeDto.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
namespace DOAN.Model.BZFM.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 出入库类别对照表查询对象
|
||||
/// </summary>
|
||||
public class MmTransactionTypeQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 出入库类别对照表输入输出对象
|
||||
/// </summary>
|
||||
public class MmTransactionTypeDto
|
||||
{
|
||||
[Required(ErrorMessage = "主键ID不能为空")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "类别编码不能为空")]
|
||||
public string TypeCode { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "类别名称不能为空")]
|
||||
public string TypeName { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "操作方向(入库/出库)不能为空")]
|
||||
public string TransactionDirection { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
|
||||
|
||||
[ExcelColumn(Name = "状态(停用/启用)")]
|
||||
public string StatusLabel { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user