bug fixd
parent
fdb24fe54a
commit
046ebcabf8
|
|
@ -4495,11 +4495,6 @@
|
|||
结束分数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.ViewModels.OneSubmitGoRequest.BatchTypeName">
|
||||
<summary>
|
||||
批次类型名称(综合--文科 理科)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.ViewModels.OneSubmitGoRequest.BatchName">
|
||||
<summary>
|
||||
批次名称
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@
|
|||
"OrganizationName": "六纬生涯",
|
||||
"ApplicationName": "六纬生涯",
|
||||
"ApplicationType": "webapi",
|
||||
"ClientId": "18766cebe28086f3e676",
|
||||
"ClientSecret": "f11e7ccfa8562e37f973126697c3714015bd0337",
|
||||
"ClientId": "776d639918192c449537",
|
||||
"ClientSecret": "d556f0692052a2df56614282dd86895b04783262",
|
||||
"CallbackPath": "http://test.sso.ycymedu.com/login/oauth/authorize?client_id=4c6d761417dbbdd665be&response_type=code&redirect_uri=http://192.168.100.129:8081/Home/FirstPage&scope=read&state=casdoor",
|
||||
"RequireHttpsMetadata": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace New_College.Model.ViewModels
|
|||
/// <summary>
|
||||
/// 批次类型名称(综合--文科 理科)
|
||||
/// </summary>
|
||||
public string BatchTypeName { get; set; } = "综合";
|
||||
//public string BatchTypeName { get; set; } = "综合";
|
||||
/// <summary>
|
||||
///批次名称
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
@ -85,7 +86,7 @@ namespace New_College.Services
|
|||
.AndIF(request.EndScore > request.StartScore, c => SqlFunc.Between(c._23Score, startscore, endscore))
|
||||
.ToExpression();
|
||||
|
||||
|
||||
|
||||
var querylist = (await t_TbSNeedDataInfoPev.Query(expression)).Select(c => new TbSNeedDataInfoPerviewViewDto()
|
||||
{
|
||||
//ID = c.ID,
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -317,59 +317,71 @@ namespace New_College.Services
|
|||
/// <returns></returns>
|
||||
public async Task<MessageModel<CustomerInfoResult>> GetCustomerInfoById(IdQuery query)
|
||||
{
|
||||
var info = await _dal.QueryById(query.Id);
|
||||
if (info == null || info.IsDelete)
|
||||
return new MessageModel<CustomerInfoResult>() { success = false, msg = "获取失败,用户信息为空" };
|
||||
var years = info.Year > 2023 ? 2023 : info.Year;
|
||||
var typename = info.subjectgroupName.Length > 2 ? "综合" : info.subjectgroupName;
|
||||
var batchlist = await t_BatchlineRepository.Query(c => c.Year == years && c.AreaName == info.AreaName && c.Type_name == typename);
|
||||
string BatchName = string.Empty;
|
||||
if (info.AreaName == "河南省")
|
||||
try
|
||||
{
|
||||
BatchName = batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "本科一批").Any() ? "本科一批" : batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "本科二批").Any() ? "本科二批" : "专科批";
|
||||
}
|
||||
else
|
||||
{
|
||||
BatchName = batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "普通类一段").Any() ? "普通类一段" : "普通类二段";
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(info.Phone) && !info.IsVIP)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
var info = await _dal.QueryById(query.Id);
|
||||
if (info == null || info.IsDelete)
|
||||
return new MessageModel<CustomerInfoResult>() { success = false, msg = "获取失败,用户信息为空" };
|
||||
var years = info.Year > 2023 ? 2023 : info.Year;
|
||||
var typename = info.subjectgroupName.Length > 2 ? "综合" : info.subjectgroupName;
|
||||
var batchlist = await t_BatchlineRepository.Query(c => c.Year == years && c.AreaName == info.AreaName && c.Type_name == typename);
|
||||
string BatchName = string.Empty;
|
||||
if (info.AreaName == "河南省")
|
||||
{
|
||||
SyncXET(info);
|
||||
});
|
||||
}
|
||||
|
||||
return new MessageModel<CustomerInfoResult>()
|
||||
{
|
||||
success = true,
|
||||
msg = "获取成功",
|
||||
response = new CustomerInfoResult()
|
||||
{
|
||||
AvatarUrl = info.AvatarUrl,
|
||||
UserCode = info.UserCode,
|
||||
Gender = info.Gender,
|
||||
Id = info.Id,
|
||||
OpenId = info.OpenId,
|
||||
NickName = info.NickName,
|
||||
AreaId = info.AreaId,
|
||||
AreaName = info.AreaName,
|
||||
Datainit = info.Datainit,
|
||||
Expectedscore = info.Expectedscore,
|
||||
Phone = info.Phone,
|
||||
Rank = info.Rank,
|
||||
IsVIP = info.IsVIP,
|
||||
Subject = info.Subject,
|
||||
Subjectgroup = info.Subjectgroup,
|
||||
subjectgroupName = info.subjectgroupName,
|
||||
VipCode = info.VipCode,
|
||||
IsUpdateScore = info.IsUpdateScore,
|
||||
Year = info.Year,
|
||||
SchoolName = info.SchoolName,
|
||||
ClassName = info.ClassName,
|
||||
BatchName = BatchName
|
||||
BatchName = batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "本科一批").Any() ? "本科一批" : batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "本科二批").Any() ? "本科二批" : "专科批";
|
||||
}
|
||||
};
|
||||
else
|
||||
{
|
||||
BatchName = batchlist.Where(c => c.Average <= info.Expectedscore && c.Batch_name == "普通类一段").Any() ? "普通类一段" : "普通类二段";
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(info.Phone) && !info.IsVIP)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
SyncXET(info);
|
||||
});
|
||||
}
|
||||
|
||||
return new MessageModel<CustomerInfoResult>()
|
||||
{
|
||||
success = true,
|
||||
msg = "获取成功",
|
||||
response = new CustomerInfoResult()
|
||||
{
|
||||
AvatarUrl = info.AvatarUrl,
|
||||
UserCode = info.UserCode,
|
||||
Gender = info.Gender,
|
||||
Id = info.Id,
|
||||
OpenId = info.OpenId,
|
||||
NickName = info.NickName,
|
||||
AreaId = info.AreaId,
|
||||
AreaName = info.AreaName,
|
||||
Datainit = info.Datainit,
|
||||
Expectedscore = info.Expectedscore,
|
||||
Phone = info.Phone,
|
||||
Rank = info.Rank,
|
||||
IsVIP = info.IsVIP,
|
||||
Subject = info.Subject,
|
||||
Subjectgroup = info.Subjectgroup,
|
||||
subjectgroupName = info.subjectgroupName,
|
||||
VipCode = info.VipCode,
|
||||
IsUpdateScore = info.IsUpdateScore,
|
||||
Year = info.Year,
|
||||
SchoolName = info.SchoolName,
|
||||
ClassName = info.ClassName,
|
||||
BatchName = BatchName
|
||||
}
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new MessageModel<CustomerInfoResult>()
|
||||
{
|
||||
msg = ex.Message,
|
||||
success = false
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue