Selaa lähdekoodia

Merge branch 'feature/snapshot' into test

qinchaoyue 1 kuukausi sitten
vanhempi
commit
604a882950

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

@@ -104,7 +104,7 @@ public class SnapshotController : BaseController
         order.AcceptType = industry.AcceptType;
         order.FromGender = EGender.Unknown;
         order.Title = dto.GetTitle(industry.IndustryType, industry.TitleSuffix);
-        order.Content = dto.GetContent(industry.IndustryType);
+        order.Content = dto.GetContent(industry.IndustryType, _systemDicDataCacheManager.JobType);
         order.FromPhone = _sessionContext.Phone;
         order.Contact = _sessionContext.Phone;
         order.SourceChannel = ssp.DicDataName;

+ 5 - 4
src/Hotline.Share/Dtos/Snapshot/OrderDto.cs

@@ -183,17 +183,18 @@ public class AddSnapshotOrderInDto : Position
     /// </summary>
     public string? Attach { get; set; }
 
-    public string GetContent(EIndustryType industryType)
+    public string GetContent(EIndustryType industryType, IReadOnlyList<SystemDicDataOutDto> dic)
     {
+        var name = (dic.FirstOrDefault(m => m.DicDataValue == JobType.ToString()) ?? new SystemDicDataOutDto()).DicDataName;
         if (industryType == EIndustryType.Declare)
         {
             return $"经营单位类别: {this.BusinessUnitType}\r\n" + // 个人
                     $"作业场所:{this.Workplace}\r\n" + // 化工、民爆物品生产经营企业
                     $"场所名称:{this.WorkplaceName}\r\n" + // 多业态混合经营场所 - 存储多种功能的劳动密集型企业
-                    $"作业区域: {this.County + this.Town}\r\n" + // 自流井区舒坪街道
-                    $"作业类型: {this.JobType}\r\n" + // 电焊
+                    $"作业区域: {this.WorkArea}\r\n" + // 自流井区舒坪街道
+                    $"作业类型: {name}\r\n" + // 电焊
                     $"作业时间:{this.StartWorkTime}~{this.EndWorkTime}\r\n" +
-                    $"作业地点: {this.Town}({this.County})({this.Street})"; // 舒平(自流井区)(油库)"
+                    $"作业地点: {Address})"; // 舒平(自流井区)(油库)"
         }
         return $"{Description}";
     }