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.
|
|
|
using System;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using Win_in.Sfs.Basedata.Domain.Shared;
|
|
|
|
|
|
|
|
namespace Win_in.Sfs.Wms.Dashboard.Host.Models;
|
|
|
|
|
|
|
|
public class AsnTimeWindowDashboardDto
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 供应商简称
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "供应商简称")]
|
|
|
|
public string SupplierShortName { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 时间段
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "时间段")]
|
|
|
|
public string TimeSpan { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 计划到达时间
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "计划到达时间")]
|
|
|
|
public DateTime PlanArriveDate { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 实际到货时间
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "实际到货时间")]
|
|
|
|
public DateTime ReceiptTime { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 收货状态
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "收货状态")]
|
|
|
|
public string ReceiptStatus
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if (this.ReceiptTime == DateTime.MinValue)
|
|
|
|
{
|
|
|
|
if (this.PlanArriveDate > DateTime.Now)
|
|
|
|
{
|
|
|
|
return "计划";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return "延期";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
var timeSpan = ReceiptTime - PlanArriveDate;
|
|
|
|
var timeSpanCha =Math.Abs(timeSpan.TotalMinutes.TryToDecimal().Value);
|
|
|
|
if (timeSpanCha <= DashboardConst.AsnReceiptTimeDifferenceMinutes&&timeSpanCha>0)
|
|
|
|
{
|
|
|
|
return "准时";
|
|
|
|
}
|
|
|
|
else if (timeSpan.TotalMinutes.TryToDecimal() > DashboardConst.AsnReceiptTimeDifferenceMinutes)
|
|
|
|
{
|
|
|
|
return "延后";
|
|
|
|
}
|
|
|
|
else if (timeSpan.TotalMinutes.TryToDecimal() < -(DashboardConst.AsnReceiptTimeDifferenceMinutes))
|
|
|
|
{
|
|
|
|
return "提前";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否延期
|
|
|
|
/// </summary>
|
|
|
|
[Display(Name = "是否延期")]
|
|
|
|
public bool IsDelay
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
if (this.ReceiptStatus == "延期")
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|