From 1eb4099af8eb435d2f548d185c1e76bbf63a2580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B7=AF=20=E8=8C=83?= Date: Fri, 17 Oct 2025 13:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E5=B8=82=E7=94=9F=E6=B4=BB?= =?UTF-8?q?=E5=9E=83=E5=9C=BE=E5=88=86=E7=B1=BB=E5=BF=97=E6=84=BF=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=A1=B9=E7=9B=AE=E4=BA=A4=E6=B5=81=E6=89=93=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ewide.Web.Entry/appsettings.json | 2 +- .../wwwroot/html/userscore20250801/ljfl.html | 360 ++++++++++++++++++ .../ApiController/UserScore20250801Service.cs | 6 +- .../Vote.Services/Dto/UserScore20250801.cs | 5 + .../Entities/userscore20250801.cs | 1 + 20220330_Vote/Vote.Services/Vote.Services.xml | 2 +- 6 files changed, 372 insertions(+), 4 deletions(-) create mode 100644 20220330_Vote/Ewide.Web.Entry/wwwroot/html/userscore20250801/ljfl.html diff --git a/20220330_Vote/Ewide.Web.Entry/appsettings.json b/20220330_Vote/Ewide.Web.Entry/appsettings.json index 483f08e..db30596 100644 --- a/20220330_Vote/Ewide.Web.Entry/appsettings.json +++ b/20220330_Vote/Ewide.Web.Entry/appsettings.json @@ -63,6 +63,6 @@ "GetHouseInfoCitysByCommunity": "http://sjk.test.ky.com/housesafety/statistics/GetHouseInfoCitysByCommunity?communityID={0}" }, "UserScore": { - "ExpertNumber": 10 + "ExpertNumber": 7 } } \ No newline at end of file diff --git a/20220330_Vote/Ewide.Web.Entry/wwwroot/html/userscore20250801/ljfl.html b/20220330_Vote/Ewide.Web.Entry/wwwroot/html/userscore20250801/ljfl.html new file mode 100644 index 0000000..591b426 --- /dev/null +++ b/20220330_Vote/Ewide.Web.Entry/wwwroot/html/userscore20250801/ljfl.html @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + +
+

宁波市生活垃圾分类志愿服务项目交流打分

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + 提交 + 默认排序 + 按得分排序 +

+
+ + + + \ No newline at end of file diff --git a/20220330_Vote/Vote.Services/ApiController/UserScore20250801Service.cs b/20220330_Vote/Vote.Services/ApiController/UserScore20250801Service.cs index 395f39e..f516c8f 100644 --- a/20220330_Vote/Vote.Services/ApiController/UserScore20250801Service.cs +++ b/20220330_Vote/Vote.Services/ApiController/UserScore20250801Service.cs @@ -42,10 +42,12 @@ namespace Vote.Services.ApiController /// [HttpPost] [Microsoft.AspNetCore.Authorization.AllowAnonymous] - public async Task List() + public async Task List(ListInput args) { + args ??= new ListInput(); var data = await repuserscore.AsQueryable() - .OrderBy(a => a.No) + .OrderByIF(!string.IsNullOrWhiteSpace(args.order), args.order) + .OrderByIF(string.IsNullOrWhiteSpace(args.order), a => a.No) .ToListAsync(); // var data = await repuserscore20250801.DetachedEntities // .OrderBy(a => a.No) diff --git a/20220330_Vote/Vote.Services/Dto/UserScore20250801.cs b/20220330_Vote/Vote.Services/Dto/UserScore20250801.cs index 34f922a..99509bf 100644 --- a/20220330_Vote/Vote.Services/Dto/UserScore20250801.cs +++ b/20220330_Vote/Vote.Services/Dto/UserScore20250801.cs @@ -23,4 +23,9 @@ public class UserScoreInput { public string expertId { get; set; } public decimal? score { get; set; } +} + +public class ListInput +{ + public string order { get; set; } } \ No newline at end of file diff --git a/20220330_Vote/Vote.Services/Entities/userscore20250801.cs b/20220330_Vote/Vote.Services/Entities/userscore20250801.cs index 80fd92b..d985351 100644 --- a/20220330_Vote/Vote.Services/Entities/userscore20250801.cs +++ b/20220330_Vote/Vote.Services/Entities/userscore20250801.cs @@ -15,6 +15,7 @@ public class userscores20250801 : DEntityBase this.Title = ""; this.Postion = ""; this.Name = ""; + this.finalscore = 0; } /// diff --git a/20220330_Vote/Vote.Services/Vote.Services.xml b/20220330_Vote/Vote.Services/Vote.Services.xml index d6da22a..ac1ac0e 100644 --- a/20220330_Vote/Vote.Services/Vote.Services.xml +++ b/20220330_Vote/Vote.Services/Vote.Services.xml @@ -302,7 +302,7 @@ 项目 - + 列表