diff --git a/Admin.NET/Admin.NET.Application/Entity/ProductWarehousing.cs b/Admin.NET/Admin.NET.Application/Entity/ProductWarehousing.cs new file mode 100644 index 0000000..e7e9ccb --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Entity/ProductWarehousing.cs @@ -0,0 +1,214 @@ +using Admin.NET.Core; +namespace Admin.NET.Application.Entity; + +/// +/// 产品入库 +/// +[SugarTable("ProductWarehousing","产品入库")] +public class ProductWarehousing : EntityTenant +{ + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)] + public string? Name { get; set; } + + /// + /// 商品条码 + /// + [SugarColumn(ColumnName = "GoodCode", ColumnDescription = "商品条码", Length = 32)] + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + [SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")] + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + [SugarColumn(ColumnName = "MaterialsNum", ColumnDescription = "物料编码", Length = 32)] + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + [SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)] + public string? Specifications { get; set; } + + /// + /// 分类 + /// + [SugarColumn(ColumnName = "Classify", ColumnDescription = "分类", Length = 32)] + public string? Classify { get; set; } + + /// + /// 入库数量 + /// + [SugarColumn(ColumnName = "Count", ColumnDescription = "入库数量")] + public int? Count { get; set; } + + /// + /// 库存单位 + /// + [SugarColumn(ColumnName = "Unit", ColumnDescription = "库存单位", Length = 32)] + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + [SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")] + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + [SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)] + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + [SugarColumn(ColumnName = "PackageScale", ColumnDescription = "包装比例", Length = 32)] + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + [SugarColumn(ColumnName = "Batch", ColumnDescription = "批次", Length = 32)] + public string? Batch { get; set; } + + /// + /// 公司 + /// + [SugarColumn(ColumnName = "Custom", ColumnDescription = "公司", Length = 32)] + public string? Custom { get; set; } + + /// + /// 品牌 + /// + [SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)] + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + [SugarColumn(ColumnName = "CodeType", ColumnDescription = "条码类型", Length = 32)] + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + [SugarColumn(ColumnName = "CodeCount", ColumnDescription = "条码数量")] + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + [SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)] + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + [SugarColumn(ColumnName = "ProductDate", ColumnDescription = "生产日期")] + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + [SugarColumn(ColumnName = "LoseDate", ColumnDescription = "失效日期")] + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + [SugarColumn(ColumnName = "SingleWeight", ColumnDescription = "单重", Length = 10, DecimalDigits=0 )] + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + [SugarColumn(ColumnName = "TotalWeight", ColumnDescription = "总重", Length = 10, DecimalDigits=0 )] + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + [SugarColumn(ColumnName = "UnitPrice", ColumnDescription = "单价", Length = 10, DecimalDigits=0 )] + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + [SugarColumn(ColumnName = "TotalPrice", ColumnDescription = "总价", Length = 10, DecimalDigits=0 )] + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] + public string? Remarks { get; set; } + + /// + /// 源ID + /// + [SugarColumn(ColumnName = "SourceId", ColumnDescription = "源ID")] + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + [SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID")] + public long? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + [SugarColumn(ColumnName = "ExpandField", ColumnDescription = "拓展字段", Length = 32)] + public string? ExpandField { get; set; } + + /// + /// 入库类型 + /// + [SugarColumn(ColumnName = "WarehousingType", ColumnDescription = "入库类型", Length = 32)] + public string? WarehousingType { get; set; } + + /// + /// 物料编码 + /// + [SugarColumn(ColumnName = "CodeNum", ColumnDescription = "物料编码", Length = 32)] + public string? CodeNum { get; set; } + + /// + /// 入库日期 + /// + [SugarColumn(ColumnName = "WarehousingDate", ColumnDescription = "入库日期")] + public DateTime? WarehousingDate { get; set; } + + /// + /// 供应商 + /// + [SugarColumn(ColumnName = "Supplier", ColumnDescription = "供应商", Length = 32)] + public string? Supplier { get; set; } + + /// + /// 状态 + /// + [SugarColumn(ColumnName = "Status", ColumnDescription = "状态")] + public int? Status { get; set; } + + /// + /// 单号 + /// + [SugarColumn(ColumnName = "OddNumber", ColumnDescription = "单号", Length = 32)] + public string? OddNumber { get; set; } + + /// + /// 生产线 + /// + [SugarColumn(ColumnName = "ProductionLine", ColumnDescription = "生产线", Length = 32)] + public string? ProductionLine { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Entity/ReportDetailTable.cs b/Admin.NET/Admin.NET.Application/Entity/ReportDetailTable.cs index e992fcc..67187ae 100644 --- a/Admin.NET/Admin.NET.Application/Entity/ReportDetailTable.cs +++ b/Admin.NET/Admin.NET.Application/Entity/ReportDetailTable.cs @@ -159,4 +159,10 @@ public class ReportDetailTable : EntityTenant [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] public string? Remarks { get; set; } + /// + /// 物料ID + /// + [SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")] + public long? MaterialsId { get; set; } + } diff --git a/Admin.NET/Admin.NET.Application/Entity/ReportTable.cs b/Admin.NET/Admin.NET.Application/Entity/ReportTable.cs index 2ed97a1..56ac082 100644 --- a/Admin.NET/Admin.NET.Application/Entity/ReportTable.cs +++ b/Admin.NET/Admin.NET.Application/Entity/ReportTable.cs @@ -48,7 +48,13 @@ public class ReportTable : EntityTenant /// [SugarColumn(ColumnName = "SourceNumber", ColumnDescription = "源单号", Length = 32)] public string? SourceNumber { get; set; } - + + /// + /// 物料ID + /// + [SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")] + public long? MaterialsId { get; set; } + /// /// 备注 /// diff --git a/Admin.NET/Admin.NET.Application/Entity/WarehouseDetails.cs b/Admin.NET/Admin.NET.Application/Entity/WarehouseDetails.cs new file mode 100644 index 0000000..c51ee29 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Entity/WarehouseDetails.cs @@ -0,0 +1,172 @@ +using Admin.NET.Core; +namespace Admin.NET.Application.Entity; + +/// +/// 仓库统计 +/// +[SugarTable("WarehouseDetails","仓库统计")] +public class WarehouseDetails : EntityTenant +{ + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)] + public string? Name { get; set; } + + /// + /// 商品条码 + /// + [SugarColumn(ColumnName = "GoodCode", ColumnDescription = "商品条码", Length = 32)] + public string? GoodCode { get; set; } + + /// + /// 物料编码 + /// + [SugarColumn(ColumnName = "MaterialsNum", ColumnDescription = "物料编码", Length = 32)] + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + [SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)] + public string? Specifications { get; set; } + + /// + /// 分类 + /// + [SugarColumn(ColumnName = "Classify", ColumnDescription = "分类", Length = 32)] + public string? Classify { get; set; } + + /// + /// 库存数量 + /// + [SugarColumn(ColumnName = "Count", ColumnDescription = "库存数量")] + public int? Count { get; set; } + + /// + /// 库存单位 + /// + [SugarColumn(ColumnName = "Unit", ColumnDescription = "库存单位", Length = 32)] + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + [SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")] + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + [SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)] + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + [SugarColumn(ColumnName = "PackageScale", ColumnDescription = "包装比例", Length = 32)] + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + [SugarColumn(ColumnName = "Batch", ColumnDescription = "批次", Length = 32)] + public string? Batch { get; set; } + + /// + /// 公司 + /// + [SugarColumn(ColumnName = "Custom", ColumnDescription = "公司", Length = 32)] + public string? Custom { get; set; } + + /// + /// 品牌 + /// + [SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)] + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + [SugarColumn(ColumnName = "CodeType", ColumnDescription = "条码类型", Length = 32)] + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + [SugarColumn(ColumnName = "CodeCount", ColumnDescription = "条码数量")] + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + [SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)] + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + [SugarColumn(ColumnName = "ProductDate", ColumnDescription = "生产日期")] + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + [SugarColumn(ColumnName = "LoseDate", ColumnDescription = "失效日期")] + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + [SugarColumn(ColumnName = "SingleWeight", ColumnDescription = "单重", Length = 32, DecimalDigits=0 )] + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + [SugarColumn(ColumnName = "TotalWeight", ColumnDescription = "总重", Length = 32, DecimalDigits=0 )] + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + [SugarColumn(ColumnName = "UnitPrice", ColumnDescription = "单价", Length = 10, DecimalDigits=0 )] + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + [SugarColumn(ColumnName = "TotalPrice", ColumnDescription = "总价", Length = 10, DecimalDigits=0 )] + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] + public string? Remarks { get; set; } + + /// + /// 源ID + /// + [SugarColumn(ColumnName = "SourceId", ColumnDescription = "源ID")] + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + [SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "仓库ID", Length = 32)] + public string? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + [SugarColumn(ColumnName = "ExpandField", ColumnDescription = "拓展字段", Length = 32)] + public string? ExpandField { get; set; } + + /// + /// 物料ID + /// + [SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")] + public long? MaterialsId { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Entity/WarehousingStatistics.cs b/Admin.NET/Admin.NET.Application/Entity/WarehousingStatistics.cs new file mode 100644 index 0000000..5dd8b21 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Entity/WarehousingStatistics.cs @@ -0,0 +1,106 @@ +using Admin.NET.Core; +namespace Admin.NET.Application.Entity; + +/// +/// 入库统计 +/// +[SugarTable("WarehousingStatistics","入库统计")] +public class WarehousingStatistics : EntityTenant +{ + /// + /// 名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 32)] + public string? Name { get; set; } + + /// + /// 物料编码 + /// + [SugarColumn(ColumnName = "CodeNum", ColumnDescription = "物料编码", Length = 32)] + public string? CodeNum { get; set; } + + /// + /// 入库数量 + /// + [SugarColumn(ColumnName = "Count", ColumnDescription = "入库数量")] + public int? Count { get; set; } + + /// + /// 入库单位 + /// + [SugarColumn(ColumnName = "Unit", ColumnDescription = "入库单位", Length = 32)] + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + [SugarColumn(ColumnName = "BaseCount", ColumnDescription = "基本数量")] + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + [SugarColumn(ColumnName = "BaseUnit", ColumnDescription = "基本单位", Length = 32)] + public string? BaseUnit { get; set; } + + /// + /// 品牌 + /// + [SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)] + public string? Brand { get; set; } + + /// + /// 规格 + /// + [SugarColumn(ColumnName = "Specifications", ColumnDescription = "规格", Length = 32)] + public string? Specifications { get; set; } + + /// + /// 入库类型 + /// + [SugarColumn(ColumnName = "WarehousingType", ColumnDescription = "入库类型", Length = 32)] + public string? WarehousingType { get; set; } + + /// + /// 物料ID + /// + [SugarColumn(ColumnName = "MaterialsId", ColumnDescription = "物料ID")] + public long? MaterialsId { get; set; } + + /// + /// 来源ID + /// + [SugarColumn(ColumnName = "SourceId", ColumnDescription = "来源ID")] + public long? SourceId { get; set; } + + /// + /// 入库日期 + /// + [SugarColumn(ColumnName = "WarehousingDate", ColumnDescription = "入库日期")] + public DateTime? WarehousingDate { get; set; } + + /// + /// 入库仓库ID + /// + [SugarColumn(ColumnName = "WarehouseId", ColumnDescription = "入库仓库ID")] + public long? WarehouseId { get; set; } + + /// + /// 库位 + /// + [SugarColumn(ColumnName = "WarehouseLocation", ColumnDescription = "库位", Length = 32)] + public string? WarehouseLocation { get; set; } + + /// + /// 供应商 + /// + [SugarColumn(ColumnName = "Supplier", ColumnDescription = "供应商", Length = 32)] + public string? Supplier { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] + public string? Remarks { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingDto.cs b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingDto.cs new file mode 100644 index 0000000..8215bc3 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingDto.cs @@ -0,0 +1,223 @@ +namespace Admin.NET.Application; + + /// + /// 产品入库输出参数 + /// + public class ProductWarehousingDto + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 状态 + /// + public int? Status { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } diff --git a/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingInput.cs b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingInput.cs new file mode 100644 index 0000000..4f4d719 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingInput.cs @@ -0,0 +1,456 @@ +using Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// + /// 产品入库基础输入参数 + /// + public class ProductWarehousingBaseInput + { + /// + /// 名称 + /// + public virtual string? Name { get; set; } + + /// + /// 商品条码 + /// + public virtual string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public virtual long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public virtual string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public virtual string? Specifications { get; set; } + + /// + /// 分类 + /// + public virtual string? Classify { get; set; } + + /// + /// 入库数量 + /// + public virtual int? Count { get; set; } + + /// + /// 库存单位 + /// + public virtual string? Unit { get; set; } + + /// + /// 基本数量 + /// + public virtual int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public virtual string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public virtual string? PackageScale { get; set; } + + /// + /// 批次 + /// + public virtual string? Batch { get; set; } + + /// + /// 公司 + /// + public virtual string? Custom { get; set; } + + /// + /// 品牌 + /// + public virtual string? Brand { get; set; } + + /// + /// 条码类型 + /// + public virtual string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public virtual int? CodeCount { get; set; } + + /// + /// 库位 + /// + public virtual string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public virtual DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public virtual DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public virtual decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public virtual decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public virtual decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public virtual decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 源ID + /// + public virtual long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public virtual long? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public virtual string? ExpandField { get; set; } + + /// + /// 入库类型 + /// + public virtual string? WarehousingType { get; set; } + + /// + /// 物料编码 + /// + public virtual string? CodeNum { get; set; } + + /// + /// 入库日期 + /// + public virtual DateTime? WarehousingDate { get; set; } + + /// + /// 供应商 + /// + public virtual string? Supplier { get; set; } + + /// + /// 状态 + /// + public virtual int? Status { get; set; } + + /// + /// 单号 + /// + public virtual string? OddNumber { get; set; } + + /// + /// 生产线 + /// + public virtual string? ProductionLine { get; set; } + + /// + /// 租户Id + /// + public virtual long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + + } + + /// + /// 产品入库分页查询输入参数 + /// + public class ProductWarehousingInput : BasePageInput + { + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 生产日期范围 + /// + public List ProductDateRange { get; set; } + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 失效日期范围 + /// + public List LoseDateRange { get; set; } + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 入库日期范围 + /// + public List WarehousingDateRange { get; set; } + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 状态 + /// + public int? Status { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + } + + /// + /// 产品入库增加输入参数 + /// + public class AddProductWarehousingInput : ProductWarehousingBaseInput + { + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + + } + + /// + /// 产品入库删除输入参数 + /// + public class DeleteProductWarehousingInput : BaseIdInput + { + } + + /// + /// 产品入库更新输入参数 + /// + public class UpdateProductWarehousingInput : ProductWarehousingBaseInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 产品入库主键查询输入参数 + /// + public class QueryByIdProductWarehousingInput : DeleteProductWarehousingInput + { + + } diff --git a/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingOutput.cs b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingOutput.cs new file mode 100644 index 0000000..d420d74 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/Dto/ProductWarehousingOutput.cs @@ -0,0 +1,225 @@ +namespace Admin.NET.Application; + +/// +/// 产品入库输出参数 +/// +public class ProductWarehousingOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 状态 + /// + public int? Status { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } + + diff --git a/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/ProductWarehousingService.cs b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/ProductWarehousingService.cs new file mode 100644 index 0000000..ced9ff6 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/ProductWarehousing/ProductWarehousingService.cs @@ -0,0 +1,249 @@ +using Admin.NET.Core.Service; +using Admin.NET.Application.Const; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +namespace Admin.NET.Application; +/// +/// 产品入库服务 +/// +[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] +public class ProductWarehousingService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + private readonly WarehouseDetailsService _warehouseDetails; + private readonly MaterialsService _materialsService; + private readonly SysUnitService _sysUnitService; + private readonly MaterialClassifyService _materialClassifyService; + private readonly WarehousingStatisticsService _warehousingStatisticsService; + public ProductWarehousingService(SqlSugarRepository rep, + WarehouseDetailsService warehouseDetails, + MaterialsService materialsService, + SysUnitService sysUnitService, + MaterialClassifyService materialClassifyService, + WarehousingStatisticsService warehousingStatisticsService) + { + _rep = rep; + _warehouseDetails = warehouseDetails; + _materialsService = materialsService; + _sysUnitService = sysUnitService; + _materialClassifyService = materialClassifyService; + _warehousingStatisticsService = warehousingStatisticsService; + } + + /// + /// 分页查询产品入库 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + public async Task> Page(ProductWarehousingInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.Name.Contains(input.SearchKey.Trim()) + || u.GoodCode.Contains(input.SearchKey.Trim()) + || u.MaterialsNum.Contains(input.SearchKey.Trim()) + || u.Specifications.Contains(input.SearchKey.Trim()) + || u.Classify.Contains(input.SearchKey.Trim()) + || u.Unit.Contains(input.SearchKey.Trim()) + || u.BaseUnit.Contains(input.SearchKey.Trim()) + || u.PackageScale.Contains(input.SearchKey.Trim()) + || u.Batch.Contains(input.SearchKey.Trim()) + || u.Custom.Contains(input.SearchKey.Trim()) + || u.Brand.Contains(input.SearchKey.Trim()) + || u.CodeType.Contains(input.SearchKey.Trim()) + || u.WarehouseLocation.Contains(input.SearchKey.Trim()) + || u.Remarks.Contains(input.SearchKey.Trim()) + || u.ExpandField.Contains(input.SearchKey.Trim()) + || u.WarehousingType.Contains(input.SearchKey.Trim()) + || u.CodeNum.Contains(input.SearchKey.Trim()) + || u.Supplier.Contains(input.SearchKey.Trim()) + || u.OddNumber.Contains(input.SearchKey.Trim()) + || u.ProductionLine.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.GoodCode), u => u.GoodCode.Contains(input.GoodCode.Trim())) + .WhereIF(input.MaterialsId>0, u => u.MaterialsId == input.MaterialsId) + .WhereIF(!string.IsNullOrWhiteSpace(input.MaterialsNum), u => u.MaterialsNum.Contains(input.MaterialsNum.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Classify), u => u.Classify.Contains(input.Classify.Trim())) + .WhereIF(input.Count>0, u => u.Count == input.Count) + .WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim())) + .WhereIF(input.BaseCount>0, u => u.BaseCount == input.BaseCount) + .WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageScale), u => u.PackageScale.Contains(input.PackageScale.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Batch), u => u.Batch.Contains(input.Batch.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Custom), u => u.Custom.Contains(input.Custom.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.CodeType), u => u.CodeType.Contains(input.CodeType.Trim())) + .WhereIF(input.CodeCount>0, u => u.CodeCount == input.CodeCount) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim())) + .WhereIF(input.SourceId>0, u => u.SourceId == input.SourceId) + .WhereIF(input.WarehouseId>0, u => u.WarehouseId == input.WarehouseId) + .WhereIF(!string.IsNullOrWhiteSpace(input.ExpandField), u => u.ExpandField.Contains(input.ExpandField.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehousingType), u => u.WarehousingType.Contains(input.WarehousingType.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.CodeNum), u => u.CodeNum.Contains(input.CodeNum.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Supplier), u => u.Supplier.Contains(input.Supplier.Trim())) + .WhereIF(input.Status>0, u => u.Status == input.Status) + .WhereIF(!string.IsNullOrWhiteSpace(input.OddNumber), u => u.OddNumber.Contains(input.OddNumber.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.ProductionLine), u => u.ProductionLine.Contains(input.ProductionLine.Trim())) + .Select(); + if(input.ProductDateRange != null && input.ProductDateRange.Count >0) + { + DateTime? start= input.ProductDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.ProductDate > start); + if (input.ProductDateRange.Count >1 && input.ProductDateRange[1].HasValue) + { + var end = input.ProductDateRange[1].Value.AddDays(1); + query = query.Where(u => u.ProductDate < end); + } + } + if(input.LoseDateRange != null && input.LoseDateRange.Count >0) + { + DateTime? start= input.LoseDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.LoseDate > start); + if (input.LoseDateRange.Count >1 && input.LoseDateRange[1].HasValue) + { + var end = input.LoseDateRange[1].Value.AddDays(1); + query = query.Where(u => u.LoseDate < end); + } + } + if(input.WarehousingDateRange != null && input.WarehousingDateRange.Count >0) + { + DateTime? start= input.WarehousingDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.WarehousingDate > start); + if (input.WarehousingDateRange.Count >1 && input.WarehousingDateRange[1].HasValue) + { + var end = input.WarehousingDateRange[1].Value.AddDays(1); + query = query.Where(u => u.WarehousingDate < end); + } + } + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加产品入库 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + public async Task Add(AddProductWarehousingInput input) + { + var materials = await _materialsService.Detail(new QueryByIdMaterialsInput() { Id = input.MaterialsId.Value }); + SysUnitOutput unit = null; + string unitScale = string.Empty; + if (materials != null) + { + input.Specifications = materials.Specifications; + input.CodeNum = materials.CodeNum; + input.Brand = materials.Brand; + var units = await _sysUnitService.ListByGroupId(materials.UnitGroupId.Value); + unit = units.Find(a => a.Name == input.Unit); + if (unit != null) + { + input.BaseCount = input.Count * unit.Rate; + input.BaseUnit = units.FirstOrDefault(a => a.IsBaseUnit == true).Name; + unitScale = SysUnitService.GetUnitScale(units); + } + input.GoodCode = materials.BarCode; + input.MaterialsNum = materials.CodeNum; + input.UnitPrice = materials.Price; + input.Custom = input.Supplier; + if (unit != null) + { + input.BaseCount = input.Count * unit.Rate; + } + input.TotalPrice = input.BaseCount * materials.Price; + input.PackageScale = unitScale; + input.Classify = (await _materialClassifyService.Detail(new QueryByIdMaterialClassifyInput() { Id = materials.Classify })).Name; + } + + + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + + var details = await _warehouseDetails.List(); + if (details != null && details.Any(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit)) + { + var detail = details.Find(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit); + detail.Count += input.Count; + if (unit != null) + { + detail.BaseCount = detail.Count * unit.Rate; + } + await _warehouseDetails.UpdateByEntity(detail.Adapt()); + } + else + { + var newEnt = input.Adapt(); + newEnt.SourceId = entity.Id; + var addId = await _warehouseDetails.Add(newEnt); + } + + var newDetail = input.Adapt(); + newDetail.SourceId = entity.Id; + await _warehousingStatisticsService.Add(newDetail); + + return entity.Id; + } + + /// + /// 删除产品入库 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + public async Task Delete(DeleteProductWarehousingInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _rep.FakeDeleteAsync(entity); //假删除 + //await _rep.DeleteAsync(entity); //真删除 + } + + /// + /// 更新产品入库 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + public async Task Update(UpdateProductWarehousingInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// + /// 获取产品入库 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + public async Task Detail([FromQuery] QueryByIdProductWarehousingInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 获取产品入库列表 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + public async Task> List([FromQuery] ProductWarehousingInput input) + { + return await _rep.AsQueryable().Select().ToListAsync(); + } + + + + + +} + diff --git a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableDto.cs b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableDto.cs index e27a81c..45124d4 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableDto.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableDto.cs @@ -1,178 +1,183 @@ namespace Admin.NET.Application; +/// +/// 汇报单详情输出参数 +/// +public class ReportDetailTableDto +{ /// - /// 汇报单详情输出参数 + /// 主键Id /// - public class ReportDetailTableDto - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 产品名称 - /// - public string ProductName { get; set; } - - /// - /// 产品编码 - /// - public string? ProductCodeNum { get; set; } - - /// - /// 单号 - /// - public string? OddNumber { get; set; } - - /// - /// 状态 - /// - public string State { get; set; } - - /// - /// 生产类型 - /// - public string? ProductType { get; set; } - - /// - /// 生产线 - /// - public string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public string? SourceNumber { get; set; } - - /// - /// 规格型号 - /// - public string? Specifications { get; set; } - - /// - /// 完工数量 - /// - public int? ProductCount { get; set; } - - /// - /// 入库数量 - /// - public int? PutWarehouse { get; set; } - - /// - /// 基本完工数量 - /// - public int? BaseProductCount { get; set; } - - /// - /// 基本入库数量 - /// - public int? BasePutWarehouse { get; set; } - - /// - /// 单位 - /// - public string? Unit { get; set; } - - /// - /// 基本单位 - /// - public string? BaseUnit { get; set; } - - /// - /// 批次 - /// - public string? Batch { get; set; } - - /// - /// 包装规格 - /// - public string? Package { get; set; } - - /// - /// 包装数量 - /// - public int? PackageCount { get; set; } - - /// - /// 采集失败数量 - /// - public int? GatherFalseCount { get; set; } - - /// - /// 生产日期 - /// - public DateTime? ProductDate { get; set; } - - /// - /// 班组 - /// - public string? TeamGroup { get; set; } - - /// - /// 操作工人 - /// - public string? Operator { get; set; } - - /// - /// 完工时间 - /// - public DateTime? EndDate { get; set; } - - /// - /// 源单号 - /// - public string? SourceOddNumber { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - - /// - /// 租户Id - /// - public long? TenantId { get; set; } - - /// - /// 创建时间 - /// - public DateTime? CreateTime { get; set; } - - /// - /// 更新时间 - /// - public DateTime? UpdateTime { get; set; } - - /// - /// 创建者Id - /// - public long? CreateUserId { get; set; } - - /// - /// 创建者姓名 - /// - public string? CreateUserName { get; set; } - - /// - /// 修改者Id - /// - public long? UpdateUserId { get; set; } - - /// - /// 修改者姓名 - /// - public string? UpdateUserName { get; set; } - - /// - /// 软删除 - /// - public bool IsDelete { get; set; } - - } + public long Id { get; set; } + + /// + /// 产品名称 + /// + public string ProductName { get; set; } + + /// + /// 产品编码 + /// + public string? ProductCodeNum { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 状态 + /// + public string State { get; set; } + + /// + /// 生产类型 + /// + public string? ProductType { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 生产线编码 + /// + public string? CodeNum { get; set; } + + /// + /// 源单号 + /// + public string? SourceNumber { get; set; } + + /// + /// 规格型号 + /// + public string? Specifications { get; set; } + + /// + /// 完工数量 + /// + public int? ProductCount { get; set; } + + /// + /// 入库数量 + /// + public int? PutWarehouse { get; set; } + + /// + /// 基本完工数量 + /// + public int? BaseProductCount { get; set; } + + /// + /// 基本入库数量 + /// + public int? BasePutWarehouse { get; set; } + + /// + /// 单位 + /// + public string? Unit { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 包装规格 + /// + public string? Package { get; set; } + + /// + /// 包装数量 + /// + public int? PackageCount { get; set; } + + /// + /// 采集失败数量 + /// + public int? GatherFalseCount { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 班组 + /// + public string? TeamGroup { get; set; } + + /// + /// 操作工人 + /// + public string? Operator { get; set; } + + /// + /// 完工时间 + /// + public DateTime? EndDate { get; set; } + + /// + /// 源单号 + /// + public string? SourceOddNumber { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableInput.cs b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableInput.cs index e494eb1..9744507 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableInput.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableInput.cs @@ -3,372 +3,383 @@ using System.ComponentModel.DataAnnotations; namespace Admin.NET.Application; +/// +/// 汇报单详情基础输入参数 +/// +public class ReportDetailTableBaseInput +{ /// - /// 汇报单详情基础输入参数 + /// 产品名称 /// - public class ReportDetailTableBaseInput - { - /// - /// 产品名称 - /// - public virtual string ProductName { get; set; } - - /// - /// 产品编码 - /// - public virtual string? ProductCodeNum { get; set; } - - /// - /// 单号 - /// - public virtual string? OddNumber { get; set; } - - /// - /// 状态 - /// - public virtual string State { get; set; } - - /// - /// 生产类型 - /// - public virtual string? ProductType { get; set; } - - /// - /// 生产线 - /// - public virtual string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public virtual string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public virtual string? SourceNumber { get; set; } - - /// - /// 规格型号 - /// - public virtual string? Specifications { get; set; } - - /// - /// 完工数量 - /// - public virtual int? ProductCount { get; set; } - - /// - /// 入库数量 - /// - public virtual int? PutWarehouse { get; set; } - - /// - /// 基本完工数量 - /// - public virtual int? BaseProductCount { get; set; } - - /// - /// 基本入库数量 - /// - public virtual int? BasePutWarehouse { get; set; } - - /// - /// 单位 - /// - public virtual string? Unit { get; set; } - - /// - /// 基本单位 - /// - public virtual string? BaseUnit { get; set; } - - /// - /// 批次 - /// - public virtual string? Batch { get; set; } - - /// - /// 包装规格 - /// - public virtual string? Package { get; set; } - - /// - /// 包装数量 - /// - public virtual int? PackageCount { get; set; } - - /// - /// 采集失败数量 - /// - public virtual int? GatherFalseCount { get; set; } - - /// - /// 生产日期 - /// - public virtual DateTime? ProductDate { get; set; } - - /// - /// 班组 - /// - public virtual string? TeamGroup { get; set; } - - /// - /// 操作工人 - /// - public virtual string? Operator { get; set; } - - /// - /// 完工时间 - /// - public virtual DateTime? EndDate { get; set; } - - /// - /// 源单号 - /// - public virtual string? SourceOddNumber { get; set; } - - /// - /// 备注 - /// - public virtual string? Remarks { get; set; } - - /// - /// 租户Id - /// - public virtual long? TenantId { get; set; } - - /// - /// 创建时间 - /// - public virtual DateTime? CreateTime { get; set; } - - /// - /// 更新时间 - /// - public virtual DateTime? UpdateTime { get; set; } - - /// - /// 创建者Id - /// - public virtual long? CreateUserId { get; set; } - - /// - /// 创建者姓名 - /// - public virtual string? CreateUserName { get; set; } - - /// - /// 修改者Id - /// - public virtual long? UpdateUserId { get; set; } - - /// - /// 修改者姓名 - /// - public virtual string? UpdateUserName { get; set; } - - /// - /// 软删除 - /// - public virtual bool IsDelete { get; set; } - - } + public virtual string ProductName { get; set; } /// - /// 汇报单详情分页查询输入参数 + /// 产品编码 /// - public class ReportDetailTableInput : BasePageInput - { - /// - /// 关键字查询 - /// - public string? SearchKey { get; set; } - - /// - /// 产品名称 - /// - public string? ProductName { get; set; } - - /// - /// 产品编码 - /// - public string? ProductCodeNum { get; set; } - - /// - /// 单号 - /// - public string? OddNumber { get; set; } - - /// - /// 状态 - /// - public string? State { get; set; } - - /// - /// 生产类型 - /// - public string? ProductType { get; set; } - - /// - /// 生产线 - /// - public string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public string? SourceNumber { get; set; } - - /// - /// 规格型号 - /// - public string? Specifications { get; set; } - - /// - /// 完工数量 - /// - public int? ProductCount { get; set; } - - /// - /// 入库数量 - /// - public int? PutWarehouse { get; set; } - - /// - /// 基本完工数量 - /// - public int? BaseProductCount { get; set; } - - /// - /// 基本入库数量 - /// - public int? BasePutWarehouse { get; set; } - - /// - /// 单位 - /// - public string? Unit { get; set; } - - /// - /// 基本单位 - /// - public string? BaseUnit { get; set; } - - /// - /// 批次 - /// - public string? Batch { get; set; } - - /// - /// 包装规格 - /// - public string? Package { get; set; } - - /// - /// 包装数量 - /// - public int? PackageCount { get; set; } - - /// - /// 采集失败数量 - /// - public int? GatherFalseCount { get; set; } - - /// - /// 生产日期 - /// - public DateTime? ProductDate { get; set; } - - /// - /// 生产日期范围 - /// - public List ProductDateRange { get; set; } - /// - /// 班组 - /// - public string? TeamGroup { get; set; } - - /// - /// 操作工人 - /// - public string? Operator { get; set; } - - /// - /// 完工时间 - /// - public DateTime? EndDate { get; set; } - - /// - /// 完工时间范围 - /// - public List EndDateRange { get; set; } - /// - /// 源单号 - /// - public string? SourceOddNumber { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - - } + public virtual string? ProductCodeNum { get; set; } /// - /// 汇报单详情增加输入参数 + /// 单号 /// - public class AddReportDetailTableInput : ReportDetailTableBaseInput - { - /// - /// 产品名称 - /// - [Required(ErrorMessage = "产品名称不能为空")] - public override string ProductName { get; set; } - - /// - /// 状态 - /// - [Required(ErrorMessage = "状态不能为空")] - public override string State { get; set; } - - /// - /// 软删除 - /// - [Required(ErrorMessage = "软删除不能为空")] - public override bool IsDelete { get; set; } - - } + public virtual string? OddNumber { get; set; } /// - /// 汇报单详情删除输入参数 + /// 状态 /// - public class DeleteReportDetailTableInput : BaseIdInput - { - } + public virtual string State { get; set; } /// - /// 汇报单详情更新输入参数 + /// 生产类型 /// - public class UpdateReportDetailTableInput : ReportDetailTableBaseInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } + public virtual string? ProductType { get; set; } /// - /// 汇报单详情主键查询输入参数 + /// 生产线 /// - public class QueryByIdReportDetailTableInput : DeleteReportDetailTableInput - { + public virtual string? ProductionLine { get; set; } - } + /// + /// 生产线编码 + /// + public virtual string? CodeNum { get; set; } + + /// + /// 源单号 + /// + public virtual string? SourceNumber { get; set; } + + /// + /// 规格型号 + /// + public virtual string? Specifications { get; set; } + + /// + /// 完工数量 + /// + public virtual int? ProductCount { get; set; } + + /// + /// 入库数量 + /// + public virtual int? PutWarehouse { get; set; } + + /// + /// 基本完工数量 + /// + public virtual int? BaseProductCount { get; set; } + + /// + /// 基本入库数量 + /// + public virtual int? BasePutWarehouse { get; set; } + + /// + /// 单位 + /// + public virtual string? Unit { get; set; } + + /// + /// 基本单位 + /// + public virtual string? BaseUnit { get; set; } + + /// + /// 批次 + /// + public virtual string? Batch { get; set; } + + /// + /// 包装规格 + /// + public virtual string? Package { get; set; } + + /// + /// 包装数量 + /// + public virtual int? PackageCount { get; set; } + + /// + /// 采集失败数量 + /// + public virtual int? GatherFalseCount { get; set; } + + /// + /// 生产日期 + /// + public virtual DateTime? ProductDate { get; set; } + + /// + /// 班组 + /// + public virtual string? TeamGroup { get; set; } + + /// + /// 操作工人 + /// + public virtual string? Operator { get; set; } + + /// + /// 完工时间 + /// + public virtual DateTime? EndDate { get; set; } + + /// + /// 源单号 + /// + public virtual string? SourceOddNumber { get; set; } + + /// + /// 物料ID + /// + public virtual long? MaterialsId { get; set; } + + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 租户Id + /// + public virtual long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + +} + +/// +/// 汇报单详情分页查询输入参数 +/// +public class ReportDetailTableInput : BasePageInput +{ + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 产品名称 + /// + public string? ProductName { get; set; } + + /// + /// 产品编码 + /// + public string? ProductCodeNum { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 状态 + /// + public string? State { get; set; } + + /// + /// 生产类型 + /// + public string? ProductType { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 生产线编码 + /// + public string? CodeNum { get; set; } + + /// + /// 源单号 + /// + public string? SourceNumber { get; set; } + + /// + /// 规格型号 + /// + public string? Specifications { get; set; } + + /// + /// 完工数量 + /// + public int? ProductCount { get; set; } + + /// + /// 入库数量 + /// + public int? PutWarehouse { get; set; } + + /// + /// 基本完工数量 + /// + public int? BaseProductCount { get; set; } + + /// + /// 基本入库数量 + /// + public int? BasePutWarehouse { get; set; } + + /// + /// 单位 + /// + public string? Unit { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 包装规格 + /// + public string? Package { get; set; } + + /// + /// 包装数量 + /// + public int? PackageCount { get; set; } + + /// + /// 采集失败数量 + /// + public int? GatherFalseCount { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 生产日期范围 + /// + public List ProductDateRange { get; set; } + /// + /// 班组 + /// + public string? TeamGroup { get; set; } + + /// + /// 操作工人 + /// + public string? Operator { get; set; } + + /// + /// 完工时间 + /// + public DateTime? EndDate { get; set; } + + /// + /// 完工时间范围 + /// + public List EndDateRange { get; set; } + /// + /// 源单号 + /// + public string? SourceOddNumber { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + +} + +/// +/// 汇报单详情增加输入参数 +/// +public class AddReportDetailTableInput : ReportDetailTableBaseInput +{ + /// + /// 产品名称 + /// + [Required(ErrorMessage = "产品名称不能为空")] + public override string ProductName { get; set; } + + /// + /// 状态 + /// + [Required(ErrorMessage = "状态不能为空")] + public override string State { get; set; } + + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + +} + +/// +/// 汇报单详情删除输入参数 +/// +public class DeleteReportDetailTableInput : BaseIdInput +{ +} + +/// +/// 汇报单详情更新输入参数 +/// +public class UpdateReportDetailTableInput : ReportDetailTableBaseInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + +} + +/// +/// 汇报单详情主键查询输入参数 +/// +public class QueryByIdReportDetailTableInput : DeleteReportDetailTableInput +{ + +} diff --git a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableOutput.cs b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableOutput.cs index a61efb5..e7d1648 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableOutput.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportDetailTable/Dto/ReportDetailTableOutput.cs @@ -9,172 +9,177 @@ public class ReportDetailTableOutput /// 主键Id /// public long Id { get; set; } - + /// /// 产品名称 /// public string ProductName { get; set; } - + /// /// 产品编码 /// public string? ProductCodeNum { get; set; } - + /// /// 单号 /// public string? OddNumber { get; set; } - + /// /// 状态 /// public string State { get; set; } - + /// /// 生产类型 /// public string? ProductType { get; set; } - + /// /// 生产线 /// public string? ProductionLine { get; set; } - + /// /// 生产线编码 /// public string? CodeNum { get; set; } - + /// /// 源单号 /// public string? SourceNumber { get; set; } - + /// /// 规格型号 /// public string? Specifications { get; set; } - + /// /// 完工数量 /// public int? ProductCount { get; set; } - + /// /// 入库数量 /// public int? PutWarehouse { get; set; } - + /// /// 基本完工数量 /// public int? BaseProductCount { get; set; } - + /// /// 基本入库数量 /// public int? BasePutWarehouse { get; set; } - + /// /// 单位 /// public string? Unit { get; set; } - + /// /// 基本单位 /// public string? BaseUnit { get; set; } - + /// /// 批次 /// public string? Batch { get; set; } - + /// /// 包装规格 /// public string? Package { get; set; } - + /// /// 包装数量 /// public int? PackageCount { get; set; } - + /// /// 采集失败数量 /// public int? GatherFalseCount { get; set; } - + /// /// 生产日期 /// public DateTime? ProductDate { get; set; } - + /// /// 班组 /// public string? TeamGroup { get; set; } - + /// /// 操作工人 /// public string? Operator { get; set; } - + /// /// 完工时间 /// public DateTime? EndDate { get; set; } - + /// /// 源单号 /// public string? SourceOddNumber { get; set; } - + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + /// /// 备注 /// public string? Remarks { get; set; } - + /// /// 租户Id /// public long? TenantId { get; set; } - + /// /// 创建时间 /// public DateTime? CreateTime { get; set; } - + /// /// 更新时间 /// public DateTime? UpdateTime { get; set; } - + /// /// 创建者Id /// public long? CreateUserId { get; set; } - + /// /// 创建者姓名 /// public string? CreateUserName { get; set; } - + /// /// 修改者Id /// public long? UpdateUserId { get; set; } - + /// /// 修改者姓名 /// public string? UpdateUserName { get; set; } - + /// /// 软删除 /// public bool IsDelete { get; set; } - - } - + +} + diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableDto.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableDto.cs index 298c294..c011aab 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableDto.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableDto.cs @@ -1,93 +1,98 @@ namespace Admin.NET.Application; +/// +/// 汇报单输出参数 +/// +public class ReportTableDto +{ /// - /// 汇报单输出参数 + /// 主键Id /// - public class ReportTableDto - { - /// - /// 主键Id - /// - public long Id { get; set; } - - /// - /// 单号 - /// - public string? OddNumber { get; set; } - - /// - /// 业务日期 - /// - public DateTime? StartDate { get; set; } - - /// - /// 状态 - /// - public int? State { get; set; } - - /// - /// 生产类型 - /// - public string? ProductType { get; set; } - - /// - /// 生产线 - /// - public string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public string? SourceNumber { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - - /// - /// 租户Id - /// - public long? TenantId { get; set; } - - /// - /// 创建时间 - /// - public DateTime? CreateTime { get; set; } - - /// - /// 更新时间 - /// - public DateTime? UpdateTime { get; set; } - - /// - /// 创建者Id - /// - public long? CreateUserId { get; set; } - - /// - /// 创建者姓名 - /// - public string? CreateUserName { get; set; } - - /// - /// 修改者Id - /// - public long? UpdateUserId { get; set; } - - /// - /// 修改者姓名 - /// - public string? UpdateUserName { get; set; } - - /// - /// 软删除 - /// - public bool IsDelete { get; set; } - - } + public long Id { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 业务日期 + /// + public DateTime? StartDate { get; set; } + + /// + /// 状态 + /// + public int? State { get; set; } + + /// + /// 生产类型 + /// + public string? ProductType { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 生产线编码 + /// + public string? CodeNum { get; set; } + + /// + /// 源单号 + /// + public string? SourceNumber { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableInput.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableInput.cs index aee4ffe..e62988b 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableInput.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableInput.cs @@ -3,186 +3,198 @@ using System.ComponentModel.DataAnnotations; namespace Admin.NET.Application; +/// +/// 汇报单基础输入参数 +/// +public class ReportTableBaseInput +{ /// - /// 汇报单基础输入参数 + /// 单号 /// - public class ReportTableBaseInput - { - /// - /// 单号 - /// - public virtual string? OddNumber { get; set; } - - /// - /// 业务日期 - /// - public virtual DateTime? StartDate { get; set; } - - /// - /// 状态 - /// - public virtual int? State { get; set; } - - /// - /// 生产类型 - /// - public virtual string? ProductType { get; set; } - - /// - /// 生产线 - /// - public virtual string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public virtual string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public virtual string? SourceNumber { get; set; } - - /// - /// 备注 - /// - public virtual string? Remarks { get; set; } - - /// - /// 租户Id - /// - public virtual long? TenantId { get; set; } - - /// - /// 创建时间 - /// - public virtual DateTime? CreateTime { get; set; } - - /// - /// 更新时间 - /// - public virtual DateTime? UpdateTime { get; set; } - - /// - /// 创建者Id - /// - public virtual long? CreateUserId { get; set; } - - /// - /// 创建者姓名 - /// - public virtual string? CreateUserName { get; set; } - - /// - /// 修改者Id - /// - public virtual long? UpdateUserId { get; set; } - - /// - /// 修改者姓名 - /// - public virtual string? UpdateUserName { get; set; } - - /// - /// 软删除 - /// - public virtual bool IsDelete { get; set; } - - } + public virtual string? OddNumber { get; set; } /// - /// 汇报单分页查询输入参数 + /// 业务日期 /// - public class ReportTableInput : BasePageInput - { - /// - /// 关键字查询 - /// - public string? SearchKey { get; set; } - - /// - /// 单号 - /// - public string? OddNumber { get; set; } - - /// - /// 业务日期 - /// - public DateTime? StartDate { get; set; } - - /// - /// 业务日期范围 - /// - public List StartDateRange { get; set; } - /// - /// 状态 - /// - public int? State { get; set; } - - /// - /// 生产类型 - /// - public string? ProductType { get; set; } - - /// - /// 生产线 - /// - public string? ProductionLine { get; set; } - - /// - /// 生产线编码 - /// - public string? CodeNum { get; set; } - - /// - /// 源单号 - /// - public string? SourceNumber { get; set; } - - /// - /// 备注 - /// - public string? Remarks { get; set; } - - } + public virtual DateTime? StartDate { get; set; } /// - /// 汇报单增加输入参数 + /// 状态 /// - public class AddReportTableInput : ReportTableBaseInput - { - /// - /// 软删除 - /// - [Required(ErrorMessage = "软删除不能为空")] - public override bool IsDelete { get; set; } - - } + public virtual int? State { get; set; } /// - /// 汇报单删除输入参数 + /// 生产类型 /// - public class DeleteReportTableInput : BaseIdInput - { - } + public virtual string? ProductType { get; set; } /// - /// 汇报单更新输入参数 + /// 生产线 /// - public class UpdateReportTableInput : ReportTableBaseInput - { - /// - /// 主键Id - /// - [Required(ErrorMessage = "主键Id不能为空")] - public long Id { get; set; } - - } + public virtual string? ProductionLine { get; set; } /// - /// 汇报单主键查询输入参数 + /// 生产线编码 /// - public class QueryByIdReportTableInput : DeleteReportTableInput - { + public virtual string? CodeNum { get; set; } - } + /// + /// 源单号 + /// + public virtual string? SourceNumber { get; set; } + + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 租户Id + /// + public virtual long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + +} + +/// +/// 汇报单分页查询输入参数 +/// +public class ReportTableInput : BasePageInput +{ + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 单号 + /// + public string? OddNumber { get; set; } + + /// + /// 业务日期 + /// + public DateTime? StartDate { get; set; } + + /// + /// 业务日期范围 + /// + public List StartDateRange { get; set; } + /// + /// 状态 + /// + public int? State { get; set; } + + /// + /// 生产类型 + /// + public string? ProductType { get; set; } + + /// + /// 生产线 + /// + public string? ProductionLine { get; set; } + + /// + /// 生产线编码 + /// + public string? CodeNum { get; set; } + + /// + /// 源单号 + /// + public string? SourceNumber { get; set; } + + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + +} + +/// +/// 汇报单增加输入参数 +/// +public class AddReportTableInput : ReportTableBaseInput +{ + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + +} + +/// +/// 汇报单删除输入参数 +/// +public class DeleteReportTableInput : BaseIdInput +{ +} + +/// +/// 汇报单更新输入参数 +/// +public class UpdateReportTableInput : ReportTableBaseInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + +} + +/// +/// 汇报单主键查询输入参数 +/// +public class QueryByIdReportTableInput : DeleteReportTableInput +{ + +} diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs index 8cf5766..983886e 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/Dto/ReportTableOutput.cs @@ -9,87 +9,93 @@ public class ReportTableOutput /// 主键Id /// public long Id { get; set; } - + /// /// 单号 /// public string? OddNumber { get; set; } - + /// /// 业务日期 /// public DateTime? StartDate { get; set; } - + /// /// 状态 /// public int? State { get; set; } - + /// /// 生产类型 /// public string? ProductType { get; set; } - + /// /// 生产线 /// public string? ProductionLine { get; set; } - + /// /// 生产线编码 /// public string? CodeNum { get; set; } - + /// /// 源单号 /// public string? SourceNumber { get; set; } - + + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + /// /// 备注 /// public string? Remarks { get; set; } - + /// /// 租户Id /// public long? TenantId { get; set; } - + /// /// 创建时间 /// public DateTime? CreateTime { get; set; } - + /// /// 更新时间 /// public DateTime? UpdateTime { get; set; } - + /// /// 创建者Id /// public long? CreateUserId { get; set; } - + /// /// 创建者姓名 /// public string? CreateUserName { get; set; } - + /// /// 修改者Id /// public long? UpdateUserId { get; set; } - + /// /// 修改者姓名 /// public string? UpdateUserName { get; set; } - + /// /// 软删除 /// public bool IsDelete { get; set; } - - } - + +} + diff --git a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs index 85c20d3..7471e87 100644 --- a/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs +++ b/Admin.NET/Admin.NET.Application/Service/ReportTable/ReportTableService.cs @@ -216,7 +216,7 @@ public class ReportTableService : IDynamicApiController, ITransient if (unit == null) throw new ArgumentNullException(nameof(unitGroup)); - var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0,UpdateUserId = input.MaterialsId }; + var newReport = new AddReportTableInput() { CreateTime = DateTime.Now, IsDelete = false, OddNumber = DateTime.Now.ToString("yyyyMMddhhmmss"), State = 0, MaterialsId = input.MaterialsId }; var addReport = await Add(newReport); var others = units.FindAll(a => a.Rate < unit.Rate).OrderBy(a => a.Rate).ToList(); others.Reverse(); diff --git a/Admin.NET/Admin.NET.Application/Service/SysUnit/SysUnitService.cs b/Admin.NET/Admin.NET.Application/Service/SysUnit/SysUnitService.cs index 61907ae..3cb4297 100644 --- a/Admin.NET/Admin.NET.Application/Service/SysUnit/SysUnitService.cs +++ b/Admin.NET/Admin.NET.Application/Service/SysUnit/SysUnitService.cs @@ -117,8 +117,59 @@ public class SysUnitService : IDynamicApiController, ITransient { return await _rep.AsQueryable().WhereIF(unitGroupId > 0, u => u.GroupUnitId == unitGroupId && !u.IsDelete).OrderBy(a => a.Rate).Select().ToListAsync(); } - - + public static string GetUnitScale(List units) + { + string result = string.Empty; + if (units.Count < 1) + { + return string.Empty; + } + if (units.Count < 2) + { + return $"1{units.FirstOrDefault().Name}"; + } + units = units.OrderBy(a => a.Rate).ToList(); + units.Reverse(); + var first = units.FirstOrDefault(); + var second = units[1]; + result += $"1{first.Name}:{first.ChildUnitCount}{second.Name}"; + for (int i = 1; i < units.Count - 1; i++) + { + var current = units[i]; + var next = units[i + 1]; + result += $":{current.ChildUnitCount}{next.Name}"; + } + return result; + } + public static string GetUnitScale(List units,string currentUnit) + { + string result = string.Empty; + if (units.Count < 1) + { + return string.Empty; + } + if (units.Count < 2) + { + return $"1{units.FirstOrDefault().Name}"; + } + units = units.OrderBy(a => a.Rate).ToList(); + bool isStart = false; + for (int i = 0; i < units.Count - 1; i++) + { + var current = units[i]; + var next = units[i + 1]; + if (isStart) + { + result += $":{current.ChildUnitCount}{next.Name}"; + } + if (current.Name == currentUnit) + { + result += $"1{current.Name}:{current.ChildUnitCount}{next.Name}"; + isStart = true; + } + } + return result; + } } diff --git a/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsDto.cs b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsDto.cs new file mode 100644 index 0000000..0eaf30c --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsDto.cs @@ -0,0 +1,188 @@ +namespace Admin.NET.Application; + +/// +/// 仓库统计输出参数 +/// +public class WarehouseDetailsDto +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 库存数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public string? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + +} diff --git a/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsInput.cs b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsInput.cs new file mode 100644 index 0000000..58cdc72 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsInput.cs @@ -0,0 +1,382 @@ +using Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + +/// +/// 仓库统计基础输入参数 +/// +public class WarehouseDetailsBaseInput +{ + /// + /// 名称 + /// + public virtual string? Name { get; set; } + + /// + /// 商品条码 + /// + public virtual string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public virtual string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public virtual string? Specifications { get; set; } + + /// + /// 分类 + /// + public virtual string? Classify { get; set; } + + /// + /// 库存数量 + /// + public virtual int? Count { get; set; } + + /// + /// 库存单位 + /// + public virtual string? Unit { get; set; } + + /// + /// 基本数量 + /// + public virtual int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public virtual string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public virtual string? PackageScale { get; set; } + + /// + /// 批次 + /// + public virtual string? Batch { get; set; } + + /// + /// 公司 + /// + public virtual string? Custom { get; set; } + + /// + /// 品牌 + /// + public virtual string? Brand { get; set; } + + /// + /// 条码类型 + /// + public virtual string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public virtual int? CodeCount { get; set; } + + /// + /// 库位 + /// + public virtual string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public virtual DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public virtual DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public virtual decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public virtual decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public virtual decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public virtual decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 源ID + /// + public virtual long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public virtual string? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public virtual string? ExpandField { get; set; } + + /// + /// 租户Id + /// + public virtual long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + +} + +/// +/// 仓库统计分页查询输入参数 +/// +public class WarehouseDetailsInput : BasePageInput +{ + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 库存数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 生产日期范围 + /// + public List ProductDateRange { get; set; } + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 失效日期范围 + /// + public List LoseDateRange { get; set; } + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public string? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + +} + +/// +/// 仓库统计增加输入参数 +/// +public class AddWarehouseDetailsInput : WarehouseDetailsBaseInput +{ + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + +} + +/// +/// 仓库统计删除输入参数 +/// +public class DeleteWarehouseDetailsInput : BaseIdInput +{ +} + +/// +/// 仓库统计更新输入参数 +/// +public class UpdateWarehouseDetailsInput : WarehouseDetailsBaseInput +{ + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + +} + +/// +/// 仓库统计主键查询输入参数 +/// +public class QueryByIdWarehouseDetailsInput : DeleteWarehouseDetailsInput +{ + +} diff --git a/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsOutput.cs b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsOutput.cs new file mode 100644 index 0000000..a93df6a --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/Dto/WarehouseDetailsOutput.cs @@ -0,0 +1,190 @@ +namespace Admin.NET.Application; + +/// +/// 仓库统计输出参数 +/// +public class WarehouseDetailsOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 商品条码 + /// + public string? GoodCode { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 物料编码 + /// + public string? MaterialsNum { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 分类 + /// + public string? Classify { get; set; } + + /// + /// 库存数量 + /// + public int? Count { get; set; } + + /// + /// 库存单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 包装比例 + /// + public string? PackageScale { get; set; } + + /// + /// 批次 + /// + public string? Batch { get; set; } + + /// + /// 公司 + /// + public string? Custom { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 条码类型 + /// + public string? CodeType { get; set; } + + /// + /// 条码数量 + /// + public int? CodeCount { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 生产日期 + /// + public DateTime? ProductDate { get; set; } + + /// + /// 失效日期 + /// + public DateTime? LoseDate { get; set; } + + /// + /// 单重 + /// + public decimal? SingleWeight { get; set; } + + /// + /// 总重 + /// + public decimal? TotalWeight { get; set; } + + /// + /// 单价 + /// + public decimal? UnitPrice { get; set; } + + /// + /// 总价 + /// + public decimal? TotalPrice { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 源ID + /// + public long? SourceId { get; set; } + + /// + /// 仓库ID + /// + public string? WarehouseId { get; set; } + + /// + /// 拓展字段 + /// + public string? ExpandField { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + +} + + diff --git a/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/WarehouseDetailsService.cs b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/WarehouseDetailsService.cs new file mode 100644 index 0000000..23ffa5a --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehouseDetails/WarehouseDetailsService.cs @@ -0,0 +1,161 @@ +using Admin.NET.Core.Service; +using Admin.NET.Application.Const; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +namespace Admin.NET.Application; +/// +/// 仓库统计服务 +/// +[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] +public class WarehouseDetailsService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + public WarehouseDetailsService(SqlSugarRepository rep) + { + _rep = rep; + } + + /// + /// 分页查询仓库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + public async Task> Page(WarehouseDetailsInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.Name.Contains(input.SearchKey.Trim()) + || u.GoodCode.Contains(input.SearchKey.Trim()) + || u.MaterialsNum.Contains(input.SearchKey.Trim()) + || u.Specifications.Contains(input.SearchKey.Trim()) + || u.Classify.Contains(input.SearchKey.Trim()) + || u.Unit.Contains(input.SearchKey.Trim()) + || u.BaseUnit.Contains(input.SearchKey.Trim()) + || u.PackageScale.Contains(input.SearchKey.Trim()) + || u.Batch.Contains(input.SearchKey.Trim()) + || u.Custom.Contains(input.SearchKey.Trim()) + || u.Brand.Contains(input.SearchKey.Trim()) + || u.CodeType.Contains(input.SearchKey.Trim()) + || u.WarehouseLocation.Contains(input.SearchKey.Trim()) + || u.Remarks.Contains(input.SearchKey.Trim()) + || u.WarehouseId.Contains(input.SearchKey.Trim()) + || u.ExpandField.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.GoodCode), u => u.GoodCode.Contains(input.GoodCode.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.MaterialsNum), u => u.MaterialsNum.Contains(input.MaterialsNum.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Classify), u => u.Classify.Contains(input.Classify.Trim())) + .WhereIF(input.Count>0, u => u.Count == input.Count) + .WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim())) + .WhereIF(input.BaseCount>0, u => u.BaseCount == input.BaseCount) + .WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.PackageScale), u => u.PackageScale.Contains(input.PackageScale.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Batch), u => u.Batch.Contains(input.Batch.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Custom), u => u.Custom.Contains(input.Custom.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.CodeType), u => u.CodeType.Contains(input.CodeType.Trim())) + .WhereIF(input.CodeCount>0, u => u.CodeCount == input.CodeCount) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim())) + .WhereIF(input.SourceId>0, u => u.SourceId == input.SourceId) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseId), u => u.WarehouseId.Contains(input.WarehouseId.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.ExpandField), u => u.ExpandField.Contains(input.ExpandField.Trim())) + .Select(); + if(input.ProductDateRange != null && input.ProductDateRange.Count >0) + { + DateTime? start= input.ProductDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.ProductDate > start); + if (input.ProductDateRange.Count >1 && input.ProductDateRange[1].HasValue) + { + var end = input.ProductDateRange[1].Value.AddDays(1); + query = query.Where(u => u.ProductDate < end); + } + } + if(input.LoseDateRange != null && input.LoseDateRange.Count >0) + { + DateTime? start= input.LoseDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.LoseDate > start); + if (input.LoseDateRange.Count >1 && input.LoseDateRange[1].HasValue) + { + var end = input.LoseDateRange[1].Value.AddDays(1); + query = query.Where(u => u.LoseDate < end); + } + } + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加仓库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + public async Task Add(AddWarehouseDetailsInput input) + { + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + return entity.Id; + } + + /// + /// 删除仓库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + public async Task Delete(DeleteWarehouseDetailsInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _rep.FakeDeleteAsync(entity); //假删除 + //await _rep.DeleteAsync(entity); //真删除 + } + + /// + /// 更新仓库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + public async Task Update(UpdateWarehouseDetailsInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + public async Task UpdateByEntity(WarehouseDetails entity) + { + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + /// + /// 获取仓库统计 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + public async Task Detail([FromQuery] QueryByIdWarehouseDetailsInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 获取仓库统计列表 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + public async Task> List() + { + return await _rep.AsQueryable().Select().ToListAsync(); + } + + + +} + diff --git a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsDto.cs b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsDto.cs new file mode 100644 index 0000000..90435e8 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsDto.cs @@ -0,0 +1,133 @@ +namespace Admin.NET.Application; + + /// + /// 入库统计输出参数 + /// + public class WarehousingStatisticsDto + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 入库单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 来源ID + /// + public long? SourceId { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 入库仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } diff --git a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsInput.cs b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsInput.cs new file mode 100644 index 0000000..ad7443a --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsInput.cs @@ -0,0 +1,268 @@ +using Admin.NET.Core; +using System.ComponentModel.DataAnnotations; + +namespace Admin.NET.Application; + + /// + /// 入库统计基础输入参数 + /// + public class WarehousingStatisticsBaseInput + { + /// + /// 名称 + /// + public virtual string? Name { get; set; } + + /// + /// 物料编码 + /// + public virtual string? CodeNum { get; set; } + + /// + /// 入库数量 + /// + public virtual int? Count { get; set; } + + /// + /// 入库单位 + /// + public virtual string? Unit { get; set; } + + /// + /// 基本数量 + /// + public virtual int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public virtual string? BaseUnit { get; set; } + + /// + /// 品牌 + /// + public virtual string? Brand { get; set; } + + /// + /// 规格 + /// + public virtual string? Specifications { get; set; } + + /// + /// 入库类型 + /// + public virtual string? WarehousingType { get; set; } + + /// + /// 物料ID + /// + public virtual long? MaterialsId { get; set; } + + /// + /// 来源ID + /// + public virtual long? SourceId { get; set; } + + /// + /// 入库日期 + /// + public virtual DateTime? WarehousingDate { get; set; } + + /// + /// 入库仓库ID + /// + public virtual long? WarehouseId { get; set; } + + /// + /// 库位 + /// + public virtual string? WarehouseLocation { get; set; } + + /// + /// 供应商 + /// + public virtual string? Supplier { get; set; } + + /// + /// 备注 + /// + public virtual string? Remarks { get; set; } + + /// + /// 租户Id + /// + public virtual long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public virtual DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public virtual DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public virtual long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public virtual string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public virtual long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public virtual string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public virtual bool IsDelete { get; set; } + + } + + /// + /// 入库统计分页查询输入参数 + /// + public class WarehousingStatisticsInput : BasePageInput + { + /// + /// 关键字查询 + /// + public string? SearchKey { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 入库单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 来源ID + /// + public long? SourceId { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 入库日期范围 + /// + public List WarehousingDateRange { get; set; } + /// + /// 入库仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + } + + /// + /// 入库统计增加输入参数 + /// + public class AddWarehousingStatisticsInput : WarehousingStatisticsBaseInput + { + /// + /// 软删除 + /// + [Required(ErrorMessage = "软删除不能为空")] + public override bool IsDelete { get; set; } + + } + + /// + /// 入库统计删除输入参数 + /// + public class DeleteWarehousingStatisticsInput : BaseIdInput + { + } + + /// + /// 入库统计更新输入参数 + /// + public class UpdateWarehousingStatisticsInput : WarehousingStatisticsBaseInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 入库统计主键查询输入参数 + /// + public class QueryByIdWarehousingStatisticsInput : DeleteWarehousingStatisticsInput + { + + } diff --git a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsOutput.cs b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsOutput.cs new file mode 100644 index 0000000..a0a8e27 --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/Dto/WarehousingStatisticsOutput.cs @@ -0,0 +1,135 @@ +namespace Admin.NET.Application; + +/// +/// 入库统计输出参数 +/// +public class WarehousingStatisticsOutput +{ + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 名称 + /// + public string? Name { get; set; } + + /// + /// 物料编码 + /// + public string? CodeNum { get; set; } + + /// + /// 入库数量 + /// + public int? Count { get; set; } + + /// + /// 入库单位 + /// + public string? Unit { get; set; } + + /// + /// 基本数量 + /// + public int? BaseCount { get; set; } + + /// + /// 基本单位 + /// + public string? BaseUnit { get; set; } + + /// + /// 品牌 + /// + public string? Brand { get; set; } + + /// + /// 规格 + /// + public string? Specifications { get; set; } + + /// + /// 入库类型 + /// + public string? WarehousingType { get; set; } + + /// + /// 物料ID + /// + public long? MaterialsId { get; set; } + + /// + /// 来源ID + /// + public long? SourceId { get; set; } + + /// + /// 入库日期 + /// + public DateTime? WarehousingDate { get; set; } + + /// + /// 入库仓库ID + /// + public long? WarehouseId { get; set; } + + /// + /// 库位 + /// + public string? WarehouseLocation { get; set; } + + /// + /// 供应商 + /// + public string? Supplier { get; set; } + + /// + /// 备注 + /// + public string? Remarks { get; set; } + + /// + /// 租户Id + /// + public long? TenantId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? CreateTime { get; set; } + + /// + /// 更新时间 + /// + public DateTime? UpdateTime { get; set; } + + /// + /// 创建者Id + /// + public long? CreateUserId { get; set; } + + /// + /// 创建者姓名 + /// + public string? CreateUserName { get; set; } + + /// + /// 修改者Id + /// + public long? UpdateUserId { get; set; } + + /// + /// 修改者姓名 + /// + public string? UpdateUserName { get; set; } + + /// + /// 软删除 + /// + public bool IsDelete { get; set; } + + } + + diff --git a/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs new file mode 100644 index 0000000..bb1551b --- /dev/null +++ b/Admin.NET/Admin.NET.Application/Service/WarehousingStatistics/WarehousingStatisticsService.cs @@ -0,0 +1,192 @@ +using Admin.NET.Core.Service; +using Admin.NET.Application.Const; +using Admin.NET.Application.Entity; +using Microsoft.AspNetCore.Http; +namespace Admin.NET.Application; +/// +/// 入库统计服务 +/// +[ApiDescriptionSettings(ApplicationConst.GroupName, Order = 100)] +public class WarehousingStatisticsService : IDynamicApiController, ITransient +{ + private readonly SqlSugarRepository _rep; + + public WarehousingStatisticsService(SqlSugarRepository rep) + { + _rep = rep; + } + + /// + /// 分页查询入库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Page")] + public async Task> Page(WarehousingStatisticsInput input) + { + var query = _rep.AsQueryable() + .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => + u.Name.Contains(input.SearchKey.Trim()) + || u.CodeNum.Contains(input.SearchKey.Trim()) + || u.Unit.Contains(input.SearchKey.Trim()) + || u.BaseUnit.Contains(input.SearchKey.Trim()) + || u.Brand.Contains(input.SearchKey.Trim()) + || u.Specifications.Contains(input.SearchKey.Trim()) + || u.WarehousingType.Contains(input.SearchKey.Trim()) + || u.WarehouseLocation.Contains(input.SearchKey.Trim()) + || u.Supplier.Contains(input.SearchKey.Trim()) + || u.Remarks.Contains(input.SearchKey.Trim()) + ) + .WhereIF(!string.IsNullOrWhiteSpace(input.Name), u => u.Name.Contains(input.Name.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.CodeNum), u => u.CodeNum.Contains(input.CodeNum.Trim())) + .WhereIF(input.Count > 0, u => u.Count == input.Count) + .WhereIF(!string.IsNullOrWhiteSpace(input.Unit), u => u.Unit.Contains(input.Unit.Trim())) + .WhereIF(input.BaseCount > 0, u => u.BaseCount == input.BaseCount) + .WhereIF(!string.IsNullOrWhiteSpace(input.BaseUnit), u => u.BaseUnit.Contains(input.BaseUnit.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Brand), u => u.Brand.Contains(input.Brand.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Specifications), u => u.Specifications.Contains(input.Specifications.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehousingType), u => u.WarehousingType.Contains(input.WarehousingType.Trim())) + .WhereIF(input.MaterialsId > 0, u => u.MaterialsId == input.MaterialsId) + .WhereIF(input.SourceId > 0, u => u.SourceId == input.SourceId) + .WhereIF(input.WarehouseId > 0, u => u.WarehouseId == input.WarehouseId) + .WhereIF(!string.IsNullOrWhiteSpace(input.WarehouseLocation), u => u.WarehouseLocation.Contains(input.WarehouseLocation.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Supplier), u => u.Supplier.Contains(input.Supplier.Trim())) + .WhereIF(!string.IsNullOrWhiteSpace(input.Remarks), u => u.Remarks.Contains(input.Remarks.Trim())) + .Select(); + if (input.WarehousingDateRange != null && input.WarehousingDateRange.Count > 0) + { + DateTime? start = input.WarehousingDateRange[0]; + query = query.WhereIF(start.HasValue, u => u.WarehousingDate > start); + if (input.WarehousingDateRange.Count > 1 && input.WarehousingDateRange[1].HasValue) + { + var end = input.WarehousingDateRange[1].Value.AddDays(1); + query = query.Where(u => u.WarehousingDate < end); + } + } + return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize); + } + + /// + /// 增加入库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Add")] + public async Task Add(AddWarehousingStatisticsInput input) + { + //input.WarehousingDate = DateTime.Now; + //var materials = await _materialsService.Detail(new QueryByIdMaterialsInput() { Id = input.MaterialsId.Value }); + //SysUnitOutput unit = null; + //string unitScale = string.Empty; + //if (materials != null) + //{ + // input.Specifications = materials.Specifications; + // input.CodeNum = materials.CodeNum; + // input.Brand = materials.Brand; + // var units = await _sysUnitService.ListByGroupId(materials.UnitGroupId.Value); + // unit = units.Find(a => a.Name == input.Unit); + // if (unit!=null) + // { + // input.BaseCount = input.Count * unit.Rate; + // input.BaseUnit = units.FirstOrDefault(a => a.IsBaseUnit == true).Name; + // unitScale = SysUnitService.GetUnitScale(units); + // } + + //} + + + var entity = input.Adapt(); + await _rep.InsertAsync(entity); + //var details = await _warehouseDetails.List(); + //if (details != null && details.Any(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit)) + //{ + // var detail = details.Find(a => a.MaterialsId == input.MaterialsId && a.Unit == input.Unit); + // detail.Count += input.Count; + // if (unit != null) + // { + // detail.BaseCount = detail.Count * unit.Rate; + // } + // await _warehouseDetails.UpdateByEntity(detail.Adapt()); + //} + //else + //{ + // var newEnt = input.Adapt(); + // if (materials!=null) + // { + // newEnt.GoodCode = materials.BarCode; + // newEnt.MaterialsNum = materials.CodeNum; + // newEnt.UnitPrice = materials.Price; + // newEnt.Custom = input.Supplier; + // if (unit != null) + // { + // newEnt.BaseCount = newEnt.Count * unit.Rate; + // } + // newEnt.TotalPrice = newEnt.BaseCount * materials.Price; + // newEnt.PackageScale = unitScale; + // newEnt.Classify = (await _materialClassifyService.Detail(new QueryByIdMaterialClassifyInput() { Id = materials.Classify })).Name; + // var addId = await _warehouseDetails.Add(newEnt); + // } + //} + + return entity.Id; + } + + /// + /// 删除入库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Delete")] + public async Task Delete(DeleteWarehousingStatisticsInput input) + { + var entity = await _rep.GetFirstAsync(u => u.Id == input.Id) ?? throw Oops.Oh(ErrorCodeEnum.D1002); + await _rep.FakeDeleteAsync(entity); //假删除 + //await _rep.DeleteAsync(entity); //真删除 + } + + /// + /// 更新入库统计 + /// + /// + /// + [HttpPost] + [ApiDescriptionSettings(Name = "Update")] + public async Task Update(UpdateWarehousingStatisticsInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// + /// 获取入库统计 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "Detail")] + public async Task Detail([FromQuery] QueryByIdWarehousingStatisticsInput input) + { + return await _rep.GetFirstAsync(u => u.Id == input.Id); + } + + /// + /// 获取入库统计列表 + /// + /// + /// + [HttpGet] + [ApiDescriptionSettings(Name = "List")] + public async Task> List() + { + return await _rep.AsQueryable().Select().ToListAsync(); + } + + + + + +} + diff --git a/Web/src/api/main/invoice.ts b/Web/src/api/main/invoice.ts new file mode 100644 index 0000000..b734a01 --- /dev/null +++ b/Web/src/api/main/invoice.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +enum Api { + AddInvoice = '/api/invoice/add', + DeleteInvoice = '/api/invoice/delete', + UpdateInvoice = '/api/invoice/update', + PageInvoice = '/api/invoice/page', + DetailInvoice = '/api/invoice/detail', +} + +// 增加发货通知单 +export const addInvoice = (params?: any) => + request({ + url: Api.AddInvoice, + method: 'post', + data: params, + }); + +// 删除发货通知单 +export const deleteInvoice = (params?: any) => + request({ + url: Api.DeleteInvoice, + method: 'post', + data: params, + }); + +// 编辑发货通知单 +export const updateInvoice = (params?: any) => + request({ + url: Api.UpdateInvoice, + method: 'post', + data: params, + }); + +// 分页查询发货通知单 +export const pageInvoice = (params?: any) => + request({ + url: Api.PageInvoice, + method: 'post', + data: params, + }); + +// 详情发货通知单 +export const detailInvoice = (id: any) => + request({ + url: Api.DetailInvoice, + method: 'get', + data: { id }, + }); + + diff --git a/Web/src/api/main/outbound.ts b/Web/src/api/main/outbound.ts new file mode 100644 index 0000000..43b34ce --- /dev/null +++ b/Web/src/api/main/outbound.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +enum Api { + AddOutbound = '/api/outbound/add', + DeleteOutbound = '/api/outbound/delete', + UpdateOutbound = '/api/outbound/update', + PageOutbound = '/api/outbound/page', + DetailOutbound = '/api/outbound/detail', +} + +// 增加出库单 +export const addOutbound = (params?: any) => + request({ + url: Api.AddOutbound, + method: 'post', + data: params, + }); + +// 删除出库单 +export const deleteOutbound = (params?: any) => + request({ + url: Api.DeleteOutbound, + method: 'post', + data: params, + }); + +// 编辑出库单 +export const updateOutbound = (params?: any) => + request({ + url: Api.UpdateOutbound, + method: 'post', + data: params, + }); + +// 分页查询出库单 +export const pageOutbound = (params?: any) => + request({ + url: Api.PageOutbound, + method: 'post', + data: params, + }); + +// 详情出库单 +export const detailOutbound = (id: any) => + request({ + url: Api.DetailOutbound, + method: 'get', + data: { id }, + }); + + diff --git a/Web/src/api/main/productWarehousing.ts b/Web/src/api/main/productWarehousing.ts new file mode 100644 index 0000000..1677314 --- /dev/null +++ b/Web/src/api/main/productWarehousing.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +enum Api { + AddProductWarehousing = '/api/productWarehousing/add', + DeleteProductWarehousing = '/api/productWarehousing/delete', + UpdateProductWarehousing = '/api/productWarehousing/update', + PageProductWarehousing = '/api/productWarehousing/page', + DetailProductWarehousing = '/api/productWarehousing/detail', +} + +// 增加产品入库 +export const addProductWarehousing = (params?: any) => + request({ + url: Api.AddProductWarehousing, + method: 'post', + data: params, + }); + +// 删除产品入库 +export const deleteProductWarehousing = (params?: any) => + request({ + url: Api.DeleteProductWarehousing, + method: 'post', + data: params, + }); + +// 编辑产品入库 +export const updateProductWarehousing = (params?: any) => + request({ + url: Api.UpdateProductWarehousing, + method: 'post', + data: params, + }); + +// 分页查询产品入库 +export const pageProductWarehousing = (params?: any) => + request({ + url: Api.PageProductWarehousing, + method: 'post', + data: params, + }); + +// 详情产品入库 +export const detailProductWarehousing = (id: any) => + request({ + url: Api.DetailProductWarehousing, + method: 'get', + data: { id }, + }); + + diff --git a/Web/src/api/main/warehouseDetails.ts b/Web/src/api/main/warehouseDetails.ts new file mode 100644 index 0000000..e055ab8 --- /dev/null +++ b/Web/src/api/main/warehouseDetails.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +enum Api { + AddWarehouseDetails = '/api/warehouseDetails/add', + DeleteWarehouseDetails = '/api/warehouseDetails/delete', + UpdateWarehouseDetails = '/api/warehouseDetails/update', + PageWarehouseDetails = '/api/warehouseDetails/page', + DetailWarehouseDetails = '/api/warehouseDetails/detail', +} + +// 增加仓库统计 +export const addWarehouseDetails = (params?: any) => + request({ + url: Api.AddWarehouseDetails, + method: 'post', + data: params, + }); + +// 删除仓库统计 +export const deleteWarehouseDetails = (params?: any) => + request({ + url: Api.DeleteWarehouseDetails, + method: 'post', + data: params, + }); + +// 编辑仓库统计 +export const updateWarehouseDetails = (params?: any) => + request({ + url: Api.UpdateWarehouseDetails, + method: 'post', + data: params, + }); + +// 分页查询仓库统计 +export const pageWarehouseDetails = (params?: any) => + request({ + url: Api.PageWarehouseDetails, + method: 'post', + data: params, + }); + +// 详情仓库统计 +export const detailWarehouseDetails = (id: any) => + request({ + url: Api.DetailWarehouseDetails, + method: 'get', + data: { id }, + }); + + diff --git a/Web/src/api/main/warehousingStatistics.ts b/Web/src/api/main/warehousingStatistics.ts new file mode 100644 index 0000000..e5bc62f --- /dev/null +++ b/Web/src/api/main/warehousingStatistics.ts @@ -0,0 +1,50 @@ +import request from '/@/utils/request'; +enum Api { + AddWarehousingStatistics = '/api/warehousingStatistics/add', + DeleteWarehousingStatistics = '/api/warehousingStatistics/delete', + UpdateWarehousingStatistics = '/api/warehousingStatistics/update', + PageWarehousingStatistics = '/api/warehousingStatistics/page', + DetailWarehousingStatistics = '/api/warehousingStatistics/detail', +} + +// 增加入库统计 +export const addWarehousingStatistics = (params?: any) => + request({ + url: Api.AddWarehousingStatistics, + method: 'post', + data: params, + }); + +// 删除入库统计 +export const deleteWarehousingStatistics = (params?: any) => + request({ + url: Api.DeleteWarehousingStatistics, + method: 'post', + data: params, + }); + +// 编辑入库统计 +export const updateWarehousingStatistics = (params?: any) => + request({ + url: Api.UpdateWarehousingStatistics, + method: 'post', + data: params, + }); + +// 分页查询入库统计 +export const pageWarehousingStatistics = (params?: any) => + request({ + url: Api.PageWarehousingStatistics, + method: 'post', + data: params, + }); + +// 详情入库统计 +export const detailWarehousingStatistics = (id: any) => + request({ + url: Api.DetailWarehousingStatistics, + method: 'get', + data: { id }, + }); + + diff --git a/Web/src/views/inventoryManagement/invoice/component/editDialog.vue b/Web/src/views/inventoryManagement/invoice/component/editDialog.vue new file mode 100644 index 0000000..72faf79 --- /dev/null +++ b/Web/src/views/inventoryManagement/invoice/component/editDialog.vue @@ -0,0 +1,222 @@ + + + + + + + diff --git a/Web/src/views/inventoryManagement/invoice/index.vue b/Web/src/views/inventoryManagement/invoice/index.vue new file mode 100644 index 0000000..6936088 --- /dev/null +++ b/Web/src/views/inventoryManagement/invoice/index.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/Web/src/views/inventoryManagement/outbound/component/editDialog.vue b/Web/src/views/inventoryManagement/outbound/component/editDialog.vue new file mode 100644 index 0000000..f4294a3 --- /dev/null +++ b/Web/src/views/inventoryManagement/outbound/component/editDialog.vue @@ -0,0 +1,186 @@ + + + + + + + diff --git a/Web/src/views/inventoryManagement/outbound/index.vue b/Web/src/views/inventoryManagement/outbound/index.vue new file mode 100644 index 0000000..88f8441 --- /dev/null +++ b/Web/src/views/inventoryManagement/outbound/index.vue @@ -0,0 +1,242 @@ + + + + + diff --git a/Web/src/views/inventoryManagement/productWarehousing/component/editDialog.vue b/Web/src/views/inventoryManagement/productWarehousing/component/editDialog.vue new file mode 100644 index 0000000..e9ec5fc --- /dev/null +++ b/Web/src/views/inventoryManagement/productWarehousing/component/editDialog.vue @@ -0,0 +1,316 @@ + + + + + + + diff --git a/Web/src/views/inventoryManagement/productWarehousing/index.vue b/Web/src/views/inventoryManagement/productWarehousing/index.vue new file mode 100644 index 0000000..1b26a9b --- /dev/null +++ b/Web/src/views/inventoryManagement/productWarehousing/index.vue @@ -0,0 +1,410 @@ + + + + + diff --git a/Web/src/views/main/warehousing/component/editDialog.vue b/Web/src/views/inventoryManagement/warehousing/component/editDialog.vue similarity index 100% rename from Web/src/views/main/warehousing/component/editDialog.vue rename to Web/src/views/inventoryManagement/warehousing/component/editDialog.vue diff --git a/Web/src/views/main/warehousing/index.vue b/Web/src/views/inventoryManagement/warehousing/index.vue similarity index 96% rename from Web/src/views/main/warehousing/index.vue rename to Web/src/views/inventoryManagement/warehousing/index.vue index af570fe..3e3c3ab 100644 --- a/Web/src/views/main/warehousing/index.vue +++ b/Web/src/views/inventoryManagement/warehousing/index.vue @@ -102,10 +102,6 @@ @current-change="handleCurrentChange" layout="total, sizes, prev, pager, next, jumper" /> - ([]); @@ -139,7 +134,6 @@ total: 0, }); - const printWarehousingTitle = ref(""); const editWarehousingTitle = ref(""); // 改变高级查询的控件显示状态 diff --git a/Web/src/views/productionCenter/reportDetailTable/component/editDialog.vue b/Web/src/views/productionCenter/reportDetailTable/component/editDialog.vue index e9a8e6f..b36b9d0 100644 --- a/Web/src/views/productionCenter/reportDetailTable/component/editDialog.vue +++ b/Web/src/views/productionCenter/reportDetailTable/component/editDialog.vue @@ -210,6 +210,8 @@ import { ElMessage } from "element-plus"; import type { FormRules } from "element-plus"; import { addReportDetailTable, updateReportDetailTable, detailReportDetailTable } from "/@/api/main/reportDetailTable"; + import { pageMaterials, deleteMaterials, detailMaterials } from '/@/api/main/materials'; + //父级传递来的参数 var props = defineProps({ @@ -241,7 +243,8 @@ ruleForm.value = rowData; if(rowData.updateUserId){ - console.log('matertails'); + materials.value= (await detailMaterials(rowData.materialsId)).data.result; + console.log(materials.value); } isShowDialog.value = true; diff --git a/Web/src/views/warehouseManagement/warehouseDetails/component/editDialog.vue b/Web/src/views/warehouseManagement/warehouseDetails/component/editDialog.vue new file mode 100644 index 0000000..0f5622b --- /dev/null +++ b/Web/src/views/warehouseManagement/warehouseDetails/component/editDialog.vue @@ -0,0 +1,296 @@ + + + + + + + diff --git a/Web/src/views/warehouseManagement/warehouseDetails/index.vue b/Web/src/views/warehouseManagement/warehouseDetails/index.vue new file mode 100644 index 0000000..8ef57f5 --- /dev/null +++ b/Web/src/views/warehouseManagement/warehouseDetails/index.vue @@ -0,0 +1,344 @@ + + + + + diff --git a/Web/src/views/warehouseManagement/warehousingStatistics/component/editDialog.vue b/Web/src/views/warehouseManagement/warehousingStatistics/component/editDialog.vue new file mode 100644 index 0000000..5fb12b1 --- /dev/null +++ b/Web/src/views/warehouseManagement/warehousingStatistics/component/editDialog.vue @@ -0,0 +1,226 @@ + + + + + + + diff --git a/Web/src/views/warehouseManagement/warehousingStatistics/index.vue b/Web/src/views/warehouseManagement/warehousingStatistics/index.vue new file mode 100644 index 0000000..2d53e63 --- /dev/null +++ b/Web/src/views/warehouseManagement/warehousingStatistics/index.vue @@ -0,0 +1,284 @@ + + + + +