using Furion.DatabaseAccessor.Extensions;
using YBEE.EQM.Core;
namespace YBEE.EQM.Application;
///
/// 反馈结果管理服务(各机构均适用)
///
public class ExamResultService : IExamResultService, ITransient
{
private readonly IRepository _rep;
public ExamResultService(IRepository rep)
{
_rep = rep;
}
///
/// 添加监测结果文件
///
///
///
public async Task Add(AddExamResultInput input)
{
var item = input.Adapt();
await item.InsertAsync();
}
///
/// 根据发布内容ID获取文件列表
///
///
///
public async Task> GetListByPublishId(int publishId)
{
var items = await _rep.DetachedEntities.Where(t => t.ExamDataPublishId == publishId).ProjectToType().ToListAsync();
return items;
}
}