|
@@ -29,8 +29,9 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
|
private readonly ISnapshotSMSTemplateRepository _snapshotSMSTemplateRepository;
|
|
|
private readonly IPractitionerRepository _practitionerRepository;
|
|
|
private readonly IVolunteerRepository _volunteerRepository;
|
|
|
+ private readonly IVolunteerReportRepository _volunteerReportRepository;
|
|
|
|
|
|
- public IndustryApplication(IIndustryRepository industryRepository, IFileRepository fileRepository, ISystemSettingCacheManager sysSetting, IIndustryCaseRepository industryCaseRepository, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository, IPractitionerRepository practitionerRepository, IVolunteerRepository volunteerRepository)
|
|
|
+ public IndustryApplication(IIndustryRepository industryRepository, IFileRepository fileRepository, ISystemSettingCacheManager sysSetting, IIndustryCaseRepository industryCaseRepository, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository, IPractitionerRepository practitionerRepository, IVolunteerRepository volunteerRepository, IVolunteerReportRepository volunteerReportRepository)
|
|
|
{
|
|
|
_industryRepository = industryRepository;
|
|
|
_fileRepository = fileRepository;
|
|
@@ -39,6 +40,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
|
_snapshotSMSTemplateRepository = snapshotSMSTemplateRepository;
|
|
|
_practitionerRepository = practitionerRepository;
|
|
|
_volunteerRepository = volunteerRepository;
|
|
|
+ _volunteerReportRepository = volunteerReportRepository;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 新增行业
|
|
@@ -357,5 +359,20 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
|
dto.Adapt(entity);
|
|
|
await _volunteerRepository.UpdateAsync(entity);
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 志愿者上报集合
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public ISugarQueryable<VolunteerReportItemsOutDto> GetVolunteerReportItemsAsync(VolunteerReportItemsInDto dto)
|
|
|
+ {
|
|
|
+ var query = _volunteerReportRepository.Queryable()
|
|
|
+ .WhereIF(dto.Name.NotNullOrEmpty(), m => m.Name.Contains(dto.Name))
|
|
|
+ .WhereIF(dto.PhoneNumber.NotNullOrEmpty(), m => m.PhoneNumber.Contains(dto.PhoneNumber))
|
|
|
+ .OrderByDescending(m => m.CreationTime)
|
|
|
+ .Select<VolunteerReportItemsOutDto>();
|
|
|
+ return query;
|
|
|
+ }
|
|
|
#endregion
|
|
|
}
|