Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
c25783a63a
|
@ -21,55 +21,73 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
public Guid? ParentId { get; set; }
|
public Guid? ParentId { get; set; }
|
||||||
public bool IsEnable { get; set; }
|
public bool? IsEnable { get; set; }
|
||||||
public bool IsConfig { get; set; }
|
public bool? IsConfig { get; set; }
|
||||||
public string ModuleTypeId { get; set; }
|
public string ModuleTypeId { get; set; }
|
||||||
public string OptTypeId { get; set; }
|
public string OptTypeId { get; set; }
|
||||||
public string ChildrenTypeId { get; set; }
|
public string ChildrenTypeId { get; set; }
|
||||||
}
|
|
||||||
|
public string ConfigType { get; set; }
|
||||||
|
|
||||||
|
public bool? IsShowParent { get; set; }
|
||||||
|
|
||||||
|
public string ChildrenTypeValue { get; set; }
|
||||||
|
public string ChildrenTypeValueCN { get; set; }
|
||||||
|
|
||||||
|
public string ModuleTypeValue { get; set; }
|
||||||
|
public string ModuleTypeValueCN { get; set; }
|
||||||
|
|
||||||
|
public string OptTypeValue { get; set; }
|
||||||
|
public string OptTypeValueCN { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
|
///<summary>FrontAuditConfigQuery 列表查询参数模型</summary>
|
||||||
public class FrontAuditConfigQuery
|
public class FrontAuditConfigQuery
|
||||||
{
|
{
|
||||||
///<summary> Value</summary>
|
///<summary> Value</summary>
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }=string.Empty;
|
||||||
|
|
||||||
///<summary> ValueCN</summary>
|
///<summary> ValueCN</summary>
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
///<summary> Description</summary>
|
///<summary> Description</summary>
|
||||||
public string Description { get; set; }
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
||||||
///<summary> Code</summary>
|
///<summary> Code</summary>
|
||||||
public string Code { get; set; }
|
public string Code { get; set; } = string.Empty;
|
||||||
|
|
||||||
///<summary> OptTypeId </summary>
|
///<summary> OptTypeId </summary>
|
||||||
public string OptTypeId { get; set; }
|
public string OptTypeId { get; set; } = string.Empty;
|
||||||
|
|
||||||
///<summary> ChildrenTypeId</summary>
|
///<summary> ChildrenTypeId</summary>
|
||||||
public string ChildrenTypeId { get; set; }
|
public string ChildrenTypeId { get; set; } = string.Empty;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
||||||
public class FrontAuditConfigAddOrEdit
|
public class FrontAuditConfigAddOrEdit
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public string Value { get; set; }
|
public string Value { get; set; } = string.Empty;
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
public string Description { get; set; }
|
public string Description { get; set; } = string.Empty;
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
public string Code { get; set; }
|
public string Code { get; set; } = string.Empty;
|
||||||
public Guid? ParentId { get; set; }
|
public Guid? ParentId { get; set; }
|
||||||
public bool IsEnable { get; set; }
|
public bool IsEnable { get; set; }
|
||||||
public bool IsConfig { get; set; }
|
public bool IsConfig { get; set; }
|
||||||
public string ModuleTypeId { get; set; }
|
public string ModuleTypeId { get; set; } = string.Empty;
|
||||||
public string OptTypeId { get; set; }
|
public string OptTypeId { get; set; } = string.Empty;
|
||||||
public string ChildrenTypeId { get; set; }
|
public string ChildrenTypeId { get; set; } = string.Empty;
|
||||||
}
|
|
||||||
|
public string ConfigType { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool? IsShowParent { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,21 +31,55 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="iq"></param>
|
/// <param name="iq"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
public async Task<List<FrontAuditConfigView>> GetFrontAuditConfigList(FrontAuditConfigQuery iq)
|
||||||
{
|
{
|
||||||
var query = _repository.GetQueryable<FrontAuditConfig>()
|
|
||||||
|
|
||||||
|
var query = from data in _repository.GetQueryable<FrontAuditConfig>()
|
||||||
|
join childrenType in _repository.GetQueryable<Dictionary>() on data.ChildrenTypeId equals childrenType.Id.ToString() into childrenTypetemp
|
||||||
|
from leftchildrenType in childrenTypetemp.DefaultIfEmpty()
|
||||||
|
join ModuleType in _repository.GetQueryable<Dictionary>() on data.ModuleTypeId equals ModuleType.Id.ToString() into ModuleTypetemp
|
||||||
|
from leftModuleType in ModuleTypetemp.DefaultIfEmpty()
|
||||||
|
join OptTypeId in _repository.GetQueryable<Dictionary>() on data.OptTypeId equals OptTypeId.Id.ToString() into OptTypeIdtemp
|
||||||
|
from leftOptTypeId in OptTypeIdtemp.DefaultIfEmpty()
|
||||||
|
select new FrontAuditConfigView()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsShowParent = data.IsShowParent,
|
||||||
|
ChildrenTypeId = data.ChildrenTypeId,
|
||||||
|
Code = data.Code,
|
||||||
|
ConfigType = data.ConfigType,
|
||||||
|
CreateTime = data.CreateTime,
|
||||||
|
CreateUserId = data.CreateUserId,
|
||||||
|
Description = data.Description,
|
||||||
|
IsConfig = data.IsConfig,
|
||||||
|
IsEnable = data.IsEnable,
|
||||||
|
ModuleTypeId = data.ModuleTypeId,
|
||||||
|
Id = data.Id,
|
||||||
|
ParentId = data.ParentId,
|
||||||
|
UpdateTime = data.UpdateTime,
|
||||||
|
Value = data.Value,
|
||||||
|
ChildrenTypeValueCN = leftchildrenType.ValueCN,
|
||||||
|
ModuleTypeValue = leftModuleType.Value,
|
||||||
|
ModuleTypeValueCN = leftModuleType.ValueCN,
|
||||||
|
OptTypeId = data.OptTypeId,
|
||||||
|
OptTypeValue = leftOptTypeId.Value,
|
||||||
|
OptTypeValueCN = leftOptTypeId.ValueCN,
|
||||||
|
UpdateUserId = data.UpdateUserId,
|
||||||
|
ValueCN = data.ValueCN,
|
||||||
|
ChildrenTypeValue = leftchildrenType.Value,
|
||||||
|
};
|
||||||
|
|
||||||
|
query = query
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Value == iq.Value)
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Value == iq.Value)
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ValueCN == iq.ValueCN)
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ValueCN == iq.ValueCN)
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Description == iq.Description)
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Description == iq.Description)
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.OptTypeId == iq.OptTypeId)
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.OptTypeId == iq.OptTypeId)
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code)
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code)
|
||||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId);
|
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId);
|
||||||
|
|
||||||
|
return await query.ToListAsync();
|
||||||
var frontAuditConfigQueryable = query
|
|
||||||
.ProjectTo<FrontAuditConfigView>(_mapper.ConfigurationProvider);
|
|
||||||
|
|
||||||
return await frontAuditConfigQueryable.ToListAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,6 +96,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
// CreateMap< FrontAuditConfig,FrontAuditConfigAddOrEdit>().ReverseMap();
|
// CreateMap< FrontAuditConfig,FrontAuditConfigAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
|
addOrEditFrontAuditConfig.CreateTime= DateTime.Now;
|
||||||
|
addOrEditFrontAuditConfig.UpdateTime= DateTime.Now;
|
||||||
|
addOrEditFrontAuditConfig.CreateUserId = _userInfo.Id;
|
||||||
|
addOrEditFrontAuditConfig.UpdateUserId= _userInfo.Id;
|
||||||
|
|
||||||
var entity = await _repository.InsertOrUpdateAsync<FrontAuditConfig, FrontAuditConfigAddOrEdit>(addOrEditFrontAuditConfig, true);
|
var entity = await _repository.InsertOrUpdateAsync<FrontAuditConfig, FrontAuditConfigAddOrEdit>(addOrEditFrontAuditConfig, true);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
|
@ -16,7 +17,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<SystemLogDTO, SystemLog>();
|
CreateMap<SystemLogDTO, SystemLog>();
|
||||||
|
|
||||||
|
CreateMap<FrontAuditConfig, FrontAuditConfigAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
CreateMap<EmailNoticeConfigAddOrEdit, EmailNoticeConfig>().ReverseMap();
|
CreateMap<EmailNoticeConfigAddOrEdit, EmailNoticeConfig>().ReverseMap();
|
||||||
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>();
|
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>();
|
||||||
|
|
|
@ -15,55 +15,52 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
[Table("FrontAuditConfig")]
|
[Table("FrontAuditConfig")]
|
||||||
public class FrontAuditConfig : Entity, IAuditUpdate, IAuditAdd
|
public class FrontAuditConfig : Entity, IAuditUpdate, IAuditAdd
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Value
|
/// Value
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ValueCN
|
/// ValueCN
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public string ValueCN { get; set; }
|
public string ValueCN { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Description
|
/// Description
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CreateTime
|
/// CreateTime
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CreateUserId
|
/// CreateUserId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UpdateTime
|
/// UpdateTime
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public DateTime UpdateTime { get; set; }
|
public DateTime UpdateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UpdateUserId
|
/// UpdateUserId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public Guid UpdateUserId { get; set; }
|
public Guid UpdateUserId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Code
|
/// Code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -74,14 +71,14 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IsEnable
|
/// IsEnable
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public bool IsEnable { get; set; }
|
public bool? IsEnable { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IsConfig
|
/// IsConfig
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public bool IsConfig { get; set; }
|
public bool? IsConfig { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ModuleTypeId
|
/// ModuleTypeId
|
||||||
|
@ -98,6 +95,10 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ChildrenTypeId { get; set; }
|
public string ChildrenTypeId { get; set; }
|
||||||
|
|
||||||
}
|
public bool? IsShowParent { get; set; }
|
||||||
|
|
||||||
|
public string ConfigType { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue