diff --git a/New_College.Api/Controllers/Front/FrontSelectionController.cs b/New_College.Api/Controllers/Front/FrontSelectionController.cs index e9f0e45..198ce63 100644 --- a/New_College.Api/Controllers/Front/FrontSelectionController.cs +++ b/New_College.Api/Controllers/Front/FrontSelectionController.cs @@ -45,8 +45,8 @@ namespace New_College.Api.Controllers.Front try { Expression> exp = Expressionable.Create() //创建表达式 - .AndIF(!string.IsNullOrEmpty(request.UniversityName), w => JsonConvert.DeserializeObject>(request.UniversityName).Contains(w.UniversityName)) - .AndIF(!string.IsNullOrEmpty(request.MajorName), w => JsonConvert.DeserializeObject>(request.MajorName).Contains(w.MajorName)) + .AndIF(!string.IsNullOrEmpty(request.UniversityName), w => SqlFunc.ContainsArray(JsonConvert.DeserializeObject>(request.UniversityName), w.UniversityName)) + .AndIF(!string.IsNullOrEmpty(request.MajorName), w => SqlFunc.ContainsArray(JsonConvert.DeserializeObject>(request.MajorName), w.MajorName)) .AndIF(!string.IsNullOrWhiteSpace(request.Location), w => w.Equals(request.Location)) .AndIF(request.Years > 0, w => w.Year == request.Years) .ToExpression();//注意 这一句 不能少 diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index 66c4af0..98c9c9b 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -758,11 +758,11 @@ namespace New_College.Services { //var check = await t_EnrollmentBatchRepository.Query(x => x.Type == query.Type && x.Year == query.Year && x.Batch_name == query.BatchName && x.AreaName == query.AreaName); //if (check.Count <= 0) - var check = await d_PlanMajorDescRepository.Query(x => x.Years == query.Year && x.BatchName == query.BatchName && x.Location == query.AreaName.Replace("省", "")); + var check = await d_PlanMajorDescRepository.Query(x => x.Years == query.Year && x.BatchName == query.BatchName && x.Location == query.AreaName); if (check.Count <= 0) return new List() { }; // var batchid = check.Select(x => x.Id)?.FirstOrDefault(); - var info = await d_PlanMajorDescRepository.Query(x => x.UId == query.UnviersityId && x.BatchName == query.BatchName); + var info = await d_PlanMajorDescRepository.Query(x => x.UId == query.UnviersityId && x.BatchName == query.BatchName && x.Years == query.Year && x.Location == query.AreaName); List list = new List() { }; foreach (var item in info) { @@ -773,7 +773,7 @@ namespace New_College.Services SelectSubject = item.SelectSubject, Money = string.IsNullOrWhiteSpace(item.Free) || item.Free == "0" || item.Free == "待定" ? "--" : item.Free, PlanNum = item.PlanCount, - // Scoreline = item.Scoreline == 0 || string.IsNullOrWhiteSpace(item.Scoreline.ToString()) ? "--" : item.Scoreline.ToString() + Scoreline = item.LowScore == 0 || string.IsNullOrWhiteSpace(item.LowScore.ToString()) ? "--" : item.LowScore.ToString() }); } return list; @@ -1655,7 +1655,7 @@ namespace New_College.Services { if (plandescline.Any(e => e.UId == a.UId && e.Major == a.Major && e.Location == a.Location)) { - var firstdefault = plandescline.FirstOrDefault(e => e.UId == a.UId && a.Major== e.Major && e.Location == a.Location); + 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;