恢复被合并覆盖的上外贸代码
This commit is contained in:
parent
c6e7a018b0
commit
b6e47c92b6
@ -8,11 +8,14 @@ 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
|
||||
@ -25,11 +28,28 @@ 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)
|
||||
public ShangWaiMaoService(IS_StudentRepository studentRepository, ITempTccjRepository tempTccjRepository)
|
||||
{
|
||||
_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)
|
||||
@ -142,12 +162,12 @@ namespace VOL.Business.Services.ShangWaiMao
|
||||
var minuteData = BuildMinuteData(group, baseTime);
|
||||
|
||||
var duration = minuteData.Count == 0 ? 0 : minuteData.Keys.Max();
|
||||
var avgHeartRate = (int)group.Average(x => x.Value);
|
||||
var avgStrength = (int)group.Average(x => x.Strength);
|
||||
var avgHeartRate = Math.Round(group.Average(x => x.Value), 2);
|
||||
var avgStrength = Math.Round(group.Average(x => x.Strength), 2);
|
||||
var density = group.Any()
|
||||
? Math.Round(group.Count(x => x.Strength > 50) * 100D / group.Count(), 0)
|
||||
? Math.Round(group.Count(x => x.Strength > 50) * 100D / group.Count(), 2)
|
||||
: 0D;
|
||||
var totalConsumption = Math.Abs((int)group.Average(x => x.Consumption ?? 0));
|
||||
var totalConsumption = Math.Round(group.Sum(x => (double)(x.Consumption ?? 0)), 2);
|
||||
|
||||
summarySheet.Cells[summaryRowIndex, 1].Value = group.Key.StudentName;
|
||||
summarySheet.Cells[summaryRowIndex, 2].Value = group.Key.StudentNo;
|
||||
|
||||
@ -125,6 +125,9 @@
|
||||
"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