diff --git a/ZR.Admin.WebApi/appsettings.Development.json b/ZR.Admin.WebApi/appsettings.Development.json index 8a7c2ac..561c243 100644 --- a/ZR.Admin.WebApi/appsettings.Development.json +++ b/ZR.Admin.WebApi/appsettings.Development.json @@ -86,7 +86,7 @@ "bool": [ "bit" ] } }, - 邮箱配置信息 + // 邮箱配置信息 "MailOptions": { //发件人名称 "FromName": "3143976203", diff --git a/ZR.Service/MES/andon/AndonDataAnalysisServcie.cs b/ZR.Service/MES/andon/AndonDataAnalysisServcie.cs index bc6dfac..7513a91 100644 --- a/ZR.Service/MES/andon/AndonDataAnalysisServcie.cs +++ b/ZR.Service/MES/andon/AndonDataAnalysisServcie.cs @@ -15,6 +15,7 @@ using ZR.Model.MES.dev; using ZR.Repository; using ZR.Service.MES.andon.IService; using static System.Runtime.InteropServices.JavaScript.JSType; +using System.Security.Claims; namespace ZR.Service.MES.andon { @@ -37,6 +38,18 @@ namespace ZR.Service.MES.andon var response = Queryable() .Where(predicate.ToExpression()) .ToPage(parm); + if (response.Result.Count > 0) + { + foreach (var item in response.Result) + { + if (item.Duration <= 0) + { + + item.Duration= (decimal)Math.Round((DateTime.Now-item.StartTime.Value).TotalHours,2); + } + } + } + return response; }