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("提前"))