using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.DB.Models;
namespace WIDESEA_Model.Models
{
///
/// 拣选记录表
///
[SugarTable(nameof(Dt_PickingRecord), "拣选记录表")]
public class Dt_PickingRecord : BaseEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public int TaskNo { get; set; }
public string OrderNo { get; set; }
public int OrderDetailId { get; set; }
public string PalletCode { get; set; }
public int OutStockLockId { get; set; }
public string MaterielCode { get; set; }
[SugarColumn(Length = 100)]
public string Barcode { get; set; }
public decimal PickQuantity { get; set; }
public DateTime PickTime { get; set; } = DateTime.Now;
[SugarColumn(Length = 50)]
public string Operator { get; set; }
[SugarColumn(Length = 50)]
public string LocationCode { get; set; }
public int StockId { get; set; }
public string BatchNo { get; set; }
public bool IsCancelled { get; set; }
public DateTime? CancelTime { get; set; }
public string CancelOperator { get; set; }
public string FactoryArea { get; set; }
///
/// 仓库
/// 默认值:
///
[SugarColumn(ColumnName = "warehouseCode", ColumnDescription = "仓库")]
public string? WarehouseCode { get; set; }
///
/// 行号
/// 默认值:
///
[SugarColumn(ColumnName = "lineNo", ColumnDescription = "行号")]
public string? lineNo { get; set; }
///
/// 供应商编号
/// 默认值:
///
[SugarColumn(ColumnName = "supplyCode", ColumnDescription = "供应商编号")]
public string? SupplyCode { get; set; }
///
/// 数量
/// 默认值:
///
[SugarColumn(ColumnName = "barcodeQty", ColumnDescription = "数量")]
public decimal BarcodeQty { get; set; }
///
/// 单位
/// 默认值:
///
[SugarColumn(ColumnName = "barcodeUnit", ColumnDescription = "单位")]
public string BarcodeUnit { get; set; } = null!;
///
///
/// 默认值:
///
[SugarColumn(ColumnName = "barcodemoveQty", ColumnDescription = "数量")]
public decimal BarcodeMoveQty { get; set; }
}
///
/// 回库记录表
///
[SugarTable("Dt_ReturnStockRecord")]
public class Dt_ReturnStockRecord : BaseEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public long Id { get; set; }
public string TaskNo { get; set; }
public string PalletId { get; set; }
public string LocationId { get; set; }
public string NewLocationId { get; set; }
///
/// 回库数量
///
public decimal ReturnQty { get; set; }
public DateTime ReturnTime { get; set; }
///
/// 0-待回库 1-已回库
///
public int Status { get; set; }
}
///
/// 拆包记录表
///
[SugarTable("Dt_SplitPackageRecord")]
public class Dt_SplitPackageRecord: BaseEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public string OrderNo { get; set; }
public int? TaskNum { get; set; }
public string PalletCode { get; set; }
public int StockId { get; set; }
public bool IsReverted { get; set; } = false;
public bool IsAutoSplit { get; set; } = false;
public int OutStockLockInfoId { get; set; } // 关联的出库锁定信息
public string OriginalBarcode { get; set; } // 原条码
public string NewBarcode { get; set; } // 新条码
public string FactoryArea { get; set; }
///
/// 拆分数量(新条码数量)
///
public decimal SplitQty { get; set; }
public decimal RemainQuantity { get; set; }
public string MaterielCode { get; set; } // 物料编码
public DateTime SplitTime { get; set; } = DateTime.Now;
public string Operator { get; set; } // 操作人
public int Status { get; set; } // 状态:1-已拆包 2-已拣选 3-已回库
public DateTime RevertTime { get; set; }
public string RevertOperator { get; set; }
public int PreviousSplitRecordId { get; set; }
[SugarColumn(IsNullable = true)]
public decimal? OriginalStockQuantity { get; set; }
public decimal StockBeforeSplit { get; set; }
public decimal AssignBeforeSplit { get; set; }
}
///
/// 空箱取走记录表
///
public class Dt_EmptyPalletRemoval
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
public int Id { get; set; }
public string OrderNo { get; set; }
public string PalletCode { get; set; }
public DateTime RemovalTime { get; set; }
public string Operator { get; set; }
public int CompletedItemsCount { get; set; }
public decimal TotalPickedQuantity { get; set; }
}
}