修改配置文件,统一实体编码规则

This commit is contained in:
2022-05-30 16:08:32 +08:00
parent 46ef7cbb4a
commit 29f4a73168
14 changed files with 126 additions and 128 deletions
@@ -77,7 +77,7 @@ namespace IRaCIS.Application.Services
doctor.Code = (await _doctorRepository.MaxAsync(t => t.Code)) + 1;
doctor.ReviewerCode = AppSettings.CodePrefix + doctor.Code.ToString("D4");
doctor.ReviewerCode = AppSettings.GetCodeStr(doctor.Code,nameof(Doctor)) ;
doctor.Password = MD5Helper.Md5(doctor.Phone);
@@ -248,7 +248,7 @@ namespace IRaCIS.Core.Application.Services
dicomStudy.Code = currentNextCodeInt;
dicomStudy.StudyCode = "ST" + currentNextCodeInt.ToString("D5");
dicomStudy.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
_provider.Set<int>($"{addtionalInfo.TrialId }_{ StaticData.StudyMaxCode}", dicomStudy.Code, TimeSpan.FromMinutes(30));
@@ -472,7 +472,7 @@ namespace IRaCIS.Application.Services
saveItem.Code = await _userRepository.Select(t => t.Code).DefaultIfEmpty().MaxAsync() + 1;
saveItem.UserCode = AppSettings.UserCodePrefix + saveItem.Code.ToString("D4");
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)) ;
if (saveItem.IsZhiZhun)
{
@@ -8,6 +8,7 @@ using IRaCIS.Core.Application.Filter;
using Nito.AsyncEx;
using System.ComponentModel.DataAnnotations;
using IRaCIS.Core.Application.Service;
using IRaCIS.Core.Domain.Share;
namespace IRaCIS.Core.Application.Contracts
{
@@ -67,7 +68,7 @@ namespace IRaCIS.Core.Application.Contracts
optEntity = await _noneDicomStudyRepository.InsertFromDTOAsync(addOrEditNoneDicomStudy);
optEntity.StudyCode = "NST" + optEntity.Code.ToString("D5");
optEntity.StudyCode = AppSettings.GetCodeStr(optEntity.Code, nameof(NoneDicomStudy));
}
else
{
@@ -110,7 +110,7 @@ namespace IRaCIS.Core.Application.Image.QA
qcChallenge.Code = code + 1;
qcChallenge.UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
qcChallenge.ChallengeCode = "Q" + qcChallenge.Code.ToString("D5");
qcChallenge.ChallengeCode = AppSettings.GetCodeStr(qcChallenge.Code, nameof(QCChallenge));
qcChallenge = await _qcChallengeRepository.AddAsync(qcChallenge, true);
@@ -718,7 +718,7 @@ namespace IRaCIS.Core.Application.Contracts
saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
saveItem.UserCode = AppSettings.UserCodePrefix + saveItem.Code.ToString("D4");
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User));
saveItem.UserName = saveItem.UserCode;
@@ -827,7 +827,7 @@ namespace IRaCIS.Core.Application.Contracts
saveItem.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
saveItem.UserCode = AppSettings.UserCodePrefix + saveItem.Code.ToString("D4");
saveItem.UserCode = AppSettings.GetCodeStr(saveItem.Code, nameof(User)); ;
saveItem.UserName = saveItem.UserCode;
@@ -114,7 +114,7 @@ namespace IRaCIS.Core.Application.Service
generateUser.Code = _userRepository.Select(t => t.Code).DefaultIfEmpty().Max() + 1;
generateUser.UserCode = AppSettings.UserCodePrefix + generateUser.Code.ToString("D4");
generateUser.UserCode = AppSettings.GetCodeStr(generateUser.Code, nameof(User));
generateUser.UserName = generateUser.UserCode;