Browse Source

同步检查单

bjmzak
wxd 2 years ago
parent
commit
be827adf94
  1. 20
      src/Shentun.Peis.Application.Contracts/ThirdPartyPublicInterfaces/UpdateCheckNoInputDto.cs
  2. 33
      src/Shentun.Peis.Application/ThirdPartyPublicInterfaces/ThirdPartyPublicInterfaceAppService.cs
  3. 2
      src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs
  4. 2
      src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs

20
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
{
/// <summary>
/// 体检编号
/// </summary>
public string tjbh { get; set; }
/// <summary>
/// 1 登记 0 取消登记
/// </summary>
public string zxpb { get; set; }
}
}

33
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
};
}
/// <summary>
/// 更新检查单签收状态
/// </summary>
/// <returns></returns>
[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);
}
}
}

2
src/Shentun.Peis.HttpApi.Host/Filter/CustomerActionFilterAttribute.cs

@ -57,7 +57,7 @@ namespace Shentun.Peis
else
{
List<string> filterApiUrl = new List<string> { "/api/third/thirdpartypublicinterface/getpatientitems" };
List<string> filterApiUrl = new List<string> { "/api/third/thirdpartypublicinterface/getpatientitems", "api/third/thirdpartypublicinterface/updatechecknostate" };
if (filterApiUrl.Contains(context.HttpContext.Request.Path.ToString().ToLower()))
{

2
src/Shentun.Peis.HttpApi.Host/Filter/CustomerExceptionFilterAttribute.cs

@ -87,7 +87,7 @@ namespace Shentun.Peis
}
List<string> filterApiUrl = new List<string> { "/api/third/thirdpartypublicinterface/getpatientitems" };
List<string> filterApiUrl = new List<string> { "/api/third/thirdpartypublicinterface/getpatientitems", "api/third/thirdpartypublicinterface/updatechecknostate" };
if (filterApiUrl.Contains(exceptionContext.HttpContext.Request.Path.ToString().ToLower()))

Loading…
Cancel
Save