bug fixed
parent
18160b0c07
commit
e9a734c0c6
|
|
@ -32,15 +32,19 @@ namespace New_College.Api.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ID_PlanMajorScoreLineServices _d_PlanMajorScoreLineServices;
|
private readonly ID_PlanMajorScoreLineServices _d_PlanMajorScoreLineServices;
|
||||||
private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
|
private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
|
||||||
|
private readonly ID_UniversityServices _d_UniversityServices;
|
||||||
|
private readonly ID_QualificationLineServices _d_QualificationLineServices;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly ID_ScoreLineServices id_coreLineServices;
|
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;
|
_d_PlanMajorScoreLineServices = D_PlanMajorScoreLineServices;
|
||||||
id_coreLineServices = _ScoreLineServices;
|
id_coreLineServices = _ScoreLineServices;
|
||||||
_d_PlanMajorDescServices = d_PlanMajorDescServices;
|
_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.SelectSubject = tmpmodel.SelectSubject;
|
||||||
a.UId = tmpmodel.UId;
|
a.UId = tmpmodel.UId;
|
||||||
a.FirstType = tmpmodel.FirstType == null ? "" : tmpmodel.FirstType;
|
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.PlanCount = tmpmodel.PlanCount;
|
||||||
}
|
}
|
||||||
a.BatchName = a.LowScore < 443 ? "普通类二段" : "普通类一段";
|
a.BatchName = a.LowScore < 443 ? "普通类二段" : "普通类一段";
|
||||||
|
|
@ -144,6 +148,70 @@ namespace New_College.Api.Controllers
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新院校最低分数
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="file"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<MessageModel<bool>> 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<D_QualificationLine>();
|
||||||
|
//先循环所有学校 --然后根据学校找到院校最低分数,再通过分数更新院校数据
|
||||||
|
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<bool>()
|
||||||
|
{
|
||||||
|
status = 200,
|
||||||
|
success = true,
|
||||||
|
response = true,
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取学校专业分数线
|
/// 获取学校专业分数线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,13 @@
|
||||||
<param name="file"></param>
|
<param name="file"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.PlanMajorScoreLineController.UpdateUniversityScoreData(Microsoft.AspNetCore.Http.IFormFile)">
|
||||||
|
<summary>
|
||||||
|
更新院校最低分数
|
||||||
|
</summary>
|
||||||
|
<param name="file"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:New_College.Api.Controllers.PlanMajorScoreLineController.Get(New_College.Model.ViewModels.PlanMajorScoreLineRequest)">
|
<member name="M:New_College.Api.Controllers.PlanMajorScoreLineController.Get(New_College.Model.ViewModels.PlanMajorScoreLineRequest)">
|
||||||
<summary>
|
<summary>
|
||||||
获取学校专业分数线
|
获取学校专业分数线
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue