From fe2a7d52b84d2c115d8b066660a86298ce881eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Mon, 8 Jan 2024 14:39:15 +0800 Subject: [PATCH] fixed:update data code --- New_College.Api/New_College.Model.xml | 5 +++++ New_College.Common/Helper/WeChatPayOrderQuery.cs | 4 ++++ New_College.Model/ViewModels/Result/VolunteerResult.cs | 6 ++++++ New_College.Model/ViewModels/Result/VolunteerTableResult.cs | 5 +++++ .../BASE/T_EnrollmentPlanedescRepository.cs | 5 +++-- New_College.Services/T_EnrollmentPlanedescServices.cs | 3 ++- 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml index a23845b..ab951fc 100644 --- a/New_College.Api/New_College.Model.xml +++ b/New_College.Api/New_College.Model.xml @@ -6805,6 +6805,11 @@ 排名 + + + 院校编码 + + 是否211 diff --git a/New_College.Common/Helper/WeChatPayOrderQuery.cs b/New_College.Common/Helper/WeChatPayOrderQuery.cs index 368a2f9..5bc0c6e 100644 --- a/New_College.Common/Helper/WeChatPayOrderQuery.cs +++ b/New_College.Common/Helper/WeChatPayOrderQuery.cs @@ -40,6 +40,10 @@ namespace New_College.Common.Helper public class WeChatPayTransactionsNativeQuery { + /// + /// 0微信支付,1z支付宝支付 + /// + public int PayType { get; set; } public int? Total { get; set; } public string Description { get; set; } public string NotifyUrl { get; set; } diff --git a/New_College.Model/ViewModels/Result/VolunteerResult.cs b/New_College.Model/ViewModels/Result/VolunteerResult.cs index 459e75c..b0bc92d 100644 --- a/New_College.Model/ViewModels/Result/VolunteerResult.cs +++ b/New_College.Model/ViewModels/Result/VolunteerResult.cs @@ -78,6 +78,12 @@ namespace New_College.Model.ViewModels public int UniversityId { get; set; } + + /// + /// 院校编码 + /// + public string UniversityCode { get; set; } + public string UniversityName { get; set; } public string Logo { get; set; } diff --git a/New_College.Model/ViewModels/Result/VolunteerTableResult.cs b/New_College.Model/ViewModels/Result/VolunteerTableResult.cs index 1bfd206..df6d3f5 100644 --- a/New_College.Model/ViewModels/Result/VolunteerTableResult.cs +++ b/New_College.Model/ViewModels/Result/VolunteerTableResult.cs @@ -147,6 +147,11 @@ namespace New_College.Model.ViewModels public string UniversityName { get; set; } + /// + /// + /// + public string UniversityCode { get; set; } + public string Province { get; set; } /// diff --git a/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs b/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs index 0fe5673..26ce622 100644 --- a/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs +++ b/New_College.Repository/BASE/T_EnrollmentPlanedescRepository.cs @@ -106,7 +106,7 @@ namespace New_College.Repository response.Add(new UniversityMapMajorItems() { UId = a, - MIds = recommendInfo.Where(e => e.UniversityId == a).Select(c => c.PlanId).ToList() + MIds = recommendInfo.Where(e => e.UniversityId == a && e.Scoreline > 0).Select(c => c.PlanId).ToList() }); }); return new MessageModel>() { response = response }; @@ -171,6 +171,7 @@ namespace New_College.Repository // plans.Id, plans.UId, plans.UniversityName, + plans.EnrollmentCode //plans.AreaName, //plans.Ownership, //plans._211, @@ -193,7 +194,7 @@ namespace New_College.Repository // Nhef = universitys.Nhef, // Rank = universitys.Rank <= 0 ? "--" : universitys.Rank.ToString(), UniversityName = p.UniversityName, - + UniversityCode = p.EnrollmentCode, planCount = SqlFunc.AggregateSum(p.PlanCount),// plandesc.Where(x => x.UniversityId == item.Id).Select(x => x.Id).ToList() //PlanIds= SqlFunc.Subqueryable().Where(s=>s.Id==p.Id).ToList(s => s.Id), MjaorPlan = SqlFunc.AggregateCount(p.UId), diff --git a/New_College.Services/T_EnrollmentPlanedescServices.cs b/New_College.Services/T_EnrollmentPlanedescServices.cs index ff1080b..34be93f 100644 --- a/New_College.Services/T_EnrollmentPlanedescServices.cs +++ b/New_College.Services/T_EnrollmentPlanedescServices.cs @@ -1255,6 +1255,7 @@ namespace New_College.Services Syl = nowuniversityinfo.Syl > 0, UniversityId = item.UniversityId, UniversityName = item.UniversityName, + UniversityCode = nowdesc.Any()?nowdesc.FirstOrDefault().EnrollmentCode:"", Province = nowuniversityinfo.Area_Name, Nature = nowuniversityinfo.Nature, Infos = nowdesc.Select(x => new PlanInfo() @@ -1594,7 +1595,7 @@ namespace New_College.Services if (info.Count <= 0) return new MessageModel>() { success = false, msg = "数据为空" }; List list = new List() { }; - foreach (var item in info.OrderByDescending(c=>c.Year).ToList()) + foreach (var item in info.OrderByDescending(c => c.Year).ToList()) { if (item.Type != "不分文理") {