Uat_Study
parent
fdd1ad5d6a
commit
8c1916890a
|
@ -39,8 +39,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule)
|
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());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
@ -50,7 +55,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpDelete("{taskMedicalReviewRuleId:guid}")]
|
[HttpDelete("{taskMedicalReviewRuleId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
|
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();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue