修改警告4

Uat_Study
hang 2023-11-30 17:58:17 +08:00
parent 35ef014391
commit 91671c5003
7 changed files with 15 additions and 20 deletions

View File

@ -685,7 +685,7 @@ public static class FileStoreHelper
var json = File.ReadAllText( Path.Combine(_hostEnvironment.ContentRootPath, "appsettings.json"));
JObject jsonObject = JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load });
JObject jsonObject = (JObject.Parse(json, new JsonLoadSettings() { CommentHandling = CommentHandling.Load })).IfNullThrowException();
int switchingRatio = 80;

View File

@ -642,7 +642,6 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// 获取有序阅片IQuery对象
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
public async Task<(int, List<IRUnReadSubjectView>)> GetOrderReadingIQueryable(GetOrderReadingIQueryableInDto inDto)
{
@ -967,6 +966,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
/// </summary>
/// <param name="origenalTask"></param>
/// <param name="agreeReReadingCommand"></param>
/// <exception cref="BusinessValidationFailedException"></exception>
private void ReReadingTaskTrackingDeal(VisitTask origenalTask, ConfirmReReadingCommand agreeReReadingCommand)
{
if (origenalTask.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || origenalTask.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed)

View File

@ -42,12 +42,10 @@ namespace IRaCIS.Application.Services
private readonly IRepository<SystemBasicData> _systemBasicDatarepository;
private readonly IWebHostEnvironment _hostEnvironment;
private readonly IRepository<User> _userRepository;
private readonly ITokenService _tokenService;
private readonly IMapper _mapper;
private readonly IRepository<Trial> _trialRepository;
private readonly IRepository<UserType> _userTypeRepository;
@ -61,7 +59,6 @@ namespace IRaCIS.Application.Services
public MailVerificationService(IRepository<VerificationCode> verificationCodeRepository,
IRepository<SystemBasicData> systemBasicDatarepository,
IWebHostEnvironment hostEnvironment,
IRepository<User> userRepository,
ITokenService tokenService,
IRepository<Trial> trialRepository,
@ -72,9 +69,7 @@ namespace IRaCIS.Application.Services
_verificationCodeRepository = verificationCodeRepository;
_systemBasicDatarepository = systemBasicDatarepository;
_hostEnvironment = hostEnvironment;
_mapper = mapper;
_tokenService = tokenService;
_userRepository = userRepository;

View File

@ -723,7 +723,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
{
// $"当前访视检查时间{waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")}不能早于前序访视检查时间{before?.ToString("yyyy-MM-dd")},请核对检查数据是否有误",
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = _localizer["Study_VisitBeforePrevError", waitUploadItem.StudyDate?.ToString("yyyy-MM-dd"), before?.ToString("yyyy-MM-dd")], StudyInstanceUid = waitUploadItem.StudyInstanceUid });
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = _localizer["Study_VisitBeforePrevError", waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")!, before?.ToString("yyyy-MM-dd")!], StudyInstanceUid = waitUploadItem.StudyInstanceUid });
return;
}
@ -733,7 +733,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (after != null && waitUploadItem.StudyDate != null && after < waitUploadItem.StudyDate)
{
// $"当前访视检查时间{waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")}不能晚于该访视之后的检查时间{after?.ToString("yyyy-MM-dd")},请核对检查数据是否有误"
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = _localizer["Study_VisitAfterSubseqError", waitUploadItem.StudyDate?.ToString("yyyy-MM-dd"), after?.ToString("yyyy-MM-dd")], StudyInstanceUid = waitUploadItem.StudyInstanceUid });
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = _localizer["Study_VisitAfterSubseqError", waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")!, after?.ToString("yyyy-MM-dd")!], StudyInstanceUid = waitUploadItem.StudyInstanceUid });
return;
}
}

View File

@ -241,7 +241,7 @@ namespace IRaCIS.Core.Application.Service
var listIdentification = auditDatas.Select(x => x.Identification).Distinct().ToList();
foreach (var item in auditDatas)
{
Dictionary<string, object> jsonDict = JsonConvert.DeserializeObject<Dictionary<string, object>>(item.JsonStr);
Dictionary<string, object> jsonDict = (JsonConvert.DeserializeObject<Dictionary<string, object>>(item.JsonStr)).IfNullThrowException();
if (!jsonDict.ContainsKey(nameof(InspectionJsonDetail.CommonData)))
{
@ -386,7 +386,7 @@ namespace IRaCIS.Core.Application.Service
if (relationParentInspection != null)
{
Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
Dictionary<string, object> jsonDic = (JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail)).IfNullThrowConvertException();
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
@ -539,7 +539,7 @@ namespace IRaCIS.Core.Application.Service
}).ToList();
var jsonDataValueDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
var jsonDataValueDic = (JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr)).IfNullThrowConvertException();
foreach (var item in list)
{
if (!jsonDataValueDic.ContainsKey(item.Key))
@ -881,7 +881,7 @@ namespace IRaCIS.Core.Application.Service
DateType = child.DateType,
}).ToListAsync();
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(Data.JsonDetail);
var JsonData = (JsonConvert.DeserializeObject<IDictionary<string, object>>(Data.JsonDetail)).IfNullThrowException();
foreach (var item in JsonData.Keys)
{
@ -892,12 +892,12 @@ namespace IRaCIS.Core.Application.Service
{
if (datefirst.DateType == FrontAuditDateType.Date.GetDescription())
{
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd");
JsonData[item] = DateTime.Parse(JsonData[item].ToString()!).ToString("yyyy-MM-dd");
}
if (datefirst.DateType == FrontAuditDateType.DateTime.GetDescription())
{
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
JsonData[item] = DateTime.Parse(JsonData[item].ToString()!).ToString("yyyy-MM-dd HH:mm:ss");
}
}
catch (Exception)

View File

@ -699,8 +699,8 @@ namespace IRaCIS.Application.Services
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
.WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
.WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate)
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.LoginFaildName.Contains(inQuery.LoginFaildName))
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP))
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.LoginFaildName.Contains(inQuery.LoginFaildName!))
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP!))
.ProjectTo<UserLogView>(_mapper.ConfigurationProvider);
var pageList = await userLogQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? "Id" : inQuery.SortField, inQuery.Asc);

View File

@ -12,7 +12,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
{
if(businessObject == null)
{
throw new QueryBusinessObjectNotExistException($"The query object {typeof(TEntity).Name} does not exist in database, Please check the query parameters");
throw new QueryBusinessObjectNotExistException($"The query object {typeof(TEntity).Name} is null, Please check ");
}
else
{
@ -25,7 +25,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
{
if (businessStruct == null)
{
throw new QueryBusinessObjectNotExistException($"The query object {typeof(TEntity).Name} does not exist in database, Please check the query parameters");
throw new QueryBusinessObjectNotExistException($"The query object {typeof(TEntity).Name} is null, Please check ");
}
else
{
@ -38,7 +38,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
{
if (businessObject == null)
{
throw new QueryBusinessObjectNotExistException($" Can not Convert to {typeof(TEntity).Name} Type, Please check parameter");
throw new QueryBusinessObjectNotExistException($" {typeof(TEntity).Name} Type object should not null, Please check ");
}
else
{