From 60610cf9f2b3053708f9595d93285ae90f8f1c2f Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Wed, 13 Mar 2024 16:46:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BD=8D=E5=88=86=E7=BB=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerOrgGroups/CustomerOrgGroupDto.cs | 5 +++++ .../CustomerOrgGroupAppService.cs | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) 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;