一致性分析预提交
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||
//表名称用字符串,拼接
|
||||
public static readonly string TableName = "ReadingMedicalReviewDialog";
|
||||
public static readonly string TableName = "TaskConsistentRule";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<IResponseOutput> Delete<#=tableName#>(Guid <#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Id)
|
||||
{
|
||||
var success = await _<#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Repository.DeleteFromQueryAsync(t => t.Id == <#=char.ToLower(tableName[0]) + tableName.Substring(1)#>Id,true);
|
||||
return ResponseOutput.Result(success);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-07-01 15:37:24
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// TaskConsistentRuleService
|
||||
/// </summary>
|
||||
[ ApiExplorerSettings(GroupName = "Test")]
|
||||
public class TaskConsistentRuleService: BaseService, ITaskConsistentRuleService
|
||||
{
|
||||
|
||||
private readonly IRepository<TaskConsistentRule> _taskConsistentRuleRepository;
|
||||
|
||||
public TaskConsistentRuleService(IRepository<TaskConsistentRule> taskConsistentRuleRepository)
|
||||
{
|
||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<TaskConsistentRuleView>> GetTaskConsistentRuleList(TaskConsistentRuleQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
var taskConsistentRuleQueryable = _taskConsistentRuleRepository
|
||||
.ProjectTo<TaskConsistentRuleView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await taskConsistentRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTaskConsistentRule(TaskConsistentRuleAddOrEdit addOrEditTaskConsistentRule)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
CreateMap<TaskConsistentRule, TaskConsistentRuleView>();
|
||||
// CreateMap< TaskConsistentRule,TaskConsistentRuleAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{taskConsistentRuleId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTaskConsistentRule(Guid taskConsistentRuleId)
|
||||
{
|
||||
var success = await _taskConsistentRuleRepository.DeleteFromQueryAsync(t => t.Id == taskConsistentRuleId,true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user