bug fixed

develop
old易 2024-07-10 15:15:13 +08:00
parent 128b2ff4d3
commit c6b52dab7d
4 changed files with 128 additions and 117 deletions

View File

@ -72,13 +72,13 @@ namespace New_College.Controllers
//更新院校分数线
// await d_LongIdMapServices.UpdateSchoolScoreLine23("河南省","理科");
// await d_LongIdMapServices.PlanNeedProSync("上海市", 2024, "综合", "本科");
// await d_LongIdMapServices.PlanNeedProSync("山东省", 2024, "综合", "普通类二段");
//await d_LongIdMapServices.SyncnewNeedProSData("上海市", 2024, "综合", "本科");
await d_LongIdMapServices.SyncnewNeedProSData("山东省", 2024, "综合", "普通类二段");
// await v_CustomerInfoServices.CustomeBillExport();
await d_LongIdMapServices.UpdatePlanProInf("上海市");
//await d_LongIdMapServices.UpdatePlanProInf("山东省");
return true;

View File

@ -254,8 +254,14 @@ namespace New_College.Repository
{
sqlstr.AppendFormat(" and (_23subject like'%{0}%' or _23subject like'%{1}%' or _23subject like'%{2}%' or _23subject like'%{3}%' )", claim01, claim02, claim03, "不限");
}
if (query.BatchName == "普通类二段" || query.BatchName.Contains("专科"))
{
sqlstr.AppendLine(" or _23Score <=0 and EducationCategory='专科' order by _23ScoreLine ");
}
else
{
sqlstr.Append("and _23ScoreLine>0 order by _23ScoreLine ");
}
var recommendInfo = await this.Db.SqlQueryable<TbSNeedDataInfoViewDto>(sqlstr.ToString()).ToListAsync();

View File

@ -2484,7 +2484,7 @@ namespace New_College.Services
public async Task<bool> UpdatePlanProInf(string Location)
{
var tbinfo = await t_TbSNeedDataInfoRepository.Query(e => e.Location == Location);
//var tbinfo = await t_TbSNeedDataInfoRepository.Query(e => e.Location == Location);
var universitylist = await d_UniversityRepository.Query(e => e.IsDelete == false);
// var majorlist = await d_MajorRepository.Query(e => e.Type == 2 && e.IsDelete == false);
@ -2525,9 +2525,9 @@ namespace New_College.Services
// var tbsdinfo = await t_TbSNeedDataInfoRepository.Query(e => e.Location == "山东省");
//var pronew = await d_PlanMajorDescProRepository.Query(e => e.IsDelete == false && e.Location == Location && e.Years == 2024 && e.BatchName == "本科");
// var majorlist = await d_PlanMajorScoreLineRepository.Query(e => e.Location == Location);
tbinfo.ForEach(o =>
{
//if (majorlist.Any(e => e.Major == o.MajorName && e.UniversityName == o.UniversityName))
//tbinfo.ForEach(o =>
//{
// //if (majorlist.Any(e => e.Major == o.MajorName && e.UniversityName == o.UniversityName))
//{
// if (o._21Score == "0")
// {
@ -2584,34 +2584,34 @@ namespace New_College.Services
//o.VRUrl = tbsdinfo.Where(a => a.UniversityName == o.UniversityName).FirstOrDefault().VRUrl;
// }
if (universitylist.Any(e => e.Name == o.UniversityName))
{
// if (universitylist.Any(e => e.Name == o.UniversityName))
// {
if (string.IsNullOrWhiteSpace(o.LnstitutionalLevel))
{
string str = string.Empty;
if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Nhef > 0)
{
str += "985/";
}
if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Sff > 0)
{
str += "211/";
}
if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Syl > 0)
{
str += "双一流/";
}
if (str.Contains("985") && str.Contains("211"))
{
str += "保研资格/";
}
o.LnstitutionalLevel = str;
}
}
// if (string.IsNullOrWhiteSpace(o.LnstitutionalLevel))
// {
// string str = string.Empty;
// if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Nhef > 0)
// {
// str += "985/";
// }
// if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Sff > 0)
// {
// str += "211/";
// }
// if (universitylist.Where(e => e.Name == o.UniversityName).FirstOrDefault().Syl > 0)
// {
// str += "双一流/";
// }
// if (str.Contains("985") && str.Contains("211"))
// {
// str += "保研资格/";
// }
// o.LnstitutionalLevel = str;
// }
// }
});
await t_TbSNeedDataInfoRepository.BatchUpdate(tbinfo);
//});
// await t_TbSNeedDataInfoRepository.BatchUpdate(tbinfo);
#endregion
@ -2650,38 +2650,38 @@ namespace New_College.Services
#region 更新专业计划信息
//var plist = await this.d_PlanMajorDescProRepository.Query(c => c.Location == "上海市" && c.Years == 2024 && c.IsDelete == false);
//// var plist = await this.d_PlanMajorDescProRepository.Query(c => c.Location == "河南省" && c.Years == 2024 && c.IsDelete == false);
//plist.ForEach(p =>
var plist = await this.d_PlanMajorDescProRepository.Query(c => c.Location == "山东省" && c.Years == 2024 && c.IsDelete == false && c.Id >= 3407221);
plist.ForEach(p =>
{
//var newmodel = tbinfo.Where(e => (e.EnrollmentCode == p.EnrollmentCode || e.UniversityName == p.UniversityName) && e.MajorCode == p.MajorCode).FirstOrDefault();
//if (newmodel != null)
//{
// //var newmodel = tbinfo.Where(e => (e.EnrollmentCode == p.EnrollmentCode || e.UniversityName == p.UniversityName) && e.MajorCode == p.MajorCode).FirstOrDefault();
// //if (newmodel != null)
// //{
// var universitymodel = universitylist.Where(e => e.Id == p.UId).FirstOrDefault();
// if (universitymodel != null)
// {
// p.CityName = universitymodel.Area_Name;
// p.EducationCategory = universitymodel.Subject_Level == 0 ? "本科" : "专科";
// p.EnrollmentCode = universitymodel.UniversityCode;
// // p.EnrollmentType = newmodel.EnrollmentType;
// //p.SchoolType=newmodel.sch
// //p.FirstType = universitymodel.FirstType;
// p.Nature = universitymodel.Nature == 0 ? "公办" : universitymodel.Nature == 1 ? "民办" : universitymodel.Nature == 2 ? "中外合作办学" : universitymodel.Nature == 3 ? "港澳台" : "独立学院";
// p.AreaName = universitymodel.Area_Name;
// p.Ownership = universitymodel.AscriptionName;
// p.Web = universitymodel.Web;
// p.Logo = universitymodel.Logo;
// p._985 = universitymodel.Nhef == 1 ? "是" : "否";
// p._211 = universitymodel.Sff == 1 ? "是" : "否";
// p._SYL = universitymodel.Syl == 1 ? "是" : "否";
// p.Rank = (universitymodel.Rank == 0 || universitymodel.Rank == 9999) ? "--" : universitymodel.Rank.ToString();
// //p.NewCount = int.Parse(newmodel._23Count) - int.Parse(newmodel._22Count);
// //p.PlanCount = int.Parse(newmodel._23Count);
// //p.LowScore = int.Parse(newmodel._23Score);
// //p.LowScoreRank = int.Parse(newmodel._23ScoreLine);
// }
//});
var universitymodel = universitylist.Where(e => e.Id == p.UId).FirstOrDefault();
if (universitymodel != null)
{
p.CityName = universitymodel.Area_Name;
p.EducationCategory = universitymodel.Subject_Level == 0 ? "本科" : "专科";
p.EnrollmentCode = universitymodel.UniversityCode;
// p.EnrollmentType = newmodel.EnrollmentType;
//p.SchoolType=newmodel.sch
//p.FirstType = universitymodel.FirstType;
p.Nature = universitymodel.Nature == 0 ? "公办" : universitymodel.Nature == 1 ? "民办" : universitymodel.Nature == 2 ? "中外合作办学" : universitymodel.Nature == 3 ? "港澳台" : "独立学院";
p.AreaName = universitymodel.Area_Name;
p.Ownership = universitymodel.AscriptionName;
p.Web = universitymodel.Web;
p.Logo = universitymodel.Logo;
p._985 = universitymodel.Nhef == 1 ? "是" : "否";
p._211 = universitymodel.Sff == 1 ? "是" : "否";
p._SYL = universitymodel.Syl == 1 ? "是" : "否";
p.Rank = (universitymodel.Rank == 0 || universitymodel.Rank == 9999) ? "--" : universitymodel.Rank.ToString();
//p.NewCount = int.Parse(newmodel._23Count) - int.Parse(newmodel._22Count);
//p.PlanCount = int.Parse(newmodel._23Count);
//p.LowScore = int.Parse(newmodel._23Score);
//p.LowScoreRank = int.Parse(newmodel._23ScoreLine);
}
});
//await this.d_PlanMajorDescProRepository.Batchupdate(plist);
await this.d_PlanMajorDescProRepository.Batchupdate(plist);
#endregion
#region 更新专业分数先选科数据

View File

@ -96,12 +96,17 @@ namespace New_College.Services
sbsql.AppendFormat(" and '{0}' like '%Nature%'", request.Nature);
}
if (request.EndScore > request.StartScore)
{
sbsql.AppendFormat(" and (_23Score BETWEEN {0} and {1})", request.Score - 60, request.Score + 15);
int start = request.Score - 60;
if (request.BatchName == "普通类二段" || request.BatchName.Contains("专科"))
{ start = request.Score - 100; }
sbsql.AppendFormat(" and (_23Score BETWEEN {0} and {1})", start, request.Score + 15);
}
if (request.BatchName == "普通类二段" || request.BatchName.Contains("专科"))
{
sbsql.AppendLine(" or _23Score <=0 and EducationCategory='专科'");
}
var list = await _dal.QuerySql(sbsql.ToString());
return list;
}