Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
739c3ad4cb
|
@ -128,6 +128,7 @@
|
|||
//UserWLTemplateService
|
||||
"UserWLTS_MaxTemplate": "The same user can add a maximum of 10 templates.",
|
||||
"UserWLTS_NameRepeated": "The template name is repeated",
|
||||
"UserWLTS_ContentRepeated": "The template content is repeated",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
|
|
|
@ -128,6 +128,7 @@
|
|||
//UserWLTemplateService
|
||||
"UserWLTS_MaxTemplate": "同一个用户最多只能添加10个模板",
|
||||
"UserWLTS_NameRepeated": "模板名称存在重复",
|
||||
"UserWLTS_ContentRepeated": "模板内容存在重复",
|
||||
|
||||
// ------------------------------------------------------------Allocation--------------------------------------------------------------------
|
||||
//TaskAllocationRuleService
|
||||
|
|
|
@ -100,10 +100,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
.WhereIf(!string.IsNullOrWhiteSpace(queryQCQuestionConfigure.Type), t => t.Type.Contains(queryQCQuestionConfigure.Type))
|
||||
.WhereIf(queryQCQuestionConfigure.LanguageType!=null, t =>t.LanguageType== queryQCQuestionConfigure.LanguageType)
|
||||
.WhereIf(queryQCQuestionConfigure.IsDefeaultViewParent==true,t=>t.ParentId==null)
|
||||
.OrderBy(t=>t.ShowOrder)
|
||||
.OrderByDescending(x=>x.LanguageType)
|
||||
.ThenBy(t=>t.ShowOrder)
|
||||
.ProjectTo<QCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, queryQCQuestionConfigure.SortField.IsNullOrEmpty()?nameof(queryQCQuestionConfigure.QuestionName): queryQCQuestionConfigure.SortField, queryQCQuestionConfigure.Asc);
|
||||
return await QCQuestionQueryable.ToPagedListAsync(queryQCQuestionConfigure.PageIndex, queryQCQuestionConfigure.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
}
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionConfigure(QCQuestionAddOrEdit addOrEditQCQuestionConfigure)
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
var list = await trialQCQuestionQueryable.OrderByDescending(x=>x.LanguageType).ThenBy(t => t.ShowOrder).ToListAsync();
|
||||
|
||||
var isHaveQCQuestion = _repository.Where<TrialQCQuestion>(t => t.TrialId == queryTrialQCQuestionConfigure.TrialId).Any();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType.Value)
|
||||
.ProjectTo<ReadingMedicineSystemQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize,inDto.SortField,inDto.Asc);
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "LanguageType desc", "ShowOrder asc" });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -158,7 +158,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.ReadingCategory == inDto.ReadingCategory)
|
||||
.WhereIf(inDto.LanguageType != null, x => x.LanguageType == inDto.LanguageType)
|
||||
.ProjectTo<ReadingMedicineTrialQuestionView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
.ProjectTo<ReadingMedicineTrialQuestionView>(_mapper.ConfigurationProvider).OrderByDescending(x=>x.LanguageType).ThenBy(x => x.ShowOrder);
|
||||
|
||||
|
||||
var isConfirmMedicineQuestion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.IsConfirmMedicineQuestion).FirstOrDefaultAsync();
|
||||
|
|
|
@ -65,8 +65,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_NameRepeated"]);
|
||||
}
|
||||
|
||||
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.WW == addOrEditUserWLTemplate.WW && x.WL == addOrEditUserWLTemplate.WL && x.Id != addOrEditUserWLTemplate.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_ContentRepeated"]);
|
||||
}
|
||||
|
||||
var entity = await _userWLTemplateRepository.InsertOrUpdateAsync(addOrEditUserWLTemplate, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
|
BIN
后端提示语.xlsx
BIN
后端提示语.xlsx
Binary file not shown.
Loading…
Reference in New Issue