|
@@ -1,4 +1,5 @@
|
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
|
using DocumentFormat.OpenXml.Office2010.Excel;
|
|
|
|
+using DocumentFormat.OpenXml.Wordprocessing;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.Caching.Interfaces;
|
|
using Hotline.File;
|
|
using Hotline.File;
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
using Hotline.Repository.SqlSugar.Extensions;
|
|
@@ -231,7 +232,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
.LeftJoin<Industry>((s, i) => s.IndustryId == i.Id)
|
|
.LeftJoin<Industry>((s, i) => s.IndustryId == i.Id)
|
|
.Where((s, i) => s.Id == id)
|
|
.Where((s, i) => s.Id == id)
|
|
.Select((s, i) => new SnapshotSMSTemplateItemsOutDto
|
|
.Select((s, i) => new SnapshotSMSTemplateItemsOutDto
|
|
- {
|
|
|
|
|
|
+ {
|
|
Status = s.Status
|
|
Status = s.Status
|
|
}, true)
|
|
}, true)
|
|
.FirstAsync();
|
|
.FirstAsync();
|
|
@@ -386,15 +387,30 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
{
|
|
{
|
|
var query = _volunteerReportRepository.Queryable()
|
|
var query = _volunteerReportRepository.Queryable()
|
|
.LeftJoin<SystemDicData>((volunteer, dic) => volunteer.JobType == dic.Id)
|
|
.LeftJoin<SystemDicData>((volunteer, dic) => volunteer.JobType == dic.Id)
|
|
- .WhereIF(dto.Name.NotNullOrEmpty(), m => m.Name.Contains(dto.Name))
|
|
|
|
- .WhereIF(dto.PhoneNumber.NotNullOrEmpty(), m => m.PhoneNumber.Contains(dto.PhoneNumber))
|
|
|
|
- .OrderByDescending(m => m.CreationTime)
|
|
|
|
|
|
+ .WhereIF(dto.Name.NotNullOrEmpty(), (volunteer, dic) => volunteer.Name.Contains(dto.Name))
|
|
|
|
+ .WhereIF(dto.PhoneNumber.NotNullOrEmpty(), (volunteer, dic) => volunteer.PhoneNumber.Contains(dto.PhoneNumber))
|
|
|
|
+ .OrderByDescending((volunteer, dic) => volunteer.CreationTime)
|
|
.Select((volunteer, dic) => new VolunteerReportItemsOutDto
|
|
.Select((volunteer, dic) => new VolunteerReportItemsOutDto
|
|
{
|
|
{
|
|
JobType = dic.DicDataName,
|
|
JobType = dic.DicDataName,
|
|
PhoneNumber = volunteer.DeclarePhoneNumber,
|
|
PhoneNumber = volunteer.DeclarePhoneNumber,
|
|
- FullAddress = volunteer.Address + volunteer.FullAddress
|
|
|
|
- }, true);
|
|
|
|
|
|
+ FullAddress = volunteer.Address + volunteer.FullAddress,
|
|
|
|
+ }, true)
|
|
|
|
+ .Mapper((item, cache)=>
|
|
|
|
+ {
|
|
|
|
+ item.Files = _fileRepository.Queryable()
|
|
|
|
+ .Where(file => file.Key == item.Id)
|
|
|
|
+ .Select(file => new IndustryFileDto
|
|
|
|
+ {
|
|
|
|
+ Id = file.Id,
|
|
|
|
+ Path = file.Path,
|
|
|
|
+ FileName = file.FileName,
|
|
|
|
+ Additions = file.Additions
|
|
|
|
+ }).ToList();
|
|
|
|
+ });
|
|
|
|
+#if DEBUG
|
|
|
|
+ var sql = query.ToSqlString();
|
|
|
|
+#endif
|
|
return query;
|
|
return query;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -425,7 +441,8 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
|
|
await _snapshotSMSTemplateRepository.Queryable()
|
|
await _snapshotSMSTemplateRepository.Queryable()
|
|
.Where(m => ids.Contains(m.Id))
|
|
.Where(m => ids.Contains(m.Id))
|
|
.ToListAsync()
|
|
.ToListAsync()
|
|
- .Then(async sms => {
|
|
|
|
|
|
+ .Then(async sms =>
|
|
|
|
+ {
|
|
for (int i = 0;i < sms.Count;i++)
|
|
for (int i = 0;i < sms.Count;i++)
|
|
{
|
|
{
|
|
sms[i].IsDeleted = true;
|
|
sms[i].IsDeleted = true;
|