修改字典
parent
40cbed5946
commit
3d15d8ce31
|
@ -1955,6 +1955,13 @@
|
|||
数据字典-基础数据维护
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.AddBoolDic(IRaCIS.Application.Contracts.AddOrEditBasicDic)">
|
||||
<summary>
|
||||
添加bool
|
||||
</summary>
|
||||
<param name="addOrEditBasic"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetBasicDicList(IRaCIS.Application.Contracts.BasicDicQuery)">
|
||||
<summary>
|
||||
New 查询条件
|
||||
|
|
|
@ -29,7 +29,36 @@ namespace IRaCIS.Application.Services
|
|||
_trialRepository = trialRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加bool
|
||||
/// </summary>
|
||||
/// <param name="addOrEditBasic"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddBoolDic(AddOrEditBasicDic addOrEditBasic)
|
||||
{
|
||||
|
||||
var entity = await _dicRepository.InsertFromDTOAsync(addOrEditBasic);
|
||||
|
||||
|
||||
|
||||
var child1 = entity.Clone();
|
||||
child1.Id = Guid.Empty;
|
||||
child1.Code = "true";
|
||||
child1.ParentId = entity.Id;
|
||||
|
||||
entity.ChildList.Add(child1);
|
||||
|
||||
var child2 = entity.Clone();
|
||||
child2.Id = Guid.Empty;
|
||||
child2.Code = "false";
|
||||
child2.ParentId = entity.Id;
|
||||
|
||||
entity.ChildList.Add(child2);
|
||||
|
||||
await _dicRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// New 查询条件
|
||||
|
@ -66,8 +95,13 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddOrUpdateBasicDic(AddOrEditBasicDic addOrEditBasic)
|
||||
{
|
||||
|
||||
var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true);
|
||||
var verifyExp1 = new EntityVerifyExp<Dictionary>()
|
||||
{
|
||||
VerifyExp = t => t.Code == addOrEditBasic.Code,
|
||||
VerifyMsg = $"已有{addOrEditBasic.Code}名称的字典",
|
||||
IsVerify= addOrEditBasic.ParentId ==null
|
||||
};
|
||||
var entity = await _dicRepository.InsertOrUpdateAsync(addOrEditBasic, true, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using MailKit.Security;
|
||||
using MimeKit;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
@ -323,6 +324,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// </summary>
|
||||
/// <param name="addOrEditTrialSiteSurvey"></param>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialSiteSurvey(TrialSiteSurveyAddOrEdit addOrEditTrialSiteSurvey)
|
||||
{
|
||||
|
||||
|
@ -465,6 +467,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// 驳回 New
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
|
||||
public async Task<IResponseOutput> SubmissionRejection(TrialSiteSubmitBackCommand trialSiteSubmitBackCommand)
|
||||
{
|
||||
var trialSiteSurveyId = trialSiteSubmitBackCommand.TrialSiteSurveyId;
|
||||
|
@ -614,6 +618,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
[HttpPut("{trialId:guid}/{trialSiteSurveyId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
|
||||
public async Task<IResponseOutput> AbandonSiteSurvey(Guid trialSiteSurveyId)
|
||||
{
|
||||
var survey = (await _trialSiteSurveyRepository.FirstOrDefaultAsync(t => t.Id == trialSiteSurveyId, true)).IfNullThrowConvertException();
|
||||
|
@ -640,6 +646,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// <returns></returns>
|
||||
//[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> TrialSurveySubmit(TrialSiteSurvyeSubmitDTO siteSurvyeSubmit)
|
||||
{
|
||||
|
||||
|
@ -747,6 +754,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
await _trialSiteUserSurveyRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
|
||||
public async Task<IResponseOutput> SendSiteSurveyUserJoinEmail(TrialSiteUserSurveyJoinCommand joinCommand)
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Auth;
|
||||
using IRaCIS.Application.Services;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -66,6 +67,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="addOrEditTrialExternalUser"></param>
|
||||
/// <returns></returns>
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> AddOrUpdateTrialExternalUser(TrialExternalUserAddAndSendEmail addOrEditTrialExternalUser)
|
||||
{
|
||||
|
||||
|
@ -188,6 +190,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
//New 省掉邀请流程
|
||||
[HttpPost]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> SendExternalUserJoinEmail(TrialExternalUserSendEmail sendEmail)
|
||||
{
|
||||
var trialId = sendEmail.TrialId;
|
||||
|
|
Loading…
Reference in New Issue