You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

123 lines
3.2 KiB

using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ChangKeTec.Wms.Models.Enums;
using CK.SCP.Models.Enums;
//
namespace ChangKeTec.Wms.Models.Wms
{
public partial class TB_INSPECT
{
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int UID { get; set; }
[Key]
[Column(Order = 0)]
[StringLength(50)]
[DisplayName("单据编号")]
public string BillNum { get; set; }
[Key]
[Column(Order = 1)]
[StringLength(50)]
[DisplayName("箱码")]
public string BarCode { get; set; }
[Key]
[Column(Order = 2)]
[StringLength(50)]
[DisplayName("库位")]
public string LocCode { get; set; }
[Key]
[Column(Order = 3)]
[StringLength(50)]
[DisplayName("订单号")]
public string PoBillNum { get; set; }
[Key]
[Column(Order = 4)]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[DisplayName("订单行")]
public int PoLine { get; set; }
[DisplayName("检验类型")]
public InspectType InspectType { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("物料号")]
public string PartCode { get; set; }
[NotMapped]
[DisplayName("供应商物料号")]
public string VendPartCode => WmsCache.GetVendPartCode(VendId, PartCode);
[NotMapped]
[DisplayName("物料描述")]
public string PartDesc => WmsCache.GetPartDesc(PartCode);
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("批次")]
public string Batch { get; set; }
[Column(TypeName = "money")]
[DisplayName("收货数")]
public decimal ReceiveQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("样品数")]
public decimal SampleQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("检验数")]
public decimal InspQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("合格数")]
public decimal PassQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("不合格数")]
public decimal FailQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("破坏数")]
public decimal CrackQty { get; set; }
public int InspResult { get; set; }
[NotMapped]
public string => ((InspectResult) InspResult).ToString();
[StringLength(50)]
[DisplayName("不合格原因")]
public string FailReason { get; set; }
[StringLength(50)]
[DisplayName("供应商编号")]
public string VendId { get; set; }
[StringLength(200)]
[DisplayName("供应商批次")]
public string VendBatch { get; set; }
[DisplayName("状态")]
public EnumStockState State { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[NotMapped]
public string PartGroup => WmsCache.GetPartGroup(PartCode);
public DateTime BillTime { get; set; } = DateTime.Now;
}
}