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 string Code { get; set; }
|
||||
public Guid? ParentId { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public bool IsConfig { get; set; }
|
||||
public bool? IsEnable { get; set; }
|
||||
public bool? IsConfig { get; set; }
|
||||
public string ModuleTypeId { get; set; }
|
||||
public string OptTypeId { 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>
|
||||
public class FrontAuditConfigQuery
|
||||
{
|
||||
///<summary> Value</summary>
|
||||
public string Value { get; set; }
|
||||
public string Value { get; set; }=string.Empty;
|
||||
|
||||
///<summary> ValueCN</summary>
|
||||
public string ValueCN { get; set; }
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
|
||||
///<summary> Description</summary>
|
||||
public string Description { get; set; }
|
||||
///<summary> Description</summary>
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
///<summary> Code</summary>
|
||||
public string Code { get; set; }
|
||||
///<summary> Code</summary>
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
///<summary> OptTypeId </summary>
|
||||
public string OptTypeId { get; set; }
|
||||
///<summary> OptTypeId </summary>
|
||||
public string OptTypeId { get; set; } = string.Empty;
|
||||
|
||||
///<summary> ChildrenTypeId</summary>
|
||||
public string ChildrenTypeId { get; set; }
|
||||
///<summary> ChildrenTypeId</summary>
|
||||
public string ChildrenTypeId { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
///<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
||||
public class FrontAuditConfigAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Value { get; set; }
|
||||
public string ValueCN { get; set; }
|
||||
public string Description { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public string Code { get; set; }
|
||||
public Guid? ParentId { get; set; }
|
||||
public string Code { get; set; } = string.Empty;
|
||||
public Guid? ParentId { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
public bool IsConfig { get; set; }
|
||||
public string ModuleTypeId { get; set; }
|
||||
public string OptTypeId { get; set; }
|
||||
public string ChildrenTypeId { get; set; }
|
||||
}
|
||||
public string ModuleTypeId { get; set; } = string.Empty;
|
||||
public string OptTypeId { get; set; } = string.Empty;
|
||||
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>
|
||||
/// <param name="iq"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
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.ValueCN == iq.ValueCN)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Description == iq.Description)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.OptTypeId == iq.OptTypeId)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId);
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ValueCN == iq.ValueCN)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Description == iq.Description)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.OptTypeId == iq.OptTypeId)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code)
|
||||
.WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId);
|
||||
|
||||
|
||||
var frontAuditConfigQueryable = query
|
||||
.ProjectTo<FrontAuditConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await frontAuditConfigQueryable.ToListAsync();
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,7 +95,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
//CreateMap<FrontAuditConfig, FrontAuditConfigView>();
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using AutoMapper;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
@ -16,7 +17,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<SystemLogDTO, SystemLog>();
|
||||
|
||||
|
||||
CreateMap<FrontAuditConfig, FrontAuditConfigAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<EmailNoticeConfigAddOrEdit, EmailNoticeConfig>().ReverseMap();
|
||||
CreateMap<EmailNoticeConfig, EmailNoticeConfigView>();
|
||||
|
|
|
@ -15,55 +15,52 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[Table("FrontAuditConfig")]
|
||||
public class FrontAuditConfig : Entity, IAuditUpdate, IAuditAdd
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Value
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public string Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ValueCN
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public string ValueCN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Description
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateTime
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdateUserId
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Code
|
||||
/// </summary>
|
||||
[Required]
|
||||
|
||||
public string Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -74,14 +71,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// <summary>
|
||||
/// IsEnable
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IsConfig
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsConfig { get; set; }
|
||||
|
||||
public bool? IsConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ModuleTypeId
|
||||
|
@ -97,7 +94,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// ChildrenTypeId
|
||||
/// </summary>
|
||||
public string ChildrenTypeId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public bool? IsShowParent { get; set; }
|
||||
|
||||
public string ConfigType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue