提交代码

This commit is contained in:
hehaibing-1996
2024-04-19 08:47:45 +08:00
parent e89b64ea3a
commit d40c3f253a
46 changed files with 2500 additions and 57 deletions

View File

@ -0,0 +1,124 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.DAL.DbModels;
namespace WCS.BLL.DbModels
{
/// <summary>
/// 出入库记录
/// </summary>
public class InOutRecord
{
/// <summary>
/// 主键 自增Id
/// </summary>
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
public int Id { get; set; }
#region
/// <summary>
/// 入库的库位表ID
/// </summary>
[SugarColumn(ColumnName = "store_id", IsNullable = false, ColumnDescription = "库位ID")]
public int StoreId { get; set; }
/// <summary>
/// 入库的库位编码
/// </summary>
[SugarColumn(ColumnName = "store_code", Length = 50, IsNullable = false, ColumnDescription = "库位编码")]
public string StoreCode { get; set; }
[Navigate(NavigateType.OneToOne, nameof(StoreId))]
public StoreInfo StoreInfo { get; set; }
#endregion
#region
/// <summary>
/// 物料编码SN
/// </summary>
[SugarColumn(ColumnName = "mat_sn", Length = 200, IsNullable = false, ColumnDescription = "物料SN")]
public string MatSN { get; set; }
/// <summary>
/// 物料编码
/// </summary>
[SugarColumn(ColumnName = "mat_code", Length = 100, IsNullable = true, ColumnDescription = "物料编号")]
public string MatCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
[SugarColumn(ColumnName = "mat_name", Length = 150, IsNullable = true, ColumnDescription = "物料名称")]
public string MatName { get; set; }
/// <summary>
/// 物料规格
/// </summary>
[SugarColumn(ColumnName = "mat_spec", Length = 150, IsNullable = true, ColumnDescription = "物料规格")]
public string MatSpec { get; set; }
/// <summary>
/// 物料批次
/// </summary>
[SugarColumn(ColumnName = "mat_batch", Length = 150, IsNullable = true, ColumnDescription = "物料批次")]
public string MatBatch { get; set; }
/// <summary>
/// 物料数量
/// </summary>
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
public int MatQty { get; set; }
/// <summary>
/// 物料供应商
/// </summary>
[SugarColumn(ColumnName = "mat_supplier", Length = 150, IsNullable = true, ColumnDescription = "物料供应商")]
public string? MatSupplier { get; set; }
/// <summary>
/// 物料客户
/// </summary>
[SugarColumn(ColumnName = "mat_customer", Length = 150, IsNullable = true, ColumnDescription = "物料客户")]
public string? MatCustomer { get; set; }
#endregion
/// <summary>
/// 出库单据号/盘点单据号
/// </summary>
[SugarColumn(ColumnName = "order_number", Length = 50, IsNullable = false, ColumnDescription = "出库单据号/盘点单据号")]
public string? OrderNumber { get; set; }
/// <summary>
/// 出入库方向
/// </summary>
[SugarColumn(ColumnName = "direction", IsNullable = false, ColumnDescription = "出入库方向: 入库 = 0,\r\n 出库 = 1,\r\n 丢失 = 2")]
public DirectionEnum Direction { get; set; }
/// <summary>
/// 是否已上传
/// </summary>
[SugarColumn(ColumnName = "is_upload", IsNullable = false, ColumnDescription = "物料信息是否已上传")]
public bool IsUpload { get; set; } = false;
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "operate_time", IsNullable = false, ColumnDescription = "创建时间")]
public DateTime OperateTime { get; set; } = DateTime.Now;
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnName = "operate_user", Length = 100, IsNullable = true, ColumnDescription = "创建人")]
public string OperateUser { get; set; }
}
public enum DirectionEnum
{
= 0,
= 1,
= 2,
= 3,
}
}

View File

@ -65,11 +65,21 @@ namespace WCS.BLL.DbModels
public string? MatCustomer { get; set; }
/// <summary>
/// 物料数量
/// 默认数量
/// </summary>
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
public int MatQty { get; set; } = 100;
[SugarColumn(ColumnName = "default_qty", IsNullable = false, ColumnDescription = "默认数量")]
public int DefaultQty { get; set; } = 1000;
/// <summary>
/// 默认盘数
/// </summary>
[SugarColumn(ColumnName = "default_count", IsNullable = false, ColumnDescription = "默认盘数")]
public int DefaultCount { get; set; } = 100;
/// <summary>
/// 当前序列号
/// </summary>
[SugarColumn(ColumnName = "serial_number", IsNullable = false, DefaultValue = "0", ColumnDescription = "默认盘数")]
public int SerialNumber { get; set; } = 0;
/// <summary>
/// Desc:更新人

View File

@ -71,10 +71,10 @@ namespace WCS.BLL.DbModels
public int MatQty { get; set; }
/// <summary>
/// 是否启用
/// 是否已打印
/// </summary>
[SugarColumn(ColumnName = "is_printed", ColumnDescription = "是否已打印")]
public bool IsPrinted { get; set; } = true;
public bool IsPrinted { get; set; } = false;
/// <summary>
/// Desc:更新人
/// Default:

View File

@ -58,4 +58,5 @@ namespace WCS.BLL.DbModels
= 1,
= 2
}
}

View File

@ -0,0 +1,72 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WCS.BLL.DbModels
{
/// <summary>
/// 盘点单据
/// </summary>
[SugarTable("stock_taking_order")]
public class StockTakingOrder
{
/// <summary>
/// 主键 自增Id
/// </summary>
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
public int Id { get; set; }
/// <summary>
/// 盘点单据号
/// </summary>
[SugarColumn(ColumnName = "stocktaking_order_number", Length = 50, IsNullable = false, ColumnDescription = "盘点单据号")]
public string StocktakingOrderNumber { get; set; }
/// <summary>
/// 盘点单据状态
/// </summary>
[SugarColumn(ColumnName = "stocktaking_order_status", IsNullable = false, ColumnDescription = "盘点单据状态")]
public StocktakingOrderStatus StocktakingOrderStatus { get; set; } = StocktakingOrderStatus.;
/// <summary>
/// 盘点单据来源
/// </summary>
[SugarColumn(ColumnName = "StocktakingOrderSource", Length = 50, IsNullable = true, ColumnDescription = "单据来源")]
public string? StocktakingOrderSource { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "create_time", IsNullable = false, ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnName = "create_user", Length = 100, IsNullable = true, ColumnDescription = "创建人")]
public string CreateUser { get; set; }
/// <summary>
/// 序号
/// </summary>
[SugarColumn(IsIgnore = true)]
public int RowNumber { get; set; }
/// <summary>
/// 是否已经选择
/// </summary>
[SugarColumn(IsIgnore = true)]
public bool IsSelected { get; set; }
}
public enum StocktakingOrderStatus
{
= 0,
= 1,
= 2,
= 3
}
}

View File

@ -0,0 +1,120 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.DAL.DbModels;
namespace WCS.BLL.DbModels
{
/// <summary>
/// 盘点单据物料明细
/// </summary>
[SugarTable("stock_taking_order_matdetail")]
public class StockTakingOrderMatDetail
{
/// <summary>
/// 主键 自增Id
/// </summary>
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
public int Id { get; set; }
/// <summary>
/// 盘点单据的主键ID
/// </summary>
[SugarColumn(ColumnName = "stocktaking_order_id", IsNullable = false)]
public int StocktakingOrderId { get; set; }
/// <summary>
/// 盘点单据号
/// </summary>
[SugarColumn(ColumnName = "stocktaking_order_number", Length = 50, IsNullable = false, ColumnDescription = "盘点单据号")]
public string StocktakingOrderNumber { get; set; }
#region
/// <summary>
/// 入库的库位表ID
/// </summary>
[SugarColumn(ColumnName = "store_id", IsNullable = false, ColumnDescription = "库位ID")]
public int StoreId { get; set; }
/// <summary>
/// 入库的库位编码
/// </summary>
[SugarColumn(ColumnName = "store_code", Length = 50, IsNullable = false, ColumnDescription = "库位编码")]
public string StoreCode { get; set; }
[Navigate(NavigateType.OneToOne, nameof(StoreId))]
public StoreInfo StoreInfo { get; set; }
#endregion
#region
/// <summary>
/// 物料编码SN
/// </summary>
[SugarColumn(ColumnName = "mat_sn", Length = 200, IsNullable = false, ColumnDescription = "物料SN")]
public string MatSN { get; set; }
/// <summary>
/// 物料编码
/// </summary>
[SugarColumn(ColumnName = "mat_code", Length = 100, IsNullable = true, ColumnDescription = "物料编号")]
public string MatCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
[SugarColumn(ColumnName = "mat_name", Length = 150, IsNullable = true, ColumnDescription = "物料名称")]
public string MatName { get; set; }
/// <summary>
/// 物料规格
/// </summary>
[SugarColumn(ColumnName = "mat_spec", Length = 150, IsNullable = true, ColumnDescription = "物料规格")]
public string MatSpec { get; set; }
/// <summary>
/// 物料批次
/// </summary>
[SugarColumn(ColumnName = "mat_batch", Length = 150, IsNullable = true, ColumnDescription = "物料批次")]
public string MatBatch { get; set; }
/// <summary>
/// 物料数量
/// </summary>
[SugarColumn(ColumnName = "mat_qty", IsNullable = false, ColumnDescription = "物料数量")]
public int MatQty { get; set; }
/// <summary>
/// 物料供应商
/// </summary>
[SugarColumn(ColumnName = "mat_supplier", Length = 150, IsNullable = true, ColumnDescription = "物料供应商")]
public string? MatSupplier { get; set; }
/// <summary>
/// 物料客户
/// </summary>
[SugarColumn(ColumnName = "mat_customer", Length = 150, IsNullable = true, ColumnDescription = "物料客户")]
public string? MatCustomer { get; set; }
#endregion
/// <summary>
/// 该物料是否已盘点
/// </summary>
[SugarColumn(ColumnName = "is_stocktaking", IsNullable = false, ColumnDescription = "该物料是否已盘点")]
public bool IsStocktaking { get; set; } = false;
/// <summary>
/// 盘点数量
/// </summary>
[SugarColumn(ColumnName = "stocktaking_qty", IsNullable = false, ColumnDescription = "盘点数量")]
public int StocktakingQty { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "create_time", IsNullable = false, ColumnDescription = "最后更新时间")]
public DateTime UpdateTime { get; set; } = DateTime.Now;
/// <summary>
/// 创建人
/// </summary>
[SugarColumn(ColumnName = "create_user", Length = 100, IsNullable = true, ColumnDescription = "最后更新人")]
public string UpdateUser { get; set; }
}
}

View File

@ -1,4 +1,5 @@
using System;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -12,6 +13,10 @@ namespace WCS.DAL.DbModels
/// <summary>
/// 库位Id
/// </summary>
/// <summary>
/// 主键 自增Id
/// </summary>
//[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
public int Id { get; set; }
/// <summary>