修改稽查配置
parent
f7348b5d28
commit
5663a3f74c
|
@ -129,6 +129,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class FrontAuditConfigDTO: FrontAuditConfigAddOrEdit
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
||||
public class FrontAuditConfigAddOrEdit
|
||||
{
|
||||
|
@ -272,6 +280,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public string InterfaceName { get; set; } = string.Empty;
|
||||
|
||||
public string TableConfigJsonStr { get; set; }
|
||||
|
||||
|
||||
public List<TableConfig> TableConfigList { get; set; } = new List<TableConfig>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -893,11 +893,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="frontAuditConfigId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<List<FrontAuditConfig>> GetAuditConfigChildList(Guid frontAuditConfigId)
|
||||
public async Task<List<FrontAuditConfigDTO>> GetAuditConfigChildList(Guid frontAuditConfigId)
|
||||
{
|
||||
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
|
||||
select childrenType).OrderBy(x => x.Sort).ToListAsync();
|
||||
//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
|
||||
// select childrenType).OrderBy(x => x.Sort).ToListAsync();
|
||||
//return list;
|
||||
|
||||
var list = await _frontAuditConfigRepository.Where(t => t.ParentId == frontAuditConfigId).OrderBy(x => x.Sort).ProjectTo<FrontAuditConfigDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.TableConfigList = JsonConvert.DeserializeObject<List<TableConfig>>(item.TableConfigJsonStr) ?? new List<TableConfig>();
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -1147,6 +1156,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
addOrEditFrontAuditConfig.Description = "";
|
||||
}
|
||||
|
||||
addOrEditFrontAuditConfig.TableConfigJsonStr = JsonConvert.SerializeObject(addOrEditFrontAuditConfig.TableConfigList);
|
||||
|
||||
var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
|
|
@ -19,6 +19,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<DataInspectionAddDTO, DataInspection>();
|
||||
|
||||
CreateMap<FrontAuditConfig, FrontAuditConfigDTO>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -212,6 +212,30 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public string InterfaceName { get; set; } = String.Empty;
|
||||
|
||||
|
||||
|
||||
public string TableConfigJsonStr { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class TableConfig
|
||||
{
|
||||
public bool IsList { get; set; }
|
||||
public string ListName { get; set; } = String.Empty;
|
||||
public bool IsFixedColumn { get; set; }
|
||||
|
||||
public string FixedColumnName { get; set; } = String.Empty;
|
||||
|
||||
public string ColumnName { get; set; } = String.Empty;
|
||||
|
||||
public string ColumnValue { get; set; } = String.Empty;
|
||||
|
||||
public bool IsMerge { get; set; }
|
||||
|
||||
public string MergeColumnName { get; set; } = String.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue