Browse Source

RegisterCheckAsbitem

bjmzak
DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
2d41802340
  1. 4
      src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs
  2. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CancelMergeRegisterCheckAsbitemDto.cs
  3. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemDto.cs
  4. 4
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemInCustomerOrgManyDto.cs
  5. 4
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemManyDto.cs
  6. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/DeleteRegisterCheckAsbitemInCustomerOrgManyDto.cs
  7. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/DeleteRegisterCheckAsbitemManyDto.cs
  8. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetMergeRegisterCheckAsbitemListDto.cs
  9. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetRegisterCheckAsbitemCheckStatusRequestDto.cs
  10. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetRegisterCheckAsbitemCheckStatusResultDto.cs
  11. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/MergeRegisterCheckAsbitemDto.cs
  12. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemChargeBackDto.cs
  13. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemChargeDto.cs
  14. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemCheckChargeRequestDto.cs
  15. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemDto.cs
  16. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemOrAsbitemDto.cs
  17. 2
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/UpdateRegisterCheckAsbitemDto.cs
  18. 4
      src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/UpdateRegisterCheckAsbitemManyDto.cs
  19. 2
      src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs
  20. 6
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  21. 86
      src/Shentun.Peis.Application/RegisterCheckAsbitems/RegisterCheckAsbitemAppService.cs
  22. 2
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckAsbitems/RegisterCheckAsbitemDbMapping.cs
  23. 2
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs
  24. 8
      test/Shentun.Peis.Application.Tests/RegisterCheckAsbitemAppServiceTest.cs

4
src/Shentun.Peis.Application.Contracts/PatientRegisters/CreatePatientRegisterDto.cs

@ -245,10 +245,10 @@ namespace Shentun.Peis.PatientRegisters
#endregion
public List<CreateRegisterAsbitemDto> RegisterAsbitems { get; set; }
public List<CreateRegisterCheckAsbitemDto> RegisterAsbitems { get; set; }
public CreatePatientRegisterDto()
{
RegisterAsbitems = new List<CreateRegisterAsbitemDto>();
RegisterAsbitems = new List<CreateRegisterCheckAsbitemDto>();
}
}
}

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/CancelMergeRegisterAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CancelMergeRegisterCheckAsbitemDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class CancelMergeRegisterAsbitemDto
public class CancelMergeRegisterCheckAsbitemDto
{
/// <summary>
/// RegisterCheckIds 集合

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/CreateRegisterAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemDto.cs

@ -5,7 +5,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class CreateRegisterAsbitemDto
public class CreateRegisterCheckAsbitemDto
{
/// <summary>
/// 组合项目

4
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/CreateRegisterAsbitemInCustomerOrgManyDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemInCustomerOrgManyDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class CreateRegisterAsbitemInCustomerOrgManyDto
public class CreateRegisterCheckAsbitemInCustomerOrgManyDto
{
/// <summary>
/// 体检中心ID
@ -14,6 +14,6 @@ namespace Shentun.Peis.RegisterAsbitems
/// <summary>
/// RegisterAsbitem信息
/// </summary>
public List<CreateRegisterAsbitemDto> createRegisterAsbitemDtos { get; set;}
public List<CreateRegisterCheckAsbitemDto> createRegisterAsbitemDtos { get; set;}
}
}

4
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/CreateRegisterAsbitemManyDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/CreateRegisterCheckAsbitemManyDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class CreateRegisterAsbitemManyDto
public class CreateRegisterCheckAsbitemManyDto
{
/// <summary>
/// 体检中心ID
@ -14,7 +14,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <summary>
///
/// </summary>
public List<CreateRegisterAsbitemDto> RegisterAsbitems { get; set; }
public List<CreateRegisterCheckAsbitemDto> RegisterAsbitems { get; set; }
/// <summary>
/// 是否需要启用自动合并项目逻辑(Y N) 默认合并Y

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/DeleteRegisterAsbitemInCustomerOrgManyDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/DeleteRegisterCheckAsbitemInCustomerOrgManyDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class DeleteRegisterAsbitemInCustomerOrgManyDto
public class DeleteRegisterCheckAsbitemInCustomerOrgManyDto
{
/// <summary>
/// 是否删除登记的分组(Y/N)

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/DeleteRegisterAsbitemManyDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/DeleteRegisterCheckAsbitemManyDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class DeleteRegisterAsbitemManyDto
public class DeleteRegisterCheckAsbitemManyDto
{
public List<Guid> RegisterAsbitemIds { get; set; }
}

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/GetMergeRegisterAsbitemListDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetMergeRegisterCheckAsbitemListDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class GetMergeRegisterAsbitemListDto
public class GetMergeRegisterCheckAsbitemListDto
{
public Guid RegisterAsbitemId { get; set; }

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/GetRegisterAsbitemCheckStatusRequestDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetRegisterCheckAsbitemCheckStatusRequestDto.cs

@ -9,7 +9,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <summary>
/// 请求参数
/// </summary>
public class GetRegisterAsbitemCheckStatusRequestDto
public class GetRegisterCheckAsbitemCheckStatusRequestDto
{
/// <summary>
/// 单位ID 需要遍历找下级的ID

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/GetRegisterAsbitemCheckStatusResultDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/GetRegisterCheckAsbitemCheckStatusResultDto.cs

@ -9,7 +9,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <summary>
/// 返回参数
/// </summary>
public class GetRegisterAsbitemCheckStatusResultDto
public class GetRegisterCheckAsbitemCheckStatusResultDto
{
/// <summary>
/// 组合项目名称

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/MergeRegisterAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/MergeRegisterCheckAsbitemDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class MergeRegisterAsbitemDto
public class MergeRegisterCheckAsbitemDto
{
/// <summary>
/// 包含所有新旧一起

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/RegisterAsbitemChargeBackDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemChargeBackDto.cs

@ -6,7 +6,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class RegisterAsbitemChargeBackDto
public class RegisterCheckAsbitemChargeBackDto
{
/// <summary>
/// 收据号

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/RegisterAsbitemChargeDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemChargeDto.cs

@ -4,7 +4,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class RegisterAsbitemChargeDto
public class RegisterCheckAsbitemChargeDto
{
/// <summary>
/// 状态 1.成功 -1 失败

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/RegisterAsbitemChargeRequestDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemCheckChargeRequestDto.cs

@ -5,7 +5,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class RegisterAsbitemChargeRequestDto
public class RegisterCheckAsbitemCheckChargeRequestDto
{
/// <summary>
/// 登记主表ID

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/RegisterAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemDto.cs

@ -6,7 +6,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class RegisterAsbitemDto:AuditedEntityDtoName
public class RegisterCheckAsbitemDto:AuditedEntityDtoName
{
/// <summary>
/// 组合项目

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/RegisterAsbitemOrAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/RegisterCheckAsbitemOrAsbitemDto.cs

@ -6,7 +6,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class RegisterAsbitemOrAsbitemDto : AuditedEntityDtoName
public class RegisterCheckAsbitemOrAsbitemDto : AuditedEntityDtoName
{
/// <summary>
/// 组合项目

2
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/UpdateRegisterAsbitemDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/UpdateRegisterCheckAsbitemDto.cs

@ -5,7 +5,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class UpdateRegisterAsbitemDto
public class UpdateRegisterCheckAsbitemDto
{
/// <summary>
/// 实收价格

4
src/Shentun.Peis.Application.Contracts/RegisterAsbitems/UpdateRegisterAsbitemManyDto.cs → src/Shentun.Peis.Application.Contracts/RegisterCheckAsbitems/UpdateRegisterCheckAsbitemManyDto.cs

@ -5,7 +5,7 @@ using System.Text;
namespace Shentun.Peis.RegisterAsbitems
{
public class UpdateRegisterAsbitemManyDto
public class UpdateRegisterCheckAsbitemManyDto
{
/// <summary>
/// 检查组合项目记录ID
@ -15,6 +15,6 @@ namespace Shentun.Peis.RegisterAsbitems
/// <summary>
/// 更新内容
/// </summary>
public UpdateRegisterAsbitemDto input { get; set; }
public UpdateRegisterCheckAsbitemDto input { get; set; }
}
}

2
src/Shentun.Peis.Application/PatientRegisters/PatientRegisterAppService.cs

@ -575,7 +575,7 @@ namespace Shentun.Peis.PatientRegisters
var createEntity = ObjectMapper.Map<CreatePatientRegisterDto, PatientRegister>(input);
var createPatientEntity = ObjectMapper.Map<CreatePatientRegisterDto, Patient>(input);
var registerAsbitems = ObjectMapper.Map<List<CreateRegisterAsbitemDto>, List<RegisterCheckAsbitem>>(input.RegisterAsbitems);
var registerAsbitems = ObjectMapper.Map<List<CreateRegisterCheckAsbitemDto>, List<RegisterCheckAsbitem>>(input.RegisterAsbitems);
//创建人员信息
Patient patient = null;
if (createEntity.PatientId == Guid.Empty)

6
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -362,9 +362,9 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<RegisterCheckAsbitem, RegisterAsbitemDto>();
CreateMap<CreateRegisterAsbitemDto, RegisterCheckAsbitem>();
CreateMap<UpdateRegisterAsbitemDto, RegisterCheckAsbitem>();
CreateMap<RegisterCheckAsbitem, RegisterCheckAsbitemDto>();
CreateMap<CreateRegisterCheckAsbitemDto, RegisterCheckAsbitem>();
CreateMap<UpdateRegisterCheckAsbitemDto, RegisterCheckAsbitem>();
CreateMap<ForSex, ForSexDto>();
CreateMap<UpdateForSexDto, ForSex>();

86
src/Shentun.Peis.Application/RegisterAsbitems/RegisterAsbitemAppService.cs → src/Shentun.Peis.Application/RegisterCheckAsbitems/RegisterCheckAsbitemAppService.cs

@ -32,10 +32,10 @@ namespace Shentun.Peis.RegisterAsbitems
/// </summary>
[ApiExplorerSettings(GroupName = "Work")]
[Authorize]
public class RegisterAsbitemAppService : ApplicationService
public class RegisterCheckAsbitemAppService : ApplicationService
{
private readonly IRepository<IdentityUser, Guid> _userRepository;
private readonly IRepository<RegisterCheckAsbitem, Guid> _registerAsbitemRepository;
private readonly IRepository<RegisterCheckAsbitem, Guid> _registerCheckAsbitemRepository;
private readonly IRepository<Asbitem, Guid> _asbitemRepository;
private readonly IRepository<ItemType, Guid> _itemTypeRepository;
private readonly IRepository<RegisterCheck, Guid> _registerCheckRepository;
@ -57,7 +57,7 @@ namespace Shentun.Peis.RegisterAsbitems
private readonly RegisterCheckAsbitemManager _registerAsbitemManager;
private readonly CardBillManager _cardBillManager;
private readonly CacheService _cacheService;
public RegisterAsbitemAppService(
public RegisterCheckAsbitemAppService(
IRepository<IdentityUser, Guid> userRepository,
IRepository<RegisterCheckAsbitem, Guid> registerAsbitemRepository,
IRepository<Asbitem, Guid> asbitemRepository,
@ -83,7 +83,7 @@ namespace Shentun.Peis.RegisterAsbitems
CacheService cacheService)
{
this._userRepository = userRepository;
this._registerAsbitemRepository = registerAsbitemRepository;
this._registerCheckAsbitemRepository = registerAsbitemRepository;
this._asbitemRepository = asbitemRepository;
this._itemTypeRepository = itemTypeRepository;
this._registerCheckRepository = registerCheckRepository;
@ -143,9 +143,9 @@ namespace Shentun.Peis.RegisterAsbitems
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("api/app/registerasbitem/createregisterasbitemmany")]
public async Task<List<RegisterAsbitemDto>> CreateRegisterAsbitemManyAsync(CreateRegisterAsbitemManyDto input)
public async Task<List<RegisterCheckAsbitemDto>> CreateRegisterAsbitemManyAsync(CreateRegisterCheckAsbitemManyDto input)
{
var createList = ObjectMapper.Map<List<CreateRegisterAsbitemDto>, List<RegisterCheckAsbitem>>(input.RegisterAsbitems);
var createList = ObjectMapper.Map<List<CreateRegisterCheckAsbitemDto>, List<RegisterCheckAsbitem>>(input.RegisterAsbitems);
if (!createList.Any())
throw new UserFriendlyException($"请求参数为空");
@ -157,7 +157,7 @@ namespace Shentun.Peis.RegisterAsbitems
dtolist.Add(await _registerAsbitemManager.CreateAsync(input.OrganizationUnitId, entity, input.IsAutoMerger == 'Y' ? true : false));
}
return ObjectMapper.Map<List<RegisterCheckAsbitem>, List<RegisterAsbitemDto>>(dtolist);
return ObjectMapper.Map<List<RegisterCheckAsbitem>, List<RegisterCheckAsbitemDto>>(dtolist);
}
@ -182,7 +182,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/deletemany")]
public async Task DeleteManyAsync(DeleteRegisterAsbitemManyDto input)
public async Task DeleteManyAsync(DeleteRegisterCheckAsbitemManyDto input)
{
if (!input.RegisterAsbitemIds.Any())
throw new UserFriendlyException($"请求参数为空");
@ -199,20 +199,20 @@ namespace Shentun.Peis.RegisterAsbitems
/// <returns></returns>
[HttpPost("api/app/registerasbitem/update")]
[RemoteService(false)]
public async Task<RegisterAsbitemDto> UpdateAsync(Guid RegisterAsbitemId, UpdateRegisterAsbitemDto input)
public async Task<RegisterCheckAsbitemDto> UpdateAsync(Guid RegisterAsbitemId, UpdateRegisterCheckAsbitemDto input)
{
var oldent = await _registerAsbitemRepository.GetAsync(RegisterAsbitemId);
var oldent = await _registerCheckAsbitemRepository.GetAsync(RegisterAsbitemId);
if (oldent == null)
{
throw new UserFriendlyException($"请求参数有误");
}
var dtoent = ObjectMapper.Map<UpdateRegisterAsbitemDto, RegisterCheckAsbitem>(input);
var dtoent = ObjectMapper.Map<UpdateRegisterCheckAsbitemDto, RegisterCheckAsbitem>(input);
_registerAsbitemManager.UpdateAsync(dtoent, oldent);
var newent = await _registerAsbitemRepository.UpdateAsync(oldent);
var newent = await _registerCheckAsbitemRepository.UpdateAsync(oldent);
return ObjectMapper.Map<RegisterCheckAsbitem, RegisterAsbitemDto>(newent);
return ObjectMapper.Map<RegisterCheckAsbitem, RegisterCheckAsbitemDto>(newent);
}
@ -224,7 +224,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <returns></returns>
/// <exception cref="UserFriendlyException"></exception>
[HttpPost("api/app/registerasbitem/updatemany")]
public async Task<List<RegisterAsbitemDto>> UpdateManyAsync(List<UpdateRegisterAsbitemManyDto> inputlist)
public async Task<List<RegisterCheckAsbitemDto>> UpdateManyAsync(List<UpdateRegisterCheckAsbitemManyDto> inputlist)
{
if (!inputlist.Any())
@ -234,21 +234,21 @@ namespace Shentun.Peis.RegisterAsbitems
foreach (var item in inputlist)
{
var oldent = await _registerAsbitemRepository.GetAsync(item.RegisterAsbitemId);
var oldent = await _registerCheckAsbitemRepository.GetAsync(item.RegisterAsbitemId);
if (oldent == null)
{
throw new UserFriendlyException($"请求参数有误");
}
var dtoent = new RegisterCheckAsbitem();
dtoent = ObjectMapper.Map<UpdateRegisterAsbitemDto, RegisterCheckAsbitem>(item.input);
dtoent = ObjectMapper.Map<UpdateRegisterCheckAsbitemDto, RegisterCheckAsbitem>(item.input);
_registerAsbitemManager.UpdateAsync(dtoent, oldent);
updatemany.Add(oldent);
}
await _registerAsbitemRepository.UpdateManyAsync(updatemany, true);
await _registerCheckAsbitemRepository.UpdateManyAsync(updatemany, true);
return ObjectMapper.Map<List<RegisterCheckAsbitem>, List<RegisterAsbitemDto>>(updatemany);
return ObjectMapper.Map<List<RegisterCheckAsbitem>, List<RegisterCheckAsbitemDto>>(updatemany);
}
@ -259,16 +259,16 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="PatientRegisterId">人员登记表ID</param>
/// <returns></returns>
[HttpGet("api/app/registerasbitem/getlistinpatientregisterid")]
public async Task<List<RegisterAsbitemOrAsbitemDto>> GetListInPatientRegisterIdAsync(Guid PatientRegisterId)
public async Task<List<RegisterCheckAsbitemOrAsbitemDto>> GetListInPatientRegisterIdAsync(Guid PatientRegisterId)
{
var entlist = (await _registerAsbitemRepository.GetQueryableAsync())
var entlist = (await _registerCheckAsbitemRepository.GetQueryableAsync())
.Include(x => x.Asbitem)
.Include(x => x.Asbitem.ItemType)
.Include(x => x.RegisterCheck)
.Where(m => m.PatientRegisterId == PatientRegisterId).ToList().OrderByDescending(o => o.GroupPackageId).ThenBy(o => o.Asbitem.DisplayOrder);
var entdto = entlist.Select(s => new RegisterAsbitemOrAsbitemDto
var entdto = entlist.Select(s => new RegisterCheckAsbitemOrAsbitemDto
{
Discount = s.StandardPrice == 0 ? 100 : Math.Round(Convert.ToDecimal(s.ChargePrice * 100 / s.StandardPrice), 2),
IsLock = s.RegisterCheck.IsLock,
@ -308,7 +308,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/createregisterasbitemincustomerorgmany")]
public async Task<ResultDto> CreateRegisterAsbitemInCustomerOrgManyAsync(CreateRegisterAsbitemInCustomerOrgManyDto input)
public async Task<ResultDto> CreateRegisterAsbitemInCustomerOrgManyAsync(CreateRegisterCheckAsbitemInCustomerOrgManyDto input)
{
ResultDto msg;
@ -348,7 +348,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/deleteregisterasbitemincustomerorgmany")]
public async Task<ResultDto> DeleteRegisterAsbitemInCustomerOrgManyAsync(DeleteRegisterAsbitemInCustomerOrgManyDto input)
public async Task<ResultDto> DeleteRegisterAsbitemInCustomerOrgManyAsync(DeleteRegisterCheckAsbitemInCustomerOrgManyDto input)
{
if (input == null || input.PatientRegisterId == Guid.Empty || !input.AsbitemIds.Any())
{
@ -373,13 +373,13 @@ namespace Shentun.Peis.RegisterAsbitems
}
var registerAsbitemList = await _registerAsbitemRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId);
var registerAsbitemList = await _registerCheckAsbitemRepository.GetListAsync(m => m.PatientRegisterId == input.PatientRegisterId);
#region 删除组合项目
foreach (var item in registerAsbitemList.Where(m => input.AsbitemIds.Contains(m.AsbitemId)))
{
await _registerAsbitemManager.CheckIsDelete(item.Id);
await _registerAsbitemRepository.DeleteAsync(item);
await _registerCheckAsbitemRepository.DeleteAsync(item);
}
#endregion
@ -394,7 +394,7 @@ namespace Shentun.Peis.RegisterAsbitems
//清空剩余registerasbitem分组信息
var registerAsbitemList_update = registerAsbitemList.Where(m => !input.AsbitemIds.Contains(m.AsbitemId)).ToList();
registerAsbitemList_update.ForEach(f => f.GroupPackageId = null);
await _registerAsbitemRepository.UpdateManyAsync(registerAsbitemList_update);
await _registerCheckAsbitemRepository.UpdateManyAsync(registerAsbitemList_update);
//清空PatientRegister分组信息
@ -419,13 +419,13 @@ namespace Shentun.Peis.RegisterAsbitems
/// </summary>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/registerasbitemcharge")]
public async Task<RegisterAsbitemChargeDto> RegisterAsbitemChargeAsync(RegisterAsbitemChargeRequestDto input)
public async Task<RegisterCheckAsbitemChargeDto> RegisterAsbitemChargeAsync(RegisterCheckAsbitemCheckChargeRequestDto input)
{
if (input != null && input.Asbitems.Any() && input.ChargePays.Any())
{
//更新收费状态
List<RegisterCheckAsbitem> registerAsbitems = await _registerAsbitemRepository.GetListAsync(m => input.Asbitems.Select(s => s.RegisterAsbitemId).Contains(m.Id));
List<RegisterCheckAsbitem> registerAsbitems = await _registerCheckAsbitemRepository.GetListAsync(m => input.Asbitems.Select(s => s.RegisterAsbitemId).Contains(m.Id));
registerAsbitems.ForEach(f => f.IsCharge = 'Y');
#region 插入主表Charge
@ -529,11 +529,11 @@ namespace Shentun.Peis.RegisterAsbitems
#region 修改收费状态
await _registerAsbitemRepository.UpdateManyAsync(registerAsbitems);
await _registerCheckAsbitemRepository.UpdateManyAsync(registerAsbitems);
#endregion
return new RegisterAsbitemChargeDto { code = 1, msg = "收费成功", ChargeId = charge_new.Id };
return new RegisterCheckAsbitemChargeDto { code = 1, msg = "收费成功", ChargeId = charge_new.Id };
}
else
{
@ -551,7 +551,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/registerasbitemchargeback")]
public async Task<ResultDto> RegisterAsbitemChargeBackAsync(RegisterAsbitemChargeBackDto input)
public async Task<ResultDto> RegisterAsbitemChargeBackAsync(RegisterCheckAsbitemChargeBackDto input)
{
if (input != null && input.ChargeBackPays.Any())
{
@ -570,7 +570,7 @@ namespace Shentun.Peis.RegisterAsbitems
var chargeAsbitemList = await _chargeAsbitemRepository.GetListAsync(m => m.ChargeId == input.ChargeId);
//更新退费状态
List<RegisterCheckAsbitem> registerAsbitems = await _registerAsbitemRepository.GetListAsync(m => chargeAsbitemList.Select(s => s.RegisterAsbitemId).Contains(m.Id));
List<RegisterCheckAsbitem> registerAsbitems = await _registerCheckAsbitemRepository.GetListAsync(m => chargeAsbitemList.Select(s => s.RegisterAsbitemId).Contains(m.Id));
registerAsbitems.ForEach(f => f.IsCharge = 'N');
#region 插入主表Charge
@ -640,7 +640,7 @@ namespace Shentun.Peis.RegisterAsbitems
#region 修改为未收费状态
await _registerAsbitemRepository.UpdateManyAsync(registerAsbitems);
await _registerCheckAsbitemRepository.UpdateManyAsync(registerAsbitems);
#endregion
@ -675,11 +675,11 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/getregisterasbitemcheckstatus")]
public async Task<List<GetRegisterAsbitemCheckStatusResultDto>> GetRegisterAsbitemCheckStatusAsync(GetRegisterAsbitemCheckStatusRequestDto input)
public async Task<List<GetRegisterCheckAsbitemCheckStatusResultDto>> GetRegisterAsbitemCheckStatusAsync(GetRegisterCheckAsbitemCheckStatusRequestDto input)
{
if (input != null)
{
var registerQueryable = (await _registerAsbitemRepository.GetDbSetAsync())
var registerQueryable = (await _registerCheckAsbitemRepository.GetDbSetAsync())
.Include(x => x.PatientRegister)
.Include(x => x.PatientRegister.Patient)
.Include(x => x.Asbitem)
@ -744,7 +744,7 @@ namespace Shentun.Peis.RegisterAsbitems
from ac in cc.DefaultIfEmpty()
join d in await _customerOrgGroupRepository.GetQueryableAsync() on a.PatientRegister.CustomerOrgGroupId equals d.Id into dd
from ad in dd.DefaultIfEmpty()
select new GetRegisterAsbitemCheckStatusResultDto
select new GetRegisterCheckAsbitemCheckStatusResultDto
{
Age = a.PatientRegister.Age,
AsbitemName = a.Asbitem.DisplayName,
@ -781,7 +781,7 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/mergeregisterasbitem")]
public async Task MergeRegisterAsbitemAsync(MergeRegisterAsbitemDto input)
public async Task MergeRegisterAsbitemAsync(MergeRegisterCheckAsbitemDto input)
{
if (input != null)
{
@ -811,13 +811,13 @@ namespace Shentun.Peis.RegisterAsbitems
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("api/app/registerasbitem/cancelmergeregisterasbitem")]
public async Task CancelMergeRegisterAsbitemAsync(CancelMergeRegisterAsbitemDto input)
public async Task CancelMergeRegisterAsbitemAsync(CancelMergeRegisterCheckAsbitemDto input)
{
if (input != null)
{
foreach (var RegisterCheckId in input.RegisterCheckIds)
{
var RegisterAsbitemIds = (await _registerAsbitemRepository.GetListAsync(m => m.RegisterCheckId == RegisterCheckId)).Select(s => s.Id).ToList();
var RegisterAsbitemIds = (await _registerCheckAsbitemRepository.GetListAsync(m => m.RegisterCheckId == RegisterCheckId)).Select(s => s.Id).ToList();
//检查项目状态 是否能取消合并
foreach (var item in RegisterAsbitemIds)
@ -844,10 +844,10 @@ namespace Shentun.Peis.RegisterAsbitems
/// </summary>
/// <returns></returns>
[HttpGet("api/app/registerasbitem/getmergeregisterasbitemlist")]
public async Task<List<GetMergeRegisterAsbitemListDto>> GetMergeRegisterAsbitemListAsync(Guid PatientRegisterId)
public async Task<List<GetMergeRegisterCheckAsbitemListDto>> GetMergeRegisterAsbitemListAsync(Guid PatientRegisterId)
{
var ergerQuery = from h in await _registerAsbitemRepository.GetQueryableAsync()
var ergerQuery = from h in await _registerCheckAsbitemRepository.GetQueryableAsync()
join i in await _asbitemRepository.GetQueryableAsync() on h.AsbitemId equals i.Id into ii
from hi in ii.DefaultIfEmpty()
where h.PatientRegisterId == PatientRegisterId
@ -860,7 +860,7 @@ namespace Shentun.Peis.RegisterAsbitems
};
var entlist = (from a in await _registerAsbitemRepository.GetQueryableAsync()
var entlist = (from a in await _registerCheckAsbitemRepository.GetQueryableAsync()
join b in await _asbitemRepository.GetQueryableAsync() on a.AsbitemId equals b.Id
join c in await _itemTypeRepository.GetQueryableAsync() on b.ItemTypeId equals c.Id
join d in await _registerCheckRepository.GetQueryableAsync() on a.RegisterCheckId equals d.Id into dd
@ -869,7 +869,7 @@ namespace Shentun.Peis.RegisterAsbitems
from ae in ee.DefaultIfEmpty()
where a.PatientRegisterId == PatientRegisterId
orderby c.DisplayOrder ascending, ad.CreationTime ascending, b.DisplayOrder ascending
select new GetMergeRegisterAsbitemListDto
select new GetMergeRegisterCheckAsbitemListDto
{
RegisterAsbitemId = a.Id,
AsbitemName = b.DisplayName,

2
src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterAsbitems/RegisterAsbitemDbMapping.cs → src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterCheckAsbitems/RegisterCheckAsbitemDbMapping.cs

@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace Shentun.Peis.DbMapping
{
internal class RegisterAsbitemDbMapping : IEntityTypeConfiguration<RegisterCheckAsbitem>
internal class RegisterCheckAsbitemDbMapping : IEntityTypeConfiguration<RegisterCheckAsbitem>
{
public void Configure(EntityTypeBuilder<RegisterCheckAsbitem> entity)
{

2
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -450,7 +450,7 @@ public class PeisDbContext :
.ApplyConfiguration(new ReportPrinterDbMapping())
.ApplyConfiguration(new QueueRegisterDbMapping())
.ApplyConfiguration(new ReferenceRangeDbMapping())
.ApplyConfiguration(new RegisterAsbitemDbMapping())
.ApplyConfiguration(new RegisterCheckAsbitemDbMapping())
.ApplyConfiguration(new RegisterCheckDbMapping())
.ApplyConfiguration(new RegisterCheckCriticalValueDbMapping())
.ApplyConfiguration(new RegisterCheckItemDbMapping())

8
test/Shentun.Peis.Application.Tests/RegisterAsbitemAppServiceTest.cs → test/Shentun.Peis.Application.Tests/RegisterCheckAsbitemAppServiceTest.cs

@ -13,18 +13,18 @@ using Xunit.Abstractions;
namespace Shentun.Peis
{
public class RegisterAsbitemAppServiceTest : PeisApplicationTestBase
public class RegisterCheckAsbitemAppServiceTest : PeisApplicationTestBase
{
private readonly IRepository<RegisterCheckAsbitem> _repository;
private readonly RegisterAsbitemAppService _appService;
private readonly RegisterCheckAsbitemAppService _appService;
private readonly ITestOutputHelper _output;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public RegisterAsbitemAppServiceTest(ITestOutputHelper testOutputHelper)
public RegisterCheckAsbitemAppServiceTest(ITestOutputHelper testOutputHelper)
{
_output = testOutputHelper;
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
_repository = GetRequiredService<IRepository<RegisterCheckAsbitem>>();
_appService = GetRequiredService<RegisterAsbitemAppService>();
_appService = GetRequiredService<RegisterCheckAsbitemAppService>();
}
[Fact]
Loading…
Cancel
Save