国际化修改

Uat_Study
he 2023-03-29 11:43:48 +08:00
parent e7f17f97d6
commit cb2aa0cfa4
16 changed files with 74 additions and 42 deletions

View File

@ -181,7 +181,7 @@
// ------------------------------------------------------------Financial--------------------------------------------------------------------
//CalculateService
"Cal_VolDataErr": "体积数据错误",
"Cal_VolDataErr": "体积数据错误",
//ExchangeRateService
"ExR_SameMthExist": "同月的汇率已存在",
"ExR_MthPymtRate": "按月付款采用汇率",
@ -192,6 +192,7 @@
//TrialRevenuesPriceService
"TRP_AddMeaningful": "请添加有意义的数据",
// ------------------------------------------------------------ImageAndDoc--------------------------------------------------------------------
//DicomArchiveService
"DAS_NoAnonCacheData": "未取到缓存匿名化配置数据,上传停止,请联系开发人员核实",

View File

@ -11,7 +11,7 @@ using Panda.DynamicWebApi.Attributes;
namespace IRaCIS.Application.Services
{
public class CalculateService : ICalculateService
public class CalculateService :BaseService, ICalculateService
{
private readonly IRepository<Payment> _paymentRepository;
private readonly IRepository<TrialPaymentPrice> _trialPaymentRepository;
@ -135,12 +135,14 @@ namespace IRaCIS.Application.Services
{
if (i == 0 && volumeRewardPriceList[i].Min != 0)
{
return ResponseOutput.NotOk("Volume reward data error.");
//---Volume reward data error.
return ResponseOutput.NotOk(_localizer["Cal_VolDataErr"]);
}
if (i > 0)
{
if (volumeRewardPriceList[i - 1].Max + 1 != volumeRewardPriceList[i].Min)
return ResponseOutput.NotOk("Volume reward data error.");
//---Volume reward data error.
return ResponseOutput.NotOk(_localizer["Cal_VolDataErr"]);
}
}

View File

@ -30,7 +30,8 @@ namespace IRaCIS.Application.Services
var existItem = await _exchangeRateRepository.FirstOrDefaultAsync(u => u.YearMonth == model.YearMonth);
if (existItem != null)
{
return ResponseOutput.NotOk("The exchange rate of the same month already existed.");
//---The exchange rate of the same month already existed.
return ResponseOutput.NotOk(_localizer["ExR_SameMthExist"]);
}
var rate = _mapper.Map<ExchangeRate>(model);
rate = await _exchangeRateRepository.AddAsync(rate);
@ -68,7 +69,8 @@ namespace IRaCIS.Application.Services
if (await _paymentRepository.AnyAsync(t => t.YearMonth == monthInfo.YearMonth))
{
return ResponseOutput.NotOk("The exchange rate has been used in monthly payment");
//---The exchange rate has been used in monthly payment
return ResponseOutput.NotOk(_localizer["ExR_MthPymtRate"]);
}

View File

@ -61,7 +61,8 @@ namespace IRaCIS.Application.Services
{
if (payment.IsLock)
{
return ResponseOutput.NotOk("Doctor payment has confirmed lock");
//---Doctor payment has confirmed lock
return ResponseOutput.NotOk(_localizer["PayAdj_DocPymtLock"]);
}
}
@ -310,4 +311,4 @@ namespace IRaCIS.Application.Services
}
}
}
}

View File

@ -73,7 +73,8 @@ namespace IRaCIS.Application.Services
if (await _reviewerPayInfoRepository.AnyAsync(t => t.RankId == id))
{
return ResponseOutput.NotOk("This title has been used by reviewer payment information");
//---This title has been used by reviewer payment information
return ResponseOutput.NotOk(_localizer["RP_TitleUsedByRev"]);
}
var success = await _rankPriceRepository.BatchDeleteNoTrackingAsync(t => t.Id == id);
@ -101,4 +102,4 @@ namespace IRaCIS.Application.Services
}
}
}
}

View File

@ -44,7 +44,8 @@ namespace IRaCIS.Application.Services
if (count <= 0)
{
return ResponseOutput.NotOk("Please add meaningful data");
//---Please add meaningful data
return ResponseOutput.NotOk(_localizer["TRP_AddMeaningful"]);
}
var trialExistedItem = await _trialRevenuesPriceRepository.FirstOrDefaultAsync(u => u.TrialId == model.TrialId);
if (trialExistedItem == null)//insert

View File

@ -11,7 +11,7 @@ using IRaCIS.Core.Infrastructure;
namespace IRaCIS.Core.Application.Services
{
public class DicomArchiveService : IDicomArchiveService
public class DicomArchiveService :BaseService, IDicomArchiveService
{
private readonly IRepository<DicomStudy> _studyRepository;
private readonly IRepository<DicomSeries> _seriesRepository;
@ -80,7 +80,8 @@ namespace IRaCIS.Core.Application.Services
if (anonymize_AddFixedFiledList.Union(anonymize_AddIRCInfoFiledList).Union(anonymize_FixedFieldList).Union(anonymize_IRCInfoFieldList).Count() == 0)
{
throw new BusinessValidationFailedException("未取到缓存匿名化配置数据,上传停止,请联系开发人员核实");
//---未取到缓存匿名化配置数据,上传停止,请联系开发人员核实
throw new BusinessValidationFailedException(_localizer["DAS_NoAnonCacheData"]);
}

View File

@ -55,7 +55,8 @@ namespace IRaCIS.Core.Application.Services
if (!studyIds.Any())
{
return ResponseOutput.NotOk("当前检查没有影像可以分享。 ");
//---当前检查没有影像可以分享。
return ResponseOutput.NotOk(_localizer["ISS_NoImgToShare"]);
}
imageShareCommand.StudyId = studyIds.First();
@ -93,17 +94,20 @@ namespace IRaCIS.Core.Application.Services
if (imageShare == null)
{
return ResponseOutput.NotOk("资源不存在。");
//---资源不存在。
return ResponseOutput.NotOk(_localizer["ISS_ResNotExists"]);
}
if (pWord != imageShare.Password.Trim())
{
return ResponseOutput.NotOk("分享密码错误。");
//---分享密码错误。
return ResponseOutput.NotOk(_localizer["ISS_SharePwdError"]);
}
if (DateTime.Now > imageShare.ExpireTime)
{
return ResponseOutput.NotOk("资源分享过期。");
//---资源分享过期。
return ResponseOutput.NotOk(_localizer["ISS_ShareExpiration"]);
}
var resource = new ResourceInfo()
@ -128,4 +132,4 @@ namespace IRaCIS.Core.Application.Services
}
}
}
}

View File

@ -423,16 +423,19 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
if (before != null && waitUploadItem.StudyDate != null && before > waitUploadItem.StudyDate)
{
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = $"当前访视检查时间{waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")}不能早于前序访视检查时间{before?.ToString("yyyy-MM-dd")},请核对检查数据是否有误", StudyInstanceUid = waitUploadItem.StudyInstanceUid });
// $"当前访视检查时间{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 });
return;
}
//大于当前访视 最近的最早拍片日期
var after = visitList.Where(u => u.VisitNum > verifyInfo.VisitNum).Min(k => k.EarliestScanDate);
if (after != null && waitUploadItem.StudyDate != null && after < waitUploadItem.StudyDate)
{
result.Add(new VerifyStudyUploadResult() { ErrorMesseage = $"当前访视检查时间{waitUploadItem.StudyDate?.ToString("yyyy-MM-dd")}不能晚于该访视之后的检查时间{after?.ToString("yyyy-MM-dd")},请核对检查数据是否有误", StudyInstanceUid = waitUploadItem.StudyInstanceUid });
// $"当前访视检查时间{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 });
return;
}
}
@ -457,7 +460,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
result.AllowReUpload = false;
result.StudyInstanceUid = studyInstanceUid;
result.ErrorMesseage = "当前有人正在上传归档该检查!";
//---当前有人正在上传归档该检查!
result.ErrorMesseage = _localizer["Study_UploadArchiving"];
return result;
}
@ -468,7 +472,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
result.AllowReUpload = false;
result.StudyInstanceUid = studyInstanceUid;
result.ErrorMesseage = "受试者访视结束,不允许上传!";
//---受试者访视结束,不允许上传!
result.ErrorMesseage = _localizer["Study_VisitEndedNotAllowed"];
return result;
}
@ -502,7 +507,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
result.AllowReUpload = false;
result.ErrorMesseage = $"此处不可以上传。当前影像检查已经上传给受试者{verifyStudyInfo.SubjectCode}的{verifyStudyInfo.VisitName}";
//$"此处不可以上传。当前影像检查已经上传给受试者{verifyStudyInfo.SubjectCode}的{verifyStudyInfo.VisitName}"
result.ErrorMesseage = _localizer["Study_ImgAlreadyUploaded", verifyStudyInfo.SubjectCode, verifyStudyInfo.VisitName];
}
}
result.StudyInstanceUid = studyInstanceUid;

View File

@ -1,4 +1,4 @@
//--------------------------------------------------------------------
//--------------------------------------------------------------------
// 此代码由T4模板自动生成 byzhouhang 20210918
// 生成时间 2022-03-28 16:46:23
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
@ -1287,12 +1287,14 @@ namespace IRaCIS.Core.Application.Service
if (await _frontAuditConfigRepository.AnyAsync(x => x.Identification != string.Empty && x.Identification == addOrEditFrontAuditConfig.Identification && x.Id != addOrEditFrontAuditConfig.Id && x.ConfigType == "M" && addOrEditFrontAuditConfig.ConfigType == "M"))
{
return ResponseOutput.NotOk("标识重复");
//---标识重复
return ResponseOutput.NotOk(_localizer["FrontAudit_IdDup"]);
}
if (await _frontAuditConfigRepository.AnyAsync(x => x.Description == addOrEditFrontAuditConfig.Description && x.Id != addOrEditFrontAuditConfig.Id && x.ConfigType == "M" && addOrEditFrontAuditConfig.ConfigType == "M"))
{
return ResponseOutput.NotOk("名称重复");
//---名称重复
return ResponseOutput.NotOk(_localizer["FrontAudit_NameDup"]);
}
if (addOrEditFrontAuditConfig.ConfigType == "C")
@ -1319,7 +1321,8 @@ namespace IRaCIS.Core.Application.Service
{
if (await _frontAuditConfigRepository.AnyAsync(x => x.ParentId == frontAuditConfigId))
{
return ResponseOutput.NotOk("存在子类 不能删除");
//---存在子类 不能删除
return ResponseOutput.NotOk(_localizer["FrontAudit_CannotDelSub"]);
}
var success = await _repository.BatchDeleteAsync<FrontAuditConfig>(t => t.Id == frontAuditConfigId);
return ResponseOutput.Result(success);

View File

@ -252,7 +252,8 @@ namespace IRaCIS.Core.Application.Service.Inspection
}
else if (user.Status == UserStateEnum.Disable)
{
throw new BusinessValidationFailedException("当前用户已被禁用。");
//---当前用户已被禁用。
throw new BusinessValidationFailedException(_localizer["Inspection_UserDisabled"]);
}
return ResponseOutput.Ok();

View File

@ -48,7 +48,8 @@ namespace IRaCIS.Application.Services
var exp = new EntityVerifyExp<CRO>()
{
VerifyExp = cro => cro.CROName.Equals(addCroCompanyCommand.CROName) ,
VerifyMsg = "已经存在同名的CRO请确认。"
//---已经存在同名的CRO请确认。
VerifyMsg = _localizer["CRO_DupName"]
};
var cro = await _croRepository.InsertOrUpdateAsync(addCroCompanyCommand, true, exp);
@ -66,7 +67,8 @@ namespace IRaCIS.Application.Services
{
if (await _trialRepository.AnyAsync(t => t.CROId == cROCompanyId))
{
return ResponseOutput.NotOk("该CRO已经参与项目不能被删除。");
//---该CRO已经参与项目不能被删除。
return ResponseOutput.NotOk(_localizer["CRO_InProject"]);
}
//if (_userRepository.Find().Any(t => t.OrganizationId == cROCompanyId))
//{
@ -77,4 +79,4 @@ namespace IRaCIS.Application.Services
return ResponseOutput.Result(success);
}
}
}
}

View File

@ -31,12 +31,14 @@ namespace IRaCIS.Application.Services
var exp = new EntityVerifyExp<Hospital>()
{
VerifyExp = h => h.HospitalName.Equals(hospitalCommand.HospitalName),
VerifyMsg = "已经存在同名的医院,请确认。"
//---已经存在同名的医院,请确认。
VerifyMsg = _localizer["Hospital_DupName"]
};
if (await _hospitalRepository.AnyAsync(x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null))
{
throw new BusinessValidationFailedException("当前Site已经添加到其他Hospital了");
//---当前Site已经添加到其他Hospital了
throw new BusinessValidationFailedException(_localizer["Hospital_SiteAdded"]);
}
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp);
@ -53,7 +55,8 @@ namespace IRaCIS.Application.Services
{
if (await _doctorRepository.AnyAsync(t => t.Id == hospitalId))
{
return ResponseOutput.NotOk("该医院下已经注册有医生,不可以删除。");
//---该医院下已经注册有医生,不可以删除。
return ResponseOutput.NotOk(_localizer["Hospital_HasDoctors"]);
}
//if (_userRepository.Find().Any(t => t.OrganizationId == hospitalId))
//{
@ -85,4 +88,4 @@ namespace IRaCIS.Application.Services
}
}
}
}

View File

@ -53,7 +53,8 @@ namespace IRaCIS.Application.Services
var exp = new EntityVerifyExp<Site>()
{
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteCode.Equals(siteCommand.SiteCode),
VerifyMsg = "已经存在同名的中心,请确认。"
//---已经存在同名的中心,请确认。
VerifyMsg = _localizer["Site_DupName"]
};
using (await _mutex.LockAsync())
@ -87,11 +88,12 @@ namespace IRaCIS.Application.Services
if (await _trialSiteUserRepository.AnyAsync(t => t.SiteId == siteId))
{
return ResponseOutput.NotOk("该中心已经加入项目,不可以被删除。");
//---该中心已经加入项目,不可以被删除。
return ResponseOutput.NotOk(_localizer["Site_InProject"]);
}
var success = await _siteRepository.BatchDeleteNoTrackingAsync(x => x.Id == siteId);
return ResponseOutput.Result(success);
}
}
}
}

View File

@ -50,7 +50,8 @@ namespace IRaCIS.Application.Services
var exp = new EntityVerifyExp<Sponsor>()
{
VerifyExp = h => h.SponsorName.Equals(sponsorCommand.SponsorName),
VerifyMsg = "已经存在同名的申办方,请确认。"
//---已经存在同名的申办方,请确认。
VerifyMsg = _localizer["Sponsor_DupName"]
};
var sponsor = await _sponsorRepository.InsertOrUpdateAsync(sponsorCommand, true, exp);
@ -68,7 +69,8 @@ namespace IRaCIS.Application.Services
{
if (await _trialRepository.AnyAsync(t => t.CROId == sponsorId))
{
return ResponseOutput.NotOk("该申办方已经加入项目,不允许删除。");
//---该申办方已经加入项目,不允许删除。
return ResponseOutput.NotOk(_localizer["Sponsor_InProject"]);
}
//if (_userRepository.Find().Any(t => t.OrganizationId == sponsorId))
//{
@ -80,4 +82,4 @@ namespace IRaCIS.Application.Services
return ResponseOutput.Result(success);
}
}
}
}

Binary file not shown.