修改IRC 3个bug

IRC_NewDev
hang 2024-04-28 17:07:59 +08:00
parent c8bc0c4a32
commit fb137ae840
5 changed files with 9 additions and 22 deletions

View File

@ -91,25 +91,6 @@ namespace IRaCIS.Core.Application.Contracts
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
#region 废弃
//if (uploadTimeSpan.Seconds == 0 && uploadTimeSpan.Minutes==0 && uploadTimeSpan.Hours == 0)
//{
// return $"{uploadTimeSpan.Milliseconds}毫秒";
//}
//else if (uploadTimeSpan.Minutes == 0 && uploadTimeSpan.Hours == 0)
//{
// return $"{uploadTimeSpan.Seconds}秒";
//}
//else if (uploadTimeSpan.Hours == 0)
//{
// return $"{uploadTimeSpan.Minutes} 分钟 {uploadTimeSpan.Seconds} 秒";
//}
//else
//{
// return $" {uploadTimeSpan.Hours} 小时 {uploadTimeSpan.Minutes} 分钟 {uploadTimeSpan.Seconds} 秒 {uploadTimeSpan.Milliseconds}毫秒";
//}
#endregion
}
}

View File

@ -498,6 +498,7 @@ namespace IRaCIS.Core.Application.Contracts
public string ArchiveFinishedTimeStr => ArchiveFinishedTime?.ToString("yyyy-MM-dd HH:mm:ss.fff");
public string UploadIntervalStr
{
get
@ -519,6 +520,7 @@ namespace IRaCIS.Core.Application.Contracts
}
public string TimeInterval
{
get
@ -527,6 +529,7 @@ namespace IRaCIS.Core.Application.Contracts
var uploadTimeSpan = ArchiveFinishedTime - UploadStartTime;
return $" {uploadTimeSpan?.Hours}:{uploadTimeSpan?.Minutes}:{uploadTimeSpan?.Seconds}.{uploadTimeSpan?.Milliseconds}";
}
}

View File

@ -104,7 +104,7 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
.ForMember(d => d.CheckDialogStr, u => u.MapFrom(t => string.Join(" | ", t.CheckChallengeDialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " " + c.CreateTime.ToString("yyyy-mm-dd hh:mm:ss") + " :" + c.TalkContent))))
.ForMember(d => d.CheckDialogStr, u => u.MapFrom(t => string.Join(" | ", t.CheckChallengeDialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " " + c.CreateTime.ToString("yyyy-MM-dd hh:mm:ss") + " :" + c.TalkContent))))
.ForMember(d => d.ModalityList, c => c.MapFrom(s =>
(s.NoneDicomStudyList.Select(t => t.Modality)
.Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct()))

View File

@ -624,6 +624,7 @@ namespace IRaCIS.Core.Application.Contracts
+ Path.DirectorySeparatorChar.ToString()
+ (_userInfo.IsEn_Us ? "TrialSiteSurveyReject_US" : "TrialSiteSurveyReject.html") ;
using (StreamReader SourceReader = System.IO.File.OpenText(pathToFile))
{
var templateInfo = SourceReader.ReadToEnd();

View File

@ -65,12 +65,14 @@ namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
return obj;
// 将对象序列化为 JSON 字符串
string json = JsonConvert.SerializeObject(obj);
string json = JsonConvert.SerializeObject(obj,new JsonSerializerSettings() { DateFormatString= "yyyy-MM-dd HH:mm:ss.fff" });
// 将 JSON 字符串反序列化回对象
var deserializedObj = JsonConvert.DeserializeObject<T>(json, new JsonSerializerSettings
{
Converters = { new ExportExcelDateConverter(clientTimeZone) }
Converters = { new ExportExcelDateConverter(clientTimeZone) },
DateFormatString = "yyyy-MM-dd HH:mm:ss.fff",
DateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind
});
return deserializedObj!;