Merge branch 'dev' of http://8.153.108.90:3000/YD/YD_SmartSports.Api into dev
This commit is contained in:
commit
1ef4750c5c
@ -1,28 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using VOL.Core.Extensions.AutofacManager;
|
|
||||||
using VOL.Entity.DomainModels;
|
|
||||||
using VOL.Model;
|
|
||||||
using VOL.Model.ShangWaiMao.Request;
|
|
||||||
using VOL.Model.ShangWaiMao.Response;
|
|
||||||
|
|
||||||
namespace VOL.Business.IRepositories.ShangWaiMao
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩临时表仓储
|
|
||||||
/// </summary>
|
|
||||||
public interface ITempTccjRepository : IDependency
|
|
||||||
{
|
|
||||||
Task<ShangWaiMaoTempTccjFilterOptions> GetFilterOptionsAsync();
|
|
||||||
|
|
||||||
Task<PageDataDto<ShangWaiMaoTempTccjListItem>> GetPageListAsync(ShangWaiMaoTempTccjPageParam param);
|
|
||||||
|
|
||||||
Task<ShangWaiMaoTempTccjDetailDto> GetDetailAsync(ShangWaiMaoTempTccjDetailParam param);
|
|
||||||
|
|
||||||
Task<List<TempTccj>> GetAllAsync();
|
|
||||||
|
|
||||||
Task<int> InsertAsync(TempTccj entity);
|
|
||||||
|
|
||||||
Task<int> InsertRangeAsync(IEnumerable<TempTccj> entities);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +1,5 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using VOL.Model;
|
using VOL.Model;
|
||||||
using VOL.Model.ShangWaiMao.Request;
|
|
||||||
using VOL.Model.ShangWaiMao.Response;
|
|
||||||
|
|
||||||
namespace VOL.Business.IServices.ShangWaiMao
|
namespace VOL.Business.IServices.ShangWaiMao
|
||||||
{
|
{
|
||||||
@ -10,26 +8,6 @@ namespace VOL.Business.IServices.ShangWaiMao
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IShangWaiMaoService
|
public interface IShangWaiMaoService
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩列表页搜索条件
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<ShangWaiMaoTempTccjFilterOptions> GetTempTccjFilterOptionsAsync();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩分页列表
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="paramDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<PageDataDto<ShangWaiMaoTempTccjListItem>> GetTempTccjPageListAsync(ShangWaiMaoTempTccjPageParam paramDto);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩详情
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="paramDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<ShangWaiMaoTempTccjDetailDto> GetTempTccjDetailAsync(ShangWaiMaoTempTccjDetailParam paramDto);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导出学生课程心率与运动数据
|
/// 导出学生课程心率与运动数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1,464 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Dapper;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using VOL.Business.IRepositories.ShangWaiMao;
|
|
||||||
using VOL.Core.DBManager;
|
|
||||||
using VOL.Core.Dapper;
|
|
||||||
using VOL.Core.Extensions.AutofacManager;
|
|
||||||
using VOL.Entity.DomainModels;
|
|
||||||
using VOL.Model;
|
|
||||||
using VOL.Model.ShangWaiMao.Request;
|
|
||||||
using VOL.Model.ShangWaiMao.Response;
|
|
||||||
|
|
||||||
namespace VOL.Business.Repositories.ShangWaiMao
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩临时表仓储
|
|
||||||
/// </summary>
|
|
||||||
public class TempTccjRepository : ITempTccjRepository
|
|
||||||
{
|
|
||||||
private const string TableName = "temp_tccj";
|
|
||||||
|
|
||||||
private ISqlDapper Dapper => DBServerProvider.SqlDapperSwmMySql;
|
|
||||||
|
|
||||||
public static ITempTccjRepository Instance
|
|
||||||
{
|
|
||||||
get { return AutofacContainerModule.GetService<ITempTccjRepository>(); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ShangWaiMaoTempTccjFilterOptions> GetFilterOptionsAsync()
|
|
||||||
{
|
|
||||||
const string sql = @"
|
|
||||||
select distinct
|
|
||||||
case sex
|
|
||||||
when '1' then '男'
|
|
||||||
when '2' then '女'
|
|
||||||
else sex
|
|
||||||
end as Label,
|
|
||||||
sex as Value
|
|
||||||
from temp_tccj
|
|
||||||
where ifnull(sex, '') <> ''
|
|
||||||
order by sex;
|
|
||||||
|
|
||||||
select distinct college_name as Label, college_name as Value
|
|
||||||
from temp_tccj
|
|
||||||
where ifnull(college_name, '') <> ''
|
|
||||||
order by college_name;
|
|
||||||
|
|
||||||
select distinct grade_no as Label, grade_no as Value
|
|
||||||
from temp_tccj
|
|
||||||
where ifnull(grade_no, '') <> ''
|
|
||||||
order by grade_no;
|
|
||||||
|
|
||||||
select distinct class_name as Label, class_name as Value
|
|
||||||
from temp_tccj
|
|
||||||
where ifnull(class_name, '') <> ''
|
|
||||||
order by class_name;
|
|
||||||
|
|
||||||
select distinct conclusion as Label, conclusion as Value
|
|
||||||
from temp_tccj
|
|
||||||
where ifnull(conclusion, '') <> ''
|
|
||||||
order by conclusion;";
|
|
||||||
|
|
||||||
var (sexList, collegeList, gradeList, administrativeClassList, conclusionList) =
|
|
||||||
await Dapper.QueryMultipleAsync<ShangWaiMaoOptionItem, ShangWaiMaoOptionItem, ShangWaiMaoOptionItem, ShangWaiMaoOptionItem, ShangWaiMaoOptionItem>(sql, null);
|
|
||||||
|
|
||||||
return new ShangWaiMaoTempTccjFilterOptions
|
|
||||||
{
|
|
||||||
SexList = sexList.ToList(),
|
|
||||||
CollegeList = collegeList.ToList(),
|
|
||||||
GradeList = gradeList.ToList(),
|
|
||||||
AdministrativeClassList = administrativeClassList.ToList(),
|
|
||||||
SportsClassList = new List<ShangWaiMaoOptionItem>(),
|
|
||||||
ConclusionList = conclusionList.ToList()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<PageDataDto<ShangWaiMaoTempTccjListItem>> GetPageListAsync(ShangWaiMaoTempTccjPageParam param)
|
|
||||||
{
|
|
||||||
param ??= new ShangWaiMaoTempTccjPageParam();
|
|
||||||
param.PageIndex = param.PageIndex <= 0 ? 1 : param.PageIndex;
|
|
||||||
param.PageSize = param.PageSize <= 0 ? 20 : param.PageSize;
|
|
||||||
|
|
||||||
var whereBuilder = new StringBuilder(" where 1=1 ");
|
|
||||||
var dbParams = new DynamicParameters();
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.StudentNo))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and student_no like concat('%', @StudentNo, '%') ");
|
|
||||||
dbParams.Add("StudentNo", param.StudentNo.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.Name))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and name like concat('%', @Name, '%') ");
|
|
||||||
dbParams.Add("Name", param.Name.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.Sex))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and sex = @Sex ");
|
|
||||||
dbParams.Add("Sex", NormalizeSex(param.Sex));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.CollegeName))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and college_name = @CollegeName ");
|
|
||||||
dbParams.Add("CollegeName", param.CollegeName.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.GradeNo))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and grade_no = @GradeNo ");
|
|
||||||
dbParams.Add("GradeNo", param.GradeNo.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.AdministrativeClass))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and class_name = @AdministrativeClass ");
|
|
||||||
dbParams.Add("AdministrativeClass", param.AdministrativeClass.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.Conclusion))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and conclusion = @Conclusion ");
|
|
||||||
dbParams.Add("Conclusion", param.Conclusion.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
var countSql = $"select count(1) from {TableName} {whereBuilder}";
|
|
||||||
var totalObj = await Dapper.ExecuteScalarAsync(countSql, dbParams);
|
|
||||||
var total = int.TryParse(totalObj?.ToString(), out var parsedTotal) ? parsedTotal : 0;
|
|
||||||
|
|
||||||
dbParams.Add("Offset", (param.PageIndex - 1) * param.PageSize);
|
|
||||||
dbParams.Add("PageSize", param.PageSize);
|
|
||||||
|
|
||||||
var listSql = $@"
|
|
||||||
select
|
|
||||||
student_no as StudentNo,
|
|
||||||
name as Name,
|
|
||||||
case sex
|
|
||||||
when '1' then '男'
|
|
||||||
when '2' then '女'
|
|
||||||
else sex
|
|
||||||
end as Sex,
|
|
||||||
grade_no as GradeNo,
|
|
||||||
class_name as AdministrativeClass,
|
|
||||||
'' as SportsClass,
|
|
||||||
case test_state
|
|
||||||
when 0 then '未测试'
|
|
||||||
when 1 then '已测试'
|
|
||||||
when 2 then '缺项'
|
|
||||||
else ''
|
|
||||||
end as TestState,
|
|
||||||
case exempt
|
|
||||||
when 0 then '测试'
|
|
||||||
when 1 then '免试'
|
|
||||||
else ''
|
|
||||||
end as Exempt,
|
|
||||||
add_score as AddScore,
|
|
||||||
health_score as HealthScore,
|
|
||||||
score as Score,
|
|
||||||
conclusion as Conclusion,
|
|
||||||
'' as Remark,
|
|
||||||
college_name as CollegeName
|
|
||||||
from {TableName}
|
|
||||||
{whereBuilder}
|
|
||||||
order by student_no
|
|
||||||
limit @Offset, @PageSize";
|
|
||||||
|
|
||||||
var datas = (await Dapper.QueryListAsync<ShangWaiMaoTempTccjListItem>(listSql, dbParams)).ToList();
|
|
||||||
|
|
||||||
return new PageDataDto<ShangWaiMaoTempTccjListItem>
|
|
||||||
{
|
|
||||||
Total = total,
|
|
||||||
TotalPages = total == 0 ? 0 : (total + param.PageSize - 1) / param.PageSize,
|
|
||||||
PageIndex = param.PageIndex,
|
|
||||||
PageSize = param.PageSize,
|
|
||||||
Datas = datas
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<ShangWaiMaoTempTccjDetailDto> GetDetailAsync(ShangWaiMaoTempTccjDetailParam param)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrWhiteSpace(param?.StudentNo))
|
|
||||||
{
|
|
||||||
throw new Exception("学号不能为空");
|
|
||||||
}
|
|
||||||
|
|
||||||
var whereBuilder = new StringBuilder(" where student_no = @StudentNo ");
|
|
||||||
var dbParams = new DynamicParameters();
|
|
||||||
dbParams.Add("StudentNo", param.StudentNo.Trim());
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.SchoolYear))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and school_year = @SchoolYear ");
|
|
||||||
dbParams.Add("SchoolYear", param.SchoolYear.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(param.SchoolTerm))
|
|
||||||
{
|
|
||||||
whereBuilder.Append(" and school_term = @SchoolTerm ");
|
|
||||||
dbParams.Add("SchoolTerm", param.SchoolTerm.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
var sql = $@"
|
|
||||||
select *
|
|
||||||
from {TableName}
|
|
||||||
{whereBuilder}
|
|
||||||
order by school_year desc, school_term desc
|
|
||||||
limit 1;
|
|
||||||
|
|
||||||
select
|
|
||||||
avg(lungs_score) as LungsScore,
|
|
||||||
avg(meter50_score) as Meter50Score,
|
|
||||||
avg(standing_long_jump_score) as StandingLongJumpScore,
|
|
||||||
avg(sit_and_reach_score) as SitAndReachScore,
|
|
||||||
avg(case when sex = '1' then meter1000_score when sex = '2' then meter800_score else null end) as EnduranceScore,
|
|
||||||
avg(case when sex = '1' then pull_up_score when sex = '2' then sit_up_score else null end) as StrengthScore
|
|
||||||
from {TableName};";
|
|
||||||
|
|
||||||
var (studentList, averageList) = await Dapper.QueryMultipleAsync<TempTccj, TempTccjPortraitAverageData>(sql, dbParams);
|
|
||||||
var student = studentList.FirstOrDefault();
|
|
||||||
if (student == null)
|
|
||||||
{
|
|
||||||
throw new Exception("未找到该学生体测详情");
|
|
||||||
}
|
|
||||||
|
|
||||||
var averages = averageList.FirstOrDefault() ?? new TempTccjPortraitAverageData();
|
|
||||||
|
|
||||||
return new ShangWaiMaoTempTccjDetailDto
|
|
||||||
{
|
|
||||||
BasicInfo = BuildBasicInfo(student),
|
|
||||||
DetailItems = BuildDetailItems(student),
|
|
||||||
PortraitItems = BuildPortraitItems(student, averages)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string NormalizeSex(string sex)
|
|
||||||
{
|
|
||||||
var normalized = sex?.Trim();
|
|
||||||
return normalized switch
|
|
||||||
{
|
|
||||||
"男" => "1",
|
|
||||||
"女" => "2",
|
|
||||||
_ => normalized
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ShangWaiMaoTempTccjBasicInfo BuildBasicInfo(TempTccj student)
|
|
||||||
{
|
|
||||||
return new ShangWaiMaoTempTccjBasicInfo
|
|
||||||
{
|
|
||||||
CollegeName = student.college_name,
|
|
||||||
GradeName = GetGradeDisplayName(student.grade_no),
|
|
||||||
AdministrativeClass = student.class_name,
|
|
||||||
StudentNo = student.student_no,
|
|
||||||
Name = student.name,
|
|
||||||
Sex = GetSexDisplayName(student.sex),
|
|
||||||
HealthScore = FormatDisplayValue(student.health_score),
|
|
||||||
AddScore = FormatDisplayValue(student.add_score),
|
|
||||||
TotalScore = FormatDisplayValue(student.score),
|
|
||||||
Conclusion = student.conclusion,
|
|
||||||
Remark = string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<ShangWaiMaoTempTccjDetailItem> BuildDetailItems(TempTccj student)
|
|
||||||
{
|
|
||||||
var isMale = student.sex == "1";
|
|
||||||
|
|
||||||
return new List<ShangWaiMaoTempTccjDetailItem>
|
|
||||||
{
|
|
||||||
CreateDetailItem("身高", student.height, "厘米"),
|
|
||||||
CreateDetailItem("体重", student.weight, "公斤"),
|
|
||||||
CreateDetailItem("肺活量", student.lungs, "毫升", null, student.lungs_score, student.lungs_leve),
|
|
||||||
CreateDetailItem("50米跑", student.meter50, "秒", null, student.meter50_score, student.meter50_leve),
|
|
||||||
CreateDetailItem("立定跳远", student.standing_long_jump, "厘米", null, student.standing_long_jump_score, student.standing_long_jump_leve),
|
|
||||||
CreateDetailItem("坐位体前屈", student.sit_and_reach, "厘米", null, student.sit_and_reach_score, student.sit_and_reach_leve),
|
|
||||||
CreateDetailItem(isMale ? "1000米跑" : "800米跑", isMale ? student.meter1000 : student.meter800, "分/秒", student.bonus2_df, isMale ? student.meter1000_score : student.meter800_score, isMale ? student.meter1000_leve : student.meter800_leve),
|
|
||||||
CreateDetailItem(isMale ? "引体向上" : "1分钟仰卧起坐", isMale ? student.pull_up : student.sit_up, isMale ? "次" : "次/分钟", student.bonus1_df, isMale ? student.pull_up_score : student.sit_up_score, isMale ? student.pull_up_leve : student.sit_up_leve),
|
|
||||||
CreateDetailItem("左眼裸眼视力", student.leftVision),
|
|
||||||
CreateDetailItem("右眼裸眼视力", student.rightVision),
|
|
||||||
CreateDetailItem("左眼球镜", student.left_sphere),
|
|
||||||
CreateDetailItem("右眼球镜", student.right_sphere),
|
|
||||||
CreateDetailItem("左眼柱镜", student.left_cytdnder),
|
|
||||||
CreateDetailItem("右眼柱镜", student.right_cytdnder)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<ShangWaiMaoTempTccjPortraitItem> BuildPortraitItems(TempTccj student, TempTccjPortraitAverageData averages)
|
|
||||||
{
|
|
||||||
var isMale = student.sex == "1";
|
|
||||||
|
|
||||||
return new List<ShangWaiMaoTempTccjPortraitItem>
|
|
||||||
{
|
|
||||||
CreatePortraitItem("肺活量", student.lungs_score, averages.LungsScore),
|
|
||||||
CreatePortraitItem("中长跑", isMale ? student.meter1000_score : student.meter800_score, averages.EnduranceScore),
|
|
||||||
CreatePortraitItem("引体/仰卧", isMale ? student.pull_up_score : student.sit_up_score, averages.StrengthScore),
|
|
||||||
CreatePortraitItem("立定跳远", student.standing_long_jump_score, averages.StandingLongJumpScore),
|
|
||||||
CreatePortraitItem("坐位体前屈", student.sit_and_reach_score, averages.SitAndReachScore),
|
|
||||||
CreatePortraitItem("50米跑", student.meter50_score, averages.Meter50Score)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ShangWaiMaoTempTccjDetailItem CreateDetailItem(string itemName, decimal? achievement, string unit = "", decimal? addScore = null, decimal? score = null, string level = "")
|
|
||||||
{
|
|
||||||
return new ShangWaiMaoTempTccjDetailItem
|
|
||||||
{
|
|
||||||
ItemName = itemName,
|
|
||||||
Achievement = FormatDisplayValue(achievement),
|
|
||||||
Unit = unit,
|
|
||||||
AddScore = FormatDisplayValue(addScore),
|
|
||||||
Score = FormatDisplayValue(score),
|
|
||||||
Level = level ?? string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ShangWaiMaoTempTccjDetailItem CreateDetailItem(string itemName, string achievement, string unit = "", string addScore = "", string score = "", string level = "")
|
|
||||||
{
|
|
||||||
return new ShangWaiMaoTempTccjDetailItem
|
|
||||||
{
|
|
||||||
ItemName = itemName,
|
|
||||||
Achievement = achievement ?? string.Empty,
|
|
||||||
Unit = unit,
|
|
||||||
AddScore = addScore ?? string.Empty,
|
|
||||||
Score = score ?? string.Empty,
|
|
||||||
Level = level ?? string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static ShangWaiMaoTempTccjPortraitItem CreatePortraitItem(string itemName, decimal? personalScore, decimal? schoolAverageScore)
|
|
||||||
{
|
|
||||||
return new ShangWaiMaoTempTccjPortraitItem
|
|
||||||
{
|
|
||||||
ItemName = itemName,
|
|
||||||
PersonalScore = personalScore,
|
|
||||||
SchoolAverageScore = schoolAverageScore
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetSexDisplayName(string sex)
|
|
||||||
{
|
|
||||||
return sex switch
|
|
||||||
{
|
|
||||||
"1" => "男",
|
|
||||||
"2" => "女",
|
|
||||||
_ => sex ?? string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string GetGradeDisplayName(string gradeNo)
|
|
||||||
{
|
|
||||||
var normalized = gradeNo?.Trim();
|
|
||||||
return normalized switch
|
|
||||||
{
|
|
||||||
"41" => "大一",
|
|
||||||
"42" => "大二",
|
|
||||||
"43" => "大三",
|
|
||||||
"44" => "大四",
|
|
||||||
_ => normalized ?? string.Empty
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static string FormatDisplayValue(decimal? value)
|
|
||||||
{
|
|
||||||
return value.HasValue ? value.Value.ToString("0.##") : string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
private sealed class TempTccjPortraitAverageData
|
|
||||||
{
|
|
||||||
public decimal? LungsScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? Meter50Score { get; set; }
|
|
||||||
|
|
||||||
public decimal? StandingLongJumpScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? SitAndReachScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? EnduranceScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? StrengthScore { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<List<TempTccj>> GetAllAsync()
|
|
||||||
{
|
|
||||||
var result = await Dapper.QueryListAsync<TempTccj>($"select * from {TableName}", null);
|
|
||||||
return result.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<int> InsertAsync(TempTccj entity)
|
|
||||||
{
|
|
||||||
const string sql = @"
|
|
||||||
insert into temp_tccj
|
|
||||||
(
|
|
||||||
school_year, school_term, student_no, name, sex, class_no, grade_no, class_name, college_name,
|
|
||||||
test_state, exempt, add_score, health_score, score, conclusion, height, weight, bmi, bmi_df,
|
|
||||||
bmi_score, bmi_leve, lungs, lungs_df, lungs_score, lungs_leve, meter50, meter50_df, meter50_score,
|
|
||||||
meter50_leve, standing_long_jump, standing_long_jump_df, standing_long_jump_score, standing_long_jump_leve,
|
|
||||||
sit_and_reach, sit_and_reach_df, sit_and_reach_score, sit_and_reach_leve, meter800, meter800_df,
|
|
||||||
meter800_score, meter800_leve, meter1000, meter1000_df, meter1000_score, meter1000_leve, sit_up,
|
|
||||||
sit_up_df, sit_up_score, sit_up_leve, pull_up, pull_up_df, pull_up_score, pull_up_leve, skip, skip_df,
|
|
||||||
skip_score, skip_leve, shuttle_run, shuttle_run_df, shuttle_run_score, shuttle_run_leve, leftVision,
|
|
||||||
rightVision, leftMirror, rightMirror, leftAmetropia, rightAmetropia, left_sphere, right_sphere,
|
|
||||||
left_cytdnder, right_cytdnder, left_axial, right_axial, is_ok_mirror, bonus1, bonus1_df, bonus2, bonus2_df
|
|
||||||
)
|
|
||||||
values
|
|
||||||
(
|
|
||||||
@school_year, @school_term, @student_no, @name, @sex, @class_no, @grade_no, @class_name, @college_name,
|
|
||||||
@test_state, @exempt, @add_score, @health_score, @score, @conclusion, @height, @weight, @bmi, @bmi_df,
|
|
||||||
@bmi_score, @bmi_leve, @lungs, @lungs_df, @lungs_score, @lungs_leve, @meter50, @meter50_df, @meter50_score,
|
|
||||||
@meter50_leve, @standing_long_jump, @standing_long_jump_df, @standing_long_jump_score, @standing_long_jump_leve,
|
|
||||||
@sit_and_reach, @sit_and_reach_df, @sit_and_reach_score, @sit_and_reach_leve, @meter800, @meter800_df,
|
|
||||||
@meter800_score, @meter800_leve, @meter1000, @meter1000_df, @meter1000_score, @meter1000_leve, @sit_up,
|
|
||||||
@sit_up_df, @sit_up_score, @sit_up_leve, @pull_up, @pull_up_df, @pull_up_score, @pull_up_leve, @skip, @skip_df,
|
|
||||||
@skip_score, @skip_leve, @shuttle_run, @shuttle_run_df, @shuttle_run_score, @shuttle_run_leve, @leftVision,
|
|
||||||
@rightVision, @leftMirror, @rightMirror, @leftAmetropia, @rightAmetropia, @left_sphere, @right_sphere,
|
|
||||||
@left_cytdnder, @right_cytdnder, @left_axial, @right_axial, @is_ok_mirror, @bonus1, @bonus1_df, @bonus2, @bonus2_df
|
|
||||||
);";
|
|
||||||
|
|
||||||
return Dapper.ExcuteNonQueryAsync(sql, entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Task<int> InsertRangeAsync(IEnumerable<TempTccj> entities)
|
|
||||||
{
|
|
||||||
var entityList = entities?.ToList() ?? new List<TempTccj>();
|
|
||||||
if (entityList.Count == 0)
|
|
||||||
{
|
|
||||||
return Task.FromResult(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
const string sql = @"
|
|
||||||
insert into temp_tccj
|
|
||||||
(
|
|
||||||
school_year, school_term, student_no, name, sex, class_no, grade_no, class_name, college_name,
|
|
||||||
test_state, exempt, add_score, health_score, score, conclusion, height, weight, bmi, bmi_df,
|
|
||||||
bmi_score, bmi_leve, lungs, lungs_df, lungs_score, lungs_leve, meter50, meter50_df, meter50_score,
|
|
||||||
meter50_leve, standing_long_jump, standing_long_jump_df, standing_long_jump_score, standing_long_jump_leve,
|
|
||||||
sit_and_reach, sit_and_reach_df, sit_and_reach_score, sit_and_reach_leve, meter800, meter800_df,
|
|
||||||
meter800_score, meter800_leve, meter1000, meter1000_df, meter1000_score, meter1000_leve, sit_up,
|
|
||||||
sit_up_df, sit_up_score, sit_up_leve, pull_up, pull_up_df, pull_up_score, pull_up_leve, skip, skip_df,
|
|
||||||
skip_score, skip_leve, shuttle_run, shuttle_run_df, shuttle_run_score, shuttle_run_leve, leftVision,
|
|
||||||
rightVision, leftMirror, rightMirror, leftAmetropia, rightAmetropia, left_sphere, right_sphere,
|
|
||||||
left_cytdnder, right_cytdnder, left_axial, right_axial, is_ok_mirror, bonus1, bonus1_df, bonus2, bonus2_df
|
|
||||||
)
|
|
||||||
values
|
|
||||||
(
|
|
||||||
@school_year, @school_term, @student_no, @name, @sex, @class_no, @grade_no, @class_name, @college_name,
|
|
||||||
@test_state, @exempt, @add_score, @health_score, @score, @conclusion, @height, @weight, @bmi, @bmi_df,
|
|
||||||
@bmi_score, @bmi_leve, @lungs, @lungs_df, @lungs_score, @lungs_leve, @meter50, @meter50_df, @meter50_score,
|
|
||||||
@meter50_leve, @standing_long_jump, @standing_long_jump_df, @standing_long_jump_score, @standing_long_jump_leve,
|
|
||||||
@sit_and_reach, @sit_and_reach_df, @sit_and_reach_score, @sit_and_reach_leve, @meter800, @meter800_df,
|
|
||||||
@meter800_score, @meter800_leve, @meter1000, @meter1000_df, @meter1000_score, @meter1000_leve, @sit_up,
|
|
||||||
@sit_up_df, @sit_up_score, @sit_up_leve, @pull_up, @pull_up_df, @pull_up_score, @pull_up_leve, @skip, @skip_df,
|
|
||||||
@skip_score, @skip_leve, @shuttle_run, @shuttle_run_df, @shuttle_run_score, @shuttle_run_leve, @leftVision,
|
|
||||||
@rightVision, @leftMirror, @rightMirror, @leftAmetropia, @rightAmetropia, @left_sphere, @right_sphere,
|
|
||||||
@left_cytdnder, @right_cytdnder, @left_axial, @right_axial, @is_ok_mirror, @bonus1, @bonus1_df, @bonus2, @bonus2_df
|
|
||||||
);";
|
|
||||||
|
|
||||||
return Dapper.ExcuteNonQueryAsync(sql, entityList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -113,7 +113,6 @@ namespace VOL.Business.Services.ShangWaiMao
|
|||||||
|
|
||||||
return BuildExcel(rawDataList);
|
return BuildExcel(rawDataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static byte[] BuildExcel(List<HeartRateExportRawData> rawDataList)
|
private static byte[] BuildExcel(List<HeartRateExportRawData> rawDataList)
|
||||||
{
|
{
|
||||||
using var package = new ExcelPackage();
|
using var package = new ExcelPackage();
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Castle.Core.Internal;
|
using Castle.Core.Internal;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|||||||
@ -78,11 +78,6 @@ namespace VOL.Core.Configuration
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static JingShiTiJiao JingShiTiJiao { get; set; }
|
public static JingShiTiJiao JingShiTiJiao { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸 MySQL
|
|
||||||
/// </summary>
|
|
||||||
public static SwmMySqlOptions SwmMySql { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// JWT有效期(分钟=默认120)
|
/// JWT有效期(分钟=默认120)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -108,7 +103,6 @@ namespace VOL.Core.Configuration
|
|||||||
services.Configure<YueDongServerOSS>(configuration.GetSection("YueDongServerOSS"));
|
services.Configure<YueDongServerOSS>(configuration.GetSection("YueDongServerOSS"));
|
||||||
|
|
||||||
services.Configure<JingShiTiJiao>(configuration.GetSection("JingShiTiJiao"));
|
services.Configure<JingShiTiJiao>(configuration.GetSection("JingShiTiJiao"));
|
||||||
services.Configure<SwmMySqlOptions>(configuration.GetSection("SwmMySql"));
|
|
||||||
|
|
||||||
var provider = services.BuildServiceProvider();
|
var provider = services.BuildServiceProvider();
|
||||||
IWebHostEnvironment environment = provider.GetRequiredService<IWebHostEnvironment>();
|
IWebHostEnvironment environment = provider.GetRequiredService<IWebHostEnvironment>();
|
||||||
@ -130,7 +124,6 @@ namespace VOL.Core.Configuration
|
|||||||
YueDongServerOSS = provider.GetRequiredService<IOptions<YueDongServerOSS>>().Value ?? new YueDongServerOSS();
|
YueDongServerOSS = provider.GetRequiredService<IOptions<YueDongServerOSS>>().Value ?? new YueDongServerOSS();
|
||||||
|
|
||||||
JingShiTiJiao = provider.GetRequiredService<IOptions<JingShiTiJiao>>().Value ?? new JingShiTiJiao();
|
JingShiTiJiao = provider.GetRequiredService<IOptions<JingShiTiJiao>>().Value ?? new JingShiTiJiao();
|
||||||
SwmMySql = provider.GetRequiredService<IOptions<SwmMySqlOptions>>().Value ?? new SwmMySqlOptions();
|
|
||||||
|
|
||||||
_connection = provider.GetRequiredService<IOptions<Connection>>().Value;
|
_connection = provider.GetRequiredService<IOptions<Connection>>().Value;
|
||||||
|
|
||||||
@ -272,9 +265,4 @@ namespace VOL.Core.Configuration
|
|||||||
public string SchoolCode { get; set; }
|
public string SchoolCode { get; set; }
|
||||||
public string SportsItem { get; set; }
|
public string SportsItem { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SwmMySqlOptions
|
|
||||||
{
|
|
||||||
public string ConnectionString { get; set; }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,4 @@
|
|||||||
using VOL.Core.Configuration;
|
namespace VOL.Core.DBManager.Partial
|
||||||
using VOL.Core.Dapper;
|
|
||||||
using VOL.Core.Enums;
|
|
||||||
|
|
||||||
namespace VOL.Core.DBManager
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 2022.11.21增加其他数据库(sqlserver、mysql、pgsql、oracle)连接配置说明
|
/// 2022.11.21增加其他数据库(sqlserver、mysql、pgsql、oracle)连接配置说明
|
||||||
@ -10,16 +6,21 @@ namespace VOL.Core.DBManager
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class DBServerProvider
|
public partial class DBServerProvider
|
||||||
{
|
{
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 上外贸独立 MySQL 数据库对象
|
///// 单独配置mysql数据库
|
||||||
/// </summary>
|
///// </summary>
|
||||||
public static ISqlDapper SqlDapperSwmMySql
|
//public static ISqlDapper SqlDapperMySql
|
||||||
{
|
//{
|
||||||
get
|
// get
|
||||||
{
|
// {
|
||||||
return new SqlDapper(AppSetting.SwmMySql.ConnectionString, DbCurrentType.MySql);
|
// //读取appsettings.json中的配置
|
||||||
}
|
// string 数据库连接字符串 = AppSetting.GetSettingString("key");
|
||||||
}
|
// return new SqlDapper(数据库连接字符串, DbCurrentType.MySql);
|
||||||
|
|
||||||
|
// //访问数据库方式
|
||||||
|
// //DBServerProvider.SqlDapperMySql.xx
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
///// 如果有多个不同的mysql数据库,这里再加一个配置
|
///// 如果有多个不同的mysql数据库,这里再加一个配置
|
||||||
|
|||||||
@ -1,43 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using VOL.Core.Configuration;
|
|
||||||
using VOL.Entity.DomainModels;
|
|
||||||
|
|
||||||
namespace VOL.Core.EFDbContext
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸独立 MySQL 上下文
|
|
||||||
/// </summary>
|
|
||||||
public class SwmMySqlContext : DbContext
|
|
||||||
{
|
|
||||||
public SwmMySqlContext(DbContextOptions<SwmMySqlContext> options)
|
|
||||||
: base(options)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public DbSet<TempTccj> TempTccj { get; set; }
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
||||||
{
|
|
||||||
if (!optionsBuilder.IsConfigured)
|
|
||||||
{
|
|
||||||
optionsBuilder.UseMySql(
|
|
||||||
AppSetting.SwmMySql.ConnectionString,
|
|
||||||
new MySqlServerVersion(new Version(8, 0, 20)));
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnConfiguring(optionsBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
modelBuilder.Entity<TempTccj>(entity =>
|
|
||||||
{
|
|
||||||
entity.HasNoKey();
|
|
||||||
entity.ToTable("temp_tccj");
|
|
||||||
});
|
|
||||||
|
|
||||||
base.OnModelCreating(modelBuilder);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -83,13 +83,6 @@ namespace VOL.Core.Extensions
|
|||||||
{
|
{
|
||||||
services.AddDbContextPool<VOLContext>(optionsBuilder => { optionsBuilder.UseSqlServer(connectionString); }, 64);
|
services.AddDbContextPool<VOLContext>(optionsBuilder => { optionsBuilder.UseSqlServer(connectionString); }, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
services.AddDbContextPool<SwmMySqlContext>(optionsBuilder =>
|
|
||||||
{
|
|
||||||
optionsBuilder.UseMySql(
|
|
||||||
AppSetting.SwmMySql.ConnectionString,
|
|
||||||
new MySqlServerVersion(new Version(8, 0, 20)));
|
|
||||||
}, 16);
|
|
||||||
//启用缓存
|
//启用缓存
|
||||||
if (AppSetting.UseRedis)
|
if (AppSetting.UseRedis)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using VOL.Entity.SystemModels;
|
||||||
|
|
||||||
namespace VOL.Entity.DomainModels
|
namespace VOL.Entity.DomainModels
|
||||||
{
|
{
|
||||||
@ -6,7 +7,7 @@ namespace VOL.Entity.DomainModels
|
|||||||
/// 上外贸体测成绩临时表
|
/// 上外贸体测成绩临时表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Table("temp_tccj")]
|
[Table("temp_tccj")]
|
||||||
public class TempTccj
|
public class TempTccj : BaseEntity
|
||||||
{
|
{
|
||||||
public string school_year { get; set; }
|
public string school_year { get; set; }
|
||||||
public string school_term { get; set; }
|
public string school_term { get; set; }
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
namespace VOL.Model.ShangWaiMao.Request
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩详情参数
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjDetailParam
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 学号
|
|
||||||
/// </summary>
|
|
||||||
public string StudentNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 学年
|
|
||||||
/// </summary>
|
|
||||||
public string SchoolYear { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 学期
|
|
||||||
/// </summary>
|
|
||||||
public string SchoolTerm { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
using VOL.Model;
|
|
||||||
|
|
||||||
namespace VOL.Model.ShangWaiMao.Request
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩列表查询参数
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjPageParam : PageDto
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 学号
|
|
||||||
/// </summary>
|
|
||||||
public string StudentNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 姓名
|
|
||||||
/// </summary>
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 性别
|
|
||||||
/// </summary>
|
|
||||||
public string Sex { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 院系
|
|
||||||
/// </summary>
|
|
||||||
public string CollegeName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 年级
|
|
||||||
/// </summary>
|
|
||||||
public string GradeNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 行政班
|
|
||||||
/// </summary>
|
|
||||||
public string AdministrativeClass { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 体育班
|
|
||||||
/// </summary>
|
|
||||||
public string SportsClass { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 等级
|
|
||||||
/// </summary>
|
|
||||||
public string Conclusion { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,136 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace VOL.Model.ShangWaiMao.Response
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩搜索项
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjFilterOptions
|
|
||||||
{
|
|
||||||
public List<ShangWaiMaoOptionItem> SexList { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoOptionItem> CollegeList { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoOptionItem> GradeList { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoOptionItem> AdministrativeClassList { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoOptionItem> SportsClassList { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoOptionItem> ConclusionList { get; set; } = new();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸下拉项
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoOptionItem
|
|
||||||
{
|
|
||||||
public string Label { get; set; }
|
|
||||||
|
|
||||||
public string Value { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩列表项
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjListItem
|
|
||||||
{
|
|
||||||
public string StudentNo { get; set; }
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public string Sex { get; set; }
|
|
||||||
|
|
||||||
public string GradeNo { get; set; }
|
|
||||||
|
|
||||||
public string AdministrativeClass { get; set; }
|
|
||||||
|
|
||||||
public string SportsClass { get; set; }
|
|
||||||
|
|
||||||
public string TestState { get; set; }
|
|
||||||
|
|
||||||
public string Exempt { get; set; }
|
|
||||||
|
|
||||||
public decimal? AddScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? HealthScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? Score { get; set; }
|
|
||||||
|
|
||||||
public string Conclusion { get; set; }
|
|
||||||
|
|
||||||
public string Remark { get; set; }
|
|
||||||
|
|
||||||
public string CollegeName { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩详情
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjDetailDto
|
|
||||||
{
|
|
||||||
public ShangWaiMaoTempTccjBasicInfo BasicInfo { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoTempTccjDetailItem> DetailItems { get; set; } = new();
|
|
||||||
|
|
||||||
public List<ShangWaiMaoTempTccjPortraitItem> PortraitItems { get; set; } = new();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩顶部基础信息
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjBasicInfo
|
|
||||||
{
|
|
||||||
public string CollegeName { get; set; }
|
|
||||||
|
|
||||||
public string GradeName { get; set; }
|
|
||||||
|
|
||||||
public string AdministrativeClass { get; set; }
|
|
||||||
|
|
||||||
public string StudentNo { get; set; }
|
|
||||||
|
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public string Sex { get; set; }
|
|
||||||
|
|
||||||
public string HealthScore { get; set; }
|
|
||||||
|
|
||||||
public string AddScore { get; set; }
|
|
||||||
|
|
||||||
public string TotalScore { get; set; }
|
|
||||||
|
|
||||||
public string Conclusion { get; set; }
|
|
||||||
|
|
||||||
public string Remark { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸体测成绩明细项
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjDetailItem
|
|
||||||
{
|
|
||||||
public string ItemName { get; set; }
|
|
||||||
|
|
||||||
public string Achievement { get; set; }
|
|
||||||
|
|
||||||
public string Unit { get; set; }
|
|
||||||
|
|
||||||
public string AddScore { get; set; }
|
|
||||||
|
|
||||||
public string Score { get; set; }
|
|
||||||
|
|
||||||
public string Level { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 上外贸运动画像项
|
|
||||||
/// </summary>
|
|
||||||
public class ShangWaiMaoTempTccjPortraitItem
|
|
||||||
{
|
|
||||||
public string ItemName { get; set; }
|
|
||||||
|
|
||||||
public decimal? PersonalScore { get; set; }
|
|
||||||
|
|
||||||
public decimal? SchoolAverageScore { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -113,21 +113,21 @@ namespace VOL.Model
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 平均心率
|
/// 平均心率
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int AvgHR { get; set; } = 0;
|
public double AvgHR { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 运动强度
|
/// 运动强度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Strength { get; set; } = 0;
|
public double Strength { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 运动密度
|
/// 运动密度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Density { get; set; } = 0;
|
public double Density { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 平均消耗
|
/// 平均消耗
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Consumption { get; set; } = 0;
|
public double Consumption { get; set; } = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,6 @@ using System.Threading.Tasks;
|
|||||||
using VOL.Business.IServices.ShangWaiMao;
|
using VOL.Business.IServices.ShangWaiMao;
|
||||||
using VOL.Core.Filters;
|
using VOL.Core.Filters;
|
||||||
using VOL.Model;
|
using VOL.Model;
|
||||||
using VOL.Model.ShangWaiMao.Request;
|
|
||||||
using VOL.Model.ShangWaiMao.Response;
|
|
||||||
|
|
||||||
namespace VOL.WebApi.Controllers.Business
|
namespace VOL.WebApi.Controllers.Business
|
||||||
{
|
{
|
||||||
@ -25,38 +23,6 @@ namespace VOL.WebApi.Controllers.Business
|
|||||||
_shangWaiMaoService = shangWaiMaoService;
|
_shangWaiMaoService = shangWaiMaoService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩列表页搜索条件
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet(nameof(GetTempTccjFilterOptions))]
|
|
||||||
public async Task<ShangWaiMaoTempTccjFilterOptions> GetTempTccjFilterOptions()
|
|
||||||
{
|
|
||||||
return await _shangWaiMaoService.GetTempTccjFilterOptionsAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩分页列表
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="paramDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet(nameof(GetTempTccjPageList))]
|
|
||||||
public async Task<PageDataDto<ShangWaiMaoTempTccjListItem>> GetTempTccjPageList([FromQuery] ShangWaiMaoTempTccjPageParam paramDto)
|
|
||||||
{
|
|
||||||
return await _shangWaiMaoService.GetTempTccjPageListAsync(paramDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取体测成绩详情
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="paramDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpGet(nameof(GetTempTccjDetail))]
|
|
||||||
public async Task<ShangWaiMaoTempTccjDetailDto> GetTempTccjDetail([FromQuery] ShangWaiMaoTempTccjDetailParam paramDto)
|
|
||||||
{
|
|
||||||
return await _shangWaiMaoService.GetTempTccjDetailAsync(paramDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 导出学生课程心率与运动数据
|
/// 导出学生课程心率与运动数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
//"DbConnectionString": "Data Source=DESKTOP-JJQM2OL\\SQLEXPRESS;Initial Catalog=netcoredev;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
|
//"DbConnectionString": "Data Source=DESKTOP-JJQM2OL\\SQLEXPRESS;Initial Catalog=netcoredev;Persist Security Info=True;User ID=sa;Password=123456;Connect Timeout=500;",
|
||||||
|
|
||||||
//mysql连接字符串(升级EFCore3.1到时已将mysql连接字符串修改,2019-12-20)
|
//mysql连接字符串(升级EFCore3.1到时已将mysql连接字符串修改,2019-12-20)
|
||||||
"DbConnectionString": "Data Source=rm-uf64b8oxdt19pfyxfao.sqlserver.rds.aliyuncs.com;Database=SmartSportsServerDB_QA;User ID=yd;Password=Admin@123456;Connect Timeout=500;",
|
//"DbConnectionString": "Data Source=rm-uf64b8oxdt19pfyxfao.sqlserver.rds.aliyuncs.com;Database=SmartSportsServerDB_QA;User ID=yd;Password=Admin@123456;Connect Timeout=500;",
|
||||||
// "DbConnectionString": " Data Source=rm-uf64b8oxdt19pfyxfao.sqlserver.rds.aliyuncs.com;Database=SmartSportsServerDB;User ID=yd;Password=Admin@123456;Connect Timeout=500;",
|
"DbConnectionString": " Data Source=rm-uf64b8oxdt19pfyxfao.sqlserver.rds.aliyuncs.com;Database=SmartSportsServerDB;User ID=yd;Password=Admin@123456;Connect Timeout=500;",
|
||||||
|
|
||||||
//"DbConnectionString": "Server=192.168.10.230;Port=3306;Database=dachentradedb;Uid=root;Pwd=123456;AllowLoadLocalInfile=true;Command Timeout=120;",
|
//"DbConnectionString": "Server=192.168.10.230;Port=3306;Database=dachentradedb;Uid=root;Pwd=123456;AllowLoadLocalInfile=true;Command Timeout=120;",
|
||||||
//"DbConnectionString": "Server=47.101.60.251;Port=3306;Database=smartsports;Uid=root;Pwd=Admin@123;AllowLoadLocalInfile=true;Command Timeout=120;",
|
//"DbConnectionString": "Server=47.101.60.251;Port=3306;Database=smartsports;Uid=root;Pwd=Admin@123;AllowLoadLocalInfile=true;Command Timeout=120;",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user