调整更新数据代码
parent
1c6c8536c0
commit
c3afc5b0f0
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -906,6 +906,13 @@
|
|||
<param name="query"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:New_College.Api.Controllers.Front.VipController.OpenBindCardInfo(New_College.Model.ViewModels.OpenVipCardRequest)">
|
||||
<summary>
|
||||
开放绑卡
|
||||
</summary>
|
||||
<param name="query"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:New_College.Api.Controllers.Front.VipController.GetVipInfo(New_College.Model.ViewModels.IdQuery)">
|
||||
<summary>
|
||||
获取vip信息 传用户Id
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ namespace New_College.IServices
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<bool> UpdatePlanScoreLine();
|
||||
Task<bool> UpdateSchoolScoreLine23();
|
||||
Task<bool> UpdatePlanProInf();
|
||||
Task<bool> Import();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,5 +21,12 @@ namespace New_College.Repository
|
|||
var kk = await this.Db.Fastest<D_PlanMajorScoreLine>().PageSize(50000).BulkCopyAsync(majorScoreLines);
|
||||
return kk > 0;
|
||||
}
|
||||
|
||||
public async Task<bool> BatchUpdate(List<D_PlanMajorScoreLine> majorScoreLines)
|
||||
{
|
||||
var kk = await this.Db.Fastest<D_PlanMajorScoreLine>().BulkUpdateAsync(majorScoreLines);
|
||||
return kk > 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -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<bool> BatchAdd(List<D_QualificationLine> d_Qualifications)
|
||||
{
|
||||
var kk = await this.Db.Fastest<D_QualificationLine>().PageSize(50000).BulkCopyAsync(d_Qualifications);
|
||||
return kk > 0;
|
||||
}
|
||||
|
||||
public async Task<bool> BatchUpdate(List<D_QualificationLine> d_Qualifications)
|
||||
{
|
||||
var kk = await this.Db.Fastest<D_QualificationLine>().BulkUpdateAsync(d_Qualifications);
|
||||
return kk > 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,6 @@ namespace New_College.IRepository
|
|||
/// </summary>
|
||||
public interface ID_PlanMajorDescRepository : IBaseRepository<D_PlanMajorDesc>
|
||||
{
|
||||
/// <summary>
|
||||
/// 批量更新数据
|
||||
/// </summary>
|
||||
/// <param name="majorDescs"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> Batchupdate(List<D_PlanMajorDesc> majorDescs);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,5 +11,7 @@ namespace New_College.IRepository
|
|||
public interface ID_PlanMajorScoreLineRepository : IBaseRepository<D_PlanMajorScoreLine>
|
||||
{
|
||||
Task<bool> BatchAdd(List<D_PlanMajorScoreLine> majorScoreLines);
|
||||
|
||||
Task<bool> BatchUpdate(List<D_PlanMajorScoreLine> majorScoreLines);
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
|||
/// </summary>
|
||||
public interface ID_QualificationLineRepository : IBaseRepository<D_QualificationLine>
|
||||
{
|
||||
|
||||
Task<bool> BatchAdd(List<D_QualificationLine> d_Qualifications);
|
||||
Task<bool> BatchUpdate(List<D_QualificationLine> d_Qualifications);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1925,6 +1925,68 @@ namespace New_College.Services
|
|||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UpdateSchoolScoreLine23()
|
||||
{
|
||||
|
||||
var dsQualification = new List<D_QualificationLine>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 更新专业分数线
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1598,7 +1598,7 @@ namespace New_College.Services
|
|||
/// <returns></returns>
|
||||
public async Task<MessageModel<List<IdNameResult>>> 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<Func<T_EnrollmentBatch, bool>> expression = Expressionable.Create<T_EnrollmentBatch>()
|
||||
.And(c => c.IsDelete == false)
|
||||
.And(c => !c.Batch_name.Contains("提前"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue