diff --git a/New_College.Api/Controllers/Front/NewsInfoController.cs b/New_College.Api/Controllers/Front/NewsInfoController.cs index c981336..8cc554e 100644 --- a/New_College.Api/Controllers/Front/NewsInfoController.cs +++ b/New_College.Api/Controllers/Front/NewsInfoController.cs @@ -106,9 +106,14 @@ namespace New_College.Api.Controllers.Front CoverImg = s.CoverImg, CreateTime = s.CreateTime.Value, Id = s.Id, - Summary = !string.IsNullOrWhiteSpace(s.Summary)?s.Summary:s.Detail.Substring(0,200)+"...", + Summary = !string.IsNullOrWhiteSpace(s.Summary) ? s.Summary : s.Detail.Substring(0, 200) + "...", Title = s.Title }).ToList(); + pageresponse.pageCount = pageinfo.data.Count; + pageresponse.page = pageinfo.data.Count; + pageresponse.dataCount = pageinfo.data.Count; + pageresponse.PageSize = pageinfo.PageSize; + pageresponse.pageCount = pageinfo.pageCount; } return new MessageModel>() { diff --git a/New_College.Api/Controllers/Front/PcVolunteerController.cs b/New_College.Api/Controllers/Front/PcVolunteerController.cs index 2a3af67..826ec46 100644 --- a/New_College.Api/Controllers/Front/PcVolunteerController.cs +++ b/New_College.Api/Controllers/Front/PcVolunteerController.cs @@ -13,6 +13,8 @@ using System.Linq.Expressions; using New_College.IRepository.UnitOfWork; using New_College.Repository.UnitOfWork; using SqlSugar; +using New_College.Common; +using Microsoft.AspNetCore.Authorization; namespace New_College.Api.Controllers.Front { @@ -148,7 +150,7 @@ namespace New_College.Api.Controllers.Front SubjectClam = c.SelectSubject, PlanItems = planmajorcomplist.Where(ee => ee.UId == s.UniversityId && ee.Major == c.Major).Select(tt => new PlanItem() { - Count = (tt.PlanCount==0?"--": tt.PlanCount.ToString()), + Count = (tt.PlanCount == 0 ? "--" : tt.PlanCount.ToString()), PlanCount = tt.PlanCount, RankLine = tt.LowScoreRank, Scoreline = tt.LowScore, @@ -158,7 +160,7 @@ namespace New_College.Api.Controllers.Front UniversityId = s.UniversityId, UniversityName = s.UniversityName, UniversityCode = s.UniversityCode, - Sort= s.OrderSort, + Sort = s.OrderSort, _211 = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._211, _985 = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._985, _SYL = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._SYL, @@ -167,7 +169,7 @@ namespace New_College.Api.Controllers.Front tableDetailItemsViews.Add(uitem); }); - view.tableDetailItemsViews=tableDetailItemsViews; + view.tableDetailItemsViews = tableDetailItemsViews; return new MessageModel() { msg = "获取成功", @@ -195,7 +197,7 @@ namespace New_College.Api.Controllers.Front msg = "用户Id" }; } - + var data = new MessageModel(); int ordersort = 0; if (string.IsNullOrWhiteSpace(request.VolunteerTableName)) @@ -203,8 +205,8 @@ namespace New_College.Api.Controllers.Front var vol = (await _VolunteerTableServices.Query(c => c.CustomerId == request.CustomerId)); if (vol.Any()) { - request.VolunteerTableName = "我的志愿表" + vol.OrderByDescending(c=>c.CreateTime).FirstOrDefault().OrderSort + 1; - ordersort = vol.OrderByDescending(c => c.CreateTime).FirstOrDefault().OrderSort + 1; + request.VolunteerTableName = "我的志愿表" + (vol.OrderByDescending(c => c.CreateTime).FirstOrDefault().OrderSort + 1); + ordersort = (vol.OrderByDescending(c => c.CreateTime).FirstOrDefault().OrderSort + 1); } else { @@ -362,6 +364,22 @@ namespace New_College.Api.Controllers.Front + /// + /// + /// + /// + /// + [AllowAnonymous] + [HttpGet("downloadpdf")] + public IActionResult DownloadPdf(string url) + { + // 假设pdfBytes是已存在的PDF文件字节流 + byte[] pdfBytes = HelperHtmlConvertPdf.DoHtmlToByte(url); + // 设置响应头,指定Content-Type和文件名 + Response.Headers.Add("Content-Disposition", string.Format("attachment; filename={0}.pdf", DateTime.Now.ToString("MMddHHmmssfff"))); + Response.ContentType = "application/pdf"; + return File(pdfBytes, "application/pdf"); + } } diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml index 5a8eee3..2aa7458 100644 --- a/New_College.Api/New_College.Model.xml +++ b/New_College.Api/New_College.Model.xml @@ -3995,6 +3995,16 @@ 排名 + + + 院校分数线 + + + + + 院校位次 + + 全国统一招生代码 diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml index 859d863..883646c 100644 --- a/New_College.Api/New_College.xml +++ b/New_College.Api/New_College.xml @@ -571,6 +571,13 @@ + + + + + + + 获取省市区 diff --git a/New_College.Common/New_College.Common.csproj b/New_College.Common/New_College.Common.csproj index 05bc63c..5037f12 100644 --- a/New_College.Common/New_College.Common.csproj +++ b/New_College.Common/New_College.Common.csproj @@ -22,7 +22,8 @@ - + + diff --git a/New_College.Model/ViewModels/Query/OneSubmitGoRequest.cs b/New_College.Model/ViewModels/Query/OneSubmitGoRequest.cs index 575bffe..612b40b 100644 --- a/New_College.Model/ViewModels/Query/OneSubmitGoRequest.cs +++ b/New_College.Model/ViewModels/Query/OneSubmitGoRequest.cs @@ -118,6 +118,23 @@ namespace New_College.Model.ViewModels public string UniversityName { get; set; } + public int _fcount { get; set; } + public int _scount { get; set; } + public int _tcount { get; set; } + + /// + /// 院校分数线 + /// + public int _fscore { get; set; } + public int _sscore { get; set; } + public int _tscore { get; set; } + + /// + /// 院校位次 + /// + public int _frank { get; set; } + public int _srank { get; set; } + public int _trank { get; set; } /// /// 全国统一招生代码 diff --git a/New_College.Services/D_PlanMajorDescServices.cs b/New_College.Services/D_PlanMajorDescServices.cs index 0d764ad..b8067f3 100644 --- a/New_College.Services/D_PlanMajorDescServices.cs +++ b/New_College.Services/D_PlanMajorDescServices.cs @@ -109,6 +109,8 @@ namespace New_College.Services UniversityCode = c.RecruitCode.ToString(), LowScoreRank = c.LowScoreRank, Ownership = c.Ownership, + //_fscore = c.LowScore, + //_frank = c.LowScoreRank, // SubjectClam = c.SelectSubject, Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校 planCount = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Sum(c => c.PlanCount), @@ -131,8 +133,33 @@ namespace New_College.Services Count = "--" }).ToList() }).ToList(), - }).OrderByDescending(c => c.Type).OrderBy(c => c.LowScoreRank).ToList(); + + var _qualifcationlist = await _qualificationLineRepository.Query(c => SqlFunc.ContainsArray(universityarry, c.UId)); + responselist.ForEach(c => + { + c._fcount = c.iGoPlanMajorItems.Select(s => s.planCount).Sum(); + c._scount = c.iGoPlanMajorItems.Select(s => s.PlanItems.Where(w => w.Year == "2022").Sum(s => s.PlanCount)).Sum(); + c._tcount = c.iGoPlanMajorItems.Select(s => s.PlanItems.Where(w => w.Year == "2021").Sum(s => s.PlanCount)).Sum(); + if (_qualifcationlist.Where(e => e.Years == DateTime.Now.Year && e.UId == c.UniversityId).Any()) + { + var tmpqualif = _qualifcationlist.Where(e => e.Years == DateTime.Now.Year && e.UId == c.UniversityId).FirstOrDefault(); + c._fscore = tmpqualif.LowScore; + c._frank = tmpqualif.LowScoreRank; + }; + if (_qualifcationlist.Where(e => e.Years == (DateTime.Now.Year - 1) && e.UId == c.UniversityId).Any()) + { + var tmpqualif = _qualifcationlist.Where(e => e.Years == (DateTime.Now.Year - 1) && e.UId == c.UniversityId).FirstOrDefault(); + c._sscore = tmpqualif.LowScore; + c._srank = tmpqualif.LowScoreRank; + }; + if (_qualifcationlist.Where(e => e.Years == (DateTime.Now.Year - 2) && e.UId == c.UniversityId).Any()) + { + var tmpqualif = _qualifcationlist.Where(e => e.Years == (DateTime.Now.Year - 2) && e.UId == c.UniversityId).FirstOrDefault(); + c._tscore = tmpqualif.LowScore; + c._trank = tmpqualif.LowScoreRank; + }; + }); return new AIGOPageModel() { data = responselist, @@ -220,7 +247,7 @@ namespace New_College.Services MajorGroup = c.MajorGroup, MajorRemark = c.Remark, planCount = c.PlanCount, - Ownership= c.Ownership, + Ownership = c.Ownership, Rank = c.Rank, _985 = c._985, _211 = c._211,