修改稽查配置
parent
f7348b5d28
commit
5663a3f74c
|
@ -129,6 +129,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class FrontAuditConfigDTO: FrontAuditConfigAddOrEdit
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
||||||
public class FrontAuditConfigAddOrEdit
|
public class FrontAuditConfigAddOrEdit
|
||||||
{
|
{
|
||||||
|
@ -272,6 +280,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public string InterfaceName { get; set; } = string.Empty;
|
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>
|
/// <param name="frontAuditConfigId"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[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)
|
//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;
|
||||||
|
|
||||||
|
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;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1020,8 +1029,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
|
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
|
||||||
{
|
{
|
||||||
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length>0).Select(x => new { x.Description,x.Sort } ).OrderBy(t=>t.Sort).ToListAsync();
|
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0).Select(x => new { x.Description, x.Sort }).OrderBy(t => t.Sort).ToListAsync();
|
||||||
return result.Select(t=>t.Description).Distinct().ToList();
|
return result.Select(t => t.Description).Distinct().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1147,6 +1156,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
addOrEditFrontAuditConfig.Description = "";
|
addOrEditFrontAuditConfig.Description = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addOrEditFrontAuditConfig.TableConfigJsonStr = JsonConvert.SerializeObject(addOrEditFrontAuditConfig.TableConfigList);
|
||||||
|
|
||||||
var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
|
var entity = await _frontAuditConfigRepository.InsertOrUpdateAsync(addOrEditFrontAuditConfig, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
|
@ -19,6 +19,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<DataInspectionAddDTO, DataInspection>();
|
CreateMap<DataInspectionAddDTO, DataInspection>();
|
||||||
|
|
||||||
|
CreateMap<FrontAuditConfig, FrontAuditConfigDTO>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,30 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public string InterfaceName { get; set; } = String.Empty;
|
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