mahao 1 year ago
parent
commit
cd5c09d908
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs
  2. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs
  3. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs

@ -27,6 +27,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[Display(Name = "业务类型")] [Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; } public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public string BusinessTypeDisplayName { get; set; }
} }
/// <summary> /// <summary>

17
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/TB_RePartsRelationship_SERVICE.cs

@ -18,15 +18,15 @@ using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports; using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ;
/// <summary>
/// 客户替换件关系
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class TB_RePartsRelationship_SERVICE : SettleAccountApplicationBase<TB_RePartsRelationship>
{ {
/// <summary>
/// 客户替换件关系
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
public class TB_RePartsRelationship_SERVICE : SettleAccountApplicationBase<TB_RePartsRelationship>
{
/// <summary> /// <summary>
/// 客户替换件关系仓储 /// 客户替换件关系仓储
/// </summary> /// </summary>
@ -122,5 +122,4 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
#endregion #endregion
}
} }

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -56,6 +56,8 @@ using Win.Sfs.SettleAccount.Errors;
using Win.Sfs.SettleAccount.Entities.Errors; using Win.Sfs.SettleAccount.Entities.Errors;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using System.ComponentModel.DataAnnotations;
using System.Reflection;
namespace Win.Sfs.SettleAccount namespace Win.Sfs.SettleAccount
{ {
@ -923,7 +925,8 @@ namespace Win.Sfs.SettleAccount
/// </summary> /// </summary>
private void CreateMapTB_RePartsRelationship() private void CreateMapTB_RePartsRelationship()
{ {
CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_DTO>(); CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_DTO>()
.ForMember(x => x.BusinessTypeDisplayName, y => y.MapFrom(t => t.BusinessType.GetType().GetField(t.BusinessType.ToString()).GetCustomAttribute<DisplayAttribute>().Name));
CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_EXPORT_DTO>(); CreateMap<TB_RePartsRelationship, TB_RePartsRelationship_EXPORT_DTO>();
CreateMap<TB_RePartsRelationship_IMPORT_DTO, TB_RePartsRelationship>(); CreateMap<TB_RePartsRelationship_IMPORT_DTO, TB_RePartsRelationship>();
} }

Loading…
Cancel
Save