|
@@ -346,6 +346,10 @@ namespace Hotline.Application.StatisticalReport
|
|
if (string.IsNullOrEmpty(dto.ParentOrgCode) && dto.OrgCode == _sessionContext.RequiredOrgId)
|
|
if (string.IsNullOrEmpty(dto.ParentOrgCode) && dto.OrgCode == _sessionContext.RequiredOrgId)
|
|
dto.ParentOrgCode = _sessionContext.RequiredOrgId;
|
|
dto.ParentOrgCode = _sessionContext.RequiredOrgId;
|
|
|
|
|
|
|
|
+ bool isEmpy = false;
|
|
|
|
+ if (string.IsNullOrEmpty(dto.ParentOrgCode))
|
|
|
|
+ isEmpy = true;
|
|
|
|
+
|
|
if (string.IsNullOrEmpty(dto.ParentOrgCode) && string.IsNullOrEmpty(dto.OrgCode))
|
|
if (string.IsNullOrEmpty(dto.ParentOrgCode) && string.IsNullOrEmpty(dto.OrgCode))
|
|
dto.ParentOrgCode = _sessionContext.RequiredOrgId;
|
|
dto.ParentOrgCode = _sessionContext.RequiredOrgId;
|
|
|
|
|
|
@@ -362,7 +366,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.StartsWith(dto.OrgCode))
|
|
.WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, o => o.ActualHandleOrgCode == 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)
|
|
o => o.ActualHandleOrgCode == dto.ParentOrgCode)
|
|
.WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
|
|
.WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
|
|
o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
|
|
o => o.ActualHandleOrgCode.StartsWith(dto.ParentOrgCode))
|
|
@@ -381,7 +385,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.StartsWith(dto.OrgCode))
|
|
.WhereIF(dto.OrgCode != "001" && !string.IsNullOrEmpty(dto.OrgCode) && dto.OrgCode == dto.ParentOrgCode, (t, o) => t.HandlerOrgId == 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)
|
|
(t, o) => t.HandlerOrgId == dto.ParentOrgCode)
|
|
.WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
|
|
.WhereIF(dto.ParentOrgCode != "001" && string.IsNullOrEmpty(dto.OrgCode) && !string.IsNullOrEmpty(dto.ParentOrgCode),
|
|
(t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
|
|
(t, o) => t.HandlerOrgId.StartsWith(dto.ParentOrgCode))
|