From be827adf942d4fa8545b459d72511ea71d811462 Mon Sep 17 00:00:00 2001 From: wxd <123@qq.com> Date: Wed, 5 Jun 2024 11:22:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=A3=80=E6=9F=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UpdateCheckNoInputDto.cs | 20 +++++++++++ .../ThirdPartyPublicInterfaceAppService.cs | 33 ++++++++++++++++++- .../Filter/CustomerActionFilterAttribute.cs | 2 +- .../CustomerExceptionFilterAttribute.cs | 2 +- 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 src/Shentun.Peis.Application.Contracts/ThirdPartyPublicInterfaces/UpdateCheckNoInputDto.cs diff --git a/src/Shentun.Peis.Application.Contracts/ThirdPartyPublicInterfaces/UpdateCheckNoInputDto.cs b/src/Shentun.Peis.Application.Contracts/ThirdPartyPublicInterfaces/UpdateCheckNoInputDto.cs new file mode 100644 index 0000000..26c9cd7 --- /dev/null +++ b/src/Shentun.Peis.Application.Contracts/ThirdPartyPublicInterfaces/UpdateCheckNoInputDto.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Shentun.Peis.ThirdPartyPublicInterfaces +{ + public class UpdateCheckNoInputDto + { + /// + /// 体检编号 + /// + public string tjbh { get; set; } + + /// + /// 1 登记 0 取消登记 + /// + public string zxpb { get; set; } + + } +} diff --git a/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs b/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs index 7f95956..709b32b 100644 --- a/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs +++ b/src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs @@ -362,7 +362,8 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces CheckRequestNo = registerCheck.CheckRequestNo, asbitem, ItemTypeName = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.DisplayName : "", - ItemTypeId = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.Id.ToString() : "" + ItemTypeId = itemTypeHaveEmpty != null ? itemTypeHaveEmpty.Id.ToString() : "", + IsSignIn = registerCheck.IsSignIn }); @@ -391,6 +392,9 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces if (queryList.Count() == 0) throw new UserFriendlyException($"体检编号不存在"); + if (queryList.FirstOrDefault().IsSignIn == 'Y') + throw new UserFriendlyException($"体检编号已登记"); + var patientInfo = new PatientPacsInfo_PatientInfoDto { addr = "", @@ -424,5 +428,32 @@ namespace Shentun.Peis.ThirdPartyPublicInterfaces }; } + + /// + /// 更新检查单签收状态 + /// + /// + [HttpPost("api/Third/ThirdPartyPublicInterface/UpdateCheckNoState")] + public async Task UpdateCheckNoStateAsync(UpdateCheckNoInputDto input) + { + + var registerCheck = await _registerCheckRepository.FirstOrDefaultAsync(f => f.CheckRequestNo == input.tjbh); + if (registerCheck == null) + throw new UserFriendlyException($"体检编号不存在"); + + if (input.zxpb == "1") + { + registerCheck.IsSignIn = 'Y'; + registerCheck.SignInTime = DateTime.Now; + } + else if (input.zxpb == "0") + { + registerCheck.IsSignIn = 'N'; + registerCheck.SignInTime = DateTime.Now; + } + + await _registerCheckRepository.UpdateAsync(registerCheck); + } + } } diff --git a/src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs b/src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs index 7cc99d9..670ab54 100644 --- a/src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs +++ b/src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs @@ -57,7 +57,7 @@ namespace Shentun.Peis else { - List filterApiUrl = new List { "/api/third/thirdpartypublicinterface/getpatientitems" }; + List filterApiUrl = new List { "/api/third/thirdpartypublicinterface/getpatientitems", "api/third/thirdpartypublicinterface/updatechecknostate" }; if (filterApiUrl.Contains(context.HttpContext.Request.Path.ToString().ToLower())) { diff --git a/src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs b/src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs index 542cf55..595486c 100644 --- a/src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs +++ b/src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs @@ -87,7 +87,7 @@ namespace Shentun.Peis } - List filterApiUrl = new List { "/api/third/thirdpartypublicinterface/getpatientitems" }; + List filterApiUrl = new List { "/api/third/thirdpartypublicinterface/getpatientitems", "api/third/thirdpartypublicinterface/updatechecknostate" }; if (filterApiUrl.Contains(exceptionContext.HttpContext.Request.Path.ToString().ToLower()))