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.
 
 
 
 
 

132 lines
3.6 KiB

using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
namespace ChangKeTec.Wms.Models.Wms
{
public partial class TA_CUST_PART
{
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int UID { get; set; }
[Key]
[Column(Order = 0)]
[StringLength(50)]
[DisplayName("客户编号")]
public string CustId { get; set; }
[NotMapped]
[JsonIgnore]
[DisplayName("客户名称")]
public string CustName => WmsCache.GetCustName(CustId);
[Key]
[Column(Order = 1)]
[StringLength(50)]
[DisplayName("客户物料号")]
public string CustPartCode { get; set; }
[StringLength(200)]
[DisplayName("客户物料描述")]
public string CustPartName { get; set; }
[Required(AllowEmptyStrings = true)]
[StringLength(50)]
[DisplayName("物料号")]
public string PartCode { get; set; }
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("ERP物料号")]
public string ErpPartCode => WmsCache.GetErpPartCode(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("描述一")]
public string PartDesc1 => WmsCache.GetPartDesc1(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("描述二")]
public string PartDesc2 => WmsCache.GetPartDesc2(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("项目编号")]
public string ProjectId => WmsCache.GetProjectId(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("单位")]
public string Unit => WmsCache.GetUnit(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("物料类型")]
public string PartType => WmsCache.GetPartType(PartCode);
[NotMapped]
[JsonIgnoreAttribute]
[DisplayName("物料种类")]
public string PartKind => WmsCache.GetPartKind(PartCode);
[DisplayName("客户标包数")]
public decimal CustPackQty { get; set; }
[StringLength(50)]
[DisplayName("客户托盘尺寸")]
public string CustPalletSize { get; set; }
[Column(TypeName = "money")]
[DisplayName("客户托盘容量")]
public decimal CustPalletCapacity { get; set; }
[DisplayName("客户托盘数量")]
public int CustPalletQty { get; set; }
[DisplayName("状态")]
public int State { get; set; }
[StringLength(500)]
[DisplayName("备注")]
public string Remark { get; set; }
public TA_CUST_PART_S ToS()
{
return new TA_CUST_PART_S
{
CustId = CustId,
CustPartCode = CustPartCode,
CustPartName = CustPartName,
PartCode = PartCode,
CustPackQty = CustPackQty,
State = State,
Remark = Remark,
};
}
}
public partial class TA_CUST_PART_S
{
[Key]
public string CustId { get; set; }
[Key]
[DisplayName("客户物料号")]
public string CustPartCode { get; set; }
[DisplayName("客户物料描述")]
public string CustPartName { get; set; }
[DisplayName("物料号")]
public string PartCode { get; set; }
[DisplayName("客户标包数")]
public decimal CustPackQty { get; set; }
[DisplayName("状态")]
public int State { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
}
}