Browse Source

预约

master
DESKTOP-G961P6V\Zhh 1 year ago
parent
commit
2fb93865e4
  1. 2
      src/Shentun.WebPeis.Application/Persons/PersonAppService.cs
  2. 10
      src/Shentun.WebPeis.Application/QuestionRegisters/QuestionRegisterAppService.cs
  3. 2
      test/Shentun.WebPeis.Application.Tests/QuestionRegisterAppServiceTest.cs

2
src/Shentun.WebPeis.Application/Persons/PersonAppService.cs

@ -371,7 +371,7 @@ namespace Shentun.WebPeis.Persons
MaritalStatusName = _cacheService.GetMaritalStatusNameAsync(person.MaritalStatusId).Result,
IdNo = person.IdNo,
MobileTelephone = user.PhoneNumber,
IsHaveQuestionRegister = haveQuestionRegister==null? 'N':'Y'
IsHaveQuestionRegister = haveQuestionRegister.QuestionRegisterId == Guid.Empty ? 'N':'Y'
}).Distinct().ToList();

10
src/Shentun.WebPeis.Application/QuestionRegisters/QuestionRegisterAppService.cs

@ -64,11 +64,11 @@ namespace Shentun.WebPeis.QuestionRegisters
if (questionRegister == null)
{
//没有登记过
var questionRegisterEntity = new QuestionRegister();
questionRegisterEntity.PersonId = input.PersonId;
questionRegisterEntity = await _questionRegisterManager.CreateAsync(questionRegisterEntity);
await _repository.InsertAsync(questionRegisterEntity);
questionRegisterDto.QuestionRegisterId = questionRegisterEntity.QuestionRegisterId;
questionRegister = new QuestionRegister();
questionRegister.PersonId = input.PersonId;
questionRegister = await _questionRegisterManager.CreateAsync(questionRegister);
await _repository.InsertAsync(questionRegister);
questionRegisterDto.QuestionRegisterId = questionRegister.QuestionRegisterId;
await _unitOfWorkManager.Current.SaveChangesAsync();
//return questionRegisterDto;
}

2
test/Shentun.WebPeis.Application.Tests/QuestionRegisterAppServiceTest.cs

@ -38,7 +38,7 @@ namespace Shentun.WebPeis
var entity = await _appService.GetByPersonIdAsync(new PersonIdInputDto()
{
PersonId = new Guid("3a12d7fa-63f1-d549-c2f8-01123e5b7a8a")
PersonId = new Guid("3a12d72c-19d9-e8b2-71f6-cf283103e191") // 3a12d7fa-63f1-d549-c2f8-01123e5b7a8a
});
foreach (var item in entity.QuestionRegisterItems)
{

Loading…
Cancel
Save