bug fixed
parent
3c1cc01b0f
commit
3ded833bc3
|
|
@ -49,26 +49,22 @@ namespace New_College.Api.Controllers
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public async Task<MessageModel<AIPerviewDto>> GetAIPerview([FromQuery] OneSubmitGoRequest request)
|
public async Task<MessageModel<AIPerviewDto>> GetAIPerview([FromQuery] OneSubmitGoRequest request)
|
||||||
{
|
{
|
||||||
var test = (await _VolunteerTableServices.Query()).FirstOrDefault();
|
var perviewdto = await _d_PlanMajorDescServices.GetAIPerview(request);
|
||||||
var pie = new List<PieChatsDto>();
|
//var pie = new List<PieChatsDto>();
|
||||||
pie.Add(new PieChatsDto() { name = "需冲刺", value = 560 });
|
//pie.Add(new PieChatsDto() { name = "需冲刺", value = 560 });
|
||||||
pie.Add(new PieChatsDto() { name = "较稳妥", value = 1301 });
|
//pie.Add(new PieChatsDto() { name = "较稳妥", value = 1301 });
|
||||||
pie.Add(new PieChatsDto() { name = "可保底", value = 600 });
|
//pie.Add(new PieChatsDto() { name = "可保底", value = 600 });
|
||||||
var ulist = new List<UniversityPerviewDto>();
|
//var ulist = new List<UniversityPerviewDto>();
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "985", Count = 7 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "985", Count = 7 });
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "211", Count = 18 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "211", Count = 18 });
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "双一流", Count = 56 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "双一流", Count = 56 });
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "省重点", Count = 42 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "省重点", Count = 42 });
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "公办", Count = 134 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "公办", Count = 134 });
|
||||||
ulist.Add(new UniversityPerviewDto() { Name = "民办", Count = 10 });
|
//ulist.Add(new UniversityPerviewDto() { Name = "民办", Count = 10 });
|
||||||
return new MessageModel<AIPerviewDto>()
|
return new MessageModel<AIPerviewDto>()
|
||||||
{
|
{
|
||||||
msg = "ok",
|
msg = "ok",
|
||||||
response = new AIPerviewDto()
|
response = perviewdto,
|
||||||
{
|
|
||||||
pieChats = pie,
|
|
||||||
universities = ulist
|
|
||||||
},
|
|
||||||
success = true
|
success = true
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ using New_College.Common;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using StackExchange.Profiling.Internal;
|
using StackExchange.Profiling.Internal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using NPOI.SS.Formula.Functions;
|
||||||
namespace New_College.Api.Controllers.Front
|
namespace New_College.Api.Controllers.Front
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -31,15 +32,13 @@ namespace New_College.Api.Controllers.Front
|
||||||
private readonly IU_VolunteerTableServices _VolunteerTableServices;
|
private readonly IU_VolunteerTableServices _VolunteerTableServices;
|
||||||
private readonly IU_VolunteerTableDetailServices _VolunteerTableDetailServices;
|
private readonly IU_VolunteerTableDetailServices _VolunteerTableDetailServices;
|
||||||
private readonly IUnitOfWork _unitOfWork;
|
private readonly IUnitOfWork _unitOfWork;
|
||||||
private readonly ID_PlanMajorDescServices _planMajorDescServices;
|
|
||||||
private readonly IT_TbSNeedDataInfoServices _TbSNeedDataInfoServices;
|
private readonly IT_TbSNeedDataInfoServices _TbSNeedDataInfoServices;
|
||||||
public PcVolunteerController(IU_VolunteerTableServices volunteerTableServices, IU_VolunteerTableDetailServices volunteerTableDetailServices,
|
public PcVolunteerController(IU_VolunteerTableServices volunteerTableServices, IU_VolunteerTableDetailServices volunteerTableDetailServices,
|
||||||
IUnitOfWork unitOfWork, ID_PlanMajorDescServices planMajorDescServices, IT_TbSNeedDataInfoServices tbSNeedDataInfoServices)
|
IUnitOfWork unitOfWork, IT_TbSNeedDataInfoServices tbSNeedDataInfoServices)
|
||||||
{
|
{
|
||||||
_VolunteerTableServices = volunteerTableServices;
|
_VolunteerTableServices = volunteerTableServices;
|
||||||
_VolunteerTableDetailServices = volunteerTableDetailServices;
|
_VolunteerTableDetailServices = volunteerTableDetailServices;
|
||||||
_unitOfWork = unitOfWork;
|
_unitOfWork = unitOfWork;
|
||||||
_planMajorDescServices = planMajorDescServices;
|
|
||||||
_TbSNeedDataInfoServices = tbSNeedDataInfoServices;
|
_TbSNeedDataInfoServices = tbSNeedDataInfoServices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -118,11 +117,11 @@ namespace New_College.Api.Controllers.Front
|
||||||
var ids = item.PlanMajorIds.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(c => int.Parse(c)).ToList();
|
var ids = item.PlanMajorIds.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(c => int.Parse(c)).ToList();
|
||||||
PlanMajorIds.AddRange(ids);
|
PlanMajorIds.AddRange(ids);
|
||||||
}
|
}
|
||||||
var planmajordesc = await _planMajorDescServices.Query(c => SqlFunc.ContainsArray(PlanMajorIds, c.Id));//
|
var planmajordesc = await _TbSNeedDataInfoServices.Query(c => SqlFunc.ContainsArray(PlanMajorIds, c.ID));//
|
||||||
var location = planmajordesc.FirstOrDefault().Location;
|
var location = planmajordesc.FirstOrDefault().Location;
|
||||||
var majorlist = planmajordesc.Select(c => c.Major).ToList();
|
var majorlist = planmajordesc.Select(c => c.MajorName).ToList();
|
||||||
var universityname = planmajordesc.Select(c => c.UniversityName).Distinct().ToList();
|
var universityname = planmajordesc.Select(c => c.UniversityName).Distinct().ToList();
|
||||||
var planmajorcomplist = await _planMajorDescServices.Query(c => c.Location == location && SqlFunc.ContainsArray(majorlist, c.Major) && SqlFunc.ContainsArray(universityname, c.UniversityName));//
|
var planmajorcomplist = await _TbSNeedDataInfoServices.Query(c => c.Location == location && SqlFunc.ContainsArray(majorlist, c.MajorName) && SqlFunc.ContainsArray(universityname, c.UniversityName));//
|
||||||
|
|
||||||
view.VolunteerTableName = query.VolunteerTableName;
|
view.VolunteerTableName = query.VolunteerTableName;
|
||||||
view.SubjectClaim = query.SubjectClaim;
|
view.SubjectClaim = query.SubjectClaim;
|
||||||
|
|
@ -136,7 +135,7 @@ namespace New_College.Api.Controllers.Front
|
||||||
|
|
||||||
items.ForEach(s =>
|
items.ForEach(s =>
|
||||||
{
|
{
|
||||||
var planids = s.PlanMajorIds.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(ss => int.Parse(ss)).ToList();
|
var planids = s.PlanMajorIds.Split(",", StringSplitOptions.RemoveEmptyEntries).Select(ss => long.Parse(ss)).ToList();
|
||||||
var typeinfo = new List<VolteerItem>();
|
var typeinfo = new List<VolteerItem>();
|
||||||
if (!string.IsNullOrWhiteSpace(s.VolunteerRemark))
|
if (!string.IsNullOrWhiteSpace(s.VolunteerRemark))
|
||||||
{
|
{
|
||||||
|
|
@ -144,36 +143,45 @@ namespace New_College.Api.Controllers.Front
|
||||||
}
|
}
|
||||||
var uitem = new VolunteerTableDetailItemsView()
|
var uitem = new VolunteerTableDetailItemsView()
|
||||||
{
|
{
|
||||||
// Sort = s.Sort,
|
|
||||||
planMajorItems = planmajordesc.Where(ww => planids.Contains(ww.Id)).Select(c => new VolunteerTablePlanMajorItem()
|
// UniversityId = s.UniversityId,
|
||||||
{
|
|
||||||
fee = c.Free,
|
|
||||||
Major = c.Major,
|
|
||||||
MajorCode = c.MajorCode,
|
|
||||||
MajorGroup = c.MajorGroup,
|
|
||||||
MajorRemark = c.Remark,
|
|
||||||
planCount = c.PlanCount,
|
|
||||||
PlanId = c.Id,
|
|
||||||
Sort = s.OrderSort,
|
|
||||||
SubjectClam = c.SelectSubject,
|
|
||||||
Percentage = typeinfo.Any() && typeinfo.Count() > 0 ? typeinfo.FirstOrDefault(d => d.planId == c.Id).tage : 0,
|
|
||||||
Type = typeinfo.Any() && typeinfo.Count() > 0 ? typeinfo.FirstOrDefault(d => d.planId == c.Id).type : 0,
|
|
||||||
PlanItems = planmajorcomplist.Where(ee => ee.UId == s.UniversityId && ee.Major == c.Major && ee.MajorCode == c.MajorCode).Select(tt => new PlanItem()
|
|
||||||
{
|
|
||||||
Count = (tt.PlanCount == 0 ? "--" : tt.PlanCount.ToString()),
|
|
||||||
PlanCount = tt.PlanCount,
|
|
||||||
RankLine = tt.LowScoreRank,
|
|
||||||
Scoreline = tt.LowScore,
|
|
||||||
Year = tt.Years.ToString()
|
|
||||||
}).ToList()
|
|
||||||
}).ToList(),
|
|
||||||
UniversityId = s.UniversityId,
|
|
||||||
UniversityName = s.UniversityName,
|
UniversityName = s.UniversityName,
|
||||||
UniversityCode = s.UniversityCode,
|
UniversityCode = s.UniversityCode,
|
||||||
Sort = s.OrderSort,
|
Sort = s.OrderSort,
|
||||||
_211 = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._211,
|
UniversityId = s.UniversityId,
|
||||||
_985 = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._985,
|
_211 = planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel != null ? planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel.Contains("211") ? "是" : "否" : "否",
|
||||||
_SYL = planmajordesc.Where(e => e.UId == s.UniversityId).FirstOrDefault()._SYL,
|
_985 = planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel != null ? planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel.Contains("985") ? "是" : "否" : "否",
|
||||||
|
_SYL = planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel != null ? planmajordesc.Where(e => e.UniversityName == s.UniversityName).FirstOrDefault().LnstitutionalLevel.Contains("双一流") ? "是" : "否" : "否",
|
||||||
|
planMajorItems = planmajordesc.Where(ww => planids.Contains(ww.ID)).Select(c => new VolunteerTablePlanMajorItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
fee = c.Fee,
|
||||||
|
Major = c.MajorName,
|
||||||
|
MajorCode = c.MajorCode,
|
||||||
|
// MajorGroup = c.MajorGroup,
|
||||||
|
MajorRemark = c.Remark,
|
||||||
|
planCount = int.Parse(c._23Count),
|
||||||
|
PlanId = c.ID,
|
||||||
|
Sort = s.OrderSort,
|
||||||
|
SubjectClam = c._23subject,
|
||||||
|
Percentage = typeinfo.Any() && typeinfo.Count() > 0 ? typeinfo.FirstOrDefault(d => d.planId == c.ID).tage : 0,
|
||||||
|
Type = typeinfo.Any() && typeinfo.Count() > 0 ? typeinfo.FirstOrDefault(d => d.planId == c.ID).type : 0,
|
||||||
|
PlanItems = new List<PlanItem>()
|
||||||
|
{
|
||||||
|
|
||||||
|
new PlanItem() {
|
||||||
|
PlanCount=int.Parse(c._22Count),
|
||||||
|
RankLine=int.Parse(c._22ScoreLine),
|
||||||
|
Scoreline=int.Parse(c._22Score),
|
||||||
|
Year="2022"
|
||||||
|
},
|
||||||
|
new PlanItem() {
|
||||||
|
PlanCount=int.Parse(c._21Count),
|
||||||
|
RankLine=int.Parse(c._21ScoreLine),
|
||||||
|
Scoreline=int.Parse(c._21Score),
|
||||||
|
Year="2021"
|
||||||
|
} }
|
||||||
|
}).ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
tableDetailItemsViews.Add(uitem);
|
tableDetailItemsViews.Add(uitem);
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ namespace New_College.Api.Controllers.Front
|
||||||
var decryptModel = JsonConvert.DeserializeObject<WxPayResourceDecryptModel>(decryptStr);
|
var decryptModel = JsonConvert.DeserializeObject<WxPayResourceDecryptModel>(decryptStr);
|
||||||
|
|
||||||
var viewModel = new WxPayCallbackViewModel();
|
var viewModel = new WxPayCallbackViewModel();
|
||||||
if (decryptModel != null&&decryptModel.trade_state== "SUCCESS")
|
if (decryptModel != null && decryptModel.trade_state == "SUCCESS")
|
||||||
{
|
{
|
||||||
DingHookHelper.DingTalkHookMessage("PayNotify-decryptModel", decryptModel.ToJson());
|
DingHookHelper.DingTalkHookMessage("PayNotify-decryptModel", decryptModel.ToJson());
|
||||||
var info = await v_OrderInfoRepository.Query(x => x.out_trade_no == decryptModel.out_trade_no);
|
var info = await v_OrderInfoRepository.Query(x => x.out_trade_no == decryptModel.out_trade_no);
|
||||||
|
|
@ -265,6 +265,7 @@ namespace New_College.Api.Controllers.Front
|
||||||
}
|
}
|
||||||
var oneinfo = info.FirstOrDefault();
|
var oneinfo = info.FirstOrDefault();
|
||||||
oneinfo.Status = EnumOrderType.payoff;
|
oneinfo.Status = EnumOrderType.payoff;
|
||||||
|
oneinfo.ModifyTime = DateTime.Now;
|
||||||
var rep = await v_OrderInfoRepository.Update(oneinfo);
|
var rep = await v_OrderInfoRepository.Update(oneinfo);
|
||||||
if (rep)
|
if (rep)
|
||||||
{
|
{
|
||||||
|
|
@ -302,7 +303,7 @@ namespace New_College.Api.Controllers.Front
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace New_College
|
||||||
|
{
|
||||||
|
public static class DistinctByHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
public static IEnumerable<T> DistinctBy<T, TKey>(this IEnumerable<T> source, Func<T, TKey> keySelector)
|
||||||
|
{
|
||||||
|
HashSet<TKey> seenKeys = new HashSet<TKey>();
|
||||||
|
foreach (var item in source)
|
||||||
|
{
|
||||||
|
if (seenKeys.Add(keySelector(item)))
|
||||||
|
{
|
||||||
|
yield return item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using New_College.IServices.BASE;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using New_College.IServices.BASE;
|
||||||
using New_College.Model;
|
using New_College.Model;
|
||||||
using New_College.Model.Models;
|
using New_College.Model.Models;
|
||||||
using New_College.Model.ViewModels;
|
using New_College.Model.ViewModels;
|
||||||
|
|
@ -34,5 +35,13 @@ namespace New_College.IServices
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<AIGOPageModel<AIGOResponse>> GetAIGoList(OneSubmitGoRequest request);
|
Task<AIGOPageModel<AIGOResponse>> GetAIGoList(OneSubmitGoRequest request);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 院校预览
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<AIPerviewDto> GetAIPerview(OneSubmitGoRequest request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,14 @@ namespace New_College.Model.ViewModels
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class AIPerviewItemDto
|
||||||
|
{
|
||||||
|
|
||||||
|
public string UniversityName { get; set; }
|
||||||
|
public int Type { get; set; }
|
||||||
|
public string LnstitutionalLevel { get; set; }
|
||||||
|
public string Nature { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ namespace New_College.Model.ViewModels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
public DateTime PayTime { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SearchOrderQuery : BasePageRequest
|
public class SearchOrderQuery : BasePageRequest
|
||||||
|
|
@ -154,7 +156,7 @@ namespace New_College.Model.ViewModels
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据支付方式查询
|
/// 根据支付方式查询
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? PayType { get; set; }
|
public int? PayType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据支付状态查询
|
/// 根据支付状态查询
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ namespace New_College.Model.ViewModels
|
||||||
|
|
||||||
public string UniversityName { get; set; }
|
public string UniversityName { get; set; }
|
||||||
|
|
||||||
public List<int> PlanMagorIds { get; set; }
|
public List<long> PlanMagorIds { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class HollandVolunteerTableQuery
|
public class HollandVolunteerTableQuery
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@ namespace New_College.Model.ViewModels
|
||||||
public long MajorId { get; set; }
|
public long MajorId { get; set; }
|
||||||
public float Scoreline { get; set; }
|
public float Scoreline { get; set; }
|
||||||
|
|
||||||
|
public string AcademicYear { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 冲稳保类型
|
/// 冲稳保类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ namespace New_College.Model.ViewModels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string MajorGroup { get; set; }
|
public string MajorGroup { get; set; }
|
||||||
public string MajorCode { get; set; }
|
public string MajorCode { get; set; }
|
||||||
public int MajorId { get; set; }
|
public long MajorId { get; set; }
|
||||||
|
|
||||||
public string PlanName { get; set; }
|
public string PlanName { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ namespace New_College.Model.ViewModels
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 招生计划Id
|
/// 招生计划Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int PlanId { get; set; }
|
public long PlanId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,107 +56,184 @@ namespace New_College.Services
|
||||||
return await _planMajorDescRepository.Batchupdate(majorDescs);
|
return await _planMajorDescRepository.Batchupdate(majorDescs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<AIPerviewDto> GetAIPerview(OneSubmitGoRequest request)
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="request"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<AIGOPageModel<AIGOResponse>> GetAIGoList(OneSubmitGoRequest request)
|
|
||||||
{
|
{
|
||||||
request.PageSize = request.PageSize > 50 ? 50 : request.PageSize;
|
var aidto = new AIPerviewDto();
|
||||||
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
int startscore = request.Score - 25;
|
||||||
var pagemodel = new AIGOPageModel<AIGOResponse>();
|
|
||||||
int startscore = request.Score - 15;
|
|
||||||
int endscore = request.Score + 15;
|
int endscore = request.Score + 15;
|
||||||
int qyear = request.Year >= 2023 ? 2023 : request.Year;
|
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
var batlist = await _batchlineRepository.Query(c => c.Year == request.Year && c.Type_name == "综合");
|
|
||||||
request.BatchName = batlist.Where(c => c.Average <= request.Score && c.Batch_name == "普通类一段").Any() ? "普通类一段" : "普通类二段";
|
|
||||||
Expression<Func<D_QualificationLine, bool>> expression = Expressionable.Create<D_QualificationLine>()
|
|
||||||
.And(c => c.Years == qyear)
|
|
||||||
.And(c => c.IsDelete == false)
|
|
||||||
.And(c => c.Location == request.Location)
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Name), c => SqlFunc.Contains(c.UniversityName, request.Name))
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.AreaName))
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SubjectType == request.SchoolType)
|
|
||||||
.AndIF(request.Score > 0 && (request.EndScore <= endscore && request.StartScore >= startscore), c => SqlFunc.Between(c.LowScore, startscore, endscore))
|
|
||||||
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c.LowScore, request.StartScore, request.EndScore))
|
|
||||||
.AndIF(request.Syl.HasValue && request.Syl == 1, c => c._SYL == "是")
|
|
||||||
.AndIF(request._211.HasValue && request._211 == 1, c => c._211 == "是")
|
|
||||||
.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)
|
|
||||||
.ToExpression();
|
|
||||||
//var query = await _qualificationLineRepository.QueryPage(expression, request.PageIndex, request.PageSize, " LowScoreRank desc ");
|
|
||||||
var query = await _qualificationLineRepository.QueryPage(expression, request.PageIndex, request.PageSize, " LowScoreRank desc ");
|
|
||||||
|
|
||||||
//var majorarry = query.data.Select(c => c.Major).Distinct().ToArray();
|
Expression<Func<T_TbSNeedDataInfo, bool>> expression = Expressionable.Create<T_TbSNeedDataInfo>()
|
||||||
var universityarry = query.data.Select(c => c.UniversityName).Distinct().ToArray();//
|
.And(c => c.Location == request.Location)
|
||||||
|
|
||||||
Expression<Func<T_TbSNeedDataInfo, bool>> expression3 = Expressionable.Create<T_TbSNeedDataInfo>()
|
|
||||||
.And(c => c.Location == request.Location)
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
||||||
// .AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c.SelectSubject, request.SubjectClaim)) //此条件不带
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim[0]) || SqlFunc.Contains(c._24subject, claim[1]) || SqlFunc.Contains(c._24subject, claim[2]) || c._24subject == "不限")
|
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim[0]) || SqlFunc.Contains(c._24subject, claim[1]) || SqlFunc.Contains(c._24subject, claim[2]) || c._24subject == "不限")
|
||||||
//.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName == request.BatchName)
|
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
||||||
// .AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
|
||||||
.AndIF(request.Syl.HasValue && request.Syl == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "双一流"))
|
.AndIF(request.Syl.HasValue && request.Syl == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "双一流"))
|
||||||
.AndIF(request._211.HasValue && request._211 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "211"))
|
.AndIF(request._211.HasValue && request._211 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "211"))
|
||||||
.AndIF(request._985.HasValue && request._985 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "985"))
|
.AndIF(request._985.HasValue && request._985 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "985"))
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature)
|
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature)
|
||||||
.AndIF(universityarry.Any(), c => SqlFunc.ContainsArray(universityarry, c.UniversityName))
|
|
||||||
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c._23Score, request.StartScore, request.EndScore))
|
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c._23Score, request.StartScore, request.EndScore))
|
||||||
.ToExpression();
|
.ToExpression();
|
||||||
var querylist = await this.sNeedDataInfoServices.Query(expression3);
|
var querylist = await sNeedDataInfoServices.Query(expression);
|
||||||
|
var unlist = querylist.GroupBy(b => b.UniversityName).Select(c => new AIPerviewItemDto() { UniversityName = c.Key }).ToList();
|
||||||
var responselist = query.data.Select(c => new AIGOResponse()
|
var mapunlist = unlist.Select(c => new AIPerviewItemDto
|
||||||
{
|
{
|
||||||
AreaName = c.AreaName,
|
LnstitutionalLevel = querylist.Where(e => e.UniversityName == c.UniversityName).FirstOrDefault().LnstitutionalLevel,
|
||||||
Rank = c.Rank > 9999 ? "--" : c.Rank.ToString(),
|
Nature = querylist.Where(e => e.UniversityName == c.UniversityName).FirstOrDefault().Nature,
|
||||||
_985 = c._985,
|
UniversityName = querylist.Where(e => e.UniversityName == c.UniversityName).FirstOrDefault().UniversityName,
|
||||||
_211 = c._211,
|
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(querylist.Where(e => e.UniversityName == c.UniversityName).FirstOrDefault()._23Score), request.Score),
|
||||||
_SYL = c._SYL,
|
}).ToList();
|
||||||
UniversityId = c.UId,
|
aidto.universities = new List<UniversityPerviewDto>()
|
||||||
UniversityName = c.UniversityName,
|
|
||||||
UniversityCode = UniversityCodeConvertRules.UniversityCodeConvertRulesMap(c.RecruitCode.ToString()),
|
|
||||||
collegeCode = c.RecruitCode.ToString(),
|
|
||||||
LowScoreRank = c.LowScoreRank,
|
|
||||||
Ownership = c.Ownership,
|
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校
|
|
||||||
Percentage = MajorPlanScoreTool.GetPlanPercentage(c.LowScore, request.Score),
|
|
||||||
planCount = querylist.Where(w => w.UniversityName == c.UniversityName).Sum(c => int.Parse(c._23Count)),
|
|
||||||
}).OrderByDescending(c => c.Type).OrderBy(c => c.LowScoreRank).ToList();
|
|
||||||
|
|
||||||
responselist.ToList().ForEach(c =>
|
|
||||||
{
|
{
|
||||||
var items = querylist.Where(e => e.UniversityName == c.UniversityName);
|
new UniversityPerviewDto()
|
||||||
c._fcount = items.Select(e => int.Parse(e._23Count)).Sum();
|
{
|
||||||
c._scount = items.Select(e => int.Parse(e._22Count)).Sum();
|
Name="985",
|
||||||
c._tcount = items.Select(e => int.Parse(e._21Count)).Sum();
|
Count=mapunlist.Where(e=>e.LnstitutionalLevel!=null&&e.LnstitutionalLevel.Contains("985")).Count(),
|
||||||
c._fscore = items.Min(e => int.Parse(e._23SchoolScore));
|
},
|
||||||
c._frank = items.Min(e => int.Parse(e._23SchoolScoreLine));
|
new UniversityPerviewDto()
|
||||||
c._sscore = items.Min(e => int.Parse(e._22Score));
|
{
|
||||||
c._srank = items.Min(e => int.Parse(e._22ScoreLine));
|
Name="211",
|
||||||
c._tscore = items.Min(e => int.Parse(e._22Score));
|
Count=mapunlist.Where(e=>e.LnstitutionalLevel!=null&&e.LnstitutionalLevel.Contains("211")).Count(),
|
||||||
c._trank = items.Min(e => int.Parse(e._22ScoreLine));
|
},
|
||||||
c.iGoPlanMajorItems = items.Select(t => new AIGoPlanMajorItem()
|
new UniversityPerviewDto()
|
||||||
|
{
|
||||||
|
Name="双一流",
|
||||||
|
Count=mapunlist.Where(e=>e.LnstitutionalLevel!=null&&e.LnstitutionalLevel.Contains("双一流")).Count(),
|
||||||
|
},
|
||||||
|
new UniversityPerviewDto() {
|
||||||
|
Name="保研资格",
|
||||||
|
Count=mapunlist.Where(e=>e.LnstitutionalLevel!=null&&e.LnstitutionalLevel.Contains("保研资格")).Count(),
|
||||||
|
},
|
||||||
|
new UniversityPerviewDto() {
|
||||||
|
Name="公办",
|
||||||
|
Count=mapunlist.Where(e=>e.Nature=="公办").Count(),
|
||||||
|
},
|
||||||
|
new UniversityPerviewDto() {
|
||||||
|
Name="民办",
|
||||||
|
Count=mapunlist.Where(e=>e.Nature=="民办").Count(),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
aidto.pieChats = new List<PieChatsDto>()
|
||||||
|
{
|
||||||
|
|
||||||
|
new PieChatsDto() {
|
||||||
|
name="需冲刺",
|
||||||
|
value=mapunlist.Where(e=>e.Type==2).Count()
|
||||||
|
},
|
||||||
|
new PieChatsDto() {
|
||||||
|
name="较稳妥",
|
||||||
|
value=mapunlist.Where(e=>e.Type==1).Count()
|
||||||
|
},
|
||||||
|
new PieChatsDto() {
|
||||||
|
name="可保底",
|
||||||
|
value=mapunlist.Where(e=>e.Type==0).Count()
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
return aidto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<AIGOPageModel<AIGOResponse>> GetAIGoList(OneSubmitGoRequest request)
|
||||||
|
{
|
||||||
|
request.PageSize = request.PageSize > 50 ? 50 : request.PageSize;
|
||||||
|
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
|
var pagemodel = new AIGOPageModel<AIGOResponse>();
|
||||||
|
int startscore = request.Score - 25;
|
||||||
|
int endscore = request.Score + 15;
|
||||||
|
int qyear = request.Year >= 2023 ? 2023 : request.Year;
|
||||||
|
var batlist = await _batchlineRepository.Query(c => c.Year == request.Year && c.Type_name == "综合");
|
||||||
|
request.BatchName = batlist.Where(c => c.Average <= request.Score && c.Batch_name == "普通类一段").Any() ? "普通类一段" : "普通类二段";
|
||||||
|
Expression<Func<D_QualificationLine, bool>> expression = Expressionable.Create<D_QualificationLine>()
|
||||||
|
.And(c => c.Years == qyear)
|
||||||
|
.And(c => c.IsDelete == false)
|
||||||
|
.And(c => c.Location == request.Location)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Name), c => SqlFunc.Contains(c.UniversityName, request.Name))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.AreaName))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SubjectType == request.SchoolType)
|
||||||
|
.AndIF(request.Score > 0 && (request.EndScore <= endscore && request.StartScore >= startscore), c => SqlFunc.Between(c.LowScore, startscore, endscore))
|
||||||
|
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c.LowScore, request.StartScore, request.EndScore))
|
||||||
|
.AndIF(request.Syl.HasValue && request.Syl == 1, c => c._SYL == "是")
|
||||||
|
.AndIF(request._211.HasValue && request._211 == 1, c => c._211 == "是")
|
||||||
|
.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)
|
||||||
|
.ToExpression();
|
||||||
|
//var query = await _qualificationLineRepository.QueryPage(expression, request.PageIndex, request.PageSize, " LowScoreRank desc ");
|
||||||
|
var query = await _qualificationLineRepository.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.UniversityName).Distinct().ToArray();//
|
||||||
|
|
||||||
|
Expression<Func<T_TbSNeedDataInfo, bool>> expression3 = Expressionable.Create<T_TbSNeedDataInfo>()
|
||||||
|
.And(c => c.Location == request.Location)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
||||||
|
// .AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c.SelectSubject, request.SubjectClaim)) //此条件不带
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim[0]) || SqlFunc.Contains(c._24subject, claim[1]) || SqlFunc.Contains(c._24subject, claim[2]) || c._24subject == "不限")
|
||||||
|
//.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName == request.BatchName)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
||||||
|
// .AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
||||||
|
.AndIF(request.Syl.HasValue && request.Syl == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "双一流"))
|
||||||
|
.AndIF(request._211.HasValue && request._211 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "211"))
|
||||||
|
.AndIF(request._985.HasValue && request._985 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "985"))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature)
|
||||||
|
.AndIF(universityarry.Any(), c => SqlFunc.ContainsArray(universityarry, c.UniversityName))
|
||||||
|
.AndIF(request.EndScore > endscore || request.StartScore < startscore, c => SqlFunc.Between(c._23Score, request.StartScore, request.EndScore))
|
||||||
|
.ToExpression();
|
||||||
|
var querylist = await this.sNeedDataInfoServices.Query(expression3);
|
||||||
|
|
||||||
|
var responselist = query.data.Select(c => new AIGOResponse()
|
||||||
|
{
|
||||||
|
AreaName = c.AreaName,
|
||||||
|
Rank = c.Rank > 9999 ? "--" : c.Rank.ToString(),
|
||||||
|
_985 = c._985,
|
||||||
|
_211 = c._211,
|
||||||
|
_SYL = c._SYL,
|
||||||
|
UniversityId = c.UId,
|
||||||
|
UniversityName = c.UniversityName,
|
||||||
|
UniversityCode = UniversityCodeConvertRules.UniversityCodeConvertRulesMap(c.RecruitCode.ToString()),
|
||||||
|
collegeCode = c.RecruitCode.ToString(),
|
||||||
|
LowScoreRank = c.LowScoreRank,
|
||||||
|
Ownership = c.Ownership,
|
||||||
|
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校
|
||||||
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(c.LowScore, request.Score),
|
||||||
|
planCount = querylist.Where(w => w.UniversityName == c.UniversityName).Sum(c => int.Parse(c._23Count)),
|
||||||
|
}).OrderByDescending(c => c.Type).OrderBy(c => c.LowScoreRank).ToList();
|
||||||
|
|
||||||
|
responselist.ToList().ForEach(c =>
|
||||||
|
{
|
||||||
|
var items = querylist.Where(e => e.UniversityName == c.UniversityName);
|
||||||
|
c._fcount = items.Select(e => int.Parse(e._23Count)).Sum();
|
||||||
|
c._scount = items.Select(e => int.Parse(e._22Count)).Sum();
|
||||||
|
c._tcount = items.Select(e => int.Parse(e._21Count)).Sum();
|
||||||
|
c._fscore = items.Min(e => int.Parse(e._23SchoolScore));
|
||||||
|
c._frank = items.Min(e => int.Parse(e._23SchoolScoreLine));
|
||||||
|
c._sscore = items.Min(e => int.Parse(e._22Score));
|
||||||
|
c._srank = items.Min(e => int.Parse(e._22ScoreLine));
|
||||||
|
c._tscore = items.Min(e => int.Parse(e._22Score));
|
||||||
|
c._trank = items.Min(e => int.Parse(e._22ScoreLine));
|
||||||
|
c.iGoPlanMajorItems = items.Select(t => new AIGoPlanMajorItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
PlanId = t.ID,
|
||||||
|
MajorCode = t.MajorCode,
|
||||||
|
fee = t.Fee,
|
||||||
|
Major = t.MajorName,
|
||||||
|
// MajorGroup = t.MajorGroup,//山东无专业组
|
||||||
|
MajorRemark = t.Remark,
|
||||||
|
planCount = int.Parse(t._23Count),
|
||||||
|
SubjectClam = t._23subject,
|
||||||
|
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(t._23Score), request.Score),//冲稳保院校
|
||||||
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(t._23Score), request.Score),
|
||||||
|
PlanItems = new List<PlanItem>()
|
||||||
{
|
{
|
||||||
|
|
||||||
PlanId = t.ID,
|
|
||||||
MajorCode = t.MajorCode,
|
|
||||||
fee = t.Fee,
|
|
||||||
Major = t.MajorName,
|
|
||||||
// MajorGroup = t.MajorGroup,//山东无专业组
|
|
||||||
MajorRemark = t.Remark,
|
|
||||||
planCount = int.Parse(t._23Count),
|
|
||||||
SubjectClam = t._23subject,
|
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(t._23Score), request.Score),//冲稳保院校
|
|
||||||
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(t._23Score), request.Score),
|
|
||||||
PlanItems = new List<PlanItem>()
|
|
||||||
{
|
|
||||||
new PlanItem() {
|
new PlanItem() {
|
||||||
PlanCount=int.Parse(t._23Count),
|
PlanCount=int.Parse(t._23Count),
|
||||||
RankLine=int.Parse(t._23ScoreLine),
|
RankLine=int.Parse(t._23ScoreLine),
|
||||||
|
|
@ -175,93 +252,94 @@ namespace New_College.Services
|
||||||
Scoreline=int.Parse(t._21Score),
|
Scoreline=int.Parse(t._21Score),
|
||||||
Year="2021"
|
Year="2021"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
});
|
});
|
||||||
return new AIGOPageModel<AIGOResponse>()
|
return new AIGOPageModel<AIGOResponse>()
|
||||||
{
|
{
|
||||||
data = responselist,
|
data = responselist,
|
||||||
c = responselist.Where(c => c.Type == 2).Count(),
|
c = responselist.Where(c => c.Type == 2).Count(),
|
||||||
w = responselist.Where(c => c.Type == 1).Count(),
|
w = responselist.Where(c => c.Type == 1).Count(),
|
||||||
b = responselist.Where(c => c.Type == 0).Count(),
|
b = responselist.Where(c => c.Type == 0).Count(),
|
||||||
dataCount = query.dataCount,
|
dataCount = query.dataCount,
|
||||||
page = query.page,
|
page = query.page,
|
||||||
pageCount = query.pageCount,
|
pageCount = query.pageCount,
|
||||||
PageSize = query.PageSize
|
PageSize = query.PageSize
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 一键填报招生计划展示
|
/// <summary>
|
||||||
/// </summary>
|
/// 一键填报招生计划展示
|
||||||
/// <param name="request"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="request"></param>
|
||||||
public async Task<PageModel<OneSubmitGoResponse>> GetPlanMajorList(OneSubmitGoRequest request)
|
/// <returns></returns>
|
||||||
|
public async Task<PageModel<OneSubmitGoResponse>> GetPlanMajorList(OneSubmitGoRequest request)
|
||||||
|
{
|
||||||
|
|
||||||
|
var pagemodel = new PageModel<OneSubmitGoResponse>();
|
||||||
|
|
||||||
|
request.PageSize = request.PageSize < 100 ? 100 : request.PageSize;
|
||||||
|
//request.PageSize = 150;//山东省
|
||||||
|
|
||||||
|
request.Year = request.Year > 2023 ? 2023 : request.Year;
|
||||||
|
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
|
Expression<Func<T_TbSNeedDataInfo, bool>> expression3 = Expressionable.Create<T_TbSNeedDataInfo>()
|
||||||
|
|
||||||
|
.And(c => c.Location == request.Location)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim[0]) || SqlFunc.Contains(c._24subject, claim[1]) || SqlFunc.Contains(c._24subject, claim[2]) || c._24subject == "不限")
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
||||||
|
//.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
||||||
|
//.And(c => c.Years == request.Year)
|
||||||
|
//.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
||||||
|
.AndIF(request.Score > 0, c => SqlFunc.Between(c._23Score, request.Score - 25, request.Score + 15))
|
||||||
|
.AndIF(request.Syl.HasValue && request.Syl == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "双一流"))
|
||||||
|
.AndIF(request._211.HasValue && request._211 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "211"))
|
||||||
|
.AndIF(request._985.HasValue && request._985 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "985"))
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
||||||
|
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature)
|
||||||
|
//.AndIF(request. > 0, c => SqlFunc.Between(c.LowScore, request.Score, request.Score)) 位次区间
|
||||||
|
.ToExpression();
|
||||||
|
|
||||||
|
var querylist = await this.sNeedDataInfoServices.Query(expression3);
|
||||||
|
|
||||||
|
var universitymaps = (await _UniversityServices.Query(c => c.IsDelete == false)).Select(c => new D_University()
|
||||||
|
{
|
||||||
|
Id = c.Id,
|
||||||
|
Name = c.Name,
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
var responselist = querylist.Select(c => new OneSubmitGoResponse()
|
||||||
{
|
{
|
||||||
|
|
||||||
var pagemodel = new PageModel<OneSubmitGoResponse>();
|
AreaName = c.Province,
|
||||||
|
fee = c.Fee,
|
||||||
request.PageSize = request.PageSize < 100 ? 100 : request.PageSize;
|
Major = c.MajorName,
|
||||||
//request.PageSize = 150;//山东省
|
// MajorGroup = c.MajorGroup,
|
||||||
|
AcademicYear = c.AcademicYear,
|
||||||
request.Year = request.Year > 2023 ? 2023 : request.Year;
|
MajorRemark = c.Remark,
|
||||||
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
planCount = int.Parse(c._23Count),
|
||||||
Expression<Func<T_TbSNeedDataInfo, bool>> expression3 = Expressionable.Create<T_TbSNeedDataInfo>()
|
Ownership = c.Ownership,
|
||||||
|
Rank = c.UniversityRank,
|
||||||
.And(c => c.Location == request.Location)
|
_985 = c.LnstitutionalLevel != null ? (c.LnstitutionalLevel.Contains("985") ? "是" : "否") : "否",
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim[0]) || SqlFunc.Contains(c._24subject, claim[1]) || SqlFunc.Contains(c._24subject, claim[2]) || c._24subject == "不限")
|
_211 = c.LnstitutionalLevel != null ? (c.LnstitutionalLevel.Contains("211") ? "是" : "否") : "否",
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
_SYL = c.LnstitutionalLevel != null ? (c.LnstitutionalLevel.Contains("双一流") ? "是" : "否") : "否",
|
||||||
//.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
UniversityId = universitymaps.Where(e => e.Name == c.UniversityName).Any() ? universitymaps.FirstOrDefault(e => e.Name == c.UniversityName).Id : 0,
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
UniversityName = c.UniversityName,
|
||||||
//.And(c => c.Years == request.Year)
|
SubjectClam = c._23subject,
|
||||||
//.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(c._23Score), request.Score),//还缺冲稳保
|
||||||
.AndIF(request.Score > 0, c => SqlFunc.Between(c._23Score, request.Score - 25, request.Score + 15))
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(c._23Score), request.Score),
|
||||||
.AndIF(request.Syl.HasValue && request.Syl == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "双一流"))
|
PlanId = (int)c.ID,
|
||||||
.AndIF(request._211.HasValue && request._211 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "211"))
|
UniversityCode = c.EnrollmentCode,
|
||||||
.AndIF(request._985.HasValue && request._985 == 1, c => SqlFunc.Contains(c.LnstitutionalLevel, "985"))
|
collegeCode = c.EnrollmentCode,
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Ownership), c => c.Ownership == request.Ownership)
|
MajorCode = c.MajorCode,
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Nature), c => c.Nature == request.Nature)
|
LowScoreRank = int.Parse(c._23SchoolScoreLine),
|
||||||
//.AndIF(request. > 0, c => SqlFunc.Between(c.LowScore, request.Score, request.Score)) 位次区间
|
LowScore = int.Parse(c._23SchoolScore),
|
||||||
.ToExpression();
|
PlanItems = new List<PlanItem>()
|
||||||
|
|
||||||
var querylist = await this.sNeedDataInfoServices.Query(expression3);
|
|
||||||
|
|
||||||
var universitymaps = (await _UniversityServices.Query(c => c.IsDelete == false)).Select(c => new D_University()
|
|
||||||
{
|
|
||||||
Id = c.Id,
|
|
||||||
Name = c.Name,
|
|
||||||
}).ToList();
|
|
||||||
|
|
||||||
var responselist = querylist.Select(c => new OneSubmitGoResponse()
|
|
||||||
{
|
|
||||||
|
|
||||||
AreaName = c.Province,
|
|
||||||
fee = c.Fee,
|
|
||||||
Major = c.MajorName,
|
|
||||||
// MajorGroup = c.MajorGroup,
|
|
||||||
AcademicYear = c.AcademicYear,
|
|
||||||
MajorRemark = c.Remark,
|
|
||||||
planCount = int.Parse(c._23Count),
|
|
||||||
Ownership = c.Ownership,
|
|
||||||
Rank = c.UniversityRank,
|
|
||||||
_985 = c.LnstitutionalLevel!=null?(c.LnstitutionalLevel.Contains("985") ? "是" : "否") : "否",
|
|
||||||
_211 = c.LnstitutionalLevel != null ? (c.LnstitutionalLevel.Contains("211") ? "是" : "否") : "否",
|
|
||||||
_SYL = c.LnstitutionalLevel != null ? (c.LnstitutionalLevel.Contains("双一流") ? "是" : "否"): "否",
|
|
||||||
UniversityId = universitymaps.Where(e => e.Name == c.UniversityName).Any() ? universitymaps.FirstOrDefault(e => e.Name == c.UniversityName).Id : 0,
|
|
||||||
UniversityName = c.UniversityName,
|
|
||||||
SubjectClam = c._23subject,
|
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(c._23Score), request.Score),//还缺冲稳保
|
|
||||||
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(c._23Score), request.Score),
|
|
||||||
PlanId = (int)c.ID,
|
|
||||||
UniversityCode = c.EnrollmentCode,
|
|
||||||
collegeCode = c.EnrollmentCode,
|
|
||||||
MajorCode = c.MajorCode,
|
|
||||||
LowScoreRank = int.Parse(c._23SchoolScoreLine),
|
|
||||||
LowScore = int.Parse(c._23SchoolScore),
|
|
||||||
PlanItems = new List<PlanItem>()
|
|
||||||
{
|
{
|
||||||
new PlanItem() {
|
new PlanItem() {
|
||||||
PlanCount=int.Parse(c._23Count),
|
PlanCount=int.Parse(c._23Count),
|
||||||
|
|
@ -282,21 +360,21 @@ namespace New_College.Services
|
||||||
Year="2021"
|
Year="2021"
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}).ToList();
|
}).ToList();
|
||||||
////冲稳保比例--待定
|
////冲稳保比例--待定
|
||||||
var newlist = responselist.Where(c => c.Type == 2).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(25).ToList();
|
var newlist = responselist.Where(c => c.Type == 2).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(25).ToList();
|
||||||
newlist.AddRange(responselist.Where(c => c.Type == 1).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(45).ToList());
|
newlist.AddRange(responselist.Where(c => c.Type == 1).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(45).ToList());
|
||||||
newlist.AddRange(responselist.Where(c => c.Type == 0).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(30).ToList());
|
newlist.AddRange(responselist.Where(c => c.Type == 0).OrderByDescending(c => c.SubjectClam).OrderByDescending(c => c.LowScore).Take(30).ToList());
|
||||||
pagemodel.page = request.PageIndex;
|
pagemodel.page = request.PageIndex;
|
||||||
pagemodel.data = newlist;
|
pagemodel.data = newlist;
|
||||||
pagemodel.dataCount = responselist.Count;
|
pagemodel.dataCount = responselist.Count;
|
||||||
pagemodel.PageSize = request.PageSize;
|
pagemodel.PageSize = request.PageSize;
|
||||||
pagemodel.pageCount= pagemodel.data.Count();
|
pagemodel.pageCount = pagemodel.data.Count();
|
||||||
return pagemodel;
|
return pagemodel;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -613,7 +613,7 @@ namespace New_College.Services
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(item._23Score), query.Score),//还缺冲稳保
|
Type = MajorPlanScoreTool.GetPlanScore(int.Parse(item._23Score), query.Score),//还缺冲稳保
|
||||||
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(item._23Score), query.Score),
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(int.Parse(item._23Score), query.Score),
|
||||||
Subject = item._23subject,
|
Subject = item._23subject,
|
||||||
|
AcademicYear = item.AcademicYear,
|
||||||
planItems = new List<PlanItem>()
|
planItems = new List<PlanItem>()
|
||||||
{
|
{
|
||||||
new PlanItem() {
|
new PlanItem() {
|
||||||
|
|
@ -1203,13 +1203,13 @@ namespace New_College.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<MessageModel<List<SimuVolunteerTableResult>>> GetAutoVolunteerTableDetail(VolunteerTableQuery query)
|
public async Task<MessageModel<List<SimuVolunteerTableResult>>> GetAutoVolunteerTableDetail(VolunteerTableQuery query)
|
||||||
{
|
{
|
||||||
|
string yearName = "2023";
|
||||||
if (query.details == null)
|
if (query.details == null)
|
||||||
return new MessageModel<List<SimuVolunteerTableResult>>() { success = false, msg = "选择专业院校为空..." };
|
return new MessageModel<List<SimuVolunteerTableResult>>() { success = false, msg = "选择专业院校为空..." };
|
||||||
List<SimuVolunteerTableResult> list = new List<SimuVolunteerTableResult>() { };
|
List<SimuVolunteerTableResult> list = new List<SimuVolunteerTableResult>() { };
|
||||||
//var planstringids = query.details.Select(x => x.PlanMagorIds).ToList();
|
//var planstringids = query.details.Select(x => x.PlanMagorIds).ToList();
|
||||||
List<int> PlanIds = new List<int>() { };
|
var PlanIds = new List<long>() { };
|
||||||
var id = 0;
|
long id = 0;
|
||||||
foreach (var item in query.details)
|
foreach (var item in query.details)
|
||||||
{
|
{
|
||||||
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
||||||
|
|
@ -1218,26 +1218,15 @@ namespace New_College.Services
|
||||||
id = item.PlanMagorIds.First();
|
id = item.PlanMagorIds.First();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//string yearName = string.Empty;
|
var descinfo = await t_TbSNeedDataInfoRepository.Query(x => PlanIds.Contains(x.ID));
|
||||||
//var plandescmodels = await this._PlanMajorDescRepository.QueryById(id);
|
|
||||||
//if (plandescmodels != null)
|
|
||||||
//{
|
|
||||||
// var planinfo = await this.t_EnrollmentPlaneRepository.QueryById(plandescmodels.PlanId);
|
|
||||||
// if (planinfo != null)
|
|
||||||
// yearName = planinfo.Years.ToString();
|
|
||||||
//}
|
|
||||||
|
|
||||||
var descinfo = await _PlanMajorDescRepository.Query(x => x.IsDelete == false && PlanIds.Contains(x.Id));
|
|
||||||
string yearName = (descinfo.FirstOrDefault().Years - 1).ToString();
|
|
||||||
var universityids = query.details.Select(x => x.UniversityId).ToList();
|
var universityids = query.details.Select(x => x.UniversityId).ToList();
|
||||||
|
|
||||||
var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc");
|
var universityinfo = await d_UniversityRepository.Query(x => universityids.Contains(x.Id) && x.IsDelete == false, "Rank asc");
|
||||||
foreach (var item in query.details)
|
foreach (var item in query.details)
|
||||||
{
|
{
|
||||||
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
if (item.PlanMagorIds != null && item.PlanMagorIds.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
var nowdesc = descinfo.Where(x => item.PlanMagorIds.Contains(x.Id)).ToList();
|
var nowdesc = descinfo.Where(x => item.PlanMagorIds.Contains(x.ID)).ToList();
|
||||||
if (nowdesc.Count <= 0)
|
if (nowdesc.Count <= 0)
|
||||||
continue;
|
continue;
|
||||||
var nowuniversityinfo = universityinfo.Where(x => x.Id == item.UniversityId).FirstOrDefault();
|
var nowuniversityinfo = universityinfo.Where(x => x.Id == item.UniversityId).FirstOrDefault();
|
||||||
|
|
@ -1249,13 +1238,13 @@ namespace New_College.Services
|
||||||
{
|
{
|
||||||
var newinfos = nowdesc.Select(x => new PlanInfo()
|
var newinfos = nowdesc.Select(x => new PlanInfo()
|
||||||
{
|
{
|
||||||
MajorId = x.Id,
|
MajorId = x.ID,
|
||||||
Money = x.Free,
|
Money = x.Fee,
|
||||||
Year = x.AcademicYear,
|
Year = x.AcademicYear,
|
||||||
PlanName = x.Major,
|
PlanName = x.MajorName,
|
||||||
PlanNum = x.PlanCount,
|
PlanNum = int.Parse(x._23Count),
|
||||||
Scoreline = x.LowScore == 0 ? "-" : x.LowScore.ToString(),
|
Scoreline = x._23Score == "0" ? "-" : x._23Score,
|
||||||
LowScoreRank = x.LowScoreRank == 0 ? "-" : x.LowScoreRank.ToString()
|
LowScoreRank = x._23ScoreLine == "0" ? "-" : x._23ScoreLine
|
||||||
}).ToList();
|
}).ToList();
|
||||||
count.FirstOrDefault().Infos.AddRange(newinfos);
|
count.FirstOrDefault().Infos.AddRange(newinfos);
|
||||||
}
|
}
|
||||||
|
|
@ -1275,16 +1264,16 @@ namespace New_College.Services
|
||||||
Nature = nowuniversityinfo.Nature,
|
Nature = nowuniversityinfo.Nature,
|
||||||
Infos = nowdesc.Select(x => new PlanInfo()
|
Infos = nowdesc.Select(x => new PlanInfo()
|
||||||
{
|
{
|
||||||
MajorId = x.Id,
|
MajorId = x.ID,
|
||||||
Money = x.Free,
|
Money = x.Fee,
|
||||||
Year = x.AcademicYear,
|
Year = x.AcademicYear,
|
||||||
PlanName = x.Major,
|
PlanName = x.MajorName,
|
||||||
PlanNum = x.PlanCount,
|
PlanNum = int.Parse(x._23Count),
|
||||||
Scoreline = x.LowScore == 0 ? "-" : x.LowScore.ToString(),
|
Scoreline = x._23Score == "0" ? "-" : x._23Score,
|
||||||
LowScoreRank = x.LowScoreRank == 0 ? "-" : x.LowScoreRank.ToString(),
|
LowScoreRank = x._23ScoreLine == " 0" ? "-" : x._23ScoreLine,
|
||||||
YearName = yearName,
|
YearName = yearName,
|
||||||
Type = query.Score.HasValue ? MajorPlanScoreTool.GetPlanScore(x.LowScore, query.Score.Value) : 0,//还缺冲稳保
|
Type = query.Score.HasValue ? MajorPlanScoreTool.GetPlanScore(int.Parse(x._23Score), query.Score.Value) : 0,//还缺冲稳保
|
||||||
Percentage = query.Score.HasValue ? MajorPlanScoreTool.GetPlanPercentage(x.LowScore, query.Score.Value) : 0,
|
Percentage = query.Score.HasValue ? MajorPlanScoreTool.GetPlanPercentage(int.Parse(x._23Score), query.Score.Value) : 0,
|
||||||
}).ToList()
|
}).ToList()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -284,14 +284,12 @@ namespace New_College.Services
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var payType = query.PayType.HasValue ? (EnumPayType)query.PayType.Value : 0;
|
|
||||||
var payStatus = query.Status.HasValue ? (EnumOrderType)query.Status.Value : 0;
|
|
||||||
Expression<Func<V_OrderInfo, bool>> wheres = Expressionable.Create<V_OrderInfo>()
|
Expression<Func<V_OrderInfo, bool>> wheres = Expressionable.Create<V_OrderInfo>()
|
||||||
.And(x => x.IsDelete == false)
|
.And(x => x.IsDelete == false)
|
||||||
.And(x => x.CustomerId == query.CustomerId)
|
.And(x => x.CustomerId == query.CustomerId)
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(query.CardNo), x => x.CardNo.Contains(query.CardNo))//根据卡号查询
|
.AndIF(!string.IsNullOrWhiteSpace(query.CardNo), x => x.CardNo.Contains(query.CardNo))//根据卡号查询
|
||||||
.And(x => x.Status == payStatus) //根据支付状态查询
|
.AndIF(query.Status.HasValue, x => x.Status == (EnumOrderType)query.Status.Value) //根据支付状态查询
|
||||||
.And(x => x.PayType == payType)
|
.AndIF(query.PayType.HasValue, x => x.PayType == (EnumPayType)query.PayType.Value)
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(query.out_trade_no), x => x.out_trade_no.Contains(query.out_trade_no))
|
.AndIF(!string.IsNullOrWhiteSpace(query.out_trade_no), x => x.out_trade_no.Contains(query.out_trade_no))
|
||||||
.AndIF(query.CardTypeId > 0, x => x.CardTypeId == query.CardTypeId) //根据卡片类别查询
|
.AndIF(query.CardTypeId > 0, x => x.CardTypeId == query.CardTypeId) //根据卡片类别查询
|
||||||
.ToExpression();
|
.ToExpression();
|
||||||
|
|
@ -319,7 +317,8 @@ namespace New_College.Services
|
||||||
out_trade_no = item.out_trade_no,
|
out_trade_no = item.out_trade_no,
|
||||||
//支付方式
|
//支付方式
|
||||||
PayTypeName = item.PayType.GetDescription(),
|
PayTypeName = item.PayType.GetDescription(),
|
||||||
CreateTime = item.CreateTime.Value
|
CreateTime = item.CreateTime.Value,
|
||||||
|
PayTime = item.ModifyTime.Value,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
pageModel.data = list;
|
pageModel.data = list;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue