Uat_Study
hang 2022-06-29 13:52:07 +08:00
parent fdd1ad5d6a
commit 8c1916890a
1 changed files with 7 additions and 2 deletions

View File

@ -39,8 +39,13 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule)
{
var verifyExp1 = new EntityVerifyExp<TaskAllocationRule>()
{
VerifyExp = t => t.DoctorUserId == addOrEditTaskTaskMedicalReviewRule.DoctorUserId && t.TrialId == addOrEditTaskTaskMedicalReviewRule.TrialId,
VerifyMsg = "已有该医生配置,不允许继续增加"
};
var entity = await _taskTaskMedicalReviewRuleRepository.InsertOrUpdateAsync(addOrEditTaskTaskMedicalReviewRule, true);
var entity = await _taskTaskMedicalReviewRuleRepository.InsertOrUpdateAsync(addOrEditTaskTaskMedicalReviewRule, true, verifyExp1);
return ResponseOutput.Ok(entity.Id.ToString());
@ -50,7 +55,7 @@ namespace IRaCIS.Core.Application.Service
[HttpDelete("{taskMedicalReviewRuleId:guid}")]
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
{
var success = await _taskTaskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskTaskMedicalReviewRuleId);
var success = await _taskTaskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId);
return ResponseOutput.Ok();
}