首次提交
This commit is contained in:
commit
82120194e3
30
.dockerignore
Normal file
30
.dockerignore
Normal file
@ -0,0 +1,30 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
!**/.gitignore
|
||||
!.git/HEAD
|
||||
!.git/config
|
||||
!.git/packed-refs
|
||||
!.git/refs/heads/**
|
||||
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
.vs
|
||||
.vscode
|
||||
bin
|
||||
obj
|
||||
*.jfm
|
||||
*.dbmdl
|
||||
*.user
|
||||
node_modules
|
||||
|
||||
/Server/SmartSportsServer/VOL.Business/IServices/SendMessage/IMessageService.cs
|
||||
/Server/SmartSportsServer/VOL.Business/Services/People/S_GradeService.cs
|
||||
/Server/SmartSportsServer/VOL.Business/Repositories/School/S_ClassAssocTeacherRepository.cs
|
||||
/Server/SmartSportsServer/VOL.WebApi/wwwroot/BaseCore/MappingManager.cs
|
||||
/Server/SmartSportsServer/VOL.WebApi/wwwroot/BaseCore
|
||||
/Server/SmartSportsServer/VOL.WebApi/Controllers/AI/AiController.cs
|
||||
Server/SmartSportsServer/VOL.WebApi/Download
|
||||
Server/SmartSportsServer/VOL.WebApi/quartz
|
||||
85
SmartSportsServer.sln
Normal file
85
SmartSportsServer.sln
Normal file
@ -0,0 +1,85 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.1.32421.90
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Core", "VOL.Core\VOL.Core.csproj", "{9F72743E-647E-4D37-85D1-07EC9CD0AB71}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Entity", "VOL.Entity\VOL.Entity.csproj", "{E17DB44D-59EF-47D5-9B21-E2F6C471B5E9}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Builder", "VOL.Builder\VOL.Builder.csproj", "{C71993AA-586E-4AF4-AD77-B5D7A07B3B7B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.System", "VOL.System\VOL.System.csproj", "{9F688BF2-B51B-4812-B0C4-8F5D13114E9E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.AppManager", "VOL.AppManager\VOL.AppManager.csproj", "{2D192886-0DEC-420F-A353-D2045274C730}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Order", "VOL.Order\VOL.Order.csproj", "{FE8ECF2E-53BE-48DC-B846-38C7D7A6FF95}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.WebApi", "VOL.WebApi\VOL.WebApi.csproj", "{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Business", "VOL.Business\VOL.Business.csproj", "{F1D2C7D9-E290-4FD9-9799-BC507DE7383A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Model", "VOL.Model\VOL.Model.csproj", "{7A137919-B462-4DF4-9758-7E0FB5538780}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.IOT", "VOL.IOT\VOL.IOT.csproj", "{AB6BC273-1B9B-4E20-9C76-C8D94551B4CB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VOL.Ai", "VOL.Ai\VOL.Ai.csproj", "{472D08B0-7698-400C-A0EF-3A89AB031ED1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{9F72743E-647E-4D37-85D1-07EC9CD0AB71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9F72743E-647E-4D37-85D1-07EC9CD0AB71}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F72743E-647E-4D37-85D1-07EC9CD0AB71}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F72743E-647E-4D37-85D1-07EC9CD0AB71}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E17DB44D-59EF-47D5-9B21-E2F6C471B5E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E17DB44D-59EF-47D5-9B21-E2F6C471B5E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E17DB44D-59EF-47D5-9B21-E2F6C471B5E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E17DB44D-59EF-47D5-9B21-E2F6C471B5E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C71993AA-586E-4AF4-AD77-B5D7A07B3B7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C71993AA-586E-4AF4-AD77-B5D7A07B3B7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C71993AA-586E-4AF4-AD77-B5D7A07B3B7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C71993AA-586E-4AF4-AD77-B5D7A07B3B7B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9F688BF2-B51B-4812-B0C4-8F5D13114E9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9F688BF2-B51B-4812-B0C4-8F5D13114E9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F688BF2-B51B-4812-B0C4-8F5D13114E9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F688BF2-B51B-4812-B0C4-8F5D13114E9E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2D192886-0DEC-420F-A353-D2045274C730}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2D192886-0DEC-420F-A353-D2045274C730}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2D192886-0DEC-420F-A353-D2045274C730}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2D192886-0DEC-420F-A353-D2045274C730}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FE8ECF2E-53BE-48DC-B846-38C7D7A6FF95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FE8ECF2E-53BE-48DC-B846-38C7D7A6FF95}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FE8ECF2E-53BE-48DC-B846-38C7D7A6FF95}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FE8ECF2E-53BE-48DC-B846-38C7D7A6FF95}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4DB3C91B-93FE-4937-8B58-DDD3F57D4607}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F1D2C7D9-E290-4FD9-9799-BC507DE7383A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F1D2C7D9-E290-4FD9-9799-BC507DE7383A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F1D2C7D9-E290-4FD9-9799-BC507DE7383A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F1D2C7D9-E290-4FD9-9799-BC507DE7383A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7A137919-B462-4DF4-9758-7E0FB5538780}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7A137919-B462-4DF4-9758-7E0FB5538780}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7A137919-B462-4DF4-9758-7E0FB5538780}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7A137919-B462-4DF4-9758-7E0FB5538780}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AB6BC273-1B9B-4E20-9C76-C8D94551B4CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AB6BC273-1B9B-4E20-9C76-C8D94551B4CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AB6BC273-1B9B-4E20-9C76-C8D94551B4CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AB6BC273-1B9B-4E20-9C76-C8D94551B4CB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{472D08B0-7698-400C-A0EF-3A89AB031ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{472D08B0-7698-400C-A0EF-3A89AB031ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{472D08B0-7698-400C-A0EF-3A89AB031ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{472D08B0-7698-400C-A0EF-3A89AB031ED1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0B6F8CD0-546F-442D-ABCE-92EF6E3C1386}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
18
VOL.Ai/IRepositories/IActivitiestDataRepository.cs
Normal file
18
VOL.Ai/IRepositories/IActivitiestDataRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// Ai赛场数据成绩上传
|
||||
/// </summary>
|
||||
public interface IActivitiestDataRepository : IDependency, IRepository<Ai_ActivitiestData>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/IClassRoomRecordRepository.cs
Normal file
18
VOL.Ai/IRepositories/IClassRoomRecordRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 课堂记录
|
||||
/// </summary>
|
||||
public interface IClassRoomRecordRepository : IDependency, IRepository<Ai_ClassRoomRecord>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/IDeviceAssocSchoolRepository.cs
Normal file
18
VOL.Ai/IRepositories/IDeviceAssocSchoolRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 学校设备关联
|
||||
/// </summary>
|
||||
public interface IDeviceAssocSchoolRepository : IDependency, IRepository<Ai_DeviceAssocSchool>
|
||||
{
|
||||
}
|
||||
}
|
||||
22
VOL.Ai/IRepositories/IFastJumpRopeDataRepository.cs
Normal file
22
VOL.Ai/IRepositories/IFastJumpRopeDataRepository.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Entity.Enum;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 速度跳绳数据成绩
|
||||
/// </summary>
|
||||
public interface IFastJumpRopeDataRepository : IDependency, IRepository<Ai_FastJumpRopeData>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/IHeartRateDataRepository.cs
Normal file
18
VOL.Ai/IRepositories/IHeartRateDataRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 心率数据
|
||||
/// </summary>
|
||||
public interface IHeartRateDataRepository : IDependency, IRepository<Ai_HeartRateData>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/ILevelExamDataRepository.cs
Normal file
18
VOL.Ai/IRepositories/ILevelExamDataRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 测评考级数据成绩上传
|
||||
/// </summary>
|
||||
public interface ILevelExamDataRepository : IDependency, IRepository<Ai_LevelExamData>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/ISportsTestDataRepository.cs
Normal file
18
VOL.Ai/IRepositories/ISportsTestDataRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 体测数据成绩上传
|
||||
/// </summary>
|
||||
public interface ISportsTestDataRepository : IDependency, IRepository<Ai_SportsTestData>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.Ai/IRepositories/ITrainingDataRepository.cs
Normal file
18
VOL.Ai/IRepositories/ITrainingDataRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.IRepositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 训练数据成绩上传
|
||||
/// </summary>
|
||||
public interface ITrainingDataRepository : IDependency, IRepository<Ai_TrainingData>
|
||||
{
|
||||
}
|
||||
}
|
||||
196
VOL.Ai/IServices/IAiAppService.cs
Normal file
196
VOL.Ai/IServices/IAiAppService.cs
Normal file
@ -0,0 +1,196 @@
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Ai;
|
||||
using VOL.Model.Ai.Request;
|
||||
using VOL.Model.Ai.Response;
|
||||
using VOL.Model.IOT.Response;
|
||||
|
||||
namespace VOL.Ai.IServices
|
||||
{
|
||||
public interface IAiAppService
|
||||
{
|
||||
#region New
|
||||
/// <summary>
|
||||
/// 获取学校信息
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<Ai_SchoolDto> Ai_SchoolDetail(Ai_SchoolRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 学生人脸识别
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<Ai_StudentFaceInfo> StudentFace([FromBody] GetFaceParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 老师人脸识别
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
Task<Ai_TeacherFaceInfo> TeacherFace([FromBody] GetFaceParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备信息
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<Ai_DeviceDto> Ai_DeviceInfo(AiRequestDto paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 学生列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<Ai_StudentListDto>> Ai_StudentList(Ai_StudentListRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 学生详情
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<AiStudentDetailsDto> Ai_StudentDetail(Ai_StudentDetailRequest paramDto);
|
||||
|
||||
///// <summary>
|
||||
///// 获取测试项目
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//Task<List<Ai_ItemTypeModel>> GetAiCategoryType();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阿里云OSS获取上传文件的配置信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Ai_OSSInfoDto OSSInfo(Ai_Request paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 上传关联文件
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
Task<ResultFilesDto> ResultFiles(ResultFilesRequest paramDto, IFormFile file);
|
||||
|
||||
/// <summary>
|
||||
/// 获取训练项目类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Ai_ModeTypeModel>> ItemTypeList();
|
||||
|
||||
/// <summary>
|
||||
/// 获取体测项目类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<Ai_ModeTypeModel>> CategoryList();
|
||||
|
||||
/// <summary>
|
||||
/// 获取专项教学项目
|
||||
/// </summary>
|
||||
Task<List<Ai_ItemTypeModel>> TeachingItems(Ai_Request paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取专项教学项目详情
|
||||
/// </summary>
|
||||
Task<Ai_TeachingItemsDetailModel> TeachingItemsDetail(Ai_TeachingItemsRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取赛事活动列表
|
||||
/// </summary>
|
||||
Task<PageDataDto<Ai_ActivitiesListDto>> ActivitiesList(Ai_ActivitiesListRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取赛事活动排行
|
||||
/// </summary>
|
||||
Task<ActivitiesRankingPageDataDto<Ai_ActivitiesRankingDto>> ActivitiesRanking(Ai_ActivitiesRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取体育测试排行
|
||||
/// </summary>
|
||||
Task<PageDataDto<Ai_RankingListDto>> SportsTestRanking(Ai_RankingListRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 体测成绩查询
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<Ai_SportsTestDto>> SportsTestResult(Ai_SportsTestRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 训练成绩上传
|
||||
/// </summary>
|
||||
Task TrainingDataUpload(Ai_ResultUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 体测成绩上传
|
||||
/// </summary>
|
||||
Task SportsTestResultUpload(SportsTestResultUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// Ai赛场成绩上传
|
||||
/// </summary>
|
||||
Task ActivitiestResultUpload(Ai_ActivitiestResultUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 测评考级成绩上传
|
||||
/// </summary>
|
||||
Task LevelExamResultUpload(LevelExamDataUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 速度跳绳成绩上传
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task FastJumpRopeResultUpload(AddFastJumpRopeResultUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 速度跳绳测试列表
|
||||
/// </summary>
|
||||
Task<PageDataDto<Ai_FastJumpRopeDto>> FastJumpRopeTestList(Ai_FastJumpRopeRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 速度跳绳排名
|
||||
/// </summary>
|
||||
/// <param name="uniqueId"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<Ai_FastJumpRopeStudentList>> FastJumpRopeRanking(Ai_FastJumpRopeRankingRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 心率成绩上传
|
||||
/// </summary>
|
||||
Task HeartRateResultUpload(AddHeartRateResultUploadRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 新增课堂记录
|
||||
/// </summary>
|
||||
Task<Ai_ClassRoomRecordDto> AddClassRoomRecord(Ai_ClassRoomRecordRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 结束授课
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task EndTeaching(EndTeachingRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取学生当前等级
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<StatusLevelExamDto> StatusLevelExam(StatusLevelExamRequest paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 验证学生是否在报名列表中
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<IsActivityInListDto> IsActivityInList(IsActivityInListRequest paramDto);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
24
VOL.Ai/IServices/IAiService.cs
Normal file
24
VOL.Ai/IServices/IAiService.cs
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Ai;
|
||||
using VOL.Model.Ai.Request;
|
||||
using VOL.Model.IOT.Response;
|
||||
|
||||
namespace VOL.Ai.IServices
|
||||
{
|
||||
public interface IAiService
|
||||
{
|
||||
#region Old
|
||||
Task<Ai_DeviceDto> AiDetail(Ai_DeviceRequest paramDto);
|
||||
Task<Ai_SchoolDto> AiSchoolDetail(Ai_SchoolRequest paramDto);
|
||||
Task<List<Ai_StudentListDto>> StudentList(Ai_StudentListRequest paramDto);
|
||||
Task<Ai_StudentDetailsDto> StudentDetail(Ai_StudentDetailRequest paramDto);
|
||||
Task ResultUpload(Ai_ResultUploadRequest paramDto);
|
||||
Task<List<Ai_ItemTypeModel>> GetAiCategoryType();
|
||||
Task<List<Grades>> AiGradesList(string deviceSn);
|
||||
Task<List<Ai_RankingListDto>> AiScoreRanking(Ai_RankingListRequest paramDto);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/ActivitiestDataRepository.cs
Normal file
31
VOL.Ai/Repositories/ActivitiestDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// Ai赛场数据成绩上传
|
||||
/// </summary>
|
||||
public partial class ActivitiestDataRepository : RepositoryBase<Ai_ActivitiestData>, IActivitiestDataRepository
|
||||
{
|
||||
public ActivitiestDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static IActivitiestDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IActivitiestDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/ClassRoomRecordRepository.cs
Normal file
31
VOL.Ai/Repositories/ClassRoomRecordRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 课堂记录
|
||||
/// </summary>
|
||||
public partial class ClassRoomRecordRepository : RepositoryBase<Ai_ClassRoomRecord>, IClassRoomRecordRepository
|
||||
{
|
||||
public ClassRoomRecordRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static IClassRoomRecordRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IClassRoomRecordRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/DeviceAssocSchoolRepository.cs
Normal file
31
VOL.Ai/Repositories/DeviceAssocSchoolRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 学校设备关联
|
||||
/// </summary>
|
||||
public partial class DeviceAssocSchoolRepository : RepositoryBase<Ai_DeviceAssocSchool>, IDeviceAssocSchoolRepository
|
||||
{
|
||||
public DeviceAssocSchoolRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static IDeviceAssocSchoolRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IDeviceAssocSchoolRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/FastJumpRopeDataRepository.cs
Normal file
31
VOL.Ai/Repositories/FastJumpRopeDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 速度跳绳数据成绩
|
||||
/// </summary>
|
||||
public partial class FastJumpRopeDataRepository : RepositoryBase<Ai_FastJumpRopeData>, IFastJumpRopeDataRepository
|
||||
{
|
||||
public FastJumpRopeDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static IFastJumpRopeDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IFastJumpRopeDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/HeartRateDataRepository.cs
Normal file
31
VOL.Ai/Repositories/HeartRateDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 心率数据
|
||||
/// </summary>
|
||||
public partial class HeartRateDataRepository : RepositoryBase<Ai_HeartRateData>, IHeartRateDataRepository
|
||||
{
|
||||
public HeartRateDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static IHeartRateDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IHeartRateDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/LevelExamDataRepository.cs
Normal file
31
VOL.Ai/Repositories/LevelExamDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 测评考级数据成绩上传
|
||||
/// </summary>
|
||||
public partial class LevelExamDataRepository : RepositoryBase<Ai_LevelExamData>, ILevelExamDataRepository
|
||||
{
|
||||
public LevelExamDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static ILevelExamDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<ILevelExamDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/SportsTestDataRepository.cs
Normal file
31
VOL.Ai/Repositories/SportsTestDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 体测数据成绩上传
|
||||
/// </summary>
|
||||
public partial class SportsTestDataRepository : RepositoryBase<Ai_SportsTestData>, ISportsTestDataRepository
|
||||
{
|
||||
public SportsTestDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static ISportsTestDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<ISportsTestDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Ai/Repositories/TrainingDataRepository.cs
Normal file
31
VOL.Ai/Repositories/TrainingDataRepository.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Ai.IRepositories;
|
||||
using VOL.Business.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Ai.Repositories
|
||||
{
|
||||
/// <summary>
|
||||
/// 训练数据成绩上传
|
||||
/// </summary>
|
||||
public partial class TrainingDataRepository : RepositoryBase<Ai_TrainingData>, ITrainingDataRepository
|
||||
{
|
||||
public TrainingDataRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static ITrainingDataRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<ITrainingDataRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
1203
VOL.Ai/Services/AiAppService.cs
Normal file
1203
VOL.Ai/Services/AiAppService.cs
Normal file
File diff suppressed because it is too large
Load Diff
375
VOL.Ai/Services/AiService.cs
Normal file
375
VOL.Ai/Services/AiService.cs
Normal file
@ -0,0 +1,375 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using VOL.Ai.IServices;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.System.IRepositories;
|
||||
using VOL.System.Repositories;
|
||||
using VOL.Model.IOT.Response;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using VOL.Model.Ai;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.Enum;
|
||||
using VOL.Model.Ai.Request;
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.Configuration;
|
||||
using VOL.Core.Extensions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using VOL.Model;
|
||||
|
||||
namespace VOL.Ai.Services
|
||||
{
|
||||
public class AiService : IAiService, IDependency
|
||||
{
|
||||
private readonly IS_StudentRepository _studentRepository;
|
||||
private readonly IN_SportsTestCategoryRepository _sportsTestCategoryRepository;
|
||||
private readonly IN_HealthStandardsRepository _healthStandardsRepository;
|
||||
private readonly IN_SportsTestResultRepository _sportsTestResultRepository;
|
||||
[ActivatorUtilitiesConstructor]
|
||||
public AiService(IS_StudentRepository studentRepository, IN_SportsTestCategoryRepository sportsTestCategoryRepository, IN_HealthStandardsRepository healthStandardsRepository, IN_SportsTestResultRepository sportsTestResultRepository)
|
||||
{
|
||||
_studentRepository = studentRepository;
|
||||
_sportsTestCategoryRepository = sportsTestCategoryRepository;
|
||||
_healthStandardsRepository = healthStandardsRepository;
|
||||
_sportsTestResultRepository = sportsTestResultRepository;
|
||||
}
|
||||
|
||||
public async Task<Ai_DeviceDto> AiDetail(Ai_DeviceRequest paramDto)
|
||||
{
|
||||
var res = await (
|
||||
from d in _studentRepository.DbContext.Set<Ai_Device>()
|
||||
join a in _studentRepository.DbContext.Set<Ai_DeviceAssocSchool>() on d.Code equals a.Code
|
||||
join s in _studentRepository.DbContext.Set<S_School>() on a.SchoolCode equals s.SchoolCode
|
||||
where d.Code == paramDto.Code
|
||||
select new Ai_DeviceDto()
|
||||
{
|
||||
Code = d.Code,
|
||||
Name = d.Name,
|
||||
SchoolName = s.SchoolName,
|
||||
Status = d.Status,
|
||||
StartTime = d.StartTime,
|
||||
EndTime = d.EndTime
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task<Ai_SchoolDto> AiSchoolDetail(Ai_SchoolRequest paramDto)
|
||||
{
|
||||
var res = await (
|
||||
from a in _studentRepository.DbContext.Set<Ai_DeviceAssocSchool>()
|
||||
join s in _studentRepository.DbContext.Set<S_School>() on a.SchoolCode equals s.SchoolCode
|
||||
where a.Code == paramDto.Code
|
||||
select new Ai_SchoolDto
|
||||
{
|
||||
//SchoolId = s.Id,
|
||||
SchoolCode = s.SchoolCode,
|
||||
Name = s.SchoolName,
|
||||
Type = s.SchoolNatureId,
|
||||
Province = s.Province,
|
||||
City = s.City
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (res == null)
|
||||
throw new ArgumentNullException(nameof(res));
|
||||
|
||||
//var gIds = await _studentRepository.DbContext.Set<S_SchoolAssocGrade>().Where(x => x.SchoolId == res.SchoolId).Select(x => x.GradeId).ToListAsync();
|
||||
|
||||
var grades = await (
|
||||
from g in _studentRepository.DbContext.Set<S_Grade>()
|
||||
join a in _studentRepository.DbContext.Set<S_SchoolAssocGrade>() on g.Id equals a.GradeId
|
||||
join c in _studentRepository.DbContext.Set<S_Class>() on g.Id equals c.GradeId into classGroup
|
||||
from c in classGroup.DefaultIfEmpty()
|
||||
//where gIds.Contains(g.Id)
|
||||
|
||||
where g.SchoolCode.Equals(res.SchoolCode)
|
||||
group c by new { g.Id, g.GradeName } into gradeGroup
|
||||
select new Grades()
|
||||
{
|
||||
Id = gradeGroup.Key.Id,
|
||||
Name = gradeGroup.Key.GradeName,
|
||||
Class = gradeGroup.Where(c => c != null).Select(c => new Classes
|
||||
{
|
||||
Id = c.Id,
|
||||
Name = c.ClassName
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
|
||||
res.Grade = grades;
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task<List<Ai_StudentListDto>> StudentList(Ai_StudentListRequest paramDto)
|
||||
{
|
||||
var res = await _studentRepository.DbContext.Set<S_Student>().Where(x => x.ClassId == paramDto.Id).Select(x => new Ai_StudentListDto()
|
||||
{
|
||||
Code = paramDto.Code,
|
||||
StudentNo = x.StudentNo,
|
||||
StudentName = x.StudentName,
|
||||
Sex = x.Sex
|
||||
}).ToListAsync();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task<Ai_StudentDetailsDto> StudentDetail(Ai_StudentDetailRequest paramDto)
|
||||
{
|
||||
var res = await (
|
||||
from s in _studentRepository.DbContext.Set<S_Student>()
|
||||
join c in _studentRepository.DbContext.Set<S_Class>() on s.ClassId equals c.Id
|
||||
join g in _studentRepository.DbContext.Set<S_Grade>() on c.GradeId equals g.Id
|
||||
where s.StudentNo == paramDto.StudentNo
|
||||
|
||||
select new Ai_StudentDetailsDto
|
||||
{
|
||||
StudentNo = s.StudentNo,
|
||||
StudentName = s.StudentName,
|
||||
Age = s.Age,
|
||||
IdCard = s.IDCard,
|
||||
Sex = (int)s.Sex,
|
||||
Classes = c.Id.ToString(),
|
||||
ClassName = c.ClassName,
|
||||
Grade = g.Id.ToString(),
|
||||
GradeName = g.GradeName
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task ResultUpload(Ai_ResultUploadRequest paramDto)
|
||||
{
|
||||
if (paramDto == null || paramDto == null)
|
||||
throw new Exception("参数错误");
|
||||
|
||||
//var exist = await _studentRepository.DbContext.Set<Ai_Result>().Where(x => x.UniqueId == paramDto.UniqueId).AnyAsync();
|
||||
//if (exist)
|
||||
// throw new Exception("成绩信息已存在");
|
||||
|
||||
|
||||
//var student = await (
|
||||
// from s in _studentRepository.DbContext.Set<S_Student>()
|
||||
// join c in _studentRepository.DbContext.Set<S_Class>() on s.ClassId equals c.Id
|
||||
// join g in _studentRepository.DbContext.Set<S_Grade>() on c.GradeId equals g.Id
|
||||
// where s.StudentNo == paramDto.StudentNo
|
||||
|
||||
// select new
|
||||
// {
|
||||
// s.SchoolCode,
|
||||
// s.StudentNo,
|
||||
// s.StudentName,
|
||||
// s.Sex,
|
||||
// ClassId = c.Id,
|
||||
// c.ClassName,
|
||||
// GradeId = g.Id,
|
||||
// g.GradeName
|
||||
// }).FirstOrDefaultAsync();
|
||||
|
||||
//if (student == null) return;
|
||||
|
||||
//var entitys = new Ai_Result()
|
||||
//{
|
||||
// GradeId = student.GradeId,
|
||||
// GradeName = student.GradeName,
|
||||
// ClassId = student.ClassId,
|
||||
// ClassName = student.ClassName,
|
||||
// SchoolCode = student.SchoolCode,
|
||||
// Gender = (int)student.Sex,
|
||||
// //TeacherId = student.TeacherId,
|
||||
// StudentName = student.StudentName,
|
||||
// Code = paramDto.Code.ToUpper(),
|
||||
// CorrectJudge = paramDto.CorrectJudge,
|
||||
// Duration = paramDto.Duration,
|
||||
// ItemCode = paramDto.ItemCode,
|
||||
// Remark = paramDto.Remark,
|
||||
// StudentNo = paramDto.StudentNo,
|
||||
// TestResult = paramDto.TestResult,
|
||||
// TestTime = paramDto.TestEndTime ?? DateTime.Now,
|
||||
// UniqueId = paramDto.UniqueId,
|
||||
// WrongResults = paramDto.WrongResults
|
||||
//};
|
||||
|
||||
//await _studentRepository.DbContext.Set<Ai_Result>().AddAsync(entitys);
|
||||
//await _studentRepository.SaveChangesAsync();
|
||||
|
||||
//// 使用异步方法进行进一步处理
|
||||
//_ = FurtherProcessingAsync(paramDto);
|
||||
}
|
||||
|
||||
public async Task<List<Ai_ItemTypeModel>> GetAiCategoryType()
|
||||
{
|
||||
return await Task.FromResult(Tool.GetEnumDescriptions<Ai_ItemTypeModel, SportsTestItemType>((code, description)
|
||||
=> new Ai_ItemTypeModel { ItemCode = code, ItemTypeName = description }));
|
||||
}
|
||||
|
||||
public async Task<List<Grades>> AiGradesList(string deviceSn)
|
||||
{
|
||||
var res = await (
|
||||
from a in _studentRepository.DbContext.Set<Ai_DeviceAssocSchool>()
|
||||
join s in _studentRepository.DbContext.Set<S_School>() on a.SchoolCode equals s.SchoolCode
|
||||
where a.Code == deviceSn
|
||||
select new
|
||||
{
|
||||
SchoolId = s.Id,
|
||||
s.SchoolCode
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (res == null)
|
||||
throw new ArgumentNullException(nameof(res));
|
||||
|
||||
//var gIds = await _studentRepository.DbContext.Set<S_SchoolAssocGrade>().Where(x => x.SchoolId == res.SchoolId).Select(x => x.GradeId).ToListAsync();
|
||||
|
||||
var grades = await (
|
||||
from g in _studentRepository.DbContext.Set<S_Grade>()
|
||||
join c in _studentRepository.DbContext.Set<S_Class>() on g.Id equals c.GradeId into classGroup
|
||||
from c in classGroup.DefaultIfEmpty()
|
||||
// where gIds.Contains(g.Id)
|
||||
where g.SchoolCode.Equals(res.SchoolCode)
|
||||
group c by new { g.Id, g.GradeName } into gradeGroup
|
||||
select new Grades()
|
||||
{
|
||||
Id = gradeGroup.Key.Id,
|
||||
Name = gradeGroup.Key.GradeName,
|
||||
Class = gradeGroup.Where(c => c != null).Select(c => new Classes
|
||||
{
|
||||
Id = c.Id,
|
||||
Name = c.ClassName
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
|
||||
return grades;
|
||||
}
|
||||
|
||||
public async Task<List<Ai_RankingListDto>> AiScoreRanking(Ai_RankingListRequest paramDto)
|
||||
{
|
||||
var res = new List<Ai_RankingListDto>();
|
||||
|
||||
//var students = await (
|
||||
// from s in _studentRepository.DbContext.Set<S_Student>()
|
||||
// join c in _studentRepository.DbContext.Set<S_Class>() on s.ClassId equals c.Id into classGroup
|
||||
// from c in classGroup.DefaultIfEmpty()
|
||||
// where s.ClassId == paramDto.ClassId
|
||||
// select new
|
||||
// {
|
||||
// s.Id,
|
||||
// s.StudentNo,
|
||||
// s.StudentName,
|
||||
// s.ClassId,
|
||||
// c.ClassName
|
||||
// }).ToListAsync();
|
||||
|
||||
//var studentNos = students.Select(s => s.StudentNo).ToList();
|
||||
|
||||
//var query = _studentRepository.DbContext.Set<Ai_Result>().Where(x => studentNos.Contains(x.StudentNo) && x.ItemCode == paramDto.ItemCode);
|
||||
|
||||
//if (paramDto.TodayTime.HasValue)
|
||||
//{
|
||||
// var todayStart = paramDto.TodayTime.Value.Date;
|
||||
// var todayEnd = todayStart.AddDays(1).AddTicks(-1);
|
||||
|
||||
// query = query.Where(x => x.TestTime >= todayStart && x.TestTime <= todayEnd);
|
||||
//}
|
||||
|
||||
//var data = await query
|
||||
// .OrderByDescending(x => x.TestResult)
|
||||
// .Select(x => new
|
||||
// {
|
||||
// x.StudentNo,
|
||||
// x.TestResult
|
||||
// }).ToListAsync();
|
||||
|
||||
//var topResults = data
|
||||
// .GroupBy(x => x.StudentNo)
|
||||
// .Select(g => g.First())
|
||||
// .OrderByDescending(x => x.TestResult)
|
||||
// .ToList();
|
||||
|
||||
//var rankedList = topResults
|
||||
// .GroupBy(x => x.TestResult)
|
||||
// .SelectMany((group, groupIndex) => group.Select(x => new
|
||||
// {
|
||||
// Rank = groupIndex + 1,
|
||||
// x.StudentNo,
|
||||
// x.TestResult
|
||||
// }))
|
||||
// .OrderBy(x => x.Rank)
|
||||
// .ThenBy(x => x.StudentNo)
|
||||
// .ToList();
|
||||
|
||||
//rankedList.ForEach(x =>
|
||||
//{
|
||||
// var student = students.FirstOrDefault(s => s.StudentNo == x.StudentNo);
|
||||
// res.Add(new Ai_RankingListDto()
|
||||
// {
|
||||
// Name = $"{student?.StudentName} {paramDto.GradeName}{student?.ClassName}",
|
||||
// Ranking = x.Rank,
|
||||
// Score = x.TestResult
|
||||
// });
|
||||
//});
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//private async Task FurtherProcessingAsync(Ai_ResultUploadRequest paramDto)
|
||||
//{
|
||||
// var categoryEnumString = Enum.GetName(typeof(SportsTestItemType), paramDto.ItemCode);
|
||||
// var healthStandards = await _healthStandardsRepository.FindAsync(x => x.CategoryEnum == categoryEnumString);
|
||||
|
||||
// var student = await (
|
||||
// from s in _studentRepository.DbContext.Set<S_Student>()
|
||||
// join c in _studentRepository.DbContext.Set<S_Class>() on s.ClassId equals c.Id
|
||||
// join g in _studentRepository.DbContext.Set<S_Grade>() on c.GradeId equals g.Id
|
||||
// where s.StudentNo == paramDto.StudentNo
|
||||
|
||||
// select new
|
||||
// {
|
||||
// s.SchoolCode,
|
||||
// s.StudentNo,
|
||||
// s.Sex,
|
||||
// ClassId = c.Id,
|
||||
// c.ClassName,
|
||||
// GradeId = g.Id,
|
||||
// g.GradeName
|
||||
// }).FirstOrDefaultAsync();
|
||||
|
||||
// if (student == null) return;
|
||||
|
||||
// var value = Convert.ToInt32(paramDto.TestResult);
|
||||
|
||||
// var sportsTestValueEntity = new N_SportsTestValue();
|
||||
|
||||
// var standard = healthStandards.Where(x =>
|
||||
// x.GradeId == student.GradeId &&
|
||||
// x.Sex == student.Sex &&
|
||||
// value >= x.MinValue &&
|
||||
// value < x.MaxValue
|
||||
// ).FirstOrDefault();
|
||||
|
||||
// if (standard != null)
|
||||
// {
|
||||
// sportsTestValueEntity.Score = standard.Score;
|
||||
// sportsTestValueEntity.Rank = standard.Rank;
|
||||
// }
|
||||
|
||||
// sportsTestValueEntity.SchoolCode = student.SchoolCode;
|
||||
// sportsTestValueEntity.DataSource = DataSource.AI;
|
||||
// sportsTestValueEntity.CategoryValue = Convert.ToInt32(paramDto.ItemCode);
|
||||
// sportsTestValueEntity.CategoryEnum = categoryEnumString;
|
||||
// sportsTestValueEntity.GradeId = student.GradeId;
|
||||
// sportsTestValueEntity.GradeName = student.GradeName;
|
||||
// sportsTestValueEntity.ClassId = student.ClassId;
|
||||
// sportsTestValueEntity.ClassName = student.ClassName;
|
||||
// sportsTestValueEntity.TeacherId = 1;
|
||||
// sportsTestValueEntity.StudentNo = paramDto.StudentNo;
|
||||
// sportsTestValueEntity.ScoreTime = paramDto.TestEndTime ?? DateTime.Now;
|
||||
|
||||
// sportsTestValueEntity.Value = paramDto.TestResult;
|
||||
// sportsTestValueEntity.WrongResults = paramDto.WrongResults;
|
||||
// sportsTestValueEntity.AdditionalScore = sportsTestValueEntity.Score == 100 ? 100 : 0;
|
||||
|
||||
// await _sportsTestResultRepository.AddAsync(sportsTestValueEntity);
|
||||
|
||||
// await _sportsTestResultRepository.SaveChangesAsync();
|
||||
//}
|
||||
}
|
||||
}
|
||||
15
VOL.Ai/VOL.Ai.csproj
Normal file
15
VOL.Ai/VOL.Ai.csproj
Normal file
@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VOL.Business\VOL.Business.csproj" />
|
||||
<ProjectReference Include="..\VOL.Core\VOL.Core.csproj" />
|
||||
<ProjectReference Include="..\VOL.System\VOL.System.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
18
VOL.AppManager/IRepositories/App/IApp_ExpertRepository.cs
Normal file
18
VOL.AppManager/IRepositories/App/IApp_ExpertRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹IApp_ExpertRepository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface IApp_ExpertRepository : IDependency,IRepository<App_Expert>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹IApp_ReportPriceRepository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface IApp_ReportPriceRepository : IDependency,IRepository<App_ReportPrice>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹IApp_TransactionAvgPriceRepository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface IApp_TransactionAvgPriceRepository : IDependency,IRepository<App_TransactionAvgPrice>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹IApp_TransactionRepository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface IApp_TransactionRepository : IDependency,IRepository<App_Transaction>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.AppManager/IRepositories/App/Itest2019Repository.cs
Normal file
18
VOL.AppManager/IRepositories/App/Itest2019Repository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹Itest2019Repository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface Itest2019Repository : IDependency,IRepository<test2019>
|
||||
{
|
||||
}
|
||||
}
|
||||
18
VOL.AppManager/IRepositories/News/IApp_NewsRepository.cs
Normal file
18
VOL.AppManager/IRepositories/News/IApp_NewsRepository.cs
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹IApp_NewsRepository编写接口
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.AppManager.IRepositories
|
||||
{
|
||||
public partial interface IApp_NewsRepository : IDependency,IRepository<App_News>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/App/IApp_ExpertService.cs
Normal file
12
VOL.AppManager/IServices/App/IApp_ExpertService.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_ExpertService : IService<App_Expert>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/App/IApp_ReportPriceService.cs
Normal file
12
VOL.AppManager/IServices/App/IApp_ReportPriceService.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_ReportPriceService : IService<App_ReportPrice>
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_TransactionAvgPriceService : IService<App_TransactionAvgPrice>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/App/IApp_TransactionService.cs
Normal file
12
VOL.AppManager/IServices/App/IApp_TransactionService.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_TransactionService : IService<App_Transaction>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/App/Itest2019Service.cs
Normal file
12
VOL.AppManager/IServices/App/Itest2019Service.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface Itest2019Service : IService<test2019>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/App/Partial/IApp_ExpertService.cs
Normal file
12
VOL.AppManager/IServices/App/Partial/IApp_ExpertService.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_ExpertService
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*所有关于App_ReportPrice类的业务代码接口应在此处编写
|
||||
*/
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.DomainModels;
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_ReportPriceService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取table1的数据
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
Task<object> GetTable1Data(PageDataOptions loadData);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取table2的数据
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
Task<object> GetTable2Data(PageDataOptions loadData);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
/*
|
||||
*所有关于App_TransactionAvgPrice类的业务代码接口应在此处编写
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_TransactionAvgPriceService
|
||||
{
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_TransactionService
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
12
VOL.AppManager/IServices/App/Partial/Itest2019Service.cs
Normal file
12
VOL.AppManager/IServices/App/Partial/Itest2019Service.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*所有关于test2019类的业务代码接口应在此处编写
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface Itest2019Service
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.AppManager/IServices/News/IApp_NewsService.cs
Normal file
12
VOL.AppManager/IServices/News/IApp_NewsService.cs
Normal file
@ -0,0 +1,12 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_NewsService : IService<App_News>
|
||||
{
|
||||
}
|
||||
}
|
||||
26
VOL.AppManager/IServices/News/Partial/IApp_NewsService.cs
Normal file
26
VOL.AppManager/IServices/News/Partial/IApp_NewsService.cs
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
*所有关于App_News类的业务代码接口应在此处编写
|
||||
*/
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.IServices
|
||||
{
|
||||
public partial interface IApp_NewsService
|
||||
{
|
||||
Task<WebResponseContent> GetDemoPageList();
|
||||
/// <summary>
|
||||
/// 生成html页面
|
||||
/// </summary>
|
||||
/// <param name="news"></param>
|
||||
/// <returns></returns>
|
||||
Task<WebResponseContent> CreatePage(App_News news);
|
||||
/// <summary>
|
||||
/// 设置封面
|
||||
/// </summary>
|
||||
/// <param name="news"></param>
|
||||
/// <returns></returns>
|
||||
WebResponseContent SetCover(App_News news);
|
||||
}
|
||||
}
|
||||
27
VOL.AppManager/Properties/launchSettings.json
Normal file
27
VOL.AppManager/Properties/launchSettings.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:34187/",
|
||||
"sslPort": 44337
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"VOL.AppManager": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000"
|
||||
}
|
||||
}
|
||||
}
|
||||
24
VOL.AppManager/Repositories/App/App_ExpertRepository.cs
Normal file
24
VOL.AppManager/Repositories/App/App_ExpertRepository.cs
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹App_ExpertRepository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class App_ExpertRepository : RepositoryBase<App_Expert> , IApp_ExpertRepository
|
||||
{
|
||||
public App_ExpertRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static IApp_ExpertRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_ExpertRepository>(); } }
|
||||
}
|
||||
}
|
||||
24
VOL.AppManager/Repositories/App/App_ReportPriceRepository.cs
Normal file
24
VOL.AppManager/Repositories/App/App_ReportPriceRepository.cs
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹App_ReportPriceRepository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class App_ReportPriceRepository : RepositoryBase<App_ReportPrice> , IApp_ReportPriceRepository
|
||||
{
|
||||
public App_ReportPriceRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static IApp_ReportPriceRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_ReportPriceRepository>(); } }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹App_TransactionAvgPriceRepository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class App_TransactionAvgPriceRepository : RepositoryBase<App_TransactionAvgPrice> , IApp_TransactionAvgPriceRepository
|
||||
{
|
||||
public App_TransactionAvgPriceRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static IApp_TransactionAvgPriceRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_TransactionAvgPriceRepository>(); } }
|
||||
}
|
||||
}
|
||||
24
VOL.AppManager/Repositories/App/App_TransactionRepository.cs
Normal file
24
VOL.AppManager/Repositories/App/App_TransactionRepository.cs
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹App_TransactionRepository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class App_TransactionRepository : RepositoryBase<App_Transaction> , IApp_TransactionRepository
|
||||
{
|
||||
public App_TransactionRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static IApp_TransactionRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_TransactionRepository>(); } }
|
||||
}
|
||||
}
|
||||
24
VOL.AppManager/Repositories/App/test2019Repository.cs
Normal file
24
VOL.AppManager/Repositories/App/test2019Repository.cs
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹test2019Repository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class test2019Repository : RepositoryBase<test2019> , Itest2019Repository
|
||||
{
|
||||
public test2019Repository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static Itest2019Repository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<Itest2019Repository>(); } }
|
||||
}
|
||||
}
|
||||
24
VOL.AppManager/Repositories/News/App_NewsRepository.cs
Normal file
24
VOL.AppManager/Repositories/News/App_NewsRepository.cs
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
*代码由框架生成,任何更改都可能导致被代码生成器覆盖
|
||||
*Repository提供数据库操作,如果要增加数据库操作请在当前目录下Partial文件夹App_NewsRepository编写代码
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Repositories
|
||||
{
|
||||
public partial class App_NewsRepository : RepositoryBase<App_News> , IApp_NewsRepository
|
||||
{
|
||||
public App_NewsRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static IApp_NewsRepository Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_NewsRepository>(); } }
|
||||
}
|
||||
}
|
||||
27
VOL.AppManager/Services/App/App_ExpertService.cs
Normal file
27
VOL.AppManager/Services/App/App_ExpertService.cs
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*Author:jxx
|
||||
*Contact:283591387@qq.com
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下App_ExpertService与IApp_ExpertService中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_ExpertService : ServiceBase<App_Expert, IApp_ExpertRepository>, IApp_ExpertService, IDependency
|
||||
{
|
||||
public App_ExpertService(IApp_ExpertRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static IApp_ExpertService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_ExpertService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
27
VOL.AppManager/Services/App/App_ReportPriceService.cs
Normal file
27
VOL.AppManager/Services/App/App_ReportPriceService.cs
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*Author:jxx
|
||||
*Contact:283591387@qq.com
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下App_ReportPriceService与IApp_ReportPriceService中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_ReportPriceService : ServiceBase<App_ReportPrice, IApp_ReportPriceRepository>, IApp_ReportPriceService, IDependency
|
||||
{
|
||||
public App_ReportPriceService(IApp_ReportPriceRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static IApp_ReportPriceService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_ReportPriceService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*Author:jxx
|
||||
*Contact:283591387@qq.com
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下App_TransactionAvgPriceService与IApp_TransactionAvgPriceService中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_TransactionAvgPriceService : ServiceBase<App_TransactionAvgPrice, IApp_TransactionAvgPriceRepository>, IApp_TransactionAvgPriceService, IDependency
|
||||
{
|
||||
public App_TransactionAvgPriceService(IApp_TransactionAvgPriceRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static IApp_TransactionAvgPriceService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_TransactionAvgPriceService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
27
VOL.AppManager/Services/App/App_TransactionService.cs
Normal file
27
VOL.AppManager/Services/App/App_TransactionService.cs
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*Author:jxx
|
||||
*Contact:283591387@qq.com
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下App_TransactionService与IApp_TransactionService中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_TransactionService : ServiceBase<App_Transaction, IApp_TransactionRepository>, IApp_TransactionService, IDependency
|
||||
{
|
||||
public App_TransactionService(IApp_TransactionRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static IApp_TransactionService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_TransactionService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
20
VOL.AppManager/Services/App/Partial/App_ExpertService.cs
Normal file
20
VOL.AppManager/Services/App/Partial/App_ExpertService.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Core.Enums;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.Const;
|
||||
using VOL.System.Repositories;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_ExpertService
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
307
VOL.AppManager/Services/App/Partial/App_ReportPriceService.cs
Normal file
307
VOL.AppManager/Services/App/Partial/App_ReportPriceService.cs
Normal file
@ -0,0 +1,307 @@
|
||||
/*
|
||||
*所有关于App_ReportPrice类的业务代码应在此处编写
|
||||
*可使用repository.调用常用方法,获取EF/Dapper等信息
|
||||
*如果需要事务请使用repository.DbContextBeginTransaction
|
||||
*也可使用DBServerProvider.手动获取数据库相关信息
|
||||
*用户信息、权限、角色等使用UserContext.Current操作
|
||||
*App_ReportPriceService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.Utilities;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.AppManager.Repositories;
|
||||
using System.Collections.Generic;
|
||||
using VOL.Core.Enums;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using VOL.AppManager.IRepositories;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_ReportPriceService
|
||||
{
|
||||
|
||||
//参照App_ReportPrice.js与App_ReportPriceModelBody.vue文件
|
||||
//App_ReportPrice.js为代码生成的扩展文件
|
||||
//App_ReportPriceModelBody.vue为自己创建的扩展文件,里面可以写任意代码
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取table1的数据
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetTable1Data(PageDataOptions loadData)
|
||||
{
|
||||
//App_ReportPriceModelBody.vue中loadTableBefore方法查询前给loadData.Value写入的值
|
||||
object value = loadData.Value;
|
||||
//获取查询到的总和数
|
||||
int total = await App_NewsRepository.Instance.FindAsIQueryable(x => 1 == 1).CountAsync();
|
||||
|
||||
var data = await App_NewsRepository.Instance
|
||||
//这里可以自己查询条件,从 loadData.Value找前台自定义传的查询条件
|
||||
.FindAsIQueryable(x => 1 == 1)
|
||||
//分页
|
||||
.TakeOrderByPage(1, 10, x => new Dictionary<object, QueryOrderBy>() { { x.CreateDate, QueryOrderBy.Desc } })
|
||||
.Select(s => new { s.Id, s.Title, s.ImageUrl, s.Enable, s.CreateDate, s.DailyRecommend })
|
||||
.ToListAsync();
|
||||
object gridData = new { rows = data, total };
|
||||
return gridData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取table2的数据
|
||||
/// </summary>
|
||||
/// <param name="loadData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetTable2Data(PageDataOptions loadData)
|
||||
{
|
||||
//App_ReportPriceModelBody.vue中loadTableBefore方法查询前给loadData.Value写入的值
|
||||
//获取查询到的总和数
|
||||
int total = await repository.DbContext.Set<App_Appointment>().Where(x => 1 == 1).CountAsync();
|
||||
//从 loadData.Value取查询条件,分页等信息
|
||||
//这里可以自己查询条件,从 loadData.Value找前台自定义传的查询条件
|
||||
var data = await repository.DbContext.Set<App_Appointment>().Where(x => 1 == 1)
|
||||
//分页
|
||||
.TakeOrderByPage(1, 10, x => new Dictionary<object, QueryOrderBy>() { { x.CreateDate, QueryOrderBy.Desc } })
|
||||
.Select(s => new { s.Id, s.Name, s.PhoneNo, s.Describe, s.CreateDate })
|
||||
.ToListAsync();
|
||||
object gridData = new { rows = data, total };
|
||||
return gridData;
|
||||
}
|
||||
|
||||
WebResponseContent _webResponse = new WebResponseContent();
|
||||
|
||||
/// <summary>
|
||||
/// 验证提交的从表参数
|
||||
/// saveModel.Extra在App_ReportPrice.js中addBefore/updateBefore新建与编辑时提交到的后台
|
||||
/// </summary>
|
||||
/// <param name="saveModel"></param>
|
||||
/// <returns></returns>
|
||||
private WebResponseContent ValidateExtra(SaveModel saveModel)
|
||||
{
|
||||
if (saveModel == null || saveModel.Extra == null) return _webResponse.Error("请提交参数");
|
||||
try
|
||||
{
|
||||
TableExtra tableExtra = saveModel.Extra.ToString().DeserializeObject<TableExtra>();
|
||||
if (tableExtra == null
|
||||
|| tableExtra.Table1List == null
|
||||
|| tableExtra.Table1List.Count == 0
|
||||
|| tableExtra.Table1List == null
|
||||
|| tableExtra.Table2List.Count == 0)
|
||||
{
|
||||
return _webResponse.Error("请提交从表1与从表2的参数");
|
||||
}
|
||||
//校验 从表1字段:Title,CreateDate必填
|
||||
_webResponse = tableExtra.Table1List.ValidationEntityList(x => new { x.Title, x.CreateDate });
|
||||
if (!_webResponse.Status)
|
||||
{
|
||||
_webResponse.Message = "从表1:" + _webResponse.Message;
|
||||
return _webResponse;
|
||||
}
|
||||
//校验 从表2字段:Describe, Name,PhoneNo 必填
|
||||
_webResponse = tableExtra.Table2List.ValidationEntityList(x => new { x.Describe, x.Name, x.PhoneNo });
|
||||
if (!_webResponse.Status)
|
||||
{
|
||||
_webResponse.Message = "从表2:" + _webResponse.Message;
|
||||
return _webResponse;
|
||||
}
|
||||
//校验成功返回
|
||||
return _webResponse.OK(null, tableExtra);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
return _webResponse.Error("参数不正确");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义保存从表数据逻辑
|
||||
/// </summary>
|
||||
/// <param name="saveDataModel"></param>
|
||||
/// <returns></returns>
|
||||
public override WebResponseContent Add(SaveModel saveDataModel)
|
||||
{
|
||||
//校验从表配置
|
||||
ValidateExtra(saveDataModel);
|
||||
if (!_webResponse.Status)
|
||||
{
|
||||
return _webResponse;
|
||||
}
|
||||
//取出校验完成后的从表1.2的数据
|
||||
TableExtra tableExtra = _webResponse.Data as TableExtra;
|
||||
|
||||
|
||||
//保存到数据库前
|
||||
AddOnExecuting = (App_ReportPrice price, object obj) =>
|
||||
{
|
||||
return WebResponseContent.Instance.OK();
|
||||
};
|
||||
//App_ReportPrice 此处已经提交了数据库,处于事务中
|
||||
AddOnExecuted = (App_ReportPrice price, object obj) =>
|
||||
{
|
||||
//在此操作tableExtra从表信息
|
||||
return WebResponseContent.Instance.OK();
|
||||
};
|
||||
return base.Add(saveDataModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自定义更新从表操作
|
||||
/// </summary>
|
||||
/// <param name="saveModel"></param>
|
||||
/// <returns></returns>
|
||||
public override WebResponseContent Update(SaveModel saveModel)
|
||||
{
|
||||
//校验从表配置
|
||||
ValidateExtra(saveModel);
|
||||
if (!_webResponse.Status)
|
||||
{
|
||||
return _webResponse;
|
||||
}
|
||||
//取出校验完成后的从表1.2的数据
|
||||
TableExtra tableExtra = _webResponse.Data as TableExtra;
|
||||
|
||||
//保存到数据库前
|
||||
UpdateOnExecuting = (App_ReportPrice price, object obj, object obj2, List<object> list) =>
|
||||
{
|
||||
return WebResponseContent.Instance.OK();
|
||||
};
|
||||
|
||||
//App_ReportPrice 此处已经提交了数据库,处于事务中
|
||||
UpdateOnExecuted = (App_ReportPrice price, object obj, object obj2, List<object> list) =>
|
||||
{
|
||||
//在此操作tableExtra从表信息
|
||||
List<App_News> newsList = tableExtra.Table1List.Select(s => new App_News
|
||||
{
|
||||
Id = s.Id ?? 0,
|
||||
Title = s.Title,
|
||||
ImageUrl = s.ImageUrl
|
||||
}).ToList();
|
||||
|
||||
//id=0的默认为新增的数据
|
||||
List<App_News> addList = newsList.Where(x => x.Id == 0).ToList();
|
||||
//设置默认创建人信息
|
||||
addList.ForEach(x => { x.SetCreateDefaultVal(); });
|
||||
|
||||
//获取所有编辑行
|
||||
List<int> editIds = newsList.Where(x => x.Id > 0).Select(s => s.Id).ToList();
|
||||
addList.ForEach(x => { x.SetModifyDefaultVal(); });
|
||||
//从数据库查询编辑的行是否存在,如果数据库不存在,执行修改操作会异常
|
||||
List<int> existsIds = App_NewsRepository.Instance.FindAsIQueryable(x => editIds.Contains(x.Id)).Select(s => s.Id).ToList();
|
||||
|
||||
//获取实际可以修改的数据
|
||||
List<App_News> updateList = newsList.Where(x => existsIds.Contains(x.Id)).ToList();
|
||||
|
||||
//设置默认修改人信息
|
||||
updateList.ForEach(x => { x.SetModifyDefaultVal(); });
|
||||
//新增
|
||||
repository.AddRange(addList);
|
||||
//修改(第二个参数指定要修改的字段,第三个参数执行保存)
|
||||
repository.UpdateRange(updateList, x => new { x.Title, x.ImageUrl, x.Modifier, x.ModifyDate, x.ModifyID });
|
||||
//其他从表按上面同样的操作即可
|
||||
//最终保存
|
||||
//repository.SaveChanges();
|
||||
return WebResponseContent.Instance.OK();
|
||||
};
|
||||
return base.Update(saveModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="keys"></param>
|
||||
/// <param name="delList"></param>
|
||||
/// <returns></returns>
|
||||
public override WebResponseContent Del(object[] keys, bool delList = true)
|
||||
{
|
||||
return base.Del(keys, true);
|
||||
}
|
||||
}
|
||||
|
||||
public class TableExtra
|
||||
{
|
||||
/// <summary>
|
||||
/// 从表1
|
||||
/// </summary>
|
||||
public List<Table1> Table1List { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 从表2
|
||||
/// </summary>
|
||||
public List<Table2> Table2List { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 从表1
|
||||
/// </summary>
|
||||
public class Table1
|
||||
{
|
||||
[Display(Name = "ID")]
|
||||
[Column(TypeName = "int")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Display(Name = "标题")]
|
||||
[MaxLength(50)]
|
||||
[Column(TypeName = "nvarchar(50)")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Display(Name = "封面图片")]
|
||||
[MaxLength(500)]
|
||||
[Column(TypeName = "nvarchar(500)")]
|
||||
public string ImageUrl { get; set; }
|
||||
|
||||
[Display(Name = "内容推荐")]
|
||||
[Column(TypeName = "int")]
|
||||
public int? DailyRecommend { get; set; }
|
||||
|
||||
[Display(Name = "是否启用")]
|
||||
// [Column(TypeName = "int")]
|
||||
public string Enable { get; set; }
|
||||
|
||||
[Display(Name = "发布时间")]
|
||||
[Column(TypeName = "datetime")]
|
||||
public DateTime? CreateDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 从表1
|
||||
/// </summary>
|
||||
public class Table2
|
||||
{
|
||||
[Display(Name = "Id")]
|
||||
[MaxLength(36)]
|
||||
[Column(TypeName = "uniqueidentifier")]
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
[Display(Name = "姓名")]
|
||||
[MaxLength(50)]
|
||||
[Column(TypeName = "nvarchar(50)")]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
[Display(Name = "描述")]
|
||||
[MaxLength(250)]
|
||||
[Column(TypeName = "nvarchar(250)")]
|
||||
public string Describe { get; set; }
|
||||
|
||||
[Display(Name = "电话")]
|
||||
[MaxLength(15)]
|
||||
[Column(TypeName = "nvarchar(15)")]
|
||||
public string PhoneNo { get; set; }
|
||||
|
||||
[Display(Name = "创建时间")]
|
||||
[Column(TypeName = "datetime")]
|
||||
[Editable(true)]
|
||||
public DateTime? CreateDate { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
/*
|
||||
*所有关于App_TransactionAvgPrice类的业务代码应在此处编写
|
||||
*可使用repository.调用常用方法,获取EF/Dapper等信息
|
||||
*如果需要事务请使用repository.DbContextBeginTransaction
|
||||
*也可使用DBServerProvider.手动获取数据库相关信息
|
||||
*用户信息、权限、角色等使用UserContext.Current操作
|
||||
*App_TransactionAvgPriceService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
using System.Linq.Expressions;
|
||||
using System;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_TransactionAvgPriceService
|
||||
{
|
||||
public override PageGridData<App_TransactionAvgPrice> GetPageData(PageDataOptions options)
|
||||
{
|
||||
SummaryExpress = (IQueryable<App_TransactionAvgPrice> queryable) =>
|
||||
{
|
||||
return queryable.GroupBy(x => 1).Select(x => new
|
||||
{
|
||||
AvgPrice = x.Average(o => o.AvgPrice),
|
||||
Enable = x.Sum(o => o.Enable)
|
||||
})
|
||||
.FirstOrDefault();
|
||||
};
|
||||
return base.GetPageData(options);
|
||||
}
|
||||
|
||||
protected override object GetDetailSummary<Detail>(IQueryable<Detail> queryeable)
|
||||
{
|
||||
return base.GetDetailSummary(queryeable);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_TransactionService
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
19
VOL.AppManager/Services/App/Partial/test2019Service.cs
Normal file
19
VOL.AppManager/Services/App/Partial/test2019Service.cs
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
*所有关于test2019类的业务代码应在此处编写
|
||||
*可使用repository.调用常用方法,获取EF/Dapper等信息
|
||||
*如果需要事务请使用repository.DbContextBeginTransaction
|
||||
*也可使用DBServerProvider.手动获取数据库相关信息
|
||||
*用户信息、权限、角色等使用UserContext.Current操作
|
||||
*test2019Service对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
|
||||
*/
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class test2019Service
|
||||
{
|
||||
}
|
||||
}
|
||||
25
VOL.AppManager/Services/App/test2019Service.cs
Normal file
25
VOL.AppManager/Services/App/test2019Service.cs
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下test2019Service与Itest2019Service中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class test2019Service : ServiceBase<test2019, Itest2019Repository>, Itest2019Service, IDependency
|
||||
{
|
||||
public test2019Service(Itest2019Repository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static Itest2019Service Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<Itest2019Service>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
27
VOL.AppManager/Services/News/App_NewsService.cs
Normal file
27
VOL.AppManager/Services/News/App_NewsService.cs
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
*Author:jxx
|
||||
*Contact:283591387@qq.com
|
||||
*代码由框架生成,此处任何更改都可能导致被代码生成器覆盖
|
||||
*所有业务编写全部应在Partial文件夹下App_NewsService与IApp_NewsService中编写
|
||||
*/
|
||||
using VOL.AppManager.IRepositories;
|
||||
using VOL.AppManager.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_NewsService : ServiceBase<App_News, IApp_NewsRepository>, IApp_NewsService, IDependency
|
||||
{
|
||||
public App_NewsService(IApp_NewsRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static IApp_NewsService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<IApp_NewsService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
73
VOL.AppManager/Services/News/Partial/App_NewsService.cs
Normal file
73
VOL.AppManager/Services/News/Partial/App_NewsService.cs
Normal file
@ -0,0 +1,73 @@
|
||||
/*
|
||||
*所有关于App_News类的业务代码应在此处编写
|
||||
*可使用repository.调用常用方法,获取EF/Dapper等信息
|
||||
*如果需要事务请使用repository.DbContextBeginTransaction
|
||||
*也可使用DBServerProvider.手动获取数据库相关信息
|
||||
*用户信息、权限、角色等使用UserContext.Current操作
|
||||
*App_NewsService对增、删、改查、导入、导出、审核业务代码扩展参照ServiceFunFilter
|
||||
*/
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Extensions;
|
||||
using VOL.Core.ManageUser;
|
||||
using VOL.Core.Utilities;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.AppManager.Services
|
||||
{
|
||||
public partial class App_NewsService
|
||||
{
|
||||
public async Task<WebResponseContent> GetDemoPageList()
|
||||
{
|
||||
var data = await repository.FindAsync(x => 1 == 1, s => new { s.CreateDate, s.Creator, s.NewsType, s.Title, s.DetailUrl, s.ImageUrl});
|
||||
return WebResponseContent.Instance.OK(null, data);
|
||||
}
|
||||
public WebResponseContent SetCover(App_News news)
|
||||
{
|
||||
int count = repository.Update(news, x => new { news.ImageUrl }, true);
|
||||
if (count == 0)
|
||||
return WebResponseContent.Instance.Error("未更新到数据");
|
||||
return WebResponseContent.Instance.OK("封面设置成功");
|
||||
}
|
||||
public async Task<WebResponseContent> CreatePage(App_News news)
|
||||
{
|
||||
WebResponseContent webResponseContent = WebResponseContent.Instance;
|
||||
if (news == null)
|
||||
{
|
||||
return webResponseContent.Error("未获取到数据");
|
||||
}
|
||||
if (!await repository.ExistsAsync(x => x.Id == news.Id))
|
||||
{
|
||||
return webResponseContent.Error("请求的数据已发生变化,请刷新页面重新提交");
|
||||
}
|
||||
string template = FileHelper.ReadFile(@"Template\\AppHtml\\news.html");
|
||||
if (string.IsNullOrEmpty(template))
|
||||
{
|
||||
return webResponseContent.Error("未获取到页面的模板,请确认模板是否存在");
|
||||
}
|
||||
string filePath;
|
||||
string fileName;
|
||||
string urlPath;
|
||||
if (!string.IsNullOrEmpty(news.DetailUrl) && news.DetailUrl.IndexOf("/") != -1 && news.DetailUrl.Split(".").Length == 2)
|
||||
{
|
||||
var file = news.DetailUrl.Split("/");
|
||||
fileName = file[file.Length - 1];
|
||||
filePath = news.DetailUrl.Replace(fileName, "");
|
||||
urlPath = filePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
string day = DateTime.Now.ToString("yyyyMMdd");
|
||||
fileName = DateTime.Now.ToString("HHmmsss") + new Random().Next(1000, 9999) + ".html";
|
||||
urlPath = $"static/news/{day}/";
|
||||
filePath = urlPath.MapPath(true);
|
||||
}
|
||||
string content = template.Replace("{title}", news.Title).Replace("{date}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")).Replace("{content}", news.Content);
|
||||
FileHelper.WriteFile((filePath.IndexOf("wwwroot") == -1 ? "wwwroot/" : "") + filePath, fileName, content);
|
||||
//更新数据库的url
|
||||
news.DetailUrl = $"{urlPath}{fileName}";
|
||||
repository.Update(news, x => new { news.DetailUrl, news.Content }, true);
|
||||
return webResponseContent.OK("面发布成功,可预览看效果", new { url = news.DetailUrl });
|
||||
}
|
||||
}
|
||||
}
|
||||
39
VOL.AppManager/VOL.AppManager.csproj
Normal file
39
VOL.AppManager/VOL.AppManager.csproj
Normal file
@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName></SccProjectName>
|
||||
<SccProvider></SccProvider>
|
||||
<SccAuxPath></SccAuxPath>
|
||||
<SccLocalPath></SccLocalPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<AssemblyName>VOL.AppManager</AssemblyName>
|
||||
<ApplicationIcon />
|
||||
<OutputType>Library</OutputType>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VOL.System\VOL.System.csproj" />
|
||||
<ProjectReference Include="..\VOL.Core\VOL.Core.csproj" />
|
||||
<ProjectReference Include="..\VOL.Entity\VOL.Entity.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="IRepositories\News\" />
|
||||
<Folder Include="IServices\News\" />
|
||||
<Folder Include="Services\News\Partial\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
15
VOL.Builder/IRepositories/Core/ISys_TableInfoRepository.cs
Normal file
15
VOL.Builder/IRepositories/Core/ISys_TableInfoRepository.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.Builder.IRepositories
|
||||
{
|
||||
public partial interface ISys_TableInfoRepository : IDependency,IRepository<Sys_TableInfo>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
10
VOL.Builder/IServices/Core/ISys_TableInfoService.cs
Normal file
10
VOL.Builder/IServices/Core/ISys_TableInfoService.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Builder.IServices
|
||||
{
|
||||
public partial interface ISys_TableInfoService : IService<Sys_TableInfo>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
26
VOL.Builder/IServices/Core/Partial/ISys_TableInfoService.cs
Normal file
26
VOL.Builder/IServices/Core/Partial/ISys_TableInfoService.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.Utilities;
|
||||
|
||||
namespace VOL.Builder.IServices
|
||||
{
|
||||
public partial interface ISys_TableInfoService
|
||||
{
|
||||
Task<(string, string)> GetTableTree();
|
||||
|
||||
string CreateEntityModel(Sys_TableInfo tableInfo);
|
||||
|
||||
WebResponseContent SaveEidt(Sys_TableInfo sysTableInfo);
|
||||
|
||||
string CreateServices(string tableName, string nameSpace, string foldername, bool webController, bool apiController);
|
||||
|
||||
|
||||
string CreateVuePage(Sys_TableInfo sysTableInfo, string vuePath);
|
||||
|
||||
object LoadTable(int parentId, string tableName, string columnCNName, string nameSpace, string foldername, int table_Id, bool isTreeLoad);
|
||||
Task<WebResponseContent> SyncTable(string tableName);
|
||||
Task<WebResponseContent> DelTree(int table_Id);
|
||||
}
|
||||
}
|
||||
27
VOL.Builder/Properties/launchSettings.json
Normal file
27
VOL.Builder/Properties/launchSettings.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:34188/",
|
||||
"sslPort": 44309
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"VOL.Builder": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000"
|
||||
}
|
||||
}
|
||||
}
|
||||
22
VOL.Builder/Repositories/Core/Sys_TableInfoRepository.cs
Normal file
22
VOL.Builder/Repositories/Core/Sys_TableInfoRepository.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using VOL.Builder.IRepositories;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.EFDbContext;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Builder.Repositories
|
||||
{
|
||||
public partial class Sys_TableInfoRepository : RepositoryBase<Sys_TableInfo>, ISys_TableInfoRepository
|
||||
{
|
||||
public Sys_TableInfoRepository(VOLContext dbContext)
|
||||
: base(dbContext)
|
||||
{
|
||||
|
||||
}
|
||||
public static ISys_TableInfoRepository GetService
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<ISys_TableInfoRepository>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1959
VOL.Builder/Services/Core/Partial/Sys_TableInfoService.cs
Normal file
1959
VOL.Builder/Services/Core/Partial/Sys_TableInfoService.cs
Normal file
File diff suppressed because it is too large
Load Diff
22
VOL.Builder/Services/Core/Sys_TableInfoService.cs
Normal file
22
VOL.Builder/Services/Core/Sys_TableInfoService.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using VOL.Builder.IRepositories;
|
||||
using VOL.Builder.IServices;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Builder.Services
|
||||
{
|
||||
public partial class Sys_TableInfoService : ServiceBase<Sys_TableInfo, ISys_TableInfoRepository>, ISys_TableInfoService, IDependency
|
||||
{
|
||||
public Sys_TableInfoService(ISys_TableInfoRepository repository)
|
||||
: base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
public static ISys_TableInfoService Instance
|
||||
{
|
||||
get { return AutofacContainerModule.GetService<ISys_TableInfoService>(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
93
VOL.Builder/Utility/ProjectPath.cs
Normal file
93
VOL.Builder/Utility/ProjectPath.cs
Normal file
@ -0,0 +1,93 @@
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using VOL.Core.Extensions;
|
||||
|
||||
namespace VOL.Builder.Utility
|
||||
{
|
||||
public class ProjectPath
|
||||
{
|
||||
// private int findCount = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取web父目录所在位置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DirectoryInfo GetProjectDirectoryInfo()
|
||||
{
|
||||
return GetProjectDirectoryInfo(new DirectoryInfo("".MapPath()), 1);
|
||||
}
|
||||
public static string GetProjectFileName(string startsWith)
|
||||
{
|
||||
string fileNames = GetProjectDirectoryInfo()?.GetDirectories()
|
||||
.Where(
|
||||
c =>
|
||||
//c.Name.StartsWith(startsWith)&&
|
||||
c.Name != startsWith + ".Core"
|
||||
&& c.Name != startsWith + ".Entity"
|
||||
&& !c.Name.ToLower().EndsWith(".web")
|
||||
&& !c.Name.ToLower().EndsWith(".webapi")
|
||||
&& !c.Name.ToLower().EndsWith(".builder")
|
||||
&& c.Name.ToLower()!=".vs"
|
||||
).Select(x => x.Name).ToList().Serialize();
|
||||
if (string.IsNullOrEmpty(fileNames))
|
||||
{
|
||||
fileNames = new DirectoryInfo("".MapPath()).GetFiles().Where(x => x.Name.EndsWith(".dll")
|
||||
//&& x.Name.StartsWith(startsWith)
|
||||
&& !x.Name.EndsWith(".Core.dll")
|
||||
&& !x.Name.EndsWith(".Entity.dll")
|
||||
&& !x.Name.EndsWith(".Builder.dll")
|
||||
&& !x.Name.ToLower().EndsWith(".web")
|
||||
&& !x.Name.ToLower().EndsWith(".webapi")
|
||||
&& !x.Name.ToLower().EndsWith(".builder")
|
||||
).Select(x => x.Name.Replace(".dll", "")).ToList().Serialize();
|
||||
}
|
||||
return fileNames ?? "''";
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取指定结尾的项目名称
|
||||
/// </summary>
|
||||
/// <param name="lastIndexOfName"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetLastIndexOfDirectoryName(string lastIndexOfName)
|
||||
{
|
||||
string projectName = GetProjectDirectoryInfo()?.GetDirectories()
|
||||
.Where(c => c.Name.LastIndexOf(lastIndexOfName) != -1).Select(x => x.Name).FirstOrDefault();
|
||||
if (string.IsNullOrEmpty(projectName))
|
||||
{
|
||||
projectName = new DirectoryInfo("".MapPath()).GetFiles().Where(x => x.Name.LastIndexOf(lastIndexOfName + ".dll") != -1).FirstOrDefault().Name;
|
||||
if (!string.IsNullOrEmpty(projectName))
|
||||
{
|
||||
projectName = projectName.Replace(".dll", "");
|
||||
}
|
||||
}
|
||||
return projectName;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取项目所在路径
|
||||
/// </summary>
|
||||
/// <param name="directoryInfo"></param>
|
||||
/// <returns></returns>
|
||||
private static DirectoryInfo GetProjectDirectoryInfo(DirectoryInfo directoryInfo, int findCount)
|
||||
{
|
||||
if (directoryInfo == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
if (directoryInfo.Exists
|
||||
&& directoryInfo.GetDirectories().Where(x => x.Name.LastIndexOf(".Web") != -1).FirstOrDefault() != null)
|
||||
{
|
||||
return directoryInfo;
|
||||
}
|
||||
if (findCount < 7)
|
||||
{
|
||||
findCount++;
|
||||
DirectoryInfo dir = GetProjectDirectoryInfo(directoryInfo.Parent, findCount);
|
||||
if (dir != null)
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
31
VOL.Builder/VOL.Builder.csproj
Normal file
31
VOL.Builder/VOL.Builder.csproj
Normal file
@ -0,0 +1,31 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup Label="Globals">
|
||||
<SccProjectName></SccProjectName>
|
||||
<SccProvider></SccProvider>
|
||||
<SccAuxPath></SccAuxPath>
|
||||
<SccLocalPath></SccLocalPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ApplicationIcon />
|
||||
<OutputType>Library</OutputType>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\VOL.Core\VOL.Core.csproj" />
|
||||
<ProjectReference Include="..\VOL.Entity\VOL.Entity.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IG_ActivitiesRepository : IDependency, IRepository<G_Activities>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
10
VOL.Business/IRepositories/HomeWork/IS_HomeWorkRepository.cs
Normal file
10
VOL.Business/IRepositories/HomeWork/IS_HomeWorkRepository.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_HomeWorkRepository : IDependency, IRepository<S_HomeWork>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_HomeWorkStudentsRepository : IDependency, IRepository<S_HomeWorkStudents>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_SubmittedAssignmentsRepository : IDependency, IRepository<S_SubmittedAssignments>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IN_HealthStandardsRepository : IDependency, IRepository<N_HealthStandards>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IN_SportsTestCategoryRepository : IDependency, IRepository<N_SportsTestCategory>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IN_SportsTestResultRepository : IDependency, IRepository<N_SportsTestValue>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IN_SportsTrainingCategoryRepository : IDependency, IRepository<N_SportsTrainingCategory>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_ClassAssocTeacherRepository : IDependency, IRepository<S_ClassAssocTeacher>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
12
VOL.Business/IRepositories/School/IS_ClassRepository.cs
Normal file
12
VOL.Business/IRepositories/School/IS_ClassRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_ClassRepository : IDependency, IRepository<S_Class>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_GradeAssocCategoryRepository : IDependency, IRepository<S_GradeAssocCategory>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
12
VOL.Business/IRepositories/School/IS_GradeRepository.cs
Normal file
12
VOL.Business/IRepositories/School/IS_GradeRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_GradeRepository : IDependency, IRepository<S_Grade>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_SchoolNatureAssocGradeRepository : IDependency, IRepository<S_SchoolNatureAssocGrade>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_SchoolNatureRepository : IDependency, IRepository<S_SchoolNature>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
15
VOL.Business/IRepositories/School/IS_SchoolRepository.cs
Normal file
15
VOL.Business/IRepositories/School/IS_SchoolRepository.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Business.IRepositories
|
||||
{
|
||||
public interface IS_SchoolRepository : IDependency, IRepository<S_School>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.Business/IRepositories/School/IS_StudentRepository.cs
Normal file
12
VOL.Business/IRepositories/School/IS_StudentRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_StudentRepository : IDependency, IRepository<S_Student>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
12
VOL.Business/IRepositories/School/IS_TeacherRepository.cs
Normal file
12
VOL.Business/IRepositories/School/IS_TeacherRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface IS_TeacherRepository : IDependency, IRepository<S_Teacher>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
VOL.Business/IRepositories/Special/IAi_SpecialRepository.cs
Normal file
15
VOL.Business/IRepositories/Special/IAi_SpecialRepository.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels;
|
||||
|
||||
namespace VOL.Business.IRepositories
|
||||
{
|
||||
public interface IAi_SpecialRepository : IDependency, IRepository<Ai_Special>
|
||||
{
|
||||
}
|
||||
}
|
||||
12
VOL.Business/IRepositories/Sys/ISys_ProvinceRepository.cs
Normal file
12
VOL.Business/IRepositories/Sys/ISys_ProvinceRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.DomainModels;
|
||||
using VOL.Core.Extensions.AutofacManager;
|
||||
using VOL.Entity.DomainModels.Business.People;
|
||||
|
||||
namespace VOL.System.IRepositories
|
||||
{
|
||||
public interface ISys_ProvinceRepository : IDependency, IRepository<Sys_Province>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
55
VOL.Business/IServices/Activity/IG_ActivitiesEntryService.cs
Normal file
55
VOL.Business/IServices/Activity/IG_ActivitiesEntryService.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Norm.Request;
|
||||
|
||||
namespace VOL.Business.IServices
|
||||
{
|
||||
public interface IG_ActivitiesEntryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取赛事报名列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<ActivitiesEntryListModel>> GetActivitiesEntryPageList(ActivitiesEntryPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ActivitiesEntryListModel>> GetActivitiesEntryList(ActivitiesEntryExportParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task AddActivitiesEntry(AddActivitiesEntryParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifyActivitiesEntry(AddActivitiesEntryParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteActivitiesEntry(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActivitiesEntryDetailsModel> Details(int id);
|
||||
}
|
||||
}
|
||||
104
VOL.Business/IServices/Activity/IG_ActivitiesService.cs
Normal file
104
VOL.Business/IServices/Activity/IG_ActivitiesService.cs
Normal file
@ -0,0 +1,104 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Entity.Enum;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Norm.Request;
|
||||
using VOL.Model.Norm.Response;
|
||||
|
||||
namespace VOL.Business.IServices
|
||||
{
|
||||
public interface IG_ActivitiesService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取赛事列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<ActivitiesListModel>> GetActivitiesPageList(ActivitiesPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ActivitiesListModel>> GetActivitiesList(ActivitiesExportParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取赛事名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
Task<List<ActivitiesListNameModel>> GetActivitiesNameList();
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<ActivitiesCategoryModel> GetActivitiesCategoryList();
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<int> AddActivities(ActivitiesDetailsParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifyActivities(ActivitiesDetailsParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更改赛事状态
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifyActivitiesStatus(int id, ActivitiesStatus status);
|
||||
|
||||
/// <summary>
|
||||
/// 上传活动照片
|
||||
/// </summary>
|
||||
string UploadActivitiesImage(IFormFile file);
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteActivities(List<int> Ids);
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<ActivitiesDetailsModel> GetActivitiesDetails(int id);
|
||||
|
||||
/// <summary>
|
||||
/// 获取学生详情
|
||||
/// </summary>
|
||||
/// <param name="classId"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ActivitiesStudentDetailsModel>> GetActivitiesStudentDetails(int classId, int activitiesId);
|
||||
|
||||
/// <summary>
|
||||
/// 获取赛事统计列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<ActivitiesStatisticsModel>> GetActivitiesStatisticsPageList(ActivitiesStatisticsPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 赛事统计详情
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<ActivitiesStatisticsDetailsModel>> GetActivitiesStatisticsDetails(ActivitiesStatisticsDetailsParam paramDto);
|
||||
}
|
||||
}
|
||||
38
VOL.Business/IServices/HomeWork/IS_HomeWorkService.cs
Normal file
38
VOL.Business/IServices/HomeWork/IS_HomeWorkService.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model;
|
||||
using VOL.Model.HomeWork;
|
||||
using VOL.Model.Norm.Request;
|
||||
using VOL.Model.Norm.Response;
|
||||
|
||||
namespace VOL.Business.IServices
|
||||
{
|
||||
public interface IS_HomeWorkService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取作业列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<HomeWorkListModel>> GetHomeWorkPageList(HomeWorkPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取作业下学生列表
|
||||
/// </summary>
|
||||
/// <param name="homeWorkId"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<HomeWorkStudentsModel>> GetHomeWorkStudents(HomeWorkStudentsParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取作业详情
|
||||
/// </summary>
|
||||
/// <param name="homeWorkId"></param>
|
||||
/// <param name="studentNo"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SubmittedAssignmentsModel>> GetSubmittedAssignments(int homeWorkId, string studentNo);
|
||||
}
|
||||
}
|
||||
20
VOL.Business/IServices/LevelExam/ILevelExamService.cs
Normal file
20
VOL.Business/IServices/LevelExam/ILevelExamService.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model;
|
||||
|
||||
namespace VOL.Business.IServices.LevelExam
|
||||
{
|
||||
public interface ILevelExamService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取考级测评列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<LevelExamListModel>> GetLevelExamPageList(LevelExamPageListParam paramDto);
|
||||
Task<List<LevelExamSpecialModel>> GetLevelExamSpecialList();
|
||||
}
|
||||
}
|
||||
23
VOL.Business/IServices/Norm/ICacheQueryService.cs
Normal file
23
VOL.Business/IServices/Norm/ICacheQueryService.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Core.BaseProvider;
|
||||
using VOL.Entity.Enum;
|
||||
using VOL.Model.School.Response;
|
||||
|
||||
namespace VOL.Business.IServices.Norm
|
||||
{
|
||||
/// <summary>
|
||||
/// 缓存服务
|
||||
/// </summary>
|
||||
public interface ICacheQueryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取体测成绩缓存
|
||||
/// </summary>
|
||||
Task<List<SportsTestValueModel>> GeSportsTestDataCacheAsync(Func<SportsTestValueModel, bool> queryCondition, Ai_ModeEnum? modeType = null);
|
||||
}
|
||||
}
|
||||
47
VOL.Business/IServices/Norm/IN_HealthStandardsService.cs
Normal file
47
VOL.Business/IServices/Norm/IN_HealthStandardsService.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model;
|
||||
|
||||
namespace VOL.Business.IServices
|
||||
{
|
||||
public interface IN_HealthStandardsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取体测标准列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<HealthStandardsPageListModel>> GetHealthStandardsPageList(HealthStandardsPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<HealthStandardsPageListModel>> GetHealthStandardsList(HealthStandardsExportParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 添加标准
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task AddHealthStandards(List<AddHealthStandardsParam> paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新标准
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifyHealthStandards(List<AddHealthStandardsParam> paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteHealthStandards(List<int> Ids);
|
||||
}
|
||||
}
|
||||
63
VOL.Business/IServices/Norm/IN_SportsTestCategoryService.cs
Normal file
63
VOL.Business/IServices/Norm/IN_SportsTestCategoryService.cs
Normal file
@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Norm.Response;
|
||||
|
||||
namespace VOL.Business
|
||||
{
|
||||
public interface IN_SportsTestCategoryService
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取项目类型列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SportsTestCategoryListModel>> GetSportsTestCategoryList();
|
||||
|
||||
/// <summary>
|
||||
/// 获取统计类型列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<StatisticInfoModel>> GetStatisticTypeList();
|
||||
|
||||
/// <summary>
|
||||
/// 分页列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<SportsTestCategoryPageListModel>> GetSportsTestCategoryPageList(SportsTestCategoryPageListParam paramDto);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SportsTestCategoryPageListModel>> GetSportsTestCategoryList(SportsTestCategoryPageListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 添加项目类型
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task AddSportsTestCategory(AddSportsTestCategoryParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新项目类型
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifySportsTestCategory(AddSportsTestCategoryParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 删除项目类型
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteSportsTestCategoryList(int id);
|
||||
|
||||
}
|
||||
}
|
||||
67
VOL.Business/IServices/Norm/IN_SportsTestResultService.cs
Normal file
67
VOL.Business/IServices/Norm/IN_SportsTestResultService.cs
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Model;
|
||||
using VOL.Model.Norm.Request;
|
||||
using VOL.Model.Norm.Response;
|
||||
|
||||
namespace VOL.Business.IServices
|
||||
{
|
||||
public interface IN_SportsTestResultService
|
||||
{
|
||||
/// <summary>
|
||||
/// 导入学生体测成绩
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
Task ImportStudentsTestData(IFormFile file);
|
||||
|
||||
/// <summary>
|
||||
/// 大屏数据统计
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<LargeScreenDataStatModel> LargeScreenDataStat(LargeScreenDataStatParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 大屏 班级平均运动强度监控
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<SportsProportionData>> LargeScreenAverageClassExerciseIntensity(LargeScreenAverageClassExerciseIntensityParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 分页列表
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageDataDto<StudentsTestDataModel>> GetSportsTestCategoryPageList(StudentsTestDataListParam paramDto);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 导出
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<StudentsTestDataModel>> GetStudentsTestDataList(StudentsTestDataListParam paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 添加标准
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task AddStudentsTestData(List<AddStudentsTestDataParam> paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 更新标准
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task ModifyStudentsTestData(List<AddStudentsTestDataParam> paramDto);
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="paramDto"></param>
|
||||
/// <returns></returns>
|
||||
Task DeleteStudentsTestData(List<int> Ids);
|
||||
}
|
||||
}
|
||||
16
VOL.Business/IServices/School/IFaceDetectService.cs
Normal file
16
VOL.Business/IServices/School/IFaceDetectService.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using VOL.Model;
|
||||
using VOL.Model.School.Request;
|
||||
|
||||
namespace VOL.Business.IServices.School
|
||||
{
|
||||
public interface IFaceDetectService
|
||||
{
|
||||
/// <summary>
|
||||
/// 人脸获取学生信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<StudentPageListModel> GetStudentDetails(IFormFile file, int classId);
|
||||
Task<StudentPageListModel> Face(string base64);
|
||||
}
|
||||
}
|
||||
18
VOL.Business/IServices/School/IIotDataSyncService.cs
Normal file
18
VOL.Business/IServices/School/IIotDataSyncService.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using VOL.Model.IOT.Request;
|
||||
|
||||
namespace VOL.Business.IServices.School
|
||||
{
|
||||
/// <summary>
|
||||
/// 物联网端数据同步
|
||||
/// </summary>
|
||||
public interface IIotDataSyncService
|
||||
{
|
||||
Task DataSyncCallBack(DataSyncCallBackParam paramDto);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user