Эх сурвалжийг харах

Merge branch 'test' of http://110.188.24.182:10023/Fengwo/hotline into test

qinchaoyue 2 цаг өмнө
parent
commit
d599e9a93c

+ 15 - 1
src/Hotline.Api/Controllers/Exam/QuestionController.cs

@@ -2,6 +2,8 @@
 using Exam.Share.ViewResponses.Question;
 using Hotline.Application.Exam.Constants.ApiRoutes;
 using Hotline.Application.Exam.Interface.Questions;
+using Hotline.Application.ExportExcel;
+using Hotline.Exams.Questions;
 using Hotline.Repository.SqlSugar.Exam.Interface;
 using Hotline.Share.Dtos.Questions;
 using Hotline.Share.Requests.Question;
@@ -15,11 +17,13 @@ namespace Hotline.Api.Controllers.Exam
     {
         private readonly IQuestionService _questionService;
         private readonly IMapper _mapper;
+        private readonly IExportApplication _exportApplication;
 
-        public QuestionController(IQuestionService questionService,IMapper mapper)
+        public QuestionController(IQuestionService questionService,IMapper mapper, IExportApplication exportApplication)
         {
             _questionService = questionService;
             this._mapper = mapper;
+            this._exportApplication = exportApplication;
         }
 
         /// <summary>
@@ -118,5 +122,15 @@ namespace Hotline.Api.Controllers.Exam
             await _questionService.ImportExcel(files, HttpContext.RequestAborted);
         }
 
+        /// <summary>
+        /// 下载Excel模版
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet(ExamManageApiRoute.Download)]
+        public FileStreamResult Download()
+        {
+            var list = new List<QuestionExcel>();
+            return _exportApplication.ExportData(list, "Template.xlsx");
+        }
     }
 }

+ 2 - 0
src/Hotline.Application/Exam/Constants/ApiRoutes/ExamManageApiRoute.cs

@@ -3,5 +3,7 @@
     public class ExamManageApiRoute:GenerateApiRoute
     {
         public const string ImportExcel = "ImportExcel";
+
+        public const string Download = "Download";
     }
 }

+ 1 - 3
src/Hotline.Application/Exam/Service/ExamManages/ExtractRuleService.cs

@@ -258,9 +258,7 @@ namespace Hotline.Application.Exam.Service.ExamManages
         {
             if (actionRequest.TagQuestionDtos == null) return null;
 
-            actionRequest.TagQuestionDtos.ResolveOperationStatus();
-
-            var tagQuestionDtos = actionRequest.TagQuestionDtos.Where(x => x.OperationStatus == EEOperationStatus.Add).ToList();
+            var tagQuestionDtos = actionRequest.TagQuestionDtos.Where(x => x.OperationStatus == EEOperationStatus.Add && x.Count!=null).ToList();
 
             var tagQuestions = _mapper.Map<List<ExamTagQuestion>>(tagQuestionDtos);
 

+ 6 - 7
src/Hotline.Application/Exam/Service/TestPapers/TestPaperService.cs

@@ -394,17 +394,16 @@ namespace Hotline.Application.Exam.Service.TestPapers
             var tagQuestionTable = tagQuestionRepository.Queryable().Where(expression);
             var questionTable = quesitonRepository.Queryable().Where(questionExpression);
 
-            var taqQuestions = await tagQuestionTable.InnerJoin(questionTable, (t, q) => t.QuestionId == q.Id)
-                .Select((t, q) => new TagQuestionCountViewResponse
-                {
-                    TotalCount = SqlFunc.AggregateCount(q.Id!=null)
-                })
+            var taqQuestions = await tagQuestionTable.InnerJoin(questionTable, (t, q) => t.QuestionId == q.Id).GroupBy((t, q) => q.Id)
+                .Select((t, q) =>q.Id)
                 .ToListAsync();
 
-            return taqQuestions.Count()> 0?taqQuestions.FirstOrDefault():new TagQuestionCountViewResponse
+            var result = new TagQuestionCountViewResponse
             {
-                TotalCount = 0
+                TotalCount = taqQuestions != null ? taqQuestions.Count() : 0
             };
+
+            return result;
         }
 
         #endregion

+ 4 - 2
src/Hotline.Application/OrderApp/OrderApplication.cs

@@ -4085,7 +4085,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
                 {
                     AuditName = x.HandlerName,
                     StepName = x.Name,
-                    AuditNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal, 1, 0)),
+                    //AuditNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal, 1, 0)),
+                    AuditNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal && x.ReviewResult == EReviewResult.Approval, 1, 0)),
+                    AuditNoNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceType == EWorkflowTraceType.Normal && x.TraceState == EWorkflowTraceState.Normal && x.ReviewResult == EReviewResult.Failed, 1, 0)),
                     AuditBackNum = SqlFunc.AggregateSum(SqlFunc.IIF(x.TraceState == EWorkflowTraceState.StepRemoveByPrevious || x.TraceState == EWorkflowTraceState.StepRemoveByRecall, 1, 0)),
                 });
         }
@@ -4098,7 +4100,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
                .Where(x => x.HandlerName != null && x.HandlerName != "")
                .WhereIF(dto.AuditType is 1, x => x.Name == "班长审批")
                .WhereIF(dto.AuditType is 2, x => x.Name == "中心领导")
-                .WhereIF(_appOptions.Value.IsZiGong && dto.AuditType is 3, x => x.Name == "中心初审")
+               .WhereIF(_appOptions.Value.IsZiGong && dto.AuditType is 3, x => x.Name == "中心初审")
                .GroupBy(x => new { x.HandlerName })
                .Select(x => new OrderScreenAuditVo
                {

+ 20 - 15
src/Hotline.Share/Dtos/Order/OrderBiDto.cs

@@ -916,10 +916,10 @@ namespace Hotline.Share.Dtos.Order
 
         public string StepName { get; set; }
 
-		/// <summary>
-		/// 派单量
-		/// </summary>
-		public int SendOrderNum { get; set; }
+        /// <summary>
+        /// 派单量
+        /// </summary>
+        public int SendOrderNum { get; set; }
 
         /// <summary>
         /// 待派单量
@@ -933,21 +933,21 @@ namespace Hotline.Share.Dtos.Order
 
         //public string AccuracyRate { get; set; }
 
-		public string AccuracyRate => GetAccuracyRateRate();
+        public string AccuracyRate => GetAccuracyRateRate();
 
-		public string GetAccuracyRateRate()
-		{
+        public string GetAccuracyRateRate()
+        {
             if (ReSendOrderNum == 0)
             {
                 return "100%";
             }
-			if (SendOrderNum > 0 &&  ReSendOrderNum > 0)
-			{
-				return Math.Round(((SendOrderNum- ReSendOrderNum) / (double)SendOrderNum) * 100, 2).ToString() +"%";
-			}
-			return "0%";
-		}
-	}
+            if (SendOrderNum > 0 && ReSendOrderNum > 0)
+            {
+                return Math.Round(((SendOrderNum - ReSendOrderNum) / (double)SendOrderNum) * 100, 2).ToString() + "%";
+            }
+            return "0%";
+        }
+    }
 
     public class OrderReTransactVo
     {
@@ -1597,6 +1597,11 @@ namespace Hotline.Share.Dtos.Order
         /// </summary>
         public int AuditNum { get; set; }
 
+        /// <summary>
+        /// 审批不同意数量
+        /// </summary>
+        public int AuditNoNum { get; set; }
+
         /// <summary>
         /// 退回数量
         /// </summary>
@@ -1605,7 +1610,7 @@ namespace Hotline.Share.Dtos.Order
         /// <summary>
         /// 小计
         /// </summary>
-        public int Total => AuditNum + AuditBackNum;
+        public int Total => AuditNum + AuditNoNum + AuditBackNum;
     }
 
     public class OrderCenterAcceptVo : OrderCenterBaseVo

+ 6 - 4
src/Hotline.Share/Dtos/Questions/QuestionDto.cs

@@ -44,7 +44,7 @@ namespace Hotline.Share.Dtos.Questions
     }
 
 
-    public class AddQuestionDto:IAddRequest
+    public class AddQuestionDto : IAddRequest
     {
         /// <summary>
         /// 题干
@@ -120,7 +120,7 @@ namespace Hotline.Share.Dtos.Questions
         public List<AddQuestionKnowladgeDto> QuestionKnowladgeDtos { get; set; }
     }
 
-    public class UpdateQuestionDto:AddQuestionDto, IActionRequest
+    public class UpdateQuestionDto : AddQuestionDto, IActionRequest
     {
         /// <summary>
         /// 主键
@@ -138,7 +138,7 @@ namespace Hotline.Share.Dtos.Questions
         /// 参考答案
         /// </summary>
         [Description("参考答案")]
-        public new  UpdateQuestionAnswerDto QuestionAnswerDto { get; set; }
+        public new UpdateQuestionAnswerDto QuestionAnswerDto { get; set; }
 
         /// <summary>
         /// 试题选项
@@ -168,7 +168,7 @@ namespace Hotline.Share.Dtos.Questions
         /// 主键
         /// </summary>
         [Description("主键")]
-        public string Id { get ; set ; }
+        public string Id { get; set; }
 
         /// <summary>
         /// 题干
@@ -191,4 +191,6 @@ namespace Hotline.Share.Dtos.Questions
         [Description("知识题目")]
         public string Title { get; set; }
     }
+
+  
 }

+ 1 - 1
src/Hotline.Share/Dtos/TestPapers/TagQuestionDto.cs

@@ -63,7 +63,7 @@ namespace Hotline.Share.Dtos.TestPapers
         /// 试题数量
         /// </summary>
         [Description("试题数量")]
-        public int Count { get; set; }
+        public int? Count { get; set; }
 
         /// <summary>
         /// 操作状态        

+ 113 - 0
src/Hotline/Exams/Questions/QuestionExcel.cs

@@ -0,0 +1,113 @@
+using Hotline.Share.Enums.Exams;
+using MiniExcelLibs.Attributes;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Hotline.Exams.Questions
+{
+    public class QuestionExcel
+    {
+        /// <summary>
+        /// 题干
+        /// </summary>
+        [ExcelColumnName("题干")]
+        public string Title { get; set; }
+
+        /// <summary>
+        /// 试题类型
+        /// </summary>
+        [ExcelColumnName("试题类型")]
+        public EQuestionType QuestionType { get; set; }
+
+        /// <summary>
+        /// 难易程度
+        /// </summary>
+        [ExcelColumnName("难易程度")]
+        public EDifficultyLevel DifficultyLevel { get; set; }
+
+        /// <summary>
+        /// 正式可用
+        /// </summary>
+        [ExcelColumnName("正式可用")]
+        public bool FormalEnable { get; set; }
+
+        /// <summary>
+        /// 模拟可用
+        /// </summary>
+        [ExcelColumnName("模拟可用")]
+
+        public bool SimulateEnable { get; set; }
+
+        /// <summary>
+        /// 选项A
+        /// </summary>
+        [ExcelColumnName("选项A")]
+        public string OptionsA { get; set; }
+
+        /// <summary>
+        /// 选项B
+        /// </summary>
+        [ExcelColumnName("选项B")]
+        public string OptionsB { get; set; }
+
+        /// <summary>
+        /// 选项C
+        /// </summary>
+        [ExcelColumnName("选项C")]
+        public string OptionsC { get; set; }
+
+        /// <summary>
+        /// 选项D
+        /// </summary>
+        [ExcelColumnName("选项D")]
+        public string OptionsD { get; set; }
+
+        /// <summary>
+        /// 选项E
+        /// </summary>
+        [ExcelColumnName("选项E")]
+        public string OptionsE { get; set; }
+
+        /// <summary>
+        /// 选项F
+        /// </summary>
+        [ExcelColumnName("选项F")]
+        public string OptionsF { get; set; }
+
+        /// <summary>
+        /// 选项G
+        /// </summary>
+        [ExcelColumnName("选项G")]
+        public string OptionsG { get; set; }
+
+        /// <summary>
+        /// 选项H
+        /// </summary>
+        [ExcelColumnName("选项H")]
+        public string OptionsH { get; set; }
+
+        /// <summary>
+        /// 选项I
+        /// </summary>
+        [ExcelColumnName("选项I")]
+        public string OptionsI { get; set; }
+
+        /// <summary>
+        /// 选项J
+        /// </summary>
+        [ExcelColumnName("选项J")]
+        public string OptionsJ { get; set; }
+
+        /// <summary>
+        /// 答案
+        /// </summary>
+        [ExcelColumnName("答案")]
+
+        public string Answer { get; set; }
+
+    }
+}

+ 36 - 36
src/Hotline/FlowEngine/Workflows/WorkflowDomainService.cs

@@ -419,7 +419,7 @@ namespace Hotline.FlowEngine.Workflows
                             OrgId = orgid,
                             FlowAssignType = EFlowAssignType.Role
                         });
-                       
+
                     }
                 }
             }
@@ -1206,39 +1206,39 @@ namespace Hotline.FlowEngine.Workflows
                 .ToListAsync(cancellationToken);
         }
 
-		// <summary>
-		/// 查询归属多个用户的所有流程节点
-		/// </summary>
-		public async Task<List<WorkflowStep>> GetStepsBelongsToAsync(List<string> userIds, CancellationToken cancellationToken)
-		{
+        // <summary>
+        /// 查询归属多个用户的所有流程节点
+        /// </summary>
+        public async Task<List<WorkflowStep>> GetStepsBelongsToAsync(List<string> userIds, CancellationToken cancellationToken)
+        {
             return await _workflowStepRepository.Queryable()
                 .Includes(d => d.WorkflowTrace)
-                .Where(d=> d.Status != EWorkflowStepStatus.Handled)
+                .Where(d => d.Status != EWorkflowStepStatus.Handled)
                 //.Where(d => d.HandlerId == userId)
                 .In(d => d.HandlerId, userIds)
                 .OrderBy(d => d.CreationTime)
                 .ToListAsync(cancellationToken);
-		}
-
-		// <summary>
-		/// 查询归属多个用户的所有流程节点 当天
-		/// </summary>
-		public async Task<List<WorkflowStep>> GetStepsBelongsDayToAsync(List<string> userIds,DateTime time, CancellationToken cancellationToken)
-		{
-			return await _workflowStepRepository.Queryable()
-				.Includes(d => d.WorkflowTrace)
-				.Where(d => d.Status != EWorkflowStepStatus.Handled)
-                .Where(d => d.CreationTime >= time  && d.CreationTime < time.AddDays(1))
-				//.Where(d => d.HandlerId == userId)
-				.In(d => d.HandlerId, userIds)
-				.OrderBy(d => d.CreationTime)
-				.ToListAsync(cancellationToken);
-		}
-
-		/// <summary>
-		/// 批量修改工单办理对象
-		/// </summary>
-		public async Task ChangeHandlerBatchAsync(
+        }
+
+        // <summary>
+        /// 查询归属多个用户的所有流程节点 当天
+        /// </summary>
+        public async Task<List<WorkflowStep>> GetStepsBelongsDayToAsync(List<string> userIds, DateTime time, CancellationToken cancellationToken)
+        {
+            return await _workflowStepRepository.Queryable()
+                .Includes(d => d.WorkflowTrace)
+                .Where(d => d.Status != EWorkflowStepStatus.Handled)
+                .Where(d => d.CreationTime >= time && d.CreationTime < time.AddDays(1))
+                //.Where(d => d.HandlerId == userId)
+                .In(d => d.HandlerId, userIds)
+                .OrderBy(d => d.CreationTime)
+                .ToListAsync(cancellationToken);
+        }
+
+        /// <summary>
+        /// 批量修改工单办理对象
+        /// </summary>
+        public async Task ChangeHandlerBatchAsync(
             IReadOnlyList<(string userId, string username, string orgId, string orgName, string? roleId, string? roleName, ICollection<WorkflowStep>
                 steps)> handlers,
             CancellationToken cancellationToken)
@@ -1923,10 +1923,10 @@ namespace Hotline.FlowEngine.Workflows
                 },
                 EFlowAssignType.Role => new StepAssignInfo
                 {
-                    Key = startStep.RoleId,
-                    Value = startStep.RoleName,
-                    RoleId = startStep.RoleId,
-                    RoleName = startStep.RoleName,
+                    Key = startStep.RoleName ?? startStepDefine.HandlerTypeItems.FirstOrDefault()?.Key,
+                    Value = startStep.RoleName ?? startStepDefine.HandlerTypeItems.FirstOrDefault()?.Value,
+                    RoleId = startStep.RoleName ?? startStepDefine.HandlerTypeItems.FirstOrDefault()?.Key,
+                    RoleName = startStep.RoleName ?? startStepDefine.HandlerTypeItems.FirstOrDefault()?.Value,
                     UserId = startStep.HandlerId,
                     Username = startStep.HandlerName,
                     OrgId = startStep.HandlerOrgId,
@@ -2007,10 +2007,10 @@ namespace Hotline.FlowEngine.Workflows
                         }
                         : new()
                         {
-                            Key = sendStep.RoleId,
-                            Value = sendStep.RoleName,
-                            RoleId = sendStep.RoleId,
-                            RoleName = sendStep.RoleName,
+                            Key = sendStep.RoleId?? sendStepDefine.HandlerTypeItems.FirstOrDefault()?.Key,
+                            Value = sendStep.RoleName?? sendStepDefine.HandlerTypeItems.FirstOrDefault()?.Value,
+                            RoleId = sendStep.RoleId?? sendStepDefine.HandlerTypeItems.FirstOrDefault()?.Key,
+                            RoleName = sendStep.RoleName?? sendStepDefine.HandlerTypeItems.FirstOrDefault()?.Value,
                             UserId = sendStep.HandlerId,
                             Username = sendStep.HandlerName,
                             OrgId = sendStep.HandlerOrgId,

+ 1 - 1
src/Hotline/Validators/Exams/ExamManages/AddTagQuestionDtoValidator.cs

@@ -11,7 +11,7 @@ namespace Hotline.Validators.Exams.ExamManages
         public AddTagQuestionDtoValidator()
         {
             RuleFor(m => m.QuestionType).NotNull().WithMessage(x=>string.Format(ExamErrorMessage.IsRequired,x.GetType().GetDescription(nameof(ExamTagQuestion.QuestionType))));
-            RuleFor(m=>m.Count).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Count))));
+            //RuleFor(m=>m.Count).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Count))));
             RuleFor(m => m.TagId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamTag).GetDescription()));
         }
     }

+ 1 - 1
src/Hotline/Validators/Exams/ExamManages/UpdateExamTagDtoValidator.cs

@@ -16,7 +16,7 @@ namespace Hotline.Validators.Exams
     {
         public UpdateExamTagDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTag.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTag.Id))));
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTag.Name))));
 
         }

+ 1 - 1
src/Hotline/Validators/Exams/ExamManages/UpdateExtractRuleDtoValidator.cs

@@ -10,7 +10,7 @@ namespace Hotline.Validators.Exams.ExamManages
         public UpdateExtractRuleDtoValidator()
         {
 
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExtractRuleDto.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExtractRuleDto.Id))));
 
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExtractRuleDto.Name))));
             RuleFor(m => m.RuleType).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExtractRuleDto.RuleType))));

+ 1 - 1
src/Hotline/Validators/Exams/ExamManages/UpdateTagQuestionDtoValidator.cs

@@ -12,7 +12,7 @@ namespace Hotline.Validators.Exams.ExamManages
         public UpdateTagQuestionDtoValidator()
         {
             RuleFor(m => m.QuestionType).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.QuestionType))));
-            RuleFor(m => m.Count).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Count))));
+            //RuleFor(m => m.Count).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamTagQuestion.Count))));
             RuleFor(m => m.TagId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamTag).GetDescription()));
         }
     }

+ 1 - 1
src/Hotline/Validators/Exams/Questions/UpdateQuestionDtoValidator.cs

@@ -11,7 +11,7 @@ namespace Hotline.Validators.Exams
     {
         public UpdateQuestionDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Id))));
             RuleFor(m => m.Title).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Title))));
             RuleFor(m => m.DifficultyLevel).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.DifficultyLevel))));
             RuleFor(m => m.FormalEnable).NotNull().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.FormalEnable))));

+ 1 - 1
src/Hotline/Validators/Exams/Questions/UpdateQuestionKnowladgeDtoValidator.cs

@@ -11,7 +11,7 @@ namespace Hotline.Validators.Exams
         public UpdateQuestionKnowladgeDtoValidator()
         {
             RuleFor(m => m.KnowladgeId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(Hotline.KnowledgeBase.Knowledge).GetDescription()));
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamQuestion.Id))));
         }
     }
 }

+ 1 - 1
src/Hotline/Validators/Exams/Sourcewares/UpdateSourceCategoryDtoValidator.cs

@@ -15,7 +15,7 @@ namespace Hotline.Validators.Exams
     {
         public UpdateSourceCategoryDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Id))));
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourcewareCategory.Name))));
         }
     }

+ 1 - 1
src/Hotline/Validators/Exams/Sourcewares/UpdateSourcewareDtoValidator.cs

@@ -10,7 +10,7 @@ namespace Hotline.Validators.Exams
     {
         public UpdateSourcewareDtoValidator()
         {
-            RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Id))));
+            //RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Id))));
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
         }
     }