Quellcode durchsuchen

Merge branch 'feature/snapshot' into test

qinchaoyue vor 1 Monat
Ursprung
Commit
32ab561bb2

+ 1 - 1
src/Hotline.Api/Controllers/Snapshot/SnapshotController.cs

@@ -316,7 +316,7 @@ public class SnapshotController : BaseController
     /// <param name="dto"></param>
     /// <returns></returns>
     [HttpPost("report")]
-    [LogFilter("志愿者上报")]
+    [LogFilterAlpha("志愿者上报")]
     public async Task<AddVolunteerReportOutDto> AddVolunteerReportAsync([FromBody] AddVolunteerReportInDto dto)
         => await _snapshotApplication.AddVolunteerReportAsync(dto, HttpContext.RequestAborted);
 

+ 6 - 1
src/Hotline.Application/Snapshot/IndustryApplication.cs

@@ -385,10 +385,15 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     public ISugarQueryable<VolunteerReportItemsOutDto> GetVolunteerReportItems(VolunteerReportItemsInDto dto)
     {
         var query = _volunteerReportRepository.Queryable()
+            .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)
-            .Select<VolunteerReportItemsOutDto>();
+            .Select((volunteer, dic) => new VolunteerReportItemsOutDto
+            {
+                JobType = dic.DicDataName,
+                FullAddress = volunteer.Address + volunteer.FullAddress
+            }, true);
         return query;
     }
 

+ 6 - 0
src/Hotline/Snapshot/CommunityInfo.cs

@@ -29,6 +29,12 @@ public class CommunityInfo : CreationSoftDeleteEntity
     [SugarColumn(ColumnDescription = "社区全称")]
     public string FullName { get; set; }
 
+    /// <summary>
+    /// 部门编号
+    /// </summary>
+    [SugarColumn(ColumnDescription = "部门编号")]
+    public string DepartmentNo { get; set; }
+
     /// <summary>
     /// 父社区Code
     /// </summary>