修改稽查配置
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;
|
||||
}
|
||||
|
||||
|
@ -1020,8 +1029,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpGet]
|
||||
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();
|
||||
return result.Select(t=>t.Description).Distinct().ToList();
|
||||
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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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,7 +19,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<DataInspectionAddDTO, DataInspection>();
|
||||
|
||||
|
||||
CreateMap<FrontAuditConfig, FrontAuditConfigDTO>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,209 +9,233 @@ using System.ComponentModel.DataAnnotations;
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///FrontAuditConfig
|
||||
///</summary>
|
||||
[Table("FrontAuditConfig")]
|
||||
public class FrontAuditConfig : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
///<summary>
|
||||
///FrontAuditConfig
|
||||
///</summary>
|
||||
[Table("FrontAuditConfig")]
|
||||
public class FrontAuditConfig : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
|
||||
public string Value { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
public string Value { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// ValueCN
|
||||
/// </summary>
|
||||
|
||||
public string ValueCN { get; set; } = String.Empty;
|
||||
public string ValueCN { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Description
|
||||
/// </summary>
|
||||
|
||||
public string Description { get; set; } = String.Empty;
|
||||
public string Description { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateTime
|
||||
/// </summary>
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateUserId
|
||||
/// </summary>
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Code
|
||||
/// </summary>
|
||||
|
||||
public string Code { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// ParentId
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
public string Code { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// ParentId
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IsEnable
|
||||
/// </summary>
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IsConfig
|
||||
/// </summary>
|
||||
|
||||
public bool IsConfig { get; set; }
|
||||
public bool IsConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ModuleTypeId
|
||||
/// </summary>
|
||||
public Guid? ModuleTypeId { get; set; }
|
||||
/// <summary>
|
||||
/// ModuleTypeId
|
||||
/// </summary>
|
||||
public Guid? ModuleTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// OptTypeId
|
||||
/// </summary>
|
||||
public Guid? OptTypeId { get; set; }
|
||||
/// <summary>
|
||||
/// OptTypeId
|
||||
/// </summary>
|
||||
public Guid? OptTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ChildrenTypeId
|
||||
/// </summary>
|
||||
public Guid? ChildrenTypeId { get; set; }
|
||||
/// <summary>
|
||||
/// ChildrenTypeId
|
||||
/// </summary>
|
||||
public Guid? ChildrenTypeId { get; set; }
|
||||
|
||||
public int IsShowParent { get; set; }
|
||||
public int IsShowParent { get; set; }
|
||||
|
||||
public string ConfigType { get; set; } = String.Empty;
|
||||
public string ConfigType { get; set; } = String.Empty;
|
||||
|
||||
public int Sort { get; set; }
|
||||
public int Sort { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string DictionaryKey { get; set; }
|
||||
public string DictionaryKey { get; set; }
|
||||
|
||||
public string EnumType { get; set; }
|
||||
public string EnumType { get; set; }
|
||||
|
||||
|
||||
public Guid? ObjectTypeId { get; set; }
|
||||
public Guid? ObjectTypeId { get; set; }
|
||||
|
||||
|
||||
public bool IsShowByTrialConfig { get; set; }
|
||||
public bool IsShowByTrialConfig { get; set; }
|
||||
|
||||
public string TrialConfigRelyFieldName { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标识
|
||||
/// </summary>
|
||||
public string Identification { get; set; }
|
||||
public string TrialConfigRelyFieldName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否有签名
|
||||
/// </summary>
|
||||
public bool IsHaveSign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否有原因
|
||||
/// </summary>
|
||||
public bool IsHaveReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完成
|
||||
/// </summary>
|
||||
public bool IsFinish { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否加入计划
|
||||
/// </summary>
|
||||
public bool IsJoinPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
|
||||
public string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子数据Lable
|
||||
/// </summary>
|
||||
|
||||
public string ChildDataLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子数据Value
|
||||
/// </summary>
|
||||
|
||||
public string ChildDataValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为特殊类型
|
||||
/// </summary>
|
||||
public bool IsSpecialType { get; set; }
|
||||
/// <summary>
|
||||
/// 标识
|
||||
/// </summary>
|
||||
public string Identification { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 日期类型
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 是否有签名
|
||||
/// </summary>
|
||||
public bool IsHaveSign { get; set; }
|
||||
|
||||
public string DateType { get; set; } = String.Empty;
|
||||
/// <summary>
|
||||
/// 是否有原因
|
||||
/// </summary>
|
||||
public bool IsHaveReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典Code
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 是否完成
|
||||
/// </summary>
|
||||
public bool IsFinish { get; set; }
|
||||
|
||||
public string DictionaryCode { get; set; } = String.Empty;
|
||||
/// <summary>
|
||||
/// 是否加入计划
|
||||
/// </summary>
|
||||
public bool IsJoinPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典Type
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
|
||||
public string DictionaryType { get; set; } = String.Empty;
|
||||
public string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典表
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 子数据Lable
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyTableName { get; set; } = String.Empty;
|
||||
public string ChildDataLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典Value
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 子数据Value
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyValue { get; set; } = String.Empty;
|
||||
public string ChildDataValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 字典
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyText { get; set; } = String.Empty;
|
||||
/// <summary>
|
||||
/// 是否为特殊类型
|
||||
/// </summary>
|
||||
public bool IsSpecialType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 接口名
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 日期类型
|
||||
/// </summary>
|
||||
|
||||
public string InterfaceName { get; set; } = String.Empty;
|
||||
public string DateType { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典Code
|
||||
/// </summary>
|
||||
|
||||
public string DictionaryCode { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典Type
|
||||
/// </summary>
|
||||
|
||||
public string DictionaryType { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典表
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyTableName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典Value
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyValue { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典
|
||||
/// </summary>
|
||||
|
||||
public string ForeignKeyText { get; set; } = String.Empty;
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 接口名
|
||||
/// </summary>
|
||||
|
||||
}
|
||||
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