From 4c7fad02b2a67bc2a31e5c7c14ea7bed8397c0e2 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Tue, 29 Mar 2022 14:08:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Inspection/DTO/InspectionModel.cs | 2 +-
.../Service/Inspection/InspectionService.cs | 2 +-
.../Service/Inspection/_MapConfig.cs | 31 +++++++++++++++++++
3 files changed, 33 insertions(+), 2 deletions(-)
create mode 100644 IRaCIS.Core.Application/Service/Inspection/_MapConfig.cs
diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
index 06e66e8db..030bdff85 100644
--- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs
@@ -183,7 +183,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
///
/// 子类
///
- public string ChildrenType { get; set; }
+ public string ChildrenType { get; set; } = string.Empty;
///
/// 修改原因
diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
index 4c1abf803..ca3965524 100644
--- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
+++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs
@@ -70,7 +70,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName)
.WhereIf(dto.IsSign != null, x => x.IsSign == dto.IsSign)
- .WhereIf(dto.ChildrenType != null, x => x.ChildrenType == dto.ChildrenType)
+ .WhereIf(!dto.ChildrenType.IsNullOrEmpty(), x => x.ChildrenType == dto.ChildrenType)
.WhereIf(!dto.ModuleType.IsNullOrEmpty(), x => x.ModuleType == dto.ModuleType)
.WhereIf(!dto.OptType.IsNullOrEmpty(), x => x.OptType == dto.OptType)
.WhereIf(!dto.Reason.IsNullOrEmpty(), x => x.Reason == dto.Reason)
diff --git a/IRaCIS.Core.Application/Service/Inspection/_MapConfig.cs b/IRaCIS.Core.Application/Service/Inspection/_MapConfig.cs
new file mode 100644
index 000000000..3a3777235
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Inspection/_MapConfig.cs
@@ -0,0 +1,31 @@
+using AutoMapper;
+using AutoMapper.EquivalencyExpression;
+using IRaCIS.Application.Contracts;
+using IRaCIS.Core.Application.Contracts;
+using IRaCIS.Core.Application.Contracts.DTO;
+using IRaCIS.Core.Application.Service.Inspection.DTO;
+using IRaCIS.Core.Application.ViewModel;
+using IRaCIS.Core.Domain.Models;
+using IRaCIS.Core.Domain.Share;
+
+namespace IRaCIS.Core.Application.Service
+{
+ public class InspectionConfig : Profile
+ {
+ public InspectionConfig()
+ {
+
+
+
+ CreateMap();
+
+
+
+
+
+
+
+ }
+ }
+
+}