修改项目部位bug
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
44bcdf7973
commit
9a958276db
|
@ -142,7 +142,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||
|
||||
};
|
||||
// 添加文件更改事件的处理程序
|
||||
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(usJsonPath);
|
||||
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources+"\\"+ StaticData.En_US_Json);
|
||||
|
||||
|
||||
FileSystemWatcher_CN = new FileSystemWatcher
|
||||
|
@ -153,7 +153,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||
EnableRaisingEvents = true,
|
||||
|
||||
};
|
||||
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(cnJsonPath);
|
||||
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(StaticData.Folder.Resources + "\\" + StaticData.Zh_CN_Json);
|
||||
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||
private void LoadJsonFile(string filePath)
|
||||
{
|
||||
Console.WriteLine("刷新json内存数据");
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,true);
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,false);
|
||||
|
||||
IConfigurationRoot enConfiguration = builder.Build();
|
||||
|
||||
|
|
|
@ -1346,12 +1346,15 @@ namespace IRaCIS.Core.Application
|
|||
public async Task<IResponseOutput> AddOrUpdateTrialBodyPart(AddOrUpdateTrialBodyPartCommand incommand)
|
||||
{
|
||||
|
||||
var codeList = await _repository.Where<TrialBodyPart>(t => t.TrialId == incommand.TrialId).Select(t => t.Code).ToListAsync();
|
||||
var codeList = await _repository.Where<TrialBodyPart>(t => t.TrialId == incommand.TrialId)
|
||||
.WhereIf(incommand.Id!=null,t=>t.Id!=incommand.Id)
|
||||
.Select(t => t.Code).ToListAsync();
|
||||
|
||||
|
||||
var newString = incommand.Code;
|
||||
// 检查字符串是否在集合中存在,如果存在,则在后面加上一个数字
|
||||
int count = 1;
|
||||
|
||||
while (codeList.Contains(newString))
|
||||
{
|
||||
newString = $"{newString}{count}";
|
||||
|
|
Loading…
Reference in New Issue