From b5ce95c5b677b84223463d0c37caa36a0e70d87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Wed, 15 Nov 2023 14:38:13 +0800 Subject: [PATCH] bug fixd --- New_College.Services/D_LongIdMapServices.cs | 74 +++++++++---------- .../D_PlanMajorDescServices.cs | 12 +-- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs index 7f86f46..c2a47e2 100644 --- a/New_College.Services/D_LongIdMapServices.cs +++ b/New_College.Services/D_LongIdMapServices.cs @@ -1658,30 +1658,30 @@ namespace New_College.Services //this.d_PlanMajorScoreLineRepository = d_PlanMajorScoreLineRepository; //this.d_QualificationLineRepository = d_QualificationLineRepository; - var plandesc = await d_PlanMajorDescRepository.Query(c => c.Years == 2021 && c.Location == "山东省"); - var plandescline = await d_PlanMajorScoreLineRepository.Query(c => c.Years == 2021 && c.Location == "山东省"); + var plandesc = await d_PlanMajorDescRepository.Query(c => c.Years == 2023 && c.Location == "山东省"); + var plandescline = await d_PlanMajorScoreLineRepository.Query(c => c.Years == 2022 && c.Location == "山东省"); plandesc.ForEach(async a => { - if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) - { - a.ModifyTime = DateTime.Now; - a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); - a.Remark = a.Remark.Remove(0, 1); - a.Major = a.Major.Split("(")[0]; - await d_PlanMajorDescRepository.Update(a); - } + // if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) + //{ + // a.ModifyTime = DateTime.Now; + // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); + // a.Remark = a.Remark.Remove(0, 1); + // a.Major = a.Major.Split("(")[0]; + // await d_PlanMajorDescRepository.Update(a); + //} - if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) - { - a.ModifyTime = DateTime.Now; - a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); - a.Remark = a.Remark.Remove(0, 1); - a.Major = a.Major.Split("(")[0]; - await d_PlanMajorDescRepository.Update(a); - } + //if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) + //{ + // a.ModifyTime = DateTime.Now; + // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); + // a.Remark = a.Remark.Remove(0, 1); + // a.Major = a.Major.Split("(")[0]; + // await d_PlanMajorDescRepository.Update(a); + //} if (plandescline.Any(e => e.UId == a.UId && e.Major == a.Major && e.Location == a.Location) && a.LowScore <= 0) @@ -1694,27 +1694,27 @@ namespace New_College.Services } }); - plandescline.ForEach(async a => - { + //plandescline.ForEach(async a => + //{ - if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) - { - a.ModifyTime = DateTime.Now; - a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); - a.Remark = a.Remark.Remove(0, 1); - a.Major = a.Major.Split("(")[0]; - await d_PlanMajorDescRepository.Update(a); - } + // if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) + // { + // a.ModifyTime = DateTime.Now; + // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); + // a.Remark = a.Remark.Remove(0, 1); + // a.Major = a.Major.Split("(")[0]; + // await d_PlanMajorDescRepository.Update(a); + // } - if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) - { - a.ModifyTime = DateTime.Now; - a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); - a.Remark = a.Remark.Remove(0, 1); - a.Major = a.Major.Split("(")[0]; - await d_PlanMajorDescRepository.Update(a); - } - }); + // if (!string.IsNullOrEmpty(a.Major) && a.Major.Contains("(") && !string.IsNullOrEmpty(a.SelectSubject)) + // { + // a.ModifyTime = DateTime.Now; + // a.Remark = a.Major.Remove(a.Major.Length - 1, 1).Replace(a.Major.Split("(")[0], ""); + // a.Remark = a.Remark.Remove(0, 1); + // a.Major = a.Major.Split("(")[0]; + // await d_PlanMajorDescRepository.Update(a); + // } + //}); return true; diff --git a/New_College.Services/D_PlanMajorDescServices.cs b/New_College.Services/D_PlanMajorDescServices.cs index 0908db8..461fec4 100644 --- a/New_College.Services/D_PlanMajorDescServices.cs +++ b/New_College.Services/D_PlanMajorDescServices.cs @@ -70,13 +70,13 @@ namespace New_College.Services var query = await _dal.QueryPage(expression, request.PageIndex, request.PageSize, " LowScoreRank desc "); var majorarry = query.data.Select(c => c.Major).Distinct().ToArray(); - var universityarry = query.data.Select(c => c.UId).Distinct().ToArray(); + var universityarry = query.data.Select(c => c.UId).Distinct().ToArray();// Expression> expression2 = Expressionable.Create() .And(c => c.IsDelete == false) .And(c => c.Location == request.Location) .AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(request.Major, c.Major)) - .AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(request.SubjectClaim, c.SelectSubject)) - .AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName)) + // .AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(request.SubjectClaim, c.SelectSubject)) //此条件不带 + .AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName == request.BatchName.Trim()) .AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.AreaName)) .AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType) .AndIF(request.Syl.HasValue && request.Syl == 1, c => c._SYL == "是") @@ -84,7 +84,7 @@ namespace New_College.Services .AndIF(request._985.HasValue && request._985 == 1, c => c._985 == "是") .AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership) .AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature) - .AndIF(majorarry.Any(), c => SqlFunc.ContainsArray(majorarry, c.Major)) + .AndIF(majorarry.Any(), c => SqlFunc.ContainsArray(majorarry, c.Major)) .AndIF(universityarry.Any(), c => SqlFunc.ContainsArray(universityarry, c.UId)) //.AndIF(request. > 0, c => SqlFunc.Between(c.LowScore, request.Score, request.Score)) 位次区间 .ToExpression(); @@ -93,12 +93,12 @@ namespace New_College.Services Major = c.Major, MajorCode = c.MajorCode, UniversityName = c.UniversityName, - UId = c.UId, + UId = c.UId, Years = c.Years, LowScore = c.LowScore, LowScoreRank = c.LowScoreRank, PlanCount = c.PlanCount, - // AcademicYear = c.Years.ToString() + // AcademicYear = c.Years.ToString() }).ToList(); var responselist = query.data.Select(c => new OneSubmitGoResponse()