---bug --fix-
parent
21cb31bb41
commit
a097d19090
|
|
@ -1738,51 +1738,58 @@ namespace New_College.Services
|
||||||
List<int> PlanIds = new List<int>() { };
|
List<int> PlanIds = new List<int>() { };
|
||||||
foreach (var item in planstringids)
|
foreach (var item in planstringids)
|
||||||
{
|
{
|
||||||
var newids = item.Split(",").Select(x => int.Parse(x)).ToList();
|
if (!string.IsNullOrWhiteSpace(item))
|
||||||
PlanIds.AddRange(newids);
|
{
|
||||||
|
var newids = item.Split(",").Select(x => int.Parse(x)).ToList();
|
||||||
|
PlanIds.AddRange(newids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var descinfo = await _dal.Query(x => x.IsDelete == false && PlanIds.Contains(x.Id));
|
var descinfo = await _dal.Query(x => x.IsDelete == false && PlanIds.Contains(x.Id));
|
||||||
foreach (var item in info)
|
foreach (var item in info)
|
||||||
{
|
{
|
||||||
var planids = item.PlanMajorIds.Split(",").Select(x => int.Parse(x)).ToList();
|
if (!string.IsNullOrWhiteSpace(item.PlanMajorIds))
|
||||||
|
{
|
||||||
|
var planids = item.PlanMajorIds.Split(",").Select(x => int.Parse(x)).ToList();
|
||||||
var nowdesc = descinfo.Where(x => planids.Contains(x.Id)).ToList();
|
var nowdesc = descinfo.Where(x => planids.Contains(x.Id)).ToList();
|
||||||
if (nowdesc.Count <= 0)
|
if (nowdesc.Count <= 0)
|
||||||
continue;
|
continue;
|
||||||
//此处处理针对于霍兰德推荐的具有相同学校的案例
|
//此处处理针对于霍兰德推荐的具有相同学校的案例
|
||||||
var count = list.Where(x => x.UniversityName == item.UniversityName).ToList();
|
var count = list.Where(x => x.UniversityName == item.UniversityName).ToList();
|
||||||
if (count.Count > 0)
|
if (count.Count > 0)
|
||||||
{
|
|
||||||
var newinfos = nowdesc.Select(x => new PlanInfo()
|
|
||||||
{
|
{
|
||||||
Money = x.Tuitionfee,
|
var newinfos = nowdesc.Select(x => new PlanInfo()
|
||||||
Year = x.Studyyears == null ? "-" : x.Studyyears == "" ? "-" : x.Studyyears,
|
|
||||||
PlanName = x.MajorName,
|
|
||||||
PlanNum = x.Plancount,
|
|
||||||
Scoreline = x.Scoreline
|
|
||||||
}).ToList();
|
|
||||||
count.FirstOrDefault().Infos.AddRange(newinfos);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
string yearname = string.Empty;
|
|
||||||
if (query.CustomerId.HasValue)
|
|
||||||
{
|
|
||||||
yearname = (await this._CustomerInfoRepository.QueryById(query.CustomerId)).Year.ToString();
|
|
||||||
}
|
|
||||||
list.Add(new VolunteerTableResult()
|
|
||||||
{
|
|
||||||
UniversityName = item.UniversityName,
|
|
||||||
|
|
||||||
Infos = nowdesc.Select(x => new PlanInfo()
|
|
||||||
{
|
{
|
||||||
Money = x.Tuitionfee,
|
Money = x.Tuitionfee,
|
||||||
Year = x.Studyyears == null ? "-" : x.Studyyears == "" ? "-" : x.Studyyears,
|
Year = x.Studyyears == null ? "-" : x.Studyyears == "" ? "-" : x.Studyyears,
|
||||||
YearName = yearname,
|
|
||||||
PlanName = x.MajorName,
|
PlanName = x.MajorName,
|
||||||
PlanNum = x.Plancount,
|
PlanNum = x.Plancount,
|
||||||
Scoreline = x.Scoreline
|
Scoreline = x.Scoreline
|
||||||
}).ToList()
|
}).ToList();
|
||||||
});
|
count.FirstOrDefault().Infos.AddRange(newinfos);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string yearname = string.Empty;
|
||||||
|
if (query.CustomerId.HasValue)
|
||||||
|
{
|
||||||
|
yearname = (await this._CustomerInfoRepository.QueryById(query.CustomerId)).Year.ToString();
|
||||||
|
}
|
||||||
|
list.Add(new VolunteerTableResult()
|
||||||
|
{
|
||||||
|
UniversityName = item.UniversityName,
|
||||||
|
|
||||||
|
Infos = nowdesc.Select(x => new PlanInfo()
|
||||||
|
{
|
||||||
|
Money = x.Tuitionfee,
|
||||||
|
Year = x.Studyyears == null ? "-" : x.Studyyears == "" ? "-" : x.Studyyears,
|
||||||
|
YearName = yearname,
|
||||||
|
PlanName = x.MajorName,
|
||||||
|
PlanNum = x.Plancount,
|
||||||
|
Scoreline = x.Scoreline
|
||||||
|
}).ToList()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1871,9 +1878,11 @@ namespace New_College.Services
|
||||||
var id = 0;
|
var id = 0;
|
||||||
foreach (var item in query.details)
|
foreach (var item in query.details)
|
||||||
{
|
{
|
||||||
|
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
||||||
PlanIds.AddRange(item.PlanMagorIds);
|
{
|
||||||
id = item.PlanMagorIds.First();
|
PlanIds.AddRange(item.PlanMagorIds);
|
||||||
|
id = item.PlanMagorIds.First();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
string yearName = string.Empty;
|
string yearName = string.Empty;
|
||||||
var plandescmodels = await this.t_EnrollmentPlanedesc.QueryById(id);
|
var plandescmodels = await this.t_EnrollmentPlanedesc.QueryById(id);
|
||||||
|
|
@ -1888,51 +1897,55 @@ namespace New_College.Services
|
||||||
var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc");
|
var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc");
|
||||||
foreach (var item in query.details)
|
foreach (var item in query.details)
|
||||||
{
|
{
|
||||||
var nowdesc = descinfo.Where(x => item.PlanMagorIds.Contains(x.Id)).ToList();
|
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
||||||
if (nowdesc.Count <= 0)
|
|
||||||
continue;
|
|
||||||
var nowuniversityinfo = universityinfo.Where(x => x.Id == item.UniversityId).FirstOrDefault();
|
|
||||||
if (nowuniversityinfo == null)
|
|
||||||
continue;
|
|
||||||
//此处处理针对于霍兰德推荐的具有相同学校的案例
|
|
||||||
var count = list.Where(x => x.UniversityName == item.UniversityName).ToList();
|
|
||||||
if (count.Count > 0)
|
|
||||||
{
|
{
|
||||||
var newinfos = nowdesc.Select(x => new PlanInfo()
|
|
||||||
|
var nowdesc = descinfo.Where(x => item.PlanMagorIds.Contains(x.Id)).ToList();
|
||||||
|
if (nowdesc.Count <= 0)
|
||||||
|
continue;
|
||||||
|
var nowuniversityinfo = universityinfo.Where(x => x.Id == item.UniversityId).FirstOrDefault();
|
||||||
|
if (nowuniversityinfo == null)
|
||||||
|
continue;
|
||||||
|
//此处处理针对于霍兰德推荐的具有相同学校的案例
|
||||||
|
var count = list.Where(x => x.UniversityName == item.UniversityName).ToList();
|
||||||
|
if (count.Count > 0)
|
||||||
{
|
{
|
||||||
MajorId = x.Id,
|
var newinfos = nowdesc.Select(x => new PlanInfo()
|
||||||
Money = x.Tuitionfee,
|
|
||||||
Year = x.Studyyears,
|
|
||||||
PlanName = x.MajorName,
|
|
||||||
PlanNum = x.Plancount,
|
|
||||||
Scoreline = x.Scoreline
|
|
||||||
}).ToList();
|
|
||||||
count.FirstOrDefault().Infos.AddRange(newinfos);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list.Add(new SimuVolunteerTableResult()
|
|
||||||
{
|
|
||||||
Logo = nowuniversityinfo.Logo,
|
|
||||||
Nhef = nowuniversityinfo.Nhef > 0,
|
|
||||||
Rank = nowuniversityinfo.Rank,
|
|
||||||
Sff = nowuniversityinfo.Sff > 0,
|
|
||||||
Syl = nowuniversityinfo.Syl > 0,
|
|
||||||
UniversityId = item.UniversityId,
|
|
||||||
UniversityName = item.UniversityName,
|
|
||||||
Province = nowuniversityinfo.Area_Name,
|
|
||||||
Nature = nowuniversityinfo.Nature,
|
|
||||||
Infos = nowdesc.Select(x => new PlanInfo()
|
|
||||||
{
|
{
|
||||||
MajorId = x.Id,
|
MajorId = x.Id,
|
||||||
Money = x.Tuitionfee,
|
Money = x.Tuitionfee,
|
||||||
Year = x.Studyyears,
|
Year = x.Studyyears,
|
||||||
PlanName = x.MajorName,
|
PlanName = x.MajorName,
|
||||||
PlanNum = x.Plancount,
|
PlanNum = x.Plancount,
|
||||||
Scoreline = x.Scoreline,
|
Scoreline = x.Scoreline
|
||||||
YearName = yearName
|
}).ToList();
|
||||||
}).ToList()
|
count.FirstOrDefault().Infos.AddRange(newinfos);
|
||||||
});
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list.Add(new SimuVolunteerTableResult()
|
||||||
|
{
|
||||||
|
Logo = nowuniversityinfo.Logo,
|
||||||
|
Nhef = nowuniversityinfo.Nhef > 0,
|
||||||
|
Rank = nowuniversityinfo.Rank,
|
||||||
|
Sff = nowuniversityinfo.Sff > 0,
|
||||||
|
Syl = nowuniversityinfo.Syl > 0,
|
||||||
|
UniversityId = item.UniversityId,
|
||||||
|
UniversityName = item.UniversityName,
|
||||||
|
Province = nowuniversityinfo.Area_Name,
|
||||||
|
Nature = nowuniversityinfo.Nature,
|
||||||
|
Infos = nowdesc.Select(x => new PlanInfo()
|
||||||
|
{
|
||||||
|
MajorId = x.Id,
|
||||||
|
Money = x.Tuitionfee,
|
||||||
|
Year = x.Studyyears,
|
||||||
|
PlanName = x.MajorName,
|
||||||
|
PlanNum = x.Plancount,
|
||||||
|
Scoreline = x.Scoreline,
|
||||||
|
YearName = yearName
|
||||||
|
}).ToList()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new MessageModel<List<SimuVolunteerTableResult>>() { success = true, msg = "获取成功", response = list };
|
return new MessageModel<List<SimuVolunteerTableResult>>() { success = true, msg = "获取成功", response = list };
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue