diff --git a/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupForPatientRegisterDto.cs b/src/Shentun.Peis.Application.Contracts/CustomerOrgGroups/CustomerOrgGroupForPatientRegisterDto.cs
new file mode 100644
index 0000000..6515f39
--- /dev/null
+++ b/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; }
+ ///
+ /// 分组名称
+ ///
+ public string DisplayName { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; set; }
+
+
+ ///
+ /// 适用性别
+ ///
+ public char ForSexId { get; set; }
+
+
+ ///
+ /// 适用婚姻状况
+ ///
+ public char MaritalStatusId { get; set; }
+
+
+ ///
+ /// 适用年龄下限
+ ///
+ public short AgeLowerLimit { get; set; }
+
+
+ ///
+ /// 适用年龄上限
+ ///
+ public short AgeUpperLimit { get; set; }
+
+
+ ///
+ /// 适用职务
+ ///
+ public string? JobPost { get; set; }
+
+
+ ///
+ /// 适用职称
+ ///
+ public string? JobTitle { get; set; }
+
+
+
+
+
+ ///
+ /// 显示顺序
+ ///
+ 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 903fe47..fb6d973 100644
--- a/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs
+++ b/src/Shentun.Peis.Application/CustomerOrgGroups/CustomerOrgGroupAppService.cs
@@ -145,7 +145,50 @@ namespace Shentun.Peis.CustomerOrgGroups
}
+ [HttpPost("api/app/CustomerOrgGroup/GetListForPatentRegisterByFilter")]
+ public async Task> 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;
+
+
+ }
///
/// 创建单位分组
diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
index 3528201..51fc822 100644
--- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
+++ b/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;