From 376982939719a2a8a78f38209ebafafd816d2a2b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com>
Date: Tue, 28 Nov 2023 17:53:34 +0800
Subject: [PATCH] bug list fixed
---
.../Front/PcVolunteerController.cs | 2 +-
.../Controllers/Front/VolunteerController.cs | 18 ++++++
New_College.Api/New_College.Model.xml | 5 ++
New_College.Api/New_College.xml | 7 +++
.../IT_EnrollmentPlanedescServices.cs | 10 +++-
.../ViewModels/UniversityPlanProView.cs | 2 +
.../BASE/D_PlanMajorDescProRepository.cs | 4 +-
.../D_PlanMajorDescProServices.cs | 1 +
.../T_EnrollmentPlanedescServices.cs | 59 ++++++++++++++++++-
9 files changed, 103 insertions(+), 5 deletions(-)
diff --git a/New_College.Api/Controllers/Front/PcVolunteerController.cs b/New_College.Api/Controllers/Front/PcVolunteerController.cs
index e5f5969..262d951 100644
--- a/New_College.Api/Controllers/Front/PcVolunteerController.cs
+++ b/New_College.Api/Controllers/Front/PcVolunteerController.cs
@@ -58,7 +58,7 @@ namespace New_College.Api.Controllers.Front
.And(c => c.IsDelete == false)
.And(c => c.CustomerId == view.CustomerId)
.ToExpression();
- var pagemodel = await _VolunteerTableServices.QueryPage(exp, view.PageIndex, view.PageSize);
+ var pagemodel = await _VolunteerTableServices.QueryPage(exp, view.PageIndex, view.PageSize, " CreateTime desc");
response.data = pagemodel.data.Select(c => new VolunteerTableDtoView()
{
CustomerId = c.CustomerId,
diff --git a/New_College.Api/Controllers/Front/VolunteerController.cs b/New_College.Api/Controllers/Front/VolunteerController.cs
index 9ba7739..5e830c4 100644
--- a/New_College.Api/Controllers/Front/VolunteerController.cs
+++ b/New_College.Api/Controllers/Front/VolunteerController.cs
@@ -270,5 +270,23 @@ namespace New_College.Api.Controllers.Front
{
return await t_EnrollmentPlanedescServices.GetBatchByYearArea(query);
}
+
+
+
+ ///
+ ///获取批次(院校详情中调用)
+ ///
+ ///
+ ///
+ [HttpGet]
+ public async Task>> GetUniversityPlanBatch([FromQuery] YearAreaQuery query)
+ {
+ return await t_EnrollmentPlanedescServices.GetUniversityPlanBatch(query);
+ }
+
+
+
+
+
}
}
diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml
index 3db0e30..3335252 100644
--- a/New_College.Api/New_College.Model.xml
+++ b/New_College.Api/New_College.Model.xml
@@ -1216,6 +1216,11 @@
排名
+
+
+ 分数(没有就是--)
+
+
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index c13dce0..35e70f6 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -916,6 +916,13 @@
+
+
+ 获取批次(院校详情中调用)
+
+
+
+
下订单
diff --git a/New_College.IServices/IT_EnrollmentPlanedescServices.cs b/New_College.IServices/IT_EnrollmentPlanedescServices.cs
index 2593f6a..9a0de75 100644
--- a/New_College.IServices/IT_EnrollmentPlanedescServices.cs
+++ b/New_College.IServices/IT_EnrollmentPlanedescServices.cs
@@ -133,9 +133,17 @@ namespace New_College.IServices
///
Task>> GetBatchByYearArea(YearAreaQuery query);
+ ///
+ /// 获取批次(院校详情中接口)
+ ///
+ ///
+ ///
+ Task>> GetUniversityPlanBatch(YearAreaQuery query);
+
+
+
-
}
diff --git a/New_College.Model/ViewModels/UniversityPlanProView.cs b/New_College.Model/ViewModels/UniversityPlanProView.cs
index 7f5e3fa..e698f8e 100644
--- a/New_College.Model/ViewModels/UniversityPlanProView.cs
+++ b/New_College.Model/ViewModels/UniversityPlanProView.cs
@@ -13,6 +13,8 @@ namespace New_College.Model.ViewModels
public string Location { get; set; }
+ public string BatchName { get; set; }
+
public int Year { get; set; }
}
diff --git a/New_College.Repository/BASE/D_PlanMajorDescProRepository.cs b/New_College.Repository/BASE/D_PlanMajorDescProRepository.cs
index 9ee40c8..9d5b27f 100644
--- a/New_College.Repository/BASE/D_PlanMajorDescProRepository.cs
+++ b/New_College.Repository/BASE/D_PlanMajorDescProRepository.cs
@@ -48,7 +48,9 @@ namespace New_College.Repository
c._SYL,
c.SchoolType,
c.EducationCategory,
- c.Rank
+ c.Rank,
+ c.Logo,
+ c.Web
})
.Select(c => new UniversityPlanProView()
diff --git a/New_College.Services/D_PlanMajorDescProServices.cs b/New_College.Services/D_PlanMajorDescProServices.cs
index 1402fc7..48ad5d1 100644
--- a/New_College.Services/D_PlanMajorDescProServices.cs
+++ b/New_College.Services/D_PlanMajorDescProServices.cs
@@ -41,6 +41,7 @@ namespace New_College.Services
Expression> expression = Expressionable.Create()
.And(c => c.UId == request.UId)
.And(c => c.Location == request.Location)
+ .AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName == request.BatchName)
.And(c => c.Years == request.Year)
.ToExpression();
var query = await _dal.Query(expression);
diff --git a/New_College.Services/T_EnrollmentPlanedescServices.cs b/New_College.Services/T_EnrollmentPlanedescServices.cs
index f8aa037..e0c9516 100644
--- a/New_College.Services/T_EnrollmentPlanedescServices.cs
+++ b/New_College.Services/T_EnrollmentPlanedescServices.cs
@@ -43,6 +43,7 @@ namespace New_College.Services
private readonly ID_PlanMajorScoreLineRepository _PlanMajorScoreLineRepository;
private readonly ID_QualificationLineRepository _QualificationLineRepository;
private readonly ID_ScoreLineRepository _ScoreLineRepository;
+ private readonly IT_BatchlineRepository t_BatchlineRepository;
public T_EnrollmentPlanedescServices(IBaseRepository dal
, ID_UniversityRepository ID_UniversityRepository
, IT_EnrollmentBatchRepository IT_EnrollmentBatchRepository
@@ -59,7 +60,7 @@ namespace New_College.Services
, ID_UniversityCollectionRepository ID_UniversityCollectionRepository
, IT_GearInfoRepository IT_GearInfoRepository, IT_EnrollmentPlanedescRepository t_EnrollmentPlanedescServices,
IV_CustomerInfoRepository v_CustomerInfoRepository, ID_PlanMajorDescRepository planMajorDescRepository,
- ID_PlanMajorScoreLineRepository planMajorScoreLineRepository, ID_QualificationLineRepository qualificationLineRepository, ID_ScoreLineRepository scoreLineRepository)
+ ID_PlanMajorScoreLineRepository planMajorScoreLineRepository, ID_QualificationLineRepository qualificationLineRepository, ID_ScoreLineRepository scoreLineRepository, IT_BatchlineRepository batchlineRepository)
{
this._dal = dal;
d_UniversityRepository = ID_UniversityRepository;
@@ -82,6 +83,7 @@ namespace New_College.Services
_PlanMajorScoreLineRepository = planMajorScoreLineRepository;
_QualificationLineRepository = qualificationLineRepository;
_ScoreLineRepository = scoreLineRepository;
+ t_BatchlineRepository = batchlineRepository;
}
public List permut = new List();
@@ -1511,6 +1513,59 @@ namespace New_College.Services
return returnclaim;
}
+
+
+ ///
+ /// 院校内部获取批次
+ ///
+ ///
+ ///
+ public async Task>> GetUniversityPlanBatch(YearAreaQuery query)
+ {
+
+ query.Year = query.Year.HasValue && query.Year > 2023 ? 2023 : query.Year;
+ Expression> expression = Expressionable.Create()
+ .And(c => c.IsDelete == false)
+ .And(c => c.AreaName == query.AreaName)
+ .AndIF(query.Year.HasValue, c => c.Year == query.Year)
+ .ToExpression();
+ var info = await t_BatchlineRepository.Query(expression);
+ if (info.Count <= 0)
+ return new MessageModel>() { success = false, msg = "数据为空" };
+ List list = new List() { };
+ foreach (var item in info)
+ {
+ if (item.Type_name != "不分文理")
+ {
+ list.Add(new IdNameResult()
+ {
+ Id = item.Id,
+ Name = item.Batch_name,
+ TypeName = item.Type_name,
+ Year = item.Year,
+ Score = item.Average
+ });
+ }
+ else
+ {
+ list.Add(new IdNameResult()
+ {
+ Id = item.Id,
+ Name = item.Batch_name,
+ Year = item.Year,
+ Score = item.Average
+ });
+ }
+ }
+ return new MessageModel>()
+ {
+ success = true,
+ msg = "获取成功",
+ response = list
+ };
+
+ }
+
///
/// 获取批次
///
@@ -1521,7 +1576,7 @@ namespace New_College.Services
query.Year = query.Year.HasValue && query.Year > 2023 ? 2023 : query.Year;
Expression> expression = Expressionable.Create()
.And(c => c.IsDelete == false)
- .And(c=>!c.Batch_name.Contains("提前"))
+ .And(c => !c.Batch_name.Contains("提前"))
.And(c => !c.Batch_name.Contains("零志愿"))
.And(c => c.AreaName == query.AreaName)
.AndIF(query.Year.HasValue, c => c.Year == query.Year)