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.
 
 
 
 
 

165 lines
4.4 KiB

using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ChangKeTec.Wms.Models.Enums;
namespace ChangKeTec.Wms.Models.Wms
{
public partial class TB_DELIVER_PLAN
{
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public int UID { get; set; }
[Key]
[Column(Order = 0)]
[StringLength(50)]
[DisplayName("计划单号")]
public string BillNum { get; set; }
[Key]
[Column(Order = 1)]
[DisplayName("计划发货日")]
public DateTime DeliverDate { get; set; }
[Key]
[Column(Order = 2)]
[StringLength(50)]
[DisplayName("物料号")]
public string PartCode { get; set; }
[NotMapped]
[DisplayName("物料描述")]
public string PartDesc => WmsCache.GetPartDesc1(PartCode);
[StringLength(50)]
[DisplayName("客户编号")]
public string CustId { get; set; }
[NotMapped]
[DisplayName("客户物料号")]
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
[Column(TypeName = "money")]
[DisplayName("计划数")]
public decimal PlanQty { get; set; }
// [NotMapped]
// [Column(TypeName = "money")]
// [DisplayName("已申请数量")]
// public decimal AskedQty { get; set; }
[Column(TypeName = "money")]
[DisplayName("已发数")]
public decimal DeliverQty { get; set; }
[NotMapped]
[DisplayName("达成率")]
public decimal FinishPercent =>(PlanQty == 0 ? 0 : DeliverQty / PlanQty);
public string => ((EnumBillState)State).ToString();
[DisplayName("计划发货年")]
public int DeliverYear { get; set; }
[DisplayName("计划发货月")]
public int DeliverMonth { get; set; }
[DisplayName("计划发货周")]
public int DeliverWeek { get; set; }
[DisplayName("项目编号")]
[NotMapped]
public string ProjectId => WmsCache.GetProjectId(PartCode);
[DisplayName("销售订单号")]
public string SoBillNum { get; set; }
[DisplayName("销售订单行")]
public int SoLineNum { get; set; }
[DisplayName("计划员")]
public string Planner { get; set; }
public EnumBillState State { get; set; }
[StringLength(200)]
[DisplayName("备注")]
public string Remark { get; set; }
[NotMapped]
public DateTime BillTime { get; set; }
}
public class TB_DELIVER_PLAN_WEEK
{
[DisplayName("发货年")]
public int DeliverYear { get; set; }
[DisplayName("发货周")]
public int DeliverWeek { get; set; }
[DisplayName("项目编号")]
public string ProjectId { get; set; }
[DisplayName("物料号")]
public string PartCode { get; set; }
[DisplayName("物料描述")]
public string PartDesc => WmsCache.GetPartDesc(PartCode);
[DisplayName("客户编号")]
public string CustId { get; set; }
[DisplayName("客户物料号")]
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
[DisplayName("计划数量")]
public decimal PlanQty { get; set; }
[DisplayName("发货数量")]
public decimal DeliverQty { get; set; }
[DisplayName("达成率")]
public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty / PlanQty);
}
public class TB_DELIVER_PLAN_MONTH
{
[DisplayName("发货年")]
public int DeliverYear { get; set; }
[DisplayName("发货月")]
public int DeliverMonth { get; set; }
[DisplayName("项目编号")]
public string ProjectId { get; set; }
[DisplayName("物料号")]
public string PartCode { get; set; }
[DisplayName("物料描述")]
public string PartDesc => WmsCache.GetPartDesc(PartCode);
[DisplayName("客户编号")]
public string CustId { get; set; }
[DisplayName("客户物料号")]
public string CustPartCode => WmsCache.GetCustPartCode(CustId, PartCode);
[DisplayName("计划数量")]
public decimal PlanQty { get; set; }
[DisplayName("发货数量")]
public decimal DeliverQty { get; set; }
[DisplayName("达成率")]
public decimal FinishPercent => (PlanQty == 0 ? 0 : DeliverQty/ PlanQty);
}
}