时间累加
This commit is contained in:
parent
8265a27049
commit
a83a400d0d
@ -86,7 +86,7 @@
|
||||
"bool": [ "bit" ]
|
||||
}
|
||||
},
|
||||
邮箱配置信息
|
||||
// 邮箱配置信息
|
||||
"MailOptions": {
|
||||
//发件人名称
|
||||
"FromName": "3143976203<xu3143976203@foxmail.com>",
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user