diff --git a/New_College.Api/Controllers/Back/PlanMajorScoreLineController.cs b/New_College.Api/Controllers/Back/PlanMajorScoreLineController.cs
index b80025a..1e7b641 100644
--- a/New_College.Api/Controllers/Back/PlanMajorScoreLineController.cs
+++ b/New_College.Api/Controllers/Back/PlanMajorScoreLineController.cs
@@ -32,15 +32,19 @@ namespace New_College.Api.Controllers
///
private readonly ID_PlanMajorScoreLineServices _d_PlanMajorScoreLineServices;
private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
+ private readonly ID_UniversityServices _d_UniversityServices;
+ private readonly ID_QualificationLineServices _d_QualificationLineServices;
///
///
///
private readonly ID_ScoreLineServices id_coreLineServices;
- public PlanMajorScoreLineController(ID_PlanMajorScoreLineServices D_PlanMajorScoreLineServices, ID_ScoreLineServices _ScoreLineServices, ID_PlanMajorDescServices d_PlanMajorDescServices)
+ public PlanMajorScoreLineController(ID_PlanMajorScoreLineServices D_PlanMajorScoreLineServices, ID_ScoreLineServices _ScoreLineServices, ID_PlanMajorDescServices d_PlanMajorDescServices, ID_UniversityServices _UniversityServices, ID_QualificationLineServices d_QualificationLineServices)
{
_d_PlanMajorScoreLineServices = D_PlanMajorScoreLineServices;
id_coreLineServices = _ScoreLineServices;
_d_PlanMajorDescServices = d_PlanMajorDescServices;
+ _d_UniversityServices = _UniversityServices;
+ _d_QualificationLineServices = d_QualificationLineServices;
}
@@ -109,7 +113,7 @@ namespace New_College.Api.Controllers
a.SelectSubject = tmpmodel.SelectSubject;
a.UId = tmpmodel.UId;
a.FirstType = tmpmodel.FirstType == null ? "" : tmpmodel.FirstType;
- a.RootType = tmpmodel.RootType==null?"" : tmpmodel.RootType;
+ a.RootType = tmpmodel.RootType == null ? "" : tmpmodel.RootType;
a.PlanCount = tmpmodel.PlanCount;
}
a.BatchName = a.LowScore < 443 ? "普通类二段" : "普通类一段";
@@ -144,6 +148,70 @@ namespace New_College.Api.Controllers
};
}
+
+
+ ///
+ /// 更新院校最低分数
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> UpdateUniversityScoreData(IFormFile file)
+ {
+ var universityinfo = await _d_UniversityServices.Query(w => w.IsDelete == false); //院校信息
+ var planMajorScoreLine = await _d_PlanMajorScoreLineServices.Query(w => w.IsDelete == false && w.Location == "山东省" && w.Years == 2023);//专业分数
+ var qualificationLinelist = await _d_QualificationLineServices.Query(w => w.IsDelete == false && w.Location == "山东省" && w.Years == 2023);//院校分数
+ var mmlist = new List();
+ //先循环所有学校 --然后根据学校找到院校最低分数,再通过分数更新院校数据
+ universityinfo.ForEach(async
+ u =>
+ {
+ var plist = planMajorScoreLine.Where(e => e.UId == u.Id);
+ //if (qualificationLinelist.Where(e => e.UId == u.Id).Any())
+ //{
+ // var tmp = qualificationLinelist.Where(e => e.UId == u.Id).FirstOrDefault();
+
+ if (plist.Any())
+ {
+
+ mmlist.Add(new D_QualificationLine()
+ {
+ LowScore = plist.Min(m => m.LowScore),
+ LowScoreRank = plist.Min(m => m.LowScoreRank),
+ AreaName = u.Area_Name,
+ BatchName = plist.FirstOrDefault().BatchName,
+ CreateTime = plist.FirstOrDefault().CreateTime,
+ EducationType = u.Subject_Level == 0 ? "本科" : "专科",
+ Location = "山东省",
+ IsDelete = false,
+ ModifyTime = plist.FirstOrDefault().ModifyTime,
+ Nature = u.Nature == 0 ? "公办" : u.Nature == 1 ? "民办" : u.Nature == 2 ? "中外合作办学" : "港澳台",
+ Ownership = u.Ascription == 1 ? "教育部" : u.Ascription == 2 ? "省政府" : u.Ascription == 3 ? "其他部委" : "军校",
+ RecruitCode = int.Parse(u.UniversityCode),
+ OrderSort = 1,
+ UniversityName = u.Name,
+ SubjectType = "综合",
+ RecruitType = u.Nature <= 1 ? "普通类" : u.Nature == 2 ? "中外合作办学" : "普通类",
+ UId = u.Id,
+ Years = plist.FirstOrDefault().Years,
+ _211 = u.Sff == 1 ? "是" : "否",
+ _985 = u.Nhef == 1 ? "是" : "否",
+ _SYL = u.Syl == 1 ? "是" : "否",
+ });
+ }
+ //await _d_QualificationLineServices.Add(tmp);
+ //}
+ });
+ await _d_QualificationLineServices.Add(mmlist);
+ return new MessageModel()
+ {
+ status = 200,
+ success = true,
+ response = true,
+
+ };
+ }
+
///
/// 获取学校专业分数线
///
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index a0a0689..3e0920b 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -175,6 +175,13 @@
+
+
+ 更新院校最低分数
+
+
+
+
获取学校专业分数线