|
|
|
|
@ -19,6 +19,7 @@ using System.Data.Entity.Infrastructure;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
using StackExchange.Profiling.Internal;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Security.Claims;
|
|
|
|
|
|
|
|
|
|
namespace New_College.Services
|
|
|
|
|
{
|
|
|
|
|
@ -172,12 +173,26 @@ namespace New_College.Services
|
|
|
|
|
{
|
|
|
|
|
var NatureNames = NatureHelper.NatureNames(request.Nature);
|
|
|
|
|
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 - 60;
|
|
|
|
|
int endscore = request.Score + 15;
|
|
|
|
|
int qyear = request.Year >= 2023 ? 2023 : request.Year;
|
|
|
|
|
var batlist = await _batchlineRepository.Query(c => c.Year == qyear && c.AreaName == request.Location && c.IsDelete == false && c.Type_name == request.BatchTypeName);
|
|
|
|
|
|
|
|
|
|
string batchtypeName = request.SubjectClaim.Length > 2 ? request.SubjectClaim : "综合";
|
|
|
|
|
request.SubjectClaim = request.SubjectClaim.Length == 2 ? (request.SubjectClaim == "理科" ? "物,化,生" : "政,史,地") : request.SubjectClaim;
|
|
|
|
|
var claim01 = "";
|
|
|
|
|
var claim02 = "";
|
|
|
|
|
var claim03 = "";
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(request.SubjectClaim))
|
|
|
|
|
{
|
|
|
|
|
var claim = request.SubjectClaim.Split(",");
|
|
|
|
|
claim01 = claim[0];
|
|
|
|
|
claim02 = claim[1];
|
|
|
|
|
claim03 = claim[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var batlist = await _batchlineRepository.Query(c => c.Year == qyear && c.AreaName == request.Location && c.IsDelete == false && c.Type_name == batchtypeName);
|
|
|
|
|
if (request.Location == "河南省")
|
|
|
|
|
{
|
|
|
|
|
request.BatchName = batlist.Where(c => c.Average <= request.Score && c.Batch_name == "本科一批").Any() ? "本科一批" : batlist.Where(c => c.Average <= request.Score && c.Batch_name == "本科二批").Any() ? "本科二批" : "专科批";
|
|
|
|
|
@ -186,6 +201,10 @@ namespace New_College.Services
|
|
|
|
|
{
|
|
|
|
|
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)
|
|
|
|
|
@ -213,10 +232,10 @@ namespace New_College.Services
|
|
|
|
|
|
|
|
|
|
Expression<Func<T_TbSNeedDataInfo, bool>> expression3 = Expressionable.Create<T_TbSNeedDataInfo>()
|
|
|
|
|
.And(c => c.Location == request.Location)
|
|
|
|
|
.And(c => c.SubjectType == request.BatchTypeName)
|
|
|
|
|
.And(c => c.SubjectType == batchtypeName)
|
|
|
|
|
.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, claim01) || SqlFunc.Contains(c._24subject, claim02) || SqlFunc.Contains(c._24subject, claim03) || 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)
|
|
|
|
|
@ -327,12 +346,26 @@ namespace New_College.Services
|
|
|
|
|
var pagemodel = new PageModel<OneSubmitGoResponse>();
|
|
|
|
|
var NatureNames = NatureHelper.NatureNames(request.Nature);
|
|
|
|
|
request.PageSize = request.PageSize < 100 ? 100 : request.PageSize;
|
|
|
|
|
string batchtypeName = request.SubjectClaim.Length == 2 ? request.SubjectClaim : "综合";
|
|
|
|
|
request.SubjectClaim = request.SubjectClaim.Length == 2 ? (request.SubjectClaim == "理科" ? "物,化,生" : "政,史,地") : request.SubjectClaim;
|
|
|
|
|
var claim01 = "";
|
|
|
|
|
var claim02 = "";
|
|
|
|
|
var claim03 = "";
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(request.SubjectClaim))
|
|
|
|
|
{
|
|
|
|
|
var claim = request.SubjectClaim.Split(",");
|
|
|
|
|
claim01 = claim[0];
|
|
|
|
|
claim02 = claim[1];
|
|
|
|
|
claim03 = claim[2];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//request.PageSize = 150;//山东省
|
|
|
|
|
request.Year = request.Year > 2023 ? 2023 : request.Year;
|
|
|
|
|
var claim = request.SubjectClaim.Split(",", StringSplitOptions.RemoveEmptyEntries).ToList();
|
|
|
|
|
// 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 == "不限")
|
|
|
|
|
.And(c => c.SubjectType == batchtypeName)
|
|
|
|
|
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c._24subject, claim01) || SqlFunc.Contains(c._24subject, claim02) || SqlFunc.Contains(c._24subject, claim03) || c._24subject == "不限")
|
|
|
|
|
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.MajorName, request.Major))
|
|
|
|
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.Province))
|
|
|
|
|
//.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
|
|
|
|
|