feat:新增基础数据表
parent
8a3dab4dcd
commit
b6a6769c33
|
|
@ -37,7 +37,7 @@ namespace New_College.Api.Controllers.Front
|
|||
try
|
||||
{
|
||||
var list = new List<NewsInfoResponse>();
|
||||
var query = (await d_NewsInfo.Query(e => e.IsDelete == false && e.CategoryId == request.CategoryId)).Take(request.Top).OrderByDescending(s => s.CreateTime);
|
||||
var query = (await d_NewsInfo.Query(e => e.IsDelete == false && e.CategoryId == request.CategoryId, " CreateTime desc")).Take(request.Top).OrderByDescending(s => s.Id);
|
||||
list = query.Select(s => new NewsInfoResponse
|
||||
{
|
||||
CoverImg = s.CoverImg,
|
||||
|
|
@ -75,7 +75,7 @@ namespace New_College.Api.Controllers.Front
|
|||
var pageresponse = new PageModel<NewsInfoResponse>();
|
||||
try
|
||||
{
|
||||
var pageinfo = await d_NewsInfo.QueryPage(w => w.CategoryId == request.CategoryId, request.PageIndex, request.PageSize);
|
||||
var pageinfo = await d_NewsInfo.QueryPage(w => w.CategoryId == request.CategoryId, request.PageIndex, request.PageSize, "CreateTime desc");
|
||||
if (pageinfo.data.Any())
|
||||
{
|
||||
pageresponse.data = pageinfo.data.Select(s => new NewsInfoResponse()
|
||||
|
|
|
|||
|
|
@ -205,6 +205,31 @@
|
|||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_HollandMapExplain.Tag">
|
||||
<summary>
|
||||
标签
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_HollandMapExplain.Description">
|
||||
<summary>
|
||||
描述
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_HollandMapExplain.BaseProperty">
|
||||
<summary>
|
||||
基本属性特征
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_HollandMapExplain.OccupationProperty">
|
||||
<summary>
|
||||
职业特征
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_HollandMapExplain.Occupation">
|
||||
<summary>
|
||||
典型职业
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_Major.CategoryClass_Id">
|
||||
<summary>
|
||||
专业二级分类id
|
||||
|
|
@ -776,6 +801,11 @@
|
|||
人物昵称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_TagMapPerson.Description">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.D_TagMapPerson.AvatarUrl">
|
||||
<summary>
|
||||
人物头像
|
||||
|
|
@ -1872,6 +1902,11 @@
|
|||
标签
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.Test_MBTIMapResult.PersonType">
|
||||
<summary>
|
||||
人格类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.Models.Test_MBTIMapResult.Domain">
|
||||
<summary>
|
||||
适合的领域
|
||||
|
|
@ -4970,6 +5005,11 @@
|
|||
测评结果
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.ViewModels.UserResult.PersonType">
|
||||
<summary>
|
||||
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:New_College.Model.ViewModels.UserResult.Tag">
|
||||
<summary>
|
||||
标签
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ namespace New_College
|
|||
});
|
||||
|
||||
// 生成种子数据
|
||||
// app.UseSeedDataMildd(myContext, Env.WebRootPath);
|
||||
app.UseSeedDataMildd(myContext, Env.WebRootPath);
|
||||
// 开启QuartzNetJob调度服务
|
||||
app.UseQuartzJobMildd(tasksQzServices, schedulerCenter);
|
||||
//服务注册
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
using New_College.IServices.BASE;
|
||||
using New_College.Model.Models;
|
||||
|
||||
namespace New_College.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// ID_HollandMapExplainServices
|
||||
/// </summary>
|
||||
public interface ID_HollandMapExplainServices :IBaseServices<D_HollandMapExplain>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using New_College.IServices.BASE;
|
||||
using New_College.Model.Models;
|
||||
|
||||
namespace New_College.IServices
|
||||
{
|
||||
/// <summary>
|
||||
/// IHoldGroupMapOccupServices
|
||||
/// </summary>
|
||||
public interface IHoldGroupMapOccupServices :IBaseServices<HoldGroupMapOccup>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace New_College.Model.Models
|
||||
{
|
||||
public class D_HollandMapExplain : EntityModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 标签
|
||||
/// </summary>
|
||||
public string Tag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基本属性特征
|
||||
/// </summary>
|
||||
public string BaseProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 职业特征
|
||||
/// </summary>
|
||||
public string OccupationProperty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///典型职业
|
||||
/// </summary>
|
||||
public string Occupation { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +17,10 @@ namespace New_College.Model.Models
|
|||
/// </summary>
|
||||
public string NickName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace New_College.Model.Models
|
||||
{
|
||||
public class HoldGroupMapOccup : EntityModel
|
||||
{
|
||||
[SugarColumn(Length = 20, IsNullable = true, ColumnDataType = "varchar")]
|
||||
public string Tag { get; set; }
|
||||
|
||||
[SugarColumn(Length = 1500, IsNullable = true, ColumnDataType = "varchar")]
|
||||
public string Occupation { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -12,6 +12,11 @@ namespace New_College.Model.Models
|
|||
/// </summary>
|
||||
public string Tag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人格类型
|
||||
/// </summary>
|
||||
public string PersonType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 适合的领域
|
||||
/// </summary>
|
||||
|
|
@ -43,6 +48,10 @@ namespace New_College.Model.Models
|
|||
[SugarColumn(Length = 1000, IsNullable = true, ColumnDataType = "nvarchar")]
|
||||
public string BlindSpot { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(Length = 800, IsNullable = true, ColumnDataType = "nvarchar")]
|
||||
public string Occupation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 建议
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,10 @@ namespace New_College.Model.ViewModels
|
|||
public class EvBillDTO
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public List<decimal> BillDatas { get; set; }
|
||||
public List<int> data { get; set; }
|
||||
|
||||
public List<serie> series { get; set; }
|
||||
public List<string> categories { get; set; }
|
||||
public List<EvBillcator> Billcators { get; set; }
|
||||
}
|
||||
|
||||
|
|
@ -152,6 +155,12 @@ namespace New_College.Model.ViewModels
|
|||
public class UserResult
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PersonType { get; set; }
|
||||
|
||||
public string Occupation { get; set; }
|
||||
/// <summary>
|
||||
/// 标签
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
using New_College.IRepository;
|
||||
using New_College.IRepository.UnitOfWork;
|
||||
using New_College.Model.Models;
|
||||
using New_College.Repository.Base;
|
||||
|
||||
namespace New_College.Repository
|
||||
{
|
||||
/// <summary>
|
||||
/// D_HollandMapExplainRepository
|
||||
/// </summary>
|
||||
public class D_HollandMapExplainRepository : BaseRepository<D_HollandMapExplain>, ID_HollandMapExplainRepository
|
||||
{
|
||||
public D_HollandMapExplainRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using New_College.IRepository;
|
||||
using New_College.IRepository.UnitOfWork;
|
||||
using New_College.Model.Models;
|
||||
using New_College.Repository.Base;
|
||||
|
||||
namespace New_College.Repository
|
||||
{
|
||||
/// <summary>
|
||||
/// HoldGroupMapOccupRepository
|
||||
/// </summary>
|
||||
public class HoldGroupMapOccupRepository : BaseRepository<HoldGroupMapOccup>, IHoldGroupMapOccupRepository
|
||||
{
|
||||
public HoldGroupMapOccupRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using New_College.IRepository.Base;
|
||||
using New_College.Model.Models;
|
||||
|
||||
namespace New_College.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// ID_HollandMapExplainRepository
|
||||
/// </summary>
|
||||
public interface ID_HollandMapExplainRepository : IBaseRepository<D_HollandMapExplain>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using New_College.IRepository.Base;
|
||||
using New_College.Model.Models;
|
||||
|
||||
namespace New_College.IRepository
|
||||
{
|
||||
/// <summary>
|
||||
/// IHoldGroupMapOccupRepository
|
||||
/// </summary>
|
||||
public interface IHoldGroupMapOccupRepository : IBaseRepository<HoldGroupMapOccup>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
using New_College.IServices;
|
||||
using New_College.Model.Models;
|
||||
using New_College.Services.BASE;
|
||||
using New_College.IRepository.Base;
|
||||
|
||||
namespace New_College.Services
|
||||
{
|
||||
public class D_HollandMapExplainServices : BaseServices<D_HollandMapExplain>, ID_HollandMapExplainServices
|
||||
{
|
||||
private readonly IBaseRepository<D_HollandMapExplain> _dal;
|
||||
public D_HollandMapExplainServices(IBaseRepository<D_HollandMapExplain> dal)
|
||||
{
|
||||
this._dal = dal;
|
||||
base.BaseDal = dal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
using New_College.IServices;
|
||||
using New_College.Model.Models;
|
||||
using New_College.Services.BASE;
|
||||
using New_College.IRepository.Base;
|
||||
|
||||
namespace New_College.Services
|
||||
{
|
||||
public class HoldGroupMapOccupServices : BaseServices<HoldGroupMapOccup>, IHoldGroupMapOccupServices
|
||||
{
|
||||
private readonly IBaseRepository<HoldGroupMapOccup> _dal;
|
||||
public HoldGroupMapOccupServices(IBaseRepository<HoldGroupMapOccup> dal)
|
||||
{
|
||||
this._dal = dal;
|
||||
base.BaseDal = dal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -480,7 +480,7 @@ namespace New_College.Services
|
|||
/// <returns></returns>
|
||||
public async Task<UserResult> GetMBTIResult(ResultLookQuery query)
|
||||
{
|
||||
var info = await _dal.Query(x => x.CategoryId == query.CategoryId && x.StudentId == query.StudentId && x.CycleTimeId == query.CycleTimeId);
|
||||
var info = await _dal.Query(x => x.CategoryId == query.CategoryId && x.StudentId == query.StudentId);
|
||||
if (info.Count() <= 0 || string.IsNullOrEmpty(info?.FirstOrDefault()?.Result))
|
||||
return new UserResult() { };
|
||||
var mbtiresult = (await test_MBTIMapResultRepository.Query(x => x.Tag == info.FirstOrDefault().Result))?.FirstOrDefault();
|
||||
|
|
@ -488,6 +488,8 @@ namespace New_College.Services
|
|||
return new UserResult() { };
|
||||
return new UserResult()
|
||||
{
|
||||
Occupation=mbtiresult.Occupation,
|
||||
PersonType = mbtiresult.PersonType,
|
||||
Advantage = mbtiresult.Advantage,
|
||||
BlindSpot = mbtiresult.BlindSpot,
|
||||
Disadvantage = mbtiresult.Disadvantage,
|
||||
|
|
@ -801,15 +803,16 @@ namespace New_College.Services
|
|||
newlist.Add(new IntellectJson() { name = "地理", value = 0 });
|
||||
|
||||
EvBillDTO subjectinterest = new EvBillDTO() { };
|
||||
var chartsinterestvalue = new List<decimal>();
|
||||
var chartsinterestvalue = new List<int>();
|
||||
var evbillinterest = new List<EvBillcator>();
|
||||
|
||||
EvBillDTO subjectability = new EvBillDTO() { };
|
||||
var chartsabilitvalue = new List<decimal>();
|
||||
var chartsabilitvalue = new List<int>();
|
||||
var evbillabilit = new List<EvBillcator>();
|
||||
var result = JsonConvert.DeserializeObject<List<SubjectSelectJson>>(info.Result);
|
||||
|
||||
var xqinfo = result.Where(w => w.name == "学科兴趣");
|
||||
var categoryNames = new List<string>();
|
||||
if (xqinfo.Any())
|
||||
{
|
||||
var xq = xqinfo.FirstOrDefault().value;
|
||||
|
|
@ -842,8 +845,22 @@ namespace New_College.Services
|
|||
newlist.Where(x => x.name == "地理").FirstOrDefault().value += item.value;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
subjectinterest.BillDatas = chartsinterestvalue;
|
||||
subjectinterest.data = chartsinterestvalue;
|
||||
subjectinterest.series = new List<serie>() { new serie()
|
||||
{
|
||||
data = chartsinterestvalue,
|
||||
name = "学科兴趣%"
|
||||
}
|
||||
};
|
||||
subjectinterest.categories = new List<string>() {"物理",
|
||||
"化学",
|
||||
"生物",
|
||||
"政治",
|
||||
"历史",
|
||||
"地理" };
|
||||
|
||||
var subjectinterestnewsort = xq.OrderByDescending(x => x.value);
|
||||
subjectinterest.Name = string.Join("|", subjectinterestnewsort.Take(3).Select(x => x.name).ToList());
|
||||
|
|
@ -888,10 +905,10 @@ namespace New_College.Services
|
|||
newlist.Where(x => x.name == "地理").FirstOrDefault().value += item.value;
|
||||
break;
|
||||
}
|
||||
subjectability.BillDatas = chartsabilitvalue;
|
||||
subjectability.data = chartsabilitvalue;
|
||||
|
||||
var subjectabilitynewsort = nl.OrderByDescending(x => x.value);
|
||||
subjectability.Name = string.Join("|", subjectabilitynewsort.Take(3).Select(x => x.name).ToList());
|
||||
subjectability.Name = string.Join("+", subjectabilitynewsort.Take(3).Select(x => x.name).ToList());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -904,7 +921,7 @@ namespace New_College.Services
|
|||
evbillabilit.Add(new EvBillcator() { max = 32, text = "地理" });
|
||||
|
||||
var namelist = newlist.OrderByDescending(x => x.value).Take(3).Select(x => x.name).ToList();
|
||||
var Name = string.Join("|", namelist);
|
||||
var Name = string.Join("+", namelist);
|
||||
return new MessageModel<SubjectEvBillDTO>()
|
||||
{
|
||||
success = true,
|
||||
|
|
@ -1247,7 +1264,7 @@ namespace New_College.Services
|
|||
var categoryids = new List<int>();
|
||||
categoryids.Add(18);
|
||||
categoryids.Add(19);
|
||||
categoryids.Add(21);
|
||||
categoryids.Add(20);
|
||||
var querys = await _dal.Query(e => e.StudentId == request.CustomerId && categoryids.Contains(e.CategoryId));
|
||||
|
||||
lists.Add(new EvaluationResponse()
|
||||
|
|
@ -1260,7 +1277,7 @@ namespace New_College.Services
|
|||
});
|
||||
lists.Add(new EvaluationResponse()
|
||||
{
|
||||
Title = "DISC"
|
||||
Title = "学科兴趣"
|
||||
});
|
||||
try
|
||||
{
|
||||
|
|
@ -1270,24 +1287,34 @@ namespace New_College.Services
|
|||
{
|
||||
case "Holland":
|
||||
var holland = querys.Where(e => e.CategoryId == 18).FirstOrDefault();
|
||||
if (holland != null)
|
||||
{
|
||||
a.Message = JsonConvert.DeserializeObject<TagtestingHollandResult>(holland.Result).TagName;
|
||||
a.PId = holland.Id;
|
||||
a.Status = 1;
|
||||
}
|
||||
break;
|
||||
case "MBTI":
|
||||
var mbti = querys.Where(e => e.CategoryId == 19).FirstOrDefault();
|
||||
if (mbti != null)
|
||||
{
|
||||
a.Message = mbti.Result;
|
||||
a.PId = mbti.Id;
|
||||
a.Status = 1;
|
||||
}
|
||||
break;
|
||||
case "DISC":
|
||||
case "学科兴趣":
|
||||
var disc = querys.Where(e => e.CategoryId == 20);
|
||||
if (disc.Any())
|
||||
{
|
||||
a.PId = disc.FirstOrDefault().Id;
|
||||
}
|
||||
a.Message = "有魅力的、自信的、有说服力的、热情的、鼓舞人心的、乐观的、令人信服的、受欢迎的、好交际的、可信赖的";
|
||||
var result = JsonConvert.DeserializeObject<List<SubjectSelectJson>>(disc.FirstOrDefault().Result);
|
||||
var xqinfo = result.Where(w => w.name == "学科兴趣");
|
||||
var subjectinterestnewsort = xqinfo.FirstOrDefault().value.OrderByDescending(x => x.value);
|
||||
a.Message = string.Join("|", subjectinterestnewsort.Take(3).Select(x => x.name).ToList());
|
||||
a.Status = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue