Browse Source

预约

master
DESKTOP-G961P6V\Zhh 1 year ago
parent
commit
ae9c7c234a
  1. 7
      src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs
  2. 4
      test/Shentun.WebPeis.Application.Tests/AppointPatientRegisterAppServiceTest.cs

7
src/Shentun.WebPeis.Application/AppointPatientRegisters/AppointPatientRegisterAppService.cs

@ -83,8 +83,8 @@ namespace Shentun.WebPeis.AppointPatientRegisters
return result;
}
[HttpPost("api/app/AppointPatientRegister/GetByIdNoOrMobilePhone")]
public async Task<List<AppointPatientRegisterDto>> GetByIdNoOrMobilePhoneAsync(IdNoOrMobilePhoneInputDto input)
[HttpPost("api/app/AppointPatientRegister/GetListByIdNoOrMobilePhone")]
public async Task<List<AppointPatientRegisterDto>> GetListByIdNoOrMobilePhoneAsync(IdNoOrMobilePhoneInputDto input)
{
if (input == null) throw new UserFriendlyException("参数不能为空");
@ -109,6 +109,7 @@ namespace Shentun.WebPeis.AppointPatientRegisters
on appointRegisterAsbitem.AsbitemId equals asbitem.AsbitemId
join customerOrg in await _customerOrgRepository.GetQueryableAsync()
on appointPatientRegister.CustomerOrgId equals customerOrg.CustomerOrgId
where appointPatientRegister.AppointDate >= DateTime.Now.Date.AddDays(-10)
orderby appointPatientRegister.AppointDate
select new
{
@ -130,7 +131,7 @@ namespace Shentun.WebPeis.AppointPatientRegisters
{
throw new UserFriendlyException("身份证长度必须是18位");
}
query = query.Where(o => o.person.IdNo == input.IdNo);
query = query.Where(o => o.person.IdNo == input.IdNo );
}
else

4
test/Shentun.WebPeis.Application.Tests/AppointPatientRegisterAppServiceTest.cs

@ -72,7 +72,7 @@ namespace Shentun.WebPeis
}
[Fact]
public async Task GetByIdNoOrMobilePhoneAsync()
public async Task GetListByIdNoOrMobilePhoneAsync()
{
using (var unitOfWork = _unitOfWorkManager.Begin(isTransactional: true))
{
@ -81,7 +81,7 @@ namespace Shentun.WebPeis
{
MobilePhone = "18911254911"
};
var list = await _appService.GetByIdNoOrMobilePhoneAsync(entity);
var list = await _appService.GetListByIdNoOrMobilePhoneAsync(entity);
foreach (var item in list)
{
_output.WriteLine(item.PersonName);

Loading…
Cancel
Save