diff --git a/src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs b/src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs index 005ac8a..cec6929 100644 --- a/src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs +++ b/src/Shentun.Peis.Application/PeisReports/PeisReportAppService.cs @@ -290,10 +290,18 @@ namespace Shentun.Peis.PeisReports } + + int totalCount = sumquery.GroupBy(g => g.a.Id).Count(); - var sumqueryGroup = sumquery.ToList().GroupBy(g => g.a.Id); + var sumqueryGroup = sumquery.ToList().GroupBy(g => g.a.Id).OrderBy(o => o.Key).Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount); + //var sumqueryGroup = sumquery.ToList().GroupBy(g => g.a.Id); + + //int totalCount = sumqueryGroup.Count(); + + //sumqueryGroup = sumqueryGroup.OrderBy(o => o.Key).Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount); + List entlist = new List(); foreach (var s in sumqueryGroup.OrderBy(o => o.Key)) @@ -327,7 +335,6 @@ namespace Shentun.Peis.PeisReports BirthDate = DataHelper.ConversionDateToString(s.FirstOrDefault().a.BirthDate), CompleteFlag = s.FirstOrDefault().a.CompleteFlag, CustomerOrgGroupName = s.FirstOrDefault().ac.DisplayName, - //CustomerOrgName = _cacheService.GetTopCustomerOrgAsync(s.a.CustomerOrgId).Result.DisplayName, CustomerOrgName = _cacheService.GetTopCustomerOrgNameAsync(s.FirstOrDefault().a.CustomerOrgId).Result, DepartmentName = _cacheService.GetCustomerOrgNameAsync(s.FirstOrDefault().a.CustomerOrgId).Result, Email = s.FirstOrDefault().ab.Email, @@ -356,10 +363,8 @@ namespace Shentun.Peis.PeisReports } } - - int totalCount = entlist.Count; - - entlist = entlist.Skip(input.SkipCount * input.MaxResultCount).Take(input.MaxResultCount).ToList(); + + return new PagedResultDto(totalCount, entlist); } diff --git a/src/Shentun.Peis.HttpApi.Host/appsettings.json b/src/Shentun.Peis.HttpApi.Host/appsettings.json index 2667570..a9d4b32 100644 --- a/src/Shentun.Peis.HttpApi.Host/appsettings.json +++ b/src/Shentun.Peis.HttpApi.Host/appsettings.json @@ -6,14 +6,14 @@ "CorsOrigins": "https://*.Peis.com,http://localhost:4200,http://localhost:9530,http://192.168.1.108:9530,http://localhost:8080,http://localhost:8081", "RedirectAllowedUrls": "http://localhost:9530", "SelfUser": "admin", - "SelfPassword": "Shentun!@#qwe123", + "SelfPassword": "666666", "LisUser": "admin", - "LisPassword": "Shentun!@#qwe123" + "LisPassword": "666666" }, "ConnectionStrings": { //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;" - //"Default": "Host=localhost;Port=5432;Database=ShentunPeis1218;User ID=postgres;Password=wxd123;" - "Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis240701;User ID=postgres;Password=shentun123;" + //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis240701;User ID=postgres;Password=shentun123;", + "Default": "Host=192.168.2.67;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" }, "AuthServer": { "Authority": "http://localhost:9530",