bug fixed
parent
535cf6adf2
commit
3f7aec848e
|
|
@ -515,5 +515,116 @@ namespace New_College.Api.Controllers.Front
|
||||||
{
|
{
|
||||||
return await iD_LongIdMapServices.GetRequestEnrollmentinproductionDetailResult(query);
|
return await iD_LongIdMapServices.GetRequestEnrollmentinproductionDetailResult(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取学科评估
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<MessageModel<SubjectEvaluateResult>> GetSubjectEvaluate([FromQuery] SubjectEvaluateRequest request)
|
||||||
|
{
|
||||||
|
request.extTypeId = "第四轮";
|
||||||
|
var info = HttpHelper.PostApi<SubjectEvaluateResponse>("http://192.168.104.104:3000/youzy.dms.basiclib.api.college.subjectevaluate.byexttypeid.query", request);
|
||||||
|
if (info == null)
|
||||||
|
{
|
||||||
|
return new MessageModel<SubjectEvaluateResult>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (info.isSuccess)
|
||||||
|
{
|
||||||
|
return new MessageModel<SubjectEvaluateResult>()
|
||||||
|
{
|
||||||
|
success = true,
|
||||||
|
msg = "ok",
|
||||||
|
response = info.result
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return new MessageModel<SubjectEvaluateResult>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 特色专业
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<MessageModel<FeaturedMajorResult>> GetFeaturedMajor([FromQuery] FeaturedMajorRequest request)
|
||||||
|
{
|
||||||
|
var info = HttpHelper.GetApi<FeaturedMajorResponse>("http://192.168.104.104:3000/", string.Format("youzy.dms.basiclib.api.college.profession.bycollege.get?collegeCode={0}", request.collegeCode));
|
||||||
|
if (info == null)
|
||||||
|
{
|
||||||
|
return new MessageModel<FeaturedMajorResult>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (info.isSuccess)
|
||||||
|
{
|
||||||
|
return new MessageModel<FeaturedMajorResult>()
|
||||||
|
{
|
||||||
|
success = true,
|
||||||
|
msg = "ok",
|
||||||
|
response = info.result
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return new MessageModel<FeaturedMajorResult>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 院系设置
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<MessageModel<List<DepartmentResult>>> GetDepartment([FromQuery] DepartmentRequest request)
|
||||||
|
{
|
||||||
|
var info = HttpHelper.GetApi<DepartmentResponse>("http://192.168.104.104:3000/", string.Format("youzy.dms.basiclib.api.college.department.bycollege.get?collegeCode={0}", request.collegeCode));
|
||||||
|
if (info == null)
|
||||||
|
{
|
||||||
|
return new MessageModel<List<DepartmentResult>>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (info.isSuccess)
|
||||||
|
{
|
||||||
|
return new MessageModel<List<DepartmentResult>>()
|
||||||
|
{
|
||||||
|
success = true,
|
||||||
|
msg = "ok",
|
||||||
|
response = info.result.ToList()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return new MessageModel<List<DepartmentResult>>
|
||||||
|
{
|
||||||
|
msg = "暂无数据",
|
||||||
|
success = false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -369,17 +369,18 @@ namespace New_College.Api.Controllers.Front
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
//[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
//[HttpGet("downloadpdf")]
|
[HttpGet("downloadpdf")]
|
||||||
//public IActionResult DownloadPdf(string url)
|
public async Task<IActionResult> DownloadPdf(string url)
|
||||||
//{
|
{
|
||||||
// // 假设pdfBytes是已存在的PDF文件字节流
|
var htmlContent = await HtmlHeplerFetcher.GetHtmlContentAsync(url);
|
||||||
// // byte[] pdfBytes = HelperHtmlConvertPdf.DoHtmlToByte(url);
|
// 假设pdfBytes是已存在的PDF文件字节流
|
||||||
// // 设置响应头,指定Content-Type和文件名
|
byte[] pdfBytes = new HtmlToPdfConverter().ConvertHtmlToPdf(htmlContent);
|
||||||
// Response.Headers.Add("Content-Disposition", string.Format("attachment; filename={0}.pdf", DateTime.Now.ToString("MMddHHmmssfff")));
|
// 设置响应头,指定Content-Type和文件名
|
||||||
// Response.ContentType = "application/pdf";
|
Response.Headers.Add("Content-Disposition", string.Format("attachment; filename={0}.pdf", DateTime.Now.ToString("MMddHHmmssfff")));
|
||||||
// return File(pdfBytes, "application/pdf");
|
Response.ContentType = "application/pdf";
|
||||||
//}
|
return File(pdfBytes, "application/pdf");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3625,6 +3625,116 @@
|
||||||
|
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.SubjectEvaluateRequest.collegeCode">
|
||||||
|
<summary>
|
||||||
|
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.SubjectEvaluateRequest.extTypeId">
|
||||||
|
<summary>
|
||||||
|
第四轮
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.SubjectEvaluateResult.childCount">
|
||||||
|
<summary>
|
||||||
|
是否有子项目
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Subjectevaluate.name">
|
||||||
|
<summary>
|
||||||
|
专业名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Subjectevaluate.majorCode">
|
||||||
|
<summary>
|
||||||
|
专业编号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Subjectevaluate.level">
|
||||||
|
<summary>
|
||||||
|
A|B|C|评级 等级
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Subjectevaluate.isHasIntroduce">
|
||||||
|
<summary>
|
||||||
|
是否有内容介绍
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:New_College.Model.ViewModels.FeaturedMajorRequest">
|
||||||
|
<summary>
|
||||||
|
特色专业
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.FeaturedMajorResult.countries">
|
||||||
|
<summary>
|
||||||
|
国家级
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.FeaturedMajorResult.provinces">
|
||||||
|
<summary>
|
||||||
|
省级
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.FeaturedMajorResult.provincePoints">
|
||||||
|
<summary>
|
||||||
|
省重点
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Country.name">
|
||||||
|
<summary>
|
||||||
|
学科专业名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Country.professionType">
|
||||||
|
<summary>
|
||||||
|
国家级/省重点/省级
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Country.isHasIntroduce">
|
||||||
|
<summary>
|
||||||
|
是否有专业介绍
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.DepartmentResult.collegeCode">
|
||||||
|
<summary>
|
||||||
|
院系编号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.DepartmentResult.name">
|
||||||
|
<summary>
|
||||||
|
院系名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.DepartmentResult.majorCount">
|
||||||
|
<summary>
|
||||||
|
对应专业数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Departmentmajor.name">
|
||||||
|
<summary>
|
||||||
|
专业名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Departmentmajor.code">
|
||||||
|
<summary>
|
||||||
|
专业code
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Departmentmajor.levelText">
|
||||||
|
<summary>
|
||||||
|
本/专
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Departmentmajor.majorDisplayName">
|
||||||
|
<summary>
|
||||||
|
显示名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.Departmentmajor.isHasIntroduce">
|
||||||
|
<summary>
|
||||||
|
是否有专业介绍
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:New_College.Model.ViewModels.PlanMajorScoreLineResponse.UId">
|
<member name="P:New_College.Model.ViewModels.PlanMajorScoreLineResponse.UId">
|
||||||
<summary>
|
<summary>
|
||||||
院校Id
|
院校Id
|
||||||
|
|
@ -4165,6 +4275,11 @@
|
||||||
冲稳保 类型:冲2,稳1,保0
|
冲稳保 类型:冲2,稳1,保0
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:New_College.Model.ViewModels.OneSubmitGoResponse.Percentage">
|
||||||
|
<summary>
|
||||||
|
百分比
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:New_College.Model.ViewModels.OneSubmitGoResponse.Rank">
|
<member name="P:New_College.Model.ViewModels.OneSubmitGoResponse.Rank">
|
||||||
<summary>
|
<summary>
|
||||||
排名
|
排名
|
||||||
|
|
|
||||||
|
|
@ -473,6 +473,27 @@
|
||||||
<param name="query"></param>
|
<param name="query"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.LibraryController.GetSubjectEvaluate(New_College.Model.ViewModels.SubjectEvaluateRequest)">
|
||||||
|
<summary>
|
||||||
|
获取学科评估
|
||||||
|
</summary>
|
||||||
|
<param name="request"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.LibraryController.GetFeaturedMajor(New_College.Model.ViewModels.FeaturedMajorRequest)">
|
||||||
|
<summary>
|
||||||
|
特色专业
|
||||||
|
</summary>
|
||||||
|
<param name="request"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.LibraryController.GetDepartment(New_College.Model.ViewModels.DepartmentRequest)">
|
||||||
|
<summary>
|
||||||
|
院系设置
|
||||||
|
</summary>
|
||||||
|
<param name="request"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:New_College.Api.Controllers.Front.MajorSalaryController.GetMajorSalaryResult(New_College.Model.ViewModels.MajorSalaryQuery)">
|
<member name="M:New_College.Api.Controllers.Front.MajorSalaryController.GetMajorSalaryResult(New_College.Model.ViewModels.MajorSalaryQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
获取高薪推荐
|
获取高薪推荐
|
||||||
|
|
@ -571,6 +592,13 @@
|
||||||
<param name="id"></param>
|
<param name="id"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.PcVolunteerController.DownloadPdf(System.String)">
|
||||||
|
<summary>
|
||||||
|
|
||||||
|
</summary>
|
||||||
|
<param name="url"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:New_College.Api.Controllers.Front.RegionController.GetRegionList(New_College.Model.ViewModels.SysRegionQuery)">
|
<member name="M:New_College.Api.Controllers.Front.RegionController.GetRegionList(New_College.Model.ViewModels.SysRegionQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
获取省市区
|
获取省市区
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
using Microsoft.DotNet.PlatformAbstractions;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace New_College.Common
|
||||||
|
{
|
||||||
|
public static class HtmlHeplerFetcher
|
||||||
|
{
|
||||||
|
public static async Task<string> GetHtmlContentAsync(string url)
|
||||||
|
{
|
||||||
|
using (HttpClient client = new HttpClient())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36");
|
||||||
|
client.DefaultRequestHeaders.Add("Sec-Ch-Ua","'Google Chrome';v='119','Chromium';v='119','Not?A_Brand';v='24'");
|
||||||
|
client.DefaultRequestHeaders.Add("Sec-Ch-Ua-Mobile", "?0");
|
||||||
|
client.DefaultRequestHeaders.Add("Sec-Ch-Ua-Platform", "Windows");
|
||||||
|
HttpResponseMessage response = await client.GetAsync(url);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
return await response.Content.ReadAsStringAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new HttpRequestException($"Failed to retrieve HTML. Status code: {response.StatusCode}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new HttpRequestException($"Failed to retrieve HTML. {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
using DinkToPdf.Contracts;
|
||||||
|
using DinkToPdf;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.IO;
|
||||||
|
using System.Net.Http;
|
||||||
|
|
||||||
|
namespace New_College.Common
|
||||||
|
{
|
||||||
|
|
||||||
|
public class HtmlToPdfConverter
|
||||||
|
{
|
||||||
|
private readonly IConverter _pdfConverter;
|
||||||
|
public HtmlToPdfConverter()
|
||||||
|
{
|
||||||
|
var globalSettings = new GlobalSettings
|
||||||
|
{
|
||||||
|
ColorMode = ColorMode.Color,
|
||||||
|
Orientation = Orientation.Portrait,
|
||||||
|
PaperSize = PaperKind.A4,
|
||||||
|
};
|
||||||
|
|
||||||
|
var objectSettings = new ObjectSettings
|
||||||
|
{
|
||||||
|
PagesCount = true,
|
||||||
|
HtmlContent = "<h1>Hello World</h1>",
|
||||||
|
WebSettings = { DefaultEncoding = "utf-8" },
|
||||||
|
};
|
||||||
|
|
||||||
|
_pdfConverter = new SynchronizedConverter(new PdfTools());
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] ConvertHtmlToPdf(string htmlContent)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var document = new HtmlToPdfDocument()
|
||||||
|
{
|
||||||
|
GlobalSettings = { PaperSize = PaperKind.A4, Orientation = Orientation.Portrait, DPI = 300 },
|
||||||
|
Objects = { new ObjectSettings { HtmlContent = htmlContent } }
|
||||||
|
};
|
||||||
|
byte[] pdfBytes = _pdfConverter.Convert(document);
|
||||||
|
return pdfBytes;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,25 @@ namespace New_College.Common
|
||||||
{
|
{
|
||||||
public class MajorPlanScoreTool
|
public class MajorPlanScoreTool
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 冲稳保百分比
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="LowScore"></param>
|
||||||
|
/// <param name="requestScore"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static int GetPlanPercentage(int LowScore, int requestScore)
|
||||||
|
{
|
||||||
|
int minscore = requestScore - 15;//最小
|
||||||
|
int constscore = requestScore;//中位数
|
||||||
|
int maxscore = requestScore + 15;//最大
|
||||||
|
|
||||||
|
int percentage = LowScore <= minscore ? new Random().Next(90, 99) : minscore < LowScore && LowScore <= constscore ? new Random().Next(65, 89) : LowScore > constscore && LowScore <= maxscore ? new Random().Next(30, 64) : new Random().Next(1, 29);
|
||||||
|
|
||||||
|
return percentage;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 冲稳保计算
|
/// 冲稳保计算
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -17,28 +36,8 @@ namespace New_College.Common
|
||||||
int minscore = requestScore - 15;//最小
|
int minscore = requestScore - 15;//最小
|
||||||
int constscore = requestScore;//中位数
|
int constscore = requestScore;//中位数
|
||||||
int maxscore = requestScore + 15;//最大
|
int maxscore = requestScore + 15;//最大
|
||||||
|
|
||||||
int type = LowScore <= minscore ? 0 : minscore < LowScore && LowScore <= constscore ? 1 : LowScore > constscore && LowScore <= maxscore ? 2 : -1;
|
int type = LowScore <= minscore ? 0 : minscore < LowScore && LowScore <= constscore ? 1 : LowScore > constscore && LowScore <= maxscore ? 2 : -1;
|
||||||
|
|
||||||
//if (LowScore <= minscore)
|
|
||||||
//{
|
|
||||||
// return "保";
|
|
||||||
//}
|
|
||||||
//else if (minscore < LowScore && LowScore <= constscore)
|
|
||||||
//{
|
|
||||||
// return "稳";
|
|
||||||
//}
|
|
||||||
//else if (LowScore > constscore && LowScore <= maxscore)
|
|
||||||
//{
|
|
||||||
|
|
||||||
// return "冲";
|
|
||||||
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// return "";
|
|
||||||
//}
|
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.10.0" />
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.10.0" />
|
||||||
<PackageReference Include="DingtalkChatbotSdk" Version="1.0.1" />
|
<PackageReference Include="DingtalkChatbotSdk" Version="1.0.1" />
|
||||||
|
<PackageReference Include="DinkToPdf.Standard" Version="1.1.0" />
|
||||||
<PackageReference Include="Essensoft.AspNetCore.Payment.Alipay" Version="3.1.8" />
|
<PackageReference Include="Essensoft.AspNetCore.Payment.Alipay" Version="3.1.8" />
|
||||||
<PackageReference Include="Essensoft.AspNetCore.Payment.Security" Version="3.1.8" />
|
<PackageReference Include="Essensoft.AspNetCore.Payment.Security" Version="3.1.8" />
|
||||||
<PackageReference Include="Essensoft.AspNetCore.Payment.WeChatPay" Version="3.1.5" />
|
<PackageReference Include="Essensoft.AspNetCore.Payment.WeChatPay" Version="3.1.5" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,222 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace New_College.Model.ViewModels
|
||||||
|
{
|
||||||
|
public class OtherUniversityDetailView
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SubjectEvaluateRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public string collegeCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 第四轮
|
||||||
|
/// </summary>
|
||||||
|
public string extTypeId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SubjectEvaluateResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
public SubjectEvaluateResult result { get; set; }
|
||||||
|
public string code { get; set; }
|
||||||
|
public string message { get; set; }
|
||||||
|
public string fullMessage { get; set; }
|
||||||
|
public DateTime timestamp { get; set; }
|
||||||
|
public bool isSuccess { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class SubjectEvaluateResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有子项目
|
||||||
|
/// </summary>
|
||||||
|
public int childCount { get; set; }
|
||||||
|
public string extTypeId { get; set; }
|
||||||
|
public string extTypeName { get; set; }
|
||||||
|
public string[] extTypeNames { get; set; }
|
||||||
|
public Subjectevaluate[] subjectEvaluates { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Subjectevaluate
|
||||||
|
{
|
||||||
|
public string code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 专业名称
|
||||||
|
/// </summary>
|
||||||
|
public string name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 专业编号
|
||||||
|
/// </summary>
|
||||||
|
public object majorCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A|B|C|评级 等级
|
||||||
|
/// </summary>
|
||||||
|
public string level { get; set; }
|
||||||
|
public int sort { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有内容介绍
|
||||||
|
/// </summary>
|
||||||
|
public bool isHasIntroduce { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 特色专业
|
||||||
|
/// </summary>
|
||||||
|
public class FeaturedMajorRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public string collegeCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class FeaturedMajorResponse
|
||||||
|
{
|
||||||
|
public FeaturedMajorResult result { get; set; }
|
||||||
|
public string code { get; set; }
|
||||||
|
public string message { get; set; }
|
||||||
|
public string fullMessage { get; set; }
|
||||||
|
public DateTime timestamp { get; set; }
|
||||||
|
public bool isSuccess { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class FeaturedMajorResult
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 国家级
|
||||||
|
/// </summary>
|
||||||
|
public Country[] countries { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 省级
|
||||||
|
/// </summary>
|
||||||
|
public object[] provinces { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 省重点
|
||||||
|
/// </summary>
|
||||||
|
public object[] provincePoints { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Country
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 学科专业名称
|
||||||
|
/// </summary>
|
||||||
|
public string name { get; set; }
|
||||||
|
public string code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 国家级/省重点/省级
|
||||||
|
/// </summary>
|
||||||
|
public string professionType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有专业介绍
|
||||||
|
/// </summary>
|
||||||
|
public bool isHasIntroduce { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class DepartmentRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public string collegeCode { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DepartmentResponse
|
||||||
|
{
|
||||||
|
public DepartmentResult[] result { get; set; }
|
||||||
|
public string code { get; set; }
|
||||||
|
public string message { get; set; }
|
||||||
|
public string fullMessage { get; set; }
|
||||||
|
public DateTime timestamp { get; set; }
|
||||||
|
public bool isSuccess { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class DepartmentResult
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 院系编号
|
||||||
|
/// </summary>
|
||||||
|
public string collegeCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 院系名称
|
||||||
|
/// </summary>
|
||||||
|
public string name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 对应专业数量
|
||||||
|
/// </summary>
|
||||||
|
public int majorCount { get; set; }
|
||||||
|
public string website { get; set; }
|
||||||
|
public Departmentmajor[] departmentMajors { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Departmentmajor
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public string departmentId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 专业名称
|
||||||
|
/// </summary>
|
||||||
|
public string name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 专业code
|
||||||
|
/// </summary>
|
||||||
|
public string code { get; set; }
|
||||||
|
public string level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 本/专
|
||||||
|
/// </summary>
|
||||||
|
public string levelText { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 显示名称
|
||||||
|
/// </summary>
|
||||||
|
public string majorDisplayName { get; set; }
|
||||||
|
public object largeClassName { get; set; }
|
||||||
|
public object middleClassName { get; set; }
|
||||||
|
public object departmentName { get; set; }
|
||||||
|
public object evaluateLevel { get; set; }
|
||||||
|
public string[] featuredLabel { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有专业介绍
|
||||||
|
/// </summary>
|
||||||
|
public bool isHasIntroduce { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -109,6 +109,8 @@ namespace New_College.Model.ViewModels
|
||||||
/// 冲稳保 类型:冲2,稳1,保0
|
/// 冲稳保 类型:冲2,稳1,保0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
|
|
||||||
|
public int Percentage { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 排名
|
/// 排名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -208,6 +210,8 @@ namespace New_College.Model.ViewModels
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SubjectClam { get; set; }
|
public string SubjectClam { get; set; }
|
||||||
|
|
||||||
|
public int Percentage { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -230,6 +234,11 @@ namespace New_College.Model.ViewModels
|
||||||
/// 冲稳保 类型:冲2,稳1,保0
|
/// 冲稳保 类型:冲2,稳1,保0
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 百分比
|
||||||
|
/// </summary>
|
||||||
|
public int Percentage { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 排名
|
/// 排名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -381,6 +381,7 @@ namespace New_College.Services
|
||||||
QJJH = university.QJJH == 1 ? true : false,
|
QJJH = university.QJJH == 1 ? true : false,
|
||||||
UniversityType = university.Type,
|
UniversityType = university.Type,
|
||||||
SubjectLevel = university.Subject_Level,
|
SubjectLevel = university.Subject_Level,
|
||||||
|
BuildDate=university.Build_Date,
|
||||||
Imglist = imgs,
|
Imglist = imgs,
|
||||||
DoctorateCount = university.Doctorate_Count,
|
DoctorateCount = university.Doctorate_Count,
|
||||||
MasterCount = university.Master_Count,
|
MasterCount = university.Master_Count,
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,7 @@ namespace New_College.Services
|
||||||
//_frank = c.LowScoreRank,
|
//_frank = c.LowScoreRank,
|
||||||
// SubjectClam = c.SelectSubject,
|
// SubjectClam = c.SelectSubject,
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校
|
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//冲稳保院校
|
||||||
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(c.LowScore, request.Score),
|
||||||
planCount = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Sum(c => c.PlanCount),
|
planCount = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Sum(c => c.PlanCount),
|
||||||
iGoPlanMajorItems = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Select(t => new AIGoPlanMajorItem()
|
iGoPlanMajorItems = list.Where(w => w.Years == DateTime.Now.Year && w.UId == c.UId).Select(t => new AIGoPlanMajorItem()
|
||||||
{
|
{
|
||||||
|
|
@ -124,6 +125,7 @@ namespace New_College.Services
|
||||||
MajorRemark = t.Remark,
|
MajorRemark = t.Remark,
|
||||||
planCount = t.PlanCount,
|
planCount = t.PlanCount,
|
||||||
SubjectClam = t.SelectSubject,
|
SubjectClam = t.SelectSubject,
|
||||||
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(t.LowScore, request.Score),
|
||||||
PlanItems = list.Where(ss => ss.UId == c.UId && ss.Major == t.Major).Select(k => new PlanItem()
|
PlanItems = list.Where(ss => ss.UId == c.UId && ss.Major == t.Major).Select(k => new PlanItem()
|
||||||
{
|
{
|
||||||
PlanCount = k.PlanCount,
|
PlanCount = k.PlanCount,
|
||||||
|
|
@ -194,7 +196,7 @@ namespace New_College.Services
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c.SelectSubject, claim[0]) || SqlFunc.Contains(c.SelectSubject, claim[1]) || SqlFunc.Contains(c.SelectSubject, claim[2]))
|
.AndIF(!string.IsNullOrWhiteSpace(request.SubjectClaim), c => SqlFunc.Contains(c.SelectSubject, claim[0]) || SqlFunc.Contains(c.SelectSubject, claim[1]) || SqlFunc.Contains(c.SelectSubject, claim[2]))
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.Major, request.Major))
|
.AndIF(!string.IsNullOrWhiteSpace(request.Major), c => SqlFunc.Contains(c.Major, request.Major))
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
.AndIF(!string.IsNullOrWhiteSpace(request.BatchName), c => c.BatchName.Equals(request.BatchName))
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province,c.AreaName))
|
.AndIF(!string.IsNullOrWhiteSpace(request.Province), c => SqlFunc.Contains(request.Province, c.AreaName))
|
||||||
.And(c => c.Years == request.Year)
|
.And(c => c.Years == request.Year)
|
||||||
.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
.AndIF(!string.IsNullOrWhiteSpace(request.SchoolType), c => c.SchoolType == request.SchoolType)
|
||||||
.AndIF(request.Score > 0, c => SqlFunc.Between(c.LowScore, request.Score - 15, request.Score + 15))
|
.AndIF(request.Score > 0, c => SqlFunc.Between(c.LowScore, request.Score - 15, request.Score + 15))
|
||||||
|
|
@ -256,6 +258,7 @@ namespace New_College.Services
|
||||||
UniversityName = c.UniversityName,
|
UniversityName = c.UniversityName,
|
||||||
SubjectClam = c.SelectSubject,
|
SubjectClam = c.SelectSubject,
|
||||||
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//还缺冲稳保
|
Type = MajorPlanScoreTool.GetPlanScore(c.LowScore, request.Score),//还缺冲稳保
|
||||||
|
Percentage = MajorPlanScoreTool.GetPlanPercentage(c.LowScore, request.Score),
|
||||||
PlanId = c.Id,
|
PlanId = c.Id,
|
||||||
UniversityCode = c.EnrollmentCode,
|
UniversityCode = c.EnrollmentCode,
|
||||||
MajorCode = c.MajorCode,
|
MajorCode = c.MajorCode,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue