bug fixed

develop
old易 2023-10-08 17:07:08 +08:00
parent 45dc30b0dd
commit 8a3dab4dcd
2 changed files with 6 additions and 6 deletions

View File

@ -45,8 +45,8 @@ namespace New_College.Api.Controllers.Front
try
{
Expression<Func<SubjectSelection, bool>> exp = Expressionable.Create<SubjectSelection>() //创建表达式
.AndIF(!string.IsNullOrEmpty(request.UniversityName), w => JsonConvert.DeserializeObject<List<string>>(request.UniversityName).Contains(w.UniversityName))
.AndIF(!string.IsNullOrEmpty(request.MajorName), w => JsonConvert.DeserializeObject<List<string>>(request.MajorName).Contains(w.MajorName))
.AndIF(!string.IsNullOrEmpty(request.UniversityName), w => SqlFunc.ContainsArray(JsonConvert.DeserializeObject<List<string>>(request.UniversityName), w.UniversityName))
.AndIF(!string.IsNullOrEmpty(request.MajorName), w => SqlFunc.ContainsArray(JsonConvert.DeserializeObject<List<string>>(request.MajorName), w.MajorName))
.AndIF(!string.IsNullOrWhiteSpace(request.Location), w => w.Equals(request.Location))
.AndIF(request.Years > 0, w => w.Year == request.Years)
.ToExpression();//注意 这一句 不能少

View File

@ -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<NewPlanDescList>() { };
// 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<NewPlanDescList> list = new List<NewPlanDescList>() { };
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;