fix(charge): 解决门诊收费中耗材请求数据查询问题 BUG#145

- 在处方查询方法中添加耗材请求表名参数支持
- 修复数据库查询中缺少耗材请求表关联的问题
- 将设备费用项状态从草稿改为计划状态以确保正确显示
- 为设备请求设置处方号以保证门诊收费能正确关联
- 优化数据库表连接逻辑支持耗材请求数据查询
This commit is contained in:
2026-03-19 19:36:11 +08:00
parent dc2e4098ae
commit 4210f32a05
4 changed files with 30 additions and 22 deletions

View File

@@ -121,7 +121,8 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
ChargeItemContext.DEVICE.getValue(), ChargeItemContext.REGISTER.getValue(),
ChargeItemStatus.PLANNED.getValue(), ChargeItemStatus.BILLABLE.getValue(),
ChargeItemStatus.BILLED.getValue(), ChargeItemStatus.REFUNDING.getValue(),
ChargeItemStatus.REFUNDED.getValue(), ChargeItemStatus.PART_REFUND.getValue());
ChargeItemStatus.REFUNDED.getValue(), ChargeItemStatus.PART_REFUND.getValue(),
CommonConstants.TableName.WOR_DEVICE_REQUEST);
prescriptionDtoList.forEach(e -> {
// 收费状态枚举
e.setStatusEnum_enumText(EnumUtils.getInfoByValue(ChargeItemStatus.class, e.getStatusEnum()));
@@ -229,7 +230,8 @@ public class OutpatientChargeAppServiceImpl implements IOutpatientChargeAppServi
ChargeItemStatus.REFUNDING.getValue(), ChargeItemStatus.REFUNDED.getValue(),
ChargeItemStatus.PART_REFUND.getValue(), YbPayment.DISCOUNT_PAY.getValue(),
YbPayment.SELF_CASH_VALUE.getValue(), YbPayment.SELF_CASH_VX_VALUE.getValue(),
YbPayment.SELF_CASH_ALI_VALUE.getValue(), YbPayment.SELF_CASH_UNION_VALUE.getValue());
YbPayment.SELF_CASH_ALI_VALUE.getValue(), YbPayment.SELF_CASH_UNION_VALUE.getValue(),
CommonConstants.TableName.WOR_DEVICE_REQUEST);
prescriptionDtoList.forEach(e -> {
// 应收金额
BigDecimal receivableAmount = e.getReceivableAmount();

View File

@@ -48,13 +48,14 @@ public interface OutpatientChargeAppMapper {
* @param refunding 收费状态:退费中
* @param refunded 收费状态:全部退费
* @param partRefund 收费状态:部分退费
* @param worDeviceRequest 耗材请求表名常量
* @return 患者处方列表
*/
List<EncounterPatientPrescriptionDto> selectEncounterPatientPrescription(@Param("encounterId") Long encounterId,
@Param("activity") Integer activity, @Param("medication") Integer medication, @Param("device") Integer device,
@Param("register") Integer register, @Param("planned") Integer planned, @Param("billable") Integer billable,
@Param("billed") Integer billed, @Param("refunding") Integer refunding, @Param("refunded") Integer refunded,
@Param("partRefund") Integer partRefund);
@Param("partRefund") Integer partRefund, @Param("worDeviceRequest") String worDeviceRequest);
/**
* 根据就诊id查询患者处方列表并新增字段应收金额实收金额优惠金额折扣率
@@ -75,6 +76,7 @@ public interface OutpatientChargeAppMapper {
* @param selfVxCode 微信枚举码
* @param selfAliCode 支付宝枚举码
* @param selfUnionCode 银联枚举码
* @param worDeviceRequest 耗材请求表名常量
* @return 患者处方列表
*/
List<EncounterPatientPrescriptionDto> selectEncounterPatientPrescriptionWithPrice(
@@ -84,5 +86,5 @@ public interface OutpatientChargeAppMapper {
@Param("refunding") Integer refunding, @Param("refunded") Integer refunded,
@Param("partRefund") Integer partRefund, @Param("discountCode") Integer discountCode,
@Param("self") Integer selfCode, @Param("selfVx") Integer selfVxCode, @Param("selfAli") Integer selfAliCode,
@Param("selfUnion") Integer selfUnionCode);
@Param("selfUnion") Integer selfUnionCode, @Param("worDeviceRequest") String worDeviceRequest);
}