diff --git a/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs b/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs index 355a94a1..35bd82f0 100644 --- a/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs +++ b/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupDto.cs @@ -65,5 +65,10 @@ namespace Shentun.Peis.CustomerOrgGroups /// 显示顺序 /// public int DisplayOrder { get; set; } + + /// + /// 体检次数ID + /// + public Guid CustomerOrgRegisterId { get; set; } } } diff --git a/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs b/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs index 27886994..2fc5384a 100644 --- a/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs +++ b/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs @@ -53,7 +53,14 @@ namespace Shentun.Peis.CustomerOrgGroups /// public override async Task 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; + + } /// /// 获取列表 团检分组 @@ -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(totalCount, entdto); @@ -143,7 +151,7 @@ namespace Shentun.Peis.CustomerOrgGroups [HttpPost("api/customerorggroup/createcustomerorggroupincustomerorgregister")] public async Task CreateCustomerOrgGroupInCustomerOrgRegisterAsync(CreateCustomerOrgGroupInCustomerOrgRegisterDto input) { - + var createEntity = ObjectMapper.Map(input); var entity = await _manager.CreateAsync(input.IsMaxMedicalTimes, input.CustomerOrgRegisterId, input.CustomerOrgId, createEntity); @@ -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;