Эх сурвалжийг харах

Merge branch 'feature/snapshot' into test

qinchaoyue 3 сар өмнө
parent
commit
f2023088d7

+ 16 - 1
src/Hotline.Application/ExportExcel/ExportApplication.cs

@@ -12,6 +12,7 @@ using Microsoft.AspNetCore.Mvc;
 using Microsoft.Extensions.DependencyInjection;
 using MiniExcelLibs;
 using NPOI.HPSF;
+using SqlSugar;
 using System.Net.Http;
 using System.Reflection;
 using XF.Domain.Dependency;
@@ -79,7 +80,21 @@ namespace Hotline.Application.ExportExcel
             dynamic? dynamicClass = DynamicClassHelper.CreateDynamicClass(columnInfos);
 
             var dtos = items
-                .Select(item => _mapper.Map(item, typeT, dynamicClass))
+                .Select(item =>
+                {
+                    var mappedItem = _mapper.Map(item, typeT, dynamicClass);
+                    foreach (var prop in mappedItem.GetType().GetProperties())
+                    {
+                        if (prop.PropertyType == typeof(string))
+                        {
+                            if((string)prop.GetValue(mappedItem) == "True")
+                                prop.SetValue(mappedItem, "是");
+                            if((string)prop.GetValue(mappedItem) == "False")
+                                prop.SetValue(mappedItem, "否");
+                        }
+                    }
+                    return mappedItem;
+                })
                 .Cast<object>()
                 .ToList();
 

+ 3 - 2
src/Hotline.Application/Snapshot/IndustryApplication.cs

@@ -182,7 +182,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     /// </summary>
     /// <param name="dto"></param>
     /// <returns></returns>
-    [Description("行业模板")]
+    [Description("行业审批短信")]
     public ISugarQueryable<SnapshotSMSTemplateItemsOutDto> GetSMSTemplates(SnapshotSMSTemplateItemsInDto dto)
     {
         var query = _snapshotSMSTemplateRepository.Queryable()
@@ -245,6 +245,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     /// <param name="dto"></param>
     /// <returns></returns>
     /// <exception cref="NotImplementedException"></exception>
+    [Description("区域从业人员")]
     public ISugarQueryable<PractitionerItemsOutDto> GetPractitionerItems(PractitionerItemsInDto dto)
     {
         var query = _practitionerRepository.Queryable()
@@ -315,7 +316,7 @@ public class IndustryApplication : IIndustryApplication, IScopeDependency
     /// </summary>
     /// <param name="dto"></param>
     /// <returns></returns>
-    /// <exception cref="NotImplementedException"></exception>
+    [Description("志愿者名单")]
     public ISugarQueryable<VolunteerItemsOutDto> GetVolunteerItems(VolunteerItemsInDto dto)
     {
         var query = _volunteerRepository.Queryable()

+ 3 - 0
src/Hotline.Application/Snapshot/SnapshotOrderApplication.cs

@@ -21,6 +21,7 @@ using NPOI.POIFS.Properties;
 using SqlSugar;
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -169,6 +170,7 @@ public class SnapshotOrderApplication : IOrderSnapshotApplication, IScopeDepende
     /// </summary>
     /// <param name="dto"></param>
     /// <returns></returns>
+    [Description("随手拍公开")]
     public ISugarQueryable<GetOrderSnapshotPublishItemsOutDto> GetOrderSnapshotPublishItems(GetOrderSnapshotPublishItemsInDto dto)
     {
         var query = _orderSnapshotRepository.Queryable(includeDeleted: true)
@@ -200,6 +202,7 @@ public class SnapshotOrderApplication : IOrderSnapshotApplication, IScopeDepende
     /// </summary>
     /// <param name="dto"></param>
     /// <returns></returns>
+    [Description("工单标注")]
     public ISugarQueryable<SignOrderSnapshotItemsOutDto> GetSignOrderSnapshotItems(SignOrderSnapshotItemsInDto dto)
     {
         var query = _orderSnapshotRepository.Queryable()

+ 16 - 0
src/Hotline.Share/Dtos/Snapshot/IndustryDto.cs

@@ -398,6 +398,11 @@ public class IndustryCaseItemOutDto : AddIndustryCaseDto
     /// 网络员发放红包金额(单位:元)
     /// </summary>
     public string GuiderReadPackAmountTxt => GuiderReadPackAmount.ToYuanFinance();
+
+    /// <summary>
+    /// 是否启用
+    /// </summary>
+    public string IsEnableTxt => IsEnable ? "启用" : "禁用";
 }
 
 public class UpdateIndustryCaseDto : AddIndustryCaseDto
@@ -466,6 +471,17 @@ public class SnapshotSMSTemplateItemsOutDto : AddSnapshotSMSTemplateInDto
     /// 行业名称
     /// </summary>
     public string IndustryName { get; set; }
+
+    /// <summary>
+    /// 是否启用
+    /// </summary>
+    public string IsEnableTxt => IsEnable ? "启用" : "禁用";
+
+    /// <summary>
+    /// 是否公用
+    /// </summary>
+    public string IsPublicTxt => IsPublic ? "是" : "否";
+
 }
 
 public class UpdateSnapshotSMSTemplateInDto : AddSnapshotSMSTemplateInDto

+ 40 - 0
src/Hotline.Share/Dtos/Snapshot/OrderDto.cs

@@ -538,6 +538,11 @@ public class SnapshotOrderGuiderAuditItemsOutDto
     /// </summary>
     public bool? IsIssued { get; set; }
 
+    /// <summary>
+    /// 网格员奖励发放结果
+    /// </summary>
+    public string? IsIssuedTxt => IsIssued.HasValue == false ? "" : IsIssued.Value ? "已发放" : "未发放";
+
     /// <summary>
     /// 区域
     /// </summary>
@@ -549,26 +554,51 @@ public class SnapshotOrderGuiderAuditItemsOutDto
     /// </summary>
     public bool? IsRectify { get; set; }
 
+    /// <summary>
+    /// 部门是否整改完成
+    /// </summary>
+    public string? IsRectifyTxt => IsRectify.HasValue == false ? "" : IsRectify.Value ? "是" : "否";
+
     /// <summary>
     /// 部门是否属实
     /// </summary>
     public bool? IsTruthDepartment { get; set; }
 
+    /// <summary>
+    /// 部门是否属实
+    /// </summary>
+    public string? IsTruthDepartmentTxt => IsTruthDepartment.HasValue == false ? "" : IsTruthDepartment.Value ? "是" : "否";
+
     /// <summary>
     /// 网格员是否属实
     /// </summary>
     public bool? IsTruth { get; set; }
 
+    /// <summary>
+    /// 网格员是否属实
+    /// </summary>
+    public string? IsTruthTxt => IsTruth.HasValue == false ? "" : IsTruth.Value ? "是" : "否";
+
     /// <summary>
     /// 是否重复
     /// </summary>
     public bool? IsRepetition { get; set; }
 
+    /// <summary>
+    /// 是否重复
+    /// </summary>
+    public string? IsRepetitionTxt => IsRepetition.HasValue == false ? "" : IsRepetition.Value ? "是" : "否";
+
     /// <summary>
     /// 网格员是否办理
     /// </summary>
     public bool? IsDeal { get; set; }
 
+    /// <summary>
+    /// 网格员是否办理
+    /// </summary>
+    public string? IsDealTxt => IsDeal.HasValue == false ? "" : IsDeal.Value ? "是" : "否";
+
     /// <summary>
     /// 网格E通编号
     /// </summary>
@@ -1170,6 +1200,11 @@ public class SignOrderSnapshotItemsOutDto
     /// </summary>
     public bool? IsSafetyDepartment { get; set; }
 
+    /// <summary>
+    /// 标注状态
+    /// </summary>
+    public string IsSafetyDepartmentTxt => IsSafetyDepartment == true ? "是" : "否";
+
     /// <summary>
     /// 回复内容;
     /// 网格员回复内容
@@ -1258,6 +1293,11 @@ public class GetOrderSnapshotPublishItemsOutDto
     /// 网格员是否属实
     /// </summary>
     public bool IsTruth { get; set; }
+
+    /// <summary>
+    /// 网格员是否属实
+    /// </summary>
+    public string IsTruthTxt => IsTruth ? "是" : "否";
 }
 
 public record GetOrderSnapshotPublishItemsInDto : PagedRequest