From 2f65026e761efcb63b1ce11b1cbc72d9571e4671 Mon Sep 17 00:00:00 2001 From: "qianhao.xu" Date: Thu, 20 Jun 2024 16:40:44 +0800 Subject: [PATCH] 3 --- ZR.Service/MES/andon/AndonFaultRecordService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZR.Service/MES/andon/AndonFaultRecordService.cs b/ZR.Service/MES/andon/AndonFaultRecordService.cs index eda2758..cf7ff9e 100644 --- a/ZR.Service/MES/andon/AndonFaultRecordService.cs +++ b/ZR.Service/MES/andon/AndonFaultRecordService.cs @@ -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 {