|
|
@ -10,6 +10,7 @@ using System.Threading.Tasks; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp; |
|
|
using Volo.Abp.Domain.Repositories; |
|
|
using Volo.Abp.Domain.Repositories; |
|
|
using Volo.Abp.Domain.Services; |
|
|
using Volo.Abp.Domain.Services; |
|
|
|
|
|
using Volo.Abp.Identity; |
|
|
using Volo.Abp.Users; |
|
|
using Volo.Abp.Users; |
|
|
|
|
|
|
|
|
namespace Shentun.Peis.RegisterChecks |
|
|
namespace Shentun.Peis.RegisterChecks |
|
|
@ -25,6 +26,8 @@ namespace Shentun.Peis.RegisterChecks |
|
|
private readonly IRepository<SysParmValue> _sysParmValueRepository; |
|
|
private readonly IRepository<SysParmValue> _sysParmValueRepository; |
|
|
private readonly IRepository<CustomerOrg, Guid> _customerOrgRepository; |
|
|
private readonly IRepository<CustomerOrg, Guid> _customerOrgRepository; |
|
|
private readonly IRepository<PrimarykeyBuilder> _primarykeyBuilderRepository; |
|
|
private readonly IRepository<PrimarykeyBuilder> _primarykeyBuilderRepository; |
|
|
|
|
|
private readonly IRepository<IdentityUser, Guid> _usersRepository; |
|
|
|
|
|
private readonly IRepository<IdentityUserOrganizationUnit> _identityUserOrganizationUnitRepository; |
|
|
private readonly RegisterCheckSummaryManager _registerCheckSummaryManager; |
|
|
private readonly RegisterCheckSummaryManager _registerCheckSummaryManager; |
|
|
private readonly RegisterCheckSuggestionManager _registerCheckSuggestionManager; |
|
|
private readonly RegisterCheckSuggestionManager _registerCheckSuggestionManager; |
|
|
private readonly CurrentUser _currentUser; |
|
|
private readonly CurrentUser _currentUser; |
|
|
@ -37,7 +40,9 @@ namespace Shentun.Peis.RegisterChecks |
|
|
IRepository<RegisterCheckItem> registerCheckItemRepository, |
|
|
IRepository<RegisterCheckItem> registerCheckItemRepository, |
|
|
RegisterCheckSummaryManager registerCheckSummaryManager, |
|
|
RegisterCheckSummaryManager registerCheckSummaryManager, |
|
|
RegisterCheckSuggestionManager registerCheckSuggestionManager, |
|
|
RegisterCheckSuggestionManager registerCheckSuggestionManager, |
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository) |
|
|
|
|
|
|
|
|
IRepository<PatientRegister, Guid> patientRegisterRepository, |
|
|
|
|
|
IRepository<IdentityUser, Guid> usersRepository, |
|
|
|
|
|
IRepository<IdentityUserOrganizationUnit> identityUserOrganizationUnitRepository) |
|
|
{ |
|
|
{ |
|
|
this._registerCheckRepository = registerCheckRepository; |
|
|
this._registerCheckRepository = registerCheckRepository; |
|
|
this._sysParmValueRepository = sysParmValueRepository; |
|
|
this._sysParmValueRepository = sysParmValueRepository; |
|
|
@ -48,6 +53,8 @@ namespace Shentun.Peis.RegisterChecks |
|
|
this._registerCheckSummaryManager = registerCheckSummaryManager; |
|
|
this._registerCheckSummaryManager = registerCheckSummaryManager; |
|
|
this._registerCheckSuggestionManager = registerCheckSuggestionManager; |
|
|
this._registerCheckSuggestionManager = registerCheckSuggestionManager; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
_patientRegisterRepository = patientRegisterRepository; |
|
|
|
|
|
_usersRepository = usersRepository; |
|
|
|
|
|
_identityUserOrganizationUnitRepository = identityUserOrganizationUnitRepository; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -152,6 +159,11 @@ namespace Shentun.Peis.RegisterChecks |
|
|
entity.CheckDate = DateTime.Now; |
|
|
entity.CheckDate = DateTime.Now; |
|
|
else |
|
|
else |
|
|
entity.CheckDate = entitydto.CheckDate; |
|
|
entity.CheckDate = entitydto.CheckDate; |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(entitydto.CheckDoctorId)) |
|
|
|
|
|
{ |
|
|
|
|
|
entitydto.CheckDoctorId = _currentUser.Id.ToString(); |
|
|
|
|
|
} |
|
|
entity.CheckDoctorId = entitydto.CheckDoctorId; |
|
|
entity.CheckDoctorId = entitydto.CheckDoctorId; |
|
|
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; |
|
|
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; |
|
|
|
|
|
|
|
|
@ -161,7 +173,8 @@ namespace Shentun.Peis.RegisterChecks |
|
|
PatientRegister patientRegister, |
|
|
PatientRegister patientRegister, |
|
|
RegisterCheck entity, |
|
|
RegisterCheck entity, |
|
|
string checkDoctorId, |
|
|
string checkDoctorId, |
|
|
DateTime? checkDate |
|
|
|
|
|
|
|
|
DateTime? checkDate, |
|
|
|
|
|
Guid? execOrganizationUnitId |
|
|
) |
|
|
) |
|
|
{ |
|
|
{ |
|
|
if (entity == null) |
|
|
if (entity == null) |
|
|
@ -185,8 +198,24 @@ namespace Shentun.Peis.RegisterChecks |
|
|
else |
|
|
else |
|
|
entity.CheckDate = checkDate; |
|
|
entity.CheckDate = checkDate; |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(checkDoctorId)) |
|
|
|
|
|
{ |
|
|
|
|
|
checkDoctorId = _currentUser.Id.ToString(); |
|
|
|
|
|
} |
|
|
entity.CheckDoctorId = checkDoctorId; |
|
|
entity.CheckDoctorId = checkDoctorId; |
|
|
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; |
|
|
entity.CompleteFlag = RegisterCheckCompleteFlag.Checked; |
|
|
|
|
|
if(execOrganizationUnitId != null && execOrganizationUnitId != Guid.Empty) |
|
|
|
|
|
{ |
|
|
|
|
|
entity.ExecOrganizationUnitId = execOrganizationUnitId; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
if(Guid.TryParse(entity.CheckDoctorId,out var checkDoctorIdGuid)) |
|
|
|
|
|
{ |
|
|
|
|
|
var identityUserOrganizationUnit = _identityUserOrganizationUnitRepository.GetAsync(o => o.UserId == checkDoctorIdGuid).Result; |
|
|
|
|
|
entity.ExecOrganizationUnitId = identityUserOrganizationUnit.OrganizationUnitId; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 更改危警值内容
|
|
|
/// 更改危警值内容
|
|
|
|