时间累加

This commit is contained in:
qianhao.xu 2024-06-26 13:47:34 +08:00
parent 8265a27049
commit a83a400d0d
2 changed files with 14 additions and 1 deletions

View File

@ -86,7 +86,7 @@
"bool": [ "bit" ]
}
},
//
"MailOptions": {
//
"FromName": "3143976203<xu3143976203@foxmail.com>",

View File

@ -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<AndonFaultRecord, AndonFaultRecordDto>(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;
}