feat:新增数据模块

develop
old易 2023-09-22 18:15:48 +08:00
parent 865829931a
commit d2436c098d
30 changed files with 1229 additions and 36 deletions

View File

@ -0,0 +1,77 @@
using New_College.IServices;
using New_College.Model;
using New_College.Model.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace New_College.Api.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
[Authorize(Permissions.Name)]
public class D_PlanMajorDescController : ControllerBase
{
/// <summary>
/// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
/// </summary>
private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
public D_PlanMajorDescController(ID_PlanMajorDescServices D_PlanMajorDescServices)
{
_d_PlanMajorDescServices = D_PlanMajorDescServices;
}
[HttpGet]
public async Task<MessageModel<PageModel<D_PlanMajorDesc>>> Get(int page = 1, string key = "", int intPageSize = 50)
{
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
{
key = "";
}
Expression<Func<D_PlanMajorDesc, bool>> whereExpression = a => a.Id > 0;
return new MessageModel<PageModel<D_PlanMajorDesc>>()
{
msg = "获取成功",
success = true,
response = await _d_PlanMajorDescServices.QueryPage(whereExpression, page, intPageSize)
};
}
[HttpGet("{id}")]
public async Task<MessageModel<D_PlanMajorDesc>> Get(int id = 0)
{
return new MessageModel<D_PlanMajorDesc>()
{
msg = "获取成功",
success = true,
response = await _d_PlanMajorDescServices.QueryById(id)
};
}
[HttpPost]
public async Task<MessageModel<string>> Post([FromBody] D_PlanMajorDesc request)
{
var data = new MessageModel<string>();
var id = await _d_PlanMajorDescServices.Add(request);
data.success = id > 0;
if (data.success)
{
data.response = id.ObjToString();
data.msg = "添加成功";
}
return data;
}
}
}

View File

@ -0,0 +1,76 @@
using New_College.IServices;
using New_College.Model;
using New_College.Model.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace New_College.Api.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
[Authorize(Permissions.Name)]
public class D_PlanMajorScoreLineController : ControllerBase
{
/// <summary>
/// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
/// </summary>
private readonly ID_PlanMajorScoreLineServices _d_PlanMajorScoreLineServices;
public D_PlanMajorScoreLineController(ID_PlanMajorScoreLineServices D_PlanMajorScoreLineServices)
{
_d_PlanMajorScoreLineServices = D_PlanMajorScoreLineServices;
}
[HttpGet]
public async Task<MessageModel<PageModel<D_PlanMajorScoreLine>>> Get(int page = 1, string key = "", int intPageSize = 50)
{
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
{
key = "";
}
Expression<Func<D_PlanMajorScoreLine, bool>> whereExpression = a => a.Id > 0;
return new MessageModel<PageModel<D_PlanMajorScoreLine>>()
{
msg = "获取成功",
success = true,
response = await _d_PlanMajorScoreLineServices.QueryPage(whereExpression, page, intPageSize)
};
}
[HttpGet("{id}")]
public async Task<MessageModel<D_PlanMajorScoreLine>> Get(int id = 0)
{
return new MessageModel<D_PlanMajorScoreLine>()
{
msg = "获取成功",
success = true,
response = await _d_PlanMajorScoreLineServices.QueryById(id)
};
}
[HttpPost]
public async Task<MessageModel<string>> Post([FromBody] D_PlanMajorScoreLine request)
{
var data = new MessageModel<string>();
var id = await _d_PlanMajorScoreLineServices.Add(request);
data.success = id > 0;
if (data.success)
{
data.response = id.ObjToString();
data.msg = "添加成功";
}
return data;
}
}
}

View File

@ -0,0 +1,76 @@
using New_College.IServices;
using New_College.Model;
using New_College.Model.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace New_College.Api.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
[Authorize(Permissions.Name)]
public class D_QualificationLineController : ControllerBase
{
/// <summary>
/// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
/// </summary>
private readonly ID_QualificationLineServices _d_QualificationLineServices;
public D_QualificationLineController(ID_QualificationLineServices D_QualificationLineServices)
{
_d_QualificationLineServices = D_QualificationLineServices;
}
[HttpGet]
public async Task<MessageModel<PageModel<D_QualificationLine>>> Get(int page = 1, string key = "", int intPageSize = 50)
{
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
{
key = "";
}
Expression<Func<D_QualificationLine, bool>> whereExpression = a => a.Id > 0;
return new MessageModel<PageModel<D_QualificationLine>>()
{
msg = "获取成功",
success = true,
response = await _d_QualificationLineServices.QueryPage(whereExpression, page, intPageSize)
};
}
[HttpGet("{id}")]
public async Task<MessageModel<D_QualificationLine>> Get(int id = 0)
{
return new MessageModel<D_QualificationLine>()
{
msg = "获取成功",
success = true,
response = await _d_QualificationLineServices.QueryById(id)
};
}
[HttpPost]
public async Task<MessageModel<string>> Post([FromBody] D_QualificationLine request)
{
var data = new MessageModel<string>();
var id = await _d_QualificationLineServices.Add(request);
data.success = id > 0;
if (data.success)
{
data.response = id.ObjToString();
data.msg = "添加成功";
}
return data;
}
}
}

View File

@ -0,0 +1,77 @@
using New_College.IServices;
using New_College.Model;
using New_College.Model.Models;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace New_College.Api.Controllers
{
[Route("api/[controller]/[action]")]
[ApiController]
[Authorize(Permissions.Name)]
public class D_ScoreLineController : ControllerBase
{
/// <summary>
/// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
/// </summary>
private readonly ID_ScoreLineServices _d_ScoreLineServices;
public D_ScoreLineController(ID_ScoreLineServices D_ScoreLineServices)
{
_d_ScoreLineServices = D_ScoreLineServices;
}
[HttpGet]
public async Task<MessageModel<PageModel<D_ScoreLine>>> Get(int page = 1, string key = "",int intPageSize = 50)
{
if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
{
key = "";
}
Expression<Func<D_ScoreLine, bool>> whereExpression = a => a.Id > 0;
return new MessageModel<PageModel<D_ScoreLine>>()
{
msg = "获取成功",
success = true,
response = await _d_ScoreLineServices.QueryPage(whereExpression, page, intPageSize)
};
}
[HttpGet("{id}")]
public async Task<MessageModel<D_ScoreLine>> Get(int id = 0)
{
return new MessageModel<D_ScoreLine>()
{
msg = "获取成功",
success = true,
response = await _d_ScoreLineServices.QueryById(id)
};
}
[HttpPost]
public async Task<MessageModel<string>> Post([FromBody] D_ScoreLine request)
{
var data = new MessageModel<string>();
var id = await _d_ScoreLineServices.Add(request);
data.success = id > 0;
if (data.success)
{
data.response = id.ObjToString();
data.msg = "添加成功";
}
return data;
}
}
}

View File

@ -13,9 +13,12 @@ namespace New_College.Controllers
public class HealthCheckController : ControllerBase
{
private readonly IT_EnrollmentPlaneServices t_EnrollmentPlane;
public HealthCheckController(IT_EnrollmentPlaneServices t_EnrollmentPlaneServices)
private readonly ID_LongIdMapServices d_LongIdMapServices;
public HealthCheckController(IT_EnrollmentPlaneServices t_EnrollmentPlaneServices, ID_LongIdMapServices d_LongIdMapServices)
{
t_EnrollmentPlane = t_EnrollmentPlaneServices;
this.d_LongIdMapServices = d_LongIdMapServices;
}
/// <summary>
@ -45,8 +48,9 @@ namespace New_College.Controllers
// return t_EnrollmentPlane.categoryupdate();
return t_EnrollmentPlane.ClassChildItems();
return d_LongIdMapServices.Import();
}
}

View File

@ -505,6 +505,237 @@
分类等级
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.UId">
<summary>
院校Id
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.UniversityName">
<summary>
院校名称
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.BatchName">
<summary>
批次
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.SelectSubject">
<summary>
选科要求
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.RootType">
<summary>
门类
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.FirstType">
<summary>
一级学科
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.Major">
<summary>
专业
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.AcademicYear">
<summary>
学制
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.Free">
<summary>
学费
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorDesc.Loction">
<summary>
生源地
</summary>
</member>
<member name="T:New_College.Model.Models.D_PlanMajorScoreLine">
<summary>
各省份每年招生计划专业分数线
年份 学校 批次 选科要求 门类 一级学科 专业 平均分 最高分 最低分 最低分排名 生源地
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.UId">
<summary>
院校Id
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.Years">
<summary>
年份
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.UniversityName">
<summary>
学校
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.BatchName">
<summary>
批次
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.SelectSubject">
<summary>
选科要求
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.RootType">
<summary>
门类
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.FirstType">
<summary>
一级学科
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.Major">
<summary>
专业
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.AvgScore">
<summary>
平均分
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.HighScore">
<summary>
最高分
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.LowScore">
<summary>
最低分
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.LowScoreRank">
<summary>
最低分排名
</summary>
</member>
<member name="P:New_College.Model.Models.D_PlanMajorScoreLine.Location">
<summary>
生源地
</summary>
</member>
<member name="T:New_College.Model.Models.D_QualificationLine">
<summary>
各个省份投档资格线
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.UId">
<summary>
院校Id
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.Years">
<summary>
年份
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.UniversityName">
<summary>
学校
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.Rank">
<summary>
软科排名
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.SubjectType">
<summary>
科类
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.BatchName">
<summary>
批次
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.LowScore">
<summary>
最低分
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.LowScoreRank">
<summary>
最低分排名
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.ProvinceScore">
<summary>
省控线
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.RecruitCode">
<summary>
招生代码
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.RecruitType">
<summary>
招生类型
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.EducationType">
<summary>
学历类别
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.FormerName">
<summary>
高校曾用名
</summary>
</member>
<member name="P:New_College.Model.Models.D_QualificationLine.Location">
<summary>
生源地
</summary>
</member>
<member name="T:New_College.Model.Models.D_ScoreLine">
<summary>
一分一段|省份 年份 科类 分数 本段人数 累计人数
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.Province">
<summary>
省份
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.Years">
<summary>
年份
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.Type">
<summary>
科类
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.Score">
<summary>
分数
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.Count">
<summary>
本段人数
</summary>
</member>
<member name="P:New_College.Model.Models.D_ScoreLine.SumCount">
<summary>
累计人数
</summary>
</member>
<member name="T:New_College.Model.Models.D_TagMapPerson">
<summary>
标签代表人物

View File

@ -108,6 +108,26 @@
</summary>
<returns></returns>
</member>
<member name="F:New_College.Api.Controllers.D_PlanMajorDescController._d_PlanMajorDescServices">
<summary>
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
</summary>
</member>
<member name="F:New_College.Api.Controllers.D_PlanMajorScoreLineController._d_PlanMajorScoreLineServices">
<summary>
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
</summary>
</member>
<member name="F:New_College.Api.Controllers.D_QualificationLineController._d_QualificationLineServices">
<summary>
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
</summary>
</member>
<member name="F:New_College.Api.Controllers.D_ScoreLineController._d_ScoreLineServices">
<summary>
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
</summary>
</member>
<member name="F:New_College.Api.Controllers.Sys_TenantController._sys_TenantServices">
<summary>
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下

View File

@ -215,7 +215,7 @@ namespace New_College
});
// 生成种子数据
// app.UseSeedDataMildd(myContext, Env.WebRootPath);
app.UseSeedDataMildd(myContext, Env.WebRootPath);
// 开启QuartzNetJob调度服务
app.UseQuartzJobMildd(tasksQzServices, schedulerCenter);
//服务注册

View File

@ -0,0 +1,12 @@
using New_College.IServices.BASE;
using New_College.Model.Models;
namespace New_College.IServices
{
/// <summary>
/// ID_PlanMajorDescServices
/// </summary>
public interface ID_PlanMajorDescServices :IBaseServices<D_PlanMajorDesc>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IServices.BASE;
using New_College.Model.Models;
namespace New_College.IServices
{
/// <summary>
/// ID_PlanMajorScoreLineServices
/// </summary>
public interface ID_PlanMajorScoreLineServices :IBaseServices<D_PlanMajorScoreLine>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IServices.BASE;
using New_College.Model.Models;
namespace New_College.IServices
{
/// <summary>
/// ID_QualificationLineServices
/// </summary>
public interface ID_QualificationLineServices :IBaseServices<D_QualificationLine>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IServices.BASE;
using New_College.Model.Models;
namespace New_College.IServices
{
/// <summary>
/// ID_ScoreLineServices
/// </summary>
public interface ID_ScoreLineServices :IBaseServices<D_ScoreLine>
{
}
}

View File

@ -0,0 +1,78 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace New_College.Model.Models
{
//年份 学校 批次 选科要求 门类 一级学科 专业 专业代码 招生人数 学制 学费 生源地
public class D_PlanMajorDesc : EntityModel
{
/// <summary>
/// 院校Id
/// </summary>
public int UId { get; set; }
public int Years { get; set; }
/// <summary>
/// 院校名称
/// </summary>
public string UniversityName { get; set; }
/// <summary>
///批次
/// </summary>
public string BatchName { get; set; }
/// <summary>
/// 选科要求
/// </summary>
public string SelectSubject { get; set; }
/// <summary>
/// 门类
/// </summary>
public string RootType { get; set; }
/// <summary>
/// 一级学科
/// </summary>
public string FirstType { get; set; }
/// <summary>
/// 专业
/// </summary>
[SugarColumn(IsNullable = true, Length = 1000)]
public string Major { get; set; }
public string MajorCode { get; set; }
public int Count { get; set; }
/// <summary>
/// 学制
/// </summary>
public string AcademicYear { get; set; }
/// <summary>
/// 学费
/// </summary>
public string Free { get; set; }
/// <summary>
/// 生源地
/// </summary>
public string Loction { get; set; }
}
}

View File

@ -0,0 +1,89 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace New_College.Model.Models
{
/// <summary>
/// 各省份每年招生计划专业分数线
/// 年份 学校 批次 选科要求 门类 一级学科 专业 平均分 最高分 最低分 最低分排名 生源地
/// </summary>
public class D_PlanMajorScoreLine : EntityModel
{
/// <summary>
/// 院校Id
/// </summary>
public int UId { get; set; }
/// <summary>
/// 年份
/// </summary>
public int Years { get; set; }
/// <summary>
/// 学校
/// </summary>
public string UniversityName { get; set; }
/// <summary>
/// 批次
/// </summary>
public string BatchName { get; set; }
/// <summary>
/// 选科要求
/// </summary>
[SugarColumn(IsNullable = true, Length = 500)]
public string SelectSubject { get; set; }
/// <summary>
/// 门类
/// </summary>
public string RootType { get; set; }
/// <summary>
/// 一级学科
/// </summary>
public string FirstType { get; set; }
/// <summary>
/// 专业
/// </summary>
[SugarColumn(IsNullable = true, Length = 500)]
public string Major { get; set; }
/// <summary>
/// 平均分
/// </summary>
public string AvgScore { get; set; }
/// <summary>
/// 最高分
/// </summary>
public string HighScore { get; set; }
/// <summary>
/// 最低分
/// </summary>
public int LowScore { get; set; }
/// <summary>
/// 最低分排名
/// </summary>
public int LowScoreRank { get; set; }
/// <summary>
/// 生源地
/// </summary>
public string Location { get; set; }
}
}

View File

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace New_College.Model.Models
{
//年份 学校 软科排名 科类 批次 最低分 最低分排名 省控线 全国统一招生代码 招生类型 学历类别 学校曾用名 生源地
/// <summary>
///各个省份投档资格线
/// </summary>
public class D_QualificationLine : EntityModel
{
/// <summary>
/// 院校Id
/// </summary>
public int UId { get; set; }
/// <summary>
/// 年份
/// </summary>
public int Years { get; set; }
/// <summary>
/// 学校
/// </summary>
public string UniversityName { get; set; }
/// <summary>
/// 软科排名
/// </summary>
public int Rank { get; set; }
/// <summary>
/// 科类
/// </summary>
public string SubjectType { get; set; }
/// <summary>
/// 批次
/// </summary>
public string BatchName { get; set; }
/// <summary>
/// 最低分
/// </summary>
public int LowScore { get; set; }
/// <summary>
/// 最低分排名
/// </summary>
public int LowScoreRank { get; set; }
/// <summary>
/// 省控线
/// </summary>
public int ProvinceScore { get; set; }
/// <summary>
/// 招生代码
/// </summary>
public int RecruitCode { get; set; }
/// <summary>
/// 招生类型
/// </summary>
public string RecruitType { get; set; }
/// <summary>
/// 学历类别
/// </summary>
public string EducationType { get; set; }
/// <summary>
/// 高校曾用名
/// </summary>
public string FormerName { get; set; }
/// <summary>
/// 生源地
/// </summary>
public string Location { get; set; }
}
}

View File

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace New_College.Model.Models
{
/// <summary>
/// 一分一段|省份 年份 科类 分数 本段人数 累计人数
/// </summary>
public class D_ScoreLine : EntityModel
{
/// <summary>
/// 省份
/// </summary>
public string Province { get; set; }
/// <summary>
/// 年份
/// </summary>
public string Years { get; set; }
/// <summary>
/// 科类
/// </summary>
public string Type { get; set; }
/// <summary>
/// 分数
/// </summary>
public double Score { get; set; }
/// <summary>
/// 本段人数
/// </summary>
public int Count { get; set; }
/// <summary>
/// 累计人数
/// </summary>
public int SumCount { get; set; }
}
}

View File

@ -177,6 +177,10 @@ namespace New_College.Model.ViewModels
public string Name { get; set; }
public int PlanNum { get; set; }
public string Money { get; set; }
public string AcademicYear { get; set; }
public string SelectSubject { get; set; }
public string Scoreline { get; set; }
}

View File

@ -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_PlanMajorDescRepository
/// </summary>
public class D_PlanMajorDescRepository : BaseRepository<D_PlanMajorDesc>, ID_PlanMajorDescRepository
{
public D_PlanMajorDescRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

View File

@ -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_PlanMajorScoreLineRepository
/// </summary>
public class D_PlanMajorScoreLineRepository : BaseRepository<D_PlanMajorScoreLine>, ID_PlanMajorScoreLineRepository
{
public D_PlanMajorScoreLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

View File

@ -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_QualificationLineRepository
/// </summary>
public class D_QualificationLineRepository : BaseRepository<D_QualificationLine>, ID_QualificationLineRepository
{
public D_QualificationLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

View File

@ -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_ScoreLineRepository
/// </summary>
public class D_ScoreLineRepository : BaseRepository<D_ScoreLine>, ID_ScoreLineRepository
{
public D_ScoreLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

View File

@ -0,0 +1,12 @@
using New_College.IRepository.Base;
using New_College.Model.Models;
namespace New_College.IRepository
{
/// <summary>
/// ID_PlanMajorDescRepository
/// </summary>
public interface ID_PlanMajorDescRepository : IBaseRepository<D_PlanMajorDesc>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IRepository.Base;
using New_College.Model.Models;
namespace New_College.IRepository
{
/// <summary>
/// ID_PlanMajorScoreLineRepository
/// </summary>
public interface ID_PlanMajorScoreLineRepository : IBaseRepository<D_PlanMajorScoreLine>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IRepository.Base;
using New_College.Model.Models;
namespace New_College.IRepository
{
/// <summary>
/// ID_QualificationLineRepository
/// </summary>
public interface ID_QualificationLineRepository : IBaseRepository<D_QualificationLine>
{
}
}

View File

@ -0,0 +1,12 @@
using New_College.IRepository.Base;
using New_College.Model.Models;
namespace New_College.IRepository
{
/// <summary>
/// ID_ScoreLineRepository
/// </summary>
public interface ID_ScoreLineRepository : IBaseRepository<D_ScoreLine>
{
}
}

View File

@ -45,6 +45,10 @@ namespace New_College.Services
private readonly ID_GraduateFlowRepository d_GraduateFlowRepository;
private readonly IT_EnrollmentPlaneRepository t_EnrollmentPlaneRepository;
private readonly ID_MyHistoryInfoServices d_MyHistory;
private readonly ID_PlanMajorDescRepository _PlanMajorDescRepository;
private readonly ID_PlanMajorScoreLineRepository d_PlanMajorScoreLineRepository;
private readonly ID_QualificationLineRepository d_QualificationLineRepository;
private readonly ID_PlanMajorDescRepository d_PlanMajorDescRepository;
public D_LongIdMapServices(IBaseRepository<D_LongIdMap> dal
, ID_MajorCategoryRepository ID_MajorCategoryRepository
, ID_MajorClassRepository ID_MajorClassRepository
@ -64,7 +68,12 @@ namespace New_College.Services
, IT_EnrollmentPlanedescRepository IT_EnrollmentPlanedescRepository
, IT_EnrollmentBatchRepository IT_EnrollmentBatchRepository
, ID_GraduateFlowRepository ID_GraduateFlowRepository
, IT_EnrollmentPlaneRepository IT_EnrollmentPlaneRepository, ID_MyHistoryInfoServices d_MyHistoryInfoServices)
, IT_EnrollmentPlaneRepository IT_EnrollmentPlaneRepository,
ID_MyHistoryInfoServices d_MyHistoryInfoServices,
ID_PlanMajorDescRepository _PlanMajorDescRepository,
ID_PlanMajorScoreLineRepository d_PlanMajorScoreLineRepository,
ID_QualificationLineRepository d_QualificationLineRepository,
ID_PlanMajorDescRepository d_PlanMajorDescRepository)
{
this._dal = dal;
d_MajorCategoryRepository = ID_MajorCategoryRepository;
@ -88,6 +97,10 @@ namespace New_College.Services
t_EnrollmentPlaneRepository = IT_EnrollmentPlaneRepository;
base.BaseDal = dal;
this.d_MyHistory = d_MyHistoryInfoServices;
this._PlanMajorDescRepository = _PlanMajorDescRepository;
this.d_PlanMajorScoreLineRepository = d_PlanMajorScoreLineRepository;
this.d_QualificationLineRepository = d_QualificationLineRepository;
this.d_PlanMajorDescRepository = d_PlanMajorDescRepository;
}
/// <summary>
@ -723,11 +736,10 @@ namespace New_College.Services
public async Task<BatchYear> GetBatchYearBySchoolId(PlanYearQuery query)
{
BatchYear result = new BatchYear() { };
var info = await t_EnrollmentPlanedescRepository.Query(x => x.UniversityId == query.UnviersityId);
var info = await d_PlanMajorDescRepository.Query(x => x.UId == query.UnviersityId);
if (info.Count <= 0)
return new BatchYear() { };
var batchids = info.Select(x => x.BatchtypeId).Distinct().ToList();
var batchinfo = await t_EnrollmentBatchRepository.Query(x => batchids.Contains(x.Id) && x.AreaName == query.AreaName);
var batchinfo = await t_EnrollmentBatchRepository.Query(x => x.AreaName == query.AreaName && x.IsDelete == false);
var batchselect = batchinfo.Select(x => x.Batch_name).Distinct().ToList();
var yearselect = batchinfo.Select(x => x.Year).Distinct().OrderByDescending(x => x).ToList();
var typeselect = batchinfo.Select(x => x.Type).Distinct().ToList();
@ -744,20 +756,24 @@ namespace New_College.Services
/// <returns></returns>
public async Task<List<NewPlanDescList>> GetPlanBySchollId(PlanQuery query)
{
var check = await t_EnrollmentBatchRepository.Query(x => x.Type == query.Type && x.Year == query.Year && x.Batch_name == query.BatchName && x.AreaName == query.AreaName);
//var check = await t_EnrollmentBatchRepository.Query(x => x.Type == query.Type && x.Year == query.Year && x.Batch_name == query.BatchName && x.AreaName == query.AreaName);
//if (check.Count <= 0)
var check = await d_PlanMajorDescRepository.Query(x => x.Years == query.Year && x.BatchName == query.BatchName && x.Loction == query.AreaName.Replace("省", ""));
if (check.Count <= 0)
return new List<NewPlanDescList>() { };
var batchid = check.Select(x => x.Id)?.FirstOrDefault();
var info = await t_EnrollmentPlanedescRepository.Query(x => x.UniversityId == query.UnviersityId && x.BatchtypeId == batchid);
// var batchid = check.Select(x => x.Id)?.FirstOrDefault();
var info = await d_PlanMajorDescRepository.Query(x => x.UId == query.UnviersityId && x.BatchName == query.BatchName);
List<NewPlanDescList> list = new List<NewPlanDescList>() { };
foreach (var item in info)
{
list.Add(new NewPlanDescList()
{
Name = item.MajorName,
Money = string.IsNullOrWhiteSpace(item.Tuitionfee) || item.Tuitionfee == "0" || item.Tuitionfee == "待定" ? "--" : item.Tuitionfee,
PlanNum = item.Plancount,
Scoreline = item.Scoreline == 0 || string.IsNullOrWhiteSpace(item.Scoreline.ToString()) ? "--" : item.Scoreline.ToString()
Name = item.Major,
AcademicYear = item.AcademicYear,
SelectSubject=item.SelectSubject,
Money = string.IsNullOrWhiteSpace(item.Free) || item.Free == "0" || item.Free == "待定" ? "--" : item.Free,
PlanNum = item.Count,
// Scoreline = item.Scoreline == 0 || string.IsNullOrWhiteSpace(item.Scoreline.ToString()) ? "--" : item.Scoreline.ToString()
});
}
return list;
@ -1573,37 +1589,105 @@ namespace New_College.Services
#endregion
#region 院校排序
/// <summary>
/// 院校排序
/// 更新数据学校Id
/// </summary>
/// <returns></returns>
public async Task<bool> Import()
{
var dataSet = ExcelUtil.ReadExcelToDataSet("D:\\Ashuju\\院校专业职业\\院校排名.xlsx");
if (dataSet.Tables.Count > 0)
{
var stringBuilderinfo = new StringBuilder();
stringBuilderinfo.AppendFormat("select Id,Name,Logo,Nhef,Sff,Syl,Area_Name,AscriptionName from D_University where IsDelete=0");
var info = await d_UniversityRepository.QuerySql(stringBuilderinfo.ToString());
List<D_University> list = new List<D_University>() { };
foreach (DataRow dr in dataSet.Tables[0].Rows)
var universitylist = await d_UniversityRepository.Query();
universitylist.ForEach(async u =>
{
var plist = await this._PlanMajorDescRepository.Query(c => c.UniversityName == u.Name && c.UId <= 0);
plist.ForEach(async cc =>
{
var rank = Convert.ToInt32(dr["排序"].ToString());
var name = dr["院校名称"].ToString();
var nowinfo = info.Where(x => x.Name == name).FirstOrDefault();
if (nowinfo != null)
{
nowinfo.Rank = rank;
list.Add(nowinfo);
}
}
await d_UniversityRepository.Update(list);
}
cc.UId = u.Id;
cc.ModifyTime = DateTime.Now;
await this._PlanMajorDescRepository.Update(cc);
});
var p2list = await this.d_PlanMajorScoreLineRepository.Query(c => c.UniversityName == u.Name && c.UId <= 0);
p2list.ForEach(async cc =>
{
cc.UId = u.Id;
cc.ModifyTime = DateTime.Now;
await this.d_PlanMajorScoreLineRepository.Update(cc);
});
var p3list = await this.d_QualificationLineRepository.Query(c => c.UniversityName == u.Name && c.UId <= 0);
p3list.ForEach(async cc =>
{
cc.UId = u.Id;
cc.ModifyTime = DateTime.Now;
await this.d_QualificationLineRepository.Update(cc);
});
});
//this.d_PlanMajorDescServices = d_PlanMajorDescServices;
//this.d_PlanMajorScoreLineRepository = d_PlanMajorScoreLineRepository;
//this.d_QualificationLineRepository = d_QualificationLineRepository;
return true;
}
#endregion
// #region 院校排序
/// <summary>
/// 院校排序
/// </summary>
/// <returns></returns>
//public async Task<bool> Import()
//{
// var dataSet = ExcelUtil.ReadExcelToDataSet("D:\\Ashuju\\院校专业职业\\院校排名.xlsx");
// if (dataSet.Tables.Count > 0)
// {
// var stringBuilderinfo = new StringBuilder();
// stringBuilderinfo.AppendFormat("select Id,Name,Logo,Nhef,Sff,Syl,Area_Name,AscriptionName from D_University where IsDelete=0");
// var info = await d_UniversityRepository.QuerySql(stringBuilderinfo.ToString());
// List<D_University> list = new List<D_University>() { };
// foreach (DataRow dr in dataSet.Tables[0].Rows)
// {
// var rank = Convert.ToInt32(dr["排序"].ToString());
// var name = dr["院校名称"].ToString();
// var nowinfo = info.Where(x => x.Name == name).FirstOrDefault();
// if (nowinfo != null)
// {
// nowinfo.Rank = rank;
// list.Add(nowinfo);
// }
// }
// await d_UniversityRepository.Update(list);
// }
// return true;
//}
// #endregion
}
}

View File

@ -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_PlanMajorDescServices : BaseServices<D_PlanMajorDesc>, ID_PlanMajorDescServices
{
private readonly IBaseRepository<D_PlanMajorDesc> _dal;
public D_PlanMajorDescServices(IBaseRepository<D_PlanMajorDesc> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}

View File

@ -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_PlanMajorScoreLineServices : BaseServices<D_PlanMajorScoreLine>, ID_PlanMajorScoreLineServices
{
private readonly IBaseRepository<D_PlanMajorScoreLine> _dal;
public D_PlanMajorScoreLineServices(IBaseRepository<D_PlanMajorScoreLine> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}

View File

@ -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_QualificationLineServices : BaseServices<D_QualificationLine>, ID_QualificationLineServices
{
private readonly IBaseRepository<D_QualificationLine> _dal;
public D_QualificationLineServices(IBaseRepository<D_QualificationLine> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}

View File

@ -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_ScoreLineServices : BaseServices<D_ScoreLine>, ID_ScoreLineServices
{
private readonly IBaseRepository<D_ScoreLine> _dal;
public D_ScoreLineServices(IBaseRepository<D_ScoreLine> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}