This commit is contained in:
qianhao.xu 2024-06-20 16:40:44 +08:00
parent ead99eb108
commit 2f65026e76

View File

@ -72,7 +72,7 @@ namespace ZR.Service.MES.andon
if(model.StartTime>DateTime.MinValue&&model.EndTime>DateTime.MinValue)
{
TimeSpan timeDifference = model.EndTime.Value - model.StartTime.Value;
model.Duration = (decimal)timeDifference.TotalMinutes;
model.Duration = Math.Round((decimal)timeDifference.TotalMinutes, 2);
}
return Context.Insertable(model).ExecuteReturnEntity();
@ -88,7 +88,7 @@ namespace ZR.Service.MES.andon
if (model.StartTime > DateTime.MinValue && model.EndTime > DateTime.MinValue)
{
TimeSpan timeDifference = model.EndTime.Value - model.StartTime.Value;
model.Duration = (decimal)timeDifference.TotalMinutes;
model.Duration = Math.Round((decimal)timeDifference.TotalMinutes, 2);
}
else
{