Răsfoiți Sursa

部门办件统计表明细合计

tangjiang 2 săptămâni în urmă
părinte
comite
51dde60006

+ 22 - 22
src/Hotline.Application/StatisticalReport/OrderReportApplication.cs

@@ -406,7 +406,7 @@ namespace Hotline.Application.StatisticalReport
                               .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.CurrentHandleOrgId.StartsWith(dto.OrgCode))
                               .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.CurrentHandleOrgId == dto.OrgCode)
 
-                              .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                              .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.CurrentHandleOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.CurrentHandleOrgId.StartsWith(dto.ParentOrgCode))
@@ -425,7 +425,7 @@ namespace Hotline.Application.StatisticalReport
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
 
-                              .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                              .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -446,7 +446,7 @@ namespace Hotline.Application.StatisticalReport
                         .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (d, o) => d.ApplyOrgCode.StartsWith(dto.OrgCode))
                         .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (d, o) => d.ApplyOrgCode == dto.OrgCode)
 
-                         .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                         .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (d, o) => d.ApplyOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (d, o) => d.ApplyOrgCode.StartsWith(dto.ParentOrgCode))
@@ -465,7 +465,7 @@ namespace Hotline.Application.StatisticalReport
                           .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                           .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
 
-                          .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                          .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -483,7 +483,7 @@ namespace Hotline.Application.StatisticalReport
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.CurrentHandleOrgId.StartsWith(dto.OrgCode))
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.CurrentHandleOrgId == dto.OrgCode)
 
-                            .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                            .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.CurrentHandleOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 o => o.CurrentHandleOrgId.StartsWith(dto.ParentOrgCode))
@@ -503,7 +503,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                        .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                        .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -523,7 +523,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                         .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                         .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -543,7 +543,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
 
-                         .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                         .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -559,7 +559,7 @@ namespace Hotline.Application.StatisticalReport
                            .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.CurrentHandleOrgId == dto.OrgCode)
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.CurrentHandleOrgId.StartsWith(dto.OrgCode))
                            .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.CurrentHandleOrgId == dto.OrgCode)
-                           .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                           .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.CurrentHandleOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 o => o.CurrentHandleOrgId.StartsWith(dto.ParentOrgCode))
@@ -578,7 +578,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                               .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                               .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -596,7 +596,7 @@ namespace Hotline.Application.StatisticalReport
                           .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                           .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                           .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                             .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                             .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -617,7 +617,7 @@ namespace Hotline.Application.StatisticalReport
                             .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                             .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                             .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -636,7 +636,7 @@ namespace Hotline.Application.StatisticalReport
                              .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (t, o) => t.HandlerOrgId == dto.OrgCode)
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (t, o) => t.HandlerOrgId.StartsWith(dto.OrgCode))
                          .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == dto.OrgCode)
-                             .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                             .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                (t, o) => t.HandlerOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                 (t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
@@ -653,7 +653,7 @@ namespace Hotline.Application.StatisticalReport
                             .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.ActualHandleOrgCode == dto.OrgCode)
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
-                                .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                                .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -670,7 +670,7 @@ namespace Hotline.Application.StatisticalReport
                           .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.ActualHandleOrgCode == dto.OrgCode)
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
-                              .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                              .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -687,7 +687,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.ActualHandleOrgCode == dto.OrgCode)
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
-                             .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                             .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -704,7 +704,7 @@ namespace Hotline.Application.StatisticalReport
                          .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.ActualHandleOrgCode == dto.OrgCode)
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
-                             .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                             .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -721,7 +721,7 @@ namespace Hotline.Application.StatisticalReport
                         .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), o => o.ActualHandleOrgCode == dto.OrgCode)
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, o => o.ActualHandleOrgCode.StartsWith(dto.OrgCode))
                             .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == dto.OrgCode)
-                          .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                          .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                              o => o.ActualHandleOrgCode == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                                o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
@@ -739,7 +739,7 @@ namespace Hotline.Application.StatisticalReport
                        .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (d, o) => d.CreatorOrgId == dto.OrgCode)
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (d, o) => d.CreatorOrgId.StartsWith(dto.OrgCode))
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (d, o) => d.CreatorOrgId == dto.OrgCode)
-                        .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                        .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                             (d, o) => d.CreatorOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                               (d, o) => d.CreatorOrgId.StartsWith(dto.ParentOrgCode))
@@ -756,7 +756,7 @@ namespace Hotline.Application.StatisticalReport
                        .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (d, o) => d.CreatorOrgId == dto.OrgCode)
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (d, o) => d.CreatorOrgId.StartsWith(dto.OrgCode))
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (d, o) => d.CreatorOrgId == dto.OrgCode)
-                       .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                       .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                             (d, o) => d.CreatorOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                               (d, o) => d.CreatorOrgId.StartsWith(dto.ParentOrgCode))
@@ -774,7 +774,7 @@ namespace Hotline.Application.StatisticalReport
                        .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (d, o) => d.CreatorOrgId == dto.OrgCode)
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (d, o) => d.CreatorOrgId.StartsWith(dto.OrgCode))
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (d, o) => d.CreatorOrgId == dto.OrgCode)
-                        .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                        .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                             (d, o) => d.CreatorOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                               (d, o) => d.CreatorOrgId.StartsWith(dto.ParentOrgCode))
@@ -791,7 +791,7 @@ namespace Hotline.Application.StatisticalReport
                       .WhereIF(dto.OrgCode == "001" && !string.IsNullOrEmpty(dto.OrgCode), (d, o) => d.CreatorOrgId == dto.OrgCode)
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode != dto.ParentOrgCode, (d, o) => d.CreatorOrgId.StartsWith(dto.OrgCode))
                        .WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (d, o) => d.CreatorOrgId == dto.OrgCode)
-                        .WhereIF(dto.ParentOrgCode == "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
+                        .WhereIF(dto.ParentOrgCode == "001" && isEmpy == false && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                             (d, o) => d.CreatorOrgId == dto.ParentOrgCode)
                                .WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
                               (d, o) => d.CreatorOrgId.StartsWith(dto.ParentOrgCode))