From 51819c9438e9b59fad2e6c456615cb76296ef179 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Thu, 17 Oct 2024 15:07:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=99=BB=E8=AE=B0=E8=BD=AC=E6=AD=A3?= =?UTF-8?q?=E5=BC=8F=E7=99=BB=E8=AE=B0=E6=9B=B4=E6=96=B0=E7=99=BB=E8=AE=B0?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientRegisterAppService.cs | 30 +++++++++++++++++++ .../PatientRegisters/PatientRegister.cs | 9 ++++++ .../appsettings.json | 10 +++---- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs index 12d805c..d1fe1a2 100644 --- a/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs +++ b/src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs @@ -970,9 +970,26 @@ namespace Shentun.Peis.PatientRegisters else { entity = await Repository.GetAsync((Guid)input.PatientRegisterId); + char oldCompleteFlag = entity.CompleteFlag; //更新前状态 await _manager.UpdateAsync(updatePatientRegisterArg, entity); createRegisterCheckAsbitemEntity = await _registerAsbitemManager.UpdateManyAsync(entity, registerAsbitems); + #region 预登记转正式登记修改登记者ID + + string goRegisterIsUpdateRegisterPerson = await _sysParmValueManager.GetSysParmValueAsync(Guid.Empty, "go_register_is_update_register_person"); + if (goRegisterIsUpdateRegisterPerson == "1") + { + if (oldCompleteFlag == PatientRegisterCompleteFlag.PreRegistration + && entity.CompleteFlag == PatientRegisterCompleteFlag.Registration + && _currentUser.Id != null) + { + //判断是预登记转正式登记 + entity.UpdateCreatorId(_currentUser.Id.Value); + } + } + + #endregion + await _repository.UpdateAsync(entity); #region 扩展表 @@ -3741,6 +3758,19 @@ namespace Shentun.Peis.PatientRegisters { f.PatientRegisterNo = _manager.CreatePatientRegisterNo(f.MedicalCenterId).Result; } + #region 预登记转正式登记修改登记者ID + + string goRegisterIsUpdateRegisterPerson = _sysParmValueManager.GetSysParmValueAsync(Guid.Empty, "go_register_is_update_register_person").GetAwaiter().GetResult(); + if (goRegisterIsUpdateRegisterPerson == "1") + { + if (_currentUser.Id != null) + { + //判断是预登记转正式登记 + f.UpdateCreatorId(_currentUser.Id.Value); + } + } + + #endregion } f.CompleteFlag = input.CompleteFlag.Value; } diff --git a/src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs b/src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs index 7771677..33c6ffc 100644 --- a/src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs +++ b/src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs @@ -324,6 +324,15 @@ namespace Shentun.Peis.Models [Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; } + /// + /// 修改登记人 + /// + /// + public void UpdateCreatorId(Guid id) + { + CreatorId = id; + } + //[Column("concurrency_stamp")] //[StringLength(40)] diff --git a/src/Shentun.Peis.HttpApi.Host/appsettings.json b/src/Shentun.Peis.HttpApi.Host/appsettings.json index 28b7315..3c40990 100644 --- a/src/Shentun.Peis.HttpApi.Host/appsettings.json +++ b/src/Shentun.Peis.HttpApi.Host/appsettings.json @@ -5,20 +5,20 @@ "CorsOrigins": "https://*.Peis.com,http://localhost:4200,http://localhost:9530,http://192.168.1.108:9530,http://localhost:8080,http://localhost:8081", "RedirectAllowedUrls": "http://localhost:9530", "SelfUser": "admin", - "SelfPassword": "666666", + "SelfPassword": "Shentun!@#qwe123", "LisUser": "admin", - "LisPassword": "666666" + "LisPassword": "Shentun!@#qwe123" }, "ConnectionStrings": { //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis070703;User ID=postgres;Password=shentun123;" - //"Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis240701;User ID=postgres;Password=shentun123;" - "Default": "Host=192.168.2.67;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" + "Default": "Host=140.143.162.39;Port=5432;Database=ShentunPeis240701;User ID=postgres;Password=shentun123;" + //"Default": "Host=192.168.2.67;Port=5432;Database=ShentunPeis;User ID=postgres;Password=st123;" }, "AuthServer": { "Authority": "http://localhost:9530", "RequireHttpsMetadata": "false", "SwaggerClientId": "localhost_Swagger", - "IssuerBase": "http://140.143.162.39:9529" + "IssuerBase": "http://localhost:9530" }, "StringEncryption": { "DefaultPassPhrase": "ROCjBbDQK9rNq82v"