|
@@ -264,6 +264,8 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
|
|
|
dto.EndTime = dto.EndTime.Value.AddDays(1).AddSeconds(-1);
|
|
|
|
|
|
+ var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
+
|
|
|
if (dto.Type == 0)
|
|
|
{
|
|
|
dto.ChainEndTime = dto.ChainEndTime.Value.AddDays(1).AddSeconds(-1);
|
|
@@ -274,6 +276,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.WhereIF(dto.StartTime.HasValue, (x, o) => o.CreationTime >= dto.StartTime)
|
|
|
.WhereIF(dto.EndTime.HasValue, (x, o) => o.CreationTime <= dto.EndTime)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => x.HotSpotName.Contains(dto.Keyword!))
|
|
|
+ .WhereIF(IsCenter == false, (x, o) => o.ActualHandleOrgCode == _sessionContext.RequiredOrgId)
|
|
|
.Where((x, o) => x.ParentId == dto.Id)
|
|
|
.Where((x, o) => x.IsDeleted == false)
|
|
|
.GroupBy((x, o) => new { x.Id, x.HotSpotName })
|
|
@@ -310,6 +313,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.WhereIF(dto.StartTime.HasValue, (x, o) => o.CreationTime >= chainStartTime)
|
|
|
.WhereIF(dto.EndTime.HasValue, (x, o) => o.CreationTime <= chainEndTime)
|
|
|
.WhereIF(!string.IsNullOrEmpty(dto.Keyword), (x, o) => x.HotSpotName.Contains(dto.Keyword!))
|
|
|
+ .WhereIF(IsCenter == false, (x, o) => o.ActualHandleOrgCode == _sessionContext.RequiredOrgId)
|
|
|
.Where((x, o) => x.ParentId == dto.Id)
|
|
|
.Where((x, o) => x.IsDeleted == false)
|
|
|
.GroupBy((x, o) => new { x.Id, x.HotSpotName })
|
|
@@ -676,6 +680,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
{
|
|
|
EndDate = EndDate.AddDays(1).AddSeconds(-1);
|
|
|
|
|
|
+ var IsCenter = _sessionContext.OrgIsCenter;
|
|
|
|
|
|
if (string.IsNullOrEmpty(HotspotCode))
|
|
|
{
|
|
@@ -684,6 +689,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Where((it, o) => o.CreationTime >= StartDate && o.CreationTime <= EndDate && o.Id != null)
|
|
|
.WhereIF(TypeId == 1, (it, o) => o.IdentityType == EIdentityType.Citizen)
|
|
|
.WhereIF(TypeId == 2, (it, o) => o.IdentityType == EIdentityType.Enterprise)
|
|
|
+ .WhereIF(IsCenter == false, (it,o) => o.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
|
.GroupBy((it, o) => new { Id = it.Id.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>("2")) })
|
|
|
.Select((it, o) => new
|
|
|
{
|
|
@@ -712,6 +718,7 @@ namespace Hotline.Api.Controllers.Bi
|
|
|
.Where((it, o) => o.CreationTime >= StartDate && o.CreationTime <= EndDate && it.ParentId.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(countx)) == HotspotCode)
|
|
|
.WhereIF(TypeId == 1, (it, o) => o.IdentityType == EIdentityType.Citizen)
|
|
|
.WhereIF(TypeId == 2, (it, o) => o.IdentityType == EIdentityType.Enterprise)
|
|
|
+ .WhereIF(IsCenter == false, (it, o) => o.ActualHandleOrgCode.StartsWith(_sessionContext.RequiredOrgId))
|
|
|
.GroupBy((it, o) => new { Id = it.Id.Substring(SqlFunc.MappingColumn<int>("0"), SqlFunc.MappingColumn<int>(count)) })
|
|
|
.Select((it, o) => new
|
|
|
{
|