时间显示格式修改
This commit is contained in:
@@ -67,23 +67,23 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
var uploadTimeSpan = UploadFinishedTime - UploadStartTime;
|
||||
|
||||
|
||||
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}毫秒";
|
||||
}
|
||||
return $" {uploadTimeSpan.Hours}:{uploadTimeSpan.Minutes}:{uploadTimeSpan.Seconds}.{uploadTimeSpan.Milliseconds}";
|
||||
//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}毫秒";
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using IRaCIS.Core.Domain.Share;
|
||||
using EasyCaching.Core;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
@@ -151,6 +152,7 @@ namespace IRaCIS.Application.Services
|
||||
//var test = _trialRepository.Where(t => t.CreateTime.Year == DateTime.Now.Year + 1).Select(t => t.Code).DefaultIfEmpty(1).ToList();
|
||||
|
||||
var trial = _mapper.Map<Trial>(trialAddModel);
|
||||
//trial.Id = NewId.NextGuid();
|
||||
var yearStr = DateTime.Now.Year.ToString();
|
||||
|
||||
trial.Code = currentYearMaxCodeNext;
|
||||
|
||||
Reference in New Issue
Block a user