feat:bug 修复
parent
e94030c99e
commit
b9215c1e01
|
|
@ -695,6 +695,16 @@
|
|||
院校所在城市
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_PlanMajorDescPro.Logo">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_PlanMajorDescPro.Web">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_PlanMajorDescPro.Rank">
|
||||
<summary>
|
||||
排名
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ namespace New_College.Services
|
|||
private readonly ID_PlanMajorScoreLineRepository d_PlanMajorScoreLineRepository;
|
||||
private readonly ID_QualificationLineRepository d_QualificationLineRepository;
|
||||
private readonly ID_PlanMajorDescRepository d_PlanMajorDescRepository;
|
||||
private readonly ID_PlanMajorDescProRepository d_PlanMajorDescProRepository;
|
||||
public D_LongIdMapServices(IBaseRepository<D_LongIdMap> dal
|
||||
, ID_MajorCategoryRepository ID_MajorCategoryRepository
|
||||
, ID_MajorClassRepository ID_MajorClassRepository
|
||||
|
|
@ -77,7 +78,8 @@ namespace New_College.Services
|
|||
ID_PlanMajorDescRepository _PlanMajorDescRepository,
|
||||
ID_PlanMajorScoreLineRepository d_PlanMajorScoreLineRepository,
|
||||
ID_QualificationLineRepository d_QualificationLineRepository,
|
||||
ID_PlanMajorDescRepository d_PlanMajorDescRepository)
|
||||
ID_PlanMajorDescRepository d_PlanMajorDescRepository,
|
||||
ID_PlanMajorDescProRepository d_PlanMajorDescProRepository)
|
||||
{
|
||||
this._dal = dal;
|
||||
d_MajorCategoryRepository = ID_MajorCategoryRepository;
|
||||
|
|
@ -105,6 +107,7 @@ namespace New_College.Services
|
|||
this.d_PlanMajorScoreLineRepository = d_PlanMajorScoreLineRepository;
|
||||
this.d_QualificationLineRepository = d_QualificationLineRepository;
|
||||
this.d_PlanMajorDescRepository = d_PlanMajorDescRepository;
|
||||
this.d_PlanMajorDescProRepository = d_PlanMajorDescProRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -1664,7 +1667,7 @@ namespace New_College.Services
|
|||
public async Task<bool> Import()
|
||||
{
|
||||
// var universitylist = await d_UniversityRepository.Query();
|
||||
// var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2023);
|
||||
var plist = await this._PlanMajorDescRepository.Query(c => c.Location == "山东省" && c.Years == 2021 && c.PlanCount > 0);
|
||||
//universitylist.ForEach(async u =>
|
||||
//{
|
||||
// plist.ForEach(async cc =>
|
||||
|
|
@ -1719,41 +1722,41 @@ namespace New_College.Services
|
|||
//this.d_PlanMajorScoreLineRepository = d_PlanMajorScoreLineRepository;
|
||||
//this.d_QualificationLineRepository = d_QualificationLineRepository;
|
||||
|
||||
var plandesc = await d_PlanMajorDescRepository.Query(c => c.Years == 2023 && c.Location == "山东省");
|
||||
var plandescline = await d_PlanMajorScoreLineRepository.Query(c => c.Years == 2022 && c.Location == "山东省");
|
||||
plandesc.ForEach(async a =>
|
||||
{
|
||||
//var plandesc = await d_PlanMajorDescRepository.Query(c => c.Years == 2023 && c.Location == "山东省");
|
||||
//var plandescline = await d_PlanMajorScoreLineRepository.Query(c => c.Years == 2022 && c.Location == "山东省");
|
||||
//plandesc.ForEach(async a =>
|
||||
//{
|
||||
|
||||
|
||||
// if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject))
|
||||
//{
|
||||
// a.ModifyTime = DateTime.Now;
|
||||
// a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], "");
|
||||
// a.Remark = a.Remark.Remove(0, 1);
|
||||
// a.Major = a.Major.Split("(")[0];
|
||||
// await d_PlanMajorDescRepository.Update(a);
|
||||
//}
|
||||
// // if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject))
|
||||
// //{
|
||||
// // a.ModifyTime = DateTime.Now;
|
||||
// // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], "");
|
||||
// // a.Remark = a.Remark.Remove(0, 1);
|
||||
// // a.Major = a.Major.Split("(")[0];
|
||||
// // await d_PlanMajorDescRepository.Update(a);
|
||||
// //}
|
||||
|
||||
|
||||
//if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject))
|
||||
//{
|
||||
// a.ModifyTime = DateTime.Now;
|
||||
// a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], "");
|
||||
// a.Remark = a.Remark.Remove(0, 1);
|
||||
// a.Major = a.Major.Split("(")[0];
|
||||
// await d_PlanMajorDescRepository.Update(a);
|
||||
//}
|
||||
// //if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject))
|
||||
// //{
|
||||
// // a.ModifyTime = DateTime.Now;
|
||||
// // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], "");
|
||||
// // a.Remark = a.Remark.Remove(0, 1);
|
||||
// // a.Major = a.Major.Split("(")[0];
|
||||
// // await d_PlanMajorDescRepository.Update(a);
|
||||
// //}
|
||||
|
||||
|
||||
if (plandescline.Any(e => e.UId == a.UId && e.Major == a.Major && e.Location == a.Location) && a.LowScore <= 0)
|
||||
{
|
||||
var firstdefault = plandescline.FirstOrDefault(e => e.UId == a.UId && a.Major == e.Major && e.Location == a.Location);
|
||||
a.LowScore = firstdefault.LowScore;
|
||||
a.LowScoreRank = firstdefault.LowScoreRank;
|
||||
a.ModifyTime = DateTime.Now;
|
||||
await d_PlanMajorDescRepository.Update(a);
|
||||
}
|
||||
});
|
||||
// if (plandescline.Any(e => e.UId == a.UId && e.Major == a.Major && e.Location == a.Location) && a.LowScore <= 0)
|
||||
// {
|
||||
// var firstdefault = plandescline.FirstOrDefault(e => e.UId == a.UId && a.Major == e.Major && e.Location == a.Location);
|
||||
// a.LowScore = firstdefault.LowScore;
|
||||
// a.LowScoreRank = firstdefault.LowScoreRank;
|
||||
// a.ModifyTime = DateTime.Now;
|
||||
// await d_PlanMajorDescRepository.Update(a);
|
||||
// }
|
||||
//});
|
||||
|
||||
//plandescline.ForEach(async a =>
|
||||
//{
|
||||
|
|
@ -1776,8 +1779,17 @@ namespace New_College.Services
|
|||
// await d_PlanMajorDescRepository.Update(a);
|
||||
// }
|
||||
//});
|
||||
|
||||
|
||||
var plistpro = await d_PlanMajorDescProRepository.Query(c => c.Location == "山东省" && c.Years == 2023);
|
||||
plist.ForEach(async c =>
|
||||
{
|
||||
if (plistpro.Where(w => w.UId == c.UId && w.Major == c.Major && c.BatchName == w.BatchName && w.Location == "山东省").Any())
|
||||
{
|
||||
var pmodel = plistpro.Where(w => w.UId == c.UId && w.Major == c.Major && c.BatchName == w.BatchName && w.Location == "山东省").FirstOrDefault();
|
||||
pmodel.NewCount = pmodel.PlanCount - c.PlanCount;
|
||||
pmodel.ModifyTime = DateTime.Now;
|
||||
await d_PlanMajorDescProRepository.Update(pmodel);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue