成品即时库存

This commit is contained in:
18942506660
2024-10-16 11:03:45 +08:00
parent 06fcd26b5b
commit dfa59fc3bc
19 changed files with 996 additions and 3 deletions

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using WMS.Web.Core;
using WMS.Web.Domain.Values;
namespace WMS.Web.Domain.Entitys
{
/// <summary>
/// 成品仓即时库存
/// </summary>
[Serializable]
[Table("t_wms_product_inventory")]
public class ProductInventory : EntityBase
{
public ProductInventory() { }
/// <summary>
/// 主键 订单编号
/// </summary>
[Column("Id")]
public override int Id { get; set; }
/// <summary>
/// 物料编码
/// </summary>
[Column("MaterialNumber")]
public string MaterialNumber { get; set; }
/// <summary>
/// 单据类型
/// </summary>
[Column("Type")]
public ProductInventoryType Type { get; set; } = ProductInventoryType.JinDie;
/// <summary>
/// 组织编码
///</summary>
[Column("OrgCode")]
public string OrgCode { get; set; }
/// <summary>
/// 仓库
///</summary>
[Column("StockCode")]
public string StockCode { get; set; }
/// <summary>
/// 客户/店铺
///</summary>
[Column("Customer")]
public string Customer { get; set; }
/// <summary>
/// 批号
///</summary>
[Column("Batch")]
public string Batch { get; set; }
/// <summary>
/// 可用量
///</summary>
[Column("Qty")]
public decimal Qty { get; set; } = 0;
/// <summary>
/// 库存量
///</summary>
[Column("BeforeQty")]
public decimal BeforeQty { get; set; } = 0;
}
}

View File

@@ -71,6 +71,11 @@ namespace WMS.Web.Domain.Infrastructure
/// </summary>
/// <returns></returns>
Task<List<UcStockResponse>> GetUcStockAsync(string systemCode,string name, int companyId);
/// <summary>
/// 获取仓库总公司
/// </summary>
/// <returns></returns>
Task<List<UcStockHeadOfficeResponse>> GetUcStockByHeadOfficeAsync(string name, int companyId);
/// <summary>
/// 获取事务 用来处理即时库存

View File

@@ -0,0 +1,40 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto.Inventory;
using WMS.Web.Core.Dto.ProductInventory;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.IService.Public;
using WMS.Web.Domain.Values;
namespace WMS.Web.Domain.Infrastructure
{
/// <summary>
/// 成品仓即时库存
/// </summary>
public interface IProductInventoryRepositories
{
/// <summary>
/// 添加
/// </summary>
/// <param name="entitys"></param>
/// <param name="isTransaction"></param>
/// <returns></returns>
Task<bool> AddRange(List<ProductInventory> entitys, bool isTransaction = true);
/// <summary>
/// 删除
/// </summary>
/// <param name="isTransaction"></param>
/// <returns></returns>
Task<bool> Delete(ProductInventoryType type, bool isTransaction = true);
/// <summary>
/// 列表-分页
/// </summary>
/// <param name="dto"></param>
/// <param name="companyId"></param>
/// <returns></returns>
Task<(List<ProductInventoryQueryResponse> list, int total, List<decimal> details)> GetListAsync(ProductInventoryQueryRequest dto, int companyId = 0);
}
}

View File

@@ -70,5 +70,11 @@ namespace WMS.Web.Domain.Values
/// </summary>
[EnumRemark("出库信息")]
OutStockTaskInfo = 12,
/// <summary>
/// 成品即时库存
/// </summary>
[EnumRemark("成品即时库存")]
ProductInventory = 13,
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Text;
using WMS.Web.Core;
namespace WMS.Web.Domain.Values
{
/// <summary>
/// 成品即时库存类型
/// </summary>
public enum ProductInventoryType
{
/// <summary>
/// 金蝶
/// </summary>
[EnumRemark("金蝶")]
JinDie = 0,
/// <summary>
/// 领星
/// </summary>
[EnumRemark("领星")]
LingXing = 1,
/// <summary>
/// 聚水潭
/// </summary>
[EnumRemark("聚水潭")]
JushuiTan = 2,
}
}

View File

@@ -211,5 +211,9 @@ namespace WMS.Web.Domain.Values.Single
/// 获取仓位详情根据仓位Codes集合和公司ID
/// </summary>
GetWmsSubWarehouseByCodesAndCompany = 48,
/// <summary>
/// 获取仓库::根据总公司标记获取仓库
/// </summary>
GetWmsWarehouseByHeadOfficeAndNameAndCompany = 49,
}
}