bug fixed

develop
old易 2023-11-30 14:33:28 +08:00
parent 398768d4d2
commit cb6d1c387e
5 changed files with 72 additions and 8 deletions

View File

@ -214,6 +214,25 @@ namespace New_College.Api.Controllers.Front
/// <summary>
/// 外部获取标签解释
/// </summary>
/// <param name="tagName"></param>
/// <returns></returns>
[HttpGet]
public async Task<MessageModel<HollandOccupDetail>> GetOutHollandOccupDetail(string tagName)
{
var result = await test_PsychMeasurementInfoServices.GetOutHollandOccupDetail(tagName);
return new MessageModel<HollandOccupDetail>()
{
success = true,
msg = "获取成功",
response = result
};
}
/// <summary>
/// 获取MBTI测评结果
/// </summary>

View File

@ -645,6 +645,13 @@
<param name="query"></param>
<returns></returns>
</member>
<member name="M:New_College.Api.Controllers.Front.TestController.GetOutHollandOccupDetail(System.String)">
<summary>
外部获取标签解释
</summary>
<param name="tagName"></param>
<returns></returns>
</member>
<member name="M:New_College.Api.Controllers.Front.TestController.GetMBTIResult(New_College.Model.ViewModels.ResultLookQuery)">
<summary>
获取MBTI测评结果

View File

@ -23,6 +23,14 @@ namespace New_College.IServices
Task<bool> SaveHolland(SaveHollandQuery query);
Task<HollandOccupDetail> GetHollandOccupDetail(ResultLookQuery query);
/// <summary>
///
/// </summary>
/// <param name="tagName"></param>
/// <returns></returns>
Task<HollandOccupDetail> GetOutHollandOccupDetail(string tagName);
Task<TagtestingHollandResult> GetHollandResult(ResultLookQuery query);
Task<UserResult> GetMBTIResult(ResultLookQuery query);

View File

@ -125,7 +125,8 @@ namespace New_College.Services
PlanCount = k.PlanCount,
RankLine = k.LowScoreRank,
Scoreline = k.LowScoreRank,
Year = k.Years.ToString()
Year = k.Years.ToString(),
Count = "--"
}).ToList()
}).ToList(),
@ -234,7 +235,8 @@ namespace New_College.Services
PlanCount = s.PlanCount,
RankLine = s.LowScoreRank,
Scoreline = s.LowScore,
Year = s.Years.ToString()
Year = s.Years.ToString(),
Count = "--"
}).OrderByDescending(k => k.Year).ToList()
}).OrderByDescending(c => c.Type).OrderBy(c => c.LowScoreRank).ToList();

View File

@ -510,13 +510,41 @@ namespace New_College.Services
OccupationProperty = occupationprop.Replace(" ","").Replace("1","").Replace("2", "").Replace("3", "").Replace("4", "").Replace("5", "").Split('.', StringSplitOptions.RemoveEmptyEntries).ToList(),
Occupation = occupation
};
return response;
}
public async Task<HollandOccupDetail> GetOutHollandOccupDetail(string tagName)
{
var response = new HollandOccupDetail();
Test_PsychMeasurementInfo info = new Test_PsychMeasurementInfo() { };
var tagmappersons = await _TagMapPersonRepository.Query(c => SqlFunc.Contains(tagName, c.Tag));
response.tagMapPeople = tagmappersons.Select(c => new HollandTagMapPerson() { AvatarUrl = c.AvatarUrl, NickName = c.NickName }).ToList();
var tagmapexplain = await _HollandMapExplainRepository.Query(c => SqlFunc.Contains(tagName, c.Tag));
var baseprop = string.Empty;
var occupationprop = string.Empty;
var description = string.Empty;
var occupation = string.Empty;
tagmapexplain.ForEach(a =>
{
baseprop += a.BaseProperty.Replace(" ", "").Replace("1.", "<br/>").Replace("2.", "<br/>").Replace("3.", "<br/>").Replace("4.", "<br/>").Replace("5.", "<br/>");
occupationprop += a.OccupationProperty;
description += a.Description;
occupation += a.Occupation;
});
response.tagMapExplain = new HollandTagMapExplain()
{
BaseProperty = baseprop,
Description = description,
OccupationProperty = occupationprop.Replace(" ", "").Replace("1", "").Replace("2", "").Replace("3", "").Replace("4", "").Replace("5", "").Split('.', StringSplitOptions.RemoveEmptyEntries).ToList(),
Occupation = occupation
};
return response;
}
/// <summary>
/// 获取霍兰德测评结果
/// </summary>