生产完成率
This commit is contained in:
parent
7b81765c29
commit
5a694f7288
@ -108,7 +108,7 @@ namespace DOAN.Model.MES.report
|
||||
public int CompletionNum { get; set; }
|
||||
public double CompletionRate { get; set; }
|
||||
public string Status { get; set; }
|
||||
public List<PlanModel> List { get; set; }
|
||||
public List<PlanModel> List { get; set; } = new List<PlanModel>();
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
@ -198,7 +198,7 @@ namespace DOAN.Service.MES.report
|
||||
{
|
||||
WorkOrder = t.Workorder,
|
||||
GroupName = t.GroupName,
|
||||
WorkTimePeriod = $"{t.StartTime}-{t.EndTime}",
|
||||
WorkTimePeriod = $"{t.StartTime?.ToString("HH:mm")}-{t.EndTime?.ToString("HH:mm")}",
|
||||
DeliveryNum = t.DeliveryNum ?? 0,
|
||||
Status = GetStatusName(t.Status??0),
|
||||
StartTime=t.StartTime,
|
||||
@ -212,12 +212,12 @@ namespace DOAN.Service.MES.report
|
||||
for (int i = 0; i < hours; i++)
|
||||
{
|
||||
var productionCompletionModel = productionCompletionList.Where(t => t.TimePeriod.Hour == (8 + i)).FirstOrDefault();
|
||||
var mod = new PlanModel
|
||||
t.List.Add(new PlanModel
|
||||
{
|
||||
StartTime = $"{8 + i}:00",
|
||||
PlanNum = t.DeliveryNum / 8,
|
||||
CompletionNum = productionCompletionModel.Count,
|
||||
};
|
||||
CompletionNum = productionCompletionModel?.Count ?? 0,
|
||||
});
|
||||
}
|
||||
t.CompletionNum = productionCompletionList.Sum(t => t.Count);
|
||||
t.CompletionRate = Math.Round(t.CompletionNum*100.0 / t.DeliveryNum,2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user