Browse Source

体检登记

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
e079989a8b
  1. 70
      src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupForPatientRegisterDto.cs
  2. 43
      src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs
  3. 14
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

70
src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupForPatientRegisterDto.cs

@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Shentun.Peis.CustomerOrgGroups
{
public class CustomerOrgGroupForPatientRegisterDto
{
public Guid Id { get; set; }
/// <summary>
/// 分组名称
/// </summary>
public string DisplayName { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 适用性别
/// </summary>
public char ForSexId { get; set; }
/// <summary>
/// 适用婚姻状况
/// </summary>
public char MaritalStatusId { get; set; }
/// <summary>
/// 适用年龄下限
/// </summary>
public short AgeLowerLimit { get; set; }
/// <summary>
/// 适用年龄上限
/// </summary>
public short AgeUpperLimit { get; set; }
/// <summary>
/// 适用职务
/// </summary>
public string? JobPost { get; set; }
/// <summary>
/// 适用职称
/// </summary>
public string? JobTitle { get; set; }
/// <summary>
/// 显示顺序
/// </summary>
public int DisplayOrder { get; set; }
/// <summary>
/// 体检次数ID
/// </summary>
public Guid CustomerOrgRegisterId { get; set; }
}
}

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

@ -145,7 +145,50 @@ namespace Shentun.Peis.CustomerOrgGroups
}
[HttpPost("api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter")]
public async Task<List<CustomerOrgGroupForPatientRegisterDto>> GetListForPatentRegisterByFilterAsync(GetListDto input)
{
var oldlist = (await Repository.GetQueryableAsync()).
Include(x => x.CustomerOrgRegister).
Include(x => x.CustomerOrgRegister.CustomerOrg).AsEnumerable();
if (!string.IsNullOrEmpty(input.Filter))
oldlist = oldlist.Where(m => m.DisplayName.Contains(input.Filter));
if (input.CustomerOrgId != null && input.CustomerOrgId != Guid.Empty)
oldlist = oldlist.Where(m => m.CustomerOrgRegister.CustomerOrg.Id == input.CustomerOrgId);
if (input.CustomerOrgRegisterId != null && input.CustomerOrgRegisterId != Guid.Empty)
oldlist = oldlist.Where(m => m.CustomerOrgRegisterId == input.CustomerOrgRegisterId);
if (input.MedicalTimes != null)
oldlist = oldlist.Where(m => m.CustomerOrgRegister.MedicalTimes == input.MedicalTimes);
var entdto = oldlist.OrderBy(o => o.CustomerOrgRegister.CustomerOrg.DisplayOrder)
.ThenBy(o => o.CustomerOrgRegister.MedicalTimes)
.ThenBy(o => o.DisplayOrder)
.Select(s => new CustomerOrgGroupForPatientRegisterDto
{
Id = s.Id,
DisplayName = s.DisplayName,
DisplayOrder = s.DisplayOrder,
Price = s.Price,
ForSexId = s.ForSexId,
MaritalStatusId = s.MaritalStatusId,
JobTitle = s.JobTitle,
JobPost = s.JobPost,
AgeUpperLimit = s.AgeUpperLimit,
AgeLowerLimit = s.AgeLowerLimit,
CustomerOrgRegisterId = s.CustomerOrgRegisterId
}).OrderBy(m => m.DisplayOrder).ToList();
return entdto;
}
/// <summary>
/// 创建单位分组

14
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -220,8 +220,8 @@ namespace Shentun.Peis.PatientRegisters
var entdto = new PatientRegisterOrNoDto();
if (ent != null)
{
var userList = await _userRepository.GetListAsync();
var customerOrgList = await _customerOrgRepository.GetListAsync();
//var userList = await _userRepository.GetListAsync();
//var customerOrgList = await _customerOrgRepository.GetListAsync();
entdto = new PatientRegisterOrNoDto
{
@ -273,8 +273,8 @@ namespace Shentun.Peis.PatientRegisters
SummaryDate = DataHelper.ConversionDateToString(ent.SummaryDate),
SummaryDoctorId = ent.SummaryDoctorId,
ThirdInfo = ent.ThirdInfo,
CreatorName = EntityHelper.GetSurnameNoSql(userList, ent.CreatorId),
LastModifierName = EntityHelper.GetSurnameNoSql(userList, ent.LastModifierId),
CreatorName = _cacheService.GetSurnameAsync(ent.CreatorId).Result,
LastModifierName = _cacheService.GetSurnameAsync(ent.LastModifierId).Result,
Address = ent.Patient.Address, //档案表信息
BirthPlaceId = ent.Patient.BirthPlaceId,
DisplayName = ent.Patient.DisplayName,
@ -286,9 +286,9 @@ namespace Shentun.Peis.PatientRegisters
PatientPassword = ent.Patient.PatientPassword,
PostalCode = ent.Patient.PostalCode,
Telephone = ent.Patient.Telephone,
CustomerOrgName = EntityHelper.GetCustomerOrgNameNoSql(customerOrgList, ent.CustomerOrgId),
CustomerOrgParentId = EntityHelper.GetParentNoSql(customerOrgList, ent.CustomerOrgId),
CustomerOrgParentName = EntityHelper.GetCustomerOrgParentNameNoSql(customerOrgList, ent.CustomerOrgId)
CustomerOrgName = _cacheService.GetCustomerOrgNameAsync(ent.CustomerOrgId).Result,
CustomerOrgParentId = _cacheService.GetTopCustomerOrgAsync(ent.CustomerOrgId).Result.Id,
//CustomerOrgParentName = EntityHelper.GetCustomerOrgParentNameNoSql(customerOrgList, ent.CustomerOrgId)
};
}
return entdto;

Loading…
Cancel
Save