From c3afc5b0f007752a79736be1386562d5e3c0acf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com>
Date: Mon, 13 May 2024 16:49:52 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9B=B4=E6=96=B0=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/HealthCheckController.cs | 4 +-
New_College.Api/New_College.xml | 7 +++
New_College.IServices/ID_LongIdMapServices.cs | 1 +
.../BASE/D_PlanMajorScoreLineRepository.cs | 7 +++
.../BASE/D_QualificationLineRepository.cs | 13 ++++
.../BASE/ID_PlanMajorDescRepository.cs | 5 --
.../BASE/ID_PlanMajorScoreLineRepository.cs | 2 +
.../BASE/ID_QualificationLineRepository.cs | 6 ++
New_College.Services/D_LongIdMapServices.cs | 62 +++++++++++++++++++
.../T_EnrollmentPlanedescServices.cs | 2 +-
10 files changed, 101 insertions(+), 8 deletions(-)
diff --git a/New_College.Api/Controllers/HealthCheckController.cs b/New_College.Api/Controllers/HealthCheckController.cs
index 57cc69e..a6b3eaa 100644
--- a/New_College.Api/Controllers/HealthCheckController.cs
+++ b/New_College.Api/Controllers/HealthCheckController.cs
@@ -68,9 +68,9 @@ namespace New_College.Controllers
//return d_LongIdMapServices.UpdateUniveristyInf();
- // await d_LongIdMapServices.UpdatePlanScoreLine();
+ await d_LongIdMapServices.UpdateSchoolScoreLine23();
- await v_CustomerInfoServices.CustomeBillExport();
+ // await v_CustomerInfoServices.CustomeBillExport();
return true;
}
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index 59aaa76..5478f17 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -906,6 +906,13 @@
+
+
+ 开放绑卡
+
+
+
+
获取vip信息 传用户Id
diff --git a/New_College.IServices/ID_LongIdMapServices.cs b/New_College.IServices/ID_LongIdMapServices.cs
index 6c904b8..1a0577c 100644
--- a/New_College.IServices/ID_LongIdMapServices.cs
+++ b/New_College.IServices/ID_LongIdMapServices.cs
@@ -18,6 +18,7 @@ namespace New_College.IServices
///
///
Task UpdatePlanScoreLine();
+ Task UpdateSchoolScoreLine23();
Task UpdatePlanProInf();
Task Import();
diff --git a/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs b/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
index 619a12d..e75505c 100644
--- a/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
+++ b/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
@@ -21,5 +21,12 @@ namespace New_College.Repository
var kk = await this.Db.Fastest().PageSize(50000).BulkCopyAsync(majorScoreLines);
return kk > 0;
}
+
+ public async Task BatchUpdate(List majorScoreLines)
+ {
+ var kk = await this.Db.Fastest().BulkUpdateAsync(majorScoreLines);
+ return kk > 0;
+ }
+
}
}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/D_QualificationLineRepository.cs b/New_College.Repository/BASE/D_QualificationLineRepository.cs
index c11493c..b0b5e75 100644
--- a/New_College.Repository/BASE/D_QualificationLineRepository.cs
+++ b/New_College.Repository/BASE/D_QualificationLineRepository.cs
@@ -2,6 +2,8 @@
using New_College.IRepository.UnitOfWork;
using New_College.Model.Models;
using New_College.Repository.Base;
+using System.Collections.Generic;
+using System.Threading.Tasks;
namespace New_College.Repository
{
@@ -15,6 +17,17 @@ namespace New_College.Repository
}
+ public async Task BatchAdd(List d_Qualifications)
+ {
+ var kk = await this.Db.Fastest().PageSize(50000).BulkCopyAsync(d_Qualifications);
+ return kk > 0;
+ }
+
+ public async Task BatchUpdate(List d_Qualifications)
+ {
+ var kk = await this.Db.Fastest().BulkUpdateAsync(d_Qualifications);
+ return kk > 0;
+ }
}
diff --git a/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs b/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
index 066fd91..2af5adf 100644
--- a/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
+++ b/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
@@ -10,11 +10,6 @@ namespace New_College.IRepository
///
public interface ID_PlanMajorDescRepository : IBaseRepository
{
- ///
- /// 批量更新数据
- ///
- ///
- ///
Task Batchupdate(List majorDescs);
}
}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs b/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
index c02ccef..dfb1fd3 100644
--- a/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
+++ b/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
@@ -11,5 +11,7 @@ namespace New_College.IRepository
public interface ID_PlanMajorScoreLineRepository : IBaseRepository
{
Task BatchAdd(List majorScoreLines);
+
+ Task BatchUpdate(List majorScoreLines);
}
}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_QualificationLineRepository.cs b/New_College.Repository/BASE/ID_QualificationLineRepository.cs
index 82cec0f..364e724 100644
--- a/New_College.Repository/BASE/ID_QualificationLineRepository.cs
+++ b/New_College.Repository/BASE/ID_QualificationLineRepository.cs
@@ -1,5 +1,7 @@
using New_College.IRepository.Base;
using New_College.Model.Models;
+using System.Collections.Generic;
+using System.Threading.Tasks;
namespace New_College.IRepository
{
@@ -8,5 +10,9 @@ namespace New_College.IRepository
///
public interface ID_QualificationLineRepository : IBaseRepository
{
+
+ Task BatchAdd(List d_Qualifications);
+ Task BatchUpdate(List d_Qualifications);
+
}
}
\ No newline at end of file
diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs
index b474752..a14f4c5 100644
--- a/New_College.Services/D_LongIdMapServices.cs
+++ b/New_College.Services/D_LongIdMapServices.cs
@@ -1925,6 +1925,68 @@ namespace New_College.Services
}
+
+ ///
+ ///
+ ///
+ ///
+ public async Task UpdateSchoolScoreLine23()
+ {
+
+ var dsQualification = new List();
+
+ var list = await d_PlanMajorScoreLineRepository.Query(e => e.IsDelete == false && e.Years == 2023 && e.Location == "浙江省");
+
+ var planlist = await d_PlanMajorDescProRepository.Query(e => e.IsDelete == false && e.Years == 2023 && e.Location == "浙江省");
+ //var universitylist = await d_UniversityRepository.Query();
+ planlist.ForEach(a =>
+ {
+ var lany = list.Where(e => e.MajorCode == a.MajorCode && e.Major == a.Major && e.UniversityName == a.UniversityName);
+ if (lany.Any())
+ {
+ var aa = lany.FirstOrDefault();
+ a.UId = aa.UId;
+ a.BatchName = aa.BatchName;
+ }
+ });
+
+ await d_PlanMajorDescProRepository.Batchupdate(planlist);
+
+ //list.ForEach(c =>
+ //{
+ // if (c.UId <= 0)
+ // {
+ // c.UId = universitylist.Where(e => e.Name == c.UniversityName).FirstOrDefault().Id;
+ // }
+ //});
+ //await d_PlanMajorScoreLineRepository.BatchUpdate(list);
+ //var unlist = list.Select(c => c.UniversityName).Distinct().ToList();
+ //unlist.ForEach(a =>
+ //{
+ // var models = list.Where(e => e.UniversityName == a).FirstOrDefault();
+ // //先找出院校最低分
+ // dsQualification.Add(new D_QualificationLine()
+ // {
+ // Years = models.Years,
+ // UniversityName = a,
+ // CreateTime = DateTime.Now,
+ // IsDelete = false,
+ // Location = models.Location,
+ // OrderSort = 0,
+ // UId = models.UId,
+ // LowScore = list.Where(e => e.UniversityName == a).Select(c => c.LowScore).Min(),
+ // LowScoreRank = list.Where(e => e.UniversityName == a).Select(c => c.LowScoreRank).Min()
+ // });
+
+
+ //});
+ //var tt = dsQualification;
+ //await d_QualificationLineRepository.BatchAdd(dsQualification);
+
+ return true;
+ }
+
+
///
/// 更新专业分数线
///
diff --git a/New_College.Services/T_EnrollmentPlanedescServices.cs b/New_College.Services/T_EnrollmentPlanedescServices.cs
index 42d66b9..b8ceb73 100644
--- a/New_College.Services/T_EnrollmentPlanedescServices.cs
+++ b/New_College.Services/T_EnrollmentPlanedescServices.cs
@@ -1598,7 +1598,7 @@ namespace New_College.Services
///
public async Task>> GetBatchByYearArea(YearAreaQuery query)
{
- query.Year = query.Year.HasValue && query.Year > 2023 ? 2023 : query.Year;
+ query.Year = query.Year.HasValue && query.Year > 2024 ? 2024 : query.Year;
Expression> expression = Expressionable.Create()
.And(c => c.IsDelete == false)
.And(c => !c.Batch_name.Contains("提前"))