Browse Source

CardRegister修改

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
4d6726c38e
  1. 5
      src/Shentun.Peis.Application.Contracts/CardTypes/CreateCardTypeDto.cs
  2. 5
      src/Shentun.Peis.Application.Contracts/CardTypes/UpdateCardTypeDto.cs
  3. 5
      src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs
  4. 15
      src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs

5
src/Shentun.Peis.Application.Contracts/CardTypes/CreateCardTypeDto.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.CardTypes
@ -9,18 +10,22 @@ namespace Shentun.Peis.CardTypes
/// <summary>
/// 名称
/// </summary>
[Required(ErrorMessage ="名称不能为空")]
public string DisplayName { get; set; }
/// <summary>
/// 卡模式 (0:充值卡,1:积分卡)
/// </summary>
[Required(ErrorMessage = "卡模式不能为空")]
public char CardModeId { get; set; }
/// <summary>
/// 折扣
/// </summary>
[Required(ErrorMessage = "折扣不能为空")]
public int Discount { get; set; }
/// <summary>
/// 有效期
/// </summary>
[Required(ErrorMessage = "有效期不能为空")]
public int ExpiryDay { get; set; }
/// <summary>

5
src/Shentun.Peis.Application.Contracts/CardTypes/UpdateCardTypeDto.cs

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace Shentun.Peis.CardTypes
@ -9,18 +10,22 @@ namespace Shentun.Peis.CardTypes
/// <summary>
/// 名称
/// </summary>
[Required(ErrorMessage = "名称不能为空")]
public string DisplayName { get; set; }
/// <summary>
/// 卡模式 (0:充值卡,1:积分卡)
/// </summary>
[Required(ErrorMessage = "卡模式不能为空")]
public char CardModeId { get; set; }
/// <summary>
/// 折扣
/// </summary>
[Required(ErrorMessage = "折扣不能为空")]
public int Discount { get; set; }
/// <summary>
/// 有效期
/// </summary>
[Required(ErrorMessage = "有效期不能为空")]
public int ExpiryDay { get; set; }
/// <summary>

5
src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs

@ -65,5 +65,10 @@ namespace Shentun.Peis.CustomerOrgGroups
/// 显示顺序
/// </summary>
public int DisplayOrder { get; set; }
/// <summary>
/// 体检次数ID
/// </summary>
public Guid CustomerOrgRegisterId { get; set; }
}
}

15
src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs

@ -53,7 +53,14 @@ namespace Shentun.Peis.CustomerOrgGroups
/// <returns></returns>
public override async Task<CustomerOrgGroupDto> GetAsync(Guid id)
{
return await base.GetAsync(id);
var userList = await _userRepository.GetListAsync();
var entityDto = await base.GetAsync(id);
entityDto.CreatorName = EntityHelper.GetUserNameNoSql(userList, entityDto.CreatorId);
entityDto.LastModifierName = EntityHelper.GetUserNameNoSql(userList, entityDto.CreatorId);
return entityDto;
}
/// <summary>
/// 获取列表 团检分组
@ -125,7 +132,8 @@ namespace Shentun.Peis.CustomerOrgGroups
LastModifierName = EntityHelper.GetUserNameNoSql(userList, s.LastModifierId),
CustomerOrgId = s.CustomerOrgRegister.CustomerOrgId,
CustomerOrgName = s.CustomerOrgRegister.CustomerOrg.DisplayName,
MedicalTimes = s.CustomerOrgRegister.MedicalTimes
MedicalTimes = s.CustomerOrgRegister.MedicalTimes,
CustomerOrgRegisterId = s.CustomerOrgRegisterId
}).ToList();
return new PagedResultDto<CustomerOrgGroupOrCustomerOrgDto>(totalCount, entdto);
@ -249,7 +257,8 @@ namespace Shentun.Peis.CustomerOrgGroups
AgeUpperLimit = s.AgeUpperLimit,
AgeLowerLimit = s.AgeLowerLimit,
CreatorName = EntityHelper.GetUserNameNoSql(userList, s.CreatorId),
LastModifierName = EntityHelper.GetUserNameNoSql(userList, s.LastModifierId)
LastModifierName = EntityHelper.GetUserNameNoSql(userList, s.LastModifierId),
CustomerOrgRegisterId = CustomerOrgRegisterId
}).ToList();
return entdto;

Loading…
Cancel
Save