修改一版

Uat_Study
he 2022-06-06 16:20:13 +08:00
parent 93d363f76c
commit 198a8601be
4 changed files with 137 additions and 108 deletions

View File

@ -269,7 +269,7 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.AccessToDialogue(IRaCIS.Core.Infra.EFCore.Common.Dto.AccessToDialogueInDto)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetDialogList(IRaCIS.Core.Infra.EFCore.Common.Dto.AccessToDialogueInDto)">
<summary> <summary>
获取查询对象 获取查询对象
</summary> </summary>
@ -303,7 +303,7 @@
<param name="dto"></param> <param name="dto"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValueData(IRaCIS.Core.Infra.EFCore.Common.Dto.SetInspectionEnumValueDto)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.SetInspectionEnumValueDataList(IRaCIS.Core.Infra.EFCore.Common.Dto.SetInspectionEnumValueDto)">
<summary> <summary>
翻译稽查数据 翻译稽查数据
</summary> </summary>
@ -350,11 +350,11 @@
<param name="value"></param> <param name="value"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetChildrenItem(IRaCIS.Core.Application.ViewModel.GetChildrenItem)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetAuditConfigChildList(System.Guid)">
<summary> <summary>
获取子数据 获取子数据
</summary> </summary>
<param name="item"></param> <param name="frontAuditConfigId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.FullyReplicated(IRaCIS.Core.Application.ViewModel.FullyReplicated)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.FullyReplicated(IRaCIS.Core.Application.ViewModel.FullyReplicated)">
@ -371,11 +371,11 @@
<param name="item"></param> <param name="item"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetDescriptionByModuleType(IRaCIS.Core.Application.ViewModel.GetDescriptionByModuleTypeDto)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetModuleTypeDescriptionList(System.Guid)">
<summary> <summary>
获取Description 获取Description
</summary> </summary>
<param name="dto"></param> <param name="moduleTypeId"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetFrontAuditConfigList(IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.GetFrontAuditConfigList(IRaCIS.Core.Application.ViewModel.FrontAuditConfigQuery)">
@ -385,11 +385,11 @@
<param name="iq"></param> <param name="iq"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.ChangeFrontAuditSort(IRaCIS.Core.Application.ViewModel.ChangeFrontAuditSortDto)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.ChangeFrontAuditSort(System.Collections.Generic.List{IRaCIS.Core.Application.ViewModel.FrontAuditSort})">
<summary> <summary>
修改排序 修改排序
</summary> </summary>
<param name="sortDto"></param> <param name="sortDataList"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.AddOrUpdateFrontAuditConfig(IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit)"> <member name="M:IRaCIS.Core.Application.Service.FrontAuditConfigService.AddOrUpdateFrontAuditConfig(IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit)">
@ -1015,12 +1015,12 @@
完全复制对象 完全复制对象
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.DataFromItemGuid"> <member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.FromItemId">
<summary> <summary>
数据来源对象 数据来源对象
</summary> </summary>
</member> </member>
<member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.ThisItemGuid"> <member name="P:IRaCIS.Core.Application.ViewModel.FullyReplicated.ToItemId">
<summary> <summary>
要赋值到的对象 要赋值到的对象
</summary> </summary>

View File

@ -56,12 +56,12 @@ namespace IRaCIS.Core.Application.ViewModel
/// <summary> /// <summary>
/// 数据来源对象 /// 数据来源对象
/// </summary> /// </summary>
public Guid DataFromItemGuid { get; set; } public Guid FromItemId { get; set; }
/// <summary> /// <summary>
/// 要赋值到的对象 /// 要赋值到的对象
/// </summary> /// </summary>
public Guid ThisItemGuid { get; set; } public Guid ToItemId { get; set; }
} }
@ -84,7 +84,7 @@ namespace IRaCIS.Core.Application.ViewModel
public class GetDescriptionByModuleTypeDto public class GetDescriptionByModuleTypeDto
{ {
public Guid? ModuleType { get; set; } public Guid ModuleTypeId { get; set; }
} }
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary> ///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
@ -118,7 +118,7 @@ namespace IRaCIS.Core.Application.ViewModel
public class ChangeFrontAuditSortDto public class ChangeFrontAuditSortDto
{ {
public List<FrontAuditSort> SortData { get; set; } public List<FrontAuditSort> SortDataList { get; set; }
} }
public class FrontAuditSort public class FrontAuditSort

View File

@ -64,7 +64,7 @@ namespace IRaCIS.Core.Application.Service
/// <param name="inDto"></param> /// <param name="inDto"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<List<AccessToDialogueOutDto>> AccessToDialogue(AccessToDialogueInDto inDto) public async Task<List<AccessToDialogueOutDto>> GetDialogList(AccessToDialogueInDto inDto)
{ {
List<AccessToDialogueOutDto> data = new List<AccessToDialogueOutDto>(); List<AccessToDialogueOutDto> data = new List<AccessToDialogueOutDto>();
@ -153,15 +153,15 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns> /// <returns></returns>
public async Task BatchAddFrontAudit(BatchAddFrontAudit data) public async Task BatchAddFrontAudit(BatchAddFrontAudit data)
{ {
var maxsort = await _frontAuditConfigRepository.Where(x => x.ParentId == data.ParentId).MaxAsync(x => x.Sort); var maxSort = await _frontAuditConfigRepository.Where(x => x.ParentId == data.ParentId).MaxAsync(x => x.Sort);
List<FrontAuditConfig> fronts=new List<FrontAuditConfig>(); List<FrontAuditConfig> fronts=new List<FrontAuditConfig>();
foreach (var item in data.Columns) foreach (var item in data.Columns)
{ {
maxsort++; maxSort++;
fronts.Add(new FrontAuditConfig() fronts.Add(new FrontAuditConfig()
{ {
Sort = maxsort, Sort = maxSort,
Code = item.Name, Code = item.Name,
ValueCN = item.Remake, ValueCN = item.Remake,
IsEnable = true, IsEnable = true,
@ -180,7 +180,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost] [HttpPost]
public async Task<List<string>> SetInspectionEnumValue(SetInspectionEnumValueDto dto) public async Task<List<string>> SetInspectionEnumValue(SetInspectionEnumValueDto dto)
{ {
return await SetInspectionEnumValueData(dto); return await SetInspectionEnumValueDataList(dto);
} }
@ -190,7 +190,7 @@ namespace IRaCIS.Core.Application.Service
/// </summary> /// </summary>
/// <param name="dto">传入Dto</param> /// <param name="dto">传入Dto</param>
/// <returns></returns> /// <returns></returns>
private async Task<List<string>> SetInspectionEnumValueData(SetInspectionEnumValueDto dto) private async Task<List<string>> SetInspectionEnumValueDataList(SetInspectionEnumValueDto dto)
{ {
var listIdentification = dto.Items.Select(x => x.Identification).ToList(); var listIdentification = dto.Items.Select(x => x.Identification).ToList();
foreach (var item in dto.Items) foreach (var item in dto.Items)
@ -215,9 +215,9 @@ namespace IRaCIS.Core.Application.Service
/// </summary> /// </summary>
/// <param name="Data">稽查数据</param> /// <param name="Data">稽查数据</param>
/// <returns></returns> /// <returns></returns>
private async Task<string> SetDataInspectionDateType(List<string> identification, string json) private async Task<string> SetDataInspectionDateType(List<string> identificationList, string jsonStr)
{ {
var list = await (from parent in _frontAuditConfigRepository.AsQueryable().Where(x => identification.Contains(x.Identification)) var list = await (from parent in _frontAuditConfigRepository.AsQueryable().Where(x => identificationList.Contains(x.Identification))
join child in _frontAuditConfigRepository.AsQueryable().Where(x => x.EnumType == "Date" && x.IsEnable ) on parent.Id equals child.ParentId join child in _frontAuditConfigRepository.AsQueryable().Where(x => x.EnumType == "Date" && x.IsEnable ) on parent.Id equals child.ParentId
select new DateDto() select new DateDto()
{ {
@ -231,28 +231,28 @@ namespace IRaCIS.Core.Application.Service
DateType = lst.Max(x => x.DateType), DateType = lst.Max(x => x.DateType),
}).ToList(); }).ToList();
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(json); var jsonDataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
if (JsonData == null) if (jsonDataDic == null)
{ {
return json; return jsonStr;
} }
foreach (var item in JsonData.Keys) foreach (var item in jsonDataDic.Keys)
{ {
var datefirst = list.FirstOrDefault(x => x.Code.ToLower() == item.ToLower()); var datefirst = list.FirstOrDefault(x => x.Code.ToLower() == item.ToLower());
if (datefirst != null && !IsNullOrEmpty(JsonData[item])) if (datefirst != null && !IsNullOrEmpty(jsonDataDic[item]))
{ {
try try
{ {
if (datefirst.DateType == "Date") if (datefirst.DateType == "Date")
{ {
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd"); jsonDataDic[item] = DateTime.Parse(jsonDataDic[item].ToString()).ToString("yyyy-MM-dd");
} }
if (datefirst.DateType == "DateTime") if (datefirst.DateType == "DateTime")
{ {
JsonData[item] = DateTime.Parse(JsonData[item].ToString()).ToString("yyyy-MM-dd HH:mm:ss"); jsonDataDic[item] = DateTime.Parse(jsonDataDic[item].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
} }
} }
catch (Exception) catch (Exception)
@ -263,7 +263,7 @@ namespace IRaCIS.Core.Application.Service
} }
return JsonConvert.SerializeObject(JsonData); return JsonConvert.SerializeObject(jsonDataDic);
} }
@ -276,9 +276,9 @@ namespace IRaCIS.Core.Application.Service
/// <param name="ForeignKeyText">要查询的外键值</param> /// <param name="ForeignKeyText">要查询的外键值</param>
/// <param name="value">传入的纸</param> /// <param name="value">传入的纸</param>
/// <returns></returns> /// <returns></returns>
private async Task<string> GetInspectionEnumValue(List<string> identification, string json) private async Task<string> GetInspectionEnumValue(List<string> identificationList, string jsonStr)
{ {
var list = await (from u in _frontAuditConfigRepository.Where(x => identification.Contains(x.Identification)) var list = await (from u in _frontAuditConfigRepository.Where(x => identificationList.Contains(x.Identification))
join p in _frontAuditConfigRepository.Where(x => x.EnumType == "Foreign" && x.IsEnable) on u.Id equals p.ParentId join p in _frontAuditConfigRepository.Where(x => x.EnumType == "Foreign" && x.IsEnable) on u.Id equals p.ParentId
select new select new
{ {
@ -296,19 +296,19 @@ namespace IRaCIS.Core.Application.Service
}).ToList(); }).ToList();
var JsonDataValue = JsonConvert.DeserializeObject<IDictionary<string, object>>(json); var jsonDataValueDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
foreach (var item in list) foreach (var item in list)
{ {
if (!JsonDataValue.ContainsKey(item.Key)) if (!jsonDataValueDic.ContainsKey(item.Key))
{ {
continue; continue;
} }
string Table = item.ForeignKeyTable; string Table = item.ForeignKeyTable;
string ForeignKeyValue = item.ForeignKeyValue; string ForeignKeyValue = item.ForeignKeyValue;
string ForeignKeyText = item.ForeignKeyText; string ForeignKeyText = item.ForeignKeyText;
if (JsonDataValue[item.Key] != null) if (jsonDataValueDic[item.Key] != null)
{ {
string value = JsonDataValue[item.Key].ToString(); string value = jsonDataValueDic[item.Key].ToString();
string para = string.Empty; string para = string.Empty;
string sql = string.Empty; string sql = string.Empty;
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(JsonConvert.SerializeObject(new { item = value })); var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(JsonConvert.SerializeObject(new { item = value }));
@ -328,10 +328,10 @@ namespace IRaCIS.Core.Application.Service
SqlParameter[] paravalue = new SqlParameter[] { SqlParameter[] paravalue = new SqlParameter[] {
new SqlParameter("@para",para) new SqlParameter("@para",para)
}; };
JsonDataValue[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList()); jsonDataValueDic[item.Key] = string.Join(",", _frontAuditConfigRepository._dbContext.Database.SqlQuery<ForeignKey>(sql, paravalue).Select(x => x.Text).ToList());
} }
} }
return JsonConvert.SerializeObject(JsonDataValue); return JsonConvert.SerializeObject(jsonDataValueDic);
} }
@ -342,13 +342,13 @@ namespace IRaCIS.Core.Application.Service
/// <param name="identifications">标识</param> /// <param name="identifications">标识</param>
/// <param name="jsonStr">Json对象</param> /// <param name="jsonStr">Json对象</param>
/// <returns></returns> /// <returns></returns>
private async Task<string> SetEnum(Guid trialId, List<string> identifications, string jsonStr) private async Task<string> SetEnum(Guid trialId, List<string> identificationList, string jsonStr)
{ {
if (jsonStr == null || jsonStr == "null") if (jsonStr == null || jsonStr == "null")
{ {
return null; return null;
} }
var list = await (from u in _frontAuditConfigRepository.Where(x => identifications.Contains(x.Identification)) var list = await (from u in _frontAuditConfigRepository.Where(x => identificationList.Contains(x.Identification))
join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable) on u.Id equals p.ParentId join p in _frontAuditConfigRepository.Where(x => x.Code != "AuditState" && x.EnumType == "Dictionary" && x.IsEnable) on u.Id equals p.ParentId
select new select new
{ {
@ -376,17 +376,17 @@ namespace IRaCIS.Core.Application.Service
Type = lst.Max(x => x.Type), Type = lst.Max(x => x.Type),
}).ToList(); }).ToList();
var JsonData = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr); var jsonDataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonStr);
foreach (var item in list) foreach (var item in list)
{ {
try try
{ {
if (!JsonData.ContainsKey(item.Key) || JsonData[item.Key] == null) if (!jsonDataDic.ContainsKey(item.Key) || jsonDataDic[item.Key] == null)
{ {
continue; continue;
} }
var value = JsonData[item.Key]; var value = jsonDataDic[item.Key];
if (value.GetType() == typeof(JArray)) if (value.GetType() == typeof(JArray))
{ {
JArray arrays = (JArray)value; JArray arrays = (JArray)value;
@ -397,7 +397,7 @@ namespace IRaCIS.Core.Application.Service
{ {
guids.Add(Guid.Parse(x.ToString())); guids.Add(Guid.Parse(x.ToString()));
}); });
JsonData[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync()); jsonDataDic[item.Key] = string.Join(',', await _dictionaryRepository.Where(x => guids.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync());
} }
else if (item.Type.ToLower() == "ChildGroup".ToLower()) else if (item.Type.ToLower() == "ChildGroup".ToLower())
{ {
@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application.Service
{ {
guids.Add(x.ToString()); guids.Add(x.ToString());
}); });
JsonData[item.Key] = string.Join(',', await jsonDataDic[item.Key] = string.Join(',', await
_dictionaryRepository.Where(x => x.Code == item.Code).GroupJoin( _dictionaryRepository.Where(x => x.Code == item.Code).GroupJoin(
_dictionaryRepository.Where(x => guids.Contains(x.ChildGroup)), a => a.Id, b => b.ParentId, (a, b) => new _dictionaryRepository.Where(x => guids.Contains(x.ChildGroup)), a => a.Id, b => b.ParentId, (a, b) => new
{ {
@ -424,7 +424,7 @@ namespace IRaCIS.Core.Application.Service
{ {
guids.Add(x.ToString()); guids.Add(x.ToString());
}); });
JsonData[item.Key] = string.Join(',', await jsonDataDic[item.Key] = string.Join(',', await
_dictionaryRepository.Where(x => x.Code == item.Code).GroupJoin( _dictionaryRepository.Where(x => x.Code == item.Code).GroupJoin(
_dictionaryRepository.Where(x => guids.Contains(x.Code)), a => a.Id, b => b.ParentId, (a, b) => new _dictionaryRepository.Where(x => guids.Contains(x.Code)), a => a.Id, b => b.ParentId, (a, b) => new
{ {
@ -441,18 +441,18 @@ namespace IRaCIS.Core.Application.Service
if (item.Type.ToLower() == "id".ToLower()) if (item.Type.ToLower() == "id".ToLower())
{ {
Guid guid = Guid.Parse(value.ToString()); Guid guid = Guid.Parse(value.ToString());
JsonData[item.Key] = await _dictionaryRepository.Where(x => guid == x.Id).Select(x => x.ValueCN).FirstOrDefaultAsync(); jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => guid == x.Id).Select(x => x.ValueCN).FirstOrDefaultAsync();
} }
else if (item.Type.ToLower() == "ChildGroup".ToLower()) else if (item.Type.ToLower() == "ChildGroup".ToLower())
{ {
JsonData[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.ChildGroup == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.ChildGroup == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{ {
value = b.ValueCN value = b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync(); }).Select(x => x.value).FirstOrDefaultAsync();
} }
else else
{ {
JsonData[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{ {
value = b.ValueCN value = b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync(); }).Select(x => x.value).FirstOrDefaultAsync();
@ -463,7 +463,7 @@ namespace IRaCIS.Core.Application.Service
{ {
} }
} }
return JsonConvert.SerializeObject(JsonData); return JsonConvert.SerializeObject(jsonDataDic);
} }
@ -537,12 +537,12 @@ namespace IRaCIS.Core.Application.Service
/// <summary> /// <summary>
/// 获取子数据 /// 获取子数据
/// </summary> /// </summary>
/// <param name="item"></param> /// <param name="frontAuditConfigId"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpGet]
public async Task<List<FrontAuditConfig>> GetChildrenItem(GetChildrenItem item) public async Task<List<FrontAuditConfig>> GetAuditConfigChildList(Guid frontAuditConfigId)
{ {
var list =await (from data in _repository.GetQueryable<FrontAuditConfig>().Where(x => x.Id == item.Id) var list =await (from data in _repository.GetQueryable<FrontAuditConfig>().Where(x => x.Id == frontAuditConfigId)
join childrenType in _repository.GetQueryable<FrontAuditConfig>() on data.Id equals childrenType.ParentId join childrenType in _repository.GetQueryable<FrontAuditConfig>() on data.Id equals childrenType.ParentId
select childrenType).OrderBy(x=>x.Sort).ToListAsync(); select childrenType).OrderBy(x=>x.Sort).ToListAsync();
return list; return list;
@ -556,12 +556,12 @@ namespace IRaCIS.Core.Application.Service
[HttpPost] [HttpPost]
public async Task<IResponseOutput> FullyReplicated(FullyReplicated fully) public async Task<IResponseOutput> FullyReplicated(FullyReplicated fully)
{ {
await _frontAuditConfigRepository.DeleteFromQueryAsync(x => x.ParentId == fully.ThisItemGuid); await _frontAuditConfigRepository.DeleteFromQueryAsync(x => x.ParentId == fully.ToItemId);
var list = await _frontAuditConfigRepository.Where(x => x.ParentId == fully.DataFromItemGuid).ToListAsync(); var list = await _frontAuditConfigRepository.Where(x => x.ParentId == fully.FromItemId).ToListAsync();
list.ForEach(x => list.ForEach(x =>
{ {
x.Id = NewId.NextGuid(); x.Id = NewId.NextGuid();
x.ParentId = fully.ThisItemGuid; x.ParentId = fully.ToItemId;
}); });
await _frontAuditConfigRepository.AddRangeAsync(list); await _frontAuditConfigRepository.AddRangeAsync(list);
await _frontAuditConfigRepository.SaveChangesAsync(); await _frontAuditConfigRepository.SaveChangesAsync();
@ -662,12 +662,12 @@ namespace IRaCIS.Core.Application.Service
/// <summary> /// <summary>
/// 获取Description /// 获取Description
/// </summary> /// </summary>
/// <param name="dto"></param> /// <param name="moduleTypeId"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpGet]
public async Task<List<string>> GetDescriptionByModuleType(GetDescriptionByModuleTypeDto dto) public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
{ {
var result= await _frontAuditConfigRepository.Where(x=>x.ModuleTypeId== dto.ModuleType&&x.Description!=null &&x.Description!=string.Empty).Select(x=>x.Description).Distinct().ToListAsync(); var result= await _frontAuditConfigRepository.Where(x=>x.ModuleTypeId== moduleTypeId && x.Description!=string.Empty).Select(x=>x.Description).Distinct().ToListAsync();
return result; return result;
} }
@ -756,11 +756,11 @@ namespace IRaCIS.Core.Application.Service
/// <summary> /// <summary>
/// 修改排序 /// 修改排序
/// </summary> /// </summary>
/// <param name="sortDto"></param> /// <param name="sortDataList"></param>
/// <returns></returns> /// <returns></returns>
public async Task<IResponseOutput> ChangeFrontAuditSort(ChangeFrontAuditSortDto sortDto) public async Task<IResponseOutput> ChangeFrontAuditSort(List<FrontAuditSort> sortDataList)
{ {
foreach (var item in sortDto.SortData) foreach (var item in sortDataList)
{ {
await _frontAuditConfigRepository.BatchUpdateNoTrackingAsync(x => x.Id == item.Id, x => new FrontAuditConfig await _frontAuditConfigRepository.BatchUpdateNoTrackingAsync(x => x.Id == item.Id, x => new FrontAuditConfig
{ {
@ -778,29 +778,18 @@ namespace IRaCIS.Core.Application.Service
/// <returns></returns> /// <returns></returns>
public async Task<IResponseOutput> AddOrUpdateFrontAuditConfig(FrontAuditConfigAddOrEdit addOrEditFrontAuditConfig) public async Task<IResponseOutput> AddOrUpdateFrontAuditConfig(FrontAuditConfigAddOrEdit addOrEditFrontAuditConfig)
{ {
// 在此处拷贝automapper 映射
//CreateMap<FrontAuditConfig, FrontAuditConfigView>();
// CreateMap< FrontAuditConfig,FrontAuditConfigAddOrEdit>().ReverseMap();
if (await _frontAuditConfigRepository.AnyAsync(x =>x.Identification!=string.Empty&& x.Identification == addOrEditFrontAuditConfig.Identification && x.Id != addOrEditFrontAuditConfig.Id&&x.ConfigType=="M"&& addOrEditFrontAuditConfig.ConfigType== "M")) if (await _frontAuditConfigRepository.AnyAsync(x =>x.Identification!=string.Empty&& x.Identification == addOrEditFrontAuditConfig.Identification && x.Id != addOrEditFrontAuditConfig.Id&&x.ConfigType=="M"&& addOrEditFrontAuditConfig.ConfigType== "M"))
{ {
return ResponseOutput.NotOk("标识重复"); return ResponseOutput.NotOk("标识重复");
} }
if (await _frontAuditConfigRepository.AnyAsync(x => x.Description == addOrEditFrontAuditConfig.Description && x.Id != addOrEditFrontAuditConfig.Id && x.ConfigType == "M" && addOrEditFrontAuditConfig.ConfigType == "M")) if (await _frontAuditConfigRepository.AnyAsync(x => x.Description == addOrEditFrontAuditConfig.Description && x.Id != addOrEditFrontAuditConfig.Id && x.ConfigType == "M" && addOrEditFrontAuditConfig.ConfigType == "M"))
{ {
return ResponseOutput.NotOk("名称重复"); return ResponseOutput.NotOk("名称重复");
} }
addOrEditFrontAuditConfig.CreateTime= DateTime.Now; var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
addOrEditFrontAuditConfig.UpdateTime= DateTime.Now;
addOrEditFrontAuditConfig.CreateUserId = _userInfo.Id;
addOrEditFrontAuditConfig.UpdateUserId= _userInfo.Id;
var entity = await _repository.InsertOrUpdateAsync<FrontAuditConfig, FrontAuditConfigAddOrEdit>(addOrEditFrontAuditConfig, true);
return ResponseOutput.Ok(entity.Id.ToString()); return ResponseOutput.Ok(entity.Id.ToString());

View File

@ -85,6 +85,46 @@ namespace IRaCIS.Core.Infra.EFCore.Common
} }
} }
/// <summary>
/// 需要赋值的GeneralId
/// </summary>
private List<Type> NeedSetGeneralIdList
{
get
{
return new List<Type>()
{
typeof(SystemDocument),
typeof(SystemBasicData),
typeof(Trial),
typeof(VisitStage),
typeof(TrialDocument),
typeof(SystemDocConfirmedUser),
typeof(TrialDocUserTypeConfirmedUser),
typeof(Enroll),
typeof(EnrollDetail),
typeof(TrialSite),
typeof(TrialUser),
typeof(TrialSiteUser),
typeof(TrialSiteSurvey),
typeof(TrialQCQuestion),
typeof(DicomStudy),
typeof(DicomSeries),
typeof(NoneDicomStudy),
typeof(CheckChallengeDialog),
typeof(PreviousSurgery),
typeof(PreviousHistory),
typeof(PreviousOther),
typeof(QCChallenge),
typeof(QCChallengeDialog),
typeof(QCQuestion),
typeof(ConsistencyCheckFile),
typeof(DataInspection),
};
}
}
/// <summary> /// <summary>
/// 插入Add的实体 /// 插入Add的实体
/// </summary> /// </summary>
@ -105,21 +145,21 @@ namespace IRaCIS.Core.Infra.EFCore.Common
} }
var userTypeIds = userTypes.Select(x => x.NeedConfirmUserTypeId).ToList(); var userTypeIds = userTypes.Select(x => x.NeedConfirmUserTypeId).ToList();
var usertypeNames = await _dbContext.UserType.Where(x => userTypeIds.Contains(x.Id)).Select(x => x.UserTypeShortName).ToListAsync(); var userTypeNameList = await _dbContext.UserType.Where(x => userTypeIds.Contains(x.Id)).Select(x => x.UserTypeShortName).ToListAsync();
var usertypeName = string.Join(",", usertypeNames); var userTypeName = string.Join(",", userTypeNameList);
await InsertInspection<SystemDocument>(item.Entity, type, x => new DataInspection() await InsertInspection<SystemDocument>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id GeneralId = x.Id
}, new }, new
{ {
NeedConfirmedUserType = usertypeName, NeedConfirmedUserType = userTypeName,
}); });
} }
// 签名模板 // 签名模板
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemBasicData))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemBasicData)))
{ {
await InsertInspection<SystemBasicData>(item.Entity, type, x => new DataInspection() await InsertInspection<SystemBasicData>(item.Entity as SystemBasicData, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}); });
@ -145,7 +185,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
trials = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync(); trials = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
await InsertInspection<Trial>(item.Entity, type, x => new DataInspection() await InsertInspection<Trial>(item.Entity as Trial, type, x => new DataInspection()
{ {
TrialId = x.Id, TrialId = x.Id,
@ -169,7 +209,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
VisitPlanStatus = false; VisitPlanStatus = false;
} }
await InsertInspection<VisitStage>(item.Entity, type, x => new DataInspection() await InsertInspection<VisitStage>(item.Entity as VisitStage, type, x => new DataInspection()
{ {
VisitStageId = x.Id, VisitStageId = x.Id,
GeneralId = x.Id, GeneralId = x.Id,
@ -193,7 +233,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var userTypeIds = userTypes.Select(x => x.NeedConfirmUserTypeId).ToList(); var userTypeIds = userTypes.Select(x => x.NeedConfirmUserTypeId).ToList();
var usertypeNames = await _dbContext.UserType.Where(x => userTypeIds.Contains(x.Id)).Select(x => x.UserTypeShortName).ToListAsync(); var usertypeNames = await _dbContext.UserType.Where(x => userTypeIds.Contains(x.Id)).Select(x => x.UserTypeShortName).ToListAsync();
var usertypeName = string.Join(",", usertypeNames); var usertypeName = string.Join(",", usertypeNames);
await InsertInspection<TrialDocument>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialDocument>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id GeneralId = x.Id
}, new }, new
@ -209,7 +249,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
var entity = item.Entity as SystemDocConfirmedUser; var entity = item.Entity as SystemDocConfirmedUser;
var systemDocument = await _dbContext.SystemDocument.Where(x => x.Id == entity.SystemDocumentId).FirstOrDefaultAsync(); var systemDocument = await _dbContext.SystemDocument.Where(x => x.Id == entity.SystemDocumentId).FirstOrDefaultAsync();
await InsertInspection<SystemDocConfirmedUser>(item.Entity, type, x => new DataInspection() await InsertInspection<SystemDocConfirmedUser>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}, new }, new
@ -229,7 +269,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var trialDocument = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).FirstOrDefaultAsync(); var trialDocument = await _dbContext.TrialDocument.Where(x => x.Id == entity.TrialDocumentId).FirstOrDefaultAsync();
var trialid = trialDocument.TrialId; var trialid = trialDocument.TrialId;
await InsertInspection<TrialDocUserTypeConfirmedUser>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialDocUserTypeConfirmedUser>(entity as TrialDocUserTypeConfirmedUser, type, x => new DataInspection()
{ {
TrialId = trialid, TrialId = trialid,
GeneralId = x.Id, GeneralId = x.Id,
@ -245,7 +285,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 医生 // 医生
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Enroll))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Enroll)))
{ {
await InsertInspection<Enroll>(item.Entity, type, x => new DataInspection() await InsertInspection<Enroll>(item.Entity as Enroll, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}); });
@ -254,7 +294,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 医生详情 // 医生详情
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(EnrollDetail))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(EnrollDetail)))
{ {
await InsertInspection<EnrollDetail>(item.Entity, type, x => new DataInspection() await InsertInspection<EnrollDetail>(item.Entity as EnrollDetail, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}); });
@ -268,7 +308,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync(); entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync();
} }
await InsertInspection<TrialSite>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialSite>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
@ -289,7 +329,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as TrialUser; var entity = item.Entity as TrialUser;
var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId); var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
await InsertInspection<TrialUser>(item.Entity, type, x => new DataInspection await InsertInspection<TrialUser>(entity, type, x => new DataInspection
{ {
TrialId = x.TrialId, TrialId = x.TrialId,
}, new }, new
@ -336,7 +376,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
UserType userType = new UserType(); UserType userType = new UserType();
userType = await _dbContext.UserType.Where(x => x.Id == user.UserTypeId).FirstOrDefaultAsync(); userType = await _dbContext.UserType.Where(x => x.Id == user.UserTypeId).FirstOrDefaultAsync();
await InsertInspection<TrialSiteUser>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialSiteUser>(item.Entity as TrialSiteUser, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}, new }, new
@ -376,7 +416,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
entity.ReviewerUser = await _dbContext.User.Where(x => x.Id == entity.ReviewerUserId).FirstOrDefaultAsync(); entity.ReviewerUser = await _dbContext.User.Where(x => x.Id == entity.ReviewerUserId).FirstOrDefaultAsync();
} }
await InsertInspection<TrialSiteSurvey>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialSiteSurvey>(item.Entity as TrialSiteSurvey, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
@ -398,7 +438,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
var entity = item.Entity as TrialQCQuestion; var entity = item.Entity as TrialQCQuestion;
var paretName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync(); var paretName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
await InsertInspection<TrialQCQuestion>(item.Entity, type, x => new DataInspection() await InsertInspection<TrialQCQuestion>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}, new }, new
@ -421,7 +461,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as Subject; var entity = item.Entity as Subject;
var FinalSubjectVisitName = await _dbContext.SubjectVisit.AsNoTracking().Where(x => x.Id == entity.FinalSubjectVisitId && entity.FinalSubjectVisitId != null).Select(x => x.VisitName).FirstOrDefaultAsync(); var FinalSubjectVisitName = await _dbContext.SubjectVisit.AsNoTracking().Where(x => x.Id == entity.FinalSubjectVisitId && entity.FinalSubjectVisitId != null).Select(x => x.VisitName).FirstOrDefaultAsync();
await InsertInspection<Subject>(item.Entity, type, x => new DataInspection() await InsertInspection<Subject>(entity, type, x => new DataInspection()
{ {
SubjectId = x.Id, SubjectId = x.Id,
SubjectCode = x.Code, SubjectCode = x.Code,
@ -434,7 +474,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 检查 // 检查
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
{ {
await InsertInspection<DicomStudy>(item.Entity, type, x => new DataInspection() await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}); });
@ -449,7 +489,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
dicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId); dicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId);
} }
await InsertInspection<DicomSeries>(item.Entity, type, x => new DataInspection() await InsertInspection<DicomSeries>(item.Entity as DicomSeries, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}, new }, new
@ -467,7 +507,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var filecount = await _dbContext.NoneDicomStudyFile.Where(x => x.NoneDicomStudyId == entity.Id).CountAsync(); var filecount = await _dbContext.NoneDicomStudyFile.Where(x => x.NoneDicomStudyId == entity.Id).CountAsync();
await InsertInspection<NoneDicomStudy>(item.Entity, type, x => new DataInspection() await InsertInspection<NoneDicomStudy>(item.Entity as NoneDicomStudy, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}, new }, new
@ -521,7 +561,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
reason = entity.TalkContent.Substring(entity.TalkContent.LastIndexOf(':') + 1); reason = entity.TalkContent.Substring(entity.TalkContent.LastIndexOf(':') + 1);
break; break;
} }
await InsertInspection<CheckChallengeDialog>(item.Entity, type, x => new DataInspection() await InsertInspection<CheckChallengeDialog>(entity, type, x => new DataInspection()
{ {
GeneralId = entity.SubjectVisitId, GeneralId = entity.SubjectVisitId,
TrialId = subjectvisit.TrialId, TrialId = subjectvisit.TrialId,
@ -553,7 +593,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var subjectCode = entity.Subject?.Code; var subjectCode = entity.Subject?.Code;
await InsertInspection<SubjectVisit>(item.Entity, type, x => new DataInspection() await InsertInspection<SubjectVisit>(item.Entity as SubjectVisit, type, x => new DataInspection()
{ {
SubjectCode = subjectCode, SubjectCode = subjectCode,
SubjectId = x.SubjectId, SubjectId = x.SubjectId,
@ -570,7 +610,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as PreviousSurgery; var entity = item.Entity as PreviousSurgery;
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
subjectvisit = subjectvisit ?? new SubjectVisit(); subjectvisit = subjectvisit ?? new SubjectVisit();
await InsertInspection<PreviousSurgery>(item.Entity, type, x => new DataInspection() await InsertInspection<PreviousSurgery>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
SiteId = subjectvisit.SiteId, SiteId = subjectvisit.SiteId,
@ -590,7 +630,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as PreviousHistory; var entity = item.Entity as PreviousHistory;
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
subjectvisit = subjectvisit ?? new SubjectVisit(); subjectvisit = subjectvisit ?? new SubjectVisit();
await InsertInspection<PreviousHistory>(item.Entity, type, x => new DataInspection() await InsertInspection<PreviousHistory>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
SiteId = subjectvisit.SiteId, SiteId = subjectvisit.SiteId,
@ -609,7 +649,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as PreviousOther; var entity = item.Entity as PreviousOther;
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync(); var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
subjectvisit = subjectvisit ?? new SubjectVisit(); subjectvisit = subjectvisit ?? new SubjectVisit();
await InsertInspection<PreviousOther>(item.Entity, type, x => new DataInspection() await InsertInspection<PreviousOther>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
SiteId = subjectvisit.SiteId, SiteId = subjectvisit.SiteId,
@ -634,7 +674,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{ {
content = entity.Content; content = entity.Content;
} }
await InsertInspection<QCChallenge>(item.Entity, type, x => new DataInspection() await InsertInspection<QCChallenge>(entity, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
TrialId = x.TrialId, TrialId = x.TrialId,
@ -668,7 +708,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var qCChallenge = await _dbContext.QCChallenge.Where(x => x.Id == entity.QCChallengeId).FirstOrDefaultAsync(); var qCChallenge = await _dbContext.QCChallenge.Where(x => x.Id == entity.QCChallengeId).FirstOrDefaultAsync();
subjectvisit = subjectvisit ?? new SubjectVisit(); subjectvisit = subjectvisit ?? new SubjectVisit();
qCChallenge = qCChallenge ?? new QCChallenge(); qCChallenge = qCChallenge ?? new QCChallenge();
await InsertInspection<QCChallengeDialog>(item.Entity, type, x => new DataInspection() await InsertInspection<QCChallengeDialog>(entity, type, x => new DataInspection()
{ {
GeneralId = qCChallenge.Id, GeneralId = qCChallenge.Id,
TrialId = subjectvisit.TrialId, TrialId = subjectvisit.TrialId,
@ -694,7 +734,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//Qc 问题 //Qc 问题
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
{ {
await InsertInspection<QCQuestion>(item.Entity, type, x => new DataInspection() await InsertInspection<QCQuestion>(item.Entity as QCQuestion, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
}); });
@ -705,7 +745,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 一致性核查文件 // 一致性核查文件
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile))) foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile)))
{ {
await InsertInspection<ConsistencyCheckFile>(item.Entity, type, x => new DataInspection() await InsertInspection<ConsistencyCheckFile>(item.Entity as ConsistencyCheckFile, type, x => new DataInspection()
{ {
GeneralId = x.Id, GeneralId = x.Id,
CreateTime=x.CreateTime, CreateTime=x.CreateTime,
@ -805,7 +845,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// <param name="expression">表达式</param> /// <param name="expression">表达式</param>
/// <param name="otherItem">其他对象</param> /// <param name="otherItem">其他对象</param>
/// <returns></returns> /// <returns></returns>
public async Task InsertInspection<T>(object data, string type, Expression<Func<T, DataInspection>> expression = null, object otherItem = null,object originaldata=null) where T : class public async Task InsertInspection<T>(T data, string type, Expression<Func<T, DataInspection>> expression = null, object otherItem = null,object originaldata=null) where T : class
{ {
object entityobj = data; object entityobj = data;
DataInspection inspection = new DataInspection(); DataInspection inspection = new DataInspection();