From 24d9764e7898036f30b3e7abf00fe24b3c4d0267 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=93=E5=A4=A7=E5=B8=88?= <156663459@qq.com>
Date: Sun, 21 Feb 2021 23:22:38 +0800
Subject: [PATCH] bug fix
---
New_College.Api/New_College.Model.xml | 10 ++++++++++
New_College.Model/Models/V_VipCardInfo.cs | 2 ++
.../ViewModels/Query/EnrollmentPlanRequest.cs | 2 ++
.../ViewModels/Query/VipCardQuery.cs | 2 ++
.../BASE/T_EnrollmentPlaneRepository.cs | 1 +
.../T_EnrollmentPlanedescServices.cs | 4 ++--
.../Test_PsychMeasurementInfoServices.cs | 12 +++++++++---
New_College.Services/V_VipCardInfoServices.cs | 18 +++++++++---------
8 files changed, 37 insertions(+), 14 deletions(-)
diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml
index e05e562..03e16ab 100644
--- a/New_College.Api/New_College.Model.xml
+++ b/New_College.Api/New_College.Model.xml
@@ -5219,6 +5219,16 @@
志愿表详情
+
+
+ 省市区名称
+
+
+
+
+ 年份
+
+
志愿列表
diff --git a/New_College.Model/Models/V_VipCardInfo.cs b/New_College.Model/Models/V_VipCardInfo.cs
index 9d921a6..c450c8c 100644
--- a/New_College.Model/Models/V_VipCardInfo.cs
+++ b/New_College.Model/Models/V_VipCardInfo.cs
@@ -11,6 +11,8 @@ namespace New_College.Model.Models
///
public string Code { get; set; }
+ public string Pwd { get; set; }
+
///
/// 是否一绑定
///
diff --git a/New_College.Model/ViewModels/Query/EnrollmentPlanRequest.cs b/New_College.Model/ViewModels/Query/EnrollmentPlanRequest.cs
index 3569516..4297a2f 100644
--- a/New_College.Model/ViewModels/Query/EnrollmentPlanRequest.cs
+++ b/New_College.Model/ViewModels/Query/EnrollmentPlanRequest.cs
@@ -16,5 +16,7 @@ namespace New_College.Model.ViewModels.Query
public int PlanId { get; set; }
+ public string BatchName { get; set; }
+
}
}
diff --git a/New_College.Model/ViewModels/Query/VipCardQuery.cs b/New_College.Model/ViewModels/Query/VipCardQuery.cs
index 8e8ca98..5548c6c 100644
--- a/New_College.Model/ViewModels/Query/VipCardQuery.cs
+++ b/New_College.Model/ViewModels/Query/VipCardQuery.cs
@@ -9,6 +9,8 @@ namespace New_College.Model.ViewModels
public int CustomerId { get; set; }
public string CardCode { get; set; }
+
+ public string CardPwd { get; set; }
}
public class AutoVipInfoQuery
diff --git a/New_College.Repository/BASE/T_EnrollmentPlaneRepository.cs b/New_College.Repository/BASE/T_EnrollmentPlaneRepository.cs
index e830dc1..7135fab 100644
--- a/New_College.Repository/BASE/T_EnrollmentPlaneRepository.cs
+++ b/New_College.Repository/BASE/T_EnrollmentPlaneRepository.cs
@@ -31,6 +31,7 @@ namespace New_College.Repository
.Where((plans, universitys) => plans.PlanId == request.PlanId)
.WhereIF(!string.IsNullOrEmpty(request.UniversityName), (plans, universitys, batchs) => universitys.Name.Contains(request.UniversityName))
.WhereIF(!string.IsNullOrEmpty(request.MajorName), (plans, universitys, batchs) => plans.MajorName.Contains(request.MajorName))
+ .WhereIF(!string.IsNullOrEmpty(request.BatchName), (plans, universitys, batchs) => batchs.Batch_name.Contains(request.BatchName))
.OrderBy((plans) => plans.OrderSort, OrderByType.Desc).Select((plans, universitys, batchs) => new EnrollmentPlansResult
{
Id = plans.Id,
diff --git a/New_College.Services/T_EnrollmentPlanedescServices.cs b/New_College.Services/T_EnrollmentPlanedescServices.cs
index c8f060e..c2ef111 100644
--- a/New_College.Services/T_EnrollmentPlanedescServices.cs
+++ b/New_College.Services/T_EnrollmentPlanedescServices.cs
@@ -988,7 +988,7 @@ namespace New_College.Services
Sff = item.Sff,
Syl = item.Syl,
AreaName = item.Area_Name,
- Year = query.Year,
+ Year = query.Year.ToString(),
Infos = plansinfo.Select(x => new PlanInfo()
{
MajorId = x.Id,
@@ -1670,7 +1670,7 @@ namespace New_College.Services
///
public async Task>> GetVolunteerTableList(IdQuery query)
{
- var info = await u_VolunteerTableRepository.Query(x => x.IsDelete == false && x.CustomerId == query.Id);
+ var info = await u_VolunteerTableRepository.Query(x => x.IsDelete == false && x.CustomerId == query.CustomerId);
if (info.Count <= 0)
return new MessageModel>() { success = false, msg = "获取失败,暂无志愿表" };
return new MessageModel>()
diff --git a/New_College.Services/Test_PsychMeasurementInfoServices.cs b/New_College.Services/Test_PsychMeasurementInfoServices.cs
index 6bf0240..5303af5 100644
--- a/New_College.Services/Test_PsychMeasurementInfoServices.cs
+++ b/New_College.Services/Test_PsychMeasurementInfoServices.cs
@@ -1267,16 +1267,22 @@ namespace New_College.Services
var holland = querys.Where(e => e.CategoryId == 18).FirstOrDefault();
a.Message = JsonConvert.DeserializeObject(holland.Result).TagName;
a.PId = holland.Id;
+ a.Status = 1;
break;
case "MBTI":
- var mbti = querys.Where(e => e.CategoryId == 18).FirstOrDefault();
+ var mbti = querys.Where(e => e.CategoryId == 19).FirstOrDefault();
a.Message = mbti.Result;
a.PId = mbti.Id;
+ a.Status = 1;
break;
case "DISC":
- var disc = querys.Where(e => e.CategoryId == 18).FirstOrDefault();
+ var disc = querys.Where(e => e.CategoryId == 20);
+ if (disc.Any())
+ {
+ a.PId = disc.FirstOrDefault().Id;
+ }
a.Message = "有魅力的、自信的、有说服力的、热情的、鼓舞人心的、乐观的、令人信服的、受欢迎的、好交际的、可信赖的";
- a.PId = disc.Id;
+ a.Status = 1;
break;
}
});
diff --git a/New_College.Services/V_VipCardInfoServices.cs b/New_College.Services/V_VipCardInfoServices.cs
index 4deb9e6..72c5467 100644
--- a/New_College.Services/V_VipCardInfoServices.cs
+++ b/New_College.Services/V_VipCardInfoServices.cs
@@ -45,7 +45,7 @@ namespace New_College.Services
var info = await v_CustomerInfoRepository.QueryById(query.CustomerId);
if (info == null)
return new MessageModel() { success = false, msg = "用户信息异常,你重新登录" };
- var cardinfo = (await _dal.Query(x => x.IsDelete == false && x.Code == query.CardCode)).FirstOrDefault();
+ var cardinfo = (await _dal.Query(x => x.IsDelete == false && x.Code == query.CardCode && x.Pwd == query.CardPwd)).FirstOrDefault();
if (cardinfo == null || cardinfo != null && cardinfo.IsBind == 1)
return new MessageModel() { success = false, msg = "会员卡号有误或已被绑定" };
cardinfo.IsBind = 1;
@@ -230,7 +230,7 @@ namespace New_College.Services
}
#region 生成卡号
-
+
#endregion
@@ -243,9 +243,9 @@ namespace New_College.Services
{
var wheres = PredicateBuilder.New();
wheres = wheres.And(x => x.IsDelete == false);
- if (!string.IsNullOrWhiteSpace(query.IsBind) && query.IsBind!="2")
- wheres = wheres.And(x => x.IsBind ==Convert.ToInt32( query.IsBind));
- if (!string.IsNullOrWhiteSpace( query.Code ))
+ if (!string.IsNullOrWhiteSpace(query.IsBind) && query.IsBind != "2")
+ wheres = wheres.And(x => x.IsBind == Convert.ToInt32(query.IsBind));
+ if (!string.IsNullOrWhiteSpace(query.Code))
wheres = wheres.And(x => x.Code.Contains(query.Code));
if (!string.IsNullOrWhiteSpace(query.CardTypeId) && query.CardTypeId != "0")
wheres = wheres.And(x => x.CardTypeId == Convert.ToInt32(query.CardTypeId));
@@ -324,11 +324,11 @@ namespace New_College.Services
//首先获取选择对应的CardType信息
var wheres = PredicateBuilder.New();
wheres = wheres.And(x => x.IsDelete == false);
- if (query.CardTypeId>0)
- wheres = wheres.And(x => x.Id==query.CardTypeId);
+ if (query.CardTypeId > 0)
+ wheres = wheres.And(x => x.Id == query.CardTypeId);
var info = await v_VipCardTypeRepository.Query(wheres);
var CardTypeList = info.Select(x => x.Id).ToList();
- var listCard = await v_VipCardTypeRepository.Query(x => query.CardTypeId==x.Id && x.IsDelete == false);
+ var listCard = await v_VipCardTypeRepository.Query(x => query.CardTypeId == x.Id && x.IsDelete == false);
var CardTypeOne = listCard.Where(x => x.Id == query.CardTypeId).FirstOrDefault();
@@ -338,7 +338,7 @@ namespace New_College.Services
Day = CardTypeOne.Day,
Money = CardTypeOne.Money,
CardTypeId = CardTypeOne.Id,
- CardTypeName= CardTypeOne.Name,
+ CardTypeName = CardTypeOne.Name,
});
if (result > 0)