diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 41c386081..78e0bc10e 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -142,10 +142,10 @@ namespace IRaCIS.Core.API.Controllers opt.AuditInfo.SubjectId = Guid.Parse(fun.Data); var statusdata = new { - status = 1, - outEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"), - visitOverTime = DateTime.Now.ToString("yyyy-MM-dd"), - reason = string.Empty, + Status = 1, + OutEnrollmentTime = DateTime.Now.ToString("yyyy-MM-dd"), + VisitOverTime = DateTime.Now.ToString("yyyy-MM-dd"), + Reason = string.Empty, }; diff --git a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs index 703f91773..ce07b8013 100644 --- a/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs +++ b/IRaCIS.Core.Application/Service/Common/DTO/FrontAuditConfigViewModel.cs @@ -12,33 +12,37 @@ namespace IRaCIS.Core.Application.ViewModel public class FrontAuditConfigView { 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 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; } + public string ConfigType { get; set; } = string.Empty; - public bool? IsShowParent { 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; } + public string ChildrenTypeValue { get; set; } = string.Empty; + public string ChildrenTypeValueCN { get; set; } = string.Empty; + + public string ModuleTypeValue { get; set; } = string.Empty; + public string ModuleTypeValueCN { get; set; } = string.Empty; + + public string OptTypeValue { get; set; } = string.Empty; + public string OptTypeValueCN { get; set; } = string.Empty; + + public int? Sort { get; set; } + + } ///FrontAuditConfigQuery 列表查询参数模型 @@ -87,6 +91,8 @@ namespace IRaCIS.Core.Application.ViewModel public bool? IsShowParent { get; set; } + public int? Sort { get; set; } + } diff --git a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs index 777766c3c..ebc523445 100644 --- a/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Common/FrontAuditConfigService.cs @@ -67,7 +67,7 @@ namespace IRaCIS.Core.Application.Service OptTypeValue = leftOptTypeId.Value, OptTypeValueCN = leftOptTypeId.ValueCN, UpdateUserId = data.UpdateUserId, - + Sort=data.Sort, ValueCN = data.ValueCN, ChildrenTypeValue = leftchildrenType.Value, }; @@ -80,7 +80,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(!iq.Value.IsNullOrEmpty(), x => x.Code == iq.Code) .WhereIf(!iq.Value.IsNullOrEmpty(), x => x.ChildrenTypeId == iq.ChildrenTypeId); - return await query.ToListAsync(); + return await query.OrderBy(x=>x.Sort).ToListAsync(); } diff --git a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs index 0fa6fd641..47fa11975 100644 --- a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs +++ b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs @@ -99,6 +99,8 @@ namespace IRaCIS.Core.Domain.Models public string ConfigType { get; set; } + public int? Sort { get; set; } + } }