From d2436c098d1e1cb2d94a16bb1ae1203f56be3b90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com>
Date: Fri, 22 Sep 2023 18:15:48 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E6=96=B0=E5=A2=9E=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Back/D_PlanMajorDescController.cs | 77 ++++++
.../Back/D_PlanMajorScoreLineController.cs | 76 ++++++
.../Back/D_QualificationLineController.cs | 76 ++++++
.../Controllers/Back/D_ScoreLineController.cs | 77 ++++++
.../Controllers/HealthCheckController.cs | 8 +-
New_College.Api/New_College.Model.xml | 231 ++++++++++++++++++
New_College.Api/New_College.xml | 20 ++
New_College.Api/Startup.cs | 2 +-
.../ID_PlanMajorDescServices.cs | 12 +
.../ID_PlanMajorScoreLineServices.cs | 12 +
.../ID_QualificationLineServices.cs | 12 +
New_College.IServices/ID_ScoreLineServices.cs | 12 +
New_College.Model/Models/D_PlanMajorDesc.cs | 78 ++++++
.../Models/D_PlanMajorScoreLine.cs | 89 +++++++
.../Models/D_QualificationLine.cs | 97 ++++++++
New_College.Model/Models/D_ScoreLine.cs | 44 ++++
.../ViewModels/Result/UniversityResult.cs | 4 +
.../BASE/D_PlanMajorDescRepository.cs | 17 ++
.../BASE/D_PlanMajorScoreLineRepository.cs | 17 ++
.../BASE/D_QualificationLineRepository.cs | 17 ++
.../BASE/D_ScoreLineRepository.cs | 17 ++
.../BASE/ID_PlanMajorDescRepository.cs | 12 +
.../BASE/ID_PlanMajorScoreLineRepository.cs | 12 +
.../BASE/ID_QualificationLineRepository.cs | 12 +
.../BASE/ID_ScoreLineRepository.cs | 12 +
New_College.Services/D_LongIdMapServices.cs | 150 +++++++++---
.../D_PlanMajorDescServices.cs | 18 ++
.../D_PlanMajorScoreLineServices.cs | 18 ++
.../D_QualificationLineServices.cs | 18 ++
New_College.Services/D_ScoreLineServices.cs | 18 ++
30 files changed, 1229 insertions(+), 36 deletions(-)
create mode 100644 New_College.Api/Controllers/Back/D_PlanMajorDescController.cs
create mode 100644 New_College.Api/Controllers/Back/D_PlanMajorScoreLineController.cs
create mode 100644 New_College.Api/Controllers/Back/D_QualificationLineController.cs
create mode 100644 New_College.Api/Controllers/Back/D_ScoreLineController.cs
create mode 100644 New_College.IServices/ID_PlanMajorDescServices.cs
create mode 100644 New_College.IServices/ID_PlanMajorScoreLineServices.cs
create mode 100644 New_College.IServices/ID_QualificationLineServices.cs
create mode 100644 New_College.IServices/ID_ScoreLineServices.cs
create mode 100644 New_College.Model/Models/D_PlanMajorDesc.cs
create mode 100644 New_College.Model/Models/D_PlanMajorScoreLine.cs
create mode 100644 New_College.Model/Models/D_QualificationLine.cs
create mode 100644 New_College.Model/Models/D_ScoreLine.cs
create mode 100644 New_College.Repository/BASE/D_PlanMajorDescRepository.cs
create mode 100644 New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
create mode 100644 New_College.Repository/BASE/D_QualificationLineRepository.cs
create mode 100644 New_College.Repository/BASE/D_ScoreLineRepository.cs
create mode 100644 New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
create mode 100644 New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
create mode 100644 New_College.Repository/BASE/ID_QualificationLineRepository.cs
create mode 100644 New_College.Repository/BASE/ID_ScoreLineRepository.cs
create mode 100644 New_College.Services/D_PlanMajorDescServices.cs
create mode 100644 New_College.Services/D_PlanMajorScoreLineServices.cs
create mode 100644 New_College.Services/D_QualificationLineServices.cs
create mode 100644 New_College.Services/D_ScoreLineServices.cs
diff --git a/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs b/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs
new file mode 100644
index 0000000..2a3b99b
--- /dev/null
+++ b/New_College.Api/Controllers/Back/D_PlanMajorDescController.cs
@@ -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
+ {
+ ///
+ /// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+ ///
+ private readonly ID_PlanMajorDescServices _d_PlanMajorDescServices;
+
+ public D_PlanMajorDescController(ID_PlanMajorDescServices D_PlanMajorDescServices)
+ {
+ _d_PlanMajorDescServices = D_PlanMajorDescServices;
+ }
+
+ [HttpGet]
+ public async Task>> Get(int page = 1, string key = "", int intPageSize = 50)
+ {
+ if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
+ {
+ key = "";
+ }
+
+ Expression> whereExpression = a => a.Id > 0;
+
+ return new MessageModel>()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_PlanMajorDescServices.QueryPage(whereExpression, page, intPageSize)
+ };
+
+ }
+
+ [HttpGet("{id}")]
+ public async Task> Get(int id = 0)
+ {
+ return new MessageModel()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_PlanMajorDescServices.QueryById(id)
+ };
+ }
+
+ [HttpPost]
+ public async Task> Post([FromBody] D_PlanMajorDesc request)
+ {
+ var data = new MessageModel();
+
+ var id = await _d_PlanMajorDescServices.Add(request);
+ data.success = id > 0;
+
+ if (data.success)
+ {
+ data.response = id.ObjToString();
+ data.msg = "添加成功";
+ }
+
+ return data;
+ }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/New_College.Api/Controllers/Back/D_PlanMajorScoreLineController.cs b/New_College.Api/Controllers/Back/D_PlanMajorScoreLineController.cs
new file mode 100644
index 0000000..94074ae
--- /dev/null
+++ b/New_College.Api/Controllers/Back/D_PlanMajorScoreLineController.cs
@@ -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
+ {
+ ///
+ /// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+ ///
+ private readonly ID_PlanMajorScoreLineServices _d_PlanMajorScoreLineServices;
+
+ public D_PlanMajorScoreLineController(ID_PlanMajorScoreLineServices D_PlanMajorScoreLineServices)
+ {
+ _d_PlanMajorScoreLineServices = D_PlanMajorScoreLineServices;
+ }
+
+ [HttpGet]
+ public async Task>> Get(int page = 1, string key = "", int intPageSize = 50)
+ {
+ if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
+ {
+ key = "";
+ }
+
+ Expression> whereExpression = a => a.Id > 0;
+
+ return new MessageModel>()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_PlanMajorScoreLineServices.QueryPage(whereExpression, page, intPageSize)
+ };
+
+ }
+
+ [HttpGet("{id}")]
+ public async Task> Get(int id = 0)
+ {
+ return new MessageModel()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_PlanMajorScoreLineServices.QueryById(id)
+ };
+ }
+
+ [HttpPost]
+ public async Task> Post([FromBody] D_PlanMajorScoreLine request)
+ {
+ var data = new MessageModel();
+
+ var id = await _d_PlanMajorScoreLineServices.Add(request);
+ data.success = id > 0;
+
+ if (data.success)
+ {
+ data.response = id.ObjToString();
+ data.msg = "添加成功";
+ }
+
+ return data;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/New_College.Api/Controllers/Back/D_QualificationLineController.cs b/New_College.Api/Controllers/Back/D_QualificationLineController.cs
new file mode 100644
index 0000000..350f6cc
--- /dev/null
+++ b/New_College.Api/Controllers/Back/D_QualificationLineController.cs
@@ -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
+ {
+ ///
+ /// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+ ///
+ private readonly ID_QualificationLineServices _d_QualificationLineServices;
+
+ public D_QualificationLineController(ID_QualificationLineServices D_QualificationLineServices)
+ {
+ _d_QualificationLineServices = D_QualificationLineServices;
+ }
+
+ [HttpGet]
+ public async Task>> Get(int page = 1, string key = "", int intPageSize = 50)
+ {
+ if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
+ {
+ key = "";
+ }
+
+ Expression> whereExpression = a => a.Id > 0;
+
+ return new MessageModel>()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_QualificationLineServices.QueryPage(whereExpression, page, intPageSize)
+ };
+
+ }
+
+ [HttpGet("{id}")]
+ public async Task> Get(int id = 0)
+ {
+ return new MessageModel()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_QualificationLineServices.QueryById(id)
+ };
+ }
+
+ [HttpPost]
+ public async Task> Post([FromBody] D_QualificationLine request)
+ {
+ var data = new MessageModel();
+
+ var id = await _d_QualificationLineServices.Add(request);
+ data.success = id > 0;
+
+ if (data.success)
+ {
+ data.response = id.ObjToString();
+ data.msg = "添加成功";
+ }
+
+ return data;
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/New_College.Api/Controllers/Back/D_ScoreLineController.cs b/New_College.Api/Controllers/Back/D_ScoreLineController.cs
new file mode 100644
index 0000000..993c5f2
--- /dev/null
+++ b/New_College.Api/Controllers/Back/D_ScoreLineController.cs
@@ -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
+ {
+ ///
+ /// 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+ ///
+ private readonly ID_ScoreLineServices _d_ScoreLineServices;
+
+ public D_ScoreLineController(ID_ScoreLineServices D_ScoreLineServices)
+ {
+ _d_ScoreLineServices = D_ScoreLineServices;
+ }
+
+ [HttpGet]
+ public async Task>> Get(int page = 1, string key = "",int intPageSize = 50)
+ {
+ if (string.IsNullOrEmpty(key) || string.IsNullOrWhiteSpace(key))
+ {
+ key = "";
+ }
+
+ Expression> whereExpression = a => a.Id > 0;
+
+ return new MessageModel>()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_ScoreLineServices.QueryPage(whereExpression, page, intPageSize)
+ };
+
+ }
+
+ [HttpGet("{id}")]
+ public async Task> Get(int id = 0)
+ {
+ return new MessageModel()
+ {
+ msg = "获取成功",
+ success = true,
+ response = await _d_ScoreLineServices.QueryById(id)
+ };
+ }
+
+ [HttpPost]
+ public async Task> Post([FromBody] D_ScoreLine request)
+ {
+ var data = new MessageModel();
+
+ var id = await _d_ScoreLineServices.Add(request);
+ data.success = id > 0;
+
+ if (data.success)
+ {
+ data.response = id.ObjToString();
+ data.msg = "添加成功";
+ }
+
+ return data;
+ }
+
+
+
+}
+}
\ No newline at end of file
diff --git a/New_College.Api/Controllers/HealthCheckController.cs b/New_College.Api/Controllers/HealthCheckController.cs
index 4fdd370..4cf7c3e 100644
--- a/New_College.Api/Controllers/HealthCheckController.cs
+++ b/New_College.Api/Controllers/HealthCheckController.cs
@@ -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;
}
///
@@ -45,8 +48,9 @@ namespace New_College.Controllers
// return t_EnrollmentPlane.categoryupdate();
- return t_EnrollmentPlane.ClassChildItems();
+ return d_LongIdMapServices.Import();
+
}
}
diff --git a/New_College.Api/New_College.Model.xml b/New_College.Api/New_College.Model.xml
index cc2c6c8..6b694a4 100644
--- a/New_College.Api/New_College.Model.xml
+++ b/New_College.Api/New_College.Model.xml
@@ -505,6 +505,237 @@
分类等级
+
+
+ 院校Id
+
+
+
+
+ 院校名称
+
+
+
+
+ 批次
+
+
+
+
+ 选科要求
+
+
+
+
+ 门类
+
+
+
+
+ 一级学科
+
+
+
+
+ 专业
+
+
+
+
+ 学制
+
+
+
+
+ 学费
+
+
+
+
+ 生源地
+
+
+
+
+ 各省份每年招生计划专业分数线
+ 年份 学校 批次 选科要求 门类 一级学科 专业 平均分 最高分 最低分 最低分排名 生源地
+
+
+
+
+ 院校Id
+
+
+
+
+ 年份
+
+
+
+
+ 学校
+
+
+
+
+ 批次
+
+
+
+
+ 选科要求
+
+
+
+
+ 门类
+
+
+
+
+ 一级学科
+
+
+
+
+ 专业
+
+
+
+
+ 平均分
+
+
+
+
+ 最高分
+
+
+
+
+ 最低分
+
+
+
+
+ 最低分排名
+
+
+
+
+ 生源地
+
+
+
+
+ 各个省份投档资格线
+
+
+
+
+ 院校Id
+
+
+
+
+ 年份
+
+
+
+
+ 学校
+
+
+
+
+ 软科排名
+
+
+
+
+ 科类
+
+
+
+
+ 批次
+
+
+
+
+ 最低分
+
+
+
+
+ 最低分排名
+
+
+
+
+ 省控线
+
+
+
+
+ 招生代码
+
+
+
+
+ 招生类型
+
+
+
+
+ 学历类别
+
+
+
+
+ 高校曾用名
+
+
+
+
+ 生源地
+
+
+
+
+ 一分一段|省份 年份 科类 分数 本段人数 累计人数
+
+
+
+
+ 省份
+
+
+
+
+ 年份
+
+
+
+
+ 科类
+
+
+
+
+ 分数
+
+
+
+
+ 本段人数
+
+
+
+
+ 累计人数
+
+
标签代表人物
diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml
index 24f863d..238aecd 100644
--- a/New_College.Api/New_College.xml
+++ b/New_College.Api/New_College.xml
@@ -108,6 +108,26 @@
+
+
+ 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+
+
+
+
+ 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+
+
+
+
+ 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+
+
+
+
+ 服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
+
+
服务器接口,因为是模板生成,所以首字母是大写的,自己可以重构下
diff --git a/New_College.Api/Startup.cs b/New_College.Api/Startup.cs
index df47a35..1b61a29 100644
--- a/New_College.Api/Startup.cs
+++ b/New_College.Api/Startup.cs
@@ -215,7 +215,7 @@ namespace New_College
});
// 生成种子数据
- // app.UseSeedDataMildd(myContext, Env.WebRootPath);
+ app.UseSeedDataMildd(myContext, Env.WebRootPath);
// 开启QuartzNetJob调度服务
app.UseQuartzJobMildd(tasksQzServices, schedulerCenter);
//服务注册
diff --git a/New_College.IServices/ID_PlanMajorDescServices.cs b/New_College.IServices/ID_PlanMajorDescServices.cs
new file mode 100644
index 0000000..7000701
--- /dev/null
+++ b/New_College.IServices/ID_PlanMajorDescServices.cs
@@ -0,0 +1,12 @@
+using New_College.IServices.BASE;
+using New_College.Model.Models;
+
+namespace New_College.IServices
+{
+ ///
+ /// ID_PlanMajorDescServices
+ ///
+ public interface ID_PlanMajorDescServices :IBaseServices
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.IServices/ID_PlanMajorScoreLineServices.cs b/New_College.IServices/ID_PlanMajorScoreLineServices.cs
new file mode 100644
index 0000000..068e624
--- /dev/null
+++ b/New_College.IServices/ID_PlanMajorScoreLineServices.cs
@@ -0,0 +1,12 @@
+using New_College.IServices.BASE;
+using New_College.Model.Models;
+
+namespace New_College.IServices
+{
+ ///
+ /// ID_PlanMajorScoreLineServices
+ ///
+ public interface ID_PlanMajorScoreLineServices :IBaseServices
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.IServices/ID_QualificationLineServices.cs b/New_College.IServices/ID_QualificationLineServices.cs
new file mode 100644
index 0000000..66c5194
--- /dev/null
+++ b/New_College.IServices/ID_QualificationLineServices.cs
@@ -0,0 +1,12 @@
+using New_College.IServices.BASE;
+using New_College.Model.Models;
+
+namespace New_College.IServices
+{
+ ///
+ /// ID_QualificationLineServices
+ ///
+ public interface ID_QualificationLineServices :IBaseServices
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.IServices/ID_ScoreLineServices.cs b/New_College.IServices/ID_ScoreLineServices.cs
new file mode 100644
index 0000000..10646e4
--- /dev/null
+++ b/New_College.IServices/ID_ScoreLineServices.cs
@@ -0,0 +1,12 @@
+using New_College.IServices.BASE;
+using New_College.Model.Models;
+
+namespace New_College.IServices
+{
+ ///
+ /// ID_ScoreLineServices
+ ///
+ public interface ID_ScoreLineServices :IBaseServices
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.Model/Models/D_PlanMajorDesc.cs b/New_College.Model/Models/D_PlanMajorDesc.cs
new file mode 100644
index 0000000..27f6042
--- /dev/null
+++ b/New_College.Model/Models/D_PlanMajorDesc.cs
@@ -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
+ {
+
+ ///
+ /// 院校Id
+ ///
+ public int UId { get; set; }
+ public int Years { get; set; }
+
+ ///
+ /// 院校名称
+ ///
+ public string UniversityName { get; set; }
+
+
+ ///
+ ///批次
+ ///
+ public string BatchName { get; set; }
+ ///
+ /// 选科要求
+ ///
+ public string SelectSubject { get; set; }
+
+ ///
+ /// 门类
+ ///
+ public string RootType { get; set; }
+
+ ///
+ /// 一级学科
+ ///
+
+ public string FirstType { get; set; }
+
+
+ ///
+ /// 专业
+ ///
+
+ [SugarColumn(IsNullable = true, Length = 1000)]
+ public string Major { get; set; }
+
+
+ public string MajorCode { get; set; }
+
+
+ public int Count { get; set; }
+
+ ///
+ /// 学制
+ ///
+ public string AcademicYear { get; set; }
+
+ ///
+ /// 学费
+ ///
+ public string Free { get; set; }
+
+ ///
+ /// 生源地
+ ///
+ public string Loction { get; set; }
+
+
+
+
+ }
+}
diff --git a/New_College.Model/Models/D_PlanMajorScoreLine.cs b/New_College.Model/Models/D_PlanMajorScoreLine.cs
new file mode 100644
index 0000000..de6e8ea
--- /dev/null
+++ b/New_College.Model/Models/D_PlanMajorScoreLine.cs
@@ -0,0 +1,89 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace New_College.Model.Models
+{
+ ///
+ /// 各省份每年招生计划专业分数线
+ /// 年份 学校 批次 选科要求 门类 一级学科 专业 平均分 最高分 最低分 最低分排名 生源地
+ ///
+ public class D_PlanMajorScoreLine : EntityModel
+ {
+
+ ///
+ /// 院校Id
+ ///
+ public int UId { get; set; }
+
+
+ ///
+ /// 年份
+ ///
+ public int Years { get; set; }
+
+ ///
+ /// 学校
+ ///
+ public string UniversityName { get; set; }
+
+
+ ///
+ /// 批次
+ ///
+ public string BatchName { get; set; }
+
+ ///
+ /// 选科要求
+ ///
+ [SugarColumn(IsNullable = true, Length = 500)]
+ public string SelectSubject { get; set; }
+
+ ///
+ /// 门类
+ ///
+ public string RootType { get; set; }
+
+ ///
+ /// 一级学科
+ ///
+
+ public string FirstType { get; set; }
+
+
+ ///
+ /// 专业
+ ///
+
+ [SugarColumn(IsNullable = true, Length = 500)]
+ public string Major { get; set; }
+
+ ///
+ /// 平均分
+ ///
+ public string AvgScore { get; set; }
+
+ ///
+ /// 最高分
+ ///
+ public string HighScore { get; set; }
+
+ ///
+ /// 最低分
+ ///
+ public int LowScore { get; set; }
+
+ ///
+ /// 最低分排名
+ ///
+ public int LowScoreRank { get; set; }
+
+ ///
+ /// 生源地
+ ///
+ public string Location { get; set; }
+
+
+ }
+}
diff --git a/New_College.Model/Models/D_QualificationLine.cs b/New_College.Model/Models/D_QualificationLine.cs
new file mode 100644
index 0000000..80d1b16
--- /dev/null
+++ b/New_College.Model/Models/D_QualificationLine.cs
@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace New_College.Model.Models
+{
+ //年份 学校 软科排名 科类 批次 最低分 最低分排名 省控线 全国统一招生代码 招生类型 学历类别 学校曾用名 生源地
+
+
+ ///
+ ///各个省份投档资格线
+ ///
+ public class D_QualificationLine : EntityModel
+ {
+
+ ///
+ /// 院校Id
+ ///
+ public int UId { get; set; }
+
+ ///
+ /// 年份
+ ///
+ public int Years { get; set; }
+
+ ///
+ /// 学校
+ ///
+ public string UniversityName { get; set; }
+
+
+ ///
+ /// 软科排名
+ ///
+ public int Rank { get; set; }
+
+ ///
+ /// 科类
+ ///
+ public string SubjectType { get; set; }
+
+ ///
+ /// 批次
+ ///
+ public string BatchName { get; set; }
+
+ ///
+ /// 最低分
+ ///
+ public int LowScore { get; set; }
+
+ ///
+ /// 最低分排名
+ ///
+ public int LowScoreRank { get; set; }
+
+
+ ///
+ /// 省控线
+ ///
+ public int ProvinceScore { get; set; }
+
+ ///
+ /// 招生代码
+ ///
+ public int RecruitCode { get; set; }
+
+
+ ///
+ /// 招生类型
+ ///
+ public string RecruitType { get; set; }
+
+ ///
+ /// 学历类别
+ ///
+ public string EducationType { get; set; }
+
+ ///
+ /// 高校曾用名
+ ///
+ public string FormerName { get; set; }
+
+
+ ///
+ /// 生源地
+ ///
+ public string Location { get; set; }
+
+
+
+
+ }
+
+
+
+}
diff --git a/New_College.Model/Models/D_ScoreLine.cs b/New_College.Model/Models/D_ScoreLine.cs
new file mode 100644
index 0000000..2e1eb38
--- /dev/null
+++ b/New_College.Model/Models/D_ScoreLine.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace New_College.Model.Models
+{
+ ///
+ /// 一分一段|省份 年份 科类 分数 本段人数 累计人数
+ ///
+ public class D_ScoreLine : EntityModel
+ {
+ ///
+ /// 省份
+ ///
+ public string Province { get; set; }
+
+ ///
+ /// 年份
+ ///
+ public string Years { get; set; }
+
+ ///
+ /// 科类
+ ///
+ public string Type { get; set; }
+
+ ///
+ /// 分数
+ ///
+ public double Score { get; set; }
+
+ ///
+ /// 本段人数
+ ///
+ public int Count { get; set; }
+
+ ///
+ /// 累计人数
+ ///
+ public int SumCount { get; set; }
+
+
+ }
+}
diff --git a/New_College.Model/ViewModels/Result/UniversityResult.cs b/New_College.Model/ViewModels/Result/UniversityResult.cs
index 6657336..647ef14 100644
--- a/New_College.Model/ViewModels/Result/UniversityResult.cs
+++ b/New_College.Model/ViewModels/Result/UniversityResult.cs
@@ -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; }
}
diff --git a/New_College.Repository/BASE/D_PlanMajorDescRepository.cs b/New_College.Repository/BASE/D_PlanMajorDescRepository.cs
new file mode 100644
index 0000000..38c2d72
--- /dev/null
+++ b/New_College.Repository/BASE/D_PlanMajorDescRepository.cs
@@ -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
+{
+ ///
+ /// D_PlanMajorDescRepository
+ ///
+ public class D_PlanMajorDescRepository : BaseRepository, ID_PlanMajorDescRepository
+ {
+ public D_PlanMajorDescRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs b/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
new file mode 100644
index 0000000..61b5aaa
--- /dev/null
+++ b/New_College.Repository/BASE/D_PlanMajorScoreLineRepository.cs
@@ -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
+{
+ ///
+ /// D_PlanMajorScoreLineRepository
+ ///
+ public class D_PlanMajorScoreLineRepository : BaseRepository, ID_PlanMajorScoreLineRepository
+ {
+ public D_PlanMajorScoreLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/D_QualificationLineRepository.cs b/New_College.Repository/BASE/D_QualificationLineRepository.cs
new file mode 100644
index 0000000..0a502f7
--- /dev/null
+++ b/New_College.Repository/BASE/D_QualificationLineRepository.cs
@@ -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
+{
+ ///
+ /// D_QualificationLineRepository
+ ///
+ public class D_QualificationLineRepository : BaseRepository, ID_QualificationLineRepository
+ {
+ public D_QualificationLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/D_ScoreLineRepository.cs b/New_College.Repository/BASE/D_ScoreLineRepository.cs
new file mode 100644
index 0000000..ea7d356
--- /dev/null
+++ b/New_College.Repository/BASE/D_ScoreLineRepository.cs
@@ -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
+{
+ ///
+ /// D_ScoreLineRepository
+ ///
+ public class D_ScoreLineRepository : BaseRepository, ID_ScoreLineRepository
+ {
+ public D_ScoreLineRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs b/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
new file mode 100644
index 0000000..515e462
--- /dev/null
+++ b/New_College.Repository/BASE/ID_PlanMajorDescRepository.cs
@@ -0,0 +1,12 @@
+using New_College.IRepository.Base;
+using New_College.Model.Models;
+
+namespace New_College.IRepository
+{
+ ///
+ /// ID_PlanMajorDescRepository
+ ///
+ public interface ID_PlanMajorDescRepository : IBaseRepository
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs b/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
new file mode 100644
index 0000000..9777ccd
--- /dev/null
+++ b/New_College.Repository/BASE/ID_PlanMajorScoreLineRepository.cs
@@ -0,0 +1,12 @@
+using New_College.IRepository.Base;
+using New_College.Model.Models;
+
+namespace New_College.IRepository
+{
+ ///
+ /// ID_PlanMajorScoreLineRepository
+ ///
+ public interface ID_PlanMajorScoreLineRepository : IBaseRepository
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_QualificationLineRepository.cs b/New_College.Repository/BASE/ID_QualificationLineRepository.cs
new file mode 100644
index 0000000..82cec0f
--- /dev/null
+++ b/New_College.Repository/BASE/ID_QualificationLineRepository.cs
@@ -0,0 +1,12 @@
+using New_College.IRepository.Base;
+using New_College.Model.Models;
+
+namespace New_College.IRepository
+{
+ ///
+ /// ID_QualificationLineRepository
+ ///
+ public interface ID_QualificationLineRepository : IBaseRepository
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.Repository/BASE/ID_ScoreLineRepository.cs b/New_College.Repository/BASE/ID_ScoreLineRepository.cs
new file mode 100644
index 0000000..8b43c03
--- /dev/null
+++ b/New_College.Repository/BASE/ID_ScoreLineRepository.cs
@@ -0,0 +1,12 @@
+using New_College.IRepository.Base;
+using New_College.Model.Models;
+
+namespace New_College.IRepository
+{
+ ///
+ /// ID_ScoreLineRepository
+ ///
+ public interface ID_ScoreLineRepository : IBaseRepository
+ {
+ }
+}
\ No newline at end of file
diff --git a/New_College.Services/D_LongIdMapServices.cs b/New_College.Services/D_LongIdMapServices.cs
index 16e543e..6bc526d 100644
--- a/New_College.Services/D_LongIdMapServices.cs
+++ b/New_College.Services/D_LongIdMapServices.cs
@@ -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 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;
}
///
@@ -723,11 +736,10 @@ namespace New_College.Services
public async Task 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
///
public async Task> 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() { };
- 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 list = new List() { };
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 院校排序
///
- /// 院校排序
+ /// 更新数据学校Id
///
///
public async Task 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 list = new List() { };
- 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 院校排序
+ ///
+ /// 院校排序
+ ///
+ ///
+ //public async Task 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 list = new List() { };
+ // 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
+
+
+
+
}
}
\ No newline at end of file
diff --git a/New_College.Services/D_PlanMajorDescServices.cs b/New_College.Services/D_PlanMajorDescServices.cs
new file mode 100644
index 0000000..2333fc3
--- /dev/null
+++ b/New_College.Services/D_PlanMajorDescServices.cs
@@ -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, ID_PlanMajorDescServices
+ {
+ private readonly IBaseRepository _dal;
+ public D_PlanMajorDescServices(IBaseRepository dal)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Services/D_PlanMajorScoreLineServices.cs b/New_College.Services/D_PlanMajorScoreLineServices.cs
new file mode 100644
index 0000000..390548c
--- /dev/null
+++ b/New_College.Services/D_PlanMajorScoreLineServices.cs
@@ -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, ID_PlanMajorScoreLineServices
+ {
+ private readonly IBaseRepository _dal;
+ public D_PlanMajorScoreLineServices(IBaseRepository dal)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Services/D_QualificationLineServices.cs b/New_College.Services/D_QualificationLineServices.cs
new file mode 100644
index 0000000..2252ea4
--- /dev/null
+++ b/New_College.Services/D_QualificationLineServices.cs
@@ -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, ID_QualificationLineServices
+ {
+ private readonly IBaseRepository _dal;
+ public D_QualificationLineServices(IBaseRepository dal)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ }
+ }
+}
\ No newline at end of file
diff --git a/New_College.Services/D_ScoreLineServices.cs b/New_College.Services/D_ScoreLineServices.cs
new file mode 100644
index 0000000..09e3e30
--- /dev/null
+++ b/New_College.Services/D_ScoreLineServices.cs
@@ -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, ID_ScoreLineServices
+ {
+ private readonly IBaseRepository _dal;
+ public D_ScoreLineServices(IBaseRepository dal)
+ {
+ this._dal = dal;
+ base.BaseDal = dal;
+ }
+ }
+}
\ No newline at end of file