daochu
This commit is contained in:
parent
1e089bcab3
commit
8bad5cb752
@ -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 VOL.Model;
|
||||
using VOL.Model.ShangWaiMao.Request;
|
||||
using VOL.Model.ShangWaiMao.Response;
|
||||
|
||||
namespace VOL.Business.IServices.ShangWaiMao
|
||||
{
|
||||
@ -10,26 +8,6 @@ namespace VOL.Business.IServices.ShangWaiMao
|
||||
/// </summary>
|
||||
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>
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,14 +8,11 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Business.IServices.ShangWaiMao;
|
||||
using VOL.Business.IRepositories.ShangWaiMao;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Entity.Enum;
|
||||
using VOL.Model;
|
||||
using VOL.Model.ShangWaiMao.Request;
|
||||
using VOL.Model.ShangWaiMao.Response;
|
||||
using VOL.System.IRepositories;
|
||||
|
||||
namespace VOL.Business.Services.ShangWaiMao
|
||||
@ -28,28 +25,11 @@ namespace VOL.Business.Services.ShangWaiMao
|
||||
private const int TrendStartColumn = 8;
|
||||
|
||||
private readonly IS_StudentRepository _studentRepository;
|
||||
private readonly ITempTccjRepository _tempTccjRepository;
|
||||
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public ShangWaiMaoService(IS_StudentRepository studentRepository, ITempTccjRepository tempTccjRepository)
|
||||
public ShangWaiMaoService(IS_StudentRepository studentRepository)
|
||||
{
|
||||
_studentRepository = studentRepository;
|
||||
_tempTccjRepository = tempTccjRepository;
|
||||
}
|
||||
|
||||
public Task<ShangWaiMaoTempTccjFilterOptions> GetTempTccjFilterOptionsAsync()
|
||||
{
|
||||
return _tempTccjRepository.GetFilterOptionsAsync();
|
||||
}
|
||||
|
||||
public Task<PageDataDto<ShangWaiMaoTempTccjListItem>> GetTempTccjPageListAsync(ShangWaiMaoTempTccjPageParam paramDto)
|
||||
{
|
||||
return _tempTccjRepository.GetPageListAsync(paramDto);
|
||||
}
|
||||
|
||||
public Task<ShangWaiMaoTempTccjDetailDto> GetTempTccjDetailAsync(ShangWaiMaoTempTccjDetailParam paramDto)
|
||||
{
|
||||
return _tempTccjRepository.GetDetailAsync(paramDto);
|
||||
}
|
||||
|
||||
public async Task<byte[]> ExportHeartRateDataAsync(ShangWaiMaoHeartRateExportParam paramDto)
|
||||
@ -163,12 +143,12 @@ namespace VOL.Business.Services.ShangWaiMao
|
||||
var minuteData = BuildMinuteData(group, baseTime);
|
||||
|
||||
var duration = minuteData.Count == 0 ? 0 : minuteData.Keys.Max();
|
||||
var avgHeartRate = Math.Round(group.Average(x => x.Value), 2);
|
||||
var avgStrength = Math.Round(group.Average(x => x.Strength), 2);
|
||||
var avgHeartRate = (int)group.Average(x => x.Value);
|
||||
var avgStrength = (int)group.Average(x => x.Strength);
|
||||
var density = group.Any()
|
||||
? Math.Round(group.Count(x => x.Strength > 50) * 100D / group.Count(), 2)
|
||||
? Math.Round(group.Count(x => x.Strength > 50) * 100D / group.Count(), 0)
|
||||
: 0D;
|
||||
var totalConsumption = Math.Round(group.Sum(x => (double)(x.Consumption ?? 0)), 2);
|
||||
var totalConsumption = Math.Abs((int)group.Average(x => x.Consumption ?? 0));
|
||||
|
||||
summarySheet.Cells[summaryRowIndex, 1].Value = group.Key.StudentName;
|
||||
summarySheet.Cells[summaryRowIndex, 2].Value = group.Key.StudentNo;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AutoMapper;
|
||||
using AutoMapper;
|
||||
using Castle.Core.Internal;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@ -78,11 +78,6 @@ namespace VOL.Core.Configuration
|
||||
/// </summary>
|
||||
public static JingShiTiJiao JingShiTiJiao { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上外贸 MySQL
|
||||
/// </summary>
|
||||
public static SwmMySqlOptions SwmMySql { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// JWT有效期(分钟=默认120)
|
||||
/// </summary>
|
||||
@ -108,7 +103,6 @@ namespace VOL.Core.Configuration
|
||||
services.Configure<YueDongServerOSS>(configuration.GetSection("YueDongServerOSS"));
|
||||
|
||||
services.Configure<JingShiTiJiao>(configuration.GetSection("JingShiTiJiao"));
|
||||
services.Configure<SwmMySqlOptions>(configuration.GetSection("SwmMySql"));
|
||||
|
||||
var provider = services.BuildServiceProvider();
|
||||
IWebHostEnvironment environment = provider.GetRequiredService<IWebHostEnvironment>();
|
||||
@ -130,7 +124,6 @@ namespace VOL.Core.Configuration
|
||||
YueDongServerOSS = provider.GetRequiredService<IOptions<YueDongServerOSS>>().Value ?? new YueDongServerOSS();
|
||||
|
||||
JingShiTiJiao = provider.GetRequiredService<IOptions<JingShiTiJiao>>().Value ?? new JingShiTiJiao();
|
||||
SwmMySql = provider.GetRequiredService<IOptions<SwmMySqlOptions>>().Value ?? new SwmMySqlOptions();
|
||||
|
||||
_connection = provider.GetRequiredService<IOptions<Connection>>().Value;
|
||||
|
||||
@ -272,9 +265,4 @@ namespace VOL.Core.Configuration
|
||||
public string SchoolCode { get; set; }
|
||||
public string SportsItem { get; set; }
|
||||
}
|
||||
|
||||
public class SwmMySqlOptions
|
||||
{
|
||||
public string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,4 @@
|
||||
using VOL.Core.Configuration;
|
||||
using VOL.Core.Dapper;
|
||||
using VOL.Core.Enums;
|
||||
|
||||
namespace VOL.Core.DBManager
|
||||
namespace VOL.Core.DBManager.Partial
|
||||
{
|
||||
/// <summary>
|
||||
/// 2022.11.21增加其他数据库(sqlserver、mysql、pgsql、oracle)连接配置说明
|
||||
@ -10,16 +6,21 @@ namespace VOL.Core.DBManager
|
||||
/// </summary>
|
||||
public partial class DBServerProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// 上外贸独立 MySQL 数据库对象
|
||||
/// </summary>
|
||||
public static ISqlDapper SqlDapperSwmMySql
|
||||
{
|
||||
get
|
||||
{
|
||||
return new SqlDapper(AppSetting.SwmMySql.ConnectionString, DbCurrentType.MySql);
|
||||
}
|
||||
}
|
||||
///// <summary>
|
||||
///// 单独配置mysql数据库
|
||||
///// </summary>
|
||||
//public static ISqlDapper SqlDapperMySql
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// //读取appsettings.json中的配置
|
||||
// string 数据库连接字符串 = AppSetting.GetSettingString("key");
|
||||
// return new SqlDapper(数据库连接字符串, DbCurrentType.MySql);
|
||||
|
||||
// //访问数据库方式
|
||||
// //DBServerProvider.SqlDapperMySql.xx
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 如果有多个不同的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<SwmMySqlContext>(optionsBuilder =>
|
||||
{
|
||||
optionsBuilder.UseMySql(
|
||||
AppSetting.SwmMySql.ConnectionString,
|
||||
new MySqlServerVersion(new Version(8, 0, 20)));
|
||||
}, 16);
|
||||
//启用缓存
|
||||
if (AppSetting.UseRedis)
|
||||
{
|
||||
|
||||
@ -1,90 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace VOL.Entity.DomainModels
|
||||
{
|
||||
/// <summary>
|
||||
/// 上外贸体测成绩临时表
|
||||
/// </summary>
|
||||
[Table("temp_tccj")]
|
||||
public class TempTccj
|
||||
{
|
||||
public string school_year { get; set; }
|
||||
public string school_term { get; set; }
|
||||
public string student_no { get; set; }
|
||||
public string name { get; set; }
|
||||
public string sex { get; set; }
|
||||
public string class_no { get; set; }
|
||||
public string grade_no { get; set; }
|
||||
public string class_name { get; set; }
|
||||
public string college_name { get; set; }
|
||||
public short? test_state { get; set; }
|
||||
public short? exempt { get; set; }
|
||||
public decimal? add_score { get; set; }
|
||||
public decimal? health_score { get; set; }
|
||||
public decimal? score { get; set; }
|
||||
public string conclusion { get; set; }
|
||||
public decimal? height { get; set; }
|
||||
public decimal? weight { get; set; }
|
||||
public decimal? bmi { get; set; }
|
||||
public decimal? bmi_df { get; set; }
|
||||
public decimal? bmi_score { get; set; }
|
||||
public string bmi_leve { get; set; }
|
||||
public decimal? lungs { get; set; }
|
||||
public decimal? lungs_df { get; set; }
|
||||
public decimal? lungs_score { get; set; }
|
||||
public string lungs_leve { get; set; }
|
||||
public decimal? meter50 { get; set; }
|
||||
public decimal? meter50_df { get; set; }
|
||||
public decimal? meter50_score { get; set; }
|
||||
public string meter50_leve { get; set; }
|
||||
public decimal? standing_long_jump { get; set; }
|
||||
public decimal? standing_long_jump_df { get; set; }
|
||||
public decimal? standing_long_jump_score { get; set; }
|
||||
public string standing_long_jump_leve { get; set; }
|
||||
public decimal? sit_and_reach { get; set; }
|
||||
public decimal? sit_and_reach_df { get; set; }
|
||||
public decimal? sit_and_reach_score { get; set; }
|
||||
public string sit_and_reach_leve { get; set; }
|
||||
public decimal? meter800 { get; set; }
|
||||
public decimal? meter800_df { get; set; }
|
||||
public decimal? meter800_score { get; set; }
|
||||
public string meter800_leve { get; set; }
|
||||
public decimal? meter1000 { get; set; }
|
||||
public decimal? meter1000_df { get; set; }
|
||||
public decimal? meter1000_score { get; set; }
|
||||
public string meter1000_leve { get; set; }
|
||||
public decimal? sit_up { get; set; }
|
||||
public decimal? sit_up_df { get; set; }
|
||||
public decimal? sit_up_score { get; set; }
|
||||
public string sit_up_leve { get; set; }
|
||||
public decimal? pull_up { get; set; }
|
||||
public decimal? pull_up_df { get; set; }
|
||||
public decimal? pull_up_score { get; set; }
|
||||
public string pull_up_leve { get; set; }
|
||||
public decimal? skip { get; set; }
|
||||
public decimal? skip_df { get; set; }
|
||||
public decimal? skip_score { get; set; }
|
||||
public string skip_leve { get; set; }
|
||||
public decimal? shuttle_run { get; set; }
|
||||
public decimal? shuttle_run_df { get; set; }
|
||||
public decimal? shuttle_run_score { get; set; }
|
||||
public string shuttle_run_leve { get; set; }
|
||||
public decimal? leftVision { get; set; }
|
||||
public decimal? rightVision { get; set; }
|
||||
public decimal? leftMirror { get; set; }
|
||||
public decimal? rightMirror { get; set; }
|
||||
public decimal? leftAmetropia { get; set; }
|
||||
public decimal? rightAmetropia { get; set; }
|
||||
public string left_sphere { get; set; }
|
||||
public string right_sphere { get; set; }
|
||||
public string left_cytdnder { get; set; }
|
||||
public string right_cytdnder { get; set; }
|
||||
public short? left_axial { get; set; }
|
||||
public short? right_axial { get; set; }
|
||||
public string is_ok_mirror { get; set; }
|
||||
public decimal? bonus1 { get; set; }
|
||||
public decimal? bonus1_df { get; set; }
|
||||
public decimal? bonus2 { get; set; }
|
||||
public decimal? bonus2_df { 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>
|
||||
public int AvgHR { get; set; } = 0;
|
||||
public double AvgHR { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 运动强度
|
||||
/// </summary>
|
||||
public int Strength { get; set; } = 0;
|
||||
public double Strength { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 运动密度
|
||||
/// </summary>
|
||||
public int Density { get; set; } = 0;
|
||||
public double Density { get; set; } = 0;
|
||||
|
||||
/// <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.Core.Filters;
|
||||
using VOL.Model;
|
||||
using VOL.Model.ShangWaiMao.Request;
|
||||
using VOL.Model.ShangWaiMao.Response;
|
||||
|
||||
namespace VOL.WebApi.Controllers.Business
|
||||
{
|
||||
@ -25,38 +23,6 @@ namespace VOL.WebApi.Controllers.Business
|
||||
_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>
|
||||
|
||||
@ -125,9 +125,6 @@
|
||||
"SchoolCode": "202512240056",
|
||||
"SportsItem": "JS010000"
|
||||
},
|
||||
"SwmMySql": {
|
||||
"ConnectionString": "Server=localhost;Port=3306;Database=swm_db;Uid=root;Pwd=yd708090;CharSet=utf8;AllowPublicKeyRetrieval=true;SslMode=None;"
|
||||
},
|
||||
|
||||
"QuartzAccessKey": "65EC9387355E4717899C552963CE59FF", //定时任务的值,请自行修改
|
||||
"OriginalPwd": "000000" //初始密码
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user