格式化时间
parent
88117a84f7
commit
e5edc33146
|
@ -2,6 +2,7 @@
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -173,7 +174,9 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
{
|
||||
if (auditInfo.JsonDetail.IsNullOrEmpty())
|
||||
{
|
||||
auditInfo.JsonDetail = JsonConvert.SerializeObject(OptCommand);
|
||||
IsoDateTimeConverter timeFormat = new IsoDateTimeConverter();
|
||||
timeFormat.DateTimeFormat = "yyyy-MM-dd";
|
||||
auditInfo.JsonDetail = JsonConvert.SerializeObject(OptCommand, Newtonsoft.Json.Formatting.Indented, timeFormat);
|
||||
}
|
||||
|
||||
return auditInfo;
|
||||
|
|
|
@ -5,6 +5,7 @@ using IRaCIS.Core.Application.Service.Inspection.Interface;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System;
|
||||
|
@ -443,7 +444,10 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
}
|
||||
}
|
||||
|
||||
Data.JsonDetail = JsonConvert.SerializeObject(JsonData);
|
||||
IsoDateTimeConverter timeFormat = new IsoDateTimeConverter();
|
||||
timeFormat.DateTimeFormat = "yyyy-MM-dd";
|
||||
Data.JsonDetail = JsonConvert.SerializeObject(JsonData, Newtonsoft.Json.Formatting.Indented, timeFormat);
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue